All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH tegra-uboot-scripts v3] Make folder for dtb files as an argument
@ 2014-07-28 19:40 Stefan Agner
       [not found] ` <463bd9459319d174d315a31eba4dc24daf03c0c3.1406576139.git.stefan-XLVq0VzYD2Y@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Agner @ 2014-07-28 19:40 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 in which folder U-Boot should search the dtb
file.

Signed-off-by: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>
---
No that was not what I wanted. The dtbdir should only affect the
DTB. Looks like beer and sending patches do not go well togheter
:-)

 gen-uboot-script.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gen-uboot-script.py b/gen-uboot-script.py
index 8ca3d01..3f2c401 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=None,
+    help='Search directory for dtbs on target; defaults to boot directory')
+
 args = parser.parse_args()
 if args.debug: print args
 
@@ -109,6 +112,11 @@ else:
     load='load ${devtype} ${devnum}:${rootpart}'
     prefix='/boot/'
 
+if not args.dtbdir:
+    args.dtbdir = prefix
+elif args.dtbdir[-1:] != '/':
+    args.dtbdir += '/'
+
 f.write(load + ' ${kernel_addr_r} ' + prefix + 'zImage\n')
 
 if args.initrd:
@@ -126,7 +134,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.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH tegra-uboot-scripts v3] Make folder for dtb files as an argument
       [not found] ` <463bd9459319d174d315a31eba4dc24daf03c0c3.1406576139.git.stefan-XLVq0VzYD2Y@public.gmane.org>
@ 2014-07-28 21:33   ` Stephen Warren
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2014-07-28 21:33 UTC (permalink / raw)
  To: Stefan Agner; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 07/28/2014 01:40 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 in which folder U-Boot should search the dtb
> file.

Applied.

> diff --git a/gen-uboot-script.py b/gen-uboot-script.py

> +if not args.dtbdir:
> +    args.dtbdir = prefix
> +elif args.dtbdir[-1:] != '/':

I converted that to use .endswith() to avoid open-coding.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-28 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-28 19:40 [PATCH tegra-uboot-scripts v3] Make folder for dtb files as an argument Stefan Agner
     [not found] ` <463bd9459319d174d315a31eba4dc24daf03c0c3.1406576139.git.stefan-XLVq0VzYD2Y@public.gmane.org>
2014-07-28 21:33   ` 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.