All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] recommended place to identify hardware using i2c-eeprom data.
Date: Fri, 17 Apr 2009 06:22:10 +0200	[thread overview]
Message-ID: <200904170622.11288.sr@denx.de> (raw)
In-Reply-To: <49E7AAA4.5010007@RuggedCom.com>

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
=====================================================================

  parent reply	other threads:[~2009-04-17  4:22 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 [this message]
2009-04-17 14:39   ` Richard Retanubun

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=200904170622.11288.sr@denx.de \
    --to=sr@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.