I wish to compile a specific loadable kernel module, however am having points that I can not seem to repair… Do information me if I’m doing something improper or if my understanding is flawed someplace…
So I first put in on my ubuntu utilizing dpkg this explicit model of the kernel from mainline repo.
uname -a is at present
Linux ubuntu 5.6.0-050600-generic #202003292333 SMP Solar Mar 29 23:35:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
And now I wish to recompile and set up a kernel module. I did the steps following the sources within the mainline repo readme to seize the kernel supply code.
git clone git://git.launchpad.web/~ubuntu-kernel-test/ubuntu/+supply/linux/+git/mainline-crack v5.6 cd v5.6 patch -p1 < 0001-base-packaging.patch patch -p1 < 0002-UBUNTU-SAUCE-add-vmlinux.strip-to-BOOT_TARGETS1-on-p.patch patch -p1 < 0003-UBUNTU-SAUCE-tools-hv-lsvmbus-add-manual-page.patch patch -p1 < 0004-debian-changelog.patch patch -p1 < 0005-configs-based-on-Ubuntu-5.6.0-6.6.patch
Then I wish to compile solely the kvm module right here and never the entire kernel so I did these
cd /arch/x86/kvm make -C /lib/modules/`uname -r`/construct M=`pwd` clear make -C /lib/modules/`uname -r`/construct M=`pwd` modules
And get compilation errors (solely a snippet of it under)
make: Coming into listing '/usr/src/linux-headers-5.6.0-050600-generic' CC [M] /house/xx/Desktop/v5.6/arch/x86/kvm/../../../virt/kvm/kvm_main.o /house/xx/Desktop/v5.6/arch/x86/kvm/../../../virt/kvm/kvm_main.c: In perform ‘kvm_vcpu_init’: /house/xx/Desktop/v5.6/arch/x86/kvm/../../../virt/kvm/kvm_main.c:353:6: error: implicit declaration of perform ‘kvm_arch_vcpu_init’; did you imply ‘kvm_arch_vcpu_put’? [-Werror=implicit-function-declaration] r = kvm_arch_vcpu_init(vcpu); ^~~~~~~~~~~~~~~~~~ kvm_arch_vcpu_put /house/xx/Desktop/v5.6/arch/x86/kvm/../../../virt/kvm/kvm_main.c: In perform ‘kvm_vcpu_uninit’: /house/xx/Desktop/v5.6/arch/x86/kvm/../../../virt/kvm/kvm_main.c:373:2: error: implicit declaration of perform ‘kvm_arch_vcpu_uninit’; did you imply ‘kvm_vcpu_uninit’? [-Werror=implicit-function-declaration] kvm_arch_vcpu_uninit(vcpu); ^~~~~~~~~~~~~~~~~~~~ kvm_vcpu_uninit /house/xx/Desktop/v5.6/arch/x86/kvm/../../../virt/kvm/kvm_main.c: In perform ‘kvm_create_vm_debugfs’: /house/xx/Desktop/v5.6/arch/x86/kvm/../../../virt/kvm/kvm_main.c:653:12: error: ‘struct kvm_stat_data’ has no member named ‘offset’ stat_data->offset = p->offset; ^~
Which seems to be like there’s a battle within the code after I thought I used to be utilizing the proper supply code for the present kernel model that I’ve put in.
Though after I do a
make kernelversion, not too certain why I get
5.4.0-rc8 as an alternative. Additionally tried this
apt-get --download-only supply linux-image-`uname -r` Studying package deal lists... Performed E: Unable to discover a supply package deal for linux-image-5.6.0-050600-generic
Did I occur to seize the improper model supply code that corresponds to this kernel model? Or compiling this inaccurately? Have reached a street block and want some steering please, thanks!