public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] kernel-build.eclass: allow overriding UKI cmdline
@ 2024-01-07 16:41 Andrew Ammerlaan
  0 siblings, 0 replies; only message in thread
From: Andrew Ammerlaan @ 2024-01-07 16:41 UTC (permalink / raw)
  To: gentoo-dev

 From 0f33e78d05f5e50f4734f5493255232ce1c647fa Mon Sep 17 00:00:00 2001
From: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Date: Wed, 3 Jan 2024 11:31:15 +0100
Subject: [PATCH] kernel-build.eclass: allow overriding UKI cmdline

Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
---
  eclass/kernel-build.eclass | 12 ++++++++++--
  1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 28f111ec998bb..120056c5c26b2 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
@@ -99,6 +99,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 )"
@@ -435,7 +443,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"
  			)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-07 16:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-07 16:41 [gentoo-dev] [PATCH] kernel-build.eclass: allow overriding UKI cmdline Andrew Ammerlaan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox