-
Notifications
You must be signed in to change notification settings - Fork 271
Booting Linux based ROMs using kexec
Tasssadar edited this page Jan 5, 2013
·
3 revisions
Host kernel: the one which boots another kernel, the one which usually is in boot.img
Guest kernel: the one which we are kexec-ing into
- Both host and guest kernels must be patched with kexec-hardboot patches. The host kernel requires full patch, the guest kernel requires only two compatibility patches. The guest patch is already merged into Ubuntu's Nexus 7 kernel, so if you use that, you are okay.
- ROM's init script must be able to mount either folder or image as root. The path is passed as cmdline parameter (which also means that there must be no spaces in ROM's name, because most init scripts can't handle that).
It just loads ROM's kernel and initrd using kexec and sets correct cmdline. It then reboots into ROMs kernel and lets it handle it's own stuff. It does basically the same thing as if you issued following fastboot command:
fastboot -c "*cmdline with root's path*" boot vmlinuz initrd.img
As you can see, it does it really simply, thanks to kexec-hardboot.