diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-01-03 06:31:16 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-01-03 06:31:16 +0000 |
commit | 5087ee3bf0055aae666159351774f2fb3610e571 (patch) | |
tree | 203f4d869518e7391a255055ca9a4b874e7b2d19 /eclass/dist-kernel-utils.eclass | |
parent | ff733bfb4d0bd82175e03255004faef8721b53ea (diff) |
gentoo auto-resync : 03:01:2025 - 06:31:16
Diffstat (limited to 'eclass/dist-kernel-utils.eclass')
-rw-r--r-- | eclass/dist-kernel-utils.eclass | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass index 210c586c8c29..3d7315e9e94e 100644 --- a/eclass/dist-kernel-utils.eclass +++ b/eclass/dist-kernel-utils.eclass @@ -1,4 +1,4 @@ -# Copyright 2020-2024 Gentoo Authors +# Copyright 2020-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: dist-kernel-utils.eclass @@ -82,12 +82,33 @@ dist-kernel_install_kernel() { local success= # not an actual loop but allows error handling with 'break' while true; do + if [[ -n ${ROOT} ]] && in_iuse initramfs && use initramfs; then + if ! in_iuse generic-uki || ! use generic-uki; then + eerror + eerror "ROOT is set, and (re-)generation of an initramfs is requested" + eerror "via the USE=initramfs flag. However, this is currently not" + eerror "supported via the sys-kernel/installkernel mechanism." + eerror + if in_iuse generic-uki && ! use generic-uki; then + eerror "Generation and installation of a generic initramfs and/or" + eerror "Unified Kernel Image is possible via portage by enabling the" + eerror "USE=generic-uki flag. Please enable the generic-uki flag, or" + eerror "chroot into: ROOT=${ROOT}" + else + eerror "Please chroot into: ROOT=${ROOT}" + fi + break + fi + fi + nonfatal mount-boot_check_status || break + mkdir -p "${EROOT}/boot" || break ebegin "Installing the kernel via installkernel" # note: .config is taken relatively to System.map; # initrd relatively to bzImage - ARCH=$(tc-arch-kernel) installkernel "${version}" "${image}" "${map}" || break + ARCH=$(tc-arch-kernel) installkernel "${version}" "${image}" "${map}" \ + "${EROOT}/boot" || break eend ${?} || die -n "Installing the kernel failed" success=1 |