diff options
author | California Sullivan <california.l.sullivan@intel.com> | 2018-03-20 16:21:33 -0700 |
---|---|---|
committer | California Sullivan <california.l.sullivan@intel.com> | 2018-03-22 08:29:39 -0700 |
commit | f2502f90ab3decc5c3faf38ecfd13ac3bce4f411 (patch) | |
tree | 15d27e6e8eadf743f5a7d6f25dc44577e284160d /recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch | |
parent | 90d32d53cf2d0d7b0edc5e8eab734f620fb8c3ec (diff) | |
download | meta-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/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch')
-rw-r--r-- | recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch | 46 |
1 files changed, 46 insertions, 0 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 | |||