From 9e1e02c3d589a048a61e552e74e79bf5f44645f6 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Thu, 19 Sep 2024 14:25:34 +0200 Subject: [PATCH] vm: fix kernel build --- vagrant/ansible/roles/kvm/tasks/install_normal.yml | 4 ++++ vagrant/ansible/roles/kvm/tasks/main.yml | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/vagrant/ansible/roles/kvm/tasks/install_normal.yml b/vagrant/ansible/roles/kvm/tasks/install_normal.yml index dba81283..d55ad909 100644 --- a/vagrant/ansible/roles/kvm/tasks/install_normal.yml +++ b/vagrant/ansible/roles/kvm/tasks/install_normal.yml @@ -3,12 +3,16 @@ command: "make -j{{ ansible_processor_vcpus }} bzImage" args: chdir: "{{ root_dir }}/kvm" + environment: + EXTRA_CFLAGS: "-Wno-error=use-after-free" become: false - name: build modules command: "make -j{{ ansible_processor_vcpus }} modules" args: chdir: "{{ root_dir }}/kvm" + environment: + EXTRA_CFLAGS: "-Wno-error=use-after-free" become: false - name: install modules diff --git a/vagrant/ansible/roles/kvm/tasks/main.yml b/vagrant/ansible/roles/kvm/tasks/main.yml index f8487ddd..14cc35cb 100644 --- a/vagrant/ansible/roles/kvm/tasks/main.yml +++ b/vagrant/ansible/roles/kvm/tasks/main.yml @@ -14,6 +14,7 @@ - bison - libelf-dev - libssl-dev + - pahole # because of Windows filesystem restrictions, the KVM repo cannot be checked out on Windows # it contains some files like @@ -56,12 +57,16 @@ # -> !TRANSPARENT_HUGEPAGE - { switch: "--disable", option: "TRANSPARENT_HUGEPAGE" } - { switch: "--enable", option: "REMOTE_MAPPING" } + # fix: arch/x86/entry/thunk_64.o: warning: objtool: missing symbol table + - { switch: "--enable", option: "PREEMPT" } + # fix: error: call to '__compiletime_assert_653' in drivers/net/ethernet/netronome/nfp/bpf/jit.c + - { switch: "--disable", option: "NET_VENDOR_NETRONOME" } - name: append -kvmi to kernel version string lineinfile: dest: "{{ root_dir }}/kvm/Makefile" - regexp: '^EXTRAVERSION =' - line: 'EXTRAVERSION = -kvmi' + regexp: "^EXTRAVERSION =" + line: "EXTRAVERSION = -kvmi" become: false - name: set default config to new options @@ -81,7 +86,7 @@ - name: set kvmi kernel as default lineinfile: dest: /etc/default/grub - regexp: '^GRUB_DEFAULT' + regexp: "^GRUB_DEFAULT" line: 'GRUB_DEFAULT="1>0"' - name: update GRUB configuration