[U-Boot-Users] is it possible to make the booting sequence in U-boot?

Wolfgang Denk wd at denx.de
Fri Oct 5 00:32:38 CEST 2007


In message <13049956.post at talk.nabble.com> you wrote:
> 
> I am trying to make two different booting methods with some booting sequence
> in u-boot, like the bios in PC does. Basically I have kernel Image 1 in NAND
> and File system 1 on hard drive, kernel image 2 and File system 2 also on
> the same NAND Flash. The goal here is try to boot the system from Image 1
> and file system 1 first, and if the hard drive fails, the bootloader
> (u-boot) will try to boot from Image 2 and File system 2 *automatically*. My
> question is, is it possible to achieve this in uboot? If so, any hints?

This is possible, and actually trivial.

Define two environment variables, say "boot_disk" and "boot_nand"  to
boot  from disk or NAND, respectively, such that "run boot_disk" will
perform a disk boot the way you want it,  and  "run  boot_nand"  will
boot form NAND.

Then define "bootcmd" as "run boot_disk;run "boot_nand".

That's all.

See also the manual for additional bells and whistles like watchdog
support, boot counter etc.

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
"Life and death are seldom logical."
"But attaining a desired goal always is."
	-- McCoy and Spock, "The Galileo Seven", stardate 2821.7




More information about the U-Boot mailing list