summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-05-22 22:54:15 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-05-28 03:04:41 -0600
commitdb02cf0f74b65c7f1230406e44ef78bbd4b5e3a5 (patch)
treebd0a6a7800423e6ae076613b0d07f6349f08660d /src
parente3a1bcca4e46c3b10a219930b09ff489e46c3319 (diff)
qemu: patch in UTS_UBUNTU_RELEASE_ABI for Ubuntu detection
This kind of thing really makes me queezy and upset, but there's little that can be done about such situations when dealing with Canonical's kernel. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-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 c917955..0708f99 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
+ 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
ln -sfT $(shell readlink -f ../..) $(KERNEL_PATH)/net/wireguard