Improve kexecboot


 * Summary : Improve kexecboot


 * Proposer : Yuri Bushmelev

Description
Kexecboot is a C program able to scan the partitions on available devices, offering a graphical framebuffer menu and allowing user to select from which one to boot. Specifically, kexecboot creates the command line for kexec.

Kexecboot can be launched as init in the initramfs or as a standalone binary.

Typically kexecboot resides together with kexec in a small initramfs, embedded in a custom-tailored kernel compiled with support for initramfs and kexec system call. Both binaries are built static, linked against klibc to optimize size.

Flashed on NAND and launched as first kernel by the original bootloader, this solution gives following advantages:


 * multi machine support: we build for many architectures using OpenEmbedded/Yocto (tested on arm, mips and x86/x86_64)
 * zImage and uImage (for arm and sh) support
 * easy customization: just add machine-specific workarounds (see Zaurus raw read of bootparams from NAND)
 * small size: complete linux-kexecboot_3.2.x image (initramfs +kernel) is less than 1Mb (with lzma compression)
 * easy boot choice: boot from SD/CF/NAND/... even if bootloader doesn't support it
 * multiple fs detection: we support many filesystems e.g. ext2/3/4, jffs2, reiserfs, vfat and more (ubifs is work in progress)
 * kernel upgrade: no need to flash the device (kernel is in /boot of removable media)
 * rapid testing: different distributions can live in separate partitions on the same device

Thus, kexecboot is an interesting solution for embedded linux distributions, which can just rely on it without having to consider what the real bootloader can and cannot do.

About customization, initially the program has been developed for Sharp Zaurus PDA (armv5te). For the machines of that family there is specific code reading bootparams directly from NAND, circumventing the obsolete bootloader which is incompatible with modern kernels.

Proposed improvements

 * 1) Improve user interface: show progress bar while scanning devices, display messages in nice dialog boxes, adopt UI for qvga screen, improve overall GUI perfomance.
 * 2) Implement GUI -> text UI fallback when GUI can't be initialized.
 * 3) Add support for multiple "boot methods". Now we have only one method actually (kexec). It would be great to add methods, based on switch_root, losetup and network boot.
 * 4) Add ability to work without procfs. Use config file from current /boot directory instead.
 * 5) Implement timeout indication in "--enable-timeout"-mode.

Links
http://cgit.openembedded.org/meta-openembedded/tree/meta-initramfs
 * site http://kexecboot.org
 * git tree http://git.linuxtogo.org/?p=groups/kexecboot/kexecboot.git
 * OpenEmbedded recipes:
 * Sharp Zaurus BSP for Yocto Project: http://git.openembedded.org/meta-handheld

Related work
http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/README.html http://wiki.ubuntu.com/Specs/ARMSoftbootLoader
 * kexec-tools -
 * kexec-loader - http://www.solemnwarning.net/kexec-loader
 * Qi Bootmenu - http://www.brain-dump.org/projects/qi-bootmenu/
 * Ubuntu ARMSoftbootLoader specs -

Scope
This should take about 10 person-weeks.

Contractor Candidates

 * Yury Bushmelev (jay7) , kexecboot lead developer.
 * Marko Kati? (dromede) , zaurus community developer.