From: Wolfgang Denk Date: Fri, 05 Oct 2007 00:32:38 +0200 Subject: [U-Boot-Users] is it possible to make the booting sequence in U-boot? In-Reply-To: Your message of "Thu, 04 Oct 2007 15:17:15 PDT." <13049956.post@talk.nabble.com> Message-ID: <20071004223238.0EE5F24884@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <13049956.post@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