From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Fri, 17 Apr 2009 06:22:10 +0200 Subject: [U-Boot] recommended place to identify hardware using i2c-eeprom data. In-Reply-To: <49E7AAA4.5010007@RuggedCom.com> References: <49E7AAA4.5010007@RuggedCom.com> Message-ID: <200904170622.11288.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday 17 April 2009, Richard Retanubun wrote: > 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. I suggest you take a look at "gd->board_type" (enabled via CONFIG_BOARD_TYPES). This could be what you are looking for. Best regards, Stefan ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================