diff options
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.patch | 67 |
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 @@ | |||
1 | From 159c8c54f92fb44d8abd2919fa83ad1cb640fac3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jianxun Zhang <jianxun.zhang@linux.intel.com> | ||
3 | Date: Mon, 20 Jun 2016 13:08:20 -0700 | ||
4 | Subject: [PATCH 4/5] sd-boot: Support global kernel command line fragment | ||
5 | |||
6 | Query file blob KBOOTPARAM from RMC. If it exists, we append | ||
7 | it to the new linux boot entry's cmdline. A boot entry could | ||
8 | be read from a .conf file on ESP, RMC database, or embedded | ||
9 | linux image. content in KBOOTPARAM is effective in all of | ||
10 | these cases. | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> | ||
15 | Signed-off-by: California Sullivan <california.l.sullivan@intel.com> | ||
16 | --- | ||
17 | src/boot/efi/boot.c | 34 ++++++++++++++++++++++++++++++++++ | ||
18 | 1 file changed, 34 insertions(+) | ||
19 | |||
20 | diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c | ||
21 | index 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 | -- | ||
66 | 2.14.3 | ||
67 | |||