Am 07.06.2014 22:11, schrieb Ash Charles:
On Sat, Jun 7, 2014 at 10:48 AM, Tom Rini <tr...@ti.com> wrote:
In this case it might be harder to do this in a shell cmd. But we
_must_ check for fdtfile being unset and only setenv if not already set.
And then drop fdtfile from the config file.
Thanks both for your comments and suggestions. I agree that fdtfile
should only be set if it is currently unset---I'll send an updated
patch.
It would be nice if you only set an environment variable 'expansionname'
and setup the fdtfile via a command in the environment. This makes sure,
that under normal condition the fdtfile is not set and thereby not saved
in the environment with the command saveenv.
There is actually already a mechanism for environment variables to be
set by the board eeprom [1][2] so an expansion board could certainly
set the desired fdtfile name.
At the moment I use this functionality to set the environment variable
'fdtfile'.
The challenge (and my biggest
motivation for writing the patch) is making sure we select a dtb for
either 37xx (Overo Storm) or 35xx (non-storm) as otherwise Linux
doesn't boot.
Maybe you could set an environment variable 'boardname' to 'overo' or
'overo-storm' and use something like the following environment command:
if test -n \"${boardname}\" && test -n \"${expansionname}\"; then
setenv fdtfile omap3-${boardname}-${expansionname}.dtb;
fi;
This allows the expansion board to set the expansionname via eeprom and
works with both overo boards.
--Ash
[1] http://elinux.org/BeagleBoardPinMux#Expansion_boards
[2]
https://github.com/gumstix/meta-gumstix-extras/blob/dylan/recipes-core/i2c-tools/omap3-writeprom/writeprom.sh
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot