* selecting UBI boot partition on startup
@ 2010-04-15 4:32 Deon Carr
2010-04-15 5:29 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Deon Carr @ 2010-04-15 4:32 UTC (permalink / raw)
To: linux-mtd
Hi,
I am designing a high availability system that requires two copies of
the system software with uboot booting the kernel / rootfs of the most
recent software.
My intended nand flash arrangement is along the lines of:
MTD0 MTD1
--------------------
UBOOT | UBI Layer
--------------------
The UBI layer will have two UBI volumes which will be formatted for
UBIFS. The intention is to package the kernel / rootfs and application
all in the single volume.
What is the best method of selecting UBI volume to boot from in uboot?
I could store a boot flag in each UBIFS along with the kernel, however
this will require reading both volumes in uboot to determine which one
to boot from. An alternative is to create a third smaller UBI volume
which instructs which UBI volume to boot from.
Is there a better way of handling this? Is it possible to reorder the
UBI volumes dynamically? If this were possible I could have uboot always
boot UBI0 and just rearrange UBI0, UBI1 whenever I need change the
volume to boot from.
Thanks in advance.
Deon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: selecting UBI boot partition on startup
2010-04-15 4:32 selecting UBI boot partition on startup Deon Carr
@ 2010-04-15 5:29 ` Wolfgang Denk
[not found] ` <0687C69BF96AF349833719247B11C1CE76ED80@exchtxus2.HSTX.global.vpn>
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2010-04-15 5:29 UTC (permalink / raw)
To: Deon Carr; +Cc: linux-mtd
Dear "Deon Carr",
In message <0687C69BF96AF349833719247B11C1CE76ED6C@exchtxus2.HSTX.global.vpn> you wrote:
>
> What is the best method of selecting UBI volume to boot from in uboot?
Store the information in U-Boot environment variables.
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@denx.de
If the car industry behaved like the computer industry over the last
30 years, a Rolls-Royce would cost $5, get 300 miles per gallon, and
blow up once a year killing all passengers inside.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: selecting UBI boot partition on startup
[not found] ` <0687C69BF96AF349833719247B11C1CE76ED80@exchtxus2.HSTX.global.vpn>
@ 2010-04-15 6:18 ` Wolfgang Denk
2010-04-15 20:22 ` Deon Carr
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2010-04-15 6:18 UTC (permalink / raw)
To: Deon Carr; +Cc: linux-mtd
Dear "Deon Carr",
please jkeep the mailing list on Cc: - others might be interested in
the answers as well.
In message <0687C69BF96AF349833719247B11C1CE76ED80@exchtxus2.HSTX.global.vpn> you wrote:
>
> >> What is the best method of selecting UBI volume to boot from in
> >> uboot?
>
> >Store the information in U-Boot environment variables.
>
> This was my initial thought however I was put off by the chance of the
> environment variables getting corrupted due to power loss while writing
> to U-Boot. I guess its possible to mirror the environment variables to
> another part of flash and restore it if the crc32 check fails on
> start-up.
Redundant environment is a standard feature in U-Boot. It covers
exactly the issue you have in mind - if you have a reset or power loss
while writing the environment, U-Boot will automatically fall back to
the redudant copy and use the previously used settings.
All you have to do is to enable this feature in your board config
file.
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@denx.de
They say a little knowledge is a dangerous thing, but it is not one
half so bad as a lot of ignorance. - Terry Pratchett, _Equal Rites_
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: selecting UBI boot partition on startup
2010-04-15 6:18 ` Wolfgang Denk
@ 2010-04-15 20:22 ` Deon Carr
0 siblings, 0 replies; 4+ messages in thread
From: Deon Carr @ 2010-04-15 20:22 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: linux-mtd
In message
<0687C69BF96AF349833719247B11C1CE76ED80@exchtxus2.HSTX.global.vpn> you
wrote:
> Redundant environment is a standard feature in U-Boot. It covers
> exactly the issue you have in mind - if you have a reset or power loss
> while writing the environment, U-Boot will automatically fall back to
> the redudant copy and use the previously used settings.
> All you have to do is to enable this feature in your board config
> file.
Found it. Thanks for the help.
Deon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-15 20:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-15 4:32 selecting UBI boot partition on startup Deon Carr
2010-04-15 5:29 ` Wolfgang Denk
[not found] ` <0687C69BF96AF349833719247B11C1CE76ED80@exchtxus2.HSTX.global.vpn>
2010-04-15 6:18 ` Wolfgang Denk
2010-04-15 20:22 ` Deon Carr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox