Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nyFwX-0003Z2-Jj for mharc-grub-devel@gnu.org; Mon, 06 Jun 2022 12:51:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyFwT-0003Wj-S2 for grub-devel@gnu.org; Mon, 06 Jun 2022 12:51:01 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:42664) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyFwR-0006hA-Iw for grub-devel@gnu.org; Mon, 06 Jun 2022 12:51:01 -0400 Received: by mail-wr1-x435.google.com with SMTP id t13so20643685wrg.9 for ; Mon, 06 Jun 2022 09:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo.ie; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Gcku13+rf3gcKQSl/QrKMw/s1afOqylgMlOaGiq9ZyE=; b=Bw2jEHgvOiXYjUY7IboDV7pOragodkt08E9ecN99oWd+7XS2ttcxo6uNAFwvUaMuRm NzauwiqWt4YODHH4pPJGuJjAhJmp+fRwnUWNgf4CnG2F+K8Z1ihit19HWv1TiF/EsyVh fW3mgUUmOimBNGBg+fxkTmChIAKE9oSY2PhxU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Gcku13+rf3gcKQSl/QrKMw/s1afOqylgMlOaGiq9ZyE=; b=I+C4X8xvh4YbyHlB1L7LVz2eRUNLGUhrw/mbK+UYrJhEWmk0q0pKU7EdhOZniZ4AQZ e241FQqGneJ/auLSMYskoLnDV5yN5mfMKbC+cCw+3KFunXNR5bnrfB2H9Azm9XOKZ0DO JeQpbXiQKL457beEUwbniGi8fc0BQAMIjvTfk0tuzf8qreaaKDCXvUPChU1iCuMXmAUW WXY5m8aYIJyQhADXDD4V99aA0R1TnzLYrIoLUSwmVSqxVzzwNfy0GLcF/5F8nGBrTjvO /SeVY3xOjJUhzdzUfkctV9VyzsaY7yjmyzG0hRPr636NYmuqU9wm8OPQObWOGVIKfo2B w3Ug== X-Gm-Message-State: AOAM533HqKX/pYIQUt5qJHgoETOGJWP/EHS9iRqM0/PTV7anQ6BqIvGr F5BWUI1uVNcFMuEiCGlLhc8jngsQY6VoZw== X-Google-Smtp-Source: ABdhPJxDrz8tjI+u46jQ7VmpZo/aR5XkTHTuWA7IPS1YTiboZjf0/7oFHEzgygSa0OC16gC6ssgKYA== X-Received: by 2002:a05:6000:1888:b0:218:3fab:78e7 with SMTP id a8-20020a056000188800b002183fab78e7mr5554133wri.370.1654534251438; Mon, 06 Jun 2022 09:50:51 -0700 (PDT) Received: from localhost.localdomain (ip-84-203-46-176.broadband.digiweb.ie. [84.203.46.176]) by smtp.gmail.com with ESMTPSA id i19-20020a1c5413000000b0039c457cea21sm8066068wmb.34.2022.06.06.09.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 09:50:51 -0700 (PDT) From: Pete Batard To: grub-devel@gnu.org Cc: scdbackup@gmx.net, 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 Message-Id: <20220606165034.811-3-pete@akeo.ie> X-Mailer: git-send-email 2.36.0.windows.1 In-Reply-To: <20220606165034.811-1-pete@akeo.ie> References: <20220606165034.811-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=pete@akeo.ie; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2022 16:51:02 -0000 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 --- 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