2015-04-01 22:19:41 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= xen
|
2015-04-06 14:31:17 +00:00
|
|
|
PKGNAMESUFFIX= -kernel
|
2016-06-03 11:26:09 +00:00
|
|
|
PORTVERSION= 4.7.0
|
2016-08-01 08:35:54 +00:00
|
|
|
PORTREVISION= 3
|
2015-04-01 22:19:41 +00:00
|
|
|
CATEGORIES= emulators
|
2016-07-04 15:29:45 +00:00
|
|
|
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${PORTVERSION}/
|
2015-04-01 22:19:41 +00:00
|
|
|
|
2015-11-14 09:27:31 +00:00
|
|
|
MAINTAINER= royger@FreeBSD.org
|
2015-04-01 22:19:41 +00:00
|
|
|
COMMENT= Hypervisor using a microkernel design
|
|
|
|
|
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2015-07-25 10:53:11 +00:00
|
|
|
ONLY_FOR_ARCHS= amd64
|
2015-04-01 22:19:41 +00:00
|
|
|
|
2015-05-14 10:04:06 +00:00
|
|
|
USES= cpe gmake python:build
|
2016-06-03 11:26:09 +00:00
|
|
|
|
|
|
|
# We need to use ld from ports because the version in base doesn't
|
|
|
|
# support the '--build-id' switch that's needed for live hypervisor
|
|
|
|
# hot-patching. Once the ld version in base supports this option the
|
|
|
|
# dependency can be removed.
|
|
|
|
#
|
|
|
|
# GNU objcopy is used instead of elftc objcopy because of bug #533:
|
|
|
|
# https://sourceforge.net/p/elftoolchain/tickets/533/
|
|
|
|
# Once this is solved we should be able to switch to elfcopy.
|
|
|
|
#
|
|
|
|
# And finally we also need to use nm from binutils because the one
|
|
|
|
# from base cannot deal with i386pep binary files which is the format
|
|
|
|
# of the Xen EFI image (note that FreeBSD cannot yet boot as Dom0 from EFI,
|
|
|
|
# but the image is built anyway). This is reported to elftc as bug #534:
|
|
|
|
# https://sourceforge.net/p/elftoolchain/tickets/534/
|
|
|
|
MAKE_ARGS= clang=y PYTHON=${PYTHON_CMD} LD="${LD}" OBJCOPY="${OBJCOPY}" \
|
|
|
|
NM="${NM}"
|
|
|
|
USE_BINUTILS= yes
|
2015-04-01 22:19:41 +00:00
|
|
|
NO_MTREE= yes
|
2016-06-03 11:26:09 +00:00
|
|
|
STRIP= #
|
2015-04-01 22:19:41 +00:00
|
|
|
PLIST_FILES= /boot/xen \
|
|
|
|
/boot/xen.4th
|
2016-06-03 11:26:09 +00:00
|
|
|
EXTRA_PATCHES= ${FILESDIR}/0001-xen-logdirty-prevent-preemption-if-finished.patch:-p1 \
|
|
|
|
${FILESDIR}/0002-xen-rework-paging_log_dirty_op-to-work-with-hvm-gues.patch:-p1 \
|
2016-08-01 08:35:54 +00:00
|
|
|
${FILESDIR}/kconf_arch.patch:-p1 \
|
|
|
|
${FILESDIR}/xsa182-unstable.patch:-p1 \
|
|
|
|
${FILESDIR}/xsa183-unstable.patch:-p1
|
2016-01-05 10:06:07 +00:00
|
|
|
|
2015-04-01 22:19:41 +00:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
|
|
|
.if ${OPSYS} != FreeBSD
|
|
|
|
IGNORE= Only supported on FreeBSD
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${OSVERSION} < 1100055
|
|
|
|
IGNORE= Only supported on recent FreeBSD 11
|
|
|
|
.endif
|
|
|
|
|
2016-06-03 11:26:09 +00:00
|
|
|
pre-build:
|
|
|
|
${MAKE_CMD} -C ${WRKSRC}/xen defconfig ${MAKE_ARGS}
|
|
|
|
# Enable hypervisor hot-patching.
|
|
|
|
echo 'CONFIG_XSPLICE=y' >> ${WRKSRC}/xen/.config
|
|
|
|
echo 'CONFIG_FAST_SYMBOL_LOOKUP=y' >> ${WRKSRC}/xen/.config
|
|
|
|
|
|
|
|
# The ports native 'build' target cannot be used because it sets
|
|
|
|
# CFLAGS, and that breaks the Xen build system.
|
|
|
|
do-build:
|
|
|
|
${MAKE_CMD} -j${MAKE_JOBS_NUMBER} -C ${WRKSRC}/xen build ${MAKE_ARGS}
|
|
|
|
|
2015-04-01 22:19:41 +00:00
|
|
|
do-install:
|
|
|
|
${MKDIR} ${STAGEDIR}/boot
|
2016-06-03 11:26:09 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/xen/xen ${STAGEDIR}/boot
|
2015-04-02 07:33:38 +00:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/xen.4th ${STAGEDIR}/boot
|
2015-04-01 22:19:41 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|