From c6f510b429e6ae324d529b401134d7827f9c3b5b Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Sat, 30 Oct 2021 19:51:19 +0000 Subject: [PATCH] Ensure DxeCore isn't included twice in non-UTK builds Signed-off-by: Devon Bautista --- Makefile | 8 +++++++- boards/qemu/image-files.txt | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 82a72ab..fd738dc 100644 --- a/Makefile +++ b/Makefile @@ -142,10 +142,16 @@ else DXE_FFS += dxe/linuxboot.ffs DXE_FFS += $(BUILD)/Linux.ffs DXE_FFS += $(BUILD)/Initrd.ffs + +# The Perl way of building replaces DxeCore with a custom version but +# UTK needs the original DxeCore, so uncomment DxeCore in image-files.txt +# on-the-fly before passing it to UTK. $(BUILD)/linuxboot.rom: bin/utk $(DXE_FFS) $< \ $(ROM) \ - remove_dxes_except boards/$(BOARD)/image-files.txt \ + remove_dxes_except \ + <(sed 's|^#[[:space:]]\+\(d6a2cb7f-6a18-4e2f-b43b-9920a733700a\)[[:space:]]\+\(DxeCore\)|\1 \2|' \ + boards/$(BOARD)/image-files.txt) \ $(foreach ffs,$(DXE_FFS), insert_dxe $(ffs)) \ $(UTK_EXTRA_OPS) \ save $@ diff --git a/boards/qemu/image-files.txt b/boards/qemu/image-files.txt index 18dbe55..5ae8d58 100644 --- a/boards/qemu/image-files.txt +++ b/boards/qemu/image-files.txt @@ -1,5 +1,5 @@ fc510ee7-ffdc-11d4-bd41-0080c73c8881 DXE Apriori -d6a2cb7f-6a18-4e2f-b43b-9920a733700a DxeCore +# d6a2cb7f-6a18-4e2f-b43b-9920a733700a DxeCore d93ce3d8-a7eb-4730-8c8e-cc466a9ecc3c ReportStatusCodeRouterRuntimeDxe 6c2004ef-4e0e-4be4-b14c-340eb4aa5891 StatusCodeHandlerRuntimeDxe 80cf7257-87ab-47f9-a3fe-d50b76d89541 PcdDxe