diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2021-10-28 16:46:17 -0500 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2021-11-01 16:36:03 +0000 |
commit | 67258983e6ffb2de02617784dafe37584fd4c089 (patch) | |
tree | 7abac803056d159c2d4de23224a42ae98d8edab0 /payloads | |
parent | f32eed1695da64e1fb5d694ed4d038a58e94440c (diff) |
payloads/Tianocore: re-add CorebootPayload build option
Some older devices, like the x230 Thinkpad, do not boot with the
newer Tianocore UefiPayloadPkg build target, and cannot easily be
debugged without serial UART output. As a stopgap solution, re-add
the older (now deprecated/removed) CorebootPayloadPkg build target.
This partially reverts commit d3b49b4c,
"payloads/Tianocore: Update default build target, simplify build options"
Change-Id: I81490c277626fc69d95920868d80cb24c0763de4
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58710
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
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: |