From da069688c63cca3e27b007005089bf99135af4e0 Mon Sep 17 00:00:00 2001 From: Debarghya Bhattacharya <4084683+debarghyab@users.noreply.github.com> Date: Fri, 9 Aug 2019 16:01:15 +0530 Subject: [PATCH] [CELADON] Integrate EFI shell in flashfiles zip Integrate EFI shell in flashfiles zip EFI shell binary that is already part of Celadon source tree is copied to flashfiles zip to help developers boot celadon on platforms that do not have internal efi shell support in bios. Tracked-On: OAM-84428 Signed-off: debarghy debarghya.bhattacharya@intel.com --- releasetools/flashfiles_from_target_files | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/releasetools/flashfiles_from_target_files b/releasetools/flashfiles_from_target_files index 8d17ec3..96ae00c 100755 --- a/releasetools/flashfiles_from_target_files +++ b/releasetools/flashfiles_from_target_files @@ -456,14 +456,15 @@ def main(argv): ifile = common.File(fn, data) ifile.AddToZip(dest_zip) - # Add EFI shell to flashfiles zip - efiShellBinaryPath = os.path.join("device","linaro","bootloader","edk2","ShellBinPkg","UefiShell","X64","Shell.efi") - archivedEfiFilePath = "EFI/BOOT/BOOTX64.EFI" - if os.path.isfile(efiShellBinaryPath): - print "Adding EFI shell to flashfiles..." - dest_zip.write(efiShellBinaryPath, archivedEfiFilePath) - else: - print "EFI shell binary not found, skipping..." + # Add EFI shell to flashfiles zip for UEFI platforms + if (intel_common.CheckIfSocEFI(unpack_dir, None))[0]: + efiShellBinaryPath = os.path.join("device","linaro","bootloader","edk2","ShellBinPkg","UefiShell","X64","Shell.efi") + archivedEfiFilePath = "EFI/BOOT/BOOTX64.EFI" + if os.path.isfile(efiShellBinaryPath): + print "Adding EFI shell to flashfiles..." + dest_zip.write(efiShellBinaryPath, archivedEfiFilePath) + else: + print "EFI shell binary not found, skipping..." print "All done."