mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: Boaz Ben-David <boaz.bd@wellsense-tech.com>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>,
	Itai Raab <itai.raab@wellsense-tech.com>
Subject: Re: Fallback environment in barebox
Date: Mon, 28 Feb 2011 07:50:40 +0200	[thread overview]
Message-ID: <20110228055040.GC2667@jasper.tkos.co.il> (raw)
In-Reply-To: <39A4B204C321D34DA3490E3B119D5A6C68C006F894@SBS2008.wellsense.local>

Hi Boaz,

On Sun, Feb 27, 2011 at 12:09:59PM +0200, Boaz Ben-David wrote:
> Sounds great.
> 
> Is there any documentation on how to "register" environments?

What Juergen meant to say is "register partitions named env0, env1, ...". The 
barebox startup code then automatically picks the first valid environment 
partition.

To register partitions (with bad blocks awareness) use devfs_add_partition() 
and then dev_add_bb_dev(). grep for "env0" under arch/ for many examples.

baruch

> On Sun, 2011-02-27 at 10:50 +0100, Juergen Beisert wrote:
> > Boaz Ben-David wrote:
> > > We want to implement a mechanism in barebox to use two environment
> > > partitions.
> > > i.e. when barebox boots it will go to the first by default and try to
> > > use it. If for some reason it fails
> > > it will boot with the second one.
> > >
> > > What is the best way to implement this in barebox and did anyone do it
> > > already?
> > 
> > AFAIR a mechanism like this is already present in barebox. It tries the first 
> > environment, checks its CRC and if it fails it tries the next, if one exists.
> > Just register env0, env1, .....

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-02-28  5:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-27  6:19 Boaz Ben-David
2011-02-27  9:50 ` Juergen Beisert
2011-02-27 10:09   ` Boaz Ben-David
2011-02-28  5:50     ` Baruch Siach [this message]
2011-02-28  8:08       ` Boaz Ben-David
2011-03-06 14:59       ` Itai Raab
2011-03-06 18:26         ` Baruch Siach
2011-03-08 15:37           ` Juergen Beisert
2011-03-09 11:00             ` Juergen Beisert
2011-03-27  8:58               ` Boaz Ben-David
2011-04-08  7:03                 ` Sascha Hauer

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=20110228055040.GC2667@jasper.tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=barebox@lists.infradead.org \
    --cc=boaz.bd@wellsense-tech.com \
    --cc=itai.raab@wellsense-tech.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