[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/3] grub-mkrescue: Preserve a copy of the EFI bootloaders on the
From: |
Pete Batard |
Subject: |
[PATCH 2/3] grub-mkrescue: Preserve a copy of the EFI bootloaders on the ISO9660 file system |
Date: |
Mon, 6 Jun 2022 17:50:32 +0100 |
To enable file system transposition support for UEFI, we also must ensure that
there exists a copy of the EFI bootloaders, that are currently embedded in the
efi.img for xorriso, at their expected UEFI location on the ISO9660 file system.
This is accomplished by removing the use of a temporary directory to create the
efi/ content, to instead place it at the root of the ISO9660 content.
Signed-off-by: Pete Batard <pete@akeo.ie>
---
util/grub-mkrescue.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
index 1257476fb..4596f0ea7 100644
--- a/util/grub-mkrescue.c
+++ b/util/grub-mkrescue.c
@@ -745,9 +745,8 @@ main (int argc, char *argv[])
|| source_dirs[GRUB_INSTALL_PLATFORM_RISCV32_EFI]
|| source_dirs[GRUB_INSTALL_PLATFORM_RISCV64_EFI])
{
- char *efidir = grub_util_make_temporary_dir ();
- char *efidir_efi = grub_util_path_concat (2, efidir, "efi");
- char *efidir_efi_boot = grub_util_path_concat (3, efidir, "efi", "boot");
+ char *efidir_efi = grub_util_path_concat (2, iso9660_dir, "efi");
+ char *efidir_efi_boot = grub_util_path_concat (3, iso9660_dir, "efi",
"boot");
char *imgname, *img32, *img64, *img_mac = NULL;
char *efiimgfat;
grub_install_mkdir_p (efidir_efi_boot);
@@ -828,10 +827,9 @@ main (int argc, char *argv[])
xorriso_push ("-efi-boot-part");
xorriso_push ("--efi-boot-image");
- grub_util_unlink_recursive (efidir);
+ /* Don't unlink the efidir_efi_boot directory so that we have a
duplicate on the ISO9660 file system. */
free (efiimgfat);
free (efidir_efi);
- free (efidir);
grub_install_pop_module ();
grub_install_pop_module ();
grub_install_pop_module ();
--
2.36.0.windows.1