
CHAPTER 4. LIVERAM DISKS 4.5. KEXECBOOTS
1.
Zauruses with default bootloader and MTD partitioning have only
1.2 Mb
of free space in
NAND to hold kernel. Modern kernels are too big to fit into that constraints without significal
loss in features (even with separate modules),
2.
Some devices (such as Zauruses) have no possibility to boot from other media (SD/MMC/CF)
with default bootloader.
˚
Angstr
¨
om was based on top of OE (OpenEmbedded), OpenZaurus and OpenSimpad. Zaurus’ OS
was the most supported platform, at that times. To address these problems, Thomas Kunze wrote
first versions of kexecboot.
4.5.4 Way of Work
When kexecboot’s kernel is loaded, it runs kexecboot binary as init process. This process does the
following things (for the current development version, i.e. 0.6):
1. scan all known partitons on devices (from /proc/partitions),
2.
check that the partition’s filesystem is known (according to
fstype.c
from
klibc
and
/proc/filesystems),
3. mount that partition and check for /boot/boot.cfg there:
(a)
if
boot.cfg
is found, then parse it and do some additional things (load custom icon for
example);
(b) if boot.cfg is not found, then check for default kernels (/boot/zImage, /zImage),
4. check for zImage, the replacement Linux kernel (compressed),
5. create and show GUI with collected partitions,
6. wait for selection and then kexec selected kernel.
Kexecboot binary can be started as non-init process too, so you can run it in your own image at any
time too.
Latest kexecboot release was 0.5. The development version is 0.6.
4.5.5 Consequences
As the kexecboot kernel embeds a very limited initramfs, it contains just a couple of static binaries
(kexec and kexecboot). Kexec is the tool (see kexec-tools), kexecboot is the “init,” a custom-purposed
binary launching kexec with appropriate args. The name “kexecboot” was given by the author of
the project.
So, if you want to create a standard “liveramdisk” image, just enable kexec during the config of
the kernel and deploy kexec-tools in your image.
4.5.6 Screenshots
Here are pictures (taken from [2]) of a v0.4 kexecboot.
17
Komentarze do niniejszej Instrukcji