79 lines
2.5 KiB
Diff
79 lines
2.5 KiB
Diff
|
From 72a72facc6cbaf58fda136286af78bbbd48bd88c Mon Sep 17 00:00:00 2001
|
||
|
From: Michael Chang <mchang@suse.com>
|
||
|
Date: Wed, 13 Mar 2024 15:26:42 +0800
|
||
|
Subject: [PATCH 9/9] 10_linux: Some refinement for BLS
|
||
|
|
||
|
Remove BLS_POPULATE_MENU as it is not being used currently and removing
|
||
|
kernelopts assignment in the grub boot config itself to fully delegate
|
||
|
the responsibility of generating kernel options to a functioning BLS
|
||
|
generator.
|
||
|
|
||
|
Signed-off-by: Michael Chang <mchang@suse.com>
|
||
|
---
|
||
|
util/grub.d/10_linux.in | 29 -----------------------------
|
||
|
1 file changed, 29 deletions(-)
|
||
|
|
||
|
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
||
|
index edf0fca55..7cbff7466 100644
|
||
|
--- a/util/grub.d/10_linux.in
|
||
|
+++ b/util/grub.d/10_linux.in
|
||
|
@@ -93,11 +93,7 @@ fi
|
||
|
|
||
|
populate_header_warn()
|
||
|
{
|
||
|
-if [ "x${BLS_POPULATE_MENU}" = "xtrue" ]; then
|
||
|
- bls_parser="10_linux script"
|
||
|
-else
|
||
|
bls_parser="blscfg command"
|
||
|
-fi
|
||
|
cat <<EOF
|
||
|
|
||
|
# This section was generated by a script. Do not modify the generated file - all changes
|
||
|
@@ -200,11 +196,6 @@ populate_menu()
|
||
|
printf "$menu"
|
||
|
}
|
||
|
|
||
|
-# Make BLS the default if GRUB_ENABLE_BLSCFG was not set and grubby is not installed.
|
||
|
-# FIXME: The test should be aligned to openSUSE, grubby is not our default tool
|
||
|
-if [ -z "${GRUB_ENABLE_BLSCFG}" ] && ! command -v new-kernel-pkg >/dev/null && false; then
|
||
|
- GRUB_ENABLE_BLSCFG="true"
|
||
|
-fi
|
||
|
|
||
|
if [ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]; then
|
||
|
if [ x$dirname = x/ ]; then
|
||
|
@@ -252,31 +243,11 @@ if [ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]; then
|
||
|
|
||
|
populate_header_warn
|
||
|
|
||
|
- cat << EOF
|
||
|
-# The kernelopts variable should be defined in the grubenv file. But to ensure that menu
|
||
|
-# entries populated from BootLoaderSpec files that use this variable work correctly even
|
||
|
-# without a grubenv file, define a fallback kernelopts variable if this has not been set.
|
||
|
-#
|
||
|
-# The kernelopts variable in the grubenv file can be modified using the grubby tool or by
|
||
|
-# executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX
|
||
|
-# and GRUB_CMDLINE_LINUX_DEFAULT options from /etc/default/grub file are used to set both
|
||
|
-# the kernelopts variable in the grubenv file and the fallback kernelopts variable.
|
||
|
-if [ -z "\${kernelopts}" ]; then
|
||
|
- set kernelopts="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||
|
-fi
|
||
|
-EOF
|
||
|
-
|
||
|
- update_bls_cmdline
|
||
|
-
|
||
|
- if [ "x${BLS_POPULATE_MENU}" = "xtrue" ]; then
|
||
|
- populate_menu
|
||
|
- else
|
||
|
cat << EOF
|
||
|
|
||
|
insmod blscfg
|
||
|
blscfg
|
||
|
EOF
|
||
|
- fi
|
||
|
|
||
|
if [ "x${GRUB_GRUBENV_UPDATE}" = "xyes" ]; then
|
||
|
blsdir="/boot/loader/entries"
|
||
|
--
|
||
|
2.44.0
|
||
|
|