From 42ed2d9b7ebd4edceeb32d7123b12c6be6d57f3e Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Mon, 11 Mar 2024 17:24:24 +0000 Subject: [PATCH] coreos-kernel.eclass: Install host arch Makefiles into source dir Gentoo's linux-info.eclass tries to check the kernel version by including /lib/modules/.../source/Makefile and printing $(VERSION). It unsets ARCH= before doing this (no clue why) which works with a full source tree but not with our minimized one. To fix this we need to archive arch/x86/Makefile also for arm64. Signed-off-by: Jeremi Piotrowski --- .../src/third_party/coreos-overlay/eclass/coreos-kernel.eclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass index 21fa398eb3..627326b50b 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass @@ -187,6 +187,7 @@ shred_keys() { # Populate /lib/modules/$(uname -r)/{build,source} install_build_source() { local kernel_arch=$(tc-arch-kernel) + local host_kernel_arch=$(tc-ninja_magic_to_arch kern "${CBUILD}") # NOTE: We have to get ${archabspaths} before removing symlinks under # /usr/lib/modules. However, do not exclude "dt-bindings" for now, @@ -232,6 +233,7 @@ install_build_source() { # or arm64. { echo source/Makefile + find source/arch/${host_kernel_arch} -follow -maxdepth 1 -name 'Makefile*' -print find source/arch/${kernel_arch} -follow -maxdepth 1 -name 'Makefile*' -print find source/arch/${kernel_arch} -follow \( -name 'module.lds' -o -name 'Kbuild.platforms' -o -name 'Platform' \) -print find $(find source/arch/${kernel_arch} -follow \( -name include -o -name scripts \) -follow -type d -print) -print