mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 21:54:27 +02:00
ArmVirtPkg/CI: Copy shell to virtual drive
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 a follow up patch will exclude the shell from secure boot enabled firmware images. The same update was previously applied to OvmfPkg by 6862b9d538d96363635677198899e1669e591259. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
This commit is contained in:
parent
e8de471660
commit
7d958e55a4
@ -5,6 +5,7 @@
|
|||||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
##
|
##
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import logging
|
import logging
|
||||||
import io
|
import io
|
||||||
|
|
||||||
@ -206,7 +207,8 @@ class PlatformBuilder(UefiBuilder, BuildSettingsManager):
|
|||||||
def FlashRomImage(self):
|
def FlashRomImage(self):
|
||||||
VirtualDrive = os.path.join(self.env.GetValue(
|
VirtualDrive = os.path.join(self.env.GetValue(
|
||||||
"BUILD_OUTPUT_BASE"), "VirtualDrive")
|
"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(
|
OutputPath_FV = os.path.join(
|
||||||
self.env.GetValue("BUILD_OUTPUT_BASE"), "FV")
|
self.env.GetValue("BUILD_OUTPUT_BASE"), "FV")
|
||||||
Built_FV = os.path.join(OutputPath_FV, "QEMU_EFI.fd")
|
Built_FV = os.path.join(OutputPath_FV, "QEMU_EFI.fd")
|
||||||
@ -217,7 +219,17 @@ class PlatformBuilder(UefiBuilder, BuildSettingsManager):
|
|||||||
additional = b'\0' * ((64 * 1024 * 1024)-fvfile.tell())
|
additional = b'\0' * ((64 * 1024 * 1024)-fvfile.tell())
|
||||||
fvfile.write(additional)
|
fvfile.write(additional)
|
||||||
|
|
||||||
# QEMU must be on that path
|
# 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{"AA64" if arch == "AARCH64" else arch}.EFI')
|
||||||
|
if os.path.exists(src):
|
||||||
|
logging.info("copy %s -> %s", src, dst)
|
||||||
|
shutil.copyfile(src, dst)
|
||||||
|
|
||||||
|
# QEMU must be on the path
|
||||||
|
|
||||||
# Unique Command and Args parameters per ARCH
|
# Unique Command and Args parameters per ARCH
|
||||||
if (self.env.GetValue("TARGET_ARCH").upper() == "AARCH64"):
|
if (self.env.GetValue("TARGET_ARCH").upper() == "AARCH64"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user