All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH tegra-uboot-scripts 2/2] Make folder for dtb files as an argument
Date: Wed, 23 Jul 2014 15:48:33 -0600	[thread overview]
Message-ID: <53D02DB1.90401@wwwdotorg.org> (raw)
In-Reply-To: <cc27525d885d60e977b2cf17ccf7e8735b9eddb7.1406147204.git.stefan-XLVq0VzYD2Y@public.gmane.org>

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!

  parent reply	other threads:[~2014-07-23 21:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-07-23 21:50   ` [PATCH tegra-uboot-scripts 1/2] Explicitly ask for Python 2 Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53D02DB1.90401@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=stefan-XLVq0VzYD2Y@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.