mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
Advance the roms/edk2 submodule to the "edk2-stable201903" release, and
build and capture platform firmware binaries from that release. The binaries are meant to be used by both end-users and by the "BIOS tables" unit tests in qtest ("make check"). -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABCAAGBQJcvgXYAAoJENOdpx4NSWz6tZMP/jHBTOmKfQhBOupSHl5QUN4/ 3NFzyIjZht2Pdn5ckAI7VbWzYqNFnI8C/Ffvs+WGc9+uUj930zR1UaWGWZ+Cpr/Z DQlKBfGL1BTfyPGZFlJ6alDHV9Ka9RsSyIADsQkAoYsaR5Q+hOrT8YmMsCf6/94I 3wnQQZpIOUTG1PuwQiezvrb4dwdXbSQpMNeirza2ftcDya3ctu7bIfuBj9dCD6xb dcIMKDBLO047c97ILVQC5rvonk3BZmGi9iY6Wp7uiUoZc4lcVIvqBHYPpOaJj3Ws x2c+OyVriTMdYEtS7eqWkwu6yhf4ts5L5AdNtE1p3hlPAdJiZ1j5T/y70MD15cQO UGztNoSekeZRGngLZzOsE9ZfMbGMwYnFgx6MPjJHun2rrYSoHtiaQR5OeV2PIGth Wk/MRub901B8qqbPCeatdSiIyyzBav/NjA49hUA0HJ4QarbEN+BviALGMZf7wXLL YRvFCqDfvOEzFjqFTDhv/BwmcbgT68pAjE3vUKplyKisVb4o01aYZ6CNQAYWLnKc ndVHyapbhe5ZF7JY29D0oWfmu0UYRxyfTyS9AY+D0J+FoJgi927uC9jZk3qpze5i lljnH5C7iF974YeLB75xsdPfnsARSSC8kehCFFBVWqAa/ZsLR0PEZCUnwyf+QTvk pej6tCtrEFTwhPcfbvnc =k5c2 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/lersek/tags/edk2-pull-2019-04-22' into staging Advance the roms/edk2 submodule to the "edk2-stable201903" release, and build and capture platform firmware binaries from that release. The binaries are meant to be used by both end-users and by the "BIOS tables" unit tests in qtest ("make check"). # gpg: Signature made Mon 22 Apr 2019 19:20:08 BST # gpg: using RSA key D39DA71E0D496CFA # gpg: Good signature from "Laszlo Ersek <lersek@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: F5D9 660F 1BA5 F310 A95A C5E0 466A EAE0 6125 3988 # Subkey fingerprint: B3A5 5D3F 88A8 90ED 2E63 3E8D D39D A71E 0D49 6CFA * remotes/lersek/tags/edk2-pull-2019-04-22: MAINTAINERS: add the "EDK2 Firmware" subsystem Makefile: install the edk2 firmware images and their descriptors tests: add missing dependency to build QTEST_QEMU_BINARY, round 2 pc-bios: document the edk2 firmware images; add firmware descriptors pc-bios: add edk2 firmware binaries and variable store templates roms: build edk2 firmware binaries and variable store templates roms/Makefile: replace the $(EDK2_EFIROM) target with "edk2-basetools" roms/edk2-funcs.sh: add the qemu_edk2_get_thread_count() function roms/edk2: advance to tag edk2-stable201903 tests/uefi-test-tools/build.sh: work around TianoCore#1607 roms/edk2-funcs.sh: require gcc-4.8+ for building i386 and x86_64 roms: lift "edk2-funcs.sh" from "tests/uefi-test-tools/build.sh" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
3284aa1281
27 changed files with 934 additions and 96 deletions
|
@ -912,7 +912,7 @@ check-speed: $(check-speed-y)
|
|||
|
||||
# gtester tests with TAP output
|
||||
|
||||
$(patsubst %, check-report-qtest-%.tap, $(QTEST_TARGETS)): check-report-qtest-%.tap: $(check-qtest-y)
|
||||
$(patsubst %, check-report-qtest-%.tap, $(QTEST_TARGETS)): check-report-qtest-%.tap: subdir-%-softmmu $(check-qtest-y)
|
||||
$(call do_test_tap, $(check-qtest-$*-y) $(check-qtest-generic-y), \
|
||||
QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
|
||||
QTEST_QEMU_IMG=qemu-img$(EXESUF))
|
||||
|
|
|
@ -29,6 +29,9 @@ export PACKAGES_PATH=$(realpath -- "$edk2_dir")
|
|||
export WORKSPACE=$PWD
|
||||
mkdir -p Conf
|
||||
|
||||
# Work around <https://bugzilla.tianocore.org/show_bug.cgi?id=1607>.
|
||||
export PYTHON_COMMAND=python2
|
||||
|
||||
# Source "edksetup.sh" carefully.
|
||||
set +e +u +C
|
||||
source "$PACKAGES_PATH/edksetup.sh"
|
||||
|
@ -38,97 +41,12 @@ if [ $ret -ne 0 ]; then
|
|||
exit $ret
|
||||
fi
|
||||
|
||||
# Map the QEMU system emulation target to the following types of architecture
|
||||
# identifiers:
|
||||
# - edk2,
|
||||
# - gcc cross-compilation.
|
||||
# Cover only those targets that are supported by the UEFI spec and edk2.
|
||||
case "$emulation_target" in
|
||||
(arm)
|
||||
edk2_arch=ARM
|
||||
gcc_arch=arm
|
||||
;;
|
||||
(aarch64)
|
||||
edk2_arch=AARCH64
|
||||
gcc_arch=aarch64
|
||||
;;
|
||||
(i386)
|
||||
edk2_arch=IA32
|
||||
gcc_arch=i686
|
||||
;;
|
||||
(x86_64)
|
||||
edk2_arch=X64
|
||||
gcc_arch=x86_64
|
||||
;;
|
||||
(*)
|
||||
printf '%s: unknown/unsupported QEMU system emulation target "%s"\n' \
|
||||
"$program_name" "$emulation_target" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Check if cross-compilation is needed.
|
||||
host_arch=$(uname -m)
|
||||
if [ "$gcc_arch" == "$host_arch" ] ||
|
||||
( [ "$gcc_arch" == i686 ] && [ "$host_arch" == x86_64 ] ); then
|
||||
cross_prefix=
|
||||
else
|
||||
cross_prefix=${gcc_arch}-linux-gnu-
|
||||
fi
|
||||
|
||||
# Expose cross_prefix (which is possibly empty) to the edk2 tools. While at it,
|
||||
# determine the suitable edk2 toolchain as well.
|
||||
# - For ARM and AARCH64, edk2 only offers the GCC5 toolchain tag, which covers
|
||||
# the gcc-5+ releases.
|
||||
# - For IA32 and X64, edk2 offers the GCC44 through GCC49 toolchain tags, in
|
||||
# addition to GCC5. Unfortunately, the mapping between the toolchain tags and
|
||||
# the actual gcc releases isn't entirely trivial. Run "git-blame" on
|
||||
# "OvmfPkg/build.sh" in edk2 for more information.
|
||||
# And, because the above is too simple, we have to assign cross_prefix to an
|
||||
# edk2 build variable that is specific to both the toolchain tag and the target
|
||||
# architecture.
|
||||
case "$edk2_arch" in
|
||||
(ARM)
|
||||
edk2_toolchain=GCC5
|
||||
export GCC5_ARM_PREFIX=$cross_prefix
|
||||
;;
|
||||
(AARCH64)
|
||||
edk2_toolchain=GCC5
|
||||
export GCC5_AARCH64_PREFIX=$cross_prefix
|
||||
;;
|
||||
(IA32|X64)
|
||||
gcc_version=$("${cross_prefix}gcc" -v 2>&1 | tail -1 | awk '{print $3}')
|
||||
case "$gcc_version" in
|
||||
([1-3].*|4.[0-3].*)
|
||||
printf '%s: unsupported gcc version "%s"\n' \
|
||||
"$program_name" "$gcc_version" >&2
|
||||
exit 1
|
||||
;;
|
||||
(4.4.*)
|
||||
edk2_toolchain=GCC44
|
||||
;;
|
||||
(4.5.*)
|
||||
edk2_toolchain=GCC45
|
||||
;;
|
||||
(4.6.*)
|
||||
edk2_toolchain=GCC46
|
||||
;;
|
||||
(4.7.*)
|
||||
edk2_toolchain=GCC47
|
||||
;;
|
||||
(4.8.*)
|
||||
edk2_toolchain=GCC48
|
||||
;;
|
||||
(4.9.*|6.[0-2].*)
|
||||
edk2_toolchain=GCC49
|
||||
;;
|
||||
(*)
|
||||
edk2_toolchain=GCC5
|
||||
;;
|
||||
esac
|
||||
eval "export ${edk2_toolchain}_BIN=\$cross_prefix"
|
||||
;;
|
||||
esac
|
||||
# Fetch some option arguments, and set the cross-compilation environment (if
|
||||
# any), for the edk2 "build" utility.
|
||||
source "$edk2_dir/../edk2-funcs.sh"
|
||||
edk2_arch=$(qemu_edk2_get_arch "$emulation_target")
|
||||
edk2_toolchain=$(qemu_edk2_get_toolchain "$emulation_target")
|
||||
qemu_edk2_set_cross_env "$emulation_target"
|
||||
|
||||
# Build the UEFI binary
|
||||
mkdir -p log
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue