linux-kernel-module-cheat
linux-kernel-module-cheat copied to clipboard
Make gem5 Linux kernel boot work with QEMU kernel images present on releases
At lkmc 7b0ac771dcab99ac6b7c0b0be4dc934e7ec97c76 we release images such as aarch64 out/linux/default/aarch64/arch/arm64/boot/Image or x86 out/linux/default/x86_64/arch/x86/boot/bzImage and not the vmlinux (out/linux/default/x86_64/vmlinux).
There is the command submodules/linux/scripts/extract-vmlinux which in theory can extract the vmliux from those files, but on x86_64 boot fails with empty system.terminal and stdout message:
fatal: could not load kernel symbols
On arm and aarch64, extract-vmlinux itself fails with:
extract-vmlinux: Cannot find vmlinux.
See also:
- https://raspberrypi.stackexchange.com/questions/88621/why-doesnt-extract-vmlinux-work-with-raspbians-boot-kernel-img
- https://bugs.launchpad.net/linaro-ubuntu/+bug/1050453
- https://unix.stackexchange.com/questions/352215/how-do-i-extract-vmlinux-from-an-arm-image
We could add vmlinux to the release as well, but the aarch64 one alone adds: 121M so I would like to avoid it if possible...