aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-05-23 18:59:54 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-05-23 18:59:54 -0600
commit906a41d41f70fd9fa835c0bf85f0e3c9065dd1c4 (patch)
tree597abc82750cb1b36b50240008dd1ffbd851f088
parentcompat: ubuntu appears to have backported ipv6_dst_lookup_flow (diff)
downloadwireguard-linux-compat-906a41d41f70fd9fa835c0bf85f0e3c9065dd1c4.tar.xz
wireguard-linux-compat-906a41d41f70fd9fa835c0bf85f0e3c9065dd1c4.zip
qemu: work around broken centos8 kernel
RHEL needs to apply https://lore.kernel.org/patchwork/patch/974664/ before we can revert this monstrosity. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--src/tests/qemu/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tests/qemu/Makefile b/src/tests/qemu/Makefile
index 95b6173..5925695 100644
--- a/src/tests/qemu/Makefile
+++ b/src/tests/qemu/Makefile
@@ -275,6 +275,7 @@ $(KERNEL_PATH)/.installed: $(KERNEL_TAR)
sed -i "/printf '\\\\#/d" $(KERNEL_PATH)/tools/build/Build.include || true
sed -i '/jmp early_idt_handler$$/a .fill early_idt_handlers + i*9 - ., 1, 0xcc' $(KERNEL_PATH)/arch/x86/kernel/head_{64,32}.S || true
printf 'ifdef CONFIG_X86_64\nLDFLAGS += $$(call ld-option, -z max-page-size=0x200000)\nendif\n' >> $(KERNEL_PATH)/arch/x86/Makefile
+ sed -i 's/pages = generic_max_swapfile_size();/pages = IS_ENABLED(CONFIG_SWAP) ? generic_max_swapfile_size() : 0;/' $(KERNEL_PATH)/arch/x86/mm/init.c || true
if grep -qr UTS_UBUNTU_RELEASE_ABI $(KERNEL_PATH)/debian/rules.d; then echo 'KBUILD_CFLAGS += -DUTS_UBUNTU_RELEASE_ABI=0' >> $(KERNEL_PATH)/Makefile; fi
sed -i "/^if INET\$$/a source \"net/wireguard/Kconfig\"" $(KERNEL_PATH)/net/Kconfig
sed -i "/^obj-\$$(CONFIG_NETFILTER).*+=/a obj-\$$(CONFIG_WIREGUARD) += wireguard/" $(KERNEL_PATH)/net/Makefile