public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Boot based on I2C EEPROM value
@ 2010-02-17 23:59 Canchivaram, Srivatsan
  2010-02-18 12:52 ` Detlev Zundel
  0 siblings, 1 reply; 5+ messages in thread
From: Canchivaram, Srivatsan @ 2010-02-17 23:59 UTC (permalink / raw)
  To: u-boot

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

 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-02-18 23:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-17 23:59 [U-Boot] Boot based on I2C EEPROM value Canchivaram, Srivatsan
2010-02-18 12:52 ` Detlev Zundel
2010-02-18 13:11   ` Detlev Zundel
2010-02-18 22:51   ` Canchivaram, Srivatsan
2010-02-18 23:16     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox