[U-Boot] recommended place to identify hardware using i2c-eeprom data.

Richard Retanubun RichardRetanubun at RuggedCom.com
Fri Apr 17 00:01:08 CEST 2009


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


More information about the U-Boot mailing list