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 <tr...@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 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot