diff options
Diffstat (limited to 'recipes-bsp/systemd-boot')
8 files changed, 148 insertions, 123 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 new file mode 100644 index 00000000..6d7b144d --- /dev/null +++ b/recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From beb095f41d458b7d684c0cd6cac1749e2fc3f29b Mon Sep 17 00:00:00 2001 | ||
2 | From: California Sullivan <california.l.sullivan@intel.com> | ||
3 | Date: Wed, 21 Mar 2018 13:01:26 -0700 | ||
4 | Subject: [PATCH 1/5] partially revert "sd-boot: stub: Obtain PE section | ||
5 | offsets from RAM, not disk (#6250)" | ||
6 | |||
7 | Only revert the section for finding the root_dir, as RMC needs this to | ||
8 | find its database file. | ||
9 | |||
10 | Upstream-Status: Inappropriate [upstream doesn't need the root_dir]. | ||
11 | |||
12 | Signed-off-by: California Sullivan <california.l.sullivan@intel.com> | ||
13 | --- | ||
14 | src/boot/efi/stub.c | 9 +++++++++ | ||
15 | 1 file changed, 9 insertions(+) | ||
16 | |||
17 | diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c | ||
18 | index 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 | -- | ||
45 | 2.14.3 | ||
46 | |||
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch b/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch deleted file mode 100644 index 2f248e21..00000000 --- a/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From fe1c2fdfe81f2ac2b41fe8543ba07f1911770d26 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jianxun Zhang <jianxun.zhang@linux.intel.com> | ||
3 | Date: Sat, 21 May 2016 18:52:07 -0700 | ||
4 | Subject: [PATCH] sd-boot: Link RMC library into bootloader and stub | ||
5 | |||
6 | Add RMC library into bootloader binary and stub. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> | ||
11 | --- | ||
12 | Makefile.am | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/Makefile.am b/Makefile.am | ||
16 | index 305099ab6..9fb6f9b7b 100644 | ||
17 | --- a/Makefile.am | ||
18 | +++ b/Makefile.am | ||
19 | @@ -2802,7 +2802,7 @@ $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(t | ||
20 | |||
21 | $(systemd_boot_solib): $(systemd_boot_objects) | ||
22 | $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \ | ||
23 | - -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \ | ||
24 | + -o $@ -lefi -lgnuefi -lrmcefi $(shell $(CC) -print-libgcc-file-name); \ | ||
25 | nm -D -u $@ | grep ' U ' && exit 1 || : | ||
26 | |||
27 | $(systemd_boot): $(systemd_boot_solib) | ||
28 | @@ -2852,7 +2852,7 @@ $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(t | ||
29 | |||
30 | $(stub_solib): $(stub_objects) | ||
31 | $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \ | ||
32 | - -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \ | ||
33 | + -o $@ -lefi -lgnuefi -lrmcefi $(shell $(CC) -print-libgcc-file-name); \ | ||
34 | nm -D -u $@ | grep ' U ' && exit 1 || : | ||
35 | |||
36 | $(stub): $(stub_solib) | ||
37 | -- | ||
38 | 2.11.0 | ||
39 | |||
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-stub-check-LoadOptions-contains-data.patch b/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-stub-check-LoadOptions-contains-data.patch deleted file mode 100644 index 69acc8f8..00000000 --- a/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-stub-check-LoadOptions-contains-data.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 87cd5a5e0f06ceb7f9dbdcc4029e0c279a38e6ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
3 | Date: Mon, 27 Feb 2017 10:04:03 +0200 | ||
4 | Subject: [PATCH] sd-boot: stub: check LoadOptions contains data | ||
5 | |||
6 | With some UEFI shells LoadOptionsSize is reported being > 0 | ||
7 | but the corresponding LoadOptions does not contain any data | ||
8 | (the first element has value 0). | ||
9 | |||
10 | When that happens, the stub feature that allows .cmdline to be | ||
11 | replaced by what's in LoadOptions ends up copying nothing/random | ||
12 | data to the kernel cmdline resulting in different kinds of boot | ||
13 | problems. | ||
14 | |||
15 | To fix this, add a check to see if LoadOptions contains data | ||
16 | before replacing the .cmdline. | ||
17 | |||
18 | Upstream-Status: Accepted [https://github.com/systemd/systemd/pull/5467] | ||
19 | |||
20 | Fixes [YOCTO #11078]. | ||
21 | |||
22 | Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> | ||
23 | --- | ||
24 | src/boot/efi/stub.c | 2 +- | ||
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
26 | |||
27 | diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c | ||
28 | index 7c1ffb1bc..b7d5d3cda 100644 | ||
29 | --- a/src/boot/efi/stub.c | ||
30 | +++ b/src/boot/efi/stub.c | ||
31 | @@ -87,7 +87,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | ||
32 | cmdline_len = szs[0]; | ||
33 | |||
34 | /* if we are not in secure boot mode, accept a custom command line and replace the built-in one */ | ||
35 | - if (!secure && loaded_image->LoadOptionsSize > 0) { | ||
36 | + if (!secure && loaded_image->LoadOptionsSize > 0 && *(CHAR16 *)loaded_image->LoadOptions != 0) { | ||
37 | CHAR16 *options; | ||
38 | CHAR8 *line; | ||
39 | UINTN i; | ||
40 | -- | ||
41 | 2.11.0 | ||
42 | |||
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 new file mode 100644 index 00000000..a3e496f5 --- /dev/null +++ b/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From af977853ab722194c4754e6693f430f50a42190f Mon Sep 17 00:00:00 2001 | ||
2 | From: California Sullivan <california.l.sullivan@intel.com> | ||
3 | Date: Tue, 20 Mar 2018 10:08:14 -0700 | ||
4 | Subject: [PATCH 2/5] sd-boot: fix RMC compatibility with systemd-boot and | ||
5 | meson | ||
6 | |||
7 | With autotools swapped out for meson a number of things need to be | ||
8 | changed. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-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 | |||
18 | diff --git a/meson_options.txt b/meson_options.txt | ||
19 | index 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 | |||
31 | diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build | ||
32 | index 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 | -- | ||
61 | 2.14.3 | ||
62 | |||
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0002-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 index e88012c3..cef934ce 100644 --- a/recipes-bsp/systemd-boot/systemd-boot/0002-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 | |||
@@ -1,7 +1,7 @@ | |||
1 | From a3c4fc8c2847fe289a617bcba1d905f580f0e18d Mon Sep 17 00:00:00 2001 | 1 | From b780c67c780bae2f834d73017044680fabca4268 Mon Sep 17 00:00:00 2001 |
2 | From: Jianxun Zhang <jianxun.zhang@linux.intel.com> | 2 | From: Jianxun Zhang <jianxun.zhang@linux.intel.com> |
3 | Date: Wed, 1 Jun 2016 16:32:22 -0700 | 3 | Date: Wed, 1 Jun 2016 16:32:22 -0700 |
4 | Subject: [PATCH 2/3] sd-boot: Load board-specific boot entries from RMC | 4 | Subject: [PATCH 3/5] sd-boot: Load board-specific boot entries from RMC |
5 | database | 5 | database |
6 | 6 | ||
7 | RMC provides a centralized database file on ESP. The DB contains | 7 | RMC provides a centralized database file on ESP. The DB contains |
@@ -38,15 +38,16 @@ bootloader skips loading any boot entries from ESP. | |||
38 | Upstream-Status: Pending | 38 | Upstream-Status: Pending |
39 | 39 | ||
40 | Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> | 40 | Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> |
41 | Signed-off-by: California Sullivan <california.l.sullivan@intel.com> | ||
41 | --- | 42 | --- |
42 | src/boot/efi/boot.c | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++- | 43 | src/boot/efi/boot.c | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++- |
43 | 1 file changed, 145 insertions(+), 2 deletions(-) | 44 | 1 file changed, 146 insertions(+), 2 deletions(-) |
44 | 45 | ||
45 | diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c | 46 | diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c |
46 | index 30c1ead..d1b029b 100644 | 47 | index b9c7c8394..93cfaf193 100644 |
47 | --- a/src/boot/efi/boot.c | 48 | --- a/src/boot/efi/boot.c |
48 | +++ b/src/boot/efi/boot.c | 49 | +++ b/src/boot/efi/boot.c |
49 | @@ -15,6 +15,7 @@ | 50 | @@ -16,6 +16,7 @@ |
50 | 51 | ||
51 | #include <efi.h> | 52 | #include <efi.h> |
52 | #include <efilib.h> | 53 | #include <efilib.h> |
@@ -54,7 +55,7 @@ index 30c1ead..d1b029b 100644 | |||
54 | 55 | ||
55 | #include "console.h" | 56 | #include "console.h" |
56 | #include "disk.h" | 57 | #include "disk.h" |
57 | @@ -33,6 +34,9 @@ static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot | 58 | @@ -35,6 +36,9 @@ static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot |
58 | 59 | ||
59 | static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE; | 60 | static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE; |
60 | 61 | ||
@@ -64,7 +65,7 @@ index 30c1ead..d1b029b 100644 | |||
64 | enum loader_type { | 65 | enum loader_type { |
65 | LOADER_UNDEFINED, | 66 | LOADER_UNDEFINED, |
66 | LOADER_EFI, | 67 | LOADER_EFI, |
67 | @@ -1702,6 +1706,136 @@ static VOID config_free(Config *config) { | 68 | @@ -1684,6 +1688,136 @@ static VOID config_free(Config *config) { |
68 | FreePool(config->entry_oneshot); | 69 | FreePool(config->entry_oneshot); |
69 | } | 70 | } |
70 | 71 | ||
@@ -201,7 +202,7 @@ index 30c1ead..d1b029b 100644 | |||
201 | EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | 202 | EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { |
202 | CHAR16 *s; | 203 | CHAR16 *s; |
203 | CHAR8 *b; | 204 | CHAR8 *b; |
204 | @@ -1714,6 +1848,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | 205 | @@ -1696,6 +1830,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { |
205 | UINT64 init_usec; | 206 | UINT64 init_usec; |
206 | BOOLEAN menu = FALSE; | 207 | BOOLEAN menu = FALSE; |
207 | CHAR16 uuid[37]; | 208 | CHAR16 uuid[37]; |
@@ -209,16 +210,17 @@ index 30c1ead..d1b029b 100644 | |||
209 | 210 | ||
210 | InitializeLib(image, sys_table); | 211 | InitializeLib(image, sys_table); |
211 | init_usec = time_usec(); | 212 | init_usec = time_usec(); |
212 | @@ -1745,6 +1880,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | 213 | @@ -1736,6 +1871,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { |
213 | return EFI_LOAD_ERROR; | 214 | } |
214 | } | 215 | } |
215 | 216 | ||
216 | + /* Initialize rmc before loading any config */ | 217 | + /* Initialize rmc before loading any config */ |
217 | + rmc_initialize(root_dir, sys_table, &rmc_db, &rmc_fp); | 218 | + rmc_initialize(root_dir, sys_table, &rmc_db, &rmc_fp); |
218 | 219 | + | |
219 | /* the filesystem path to this image, to prevent adding ourselves to the menu */ | 220 | /* the filesystem path to this image, to prevent adding ourselves to the menu */ |
220 | loaded_image_path = DevicePathToStr(loaded_image->FilePath); | 221 | loaded_image_path = DevicePathToStr(loaded_image->FilePath); |
221 | @@ -1753,11 +1890,15 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | 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) { | ||
222 | ZeroMem(&config, sizeof(Config)); | 224 | ZeroMem(&config, sizeof(Config)); |
223 | config_load_defaults(&config, root_dir); | 225 | config_load_defaults(&config, root_dir); |
224 | 226 | ||
@@ -236,7 +238,7 @@ index 30c1ead..d1b029b 100644 | |||
236 | 238 | ||
237 | /* sort entries after version number */ | 239 | /* sort entries after version number */ |
238 | config_sort_entries(&config); | 240 | config_sort_entries(&config); |
239 | @@ -1851,6 +1992,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | 241 | @@ -1841,6 +1983,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { |
240 | out: | 242 | out: |
241 | FreePool(loaded_image_path); | 243 | FreePool(loaded_image_path); |
242 | config_free(&config); | 244 | config_free(&config); |
@@ -246,5 +248,5 @@ index 30c1ead..d1b029b 100644 | |||
246 | uefi_call_wrapper(BS->CloseProtocol, 4, image, &LoadedImageProtocol, image, NULL); | 248 | uefi_call_wrapper(BS->CloseProtocol, 4, image, &LoadedImageProtocol, image, NULL); |
247 | return err; | 249 | return err; |
248 | -- | 250 | -- |
249 | 2.7.4 | 251 | 2.14.3 |
250 | 252 | ||
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/0004-sd-boot-Support-global-kernel-command-line-fragment.patch index a4b63557..b4dd9c42 100644 --- a/recipes-bsp/systemd-boot/systemd-boot/0003-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 | |||
@@ -1,7 +1,7 @@ | |||
1 | From 1e33f99e13a70c19c1f63f6ef1c5522a09adece6 Mon Sep 17 00:00:00 2001 | 1 | From 159c8c54f92fb44d8abd2919fa83ad1cb640fac3 Mon Sep 17 00:00:00 2001 |
2 | From: Jianxun Zhang <jianxun.zhang@linux.intel.com> | 2 | From: Jianxun Zhang <jianxun.zhang@linux.intel.com> |
3 | Date: Mon, 20 Jun 2016 13:08:20 -0700 | 3 | Date: Mon, 20 Jun 2016 13:08:20 -0700 |
4 | Subject: [PATCH 3/3] sd-boot: Support global kernel command line fragment | 4 | Subject: [PATCH 4/5] sd-boot: Support global kernel command line fragment |
5 | 5 | ||
6 | Query file blob KBOOTPARAM from RMC. If it exists, we append | 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 | 7 | it to the new linux boot entry's cmdline. A boot entry could |
@@ -12,15 +12,16 @@ these cases. | |||
12 | Upstream-Status: Pending | 12 | Upstream-Status: Pending |
13 | 13 | ||
14 | Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> | 14 | Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> |
15 | Signed-off-by: California Sullivan <california.l.sullivan@intel.com> | ||
15 | --- | 16 | --- |
16 | src/boot/efi/boot.c | 34 ++++++++++++++++++++++++++++++++++ | 17 | src/boot/efi/boot.c | 34 ++++++++++++++++++++++++++++++++++ |
17 | 1 file changed, 34 insertions(+) | 18 | 1 file changed, 34 insertions(+) |
18 | 19 | ||
19 | diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c | 20 | diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c |
20 | index d1b029b..8dffc48 100644 | 21 | index 93cfaf193..2f400db3c 100644 |
21 | --- a/src/boot/efi/boot.c | 22 | --- a/src/boot/efi/boot.c |
22 | +++ b/src/boot/efi/boot.c | 23 | +++ b/src/boot/efi/boot.c |
23 | @@ -846,6 +846,40 @@ static VOID config_add_entry(Config *config, ConfigEntry *entry) { | 24 | @@ -851,6 +851,40 @@ static VOID config_add_entry(Config *config, ConfigEntry *entry) { |
24 | config->entries = ReallocatePool(config->entries, | 25 | config->entries = ReallocatePool(config->entries, |
25 | sizeof(VOID *) * config->entry_count, sizeof(VOID *) * i); | 26 | sizeof(VOID *) * config->entry_count, sizeof(VOID *) * i); |
26 | } | 27 | } |
@@ -62,5 +63,5 @@ index d1b029b..8dffc48 100644 | |||
62 | } | 63 | } |
63 | 64 | ||
64 | -- | 65 | -- |
65 | 2.7.4 | 66 | 2.14.3 |
66 | 67 | ||
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch b/recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch index 75082693..60e93ca8 100644 --- a/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch +++ b/recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 4cb9c65ea9c0eba3ba04d036dccd4a5ab3d2547b Mon Sep 17 00:00:00 2001 | 1 | From 405a77233dde990fa7815d1546dc5a6b5a608479 Mon Sep 17 00:00:00 2001 |
2 | From: Mikko Ylinen <mikko.ylinen@intel.com> | 2 | From: Mikko Ylinen <mikko.ylinen@intel.com> |
3 | Date: Fri, 27 Jan 2017 13:31:45 +0200 | 3 | Date: Fri, 27 Jan 2017 13:31:45 +0200 |
4 | Subject: [PATCH] sd-boot: support global kernel command line in EFI stub | 4 | Subject: [PATCH 5/5] sd-boot: support global kernel command line in EFI stub |
5 | 5 | ||
6 | This change integrates rmc into EFI stub and supports a | 6 | This change integrates rmc into EFI stub and supports a |
7 | global fragment (RMC KBOOTPARAM) that is appended to the | 7 | global fragment (RMC KBOOTPARAM) that is appended to the |
@@ -14,15 +14,16 @@ Implements [YOCTO #10924]. | |||
14 | Upstream-status: Pending | 14 | Upstream-status: Pending |
15 | 15 | ||
16 | Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com> | 16 | Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com> |
17 | Signed-off-by: California Sullivan <california.l.sullivan@intel.com> | ||
17 | --- | 18 | --- |
18 | src/boot/efi/stub.c | 33 +++++++++++++++++++++++++++++++++ | 19 | src/boot/efi/stub.c | 33 +++++++++++++++++++++++++++++++++ |
19 | 1 file changed, 33 insertions(+) | 20 | 1 file changed, 33 insertions(+) |
20 | 21 | ||
21 | diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c | 22 | diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c |
22 | index 1e250f34f..f3865199f 100644 | 23 | index 540ca5985..11047477b 100644 |
23 | --- a/src/boot/efi/stub.c | 24 | --- a/src/boot/efi/stub.c |
24 | +++ b/src/boot/efi/stub.c | 25 | +++ b/src/boot/efi/stub.c |
25 | @@ -13,6 +13,7 @@ | 26 | @@ -14,6 +14,7 @@ |
26 | 27 | ||
27 | #include <efi.h> | 28 | #include <efi.h> |
28 | #include <efilib.h> | 29 | #include <efilib.h> |
@@ -30,7 +31,7 @@ index 1e250f34f..f3865199f 100644 | |||
30 | 31 | ||
31 | #include "disk.h" | 32 | #include "disk.h" |
32 | #include "graphics.h" | 33 | #include "graphics.h" |
33 | @@ -48,6 +49,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | 34 | @@ -49,6 +50,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { |
34 | UINTN cmdline_len; | 35 | UINTN cmdline_len; |
35 | CHAR16 uuid[37]; | 36 | CHAR16 uuid[37]; |
36 | EFI_STATUS err; | 37 | EFI_STATUS err; |
@@ -40,7 +41,7 @@ index 1e250f34f..f3865199f 100644 | |||
40 | 41 | ||
41 | InitializeLib(image, sys_table); | 42 | InitializeLib(image, sys_table); |
42 | 43 | ||
43 | @@ -112,6 +116,35 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { | 44 | @@ -109,6 +113,35 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { |
44 | #endif | 45 | #endif |
45 | } | 46 | } |
46 | 47 | ||
@@ -77,5 +78,5 @@ index 1e250f34f..f3865199f 100644 | |||
77 | if (disk_get_part_uuid(loaded_image->DeviceHandle, uuid) == EFI_SUCCESS) | 78 | if (disk_get_part_uuid(loaded_image->DeviceHandle, uuid) == EFI_SUCCESS) |
78 | efivar_set(L"LoaderDevicePartUUID", uuid, FALSE); | 79 | efivar_set(L"LoaderDevicePartUUID", uuid, FALSE); |
79 | -- | 80 | -- |
80 | 2.11.0 | 81 | 2.14.3 |
81 | 82 | ||
diff --git a/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc b/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc index 11fddaf9..e27d4951 100644 --- a/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc +++ b/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc | |||
@@ -1,21 +1,15 @@ | |||
1 | # Pin systemd revision down for systemd-boot recipe. | 1 | # This patchset contains hooks that allows systemd-boot to use RMC capablilities. |
2 | # Patches could not be applied cleanly when systemd in OE is updated, | ||
3 | # though we don't expect a lot of changes could happen in bootloader. | ||
4 | # RMC is designed to support a large number of types of boards, so we | ||
5 | # should do explicit update with validation to prevent regression even | ||
6 | # resolving conflicts for a new tip could be done in a short time. | ||
7 | |||
8 | # Revision: systemd v232 in OE | ||
9 | SRCREV_intel-x86-common = "a1e2ef7ec912902d8142e7cb5830cbfb47dba86c" | ||
10 | 2 | ||
11 | DEPENDS_append_intel-x86-common = " rmc rmc-efi" | 3 | DEPENDS_append_intel-x86-common = " rmc rmc-efi" |
12 | 4 | ||
13 | EXTRA_OEMAKE_append_intel-x86-common = ' EFI_LDFLAGS="-L${STAGING_DIR_HOST}/usr/lib" EFI_CFLAGS="-I${STAGING_INCDIR}/rmc -DRMC_EFI"' | 5 | EXTRA_OEMESON_append_intel-x86-common = ' \ |
6 | -Drmc-includedir="${STAGING_INCDIR}/rmc" \ | ||
7 | ' | ||
14 | 8 | ||
15 | SRC_URI_append_intel-x86-common = " \ | 9 | SRC_URI_append_intel-x86-common = " \ |
16 | file://0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch \ | 10 | file://0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch \ |
17 | file://0002-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch \ | 11 | file://0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch \ |
18 | file://0003-sd-boot-Support-global-kernel-command-line-fragment.patch \ | 12 | file://0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch \ |
19 | file://0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch \ | 13 | file://0004-sd-boot-Support-global-kernel-command-line-fragment.patch \ |
20 | file://0001-sd-boot-stub-check-LoadOptions-contains-data.patch \ | 14 | file://0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch \ |
21 | " | 15 | " |