commit:     d9d7c8c96d867b6f8ea49e849160e8836d385814
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  3 18:18:27 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Sep  4 13:14:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9d7c8c9

dist-kernel-utils.eclass: introduce KERNEL_EFI_ZBOOT

This new variable will track if CONFIG_EFI_ZBOOT is enabled or not

Closes: https://bugs.gentoo.org/897684
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

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

diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass
index 1a55424a97ef..67ae2f7b510d 100644
--- a/eclass/dist-kernel-utils.eclass
+++ b/eclass/dist-kernel-utils.eclass
@@ -19,6 +19,13 @@
 # If set to a non-null value, inherits secureboot.eclass
 # and allows signing of generated kernel images.
 
+# @ECLASS_VARIABLE: KERNEL_EFI_ZBOOT
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If set to a non-null value, it is assumed the kernel was built with
+# CONFIG_EFI_ZBOOT enabled. This effects the name of the kernel image on
+# arm64 and riscv. Mainly useful for sys-kernel/gentoo-kernel-bin.
+
 if [[ ! ${_DIST_KERNEL_UTILS} ]]; then
 
 case ${EAPI} in
@@ -72,7 +79,7 @@ dist-kernel_get_image_path() {
                        echo arch/x86/boot/bzImage
                        ;;
                arm64|riscv)
-                       if [[ ${KERNEL_IUSE_SECUREBOOT} ]] && use secureboot; 
then
+                       if [[ ${KERNEL_EFI_ZBOOT} ]]; then
                                echo arch/${ARCH}/boot/vmlinuz.efi
                        else
                                echo arch/${ARCH}/boot/Image.gz

Reply via email to