[U-Boot] Boot based on I2C EEPROM value
Canchivaram, Srivatsan
Srivatsan.Canchivaram at viasat.com
Thu Feb 18 00:59:10 CET 2010
Hello,
The modem I am working on contains two software images in flash memory:
1. Default image
2. Backup image
Typically, the Default image will get loaded. If the application
software determines that the Default image is causing issues, it will
set a value of 1 in an address in the I2C EEPROM and reboot the board.
So, U-boot will need to read this EEPROM value and determine whether it
should boot the Default or Backup image i.e.
if EEPROM data == 0
bootm $default_addr
else
bootm $backup_addr
How can I read and parse the EEPROM data from U-boot?
U-boot has the facility to read the I2C device from the command line as
in (EEPROM dev num = 50, address = 2, count = 1):
=> i2c md 50 2 1
0002: 01 .
How do I parse this from within a U-boot command that can be run at
boot-up?
Thank you,
Srivatsan
More information about the U-Boot
mailing list