Pass parameters to make_fiwix_initrd and kexec-fiwix

This extends make_fiwix_initrd and kexec-fiwix to support command
line parameters, instead of hardcoding relevant values within the
C sources. This way, it becomes possible to alter e.g. ramdisk size
without affecting checksums.

While we're at it, also support loading a memory map from file.
This commit is contained in:
Gábor Stefanik 2024-02-12 13:34:00 +01:00
parent bbb96a52d6
commit 9e4c17b68d
5 changed files with 150 additions and 84 deletions

View file

@ -7,7 +7,11 @@
set -ex
# Build the ext2 image
make_fiwix_initrd
make_fiwix_initrd -s 1310720 /boot/fiwix.ext2
# Boot Fiwix
kexec-fiwix
if match x${BARE_METAL} xTrue; then
kexec-fiwix /boot/fiwix -i /boot/fiwix.ext2 -c "fiwix console=/dev/tty1 root=/dev/ram0 initrd=fiwix.ext2 kexec_proto=linux kexec_size=262144 kexec_cmdline=\"init=/init consoleblank=0\""
else
kexec-fiwix /boot/fiwix -i /boot/fiwix.ext2 -c "fiwix console=/dev/ttyS0 root=/dev/ram0 initrd=fiwix.ext2 kexec_proto=linux kexec_size=262144 kexec_cmdline=\"init=/init console=ttyS0\""
fi