From ba672761771622533511f2b2784aad6af6bfc8fe Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Wed, 18 May 2022 23:00:57 +0100 Subject: payloads/edk2: Add a recipe to build the ShimLayer The ShimLayer is required to start the Universal Payload. It will build the required HOBs and pass them accordingly. Signed-off-by: Sean Rhodes Change-Id: I043271994f40813d9059a89420d4311d9d5802b1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/64485 Tested-by: build bot (Jenkins) Reviewed-by: Lean Sheng Tan --- payloads/external/edk2/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'payloads/external') diff --git a/payloads/external/edk2/Makefile b/payloads/external/edk2/Makefile index a1c2072857..498e11aed3 100644 --- a/payloads/external/edk2/Makefile +++ b/payloads/external/edk2/Makefile @@ -117,6 +117,9 @@ $(EDK2_PATH): $(WORKSPACE) fi cd $(EDK2_PATH); \ git checkout MdeModulePkg/Logo/Logo.bmp > /dev/null 2>&1 || true; \ + if [ -e UefiPayloadPkg/ShimLayer/UniversalPayload.o ]; then \ + rm UefiPayloadPkg/ShimLayer/UniversalPayload.o; \ + fi; \ echo " Fetching new commits from $(CONFIG_EDK2_REPOSITORY)"; \ git fetch origin 2>/dev/null; \ if ! git rev-parse --verify -q $(CONFIG_EDK2_TAG_OR_REV) >/dev/null; then \ @@ -210,6 +213,18 @@ $(WORKSPACE)/Build/UefiPayloadPkgX64/UniversalPayload.elf: \ fi echo "Success!"; \ +$(WORKSPACE)/Build/UefiPayloadPkgX64/$(RELEASE_STR)_COREBOOT/IA32/UefiPayloadPkg/ShimLayer/ShimLayer/DEBUG/ShimLayer.dll: \ + $(WORKSPACE)/Build/UefiPayloadPkgX64/UniversalPayload.elf prep + cd $(WORKSPACE)/Build/UefiPayloadPkgX64 && \ + $(OBJCOPY) -I binary UniversalPayload.elf -O elf32-i386 -B i386 \ + $(EDK2_PATH)/UefiPayloadPkg/ShimLayer/UniversalPayload.o; \ + cd $(WORKSPACE) && \ + source $(EDK2_PATH)/edksetup.sh; \ + build -p UefiPayloadPkg/UefiPayloadPkg.dsc -b $(RELEASE_STR) -a IA32 -a X64 \ + -m UefiPayloadPkg/ShimLayer/ShimLayer.inf \ + -t COREBOOT -D BOOTLOADER=COREBOOT -D SHIMLAYER=TRUE \ + -y $(WORKSPACE)/Build/UefiPayloadPkgX64/ShimLayer.txt + UefiPayloadPkg: $(WORKSPACE)/Build/UefiPayloadPkgX64/$(RELEASE_STR)_COREBOOT/FV/UEFIPAYLOAD.fd mv $(WORKSPACE)/Build/UefiPayloadPkgX64/$(RELEASE_STR)_COREBOOT/FV/UEFIPAYLOAD.fd \ ../../../build/UEFIPAYLOAD.fd -- cgit v1.2.3