summaryrefslogtreecommitdiff
path: root/eclass/kernel-install.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-24 13:37:40 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-24 13:37:40 +0000
commitba4938837d52c0aff763d8acdc03ce103dd3ff82 (patch)
tree377739d379f8040dc456a89b2347a8f2a83830c8 /eclass/kernel-install.eclass
parent3e3aa158fd100df495010eed7915f012d5c9bcaa (diff)
gentoo auto-resync : 24:12:2023 - 13:37:40
Diffstat (limited to 'eclass/kernel-install.eclass')
-rw-r--r--eclass/kernel-install.eclass21
1 files changed, 21 insertions, 0 deletions
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 919a5d11fd84..9612700a1431 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -430,6 +430,12 @@ kernel-install_test() {
> "${T}"/empty-file || die
mkdir -p "${T}"/empty-directory || die
+ local compress="gzip"
+ if [[ ${KERNEL_IUSE_GENERIC_UKI} ]] && use generic-uki; then
+ # Test with same compression method as the generic initrd
+ compress="xz -9e --check=crc32"
+ fi
+
dracut \
--conf "${T}"/empty-file \
--confdir "${T}"/empty-directory \
@@ -439,6 +445,7 @@ kernel-install_test() {
--omit "${omit_mods[*]}" \
--nostrip \
--no-early-microcode \
+ --compress="${compress}" \
"${T}/initrd" "${version}" || die
kernel-install_create_qemu_image "${T}/fs.img"
@@ -547,6 +554,20 @@ kernel-install_pkg_pretend() {
elog " emerge --config ${CATEGORY}/${PN}:${SLOT}"
fi
fi
+
+ if ! use initramfs && ! has_version "${CATEGORY}/${PN}[-initramfs]"; then
+ ewarn
+ ewarn "WARNING: The standard configuration of the Gentoo distribution"
+ ewarn "kernels requires an initramfs! You have disabled the initramfs"
+ ewarn "USE flag and as a result dracut was not pulled in as a dependency."
+ ewarn "Please ensure that you are either overriding the standard"
+ ewarn "configuration or that an alternative initramfs generation plugin"
+ ewarn "is installed for your installkernel implementation!"
+ ewarn
+ ewarn "This is an advanced use case, you are on your own to ensure"
+ ewarn "that your system is bootable!"
+ ewarn
+ fi
}
# @FUNCTION: kernel-install_src_test