From: Sascha Hauer <s.hauer@pengutronix.de>
To: Benoit RAT <benoit@sevensols.com>
Cc: barebox@lists.infradead.org
Subject: Re: Check if valid kernel and/or FS
Date: Fri, 25 May 2012 14:35:31 +0200 [thread overview]
Message-ID: <20120525123531.GO30400@pengutronix.de> (raw)
In-Reply-To: <CAHvDM_dXQhSHi+gACuwnbs9i2=Sf93Bt8PBPMdKS0KvvNztmvA@mail.gmail.com>
On Fri, May 25, 2012 at 12:58:48PM +0200, Benoit RAT wrote:
> Thanks,
>
> I want to know, if i am using the default environment (the that I am using
> from compilation)
> barebox> no valid environment found on /dev/env0. Using default environment
>
> Or I am using the one that there is in /dev/env0
>
> It is in the case someone break something in the NAND flash env, I want to
> save again the default one.
Currently there is no way to detect that, but there is a little trick.
Put a this_is_compiled_in file into your default environment. Then
during startup you can do:
if [ -f /env/this_is_compiled_in ]; then
echo "Sorry man, you lost your environment"
rm /env/this_is_compiled_in
saveenv
fi
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-05-25 12:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 10:08 Benoit RAT
2012-05-25 10:51 ` Eric Bénard
2012-05-25 10:58 ` Benoit RAT
2012-05-25 12:35 ` Sascha Hauer [this message]
2012-05-25 11:10 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-25 11:12 ` Eric Bénard
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=20120525123531.GO30400@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=benoit@sevensols.com \
/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