Chain booting on the Balloon board

Why chain booting?

Originally, the Balloon boot process looked like this:

  1. PXA270 reads bootldr from NOR Flash and runs it
  2. bootldr reads kernel (zImage) from yaffs filesystem in NAND Flash (/boot partition) and runs it
  3. kernel mounts root yaffs filesystem in NAND Flash (/root partition) and boots

This works fine, but has a number of deficiencies:

We'd like to improve on this.

What is chain booting?

The ability exists in bootldr to load and run a kernel from NOR Flash. We have been using this to boot the 'recovery' kernel/initramfs, which is useful for installing and manipulating the root filesystem. Usefully, the Linux kernel has the ability to load another kernel and run it, which leads to another boot possibility: chain booting. It looks like this:

  1. PXA270 reads bootldr from NOR Flash and runs it
  2. bootldr reads recovery kernel from NOR Flash and runs it, setting a 'boot script' for the kernel which tells it to chain boot
  3. Recovery kernel loads another kernel from some other filesystem (could be NAND Flash using any filesystem, USB stick, and so on) and runs it.
  4. Main kernel mounts root filesystem of its choice and boots.

Note that now the bootldr doesn't need to know anything about any filesystems: it just has to read the recovery kernel from NOR Flash. All the intelligence is left to the recovery and main kernels.

The recovery kernel is still available for system administration tasks, and can be instructed not to chain boot by a simple command in bootldr. In fact, the recovery kernel might be thought of as a kind of super-bootldr.

How to implement chain booting

Chain booting is supported by the software in trunk since April 2011.

Instructions for building and installing this are on the BalloonDevelopment page.


CategoryDocumentation

Balloonboard: ChainBooting (last edited 2011-04-05 09:02:17 by NeilWilliams)