75e8a58be1
- Keep grub packaging and dependencies in the SLE-12 and SLE-15 builds - Power guest secure boot with key management (jsc#PED-3520) (jsc#PED-9892) * 0001-ieee1275-Platform-Keystore-PKS-Support.patch * 0002-ieee1275-Read-the-DB-and-DBX-secure-boot-variables.patch * 0003-appendedsig-The-creation-of-trusted-and-distrusted-l.patch * 0004-appendedsig-While-verifying-the-kernel-use-trusted-a.patch * 0005-appendedsig-The-grub-command-s-trusted-and-distruste.patch * 0006-appendedsig-documentation.patch * 0007-mkimage-create-new-ELF-Note-for-SBAT.patch * 0008-mkimage-adding-sbat-data-into-sbat-ELF-Note-on-power.patch * grub2.spec : Building signed grub.elf with SBAT metadata - Support for NVMe multipath splitter (jsc#PED-10538) * 0001-ieee1275-support-added-for-multiple-nvme-bootpaths.patch - Deleted path (jsc#PED-10538) * 0001-grub2-Can-t-setup-a-default-boot-device-correctly-on.patch * 0001-grub2-Set-multiple-device-path-for-a-nvmf-boot-devic.patch - Fix not a directory error from the minix filesystem, as leftover data on disk may contain its magic header so it gets misdetected (bsc#1231604) * grub2-install-fix-not-a-directory-error.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=517
67 lines
2.5 KiB
Diff
67 lines
2.5 KiB
Diff
From 32d4823762e5a0e7f8bfc5a878d39e1a019392fe Mon Sep 17 00:00:00 2001
|
|
From: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
|
|
Date: Thu, 18 Apr 2024 00:00:55 +0530
|
|
Subject: [PATCH 8/8] mkimage: adding sbat data into sbat ELF Note on powerpc
|
|
|
|
it reads the SBAT data from sbat.csv and create the ELF Note for it then
|
|
store the SBAT data on it while generate image with -s option
|
|
|
|
Signed-off-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
|
|
Co-authored-by: Daniel Axtens <dja@axtens.net>
|
|
---
|
|
util/mkimage.c | 23 +++++++++++++++++------
|
|
1 file changed, 17 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/util/mkimage.c b/util/mkimage.c
|
|
index 0737935fd..136e4a90c 100644
|
|
--- a/util/mkimage.c
|
|
+++ b/util/mkimage.c
|
|
@@ -958,8 +958,9 @@ grub_install_generate_image (const char *dir, const char *prefix,
|
|
total_module_size += dtb_size + sizeof (struct grub_module_header);
|
|
}
|
|
|
|
- if (sbat_path != NULL && image_target->id != IMAGE_EFI)
|
|
- grub_util_error (_(".sbat section can be embedded into EFI images only"));
|
|
+ if (sbat_path != NULL && (image_target->id != IMAGE_EFI && image_target->id != IMAGE_PPC))
|
|
+ grub_util_error (_(".sbat section can be embedded into EFI images/"
|
|
+ "sbat ELF Note cab be added into powerpc-ieee1275 images only"));
|
|
|
|
if (disable_shim_lock)
|
|
total_module_size += sizeof (struct grub_module_header);
|
|
@@ -1835,6 +1836,16 @@ grub_install_generate_image (const char *dir, const char *prefix,
|
|
case IMAGE_I386_IEEE1275:
|
|
{
|
|
grub_uint64_t target_addr;
|
|
+ char *sbat = NULL;
|
|
+
|
|
+ if (sbat_path != NULL)
|
|
+ {
|
|
+ sbat_size = grub_util_get_image_size (sbat_path);
|
|
+ sbat = xmalloc (sbat_size);
|
|
+ grub_util_load_image (sbat_path, sbat);
|
|
+ layout.sbat_size = sbat_size;
|
|
+ }
|
|
+
|
|
if (image_target->id == IMAGE_LOONGSON_ELF)
|
|
{
|
|
if (comp == GRUB_COMPRESSION_NONE)
|
|
@@ -1846,11 +1857,11 @@ grub_install_generate_image (const char *dir, const char *prefix,
|
|
else
|
|
target_addr = image_target->link_addr;
|
|
if (image_target->voidp_sizeof == 4)
|
|
- grub_mkimage_generate_elf32 (image_target, note, appsig_size, &core_img,
|
|
- &core_size, target_addr, &layout);
|
|
+ grub_mkimage_generate_elf32 (image_target, note, appsig_size, sbat, &core_img, &core_size,
|
|
+ target_addr, &layout);
|
|
else
|
|
- grub_mkimage_generate_elf64 (image_target, note, appsig_size, &core_img,
|
|
- &core_size, target_addr, &layout);
|
|
+ grub_mkimage_generate_elf64 (image_target, note, appsig_size, sbat, &core_img, &core_size,
|
|
+ target_addr, &layout);
|
|
}
|
|
break;
|
|
}
|
|
--
|
|
2.47.0
|
|
|