raisin: enable ovmf build for arm64
PATCH v3 1/1 raisin: enable ovmf build for arm64
nasm is not a dependency on arm64.
print out a message that on x86_32 we are building ovmf x86_64.
---
Changes in v3:
- allow x86_64 build on x86_32
- print out a message that on x86_32 we are building ovmf x86_64
- add a comment on the usage of large model on arm64
Changes in v2:
- disable x86_32 build (it doesn't work, but it wasn't explicitly disabled)
- remove export GCC48_AARCH64_PREFIX= as it is not necessary
- add a comment on why we are using -t GCC48
--- components/ovmf | 55 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 16 deletions(-)
components/ovmf +39 -16
@@ -1,24 +1,35 @@ #!/usr/bin/env bash function ovmf_skip() { - if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]] - then - return 0 - else - return 1 - fi + case $RAISIN_ARCH in + "x86_32" ) + verbose_echo "Building OVMF for x86_64 guests" + return 1 + ;; + "arm32" ) + return 0 + ;; + "arm64"|"x86_64" ) + return 1 + ;; + esac } function ovmf_check_package() { - local DEP_Debian_common="build-essential nasm uuid-dev python iasl" - local DEP_Debian_x86_32="$DEP_Debian_common" - local DEP_Debian_x86_64="$DEP_Debian_common" - local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_common="build-essential uuid-dev python iasl" + local DEP_Debian_x86_32="$DEP_Debian_common nasm" + local DEP_Debian_x86_64="$DEP_Debian_x86_32" local DEP_Debian_arm64="$DEP_Debian_common" - local DEP_Fedora_common="make gcc gcc-c++ nasm libuuid-devel python acpica-tools" - local DEP_Fedora_x86_32="$DEP_Fedora_common" - local DEP_Fedora_x86_64="$DEP_Fedora_common" + local DEP_Fedora_common="make gcc gcc-c++ libuuid-devel python acpica-tools" + local DEP_Fedora_x86_32="$DEP_Fedora_common nasm" + local DEP_Fedora_x86_64="$DEP_Fedora_x86_32" + local DEP_Fedora_arm64="$DEP_Debian_common" + + local DEP_CentOS_common="$DEP_Fedora_common" + local DEP_CentOS_x86_32="$DEP_Fedora_x86_32" + local DEP_CentOS_x86_64="$DEP_Fedora_x86_64" + local DEP_CentOS_arm64="$DEP_Fedora_arm64" verbose_echo Checking OVMF dependencies eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
@@ -30,9 +41,21 @@ function ovmf_build() { git-checkout $OVMF_URL $OVMF_REVISION ovmf-dir cd ovmf-dir - make -C BaseTools/Source/C - OvmfPkg/build.sh -a X64 -b RELEASE -n 4 - cp Build/OvmfX64/RELEASE_GCC*/FV/OVMF.fd ovmf.bin + make -C BaseTools + + if [[ $RAISIN_ARCH = "arm64" ]] + then + # Just use gcc4.8 flags for now: we have to specify a gcc + # version and the 4.8 flags are almost identical to 4.9, etc. + # As a consequence we are always going to use the large model. + bash -c "source edksetup.sh && \ + build -a AARCH64 -t GCC48 -p ArmVirtPkg/ArmVirtXen.dsc -b RELEASE" + mkdir -p "$INST_DIR"/$PREFIX/lib/xen/boot + cp Build/ArmVirtXen-AARCH64/RELEASE_GCC*/FV/XEN_EFI.fd "$INST_DIR"/$PREFIX/lib/xen/boot/XEN_EFI.fd + else + OvmfPkg/build.sh -a X64 -b RELEASE -n 4 + cp Build/OvmfX64/RELEASE_GCC*/FV/OVMF.fd ovmf.bin + fi cd "$BASEDIR" }
Signature · 1 line
1.7.9.5
Quoted 7 lines · Stefano Stabellini
function
ovmf_check_package(){components/ovmf +2
-4- local DEP_Debian_common="build-essential nasm uuid-dev python iasl" - local DEP_Debian_x86_32="$DEP_Debian_common" - local DEP_Debian_x86_64="$DEP_Debian_common" - local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_common="build-essential uuid-dev python iasl" + local DEP_Debian_x86_32="$DEP_Debian_common nasm"
components/ovmf line 27
Quoted 10 lines
components/ovmf +5
-3+ local DEP_Debian_x86_64="$DEP_Debian_x86_32" local DEP_Debian_arm64="$DEP_Debian_common" - local DEP_Fedora_common="make gcc gcc-c++ nasm libuuid-devel python acpica-tools" - local DEP_Fedora_x86_32="$DEP_Fedora_common" - local DEP_Fedora_x86_64="$DEP_Fedora_common" + local DEP_Fedora_common="make gcc gcc-c++ libuuid-devel python acpica-tools" + local DEP_Fedora_x86_32="$DEP_Fedora_common nasm" + local DEP_Fedora_x86_64="$DEP_Fedora_x86_32" + local DEP_Fedora_arm64="$DEP_Debian_common"
Shouldn't it be $DEP_Fedora_common here?
components/ovmf line 32
Quoted 5 lines
components/ovmf +5
-0+ + local DEP_CentOS_common="$DEP_Fedora_common" + local DEP_CentOS_x86_32="$DEP_Fedora_x86_32" + local DEP_CentOS_x86_64="$DEP_Fedora_x86_64" + local DEP_CentOS_arm64="$DEP_Fedora_arm64"
It's bit strange to introduce DEP_CentOS_* in a patch which only enable ARM64. Is it intentional?
Regards,
Signature · 1 line
Julien Grall
Quoted 19 lines · Julien Grall
Quoted 7 lines · Stefano Stabellini
function
ovmf_check_package(){components/ovmf +2
-4- local DEP_Debian_common="build-essential nasm uuid-dev python iasl" - local DEP_Debian_x86_32="$DEP_Debian_common" - local DEP_Debian_x86_64="$DEP_Debian_common" - local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_common="build-essential uuid-dev python iasl" + local DEP_Debian_x86_32="$DEP_Debian_common nasm"components/ovmf line 27
Quoted 10 lines
components/ovmf +5
-3+ local DEP_Debian_x86_64="$DEP_Debian_x86_32" local DEP_Debian_arm64="$DEP_Debian_common" - local DEP_Fedora_common="make gcc gcc-c++ nasm libuuid-devel python acpica-tools" - local DEP_Fedora_x86_32="$DEP_Fedora_common" - local DEP_Fedora_x86_64="$DEP_Fedora_common" + local DEP_Fedora_common="make gcc gcc-c++ libuuid-devel python acpica-tools" + local DEP_Fedora_x86_32="$DEP_Fedora_common nasm" + local DEP_Fedora_x86_64="$DEP_Fedora_x86_32" + local DEP_Fedora_arm64="$DEP_Debian_common"
Quoted 1 line
Shouldn't it be $DEP_Fedora_common here?
Yes, it should!
Quoted 8 lines
components/ovmf line 32
Quoted 5 lines
components/ovmf +5
-0+ + local DEP_CentOS_common="$DEP_Fedora_common" + local DEP_CentOS_x86_32="$DEP_Fedora_x86_32" + local DEP_CentOS_x86_64="$DEP_Fedora_x86_64" + local DEP_CentOS_arm64="$DEP_Fedora_arm64"It's bit strange to introduce DEP_CentOS_* in a patch which only enable ARM64. Is it intentional?
Yes, it is intentional: I tested it on CentOS. So far we have been adding CentOS dependencies "on demand". I'll mention it in the commit message.