diff options
author | 2024-01-03 11:31:15 +0100 | |
---|---|---|
committer | 2024-01-07 18:28:59 +0100 | |
commit | 9a940c3f3c5411d170cd0f575ab87790326cf7c6 (patch) | |
tree | 73c919586ea342cbe9b4f0800bdf9e36a3b851e6 /eclass/kernel-build.eclass | |
parent | sys-kernel/installkernel-gentoo: drop 7 (diff) | |
download | gentoo-9a940c3f3c5411d170cd0f575ab87790326cf7c6.tar.gz gentoo-9a940c3f3c5411d170cd0f575ab87790326cf7c6.tar.bz2 gentoo-9a940c3f3c5411d170cd0f575ab87790326cf7c6.zip |
kernel-build.eclass: allow overriding UKI cmdline
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'eclass/kernel-build.eclass')
-rw-r--r-- | eclass/kernel-build.eclass | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index f3a59559d104..391a99ceffce 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -1,4 +1,4 @@ -# Copyright 2020-2023 Gentoo Authors +# Copyright 2020-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: kernel-build.eclass @@ -96,6 +96,14 @@ IUSE="+strip" # key in PEM format to use. Must be specified if MODULES_SIGN_KEY # is set to a path of a file that only contains the private key. +# @ECLASS_VARIABLE: KERNEL_GENERIC_UKI_CMDLINE +# @USER_VARIABLE +# @DESCRIPTION: +# If KERNEL_IUSE_GENERIC_UKI is set, this variable allows setting the +# built-in kernel command line for the UKI. If unset, the default is +# root=/dev/gpt-auto-root ro +: "${KERNEL_GENERIC_UKI_CMDLINE:="root=/dev/gpt-auto-root ro"}" + if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then IUSE+=" modules-sign" REQUIRED_USE="secureboot? ( modules-sign )" @@ -432,7 +440,7 @@ kernel-build_src_install() { local ukify_args=( --linux="${image}" --initrd="${image%/*}/initrd" - --cmdline="root=/dev/gpt-auto-root ro" + --cmdline="${KERNEL_GENERIC_UKI_CMDLINE}" --uname="${dir_ver}" --output="${image%/*}/uki.efi" ) |