Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 May 2021 08:57:39 GMT
From:      =?utf-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= <royger@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 565eb7e544c8 - main - sysutils/edk2: add Xen platform
Message-ID:  <202105120857.14C8vdSC079043@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by royger (src committer):

URL: https://cgit.FreeBSD.org/ports/commit/?id=565eb7e544c803dbaa64a3767d4c3e1e593e144c

commit 565eb7e544c803dbaa64a3767d4c3e1e593e144c
Author:     Roger Pau Monné <royger@FreeBSD.org>
AuthorDate: 2021-05-11 17:22:32 +0000
Commit:     Roger Pau Monné <royger@FreeBSD.org>
CommitDate: 2021-05-12 08:57:19 +0000

    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
---
 sysutils/edk2/Makefile | 22 ++++++++++++++++++----
 1 file 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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105120857.14C8vdSC079043>