diff options
author | Sean Rhodes <sean@starlabs.systems> | 2022-08-02 09:07:15 +0100 |
---|---|---|
committer | Martin Roth <martin.roth@amd.corp-partner.google.com> | 2022-08-24 23:58:15 +0000 |
commit | 724c0cd5b4da4af19c25673743f9d7b46a69baa8 (patch) | |
tree | 7eb9b6c35f30760d265f813e926651b57d7d35b0 /payloads/external | |
parent | 147c9578a1b50cc2842c1172e29c094ed7e18b1b (diff) |
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 <sean@starlabs.systems>
Change-Id: Ic4ae8ac4118a5747f38297d0fbf4cb53aa3b6d6d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66359
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'payloads/external')
-rw-r--r-- | payloads/external/edk2/Makefile | 10 |
1 files 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 |