From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Herbrechtsmeier Date: Sun, 08 Jun 2014 09:57:27 +0200 Subject: [U-Boot] [PATCH] omap3: overo: Select fdtfile for expansion board In-Reply-To: References: <1402079878-27605-1-git-send-email-ashcharles@gmail.com> <539321C7.3060907@herbrechtsmeier.net> <20140607174809.GX7841@bill-the-cat> Message-ID: <53941767.8040803@herbrechtsmeier.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 07.06.2014 22:11, schrieb Ash Charles: > On Sat, Jun 7, 2014 at 10:48 AM, Tom Rini 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