commit:     43886ead1d7373603bad3ba704a2763a978a8cb1
Author:     Nowa Ammerlaan <nowa <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 26 20:55:37 2024 +0000
Commit:     Nowa Ammerlaan <nowa <AT> gentoo <DOT> org>
CommitDate: Wed Nov 27 09:21:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43886ead

kernel-build.eclass: install dtb into /lib/modules instead of /boot

Systemd's kernel-install hooks expect it here or in the firmware directory. We
need to find it for building UKI's and registering BLS type 1 entries. Fedora
and Arch also install the dtb files here.

If it is needed in /boot then it is probably a better idea to delegate that
task to /sbin/installkernel anyway. That way the part of the emerge that writes
to /boot is contained to only the postinst and config phases and makes it
possible to re-try this via emerge --config ... .

Closes: https://bugs.gentoo.org/945072
Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/39486
Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org>

 eclass/kernel-build.eclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 9d33aef92691..376cebf3b1be 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -379,9 +379,10 @@ kernel-build_src_install() {
 
        local target
        for target in "${targets[@]}" ; do
-               emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \
+               emake O="${WORKDIR}"/build "${MAKEARGS[@]}" 
INSTALL_PATH="${ED}/boot" \
                        INSTALL_MOD_PATH="${ED}" 
INSTALL_MOD_STRIP="${strip_args}" \
-                       INSTALL_PATH="${ED}/boot" "${compress[@]}" "${target}"
+                       INSTALL_DTBS_PATH="${ED}/lib/modules/${KV_FULL}/dtb" \
+                       "${compress[@]}" "${target}"
        done
 
        # note: we're using mv rather than doins to save space and time

Reply via email to