ARMSoftbootLoader

Differences between revisions 2 and 3
Revision 2 as of 2009-01-14 10:31:29
Size: 4087
Editor: p4081-ipbf2501marunouchi
Comment: First pass review, including cleanup of summary, rationale, and assumptions
Revision 3 as of 2009-01-14 10:33:51
Size: 4136
Editor: p4081-ipbf2501marunouchi
Comment: Separation of specification from implementation
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Specs/MuklukBootloader
  • Launchpad Entry: arm-softboot-loader

  • Created: January 13th, 2009

  • Contributors: Michael Casadevall, Emmet Hikory

  • Packages affected: kernel postinst, d-i; anything that installs a kernel or initrd, or acts as a wrapper for updating it

Summary

Provide a softboot loader for ARM to address outstanding issues with the wide variety of methods used to boot ARM devices, in a similar manner to that does to support ps3. Such a softboot loader would be installed on system flash or trusted boot media, to sufficiently enable the system to boot from more common devices (USB sticks, optical drives, hard drives, etc.).

Release Note

To facilitate standardisation of ARM use with that of other architectures, a new softboot loader is provided for porting to specific system boards, providing a standard boot interface for all ARM users.

Rationale

One of the major problems we have with the ARM architecture is that there is no standardized boot framework like EFI/BIOS on a PC, or OpenFirmware on a Mac, which makes supporting Ubuntu on ARM a rather difficult process since not only the kernel must be tweaked, we also must add support to d-i for each boot configuration we want to support. Additionally, some ARM hardware is designed for embedded solutions, and may not be capable of booting in an expected manner, or using existing procedures to allow for selection of updated kernels when upgrading.

Use Cases

  • Alice plays with her new Ubuntu ARM setup, and wants to change the boot time command lime arguements
  • Bob wants to go back to the previous kernel after the new one stopped his system from booting.
  • Chris's ARM device can't boot off the hard drive, which is the only connected storage large enough to support kernel updates.

Assumptions

  • Devices for which such a softboot loader are required are capable of booting off persistent on-board flash.
  • Vendor supplied bootloaders are able to automatically load a starter kernel and softboot environment
  • A starter kernel can be constructed with support for all necessary drivers to mount target boot filesystems.

Design

The ARM board will automatically load its onboard bootloader, which can't load the root filesystem device, which will load the starter kernel. The starter kernel will mount all devices it can find, and look for a menu file, and display a boot menu ala to grub or something similar. Once a kernel is found, kexec() is used to execute it, and control passed from the starter kernel to the main kernel. By having a standardized soft bootloader in the initrd, we have one set of d-i/update-initrd/etc routines for ARM in general.

Implementation

The basis of any bootloader that is used as a softbootloader depends on the kexec mechanism of the kernel. kexec loads a kernel into memory, and then when recieving a syscall from userland, loads a short relocation stub, and then passes execution to the second kernel. This allows us to load the kernel and initramfs, and rootfs anywhere from where the first kernel sees it. There is already a proof of concept bootloader known as kboot that could do what we need (more on this below)

UI Changes

I'd like to base the UI on grub or something similar. Perpahs do something graphical like petitboot. TBD

Code Changes

All tools which install or update kernel and initrds directly (i.e., not through update-initrd) would have to be modified to handle this arrangement, just like any new architecture or platform in ubuntu.

Test/Demo Plan

Determine if kboot can meet our needs, then tweak it as need be. kboot is written in shell and is fairly slow; a much faster implementation could/should be written to replace the kboot based solution should we choose to use it for the Jaunty cycle.

Unresolved issues

  • can kboot meet our needs with minor tweaking, or will an entirely new soft bootloader been to be written


CategorySpec

Specs/ARMSoftbootLoader (last edited 2010-05-25 13:20:08 by 5ac8847a)