summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch
diff options
context:
space:
mode:
authorCalifornia Sullivan <california.l.sullivan@intel.com>2018-03-20 16:21:33 -0700
committerCalifornia Sullivan <california.l.sullivan@intel.com>2018-03-22 08:29:39 -0700
commitf2502f90ab3decc5c3faf38ecfd13ac3bce4f411 (patch)
tree15d27e6e8eadf743f5a7d6f25dc44577e284160d /recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch
parent90d32d53cf2d0d7b0edc5e8eab734f620fb8c3ec (diff)
downloadmeta-intel-f2502f90ab3decc5c3faf38ecfd13ac3bce4f411.tar.gz
systemd-boot/rmc-boot.inc: update to work with v237 and meson
Patch changes: * 0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch removed because make is no longer used. * 0001-sd-boot-stub-check-LoadOptions-contains-data.patch removed because it was accepted upstream. * 0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch added to support RMC functionality. Upstream removed a snippet that found the root directory because they didn't need it anymore, but RMC does. * 0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch added to support building with meson instead of make. * Others refreshed inc file changes: * Don't commit pin, we can maintain these patches OK for now * EXTRA_OEMAKE -> EXTRA_OEMESON, and removed some superfluous options Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Diffstat (limited to 'recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch')
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch66
1 files changed, 0 insertions, 66 deletions
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch b/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch
deleted file mode 100644
index a4b63557..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1From 1e33f99e13a70c19c1f63f6ef1c5522a09adece6 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 3/3] 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>
15---
16 src/boot/efi/boot.c | 34 ++++++++++++++++++++++++++++++++++
17 1 file changed, 34 insertions(+)
18
19diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
20index d1b029b..8dffc48 100644
21--- a/src/boot/efi/boot.c
22+++ b/src/boot/efi/boot.c
23@@ -846,6 +846,40 @@ static VOID config_add_entry(Config *config, ConfigEntry *entry) {
24 config->entries = ReallocatePool(config->entries,
25 sizeof(VOID *) * config->entry_count, sizeof(VOID *) * i);
26 }
27+
28+ /* rmc: a linux entry could be added from .conf file or an embedded linux image
29+ * we put appending global command line here to cover both of two cases.
30+ */
31+ if (entry->type == LOADER_LINUX && rmc_db && rmc_fp) {
32+ rmc_file_t rmc_kp;
33+
34+ if (!rmc_query_file_by_fp(rmc_fp, rmc_db, "KBOOTPARAM", &rmc_kp)) {
35+ CHAR8 *cmdline;
36+ CHAR16 *s;
37+ CHAR16 *t;
38+ CHAR16 *p;
39+
40+ cmdline = AllocatePool(rmc_kp.blob_len * sizeof(CHAR8) + 1);
41+ CopyMem(cmdline, rmc_kp.blob, rmc_kp.blob_len);
42+ cmdline[rmc_kp.blob_len] = '\0';
43+ p = stra_to_str(cmdline);
44+ t = p;
45+
46+ while (*t) {
47+ if (*t == '\n')
48+ *t = '\0';
49+ t++;
50+ }
51+
52+ s = PoolPrint(L"%s %s", entry->options, p);
53+ FreePool(entry->options);
54+ FreePool(p);
55+ FreePool(cmdline);
56+
57+ entry->options = s;
58+ }
59+ }
60+
61 config->entries[config->entry_count++] = entry;
62 }
63
64--
652.7.4
66