All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aras Vaichas <arasv@magtech.com.au>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] auto-save environment if using default	environment?
Date: Wed, 26 Mar 2008 10:49:04 +1100	[thread overview]
Message-ID: <47E98F70.5050003@magtech.com.au> (raw)
In-Reply-To: <20080325231514.GA19940@leila.ping.de>

Wolfgang Wegner wrote:
> On our board we have an FPGA, and for different applications a different
> FPGA file shall be loaded without updating the firmware. For this, the
> application has to set an U-Boot environment variable that specifies which
> FPGA file to load on next boot.
>   
We use an i2c EEPROM to hold board specific information. I read the
EEPROM from U-Boot and set up the MAC address and arch/mach number using
the misc_init_r(void) call method. This separates the U-boot environment
from the machine specific data. I also use the EEPROM to hold the SDRAM
settings so the first bootloader can configure the DRAM on multiple
boards without requiring multiple binaries.

I have a strange bootcmd. If U-Boot starts with a corrupted environment,
it runs the default bootcmd. The default bootcmd creates a bootcmd and
then runs saveenv so the next boot will run the new bootcmd..

eg. from my include/configs/board.h file

"bootcmd=setenv bootcmd '<complex bootcmd here>';saveenv;run bootcmd\0"

I then access the U-Boot environment area from Linux and do all the
"smart" stuff there. If I didn't do this, then Linux would access the
corrupted boot section!

Just my 0.02 euros worth.

Aras

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

  reply	other threads:[~2008-03-25 23:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 13:36 [U-Boot-Users] auto-save environment if using default environment? w.wegner at astro-kom.de
2008-03-25 15:24 ` Jean-Christophe PLAGNIOL-VILLARD
2008-03-25 15:36   ` w.wegner at astro-kom.de
2008-03-25 16:00 ` Markus Klotzbücher
2008-03-25 16:18   ` w.wegner at astro-kom.de
2008-03-25 20:23   ` Wolfgang Denk
2008-03-25 20:16 ` Wolfgang Denk
2008-03-25 23:15   ` Wolfgang Wegner
2008-03-25 23:49     ` Aras Vaichas [this message]
2008-03-26  7:28       ` Markus Klotzbücher
2008-03-26  4:51 ` Mike Frysinger
2008-03-26  7:30   ` Wolfgang Denk
2008-03-26 14:49     ` Mike Frysinger
2008-03-26 15:01       ` Wolfgang Denk
2008-03-30 20:28         ` Mike Frysinger

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=47E98F70.5050003@magtech.com.au \
    --to=arasv@magtech.com.au \
    --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.