aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorRoger Pau Monné <royger@FreeBSD.org>2021-05-11 17:22:32 +0000
committerRoger Pau Monné <royger@FreeBSD.org>2021-05-12 08:57:19 +0000
commit565eb7e544c803dbaa64a3767d4c3e1e593e144c (patch)
tree0be9973bba007a41b2c82908d2485e0a8288f6e7 /sysutils
parenteeb064b6530ae10461b6f117d5efeeefd21b250a (diff)
downloadports-565eb7e544c803dbaa64a3767d4c3e1e593e144c.tar.gz
ports-565eb7e544c803dbaa64a3767d4c3e1e593e144c.zip
sysutils/edk2: add Xen platform
As part of this make the gcc aarch64 dependency conditional to building a firmware for that architecture, and make the nasm package a build dependency for the X64 (amd64) targets. Sponsored by: Citrix Systems R&D Reviewed by: manu Approved by: manu Differential revision: https://reviews.freebsd.org/D30225
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/edk2/Makefile22
1 files changed, 18 insertions, 4 deletions
diff --git a/sysutils/edk2/Makefile b/sysutils/edk2/Makefile
index dde3c01381b9..253578647ebd 100644
--- a/sysutils/edk2/Makefile
+++ b/sysutils/edk2/Makefile
@@ -11,13 +11,12 @@ ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386 riscv64
ONLY_FOR_ARCHS_REASON= source code is not yet ported to anything other than IA32, X64, ARM, AARCH64, RISCV64 or EBC
PKGNAMESUFFIX= -${FLAVOR:C/_/-/g}
-FLAVORS= macchiatobin rpi3 rpi4
+FLAVORS= macchiatobin rpi3 rpi4 xen
FLAVOR?= macchiatobin
USES= gmake python:3.7+,build
-BUILD_DEPENDS+= aarch64-none-elf-gcc:devel/aarch64-none-elf-gcc \
- gcc8:lang/gcc8 \
+BUILD_DEPENDS+= gcc8:lang/gcc8 \
dtc>=1.4.1:sysutils/dtc \
bash:shells/bash
@@ -38,6 +37,7 @@ GH_TUPLE= tianocore:edk2-platforms:${PLATFORM_TAG}:platforms \
BINARY_ALIAS= make=${LOCALBASE}/bin/gmake \
dtc=${LOCALBASE}/bin/dtc \
gcc=${LOCALBASE}/bin/gcc8 \
+ gcc-ar=${LOCALBASE}/bin/gcc-ar8 \
g++=${LOCALBASE}/bin/g++8 \
python3=${PYTHON_CMD} python=${PYTHON_CMD}
@@ -71,6 +71,15 @@ PLAT_RESULT= RPi4/${PLAT_TARGET}_GCC5/FV/RPI_EFI.fd
PLAT_FILENAME= RPI_EFI.fd
.endif
+.if ${FLAVOR} == xen
+PLAT= xen
+PLAT_ARCH= X64
+PLAT_TARGET= RELEASE
+PLATFILE= OvmfPkg/OvmfXen.dsc
+PLAT_RESULT= OvmfXen/${PLAT_TARGET}_GCC5/FV/OVMF.fd
+PLAT_FILENAME= XEN_EFI.fd
+.endif
+
PLIST_FILES= ${PREFIX}/share/${PORTNAME}-${PLAT}/${PLAT_FILENAME}
# Emulate source edk2/edksetup.sh
@@ -83,9 +92,14 @@ MAKE_ENV+= WORKSPACE=${WRKDIR} \
PYTHONHASHSEED=1
.if ${PLAT_ARCH} == AARCH64
+BUILD_DEPENDS+= aarch64-none-elf-gcc:devel/aarch64-none-elf-gcc
MAKE_ENV+= GCC5_AARCH64_PREFIX=aarch64-none-elf-
.endif
+.if ${PLAT_ARCH} == X64
+BUILD_DEPENDS+= nasm:devel/nasm
+.endif
+
# We can't have two submodule with the same origin in GH_TUPLE
post-extract:
(cd ${WRKDIR}/edk2-${GH_TAGNAME}/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli && tar cf - * | tar xf - -C ../../../../BaseTools/Source/C/BrotliCompress/brotli)
@@ -102,6 +116,6 @@ do-build:
do-install:
${MKDIR} ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/
- ${INSTALL_DATA} ${WRKDIR}/Build/${PLAT_RESULT} ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/
+ ${INSTALL_DATA} ${WRKDIR}/Build/${PLAT_RESULT} ${STAGEDIR}/${PREFIX}/share/${PORTNAME}-${PLAT}/${PLAT_FILENAME}
.include <bsd.port.mk>