payloads: Replace GPL boilerplate with SPDX headers
Used commands:
perl -i -p0e 's|\/\*[\s*]*.*is free software[:;][\s*]*you[\s*]*can[\s*]*redistribute[\s*]*it[\s*]*and\/or[\s*]*modify[\s*]*it[\s*]*under[\s*]*the[\s*]*terms[\s*]*of[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*as[\s*]*published[\s*]*by[\s*]*the[\s*]*Free[\s*]*Software[\s*]*Foundation[;,][\s*]*version[\s*]*2[\s*]*of[\s*]*the[\s*]*License.[\s*]*This[\s*]*program[\s*]*is[\s*]*distributed[\s*]*in[\s*]*the[\s*]*hope[\s*]*that[\s*]*it[\s*]*will[\s*]*be[\s*]*useful,[\s*]*but[\s*]*WITHOUT[\s*]*ANY[\s*]*WARRANTY;[\s*]*without[\s*]*even[\s*]*the[\s*]*implied[\s*]*warranty[\s*]*of[\s*]*MERCHANTABILITY[\s*]*or[\s*]*FITNESS[\s*]*FOR[\s*]*A[\s*]*PARTICULAR[\s*]*PURPOSE.[\s*]*See[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*for[\s*]*more[\s*]*details.[\s*]*\*\/|/* SPDX-License-Identifier: GPL-2.0-only */|' $(cat filelist)
perl -i -p0e 's|\/\*[\s*]*.*is[\s*]*free[\s*]*software[:;][\s*]*you[\s*]*can[\s*]*redistribute[\s*]*it[\s*]*and/or[\s*]*modify[\s*]*it[\s*]*under[\s*]*the[\s*]*terms[\s*]*of[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*as[\s*]*published[\s*]*by[\s*]*the[\s*]*Free[\s*]*Software[\s*]*Foundation[;,][\s*]*either[\s*]*version[\s*]*2[\s*]*of[\s*]*the[\s*]*License,[\s*]*or[\s*]*.at[\s*]*your[\s*]*option.*[\s*]*any[\s*]*later[\s*]*version.[\s*]*This[\s*]*program[\s*]*is[\s*]*distributed[\s*]*in[\s*]*the[\s*]*hope[\s*]*that[\s*]*it[\s*]*will[\s*]*be[\s*]*useful,[\s*]*but[\s*]*WITHOUT[\s*]*ANY[\s*]*WARRANTY;[\s*]*without[\s*]*even[\s*]*the[\s*]*implied[\s*]*warranty[\s*]*of[\s*]*MERCHANTABILITY[\s*]*or[\s*]*FITNESS[\s*]*FOR[\s*]*A[\s*]*PARTICULAR[\s*]*PURPOSE.[\s*]*See[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*for[\s*]*more[\s*]*details.[\s*]*\*\/|/* SPDX-License-Identifier: GPL-2.0-or-later */|' $(cat filelist)
perl -i -p0e 's|\/\*[\s*]*.*is[\s*#]*free[\s*#]*software[;:,][\s*#]*you[\s*#]*can[\s*#]*redistribute[\s*#]*it[\s*#]*and/or[\s*#]*modify[\s*#]*it[\s*#]*under[\s*#]*the[\s*#]*terms[\s*#]*of[\s*#]*the[\s*#]*GNU[\s*#]*General[\s*#]*Public[\s*#]*License[\s*#]*as[\s*#]*published[\s*#]*by[\s*#]*the[\s*#]*Free[\s*#]*Software[\s*#]*Foundation[;:,][\s*#]*either[\s*#]*version[\s*#]*3[\s*#]*of[\s*#]*the[\s*#]*License[;:,][\s*#]*or[\s*#]*.at[\s*#]*your[\s*#]*option.*[\s*#]*any[\s*#]*later[\s*#]*version.[\s*#]*This[\s*#]*program[\s*#]*is[\s*#]*distributed[\s*#]*in[\s*#]*the[\s*#]*hope[\s*#]*that[\s*#]*it[\s*#]*will[\s*#]*be[\s*#]*useful[;:,][\s*#]*but[\s*#]*WITHOUT[\s*#]*ANY[\s*#]*WARRANTY[;:,][\s*#]*without[\s*#]*even[\s*#]*the[\s*#]*implied[\s*#]*warranty[\s*#]*of[\s*#]*MERCHANTABILITY[\s*#]*or[\s*#]*FITNESS[\s*#]*FOR[\s*#]*A[\s*#]*PARTICULAR[\s*#]*PURPOSE.[\s*#]*See[\s*#]*the[\s*#]*GNU[\s*#]*General[\s*#]*Public[\s*#]*License[\s*#]*for[\s*#]*more[\s*#]*details.[\s*]*\*\/|/* SPDX-License-Identifier: GPL-3.0-or-later */|' $(cat filelist)
perl -i -p0e 's|(\#\#*)[\w]*.*is free software[:;][\#\s]*you[\#\s]*can[\#\s]*redistribute[\#\s]*it[\#\s]*and\/or[\#\s]*modify[\#\s]*it[\s\#]*under[\s \#]*the[\s\#]*terms[\s\#]*of[\s\#]*the[\s\#]*GNU[\s\#]*General[\s\#]*Public[\s\#]*License[\s\#]*as[\s\#]*published[\s\#]*by[\s\#]*the[\s\#]*Free[\s\#]*Software[\s\#]*Foundation[;,][\s\#]*version[\s\#]*2[\s\#]*of[\s\#]*the[\s\#]*License.*[\s\#]*This[\s\#]*program[\s\#]*is[\s\#]*distributed[\s\#]*in[\s\#]*the[\s\#]*hope[\s\#]*that[\s\#]*it[\s\#]*will[\#\s]*be[\#\s]*useful,[\#\s]*but[\#\s]*WITHOUT[\#\s]*ANY[\#\s]*WARRANTY;[\#\s]*without[\#\s]*even[\#\s]*the[\#\s]*implied[\#\s]*warranty[\#\s]*of[\#\s]*MERCHANTABILITY[\#\s]*or[\#\s]*FITNESS[\#\s]*FOR[\#\s]*A[\#\s]*PARTICULAR[\#\s]*PURPOSE.[\#\s]*See[\#\s]*the[\#\s]*GNU[\#\s]*General[\#\s]*Public[\#\s]*License[\#\s]*for[\#\s]*more[\#\s]*details.\s(#* *\n)*|\1 SPDX-License-Identifier: GPL-2.0-only\n\n|' $(cat filelist)
perl -i -p0e 's|(\#\#*)[\w*]*.*is free software[:;][\s*]*you[\s*]*can[\s*]*redistribute[\s*]*it[\s*]*and\/or[\s*]*modify[\s*]*it[\s*]*under[\s*]*the[\s*]*terms[\s*]*of[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*as[\s*]*published[\s*]*by[\s*]*the[\s*]*Free[\s*]*Software[\s*]*Foundation[;,][\s*]*version[\s*]*2[\s*]*of[\s*]*the[\s*]*License.[\s*]*This[\s*]*program[\s*]*is[\s*]*distributed[\s*]*in[\s*]*the[\s*]*hope[\s*]*that[\s*]*it[\s*]*will[\s*]*be[\s*]*useful,[\s*]*but[\s*]*WITHOUT[\s*]*ANY[\s*]*WARRANTY;[\s*]*without[\s*]*even[\s*]*the[\s*]*implied[\s*]*warranty[\s*]*of[\s*]*MERCHANTABILITY[\s*]*or[\s*]*FITNESS[\s*]*FOR[\s*]*A[\s*]*PARTICULAR[\s*]*PURPOSE.[\s*]*See[\s*]*the[\s*]*GNU[\s*]*General[\s*]*Public[\s*]*License[\s*]*for[\s*]*more[\s*]*details.\s(#* *\n)*|\1 SPDX-License-Identifier: GPL-2.0-only\n\n|' $(cat filelist)
Change-Id: I9f74ed19257bc4234465b8f912deff1b485173f9
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41179
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-08 22:50:46 +02:00
|
|
|
## SPDX-License-Identifier: GPL-2.0-only
|
2016-06-03 00:42:29 +02:00
|
|
|
|
|
|
|
# force the shell to bash - the edksetup.sh script doesn't work with dash
|
|
|
|
export SHELL := env bash
|
|
|
|
|
2022-07-13 11:11:44 +02:00
|
|
|
project_name = edk2
|
2022-08-02 09:54:12 +02:00
|
|
|
export WORKSPACE := $(CURDIR)/workspace
|
|
|
|
export EDK2_PATH := $(WORKSPACE)/$(word 3,$(subst /, ,$(CONFIG_EDK2_REPOSITORY)))
|
|
|
|
export PACKAGES_PATH := $(EDK2_PATH)
|
2021-05-10 18:02:13 +02:00
|
|
|
|
2022-08-02 11:00:56 +02:00
|
|
|
BUILD_STR = -p UefiPayloadPkg/UefiPayloadPkg.dsc
|
|
|
|
BUILD_STR += -t COREBOOT
|
|
|
|
BUILD_STR += -D BOOTLOADER=COREBOOT
|
|
|
|
BUILD_STR += -q -s
|
2022-02-04 08:41:16 +01:00
|
|
|
|
|
|
|
#
|
|
|
|
# EDK II has the following build options relevant to coreboot:
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# OPTION = DEFAULT_VALUE
|
|
|
|
#
|
|
|
|
# ABOVE_4G_MEMORY = TRUE
|
2022-07-13 11:11:44 +02:00
|
|
|
ifneq ($(CONFIG_EDK2_ABOVE_4G_MEMORY),y)
|
2022-02-04 08:41:16 +01:00
|
|
|
BUILD_STR += -D ABOVE_4G_MEMORY=FALSE
|
2019-07-20 07:06:03 +02:00
|
|
|
endif
|
2022-02-04 08:41:16 +01:00
|
|
|
# BOOTSPLASH_IMAGE = FALSE
|
2022-07-13 11:11:44 +02:00
|
|
|
ifneq ($(CONFIG_EDK2_BOOTSPLASH_FILE),)
|
2022-02-04 08:41:16 +01:00
|
|
|
BUILD_STR += -D BOOTSPLASH_IMAGE=TRUE
|
2019-07-20 07:06:03 +02:00
|
|
|
endif
|
2022-02-09 09:25:39 +01:00
|
|
|
# BOOT_MANAGER_ESCAPE = FALSE
|
2022-07-13 11:11:44 +02:00
|
|
|
ifeq ($(CONFIG_EDK2_BOOT_MANAGER_ESCAPE),y)
|
2022-02-09 09:25:39 +01:00
|
|
|
BUILD_STR += -D BOOT_MANAGER_ESCAPE=TRUE
|
|
|
|
endif
|
2022-02-04 08:41:16 +01:00
|
|
|
# BUILD_TARGETS = DEBUG
|
2022-08-02 09:59:48 +02:00
|
|
|
ifeq ($(CONFIG_EDK2_DEBUG),y)
|
|
|
|
RELEASE_STR = DEBUG
|
|
|
|
else
|
|
|
|
RELEASE_STR = RELEASE
|
2016-06-03 00:42:29 +02:00
|
|
|
endif
|
2022-07-04 18:01:09 +02:00
|
|
|
# DISABLE_SERIAL_TERMINAL = FALSE
|
2022-07-13 11:11:44 +02:00
|
|
|
ifneq ($(CONFIG_EDK2_SERIAL_SUPPORT),y)
|
2022-07-04 18:01:09 +02:00
|
|
|
BUILD_STR += -D DISABLE_SERIAL_TERMINAL=TRUE
|
|
|
|
endif
|
2022-02-09 09:27:29 +01:00
|
|
|
# FOLLOW_BGRT_SPEC = FALSE
|
2022-07-13 11:11:44 +02:00
|
|
|
ifeq ($(CONFIG_EDK2_FOLLOW_BGRT_SPEC),y)
|
2022-02-09 09:27:29 +01:00
|
|
|
BUILD_STR += -D FOLLOW_BGRT_SPEC=TRUE
|
|
|
|
endif
|
2022-07-04 22:44:32 +02:00
|
|
|
# PCIE_BASE_ADDRESS = 0
|
|
|
|
ifneq ($(CONFIG_ECAM_MMCONF_LENGTH),)
|
|
|
|
BUILD_STR += --pcd gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS)
|
|
|
|
endif
|
|
|
|
# PCIE_BASE_LENGTH = 0
|
|
|
|
ifneq ($(CONFIG_ECAM_MMCONF_LENGTH),)
|
|
|
|
BUILD_STR += --pcd gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize=$(CONFIG_ECAM_MMCONF_LENGTH)
|
|
|
|
endif
|
2022-02-10 10:21:50 +01:00
|
|
|
# PRIORITIZE_INTERNAL = FALSE
|
2022-07-13 11:11:44 +02:00
|
|
|
ifeq ($(CONFIG_EDK2_PRIORITIZE_INTERNAL),y)
|
2022-02-10 10:21:50 +01:00
|
|
|
BUILD_STR += -D PRIORITIZE_INTERNAL=TRUE
|
|
|
|
endif
|
2022-02-09 09:31:24 +01:00
|
|
|
# PS2_KEYBOARD_ENABLE = FALSE
|
2022-07-13 11:11:44 +02:00
|
|
|
ifeq ($(CONFIG_EDK2_PS2_SUPPORT),y)
|
2022-02-09 09:31:24 +01:00
|
|
|
BUILD_STR += -D PS2_KEYBOARD_ENABLE=TRUE
|
|
|
|
endif
|
2022-02-04 08:41:16 +01:00
|
|
|
# PLATFORM_BOOT_TIMEOUT = 3
|
2022-07-13 11:11:44 +02:00
|
|
|
ifneq ($(CONFIG_EDK2_BOOT_TIMEOUT),)
|
|
|
|
BUILD_STR += -D PLATFORM_BOOT_TIMEOUT=$(CONFIG_EDK2_BOOT_TIMEOUT)
|
2022-02-09 09:31:24 +01:00
|
|
|
endif
|
|
|
|
# SIO_BUS_ENABLE = FALSE
|
2022-07-13 11:11:44 +02:00
|
|
|
ifeq ($(CONFIG_EDK2_PS2_SUPPORT),y)
|
2022-02-09 09:31:24 +01:00
|
|
|
BUILD_STR += -D SIO_BUS_ENABLE=TRUE
|
|
|
|
endif
|
2022-02-09 09:30:07 +01:00
|
|
|
# SHELL_TYPE = BUILD_SHELL
|
2022-07-13 11:11:44 +02:00
|
|
|
ifneq ($(CONFIG_EDK2_HAVE_EFI_SHELL),y)
|
2022-02-09 09:30:07 +01:00
|
|
|
BUILD_STR += -D SHELL_TYPE=NONE
|
2022-02-04 08:41:16 +01:00
|
|
|
endif
|
|
|
|
# USE_CBMEM_FOR_CONSOLE = FALSE
|
2022-07-13 11:11:44 +02:00
|
|
|
ifeq ($(CONFIG_EDK2_CBMEM_LOGGING),y)
|
2022-02-04 08:41:16 +01:00
|
|
|
BUILD_STR += -D USE_CBMEM_FOR_CONSOLE=TRUE
|
2021-06-02 22:19:38 +02:00
|
|
|
endif
|
2022-02-13 22:19:19 +01:00
|
|
|
# SD_MMC_TIMEOUT = 1000000
|
2022-07-13 11:11:44 +02:00
|
|
|
ifneq ($(CONFIG_EDK2_SD_MMC_TIMEOUT),)
|
|
|
|
BUILD_STR += -D SD_MMC_TIMEOUT=$(shell echo $$(( $(CONFIG_EDK2_SD_MMC_TIMEOUT) * 1000)) )
|
2022-02-13 22:19:19 +01:00
|
|
|
endif
|
payloads/tianocore: Remove the option for CorebootPayloadPkg
Recent changes to both coreboot and edk2 means that UefiPayloadPkg
seems to work on all hardware. It has been tested on:
* Intel Core 2nd, 3rd, 4th, 5th, 6th, 8th, 8th, 9th, 10th,
11th and 12th generation processors
* Intel Small Core BYT, BSW, APL, GLK and GLK-R processors
* AMD Stoney Ridge and Picasso
This includes the problematic Lenovo X230s. The most likely fixes are:
* Configuring the PCI Base and Length in edk2
* Fixes to the HostBridgeLib in edk2
* Adjustment to the SD/eMMC initialisation timeout
This means we can now remove the already deprecated option for
CorebootPayloadPkg and the legacy 8254 timer build option.
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ice7b7576eb3d32ea46e5138266b7df3fbcdcf7ea
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65721
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-08 17:29:54 +02:00
|
|
|
|
2022-02-04 08:41:16 +01:00
|
|
|
#
|
2022-07-26 11:31:39 +02:00
|
|
|
# EDKII has the below PCDs that are relevant to coreboot:
|
2022-07-12 09:24:18 +02:00
|
|
|
#
|
|
|
|
# Allows EDKII to use the full framebuffer
|
2022-07-13 11:11:44 +02:00
|
|
|
ifeq ($(CONFIG_EDK2_FULL_SCREEN_SETUP),y)
|
2022-07-12 09:24:18 +02:00
|
|
|
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow=0
|
|
|
|
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn=0
|
|
|
|
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow=0
|
|
|
|
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutColumn=0
|
2022-07-26 17:50:00 +02:00
|
|
|
endif
|
2021-10-28 23:46:17 +02:00
|
|
|
|
2022-02-04 08:41:16 +01:00
|
|
|
bootloader = $(word 8,$(subst /, ,$(BUILD_STR)))
|
|
|
|
|
2022-07-13 11:11:44 +02:00
|
|
|
ifneq ($(CONFIG_EDK2_CUSTOM_BUILD_PARAMS),)
|
|
|
|
BUILD_STR += $(CONFIG_EDK2_CUSTOM_BUILD_PARAMS)
|
2022-02-23 16:55:24 +01:00
|
|
|
endif
|
|
|
|
|
2022-08-02 10:12:13 +02:00
|
|
|
all: UefiPayloadPkg
|
2016-06-03 00:42:29 +02:00
|
|
|
|
2022-08-02 09:54:12 +02:00
|
|
|
$(WORKSPACE):
|
2022-08-02 10:32:17 +02:00
|
|
|
mkdir $(WORKSPACE)
|
2019-02-21 06:46:15 +01:00
|
|
|
|
2022-08-02 10:41:32 +02:00
|
|
|
$(EDK2_PATH): $(WORKSPACE)
|
2022-08-02 09:54:12 +02:00
|
|
|
if [ ! -d "$(EDK2_PATH)" ]; then \
|
2022-08-02 10:36:40 +02:00
|
|
|
git clone --recurse-submodules $(CONFIG_EDK2_REPOSITORY) $(EDK2_PATH) -j5; \
|
2022-02-04 08:41:16 +01:00
|
|
|
fi
|
2022-08-02 09:54:12 +02:00
|
|
|
cd $(EDK2_PATH); \
|
2022-08-02 08:56:54 +02:00
|
|
|
git checkout MdeModulePkg/Logo/Logo.bmp > /dev/null 2>&1 || true; \
|
2022-07-13 11:11:44 +02:00
|
|
|
echo " Fetching new commits from $(CONFIG_EDK2_REPOSITORY)"; \
|
2022-02-04 08:41:16 +01:00
|
|
|
git fetch origin 2>/dev/null; \
|
2022-07-13 11:11:44 +02:00
|
|
|
if ! git rev-parse --verify -q $(CONFIG_EDK2_TAG_OR_REV) >/dev/null; then \
|
|
|
|
echo " $(CONFIG_EDK2_TAG_OR_REV) is not a valid git reference"; \
|
2019-02-21 06:46:15 +01:00
|
|
|
exit 1; \
|
2016-06-03 00:42:29 +02:00
|
|
|
fi; \
|
2022-05-23 21:12:28 +02:00
|
|
|
if git status --ignore-submodules=dirty | grep -q clean; then \
|
2022-07-13 11:11:44 +02:00
|
|
|
echo " Checking out $(project_name) revision $(CONFIG_EDK2_TAG_OR_REV)"; \
|
|
|
|
git checkout --detach $(CONFIG_EDK2_TAG_OR_REV) -f; \
|
2019-02-21 06:46:15 +01:00
|
|
|
else \
|
|
|
|
echo " Working directory not clean; will not overwrite"; \
|
2020-04-22 06:54:42 +02:00
|
|
|
fi; \
|
2022-02-04 08:41:16 +01:00
|
|
|
git submodule update --init --checkout
|
2016-06-03 00:42:29 +02:00
|
|
|
|
2022-08-02 10:41:32 +02:00
|
|
|
logo: $(EDK2_PATH)
|
2022-07-13 11:11:44 +02:00
|
|
|
case "$(CONFIG_EDK2_BOOTSPLASH_FILE)" in \
|
2022-07-26 06:18:47 +02:00
|
|
|
"") ;; \
|
2022-07-13 11:11:44 +02:00
|
|
|
/*) convert -background None $(CONFIG_EDK2_BOOTSPLASH_FILE) \
|
2022-08-02 09:54:12 +02:00
|
|
|
BMP3:$(EDK2_PATH)/MdeModulePkg/Logo/Logo.bmp;; \
|
2022-07-13 11:11:44 +02:00
|
|
|
*) convert -background None $(top)/$(CONFIG_EDK2_BOOTSPLASH_FILE) \
|
2022-08-02 09:54:12 +02:00
|
|
|
BMP3:$(EDK2_PATH)/MdeModulePkg/Logo/Logo.bmp;; \
|
2022-07-15 14:58:52 +02:00
|
|
|
esac \
|
|
|
|
|
2016-06-03 00:42:29 +02:00
|
|
|
checktools:
|
2022-07-15 14:58:52 +02:00
|
|
|
echo -n "EDK2: Checking uuid-dev:"
|
2016-06-03 00:42:29 +02:00
|
|
|
echo "#include <uuid/uuid.h>" > libtest.c
|
|
|
|
echo "int main(int argc, char **argv) { (void) argc; (void) argv; return 0; }" >> libtest.c
|
2022-07-15 14:58:52 +02:00
|
|
|
$(HOSTCC) $(HOSTCCFLAGS) libtest.c -o libtest >/dev/null 2>&1 && echo " Found!" || \
|
|
|
|
( echo " Not found!"; \
|
|
|
|
echo "ERROR: please_install uuid-dev (libuuid-devel)"; exit 1 )
|
2016-06-03 00:42:29 +02:00
|
|
|
rm -rf libtest.c libtest
|
2022-07-15 14:58:52 +02:00
|
|
|
echo -n "EDK2: Checking nasm:"
|
|
|
|
type nasm > /dev/null 2>&1 && echo " Found!" || \
|
|
|
|
( echo " Not found!"; echo "ERROR: Please install nasm."; exit 1 )
|
|
|
|
echo -n "EDK2: Checking imagemagick:"
|
|
|
|
-convert -size 1x1 xc: test.png &> /dev/null;
|
|
|
|
if [ -f test.png ]; then \
|
|
|
|
rm test.png && echo " Found!"; \
|
|
|
|
else \
|
|
|
|
echo " Not found!"; \
|
|
|
|
echo "ERROR: Please install imagemagick"; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
2016-06-03 00:42:29 +02:00
|
|
|
|
2022-08-02 08:53:03 +02:00
|
|
|
print:
|
2022-06-16 22:32:33 +02:00
|
|
|
echo " ##### $(project_name) Build Summary #####"
|
2022-07-13 11:11:44 +02:00
|
|
|
echo " Repository: $(CONFIG_EDK2_REPOSITORY)"
|
|
|
|
echo " Branch: $(CONFIG_EDK2_TAG_OR_REV)"
|
2022-06-16 22:32:33 +02:00
|
|
|
echo " $(BUILD_STR)" | \
|
2022-08-02 08:53:03 +02:00
|
|
|
sed -e 's/--/-/g' -e 's/-/\n /g' | sort | sed \
|
2022-06-16 22:32:33 +02:00
|
|
|
-e 's/a /Architecture: /g' \
|
|
|
|
-e 's/b /Release: /g' \
|
|
|
|
-e 's/D /Option: /g' \
|
2022-08-02 08:53:03 +02:00
|
|
|
-e 's/pcd /Pcd: /g' \
|
2022-06-16 22:32:33 +02:00
|
|
|
-e 's/p /Payload: /g' \
|
|
|
|
-e 's/q /Build: Quiet/' \
|
2022-08-02 08:53:03 +02:00
|
|
|
-e 's/s /Build: Silent/' \
|
2022-06-16 22:32:33 +02:00
|
|
|
-e 's/t /Toolchain: /'
|
2022-08-02 08:53:03 +02:00
|
|
|
|
2022-08-02 10:41:32 +02:00
|
|
|
prep: $(EDK2_PATH) clean checktools logo
|
2022-08-02 09:54:12 +02:00
|
|
|
cd $(WORKSPACE); \
|
2022-08-02 10:07:15 +02:00
|
|
|
source $(EDK2_PATH)/edksetup.sh; \
|
|
|
|
unset CC; $(MAKE) -C $(EDK2_PATH)/BaseTools 2>&1; \
|
2022-08-02 09:54:12 +02:00
|
|
|
grep -q "COREBOOT" $(EDK2_PATH)/Conf/tools_def.txt; \
|
2016-06-03 00:42:29 +02:00
|
|
|
if [ $$? -ne 0 ]; then \
|
2022-08-02 09:54:12 +02:00
|
|
|
cat ../tools_def.txt >> $(EDK2_PATH)/Conf/tools_def.txt; \
|
2016-06-03 00:42:29 +02:00
|
|
|
fi; \
|
2022-08-02 10:07:15 +02:00
|
|
|
|
2022-08-02 10:12:13 +02:00
|
|
|
$(WORKSPACE)/Build/UefiPayloadPkgX64/$(RELEASE_STR)_COREBOOT/FV/UEFIPAYLOAD.fd: \
|
|
|
|
prep print
|
2022-08-02 10:07:15 +02:00
|
|
|
cd $(WORKSPACE); \
|
|
|
|
source $(EDK2_PATH)/edksetup.sh; \
|
2022-08-02 10:12:13 +02:00
|
|
|
echo -n "EDK2: Building... "; \
|
2022-08-02 11:00:56 +02:00
|
|
|
build -a IA32 -a X64 -b $(RELEASE_STR) $(BUILD_STR) \
|
2022-08-02 10:12:13 +02:00
|
|
|
-y $(WORKSPACE)/Build/UefiPayloadPkgX64/UEFIPAYLOAD.txt; \
|
|
|
|
if [ ! -f $@ ]; then \
|
|
|
|
echo "Failed!"; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
echo "Success!"; \
|
|
|
|
|
|
|
|
UefiPayloadPkg: $(WORKSPACE)/Build/UefiPayloadPkgX64/$(RELEASE_STR)_COREBOOT/FV/UEFIPAYLOAD.fd
|
|
|
|
mv $(WORKSPACE)/Build/UefiPayloadPkgX64/$(RELEASE_STR)_COREBOOT/FV/UEFIPAYLOAD.fd \
|
|
|
|
../../../build/UEFIPAYLOAD.fd
|
2016-06-03 00:42:29 +02:00
|
|
|
|
|
|
|
clean:
|
2022-08-02 09:54:12 +02:00
|
|
|
test -d $(WORKSPACE) && (cd $(WORKSPACE); rm -rf Build; rm -f Conf/tools_def.txt) || exit 0
|
2016-06-03 00:42:29 +02:00
|
|
|
|
|
|
|
distclean:
|
2022-08-02 09:54:12 +02:00
|
|
|
rm -rf $(WORKSPACE)
|
2016-06-03 00:42:29 +02:00
|
|
|
|
2022-08-02 10:41:32 +02:00
|
|
|
.PHONY: $(EDK2_PATH) checktools logo UefiPayloadPkg clean distclean
|