diff --git a/releasetools/flashfiles_from_target_files b/releasetools/flashfiles_from_target_files index 8d17ec3..4cedb84 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."