add kexecboot

This allows booting a new image from a running OS, creating a
phram mtd for the root squashfs

* enable CONFIG_KEXEC
* add modules/kexecboot
* patch kexec-tools to add --map-file option for the squashfs
* patch kernel kexec code to call new kernel with DTB
This commit is contained in:
Daniel Barlow 2023-03-19 09:49:32 +00:00
parent 429ffa8e7d
commit 4b19568f1b
6 changed files with 243 additions and 0 deletions

View file

@ -61,6 +61,11 @@ stdenv.mkDerivation rec {
'';
patchScripts = ''
# Make kexec pass dtb in register when invoking new kernel. The
# code to do this is already present, but bracketed by UHI_BOOT
# which we can't enable.
sed -i arch/mips/kernel/machine_kexec.c -e 's/CONFIG_UHI_BOOT/CONFIG_MIPS/g'
patchShebangs scripts/
'';