Fallback environment in barebox
Baruch Siach
baruch at tkos.co.il
Mon Feb 28 00:50:40 EST 2011
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 at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
More information about the barebox
mailing list