[U-Boot] Support of Beagleboard-xm

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!
Regards, Thomas

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
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.

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

I'm not so familiar with u-boot. Your way seems more elegant. I've being using this version with loading/saving env within the FAT on the microSD for a while. There is a feature in my solution that needs to be mentioned. The default environment is read out from the variable "default_environment" within the object "env_common.o" and written out into a file (uEnv.txt). This is accomplished through the "putenv.c" in the tools directory. I think you are in a better position to output an acceptable patch for beagleboard-xm into the u-boot. My patch is a git path, which when applied to 2013.01.01 u-boot through "git apply", will give a source which can be built.
Thomas
On Fri, Mar 29, 2013 at 4:04 AM, 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
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
participants (3)
-
Dashi Cao
-
Javier Martinez Canillas
-
Tom Rini