Standardize on run-time board ID variables
Get series with b4
b4 am 20121024184131.GB8148@bill-the-catVersions newest first
- v1 Latest0 of 2 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 2 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/2] Standardize on run-time board ID variables
Quoted 16 lines · Stephen Warren
Quoted 10 lines · Tom Rini
Hey all,
I've been thinking about one of the problems we need to solve over in TI AM335x land and that is given that we support a number of different boards with a single binary (and we have an i2c eeprom that tells us what board and revision we are on), the user needs to be able to easily determine what board we are on so they know what dtb file to load so they can boot. To this end I've added
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIGto the README which says when set we haveboard_nameandboard_revset at run-time. Then for am335x[1]With
CONFIG_ENV_VARS_UBOOT_CONFIGset, there's a environment variable named $board that indicates which board U-Boot is running on (and other related variables). The idea is that the user can:
Quoted 8 lines
fsload ${devtype} ${devnum}:${rootpart} ${fdt_addr_r} \ /boot/${soc}-${board}.dtbNow,
CONFIG_ENV_VARS_UBOOT_CONFIGsets $board at compile-time, since the config variable was created in the context on a U-Boot that runs on a single board. However, I see no reason why we can't maintain the user-visible results of this config option even in other cases, so that everything is consistent to the user
This works assuming that board maps to the device tree name. A bit more below...
Quoted 2 lines
To that end, can we make
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIGset $board instead of $board_name?
I had talked with Joe about this on IRC briefly and he seemed to be against overwriting "board"
Quoted 4 lines
Adding $board_rev sounds like a very good idea; the filename in the above command could be modified to:
${soc}-${board}${boardrev}.dtb
Indeed, I know we'll need to do this in the future for one of the boards in this family.
Quoted 3 lines
Or, do you think it'd be better for boot.scr to always reference $fdtfile, and so modify Tegra's default environment to derive $fdtfile from $soc, $board, $boardrev?
Or uEnv.txt, but yes, fdtfile seems to be the standard variable name for the device tree to use. 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. Also not hard-coding in the path makes it easier for whichever distro to fill in that logic.
Quoted 2 lines
(This general discussion might usefully happen on the cross-distro mailing list too?)
Yes. Where? :)
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121024/9d0f0cd1/attachment.pgp>