Skip to content

Commit

Permalink
vm: fix kernel build
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenzel committed Sep 19, 2024
1 parent e2c010f commit 9e1e02c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions vagrant/ansible/roles/kvm/tasks/install_normal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions vagrant/ansible/roles/kvm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9e1e02c

Please sign in to comment.