diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-08-06 20:40:35 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-08-06 20:40:35 +0200 |
commit | 6fcc099a7c431d2034c1362a8a6650cef023bc88 (patch) | |
tree | 3cf90c8862fbe2e79d34cb50250ee937e0888525 /src/tests/qemu/Makefile | |
parent | 1f48f64fb5387c3021f4288ea3f8b119fe25f97d (diff) |
qemu: add easy git harness
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/tests/qemu/Makefile')
-rw-r--r-- | src/tests/qemu/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tests/qemu/Makefile b/src/tests/qemu/Makefile index 51e5e92..cef3f4b 100644 --- a/src/tests/qemu/Makefile +++ b/src/tests/qemu/Makefile @@ -14,7 +14,7 @@ endif ARCH := $(firstword $(subst -, ,$(CBUILD))) # Set these from the environment to override -KERNEL_VERSION ?= 4.17.9 +KERNEL_VERSION ?= 4.17.12 KERNEL_VERSION := $(KERNEL_VERSION)$(if $(DEBUG_KERNEL),$(if $(findstring -debug,$(KERNEL_VERSION)),,-debug),) BUILD_PATH ?= $(PWD)/../../../qemu-build/$(ARCH) DISTFILES_PATH ?= $(PWD)/distfiles @@ -215,6 +215,7 @@ $(BUILD_PATH)/init-cpio-spec.txt: echo "file /lib/libc.so $(MUSL_PATH)/lib/libc.so 755 0 0" >> $@ echo "slink /lib/ld-linux.so.1 libc.so 777 0 0" >> $@ +ifeq ($(findstring -git,$(KERNEL_VERSION)),) $(KERNEL_PATH)/.installed: $(KERNEL_TAR) mkdir -p $(KERNEL_PATH) flock -s $<.lock tar --strip-components=1 -C $(KERNEL_PATH) -xf $< @@ -222,6 +223,12 @@ $(KERNEL_PATH)/.installed: $(KERNEL_TAR) sed -i "/^obj-\$$(CONFIG_NETFILTER).*+=/a obj-\$$(CONFIG_WIREGUARD) += wireguard/" $(KERNEL_PATH)/net/Makefile ln -sfT $(shell readlink -f ../..) $(KERNEL_PATH)/net/wireguard touch $@ +else +$(KERNEL_PATH)/.installed: + mkdir -p $(dir $(KERNEL_PATH)) + flock -s $(dir $(KERNEL_TAR))/$(KERNEL_VERSION).lock git clone $(GIT_URI_$(patsubst %-git,%,$(patsubst %-debug,%,$(KERNEL_VERSION)))) $(KERNEL_PATH) + touch $@ +endif $(KERNEL_PATH)/.config: kernel.config arch/$(QEMU_ARCH).config | $(KERNEL_PATH)/.installed cp kernel.config $(KERNEL_PATH)/minimal.config |