From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/2] Standardize on run-time board ID variables
Date: Wed, 24 Oct 2012 16:24:56 -0600 [thread overview]
Message-ID: <50886AB8.2030802@wwwdotorg.org> (raw)
In-Reply-To: <20121024193210.GC8148@bill-the-cat>
On 10/24/2012 01:32 PM, Tom Rini wrote:
> On Wed, Oct 24, 2012 at 01:05:16PM -0600, Stephen Warren wrote:
>> On 10/24/2012 12:41 PM, Tom Rini wrote:
...
>>> Doing something to derive this also means that custom
>>> development can be a bit easier too since you can just set
>>> fdtfile directly and work out the logic for auto-detection
>>> later.
>>
>> Hmm. So I can't really put the following into Tegra's default
>> environment:
>>
>> "fdtfile=${soc}-${board}${boardrev}.dtb"
>>
>> ... since that would require any use of "${fdtfile}" in a command
>> to first expand fdtfile itself, then expand it a second time to
>> pick up the actual soc/board/... values, and that's not how the
>> shell works.
>>
>> That implies that e.g. Tegra's scriptboot (seed BOOTCMDS_COMMON
>> in include/configs/tegra-common-post.h) would need to do
>> something like:
>>
>> setenv fdtfile ${soc}-${board}${boardrev}.dtb
>
> I hope that a longer term thing would be trying to share more of
> the bootcmd related magic between all our parts. How we deal with
> this on TI stuff is that in uEnv.txt if we find the file, we load
> the file into the environment (so fdtfile=mylocalstuff.dtb will
> overwrite the default) and if uenvcmd is set execute that command.
Ah, so uEnv.txt is some user-managed file along the same lines as
boot.scr. I had thought it was the file behind CONFIG_ENV_IS_IN_FAT.
>> ... before executing the loaded boot.scr. But then, how would it
>> know whether to do that, or whether the user wanted to override
>> the fdtfile value?
>>
>> In theory, I could do the following in Tegra's default
>> environment:
>>
>> "fdtfile=" CONFIG_SYS_SOC "-" CONFIG_SYS_BOARD" ".dtb"
>>
>> But then that wouldn't allow for the fdtfile value to vary at
>> run-time based on $boardrev.
>
> It's not an imutable variable, so you could change it, if you do
> that early in the process.
Sure. My point was that would end up duplicating the method to
construct the value in two places; one in includes/configs/xxx.h for
the default, and one in code in U-Boot for the case where we override
the default to include some version number. That doesn't seem ideal.
next prev parent reply other threads:[~2012-10-24 22:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 17:28 [U-Boot] [PATCH 0/2] Standardize on run-time board ID variables Tom Rini
2012-10-24 17:28 ` [U-Boot] [PATCH 1/2] README: Document CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG Tom Rini
2012-10-24 17:28 ` [U-Boot] [PATCH 2/2] am335x_evm: Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG support Tom Rini
2012-10-24 19:21 ` Stephen Warren
2012-10-24 20:56 ` Tom Rini
2012-10-24 17:50 ` [U-Boot] [PATCH 0/2] Standardize on run-time board ID variables Stephen Warren
2012-10-24 18:41 ` Tom Rini
2012-10-24 19:05 ` Stephen Warren
2012-10-24 19:32 ` Tom Rini
2012-10-24 22:24 ` Stephen Warren [this message]
2012-10-26 7:45 ` Joe Hershberger
2012-10-29 15:15 ` Stephen Warren
2012-10-29 18:13 ` Tom Rini
2012-10-30 0:14 ` Joe Hershberger
2012-10-26 2:41 ` Simon Glass
2012-11-04 18:29 ` Tom Rini
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=50886AB8.2030802@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox