payloads/tianocore: Enable UEFIPayload
corebootpayload package in upstream TianoCore was replaced with UEFIPayload, add external payload build option for UEFIPayload. BUG=N/A TEST=Select TianoCore payload as UEFIPayload, build and able to boot up on QEMU q35 after PCIE_BASE set. Change-Id: I0b7785fde9f4113b2cd91323ac0358b229c5a6e6 Signed-off-by: Lijian Zhao <lijian.zhao@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34459 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
44348185d9
commit
16562cb859
|
@ -128,14 +128,14 @@ payloads/external/tianocore/tianocore/Build/UEFIPAYLOAD.fd tianocore: $(DOTCONFI
|
||||||
$(MAKE) -C payloads/external/tianocore all \
|
$(MAKE) -C payloads/external/tianocore all \
|
||||||
HOSTCC="$(HOSTCC)" \
|
HOSTCC="$(HOSTCC)" \
|
||||||
CC="$(HOSTCC)" \
|
CC="$(HOSTCC)" \
|
||||||
CONFIG_TIANOCORE_MASTER=$(CONFIG_TIANOCORE_MASTER) \
|
|
||||||
CONFIG_TIANOCORE_STABLE=$(CONFIG_TIANOCORE_STABLE) \
|
|
||||||
CONFIG_TIANOCORE_REVISION=$(CONFIG_TIANOCORE_REVISION) \
|
|
||||||
CONFIG_TIANOCORE_REVISION_ID=$(CONFIG_TIANOCORE_REVISION_ID) \
|
CONFIG_TIANOCORE_REVISION_ID=$(CONFIG_TIANOCORE_REVISION_ID) \
|
||||||
CONFIG_TIANOCORE_DEBUG=$(CONFIG_TIANOCORE_DEBUG) \
|
CONFIG_TIANOCORE_DEBUG=$(CONFIG_TIANOCORE_DEBUG) \
|
||||||
CONFIG_TIANOCORE_TARGET_IA32=$(CONFIG_TIANOCORE_TARGET_IA32) \
|
CONFIG_TIANOCORE_TARGET_IA32=$(CONFIG_TIANOCORE_TARGET_IA32) \
|
||||||
CONFIG_TIANOCORE_USE_8254_TIMER=$(CONFIG_TIANOCORE_USE_8254_TIMER) \
|
CONFIG_TIANOCORE_USE_8254_TIMER=$(CONFIG_TIANOCORE_USE_8254_TIMER) \
|
||||||
CONFIG_TIANOCORE_BOOTSPLASH_FILE=$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
|
CONFIG_TIANOCORE_BOOTSPLASH_FILE=$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
|
||||||
|
CONFIG_TIANOCORE_UEFIPAYLOAD=$(CONFIG_TIANOCORE_UEFIPAYLOAD) \
|
||||||
|
CONFIG_TIANOCORE_COREBOOTPAYLOAD=$(CONFIG_TIANOCORE_COREBOOTPAYLOAD) \
|
||||||
|
CONFIG_MMCONF_BASE_ADDRESS=$(CONFIG_MMCONF_BASE_ADDRESS) \
|
||||||
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) \
|
||||||
|
|
|
@ -7,38 +7,32 @@ config PAYLOAD_FILE
|
||||||
The result of a corebootPkg build
|
The result of a corebootPkg build
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Tianocore version"
|
prompt "Tianocore payload"
|
||||||
default TIANOCORE_STABLE
|
default TIANOCORE_COREBOOTPAYLOAD
|
||||||
help
|
help
|
||||||
Select which version of Tianocore to build (default is to build stable)
|
Select which type of payload Tianocore will build (default is CorebootPayload)
|
||||||
stable: MrChromebox's customized version of Tianocore which works on most
|
CorebootPayload: MrChromebox's customized version of Tianocore which works on most
|
||||||
(all?) x86_64 devices
|
(all?) x86_64 devices
|
||||||
revision: use specific commit or branch to build Tianocore (specified by user)
|
UEFIPayload: Use upstream Tianocore payload from https://github.com/tianocore/edk2
|
||||||
|
|
||||||
config TIANOCORE_STABLE
|
config TIANOCORE_COREBOOTPAYLOAD
|
||||||
bool "stable"
|
bool "CorebootPayload"
|
||||||
help
|
help
|
||||||
Select this option to build using MrChromebox's custom Tianocore tree
|
Select this option to build using MrChromebox's custom Tianocore tree
|
||||||
i.e. a version of Tianocore that builds without any errors and just works.
|
i.e. a version of Tianocore that builds without any errors and just works.
|
||||||
|
|
||||||
config TIANOCORE_REVISION
|
config TIANOCORE_UEFIPAYLOAD
|
||||||
bool "git revision"
|
bool "UEFIPayload"
|
||||||
help
|
help
|
||||||
Select this option if you have a specific commit or branch
|
Select this option if you want to use upstream EDK2 to build Tianocore.
|
||||||
that you want to use from either MrChromebox's tree or upstream
|
|
||||||
EDK2 from which to build Tianocore.
|
|
||||||
|
|
||||||
You will be able to specify the name of a branch or a commit id
|
|
||||||
later.
|
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config TIANOCORE_REVISION_ID
|
config TIANOCORE_REVISION_ID
|
||||||
string "Insert a commit's SHA-1 or a branch name"
|
string "Insert a commit's SHA-1 or a branch name"
|
||||||
depends on TIANOCORE_REVISION
|
|
||||||
default "upstream/master"
|
|
||||||
help
|
help
|
||||||
The commit's SHA-1 or branch name of the revision to use.
|
The commit's SHA-1 or branch name of the revision to use. Choose "upstream/master"
|
||||||
|
for master branch of Tianocore release on github.
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Target architecture"
|
prompt "Target architecture"
|
||||||
|
@ -89,7 +83,7 @@ config TIANOCORE_USE_8254_TIMER
|
||||||
|
|
||||||
config TIANOCORE_BOOTSPLASH_IMAGE
|
config TIANOCORE_BOOTSPLASH_IMAGE
|
||||||
bool "Use a custom bootsplash image"
|
bool "Use a custom bootsplash image"
|
||||||
depends on TIANOCORE_STABLE
|
depends on TIANOCORE_COREBOOTPAYLOAD
|
||||||
help
|
help
|
||||||
Select this option if you have a bootsplash image that you would
|
Select this option if you have a bootsplash image that you would
|
||||||
like to be used. If this option is not selected, the default
|
like to be used. If this option is not selected, the default
|
||||||
|
@ -98,6 +92,7 @@ config TIANOCORE_BOOTSPLASH_IMAGE
|
||||||
config TIANOCORE_BOOTSPLASH_FILE
|
config TIANOCORE_BOOTSPLASH_FILE
|
||||||
string "Tianocore Bootsplash path and filename"
|
string "Tianocore Bootsplash path and filename"
|
||||||
depends on TIANOCORE_BOOTSPLASH_IMAGE
|
depends on TIANOCORE_BOOTSPLASH_IMAGE
|
||||||
|
depends on TIANOCORE_COREBOOTPAYLOAD
|
||||||
default "bootsplash.bmp"
|
default "bootsplash.bmp"
|
||||||
help
|
help
|
||||||
The path and filename of the file to use as graphical bootsplash
|
The path and filename of the file to use as graphical bootsplash
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
config PAYLOAD_TIANOCORE
|
config PAYLOAD_TIANOCORE
|
||||||
bool "Tianocore coreboot payload package"
|
bool "Tianocore payload"
|
||||||
depends on ARCH_X86
|
depends on ARCH_X86
|
||||||
help
|
help
|
||||||
Select this option if you want to build a coreboot image
|
Select this option if you want to build a coreboot image
|
||||||
|
|
|
@ -22,9 +22,19 @@ project_git_repo=https://github.com/mrchromebox/edk2
|
||||||
project_git_branch=coreboot_fb
|
project_git_branch=coreboot_fb
|
||||||
upstream_git_repo=https://github.com/tianocore/edk2
|
upstream_git_repo=https://github.com/tianocore/edk2
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_TIANOCORE_UEFIPAYLOAD),y)
|
||||||
|
bootloader=UefiPayloadPkg
|
||||||
|
build_flavor=-D BOOTLOADER=COREBOOT -D PCIE_BASE=$(CONFIG_MMCONF_BASE_ADDRESS)
|
||||||
|
TAG=upstream/master
|
||||||
|
else
|
||||||
|
bootloader=CorebootPayloadPkg
|
||||||
# STABLE revision is MrChromebox's coreboot framebuffer (coreboot_fb) branch
|
# STABLE revision is MrChromebox's coreboot framebuffer (coreboot_fb) branch
|
||||||
TAG-$(CONFIG_TIANOCORE_STABLE)=origin/$(project_git_branch)
|
TAG=origin/$(project_git_branch)
|
||||||
TAG-$(CONFIG_TIANOCORE_REVISION)=$(CONFIG_TIANOCORE_REVISION_ID)
|
endif
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_TIANOCORE_REVISION_ID),)
|
||||||
|
TAG=$(CONFIG_TIANOCORE_REVISION_ID)
|
||||||
|
endif
|
||||||
|
|
||||||
export EDK_TOOLS_PATH=$(project_dir)/BaseTools
|
export EDK_TOOLS_PATH=$(project_dir)/BaseTools
|
||||||
|
|
||||||
|
@ -39,9 +49,9 @@ TIMER=-DUSE_HPET_TIMER
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_TIANOCORE_TARGET_IA32), y)
|
ifeq ($(CONFIG_TIANOCORE_TARGET_IA32), y)
|
||||||
BUILD_STR=-a IA32 -t COREBOOT -p CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc -b $(BUILD_TYPE) $(TIMER)
|
BUILD_STR=-a IA32 -t COREBOOT -p $(bootloader)/$(bootloader)Ia32.dsc -b $(BUILD_TYPE) $(TIMER) $(build_flavor)
|
||||||
else
|
else
|
||||||
BUILD_STR=-a IA32 -a X64 -t COREBOOT -p CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc -b $(BUILD_TYPE) $(TIMER)
|
BUILD_STR=-a IA32 -a X64 -t COREBOOT -p $(bootloader)/$(bootloader)Ia32X64.dsc -b $(BUILD_TYPE) $(TIMER) $(build_flavor)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: clean build
|
all: clean build
|
||||||
|
@ -56,13 +66,13 @@ update: $(project_dir)
|
||||||
cd $(project_dir); \
|
cd $(project_dir); \
|
||||||
echo " Fetching new commits from the $(project_name) repo"; \
|
echo " Fetching new commits from the $(project_name) repo"; \
|
||||||
git fetch --multiple origin upstream 2>/dev/null; \
|
git fetch --multiple origin upstream 2>/dev/null; \
|
||||||
if ! git rev-parse --verify -q $(TAG-y) >/dev/null; then \
|
if ! git rev-parse --verify -q $(TAG) >/dev/null; then \
|
||||||
echo " $(TAG-y) is not a valid git reference"; \
|
echo " $(TAG) is not a valid git reference"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
if git describe --all --dirty | grep -qv dirty; then \
|
if git describe --all --dirty | grep -qv dirty; then \
|
||||||
echo " Checking out $(project_name) revision $(TAG-y)"; \
|
echo " Checking out $(project_name) revision $(TAG)"; \
|
||||||
git checkout --detach $(TAG-y); \
|
git checkout --detach $(TAG); \
|
||||||
else \
|
else \
|
||||||
echo " Working directory not clean; will not overwrite"; \
|
echo " Working directory not clean; will not overwrite"; \
|
||||||
fi
|
fi
|
||||||
|
@ -80,7 +90,7 @@ checktools:
|
||||||
|
|
||||||
build: update checktools
|
build: update checktools
|
||||||
unset CC; $(MAKE) -C $(project_dir)/BaseTools
|
unset CC; $(MAKE) -C $(project_dir)/BaseTools
|
||||||
echo " build $(project_name) $(TAG-y)"
|
echo " build $(project_name) $(TAG)"
|
||||||
if [ -n $(CONFIG_TIANOCORE_BOOTSPLASH_FILE) ]; then \
|
if [ -n $(CONFIG_TIANOCORE_BOOTSPLASH_FILE) ]; then \
|
||||||
echo " Copying custom bootsplash image"; \
|
echo " Copying custom bootsplash image"; \
|
||||||
case "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" in \
|
case "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" in \
|
||||||
|
@ -99,7 +109,7 @@ build: update checktools
|
||||||
cat ../tools_def.txt >> $(project_dir)/Conf/tools_def.txt; \
|
cat ../tools_def.txt >> $(project_dir)/Conf/tools_def.txt; \
|
||||||
fi; \
|
fi; \
|
||||||
build $(BUILD_STR); \
|
build $(BUILD_STR); \
|
||||||
mv $(project_dir)/Build/CorebootPayloadPkg*/*/FV/UEFIPAYLOAD.fd $(project_dir)/Build/UEFIPAYLOAD.fd; \
|
mv $(project_dir)/Build/$(bootloader)*/*/FV/UEFIPAYLOAD.fd $(project_dir)/Build/UEFIPAYLOAD.fd; \
|
||||||
git checkout CorebootPayloadPkg/Logo/Logo.bmp > /dev/null 2>&1 || true
|
git checkout CorebootPayloadPkg/Logo/Logo.bmp > /dev/null 2>&1 || true
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
Loading…
Reference in New Issue