From 26f5c7af7c7ddf6a49a1f8c02158515340a1fb08 Mon Sep 17 00:00:00 2001 From: Aaron Paterson Date: Tue, 11 Aug 2026 13:32:43 +0000 Subject: [PATCH] Prefer the in-repo kernel for `make integration` The integration suite booted whichever kernel sat under bin/, so a kernel configured and built in the repo with `make -C kernel` took effect only if the fetched default was deleted by hand: a configuration change could be built, pass a rebuild, and never be the kernel a test ran against. The guest kernel is a variable of every integration result, so the one built from the repo's own configuration is preferred wherever it exists, with the kata-fetched kernel remaining the fallback for a checkout that never built one. This is the preference `LINUX_INTEGRATION_KERNEL` already expresses; `make integration` now expresses the same one. --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c79d6995d..fd815bd5f 100644 --- a/Makefile +++ b/Makefile @@ -28,11 +28,16 @@ SWIFT_CONFIGURATION := $(if $(filter-out false,$(WARNINGS_AS_ERRORS)),-Xswiftc - UNAME_S := $(shell uname -s) UNAME_M := $(shell uname -m) KERNEL_ARCH := $(if $(filter $(UNAME_M),aarch64 arm64),arm64,$(UNAME_M)) -# Candidate kernel filenames in bin/ (compiled vmlinuz first, kata-fetched vmlinux fallback). +# Candidate kernels for `make integration`, in preference order: the in-repo +# kernel built by `make -C kernel` first, then the kata-fetched kernel under +# bin/ as a fallback. The in-repo kernel is built from the config this repo +# carries, so a configuration change made here is the one integration boots +# wherever that kernel exists; a checkout without one still runs on the +# fetched default. ifeq ($(KERNEL_ARCH),x86_64) -KERNEL_CANDIDATES := bin/vmlinuz-x86_64 bin/vmlinux-x86_64 +KERNEL_CANDIDATES := kernel/vmlinuz-x86_64 bin/vmlinuz-x86_64 bin/vmlinux-x86_64 else -KERNEL_CANDIDATES := bin/vmlinux-$(KERNEL_ARCH) +KERNEL_CANDIDATES := kernel/vmlinux-$(KERNEL_ARCH) bin/vmlinux-$(KERNEL_ARCH) endif # In-repo KVM-capable kernel built by `make -C kernel` (vmlinuz for x86_64 bzImage, # vmlinux for arm64 Image). linux-integration requires this; the kata-fetched