
From: Simon Glass <sjg@chromium.org> We have two scripts which run QEMU, one for EFI and one for bare metal. They have similar options so it seems reasonable to try to unify them a bit. This series creates a common file and adjusts arguments so they are consistent across both scripts. The EFI app for ARM and x86 have different start-up code but in fact the code is quiet similar. This series creates a new common main program, called efi_main_common() which is used for both architectures. The small number of differences are handled in arch-specific code. Simon Glass (19): scripts: Drop unwanted Stage() function from build_helper scripts: Move common arguments into build_helper.py scripts: Use the same main() approach fo both scripts scripts: build-efi: Drop the -a option scripts: build-efi: Use -a instead of -A scripts: build-efi: Use --write-kernel instead of -K scripts: Move some QEMU-arg building into build_helper scripts: Move bitness and os_arch to helper scripts: Move OS selection into the helper efi: x86: Show app banner on startup efi: Rename efi_stub.o Makefile variable efi: Drop the efi_ prefix on the arch-specific stub files efi: Create a common file for the stub efi: Move more common stub code into the common file efi: Unify the names for use_uart and ebs_called efi: Create a common efi_main() implementation for the stub efi: Move x86 over to use the common efi_main() function efi: Move ARM over to use the common efi_main() function efi: Switch x86 and ARM to use the unified stub Makefile | 3 +- configs/efi-arm_app64_defconfig | 1 - configs/efi-x86_app32_defconfig | 1 - configs/efi-x86_app64_defconfig | 1 - configs/efi-x86_payload32_defconfig | 1 - configs/efi-x86_payload64_defconfig | 1 - include/efi.h | 8 +- include/efi_stub.h | 59 ++++++ lib/efi_client/Kconfig | 1 + lib/efi_client/Makefile | 20 +- lib/efi_client/efi.c | 24 --- lib/efi_client/{efi_stub_arm64.c => stub.c} | 117 +++++------- lib/efi_client/stub_arm64.c | 76 ++++++++ lib/efi_client/{efi_stub_x86.c => stub_x86.c} | 175 +----------------- scripts/build-efi | 80 +++----- scripts/build-qemu | 79 +------- scripts/build_helper.py | 111 +++++++++-- 17 files changed, 335 insertions(+), 423 deletions(-) rename lib/efi_client/{efi_stub_arm64.c => stub.c} (65%) create mode 100644 lib/efi_client/stub_arm64.c rename lib/efi_client/{efi_stub_x86.c => stub_x86.c} (52%) -- 2.43.0 base-commit: 55141ad119f8962d41b38bec9924524bd8daf2ba branch: appg