From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id AE630AC0D9C for ; Thu, 15 Feb 2024 10:25:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=SPtHLdXKFinCTiv+cKUNlK/0ipRF5A67YRus6KgTBBk=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1707992721; v=1; b=OxH9VXB5/z0xxLTWkjmHKxXVUEZt9Kdg3/tUgnP3Q6Qc9sukHaJTKNFgiMrM+Va/ggkXNEg8 PI1l9g83ypSULDDUqVhcdBvtudJ1ImPn7u8PVi/G9gZg2LJN7u9axTWiL1/tRU6cNIazKmiWVNW ze0if31zXc7zHQypaHhI4rIY= X-Received: by 127.0.0.2 with SMTP id SPMsYY7687511x8ddFo5wT7a; Thu, 15 Feb 2024 02:25:21 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.10930.1707992720750416755 for ; Thu, 15 Feb 2024 02:25:20 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-150-Fr3S2l3KOVmANwMAX5-FlQ-1; Thu, 15 Feb 2024 05:25:16 -0500 X-MC-Unique: Fr3S2l3KOVmANwMAX5-FlQ-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1691285A59C; Thu, 15 Feb 2024 10:25:16 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.193.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AEAA61BDD1; Thu, 15 Feb 2024 10:25:15 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4D46B1801009; Thu, 15 Feb 2024 11:25:03 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jiewen Yao , Gerd Hoffmann , Laszlo Ersek , Min Xu , Tom Lendacky , Oliver Steffen , Erdem Aktas , Ard Biesheuvel , Michael Roth Subject: [edk2-devel] [PATCH v2 11/12] OvmfPkg/CI: copy shell to virtual drive Date: Thu, 15 Feb 2024 11:25:02 +0100 Message-ID: <20240215102503.273275-12-kraxel@redhat.com> In-Reply-To: <20240215102503.273275-1-kraxel@redhat.com> References: <20240215102503.273275-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: xLapsqREtMI7WvcMe8MQnYwkx7686176AA= Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=OxH9VXB5; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Place the EFI shell as EFI/BOOT/BOOT{ARCH}.EFI on the virtual drive. This allows the "run to shell" CI test case to work even in case the shell is not included in the firmware image. This is needed because an followup patch will exclude the shell from secure boot enabled builds. Signed-off-by: Gerd Hoffmann --- OvmfPkg/PlatformCI/PlatformBuildLib.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/PlatformCI/PlatformBuildLib.py b/OvmfPkg/PlatformCI/PlatformBuildLib.py index f829738cdda4..00d454954bff 100644 --- a/OvmfPkg/PlatformCI/PlatformBuildLib.py +++ b/OvmfPkg/PlatformCI/PlatformBuildLib.py @@ -5,6 +5,7 @@ # SPDX-License-Identifier: BSD-2-Clause-Patent ## import os +import shutil import logging import io @@ -181,7 +182,8 @@ class PlatformBuilder( UefiBuilder, BuildSettingsManager): def FlashRomImage(self): VirtualDrive = os.path.join(self.env.GetValue("BUILD_OUTPUT_BASE"), "VirtualDrive") - os.makedirs(VirtualDrive, exist_ok=True) + VirtualDriveBoot = os.path.join(VirtualDrive, "EFI", "BOOT") + os.makedirs(VirtualDriveBoot, exist_ok=True) OutputPath_FV = os.path.join(self.env.GetValue("BUILD_OUTPUT_BASE"), "FV") if (self.env.GetValue("QEMU_SKIP") and @@ -189,6 +191,14 @@ class PlatformBuilder( UefiBuilder, BuildSettingsManager): logging.info("skipping qemu boot test") return 0 + # copy shell to VirtualDrive + for arch in self.env.GetValue("TARGET_ARCH").split(): + src = os.path.join(self.env.GetValue("BUILD_OUTPUT_BASE"), arch, "Shell.efi") + dst = os.path.join(VirtualDriveBoot, f'BOOT{arch}.EFI') + if os.path.exists(src): + logging.info("copy %s -> %s", src, dst) + shutil.copyfile(src, dst) + # # QEMU must be on the path # -- 2.43.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115515): https://edk2.groups.io/g/devel/message/115515 Mute This Topic: https://groups.io/mt/104370215/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-