From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Using 'ver' env var
Date: Tue, 14 Aug 2007 17:23:43 +0200 [thread overview]
Message-ID: <20070814152343.3CE3F24041@gemini.denx.de> (raw)
In-Reply-To: Your message of "Tue, 14 Aug 2007 16:40:31 +0200." <1187102431.13869.7.camel@elrond.sweden.atmel.com>
In message <1187102431.13869.7.camel@elrond.sweden.atmel.com> you wrote:
>
> Ideally this should be in a script "reboot_cmd" which
> gets executed at every reboot before anything else
> is executed.
I really don't understand why you make all this so complicated.
I think we agree that all that needs to be done is running a single
"saveenv" command once after installation of a new U-Boot image (which
is supposed to never to happen in the field anyway).
So deine yoiur "bootcmd" to include something like a "run once"
command, and define "once" as a "harmless" operation, like this:
=> setenv once version
Then, when you update U-Boot (under Linux), also change the definition
of "once", equivalent to this:
=> setenv once "saveenv;setenv once version"
The next time U-Boot boots it will run this variable, will save the
environment and then reset the variable to the effective no-op
command.
Voila...
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I believe the use of noise to make music will increase until we
reach a music produced through the aid of electrical instruments
which will make available for musical purposes any and all sounds
that can be heard." - composer John Cage, 1937
next prev parent reply other threads:[~2007-08-14 15:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-13 19:55 [U-Boot-Users] Using 'ver' env var Zach Sadecki
2007-08-13 20:05 ` Wolfgang Denk
2007-08-13 20:26 ` Zach Sadecki
2007-08-13 20:45 ` Wolfgang Denk
2007-08-13 21:41 ` Ulf Samuelsson
2007-08-13 21:25 ` Zach Sadecki
2007-08-13 22:07 ` [U-Boot-Users] PATCH: save 'ver' env var on update Zach Sadecki
2007-08-14 0:10 ` Zach Sadecki
2007-08-14 0:18 ` Wolfgang Denk
2007-08-14 0:13 ` Wolfgang Denk
2007-08-14 0:11 ` [U-Boot-Users] Using 'ver' env var Wolfgang Denk
2007-08-14 5:02 ` Ulf Samuelsson
2007-08-14 13:39 ` Wolfgang Denk
2007-08-14 14:40 ` Ulf Samuelsson
2007-08-14 15:23 ` Wolfgang Denk [this message]
2007-08-14 18:18 ` Ulf Samuelsson
2007-08-14 18:55 ` Rune Torgersen
2007-08-14 19:03 ` Wolfgang Denk
2007-08-14 19:12 ` Zach Sadecki
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=20070814152343.3CE3F24041@gemini.denx.de \
--to=wd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox