54 строки
1.9 KiB
Diff
54 строки
1.9 KiB
Diff
From d2bdb4b2ea4922d22e07613782b392d9732d9e3f Mon Sep 17 00:00:00 2001
|
|
From: Ankit Jain <ankitja@vmware.com>
|
|
Date: Fri, 13 Sep 2019 18:32:07 +0530
|
|
Subject: [PATCH 2/2] ostree: Adding load env to menuentry
|
|
|
|
Adding load env to menuentry to load photon specific config files
|
|
to add kernel and systemd commandline parameter
|
|
|
|
Signed-off-by: Ajay Kaher <akaher@vmware.com>
|
|
Signed-off-by: Ankit Jain <ankitja@vmware.com>
|
|
---
|
|
src/libostree/ostree-bootloader-grub2.c | 18 ++++++++++++++++++
|
|
1 file changed, 18 insertions(+)
|
|
|
|
diff --git a/src/libostree/ostree-bootloader-grub2.c b/src/libostree/ostree-bootloader-grub2.c
|
|
index 22037f1..53fbfa6 100644
|
|
--- a/src/libostree/ostree-bootloader-grub2.c
|
|
+++ b/src/libostree/ostree-bootloader-grub2.c
|
|
@@ -193,6 +193,8 @@ _ostree_bootloader_grub2_generate_config (OstreeSysroot *sysroot
|
|
const char *kernel;
|
|
const char *initrd;
|
|
const char *devicetree;
|
|
+ const char *kernelcfg;
|
|
+ const char *systemdcfg;
|
|
char *quoted_title = NULL;
|
|
char *uuid = NULL;
|
|
char *quoted_uuid = NULL;
|
|
@@ -217,6 +219,22 @@ _ostree_bootloader_grub2_generate_config (OstreeSysroot *sysroot
|
|
g_string_append (output, grub2_prepare_root_cache);
|
|
g_string_append_c (output, '\n');
|
|
|
|
+ kernelcfg = ostree_bootconfig_parser_get (config, "kernelcfg");
|
|
+ if(kernelcfg)
|
|
+ {
|
|
+ g_string_append (output, "load_env -f ");
|
|
+ g_string_append (output, kernelcfg);
|
|
+ g_string_append_c (output, '\n');
|
|
+ }
|
|
+
|
|
+ systemdcfg = ostree_bootconfig_parser_get (config, "systemdcfg");
|
|
+ if(systemdcfg)
|
|
+ {
|
|
+ g_string_append (output, "load_env -f ");
|
|
+ g_string_append (output, systemdcfg);
|
|
+ g_string_append_c (output, '\n');
|
|
+ }
|
|
+
|
|
if (!kernel)
|
|
return glnx_throw (error, "No \"linux\" key in bootloader config");
|
|
g_string_append (output, "linux");
|
|
--
|
|
2.7.4
|
|
|