public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] recommended place to identify hardware using i2c-eeprom data.
@ 2009-04-16 22:01 Richard Retanubun
  2009-04-16 22:04 ` Timur Tabi
  2009-04-17  4:22 ` Stefan Roese
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Retanubun @ 2009-04-16 22:01 UTC (permalink / raw)
  To: u-boot

Hi,

I am working on an MP8360E powerpc platform using uboot 2009.03.

our boards contain an i2c eeprom that identify the type of board it is.

sing this information I would like to have a universal u-boot binary that can read the eeprom
and use the data to influence how the rest of the boot proceeds. (e.g setup mac addresses, initialize GPIOs, call setenv to initialize other params).

I've tried extracting the information at board_early_init_r (because I need to initialize MAC address later using this information also)
and store the information using setenv("partnum" "extracted_board_id");

However, the resulting printenv after boot only contains "pa" with no data, so obviously I am doing something wrong (calling setenv too early?)

Is there a recommended way/examples of doing this?

I've thought about using the global data, but don't know if there is a struct member that is arch-independent.
Thanks for everyone's time.

- Richard Retanubun

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

end of thread, other threads:[~2009-04-17 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 22:01 [U-Boot] recommended place to identify hardware using i2c-eeprom data Richard Retanubun
2009-04-16 22:04 ` Timur Tabi
2009-04-17  4:22 ` Stefan Roese
2009-04-17 14:39   ` Richard Retanubun

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