Skip to content

Commit

Permalink
coreos-kernel.eclass: Install host arch Makefiles into source dir
Browse files Browse the repository at this point in the history
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 <jpiotrowski@microsoft.com>
  • Loading branch information
jepio committed Mar 11, 2024
1 parent 7929434 commit 42ed2d9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 42ed2d9

Please sign in to comment.