From 8da40efea393d576aa78d6b24b6155539b66bcae Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Sun, 17 Jul 2022 20:51:16 +0100 Subject: payloads/edk2: Add an option to use EDK2 Universal Payload This add's an option to use EDK2's Universal Payload instead of the standard UefiPayloadPkg. Universal Payload requires a ShimLayer, to build the required HOBs and pass them to Universal Payload. The ShimLayer is built to encompass UniveralPayload, so only one ELF binary is added to coreboot. Universal Payload is based on Intel's USF specification: https://universalscalablefirmware.github.io/documentation/ This has been added with the repository pointing to https://github.com/starlabsltd. The required ShimLayer patches will be merged into edk2 master once corresponding coreboot patches are merged. This is because the EDK2 engineers believe it is an impossible task to patch coreboot to build and use Universal Payload. Signed-off-by: Sean Rhodes Change-Id: I17cc86d5eac0d5d91551ba5bea73fbc07ebdf0d3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65934 Reviewed-by: Stefan Reinauer Tested-by: build bot (Jenkins) --- payloads/external/edk2/Kconfig | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'payloads/external/edk2') diff --git a/payloads/external/edk2/Kconfig b/payloads/external/edk2/Kconfig index 6dca09730b..1057c43cc0 100644 --- a/payloads/external/edk2/Kconfig +++ b/payloads/external/edk2/Kconfig @@ -3,15 +3,42 @@ if PAYLOAD_EDK2 config PAYLOAD_FILE string "edk2 binary" default "$(obj)/UEFIPAYLOAD.fd" if EDK2_UEFIPAYLOAD + default "$(obj)/ShimmedUniversalPayload.elf" if EDK2_UNIVERSAL_PAYLOAD help The result of a UefiPayloadPkg build +choice + prompt "EDK II build type" + default EDK2_UEFIPAYLOAD + help + Select the build type for edk2. UniversalPayload is recommended, as it is + replacing UefiPayloadPkg. Whilst in the transition phase between the two, + both options exist. + config EDK2_UEFIPAYLOAD bool "Build UefiPayloadPkg" - default y help Build the standard UefiPayloadPkg +config EDK2_UNIVERSAL_PAYLOAD + bool "Build Universal Payload" + help + Select this option if you want to build a coreboot image + with EDK2s Universal Payload. If you don't know what this is + about, just leave it enabled. + + Universal Payload should ideally only be built from upstream EDK2, + https://github.com/tianocore/edk2, as this is regularly build tested + and it encourages patches to be merged upstream. + + Whilst the required patches are being merged, this is pointed to + Star Labs GitHub repository which contains these patches and is based + on a known working commit. + + See https://universalscalablefirmware.github.io/documentation/ for more information. + +endchoice + choice prompt "Tianocore's EDK II payload" default EDK2_REPO_MRCHROMEBOX @@ -44,6 +71,7 @@ endchoice config EDK2_REPOSITORY string "URL to git repository for edk2" + default "https://github.com/starlabsltd/edk2" if EDK2_UNIVERSAL_PAYLOAD default "https://github.com/mrchromebox/edk2" if EDK2_REPO_MRCHROMEBOX default "https://github.com/tianocore/edk2" if EDK2_REPO_OFFICIAL default "" if EDK2_REPO_CUSTOM @@ -54,6 +82,7 @@ config EDK2_REPOSITORY config EDK2_TAG_OR_REV string "Insert a commit's SHA-1 or a branch name" default "origin/uefipayload_202304" if EDK2_REPO_MRCHROMEBOX + default "origin/universalpayload" if EDK2_UNIVERSAL_PAYLOAD default "origin/master" if EDK2_REPO_OFFICIAL default "" if EDK2_REPO_CUSTOM help -- cgit v1.2.3