summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/systemd-boot/systemd-boot
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/systemd-boot/systemd-boot')
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch46
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch62
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch252
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch67
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch82
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc30
6 files changed, 0 insertions, 539 deletions
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch b/recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch
deleted file mode 100644
index 6d7b144d..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From beb095f41d458b7d684c0cd6cac1749e2fc3f29b Mon Sep 17 00:00:00 2001
2From: California Sullivan <california.l.sullivan@intel.com>
3Date: Wed, 21 Mar 2018 13:01:26 -0700
4Subject: [PATCH 1/5] partially revert "sd-boot: stub: Obtain PE section
5 offsets from RAM, not disk (#6250)"
6
7Only revert the section for finding the root_dir, as RMC needs this to
8find its database file.
9
10Upstream-Status: Inappropriate [upstream doesn't need the root_dir].
11
12Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
13---
14 src/boot/efi/stub.c | 9 +++++++++
15 1 file changed, 9 insertions(+)
16
17diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c
18index ff45cebd4..540ca5985 100644
19--- a/src/boot/efi/stub.c
20+++ b/src/boot/efi/stub.c
21@@ -30,6 +30,8 @@ static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE;
22
23 EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
24 EFI_LOADED_IMAGE *loaded_image;
25+ EFI_FILE *root_dir;
26+ CHAR16 *loaded_image_path;
27 CHAR8 *b;
28 UINTN size;
29 BOOLEAN secure = FALSE;
30@@ -58,6 +60,13 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
31 return err;
32 }
33
34+ root_dir = LibOpenRoot(loaded_image->DeviceHandle);
35+ if (!root_dir) {
36+ Print(L"Unable to open root directory: %r ", err);
37+ uefi_call_wrapper(BS->Stall, 1, 3 * 1000 * 1000);
38+ return EFI_LOAD_ERROR;
39+ }
40+
41 if (efivar_get_raw(&global_guid, L"SecureBoot", &b, &size) == EFI_SUCCESS) {
42 if (*b > 0)
43 secure = TRUE;
44--
452.14.3
46
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch b/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch
deleted file mode 100644
index a3e496f5..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1From af977853ab722194c4754e6693f430f50a42190f Mon Sep 17 00:00:00 2001
2From: California Sullivan <california.l.sullivan@intel.com>
3Date: Tue, 20 Mar 2018 10:08:14 -0700
4Subject: [PATCH 2/5] sd-boot: fix RMC compatibility with systemd-boot and
5 meson
6
7With autotools swapped out for meson a number of things need to be
8changed.
9
10Upstream-Status: Pending
11
12Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
13---
14 meson_options.txt | 2 ++
15 src/boot/efi/meson.build | 4 +++-
16 2 files changed, 5 insertions(+), 1 deletion(-)
17
18diff --git a/meson_options.txt b/meson_options.txt
19index 39822d6cd..d8a480401 100644
20--- a/meson_options.txt
21+++ b/meson_options.txt
22@@ -279,6 +279,8 @@ option('efi-ldsdir', type : 'string',
23 description : 'path to the EFI lds directory')
24 option('efi-includedir', type : 'string', value : '/usr/include/efi',
25 description : 'path to the EFI header directory')
26+option('rmc-includedir', type : 'string', value : '/usr/include/rmc',
27+ description : 'path to the RMC header directory')
28 option('tpm-pcrindex', type : 'string', value : '8',
29 description : 'TPM PCR register number to use')
30
31diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
32index 9f9ec4911..266ff928f 100644
33--- a/src/boot/efi/meson.build
34+++ b/src/boot/efi/meson.build
35@@ -83,6 +83,7 @@ if have_gnu_efi
36 efi_conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME)
37 efi_conf.set10('ENABLE_TPM', get_option('tpm'))
38 efi_conf.set('SD_TPM_PCR', get_option('tpm-pcrindex'))
39+ efi_conf.set('RMC_EFI', 'true')
40
41 efi_config_h = configure_file(
42 output : 'efi_config.h',
43@@ -121,6 +122,7 @@ if have_gnu_efi
44 '-Wsign-compare',
45 '-Wno-missing-field-initializers',
46 '-isystem', efi_incdir,
47+ '-isystem', get_option('rmc-includedir'),
48 '-isystem', join_paths(efi_incdir, gnu_efi_arch),
49 '-include', efi_config_h]
50 if efi_arch == 'x86_64'
51@@ -191,7 +193,7 @@ if have_gnu_efi
52 output : tuple[0],
53 command : efi_ld.split() + ['-o', '@OUTPUT@'] +
54 efi_ldflags + tuple[2] +
55- ['-lefi', '-lgnuefi', libgcc_file_name])
56+ ['-lefi', '-lgnuefi', '-lrmcefi', libgcc_file_name])
57
58 test('no-undefined-symbols-' + tuple[0],
59 no_undefined_symbols,
60--
612.14.3
62
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch b/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch
deleted file mode 100644
index cef934ce..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch
+++ /dev/null
@@ -1,252 +0,0 @@
1From b780c67c780bae2f834d73017044680fabca4268 Mon Sep 17 00:00:00 2001
2From: Jianxun Zhang <jianxun.zhang@linux.intel.com>
3Date: Wed, 1 Jun 2016 16:32:22 -0700
4Subject: [PATCH 3/5] sd-boot: Load board-specific boot entries from RMC
5 database
6
7RMC provides a centralized database file on ESP. The DB contains
8fingerprints and any file blobs associated to physical boards.
9Callers can fetch board-specific data with fingerprint info
10collected from board at runtime if there is any record matched
11board's fingerprint.
12
13To let bootloader know which file blob in RMC should be queried,
14a special config file BOOTENTRY.CONFIG is defined as:
15
16boot.conf
17install.conf
18
19Bootloader calls RMC APIs and other functions to perform these
20tasks before it shows boot menu to user:
21
22(1) Load RMC database file from ESP
23(2) Collect fingerprint data from board
24(3) Query BOOTENTRY.CONFIG from RMC DB with fingerprint
25(4) Parse BOOTENTRY.CONFIG to know names of boot entry files
26(5) Query boot entry files one by one from RMC DB, and add
27 them into sd-boot config data.
28
29The final effect is that bootloader will show board-specific
30boot entries in boot menu to user. User then can choose one
31of them to boot system with the selected configuration.
32
33If any of these steps fails, bootloader simply skips loading
34RMC configs or any entry file not successfully fetched from
35RMC DB. Once any entry is loaded successfully from RMC DB,
36bootloader skips loading any boot entries from ESP.
37
38Upstream-Status: Pending
39
40Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
41Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
42---
43 src/boot/efi/boot.c | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++-
44 1 file changed, 146 insertions(+), 2 deletions(-)
45
46diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
47index b9c7c8394..93cfaf193 100644
48--- a/src/boot/efi/boot.c
49+++ b/src/boot/efi/boot.c
50@@ -16,6 +16,7 @@
51
52 #include <efi.h>
53 #include <efilib.h>
54+#include <rmc_api.h>
55
56 #include "console.h"
57 #include "disk.h"
58@@ -35,6 +36,9 @@ static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot
59
60 static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE;
61
62+static CHAR8* rmc_db;
63+static rmc_fingerprint_t *rmc_fp;
64+
65 enum loader_type {
66 LOADER_UNDEFINED,
67 LOADER_EFI,
68@@ -1684,6 +1688,136 @@ static VOID config_free(Config *config) {
69 FreePool(config->entry_oneshot);
70 }
71
72+/* Derived from line_get_key_value(), we could consolidate two functions later */
73+static CHAR8 *get_line(CHAR8 *content, UINT64 *pos) {
74+ CHAR8 *line;
75+ UINT64 linelen;
76+
77+skip:
78+ line = content + *pos;
79+ if (*line == '\0')
80+ return NULL;
81+
82+ linelen = 0;
83+ while (line[linelen] && !strchra((CHAR8 *)"\n\r", line[linelen]))
84+ linelen++;
85+
86+ /* move pos to next line */
87+ *pos += linelen;
88+ if (content[*pos])
89+ (*pos)++;
90+
91+ /* empty line */
92+ if (linelen == 0)
93+ goto skip;
94+
95+ /* terminate line */
96+ line[linelen] = '\0';
97+
98+ /* remove leading whitespace */
99+ while (strchra((CHAR8 *)" \t", *line)) {
100+ line++;
101+ linelen--;
102+ }
103+
104+ /* remove trailing whitespace */
105+ while (linelen > 0 && strchra((CHAR8 *)" \t", line[linelen-1]))
106+ linelen--;
107+ line[linelen] = '\0';
108+
109+ if (*line == '#')
110+ goto skip;
111+
112+ return line;
113+}
114+
115+/* load rmc database file from ESP and try to get fingerprint. These
116+ * are essential information indicating we could query rmc data for
117+ * this board at least
118+ * return 0 if both database file and fingerprint can be obtained, otherwise
119+ * non-zero value is returned.
120+ *
121+ * Note: db and fp hold valid values only when this function returns 0.
122+ * Caller is responsible to free allocated memory pointed by *db and *fp when
123+ * this function returns 0.
124+ */
125+
126+static UINTN rmc_initialize(EFI_FILE *root_dir, EFI_SYSTEM_TABLE *sys_table, CHAR8 **db, rmc_fingerprint_t **fp) {
127+ UINTN len;
128+ UINTN ret = 1;
129+
130+ if (!db || !fp)
131+ return ret;
132+
133+ *db = NULL;
134+ *fp = NULL;
135+
136+ /* load rmc database */
137+ len = file_read(root_dir, L"\\rmc.db", 0, 0, db);
138+
139+ if (len <= 0)
140+ goto done;
141+
142+ *fp = AllocateZeroPool(sizeof(rmc_fingerprint_t));
143+ /* call rmc to get fingerprint. We will use single-action rmc APIs to query multiple files.
144+ * This should bring a better performance than calling double-action rmc API every time.
145+ */
146+ if (rmc_get_fingerprint(sys_table, *fp))
147+ goto done;
148+
149+ ret = 0;
150+done:
151+ if (ret) {
152+ FreePool(*db);
153+ FreePool(*fp);
154+ }
155+
156+ return ret;
157+}
158+
159+/* load RMC entries
160+ * return TRUE when at least one entry is loaded, otherwise, return FALSE
161+ */
162+static BOOLEAN config_load_rmc_entries(Config *config, EFI_HANDLE *device, CHAR16 *loaded_image_path, CHAR8 *db, rmc_fingerprint_t *fp) {
163+ CHAR8 *boot_entry = NULL;
164+ CHAR8 *boot_config = NULL;
165+ rmc_file_t rp;
166+ CHAR8 *line;
167+ UINT64 pos = 0;
168+ BOOLEAN ret = FALSE;
169+
170+ if (!db || !fp)
171+ return ret;
172+
173+ /* query boot entry config file */
174+ if (rmc_query_file_by_fp(fp, db, "BOOTENTRY.CONFIG", &rp))
175+ return ret;
176+
177+ /* file blob read from rmc db is not necessarily null-terminated, and we
178+ * should keep mem where rmc db lives from change during parsing
179+ */
180+ boot_config = AllocatePool(rp.blob_len * sizeof(CHAR8) + 1);
181+ CopyMem(boot_config, rp.blob, rp.blob_len);
182+ boot_config[rp.blob_len] = '\0';
183+ /* parse boot entry config */
184+ while ((line = get_line(boot_config, &pos))) {
185+ if (rmc_query_file_by_fp(fp, db, (char *)line, &rp))
186+ continue;
187+ if (rp.blob_len > 0) {
188+ boot_entry = AllocatePool(rp.blob_len * sizeof(CHAR8) + 1);
189+ CopyMem(boot_entry, rp.blob, rp.blob_len);
190+ boot_entry[rp.blob_len] = '\0';
191+ config_entry_add_from_file(config, device,
192+ stra_to_str(line), boot_entry,
193+ loaded_image_path);
194+ /* tell caller success when a RMC entry is loaded */
195+ ret = TRUE;
196+ }
197+ }
198+
199+ return ret;
200+}
201+
202 EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
203 CHAR16 *s;
204 CHAR8 *b;
205@@ -1696,6 +1830,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
206 UINT64 init_usec;
207 BOOLEAN menu = FALSE;
208 CHAR16 uuid[37];
209+ BOOLEAN rmc_entry = FALSE;
210
211 InitializeLib(image, sys_table);
212 init_usec = time_usec();
213@@ -1736,6 +1871,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
214 }
215 }
216
217+ /* Initialize rmc before loading any config */
218+ rmc_initialize(root_dir, sys_table, &rmc_db, &rmc_fp);
219+
220 /* the filesystem path to this image, to prevent adding ourselves to the menu */
221 loaded_image_path = DevicePathToStr(loaded_image->FilePath);
222 efivar_set(L"LoaderImageIdentifier", loaded_image_path, FALSE);
223@@ -1743,11 +1881,15 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
224 ZeroMem(&config, sizeof(Config));
225 config_load_defaults(&config, root_dir);
226
227+ if (rmc_db && rmc_fp)
228+ rmc_entry = config_load_rmc_entries(&config, loaded_image->DeviceHandle, loaded_image_path, rmc_db, rmc_fp);
229+
230 /* scan /EFI/Linux/ directory */
231 config_entry_add_linux(&config, loaded_image, root_dir);
232
233- /* scan /loader/entries/\*.conf files */
234- config_load_entries(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path);
235+ /* scan /loader/entries/\*.conf files only when no RMC entry is loaded */
236+ if (rmc_entry == FALSE)
237+ config_load_entries(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path);
238
239 /* sort entries after version number */
240 config_sort_entries(&config);
241@@ -1841,6 +1983,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
242 out:
243 FreePool(loaded_image_path);
244 config_free(&config);
245+ FreePool(rmc_db);
246+ FreePool(rmc_fp);
247 uefi_call_wrapper(root_dir->Close, 1, root_dir);
248 uefi_call_wrapper(BS->CloseProtocol, 4, image, &LoadedImageProtocol, image, NULL);
249 return err;
250--
2512.14.3
252
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
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch b/recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch
deleted file mode 100644
index 60e93ca8..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch
+++ /dev/null
@@ -1,82 +0,0 @@
1From 405a77233dde990fa7815d1546dc5a6b5a608479 Mon Sep 17 00:00:00 2001
2From: Mikko Ylinen <mikko.ylinen@intel.com>
3Date: Fri, 27 Jan 2017 13:31:45 +0200
4Subject: [PATCH 5/5] sd-boot: support global kernel command line in EFI stub
5
6This change integrates rmc into EFI stub and supports a
7global fragment (RMC KBOOTPARAM) that is appended to the
8cmdline at boot.
9
10The fragment is board-specific and read from the database.
11
12Implements [YOCTO #10924].
13
14Upstream-status: Pending
15
16Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
17Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
18---
19 src/boot/efi/stub.c | 33 +++++++++++++++++++++++++++++++++
20 1 file changed, 33 insertions(+)
21
22diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c
23index 540ca5985..11047477b 100644
24--- a/src/boot/efi/stub.c
25+++ b/src/boot/efi/stub.c
26@@ -14,6 +14,7 @@
27
28 #include <efi.h>
29 #include <efilib.h>
30+#include <rmc_api.h>
31
32 #include "disk.h"
33 #include "graphics.h"
34@@ -49,6 +50,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
35 UINTN cmdline_len;
36 CHAR16 uuid[37];
37 EFI_STATUS err;
38+ INTN len;
39+ CHAR8 *rmc_db = NULL;
40+ rmc_file_t rmc_file;
41
42 InitializeLib(image, sys_table);
43
44@@ -109,6 +113,35 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
45 #endif
46 }
47
48+ len = file_read(root_dir, L"\\rmc.db", 0, 0, &rmc_db);
49+ if (len <= 0)
50+ rmc_db = NULL;
51+
52+ /* If the board has a fragment in rmc database, append it to the cmdline */
53+ if (rmc_db && !rmc_gimme_file(sys_table, rmc_db, "KBOOTPARAM", &rmc_file)) {
54+ CHAR8 *line;
55+ UINTN i = 0;
56+ UINTN j;
57+
58+ line = AllocatePool(rmc_file.blob_len + cmdline_len + 2);
59+
60+ while (i < cmdline_len && cmdline[i] != '\0') {
61+ line[i] = cmdline[i];
62+ i++;
63+ }
64+
65+ line[i++] = ' ';
66+
67+ for (j=0; j < rmc_file.blob_len; j++)
68+ line[i+j] = rmc_file.blob[j];
69+ line[i+j] = '\0';
70+
71+ cmdline = line;
72+ cmdline_len = i + j;
73+
74+ FreePool(rmc_db);
75+ }
76+
77 /* export the device path this image is started from */
78 if (disk_get_part_uuid(loaded_image->DeviceHandle, uuid) == EFI_SUCCESS)
79 efivar_set(L"LoaderDevicePartUUID", uuid, FALSE);
80--
812.14.3
82
diff --git a/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc b/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
deleted file mode 100644
index bbe3aea2..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
+++ /dev/null
@@ -1,30 +0,0 @@
1# This patchset contains hooks that allows systemd-boot to use RMC capablilities.
2python __anonymous () {
3 import re
4 target = d.getVar('TARGET_ARCH')
5 prefix = "" if d.getVar('EFI_PROVIDER') == "rmc-boot" else "systemd-"
6 if target == "x86_64":
7 systemdimage = prefix + "bootx64.efi"
8 else:
9 systemdimage = prefix + "bootia32.efi"
10 d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
11 prefix = "systemd-" if prefix == "" else ""
12 d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
13}
14
15DEPENDS_append_intel-x86-common = " rmc rmc-efi"
16RDEPENDS_${PN}_append_intel-x86-common = " rmc-db"
17
18EXTRA_OEMESON_append_intel-x86-common = ' \
19 -Drmc-includedir="${STAGING_INCDIR}/rmc" \
20 '
21
22SRC_URI_append_intel-x86-common = " \
23 file://0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch \
24 file://0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch \
25 file://0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch \
26 file://0004-sd-boot-Support-global-kernel-command-line-fragment.patch \
27 file://0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch \
28 "
29
30RPROVIDES_${PN} += "rmc-boot"