diff options
author | Sean Rhodes <sean@starlabs.systems> | 2022-05-18 23:00:57 +0100 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2022-10-12 16:52:58 +0000 |
commit | ba672761771622533511f2b2784aad6af6bfc8fe (patch) | |
tree | 0df3f53e60e5dffb13c642855016545344831d4b | |
parent | c60f3b2ced3a0a5fccd5a8b7a765fc723856d58b (diff) |
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 <sean@starlabs.systems>
Change-Id: I043271994f40813d9059a89420d4311d9d5802b1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64485
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
-rw-r--r-- | payloads/external/edk2/Makefile | 15 |
1 files changed, 15 insertions, 0 deletions
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 |