From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Using 'ver' env var
Date: Mon, 13 Aug 2007 22:45:48 +0200 [thread overview]
Message-ID: <20070813204548.D6AF72405E@gemini.denx.de> (raw)
In-Reply-To: Your message of "Mon, 13 Aug 2007 15:26:54 CDT." <5CBE65F7D9232C47861CB09B0954861C66A93C@MAIL.infinitychannel.local>
In message <5CBE65F7D9232C47861CB09B0954861C66A93C@MAIL.infinitychannel.local> you wrote:
>
> > What makes you think so? saveenv does not do any filtering to exclude
> > any variable, so of course it gets saved, too.
>
> It does, but only if you explicitly call 'saveenv'... It does not store
> on it's own.
Of course. U-Boot usually does only what you tell it.
> > To print the U-Boot version without need to reset the board.
>
> But you can print it using 'version', too... And unless you explictly
> save it,
> the 'ver' env var does nothing more for you than the 'version' command,
You can use the variable in commands, like for implementing
version-dependent things, or test it, or ...
> Can't be accessed anywhere other then from the u-boot command prompt...
It is a normal environment variable like any other. It can be used
whenever and whererver other variables can get used. This includes
saving to flash and reading the flash from Linux.
> If you don't explicitly 'saveenv' there is no 'ver' variable to read
> from linux...
> And it can't be good for the flash to force u-boot to save on every
> boot.
It's not needed to save this on every boot. It's perfectly sufficient
to save it once after you've installed and booted a new version of
U-Boot.
> So if I update (from linux for example) 'ver' doesn't get updated unless
> u-boot is
> doing a saveenv on every boot...
Not on every boot. It's sufficient to perform this on the first boot.
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
'What shall we do?' said Twoflower. 'Panic?' said Rincewind hope-
fully. He always held that panic was the best means of survival; back
in the olden days, his theory went, people faced with hungry sabre-
toothed tigers could be divided very simply in those who panicked and
those who stood there saying 'What a magnificent brute!' or 'Here,
pussy.' - Terry Pratchett, _The Light Fantastic_
next prev parent reply other threads:[~2007-08-13 20:45 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 [this message]
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
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=20070813204548.D6AF72405E@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