From f2502f90ab3decc5c3faf38ecfd13ac3bce4f411 Mon Sep 17 00:00:00 2001 From: California Sullivan Date: Tue, 20 Mar 2018 16:21:33 -0700 Subject: 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 --- ...pport-global-kernel-command-line-fragment.patch | 66 ---------------------- 1 file changed, 66 deletions(-) delete mode 100644 recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch (limited to 'recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch') 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 deleted file mode 100644 index a4b63557..00000000 --- a/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 1e33f99e13a70c19c1f63f6ef1c5522a09adece6 Mon Sep 17 00:00:00 2001 -From: Jianxun Zhang -Date: Mon, 20 Jun 2016 13:08:20 -0700 -Subject: [PATCH 3/3] sd-boot: Support global kernel command line fragment - -Query file blob KBOOTPARAM from RMC. If it exists, we append -it to the new linux boot entry's cmdline. A boot entry could -be read from a .conf file on ESP, RMC database, or embedded -linux image. content in KBOOTPARAM is effective in all of -these cases. - -Upstream-Status: Pending - -Signed-off-by: Jianxun Zhang ---- - src/boot/efi/boot.c | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c -index d1b029b..8dffc48 100644 ---- a/src/boot/efi/boot.c -+++ b/src/boot/efi/boot.c -@@ -846,6 +846,40 @@ static VOID config_add_entry(Config *config, ConfigEntry *entry) { - config->entries = ReallocatePool(config->entries, - sizeof(VOID *) * config->entry_count, sizeof(VOID *) * i); - } -+ -+ /* rmc: a linux entry could be added from .conf file or an embedded linux image -+ * we put appending global command line here to cover both of two cases. -+ */ -+ if (entry->type == LOADER_LINUX && rmc_db && rmc_fp) { -+ rmc_file_t rmc_kp; -+ -+ if (!rmc_query_file_by_fp(rmc_fp, rmc_db, "KBOOTPARAM", &rmc_kp)) { -+ CHAR8 *cmdline; -+ CHAR16 *s; -+ CHAR16 *t; -+ CHAR16 *p; -+ -+ cmdline = AllocatePool(rmc_kp.blob_len * sizeof(CHAR8) + 1); -+ CopyMem(cmdline, rmc_kp.blob, rmc_kp.blob_len); -+ cmdline[rmc_kp.blob_len] = '\0'; -+ p = stra_to_str(cmdline); -+ t = p; -+ -+ while (*t) { -+ if (*t == '\n') -+ *t = '\0'; -+ t++; -+ } -+ -+ s = PoolPrint(L"%s %s", entry->options, p); -+ FreePool(entry->options); -+ FreePool(p); -+ FreePool(cmdline); -+ -+ entry->options = s; -+ } -+ } -+ - config->entries[config->entry_count++] = entry; - } - --- -2.7.4 - -- cgit v1.2.3-54-g00ecf