
On Thu, Mar 28, 2013 at 9:04 PM, Tom Rini trini@ti.com wrote:
On Thu, Mar 28, 2013 at 12:52:04PM +0800, Dashi Cao wrote:
Hi all, I have got a Beagleboard-xm, and I'm feeling that saving environment variable is an issue because this board has no NAND.
U-Boot supports environment variable file located in a FAT file system. So I set out and made a new board omap3_beagle-xm, copied from omap3_beagle, but with environment file on the FAT of the microSD.
I'm not sure if I'm just reinventing the wheel!
An interesting concept and one I've thought about doing myself at some point, so thanks! There's a better way to do this however. You can have boards.cfg take a base config file (say omap3_beagle) and add additional defines (say CONFIG_ENV_IS_IN_FAT) for a specific build target (omap3_beagle_env_fat) and not have to copy all of the other files. Then just modify omap3_beagle.h with: #ifdef CONFIG_ENV_IS_IN_FAT #undef CONFIG_ENV_IS_IN_NAND #define FAT_FILE ... ... #endif
Hi Dashi,
If you want an example on how to do this, something similar is made for IGEP boards. There are two IGEP board types: IGEP COM Module and IGEPv2. These two boards are very similar and each one can have one of two flash memory types: NAND or OneNAND.
The same board file (board/isee/igep00x0/igep00x0.c) is used for every <board type, flash type> combination and you can choose between 4 base configs defined in boards.cfg:
igep0020 => igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_ONENAND igep0020_nand => igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_NAND igep0030 => igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_ONENAND igep0030_nand => igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_NAND
Hope it helps.
And be set, more or less. And don't re-use the name uEnv.txt please. How about u-boot-env.txt ? And we shouldn't need to populate to start with, I hope at least, it should just be OK until the first saveenv happens.
-- Tom
Best regards, Javier