diff options
author | Saul Wold <sgw@linux.intel.com> | 2017-11-07 10:32:26 -0800 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2017-11-20 15:33:02 -0800 |
commit | d53dbb38c43da3fd04fed9a55e7b3b9e2c512b9a (patch) | |
tree | fbe372dba00d45bbf9fbfbb3726708dc2590daeb /recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch | |
parent | 5adbf6df4fd89e7531ccccfb9cec7a5314d635f0 (diff) | |
download | meta-intel-d53dbb38c43da3fd04fed9a55e7b3b9e2c512b9a.tar.gz |
meta-intel: Reorganize the layout to remove common
Remove the concept of the common directory and move all the recipes-* dirs
to the top level as a normal layer would be. layer.conf is updated appropriately
Signed-off-by: Saul Wold <sgw@linux.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.patch | 66 |
1 files changed, 66 insertions, 0 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 new file mode 100644 index 00000000..a4b63557 --- /dev/null +++ b/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From 1e33f99e13a70c19c1f63f6ef1c5522a09adece6 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 3/3] 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 | --- | ||
16 | src/boot/efi/boot.c | 34 ++++++++++++++++++++++++++++++++++ | ||
17 | 1 file changed, 34 insertions(+) | ||
18 | |||
19 | diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c | ||
20 | index 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 | -- | ||
65 | 2.7.4 | ||
66 | |||