summaryrefslogtreecommitdiff
path: root/payloads/external/tianocore/Makefile
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2021-10-28 16:46:17 -0500
committerMartin Roth <martinroth@google.com>2021-11-01 16:36:03 +0000
commit67258983e6ffb2de02617784dafe37584fd4c089 (patch)
tree7abac803056d159c2d4de23224a42ae98d8edab0 /payloads/external/tianocore/Makefile
parentf32eed1695da64e1fb5d694ed4d038a58e94440c (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/external/tianocore/Makefile')
-rw-r--r--payloads/external/tianocore/Makefile17
1 files changed, 16 insertions, 1 deletions
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: