diff options
-rw-r--r-- | ArmVirtPkg/PlatformCI/PlatformBuildLib.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ArmVirtPkg/PlatformCI/PlatformBuildLib.py b/ArmVirtPkg/PlatformCI/PlatformBuildLib.py index 3abab09141..ccc61feaff 100644 --- a/ArmVirtPkg/PlatformCI/PlatformBuildLib.py +++ b/ArmVirtPkg/PlatformCI/PlatformBuildLib.py @@ -5,6 +5,7 @@ # SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
+import shutil
import logging
import io
@@ -206,7 +207,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")
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())
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
if (self.env.GetValue("TARGET_ARCH").upper() == "AARCH64"):
|