Closed asia-makai closed 2 years ago
Hi @asia-makai, I manage to compile this old 5.4 kernel on Ubuntu 22.04, with a few hacks. Tell me what issue you are running into
I've already added a few #pragma to gently ask gcc not to complain too much.. I'm not sure about this problem though:
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:348: arch/x86/entry/thunk_64.o] Error 1
make[2]: *** Deleting file 'arch/x86/entry/thunk_64.o'
make[1]: *** [scripts/Makefile.build:500: arch/x86/entry] Error 2
make: *** [Makefile:1690: arch/x86] Error 2
Thanks a million @Wenzel!
It could be possible that you need to downgrade binutils, since the version shipped by Ubuntu 22.04 is too new for the relatively old 5.4 kernel [1].
@x1tan Oops, I see.. that's what I've feared. Downgrading binutils causes a domino effect, doesn't it? I.e., won't I end up downgrading half of my packages, incl gcc? Thanks!
so by googling the error I stumbled upon this thread: https://lore.kernel.org/lkml/YAlUUBs2qPIqLgCt@xps-13-7390/T/
Which mentions kernel preemption and playing with the config, I managed to build the kernel on ubuntu 22.04:
./scripts/config --enable PREEMPT
Not sure why it works at this point, didn't dig in, but it's a workaround.
Thanks @Wenzel!
I've made further steps, so that it compiles. (Options below). Then I had to disable secure boot in my BIOS (to avoid signing the kernel), but it panics... Have you seen that one with your Ubuntu 22.04 by any chance?
My config script:
make distclean
make olddefconfig
./scripts/config --enable KVM
./scripts/config --enable KVM_INTEL
./scripts/config --enable KVM_AMD
./scripts/config --enable KVM_INTROSPECTION
./scripts/config --disable TRANSPARENT_HUGEPAGE
./scripts/config --enable REMOTE_MAPPING
./scripts/config --enable PREEMPT
# https://askubuntu.com/questions/1329538/compiling-the-kernel-5-11-11
./scripts/config --disable SYSTEM_TRUSTED_KEYS
./scripts/config --disable SYSTEM_REVOCATION_KEYS
./scripts/config --disable DEBUG_INFO_BTF
Are you using XFS as the main partition filesystem by any chance ?
I think i remember having this issue, and the problem was related to a driver fs driver (not present by default on 5.4 kernel, but present on newer ones, which explains why it won't boot)
Have a look at that and regenerate the initramfs
@Wenzel yes, you've seen it all! Impressive :) Thank you! I'll dig further.
I had ext4. It boots now @Wenzel!
Other things I had to do:
I'll see if i manage to get network connection ;)
But I fear that I'll need to port your work to a more recent kernel... Do you have a recommendation or just a meld/diff? (I used to intensively play with a Nitro-like system, but this was 7 years ago ;)) Thank you
Awesome news ! Thanks for the tips 👍 Now waiting for your pull requests 💪
Regarding rebasing the patches, that's huge task that you are undertaking, so be careful :)
You might to have a chat with @adlazar on the Slack channel about this.
Thank you for your help! :)
How you deal with new hardware? I encounter a lot of drivers issues since the kernel is old
Hi,
I have tried to compile kvm on Ubuntu 22.04. I'm not sure if it's possible without downgrading a loooot. I wanted to ask if you have by any chance ported the VMI extensions to 5.15?
Thank you!