Wolfgang Wegner wrote: > On our board we have an FPGA, and for different applications a different > FPGA file shall be loaded without updating the firmware. For this, the > application has to set an U-Boot environment variable that specifies which > FPGA file to load on next boot. > We use an i2c EEPROM to hold board specific information. I read the EEPROM from U-Boot and set up the MAC address and arch/mach number using the misc_init_r(void) call method. This separates the U-boot environment from the machine specific data. I also use the EEPROM to hold the SDRAM settings so the first bootloader can configure the DRAM on multiple boards without requiring multiple binaries.
I have a strange bootcmd. If U-Boot starts with a corrupted environment, it runs the default bootcmd. The default bootcmd creates a bootcmd and then runs saveenv so the next boot will run the new bootcmd.. eg. from my include/configs/board.h file "bootcmd=setenv bootcmd '<complex bootcmd here>';saveenv;run bootcmd\0" I then access the U-Boot environment area from Linux and do all the "smart" stuff there. If I didn't do this, then Linux would access the corrupted boot section! Just my 0.02 euros worth. Aras ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users