diff options
Diffstat (limited to 'payloads')
-rw-r--r-- | payloads/external/Makefile.inc | 2 | ||||
-rw-r--r-- | payloads/external/tianocore/Kconfig | 18 | ||||
-rw-r--r-- | payloads/external/tianocore/Makefile | 17 |
3 files changed, 36 insertions, 1 deletions
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc index 113dfbea4d..b8c2d570d0 100644 --- a/payloads/external/Makefile.inc +++ b/payloads/external/Makefile.inc @@ -150,6 +150,8 @@ payloads/external/tianocore/tianocore/Build/UEFIPAYLOAD.fd tianocore: $(DOTCONFI CONFIG_TIANOCORE_ABOVE_4G_MEMORY=$(CONFIG_TIANOCORE_ABOVE_4G_MEMORY) \ CONFIG_TIANOCORE_BOOT_TIMEOUT=$(CONFIG_TIANOCORE_BOOT_TIMEOUT) \ CONFIG_TIANOCORE_CBMEM_LOGGING=$(CONFIG_TIANOCORE_CBMEM_LOGGING) \ + CONFIG_TIANOCORE_COREBOOTPAYLOAD=$(CONFIG_TIANOCORE_COREBOOTPAYLOAD) \ + CONFIG_TIANOCORE_USE_8254_TIMER=$(CONFIG_TIANOCORE_USE_8254_TIMER) \ GCC_CC_x86_32=$(GCC_CC_x86_32) \ GCC_CC_x86_64=$(GCC_CC_x86_64) \ GCC_CC_arm=$(GCC_CC_arm) \ diff --git a/payloads/external/tianocore/Kconfig b/payloads/external/tianocore/Kconfig index a3c9981294..b7069aaddd 100644 --- a/payloads/external/tianocore/Kconfig +++ b/payloads/external/tianocore/Kconfig @@ -14,6 +14,9 @@ choice UefiPayload: MrChromebox's customized fork of Tianocore which works on most x86_64 devices Upstream: Use upstream Tianocore payload from https://github.com/tianocore/edk2 + CorebootPayload: MrChromebox's customized fork of the deprecated CorebootPayloadPkg + Tianocore build target. It may work better on some older hardware (eg, x230) + which does not work properly with the UefiPayloadPkg options. config TIANOCORE_UEFIPAYLOAD bool "UEFIPayload" @@ -26,6 +29,12 @@ config TIANOCORE_UPSTREAM help Select this option if you want to use upstream EDK2 to build Tianocore. +config TIANOCORE_COREBOOTPAYLOAD + bool "CorebootPayload" + help + Select this option to build using MrChromebox's older (now deprecated) + CorebootPayloadPkg-based Tianocore branch + endchoice config TIANOCORE_REVISION_ID @@ -105,6 +114,15 @@ config TIANOCORE_ABOVE_4G_MEMORY endif +if TIANOCORE_COREBOOTPAYLOAD + +config TIANOCORE_USE_8254_TIMER + bool "TianoCore 8254 Timer" + help + Use 8254 Timer for legacy support. + +endif + config TIANOCORE_BOOT_TIMEOUT int default 2 diff --git a/payloads/external/tianocore/Makefile b/payloads/external/tianocore/Makefile index 4fda8b805b..0c5fdb3a52 100644 --- a/payloads/external/tianocore/Makefile +++ b/payloads/external/tianocore/Makefile @@ -11,6 +11,13 @@ upstream_git_repo=https://github.com/tianocore/edk2 build_flavor=-D BOOTLOADER=COREBOOT -D PCIE_BASE=$(CONFIG_MMCONF_BASE_ADDRESS) -DPS2_KEYBOARD_ENABLE +ifeq ($(CONFIG_TIANOCORE_COREBOOTPAYLOAD),y) +project_git_branch=coreboot_fb +bootloader=CorebootPayloadPkg +else +bootloader=UefiPayloadPkg +endif + ifeq ($(CONFIG_TIANOCORE_UPSTREAM),y) TAG=upstream/master else @@ -41,7 +48,15 @@ endif TIMEOUT=-D PLATFORM_BOOT_TIMEOUT=$(CONFIG_TIANOCORE_BOOT_TIMEOUT) +ifneq ($(CONFIG_TIANOCORE_USE_8254_TIMER), y) +TIMER=-DUSE_HPET_TIMER +endif + +ifeq ($(CONFIG_TIANOCORE_COREBOOTPAYLOAD),y) +BUILD_STR=-q -a IA32 -a X64 -p CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc -t COREBOOT -b $(BUILD_TYPE) $(TIMER) -DPS2_KEYBOARD_ENABLE +else BUILD_STR=-q -a IA32 -a X64 -p UefiPayloadPkg/UefiPayloadPkg.dsc -t COREBOOT -b $(BUILD_TYPE) $(TIMEOUT) $(build_flavor) $(CBMEM) $(4G) +endif all: clean build @@ -99,7 +114,7 @@ build: update checktools cat ../tools_def.txt >> $(project_dir)/Conf/tools_def.txt; \ fi; \ build $(BUILD_STR); \ - mv $(project_dir)/Build/UefiPayloadPkg*/*/FV/UEFIPAYLOAD.fd $(project_dir)/Build/UEFIPAYLOAD.fd; \ + mv $(project_dir)/Build/$(bootloader)*/*/FV/UEFIPAYLOAD.fd $(project_dir)/Build/UEFIPAYLOAD.fd; \ git checkout MdeModulePkg/Logo/Logo.bmp > /dev/null 2>&1 || true clean: |