2019-03-07 13:57:17 +00:00
|
|
|
# Makefile for building firmware binaries and variable store templates for a
|
|
|
|
# number of virtual platforms in edk2.
|
|
|
|
#
|
|
|
|
# Copyright (C) 2019 Red Hat, Inc.
|
|
|
|
#
|
|
|
|
# This program and the accompanying materials are licensed and made available
|
|
|
|
# under the terms and conditions of the BSD License that accompanies this
|
|
|
|
# distribution. The full text of the license may be found at
|
|
|
|
# <http://opensource.org/licenses/bsd-license.php>.
|
|
|
|
#
|
|
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
SHELL = /bin/bash
|
|
|
|
|
|
|
|
toolchain = $(shell source ./edk2-funcs.sh && qemu_edk2_get_toolchain $(1))
|
|
|
|
|
|
|
|
licenses := \
|
|
|
|
edk2/License.txt \
|
roms/Makefile.edk2: update input file list for "pc-bios/edk2-licenses.txt"
(1) For TianoCore Bugzilla
https://bugzilla.tianocore.org/show_bug.cgi?id=1373
the majority of the edk2 tree was relicensed under the
BSD-2-Clause-Patent license:
https://spdx.org/licenses/BSD-2-Clause-Patent.html>
Edk2 commit f53de8aecb12 ("edk2: Add License-History.txt", 2019-04-09)
added a new file called "License-History.txt", describing license and
contributor agreement changes over time.
(2) For advacing edk2's OpenSSL git submodule to the 1.1.1b release, a
more up-to-date ArmSoftFloatLib instance became necessary, on 32-bit
ARM. Therefore, the embedded (and by now, obsolete) Berkeley SoftFloat
library was replaced with a git submodule of the same, checked out at
the latest release ("3e", plus a typo fix on top -- commit
b64af41c3276). This was implemented for TianoCore Bugzilla
https://bugzilla.tianocore.org/show_bug.cgi?id=1845
in edk2 commit range b6cfa686e42d..371e7001e8d5.
Include the edk2 project's "License-History.txt" file, and the Berkeley
SoftFloat library's "COPYING.txt", in our generated
"pc-bios/edk2-licenses.txt" text file.
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugs.launchpad.net/qemu/+bug/1831477
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-06-06 11:01:43 +00:00
|
|
|
edk2/License-History.txt \
|
2019-03-07 13:57:17 +00:00
|
|
|
edk2/OvmfPkg/License.txt \
|
roms/Makefile.edk2: update input file list for "pc-bios/edk2-licenses.txt"
(1) For TianoCore Bugzilla
https://bugzilla.tianocore.org/show_bug.cgi?id=1373
the majority of the edk2 tree was relicensed under the
BSD-2-Clause-Patent license:
https://spdx.org/licenses/BSD-2-Clause-Patent.html>
Edk2 commit f53de8aecb12 ("edk2: Add License-History.txt", 2019-04-09)
added a new file called "License-History.txt", describing license and
contributor agreement changes over time.
(2) For advacing edk2's OpenSSL git submodule to the 1.1.1b release, a
more up-to-date ArmSoftFloatLib instance became necessary, on 32-bit
ARM. Therefore, the embedded (and by now, obsolete) Berkeley SoftFloat
library was replaced with a git submodule of the same, checked out at
the latest release ("3e", plus a typo fix on top -- commit
b64af41c3276). This was implemented for TianoCore Bugzilla
https://bugzilla.tianocore.org/show_bug.cgi?id=1845
in edk2 commit range b6cfa686e42d..371e7001e8d5.
Include the edk2 project's "License-History.txt" file, and the Berkeley
SoftFloat library's "COPYING.txt", in our generated
"pc-bios/edk2-licenses.txt" text file.
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugs.launchpad.net/qemu/+bug/1831477
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-06-06 11:01:43 +00:00
|
|
|
edk2/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3/COPYING.txt \
|
2019-03-07 13:57:17 +00:00
|
|
|
edk2/CryptoPkg/Library/OpensslLib/openssl/LICENSE
|
|
|
|
|
|
|
|
# The "edk2-arm-vars.fd" varstore template is suitable for aarch64 as well.
|
|
|
|
# Similarly, the "edk2-i386-vars.fd" varstore template is suitable for x86_64
|
|
|
|
# as well, independently of "secure" too.
|
|
|
|
flashdevs := \
|
|
|
|
aarch64-code \
|
|
|
|
arm-code \
|
|
|
|
i386-code \
|
|
|
|
i386-secure-code \
|
|
|
|
x86_64-code \
|
|
|
|
x86_64-secure-code \
|
|
|
|
\
|
|
|
|
arm-vars \
|
|
|
|
i386-vars
|
|
|
|
|
|
|
|
all: $(foreach flashdev,$(flashdevs),../pc-bios/edk2-$(flashdev).fd.bz2) \
|
|
|
|
../pc-bios/edk2-licenses.txt
|
|
|
|
|
|
|
|
../pc-bios/edk2-%.fd.bz2: ../pc-bios/edk2-%.fd
|
|
|
|
bzip2 -9 -c $< > $@
|
|
|
|
|
|
|
|
# When the build completes, we need not keep the uncompressed flash device
|
|
|
|
# files.
|
|
|
|
.INTERMEDIATE: $(foreach flashdev,$(flashdevs),../pc-bios/edk2-$(flashdev).fd)
|
|
|
|
|
|
|
|
submodules:
|
|
|
|
cd edk2 && git submodule update --init --force
|
|
|
|
|
|
|
|
# See notes on the ".NOTPARALLEL" target and the "+" indicator in
|
|
|
|
# "tests/uefi-test-tools/Makefile".
|
|
|
|
.NOTPARALLEL:
|
|
|
|
|
|
|
|
../pc-bios/edk2-aarch64-code.fd: submodules
|
|
|
|
+./edk2-build.sh \
|
|
|
|
aarch64 \
|
|
|
|
--arch=AARCH64 \
|
|
|
|
--platform=ArmVirtPkg/ArmVirtQemu.dsc \
|
|
|
|
-D NETWORK_IP6_ENABLE \
|
2019-06-06 11:50:56 +00:00
|
|
|
-D NETWORK_HTTP_BOOT_ENABLE
|
2019-03-07 13:57:17 +00:00
|
|
|
cp edk2/Build/ArmVirtQemu-AARCH64/DEBUG_$(call toolchain,aarch64)/FV/QEMU_EFI.fd \
|
|
|
|
$@
|
|
|
|
truncate --size=64M $@
|
|
|
|
|
|
|
|
../pc-bios/edk2-arm-code.fd: submodules
|
|
|
|
+./edk2-build.sh \
|
|
|
|
arm \
|
|
|
|
--arch=ARM \
|
|
|
|
--platform=ArmVirtPkg/ArmVirtQemu.dsc \
|
|
|
|
-D NETWORK_IP6_ENABLE \
|
2019-06-06 11:50:56 +00:00
|
|
|
-D NETWORK_HTTP_BOOT_ENABLE
|
2019-03-07 13:57:17 +00:00
|
|
|
cp edk2/Build/ArmVirtQemu-ARM/DEBUG_$(call toolchain,arm)/FV/QEMU_EFI.fd \
|
|
|
|
$@
|
|
|
|
truncate --size=64M $@
|
|
|
|
|
|
|
|
../pc-bios/edk2-i386-code.fd: submodules
|
|
|
|
+./edk2-build.sh \
|
|
|
|
i386 \
|
|
|
|
--arch=IA32 \
|
|
|
|
--platform=OvmfPkg/OvmfPkgIa32.dsc \
|
|
|
|
-D NETWORK_IP6_ENABLE \
|
2019-06-06 09:59:09 +00:00
|
|
|
-D NETWORK_HTTP_BOOT_ENABLE \
|
|
|
|
-D NETWORK_TLS_ENABLE \
|
2019-03-07 13:57:17 +00:00
|
|
|
-D TPM2_ENABLE \
|
|
|
|
-D TPM2_CONFIG_ENABLE
|
|
|
|
cp edk2/Build/OvmfIa32/DEBUG_$(call toolchain,i386)/FV/OVMF_CODE.fd $@
|
|
|
|
|
|
|
|
../pc-bios/edk2-i386-secure-code.fd: submodules
|
|
|
|
+./edk2-build.sh \
|
|
|
|
i386 \
|
|
|
|
--arch=IA32 \
|
|
|
|
--platform=OvmfPkg/OvmfPkgIa32.dsc \
|
|
|
|
-D NETWORK_IP6_ENABLE \
|
2019-06-06 09:59:09 +00:00
|
|
|
-D NETWORK_HTTP_BOOT_ENABLE \
|
|
|
|
-D NETWORK_TLS_ENABLE \
|
2019-03-07 13:57:17 +00:00
|
|
|
-D TPM2_ENABLE \
|
|
|
|
-D TPM2_CONFIG_ENABLE \
|
|
|
|
-D SECURE_BOOT_ENABLE \
|
|
|
|
-D SMM_REQUIRE
|
|
|
|
cp edk2/Build/OvmfIa32/DEBUG_$(call toolchain,i386)/FV/OVMF_CODE.fd $@
|
|
|
|
|
|
|
|
../pc-bios/edk2-x86_64-code.fd: submodules
|
|
|
|
+./edk2-build.sh \
|
|
|
|
x86_64 \
|
|
|
|
--arch=X64 \
|
|
|
|
--platform=OvmfPkg/OvmfPkgX64.dsc \
|
|
|
|
-D NETWORK_IP6_ENABLE \
|
2019-06-06 09:59:09 +00:00
|
|
|
-D NETWORK_HTTP_BOOT_ENABLE \
|
|
|
|
-D NETWORK_TLS_ENABLE \
|
2019-03-07 13:57:17 +00:00
|
|
|
-D TPM2_ENABLE \
|
|
|
|
-D TPM2_CONFIG_ENABLE
|
|
|
|
cp edk2/Build/OvmfX64/DEBUG_$(call toolchain,x86_64)/FV/OVMF_CODE.fd $@
|
|
|
|
|
|
|
|
../pc-bios/edk2-x86_64-secure-code.fd: submodules
|
|
|
|
+./edk2-build.sh \
|
|
|
|
x86_64 \
|
|
|
|
--arch=IA32 \
|
|
|
|
--arch=X64 \
|
|
|
|
--platform=OvmfPkg/OvmfPkgIa32X64.dsc \
|
|
|
|
-D NETWORK_IP6_ENABLE \
|
2019-06-06 09:59:09 +00:00
|
|
|
-D NETWORK_HTTP_BOOT_ENABLE \
|
|
|
|
-D NETWORK_TLS_ENABLE \
|
2019-03-07 13:57:17 +00:00
|
|
|
-D TPM2_ENABLE \
|
|
|
|
-D TPM2_CONFIG_ENABLE \
|
|
|
|
-D SECURE_BOOT_ENABLE \
|
|
|
|
-D SMM_REQUIRE
|
|
|
|
cp edk2/Build/Ovmf3264/DEBUG_$(call toolchain,x86_64)/FV/OVMF_CODE.fd $@
|
|
|
|
|
|
|
|
../pc-bios/edk2-arm-vars.fd: ../pc-bios/edk2-arm-code.fd
|
|
|
|
cp edk2/Build/ArmVirtQemu-ARM/DEBUG_$(call toolchain,arm)/FV/QEMU_VARS.fd \
|
|
|
|
$@
|
|
|
|
truncate --size=64M $@
|
|
|
|
|
|
|
|
../pc-bios/edk2-i386-vars.fd: ../pc-bios/edk2-i386-code.fd
|
|
|
|
cp edk2/Build/OvmfIa32/DEBUG_$(call toolchain,i386)/FV/OVMF_VARS.fd $@
|
|
|
|
|
|
|
|
# The license file accumulates several individual licenses from under edk2,
|
|
|
|
# prefixing each individual license with a header (generated by "tail") that
|
|
|
|
# states its pathname.
|
|
|
|
../pc-bios/edk2-licenses.txt: submodules
|
|
|
|
tail -n $(shell cat $(licenses) | wc -l) $(licenses) > $@
|
|
|
|
dos2unix $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf edk2/Build
|
|
|
|
cd edk2/Conf && \
|
|
|
|
rm -rf .cache BuildEnv.sh build_rule.txt target.txt \
|
|
|
|
tools_def.txt
|