public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH] kernel-build.eclass: allow overriding UKI cmdline
Date: Sun, 7 Jan 2024 17:41:01 +0100	[thread overview]
Message-ID: <c0392221-f2e9-4efb-851c-ace25cfdb66c@gentoo.org> (raw)

 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"
  			)


                 reply	other threads:[~2024-01-07 16:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0392221-f2e9-4efb-851c-ace25cfdb66c@gentoo.org \
    --to=andrewammerlaan@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox