summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2018-07-12 22:08:22 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2018-07-16 16:53:00 +0800
commitc12c16659203d677618871f660c1499152a555a8 (patch)
tree60967f8f17da1e5a6cef2908312a25b4c9514a07 /recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch
parent7c469177e833a80443b948af63e40176c7dc6bee (diff)
downloadmeta-intel-c12c16659203d677618871f660c1499152a555a8.tar.gz
rmc: remove
It's not being maintained anymore and the scripts have not been kept in sync with upstream for quite some time. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch')
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch67
1 files changed, 0 insertions, 67 deletions
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch b/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch
deleted file mode 100644
index b4dd9c42..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch
+++ /dev/null
@@ -1,67 +0,0 @@
1From 159c8c54f92fb44d8abd2919fa83ad1cb640fac3 Mon Sep 17 00:00:00 2001
2From: Jianxun Zhang <jianxun.zhang@linux.intel.com>
3Date: Mon, 20 Jun 2016 13:08:20 -0700
4Subject: [PATCH 4/5] sd-boot: Support global kernel command line fragment
5
6Query file blob KBOOTPARAM from RMC. If it exists, we append
7it to the new linux boot entry's cmdline. A boot entry could
8be read from a .conf file on ESP, RMC database, or embedded
9linux image. content in KBOOTPARAM is effective in all of
10these cases.
11
12Upstream-Status: Pending
13
14Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
15Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
16---
17 src/boot/efi/boot.c | 34 ++++++++++++++++++++++++++++++++++
18 1 file changed, 34 insertions(+)
19
20diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
21index 93cfaf193..2f400db3c 100644
22--- a/src/boot/efi/boot.c
23+++ b/src/boot/efi/boot.c
24@@ -851,6 +851,40 @@ static VOID config_add_entry(Config *config, ConfigEntry *entry) {
25 config->entries = ReallocatePool(config->entries,
26 sizeof(VOID *) * config->entry_count, sizeof(VOID *) * i);
27 }
28+
29+ /* rmc: a linux entry could be added from .conf file or an embedded linux image
30+ * we put appending global command line here to cover both of two cases.
31+ */
32+ if (entry->type == LOADER_LINUX && rmc_db && rmc_fp) {
33+ rmc_file_t rmc_kp;
34+
35+ if (!rmc_query_file_by_fp(rmc_fp, rmc_db, "KBOOTPARAM", &rmc_kp)) {
36+ CHAR8 *cmdline;
37+ CHAR16 *s;
38+ CHAR16 *t;
39+ CHAR16 *p;
40+
41+ cmdline = AllocatePool(rmc_kp.blob_len * sizeof(CHAR8) + 1);
42+ CopyMem(cmdline, rmc_kp.blob, rmc_kp.blob_len);
43+ cmdline[rmc_kp.blob_len] = '\0';
44+ p = stra_to_str(cmdline);
45+ t = p;
46+
47+ while (*t) {
48+ if (*t == '\n')
49+ *t = '\0';
50+ t++;
51+ }
52+
53+ s = PoolPrint(L"%s %s", entry->options, p);
54+ FreePool(entry->options);
55+ FreePool(p);
56+ FreePool(cmdline);
57+
58+ entry->options = s;
59+ }
60+ }
61+
62 config->entries[config->entry_count++] = entry;
63 }
64
65--
662.14.3
67