[Angstrom-devel] [RFC] Using initramfs-bootmenu-image as a generic bootloader and rootfs bootstrap solution
Paul Sokolovsky
pmiscml at gmail.com
Sat Feb 16 05:36:17 CET 2008
Hello,
Two issues have been dominating Linux-on-PDA landscape for a long time:
1. Issue of flexible booting from different locations (internal flash,
memory cards, network).
2. Kernel upgrade process.
For the most handhelds, both issues are handled in a rather gappy and
inconsistent manner, usually offloading inconsistencies and chore onto
user. There were (are) however approaches to solve those using
consistent, reusable approach. One of the most bright ideas towards
that was LAB, Linux As Bootloader, set of patches in HH.org kernel tree.
LAB was aiming to solve both of the issues above at the same time, and
was able to succeed with that due to the approach it used - essentially
it was just an implementation of in-kernel shell, using existing Linux
drivers. So, for any storage medium (flash, SD, CF, etc.) for which
driver already existed, LAB allowed to boot from it. Also, it had
access to all filesystem drivers, so could take actual kernel to boot
directly from the root filesystem - where it is normally installed by
package manager and where user has comfort for maintenance and
troubleshooting measures (like keeping several kernel version around
and switching to old if issues appeared).
The main problem with LAB was it maintainability and adoption scope: it
is fairly sizable patch, so maintaining it over time takes effort (it
is broken for the few latest kernel versions in HH.org tree for
example). Also, there's simply zero chance of merging it to mainline,
and as that fact is well understood, other kernel porting projects
swayed away from using it besides its vivid technical excellence.
All in all, new solution were required, developed according to the
latest standards and thus more maintainable. Such a standard is early
userspace using initramfs. For more than half-year myself and other
developers worked on creating modular initramfs which would be reusable
for different usecases, but ultimately allowed to boot kernel/rootfs
fro various locations, with interactive selection support.
Today, I finished adding kexec support to it, which solves problem 2
above. With it, such an initramfs-based bootloader is fully independent
from the final rootfs it boots. This initramfs image,
initramfs-bootmenu-image was already (without kexec support) used as
the recommended way to install Angstrom for all novices and people
wanting to preserve WinCE on the handheld.
Now, with addition of kexec support, I would like to propose this
initramfs to be part of the kernel, so the functionality it provides
was available for any device regardless of the bootloader it uses.
To not complicate maintenance, the same kernel image (with
builtin initramfs) is intended to be used both as bootloader and actual
kernel image. This is mandated by the fact that actual kernel still
must include initramfs to boot from location as selected by bootloader.
Having two initramfs'es for these cases would be just unnecessary
complication in our current situation, not giving much relative space
save.
Also, as should be clear from the kernel package management discussion
above, proposed change includes making sure that kernel-image is part
of rootfs for all handhelds in question.
--
Best regards,
Paul mailto:pmiscml at gmail.com
More information about the Angstrom-distro-devel
mailing list