From: Richard Retanubun <RichardRetanubun@RuggedCom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] recommended place to identify hardware using i2c-eeprom data.
Date: Fri, 17 Apr 2009 10:39:06 -0400 [thread overview]
Message-ID: <49E8948A.3040707@RuggedCom.com> (raw)
In-Reply-To: <200904170622.11288.sr@denx.de>
Stefan Roese wrote:
> I suggest you take a look at "gd->board_type" (enabled via
> CONFIG_BOARD_TYPES). This could be what you are looking for.
Neat! Thanks for the tip. Unfortunately my "board_type" does not fit inside an unsigned long.
For others on the ML, an example of using i2c eeprom with gd->board_type can be found in
board/cm5200/cm5200.c:checkboard()
Timur: Thanks for responding, I think I found a workaround for this.
I find that if I pre-create the environment variable in the board header file
e.g. #define CONFIG_EXTRA_ENV_SETTINGS "partnum=uninitialized_partnumber\0"
Then, setenv("partnum", "12-34-5678") called from board_early_init_r ("12-34-5678" obtained from i2c-eeprom) works.
Looking at _do_setenv in common/cmd_nvedit.c I think there may be something I'm violating by having it create/append
a new environment variable that does not exist before. (I know not overflowing: Environment size: 862/8188 bytes)
Not sure what the cause is at the moment.
Thanks for your time,
- Richard Retanubun
prev parent reply other threads:[~2009-04-17 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49E8948A.3040707@RuggedCom.com \
--to=richardretanubun@ruggedcom.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox