firecracker
firecracker copied to clipboard
[Bug] kernel 5.10 does not build properly
Describe the bug
This isn't really this project's problem. It would be nice if a workaround was provided, which I provide in this bug report until the appropriate patches are backported.
To Reproduce
Clone the kernel repo and compile it for 5.10
git clone https://github.com/torvalds/linux.git linux.git
cd linux.git
curl -LO https://raw.githubusercontent.com/firecracker-microvm/firecracker/main/resources/guest_configs/microvm-kernel-x86_64-5.10.config
cp -a microvm-kernel-x86_64-5.10.config .config
make vmlinux
After some work, this error is displayed:
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
CHK include/generated/compile.h
AS arch/x86/entry/thunk_64.o
arch/x86/entry/thunk_64.o: warning: objtool: missing symbol table
make[2]: *** [scripts/Makefile.build:360: arch/x86/entry/thunk_64.o] Error 1
make[2]: *** Deleting file 'arch/x86/entry/thunk_64.o'
make[1]: *** [scripts/Makefile.build:496: arch/x86/entry] Error 2
make: *** [Makefile:1805: arch/x86] Error 2
sdake@1204:~/aws/kernel.git$ ls
A kernel.org patch is available that fixes this problem. To apply it:
sdake@1204:~/aws/kernel.git$ curl -L https://lkml.org/lkml/diff/2021/1/23/75/1 | patch -p1
[Author TODO: Steps to reproduce the behaviour:]
[ 1. Start Firecracker via....]
[ 2. Configure Firecracker via....]
[ 3. ....]
Expected behaviour
[Author TODO: A clear and concise description of what you expected to happen.]
Environment
build environment:
libbinutils/hirsute,now 2.36.1-6ubuntu1 amd64 [installed,automatic]
linux-generic/hirsute-updates,hirsute-security,now 5.11.0.49.48 amd64 [installed]
Additional context
Unable to build a kernel with the provided 5.10 kernel
build a 5.10 kernel. devotols does not work - missing kernel_build.sh script.
A workaround is provided above - patching kernel.org tree with a small change that works with later binutils.
Checks
- [ ] Have you searched the Firecracker Issues database for similar problems?
- [X] Have you read the existing relevant Firecracker documentation?
- [X] Are you certain the bug being reported is a Firecracker issue? - a dependency (kernel.org) does not work with modern build environments.