* [PATCH tegra-uboot-scripts 1/2] Explicitly ask for Python 2
@ 2014-07-23 20:27 Stefan Agner
[not found] ` <b1286f43830d50fc483310e2e32c61ab2308a4e5.1406147204.git.stefan-XLVq0VzYD2Y@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Agner @ 2014-07-23 20:27 UTC (permalink / raw)
To: swarren-3lzwWm7+Weoh9ZMKESR00Q
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, stefan-XLVq0VzYD2Y
To make the scripts work without changes on distribution which
"python" defaults to Python 3, we should explicitly ask for
Python 2.
Signed-off-by: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>
---
gen-uboot-script.py | 2 +-
part-uuid.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gen-uboot-script.py b/gen-uboot-script.py
index a60aed0..8ca3d01 100755
--- a/gen-uboot-script.py
+++ b/gen-uboot-script.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
#
diff --git a/part-uuid.py b/part-uuid.py
index cd82c7d..e53a64c 100755
--- a/part-uuid.py
+++ b/part-uuid.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
# Copyright (c) 2011-2013, NVIDIA CORPORATION. All rights reserved.
#
--
2.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <b1286f43830d50fc483310e2e32c61ab2308a4e5.1406147204.git.stefan-XLVq0VzYD2Y@public.gmane.org>]
* [PATCH tegra-uboot-scripts 2/2] Make folder for dtb files as an argument [not found] ` <b1286f43830d50fc483310e2e32c61ab2308a4e5.1406147204.git.stefan-XLVq0VzYD2Y@public.gmane.org> @ 2014-07-23 20:27 ` Stefan Agner [not found] ` <cc27525d885d60e977b2cf17ccf7e8735b9eddb7.1406147204.git.stefan-XLVq0VzYD2Y@public.gmane.org> 2014-07-23 21:50 ` [PATCH tegra-uboot-scripts 1/2] Explicitly ask for Python 2 Stephen Warren 1 sibling, 1 reply; 4+ messages in thread From: Stefan Agner @ 2014-07-23 20:27 UTC (permalink / raw) To: swarren-3lzwWm7+Weoh9ZMKESR00Q Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, stefan-XLVq0VzYD2Y Some distribution use different folders to store the dtb files rather then storing them directly in /boot. This adds a new argument to define which folder U-Boot should search the dtb file. Signed-off-by: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org> --- gen-uboot-script.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gen-uboot-script.py b/gen-uboot-script.py index 8ca3d01..74a42a8 100755 --- a/gen-uboot-script.py +++ b/gen-uboot-script.py @@ -71,6 +71,9 @@ parser.add_argument('--noisy', action='store_true', parser.add_argument('--cmdline', help='Extra command-line options') +parser.add_argument('--dtb-dir', dest='dtbdir', default='/boot', + help='Search directory for dtbs on target; defaults to /boot') + args = parser.parse_args() if args.debug: print args @@ -126,7 +129,7 @@ else set _fdt ${soc}-${board}${boardver}.dtb; fi ''') -f.write(load + ' ${fdt_addr_r} ' + prefix + '${_fdt}\n') +f.write(load + ' ${fdt_addr_r} ' + args.dtbdir + '/${_fdt}\n') f.write('set _fdt\n') bootargs = '' -- 2.0.2 ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <cc27525d885d60e977b2cf17ccf7e8735b9eddb7.1406147204.git.stefan-XLVq0VzYD2Y@public.gmane.org>]
* Re: [PATCH tegra-uboot-scripts 2/2] Make folder for dtb files as an argument [not found] ` <cc27525d885d60e977b2cf17ccf7e8735b9eddb7.1406147204.git.stefan-XLVq0VzYD2Y@public.gmane.org> @ 2014-07-23 21:48 ` Stephen Warren 0 siblings, 0 replies; 4+ messages in thread From: Stephen Warren @ 2014-07-23 21:48 UTC (permalink / raw) To: Stefan Agner; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA On 07/23/2014 02:27 PM, Stefan Agner wrote: > Some distribution use different folders to store the dtb files > rather then storing them directly in /boot. This adds a new > argument to define which folder U-Boot should search the dtb > file. > diff --git a/gen-uboot-script.py b/gen-uboot-script.py > +parser.add_argument('--dtb-dir', dest='dtbdir', default='/boot', > + help='Search directory for dtbs on target; defaults to /boot') I'd prefer the default to be None rather that a hard-coded path here. That way, after the following code that already exists: if args.type == 'net': f.write('dhcp\n') load='tftpboot' prefix='' else: load='load ${devtype} ${devnum}:${rootpart}' prefix='/boot/' ... we can add something like: if not args.dtbdir: args.dtbdir = prefix ... which will exactly preserve the existing behaviour in the network-boot case. > -f.write(load + ' ${fdt_addr_r} ' + prefix + '${_fdt}\n') > +f.write(load + ' ${fdt_addr_r} ' + args.dtbdir + '/${_fdt}\n') > f.write('set _fdt\n') As an aside, I guess I should write a gen-extlinux-conf.py too! ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH tegra-uboot-scripts 1/2] Explicitly ask for Python 2 [not found] ` <b1286f43830d50fc483310e2e32c61ab2308a4e5.1406147204.git.stefan-XLVq0VzYD2Y@public.gmane.org> 2014-07-23 20:27 ` [PATCH tegra-uboot-scripts 2/2] Make folder for dtb files as an argument Stefan Agner @ 2014-07-23 21:50 ` Stephen Warren 1 sibling, 0 replies; 4+ messages in thread From: Stephen Warren @ 2014-07-23 21:50 UTC (permalink / raw) To: Stefan Agner; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA On 07/23/2014 02:27 PM, Stefan Agner wrote: > To make the scripts work without changes on distribution which > "python" defaults to Python 3, we should explicitly ask for > Python 2. I've applied this one patch. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-23 21:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-23 20:27 [PATCH tegra-uboot-scripts 1/2] Explicitly ask for Python 2 Stefan Agner
[not found] ` <b1286f43830d50fc483310e2e32c61ab2308a4e5.1406147204.git.stefan-XLVq0VzYD2Y@public.gmane.org>
2014-07-23 20:27 ` [PATCH tegra-uboot-scripts 2/2] Make folder for dtb files as an argument Stefan Agner
[not found] ` <cc27525d885d60e977b2cf17ccf7e8735b9eddb7.1406147204.git.stefan-XLVq0VzYD2Y@public.gmane.org>
2014-07-23 21:48 ` Stephen Warren
2014-07-23 21:50 ` [PATCH tegra-uboot-scripts 1/2] Explicitly ask for Python 2 Stephen Warren
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.