commit:     0e1de47b7638be1dc913c291d7d147a839c7a21b
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 15 19:31:26 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Nov 18 09:19:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e1de47b

dist-kernel-utils.eclass: set arch to kernel for installation

Some kernel-install plugins may require locating files in the
installed kernel source tree, on e.g. amd64 they will fail to do
so if we do not use tc-arch-kernel.

sys-kernel/dkms' kernel-install plugin is an example of a
plugin that requires this fix.

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 eclass/dist-kernel-utils.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass
index d455c88ebee1..76a2f8d48cdf 100644
--- a/eclass/dist-kernel-utils.eclass
+++ b/eclass/dist-kernel-utils.eclass
@@ -33,6 +33,8 @@ case ${EAPI} in
        *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
+inherit toolchain-funcs
+
 if [[ ${KERNEL_IUSE_SECUREBOOT} ]]; then
        inherit secureboot
 fi
@@ -135,7 +137,7 @@ dist-kernel_install_kernel() {
        ebegin "Installing the kernel via installkernel"
        # note: .config is taken relatively to System.map;
        # initrd relatively to bzImage
-       installkernel "${version}" "${image}" "${map}"
+       ARCH=$(tc-arch-kernel) installkernel "${version}" "${image}" "${map}"
        eend ${?} || die -n "Installing the kernel failed"
 }
 

Reply via email to