Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oycPP-0000Dw-R0 for mharc-grub-devel@gnu.org; Fri, 25 Nov 2022 12:22:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oycPN-0000A4-To for grub-devel@gnu.org; Fri, 25 Nov 2022 12:22:37 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oycPM-0001EJ-Av for grub-devel@gnu.org; Fri, 25 Nov 2022 12:22:37 -0500 Received: by mail-wr1-x432.google.com with SMTP id i12so7809430wrb.0 for ; Fri, 25 Nov 2022 09:22:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Gcku13+rf3gcKQSl/QrKMw/s1afOqylgMlOaGiq9ZyE=; b=Wbdiay+5eAhcsVlJD3h95YgAcBX3D8cMab+iuympHZyYsMnxgVXkaLtvBbObFGCklI kKqrf/CgZDRMgsJMnseyURwRQPfl/IR6UGXv/Jv3H3r7lWRkYrdTZZJH1tt3fcldLibF wqg28H4YLg45EZmQ6WK224sJlAojJRHzzbFVI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gcku13+rf3gcKQSl/QrKMw/s1afOqylgMlOaGiq9ZyE=; b=n2ww485gU9dj+fuT2vD9IDgKL9CkPv6WInBI1DiedtQmPW4QdrLSnp6Y6WmO0DCvVs gF4nkYwKa/5mdm7eKwy0TBBKQVMKoZvKNQ1yUYXAvbBU4lLt0B42T08KwAsRdMLM7q+C Lxz/KZyhRN7DQ+BM02xoNEftLYtRS3nfQ+ELPxYE2SSoFxx2hQx7MVwrwZ8+ahi+jajn /pnYfD+p2qGw+CYlsB1cG8Dsia6DfxwT2OCC2Xnd5PGhebuar4/87Ba5GaBx+7aRxat8 oblx7asBSP95nEMayg9rPdiryC3cRjQdWljrnILIDY1+TwDjRh/jui5qijxTvLRey4b4 3K4A== X-Gm-Message-State: ANoB5plq647Kq2wJW3eDuKbwIcxn5TKm6CFd7UVSKlxtxS5MY//2QP/y SC89QVCfCDTq6uXrOdZRUQzyoelSNfZ22Xg1 X-Google-Smtp-Source: AA0mqf4TBewBTS87hI8IGFHUjQjs0XSLa1K38bLEiqQmNvZNAjKReormkBBCvK3/fNypzTMGvQMWqQ== X-Received: by 2002:a5d:6051:0:b0:22f:da60:345 with SMTP id j17-20020a5d6051000000b0022fda600345mr24081825wrt.218.1669396954522; Fri, 25 Nov 2022 09:22:34 -0800 (PST) Received: from localhost.localdomain (ip-84-203-35-79.broadband.digiweb.ie. [84.203.35.79]) by smtp.gmail.com with ESMTPSA id u13-20020a5d514d000000b002365b759b65sm4166324wrt.86.2022.11.25.09.22.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 09:22:34 -0800 (PST) From: Pete Batard To: grub-devel@gnu.org Cc: Pete Batard Subject: [PATCH v2 2/3] grub-mkrescue: Preserve a copy of the EFI bootloaders on the ISO9660 file system Date: Fri, 25 Nov 2022 17:22:16 +0000 Message-Id: <20221125172217.936-3-pete@akeo.ie> X-Mailer: git-send-email 2.36.0.windows.1 In-Reply-To: <20221125172217.936-1-pete@akeo.ie> References: <20221125172217.936-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=pete@akeo.ie; helo=mail-wr1-x432.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 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: Fri, 25 Nov 2022 17:22:38 -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