payloads/edk2: Add support for passing VBT/GOP driver to edk2
Add Kconfig for passing a VBT file and GOP driver to edk2, and pass a build param to use them along with the platform GOP driver. This allows edk2 to initialize the display and change display modes, instead of being limited to the single mode set by whatever display init method coreboot might use (libgfxinit, FSP/GOP, VBIOS, etc). TEST=build/boot multiple google boards spanning several platforms using the edk2 GOP driver for display init. Change-Id: I63a49df2411fe44b06eaee6d0fb9aab42ac8aedb Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77269 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sean Rhodes <sean@starlabs.systems>
This commit is contained in:
parent
3596a5ee67
commit
64262a6183
|
@ -189,6 +189,9 @@ $(obj)/UEFIPAYLOAD.fd: $(DOTCONFIG)
|
||||||
CONFIG_CPU_XTAL_HZ=$(CONFIG_CPU_XTAL_HZ) \
|
CONFIG_CPU_XTAL_HZ=$(CONFIG_CPU_XTAL_HZ) \
|
||||||
CONFIG_SMMSTORE_V2=$(CONFIG_SMMSTORE_V2) \
|
CONFIG_SMMSTORE_V2=$(CONFIG_SMMSTORE_V2) \
|
||||||
CONFIG_EDK2_SECURE_BOOT_SUPPORT=$(CONFIG_EDK2_SECURE_BOOT_SUPPORT) \
|
CONFIG_EDK2_SECURE_BOOT_SUPPORT=$(CONFIG_EDK2_SECURE_BOOT_SUPPORT) \
|
||||||
|
CONFIG_EDK2_GOP_DRIVER=$(CONFIG_EDK2_GOP_DRIVER) \
|
||||||
|
CONFIG_EDK2_GOP_FILE=$(CONFIG_EDK2_GOP_FILE) \
|
||||||
|
CONFIG_INTEL_GMA_VBT_FILE=$(CONFIG_INTEL_GMA_VBT_FILE) \
|
||||||
GCC_CC_x86_32=$(GCC_CC_x86_32) \
|
GCC_CC_x86_32=$(GCC_CC_x86_32) \
|
||||||
GCC_CC_x86_64=$(GCC_CC_x86_64) \
|
GCC_CC_x86_64=$(GCC_CC_x86_64) \
|
||||||
GCC_CC_arm=$(GCC_CC_arm) \
|
GCC_CC_arm=$(GCC_CC_arm) \
|
||||||
|
|
|
@ -262,6 +262,20 @@ config EDK2_SECURE_BOOT_SUPPORT
|
||||||
Select this option to enable UEFI SecureBoot support in edk2.
|
Select this option to enable UEFI SecureBoot support in edk2.
|
||||||
UEFI SecureBoot will be disabled by default and can be enabled from the menu option.
|
UEFI SecureBoot will be disabled by default and can be enabled from the menu option.
|
||||||
|
|
||||||
|
config EDK2_GOP_DRIVER
|
||||||
|
bool "Add a GOP driver to the Tianocore build"
|
||||||
|
depends on INTEL_GMA_ADD_VBT && NO_GFX_INIT && (EDK2_REPO_MRCHROMEBOX || EDK2_REPO_CUSTOM)
|
||||||
|
default y if INTEL_GMA_ADD_VBT && NO_GFX_INIT && EDK2_REPO_MRCHROMEBOX
|
||||||
|
help
|
||||||
|
Select this option to have edk2 use an external GOP driver for display init.
|
||||||
|
|
||||||
|
config EDK2_GOP_FILE
|
||||||
|
string "GOP driver file"
|
||||||
|
depends on EDK2_GOP_DRIVER
|
||||||
|
default "IntelGopDriver.efi"
|
||||||
|
help
|
||||||
|
The name of the GOP driver file passed to edk2.
|
||||||
|
|
||||||
config EDK2_CUSTOM_BUILD_PARAMS
|
config EDK2_CUSTOM_BUILD_PARAMS
|
||||||
string "edk2 additional custom build parameters"
|
string "edk2 additional custom build parameters"
|
||||||
default "-D VARIABLE_SUPPORT=SMMSTORE" if EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2
|
default "-D VARIABLE_SUPPORT=SMMSTORE" if EDK2_REPO_MRCHROMEBOX && SMMSTORE_V2
|
||||||
|
|
|
@ -119,6 +119,10 @@ endif
|
||||||
ifeq ($(CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS), y)
|
ifeq ($(CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS), y)
|
||||||
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport=TRUE
|
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport=TRUE
|
||||||
endif
|
endif
|
||||||
|
# GOP_DRIVER = FALSE
|
||||||
|
ifeq ($(CONFIG_EDK2_GOP_DRIVER), y)
|
||||||
|
BUILD_STR += -D USE_PLATFORM_GOP=TRUE
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# EDKII has the below PCDs that are relevant to coreboot:
|
# EDKII has the below PCDs that are relevant to coreboot:
|
||||||
|
@ -191,6 +195,13 @@ logo: $(EDK2_PATH)
|
||||||
BMP3:$(EDK2_PATH)/MdeModulePkg/Logo/Logo.bmp;; \
|
BMP3:$(EDK2_PATH)/MdeModulePkg/Logo/Logo.bmp;; \
|
||||||
esac \
|
esac \
|
||||||
|
|
||||||
|
gop_driver:
|
||||||
|
if [ -n "$(CONFIG_EDK2_GOP_DRIVER)" ]; then \
|
||||||
|
echo "Using GOP driver $(CONFIG_EDK2_GOP_FILE)"; \
|
||||||
|
cp $(top)/$(CONFIG_EDK2_GOP_FILE) $(EDK2_PATH)/UefiPayloadPkg/IntelGopDriver.efi; \
|
||||||
|
cp $(top)/$(CONFIG_INTEL_GMA_VBT_FILE) $(EDK2_PATH)/UefiPayloadPkg/vbt.bin; \
|
||||||
|
fi; \
|
||||||
|
|
||||||
checktools:
|
checktools:
|
||||||
echo -n "EDK2: Checking uuid-dev:"
|
echo -n "EDK2: Checking uuid-dev:"
|
||||||
echo "#include <uuid/uuid.h>" > libtest.c
|
echo "#include <uuid/uuid.h>" > libtest.c
|
||||||
|
@ -228,7 +239,7 @@ print:
|
||||||
-e 's/s /Build: Silent/' \
|
-e 's/s /Build: Silent/' \
|
||||||
-e 's/t /Toolchain: /'
|
-e 's/t /Toolchain: /'
|
||||||
|
|
||||||
prep: $(EDK2_PATH) $(EDK2_PLATFORMS_PATH) clean checktools logo
|
prep: $(EDK2_PATH) $(EDK2_PLATFORMS_PATH) clean checktools logo gop_driver
|
||||||
cd $(WORKSPACE); \
|
cd $(WORKSPACE); \
|
||||||
source $(EDK2_PATH)/edksetup.sh; \
|
source $(EDK2_PATH)/edksetup.sh; \
|
||||||
unset CC; $(MAKE) -C $(EDK2_PATH)/BaseTools 2>&1; \
|
unset CC; $(MAKE) -C $(EDK2_PATH)/BaseTools 2>&1; \
|
||||||
|
|
Loading…
Reference in New Issue