From 724c0cd5b4da4af19c25673743f9d7b46a69baa8 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Tue, 2 Aug 2022 09:07:15 +0100 Subject: [PATCH] payloads/edk2: Separate the tasks required to build edk2 Separate the tasks that are required to be completed prior to building edk2 into a prep recipe. This allows this to be used for building different targets. This also ensures that the COREBOOT toolchain is used. Signed-off-by: Sean Rhodes Change-Id: Ic4ae8ac4118a5747f38297d0fbf4cb53aa3b6d6d Reviewed-on: https://review.coreboot.org/c/coreboot/+/66359 Reviewed-by: Lean Sheng Tan Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- payloads/external/edk2/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/payloads/external/edk2/Makefile b/payloads/external/edk2/Makefile index 8191a58021..7711e72fdd 100644 --- a/payloads/external/edk2/Makefile +++ b/payloads/external/edk2/Makefile @@ -170,14 +170,18 @@ print: -e 's/s /Build: Silent/' \ -e 's/t /Toolchain: /' -build: update print logo checktools - unset CC; $(MAKE) -C $(EDK2_PATH)/BaseTools 2>&1 +prep: clean checktools logo update cd $(WORKSPACE); \ - source $(EDK2_PATH)/edksetup.sh BaseTools; \ + source $(EDK2_PATH)/edksetup.sh; \ + unset CC; $(MAKE) -C $(EDK2_PATH)/BaseTools 2>&1; \ grep -q "COREBOOT" $(EDK2_PATH)/Conf/tools_def.txt; \ if [ $$? -ne 0 ]; then \ cat ../tools_def.txt >> $(EDK2_PATH)/Conf/tools_def.txt; \ fi; \ + +build: prep print + cd $(WORKSPACE); \ + source $(EDK2_PATH)/edksetup.sh; \ build -b $(RELEASE_STR) $(BUILD_STR); \ mkdir -p $(WORKSPACE)/output; \ mv $(WORKSPACE)/Build/UefiPayloadPkgX64/$(RELEASE_STR)_COREBOOT/FV/UEFIPAYLOAD.fd $(WORKSPACE)/output