Add new port emulators/hyperv-is (FreeBSD 8.4, 9.1, 9.2, 9.3, 10.0)
PR: 182209 Submitted by: kylie (bsdic @ microsoft) The hyperv-is provision a collection of kernel mode drivers as well as user-space daemons to facilitate integration with Hyper-v to provide a feature rich and high performance FreeBSD guest experience. The FreeBSD Integration Service on Hyper-v includes a collection of kernel mode drivers as well as user-space daemons to interact with the drivers that are required to run Hyper-V-specific devices known as FreeBSD Integration Services (BIS). It is to facilitate integration with Hyper-v to provide a feature rich and high performance FreeBSD guest experience. See the man page for a list of binaries and their functions. FreeBSD support for hyperv-is was first added by Microsoft BSD Integration Services Team <bsdic@microsoft.com>.
This commit is contained in:
parent
1bb17cf54a
commit
cdf1c877cf
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=370242
8 changed files with 201 additions and 0 deletions
|
@ -53,6 +53,7 @@
|
|||
SUBDIR += hercules
|
||||
SUBDIR += higan
|
||||
SUBDIR += hugo
|
||||
SUBDIR += hyperv-is
|
||||
SUBDIR += i386-wine
|
||||
SUBDIR += i386-wine-compholio
|
||||
SUBDIR += i386-wine-devel
|
||||
|
|
61
emulators/hyperv-is/Makefile
Normal file
61
emulators/hyperv-is/Makefile
Normal file
|
@ -0,0 +1,61 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= hyperv-is
|
||||
PORTVERSION= 1.1
|
||||
CATEGORIES= kld
|
||||
MASTER_SITES= https://github.com/${MSLINK}/
|
||||
DISTNAME= ${DNAME}
|
||||
|
||||
MAINTAINER= bsdic@microsoft.com
|
||||
COMMENT= FreeBSD Integration Service on Hyper-v
|
||||
|
||||
ONLY_FOR_ARCHS= amd64 i386
|
||||
|
||||
USES+= uidfix
|
||||
BIS= ${PORTVERSION}
|
||||
MSBASE= FreeBSDonHyper-V/Hyperv-Ports/raw/hyperv-is-master
|
||||
MSLINK= ${MSBASE}/BIS-${BIS}/FreeBSD-${OSREL}/ports
|
||||
SUB_FILES= ${PMSG}
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OPSYS} != FreeBSD
|
||||
IGNORE= ${OPSYS} not supported
|
||||
.endif
|
||||
|
||||
.if ${OSREL} == "10.0"
|
||||
BIS= 1.0
|
||||
PLIST_SUB= A="@comment " B=""
|
||||
PMSG= pkg-message.B
|
||||
.else
|
||||
CC= gcc -w
|
||||
WRKSRC= ${WRKDIR}/hyperv-is-${PORTVERSION}
|
||||
PLIST_SUB= B="@comment " A=""
|
||||
PMSG= pkg-message.A
|
||||
.endif
|
||||
|
||||
FILE_84= hyperv-is-8.4.${BIS}
|
||||
FILE_91= hyperv-is-9.1.${BIS}
|
||||
FILE_92= hyperv-is-9.2.${BIS}
|
||||
FILE_93= hyperv-is-9.3.${BIS}
|
||||
FILE_100= hv-kvp-${BIS}
|
||||
DNAME= ${FILE_${OSREL:S/.//}}
|
||||
|
||||
.if empty(DNAME)
|
||||
IGNORE= OSREL ${OSREL} not supported
|
||||
.endif
|
||||
|
||||
pre-install:
|
||||
@${MKDIR} ${STAGEDIR}/boot/kernel \
|
||||
${STAGEDIR}/etc/rc.d \
|
||||
${STAGEDIR}/usr/share/man/man1 \
|
||||
${STAGEDIR}/usr/share/man/man4 \
|
||||
${STAGEDIR}/usr/share/man/man8 \
|
||||
${STAGEDIR}/usr/local/hyperv/scripts \
|
||||
${STAGEDIR}/usr/sbin
|
||||
${MV} ${WRKDIR}/${PMSG} ${WRKDIR}/pkg-message
|
||||
|
||||
post-install:
|
||||
${RM} ${STAGEDIR}/boot/kernel/linker.hints
|
||||
|
||||
.include <bsd.port.post.mk>
|
10
emulators/hyperv-is/distinfo
Normal file
10
emulators/hyperv-is/distinfo
Normal file
|
@ -0,0 +1,10 @@
|
|||
SHA256 (hyperv-is-8.4.1.1.tar.gz) = 21f21bf8192892b823a63ebcea8cfd916ab0572b965c06471388386765346ae6
|
||||
SIZE (hyperv-is-8.4.1.1.tar.gz) = 94356
|
||||
SHA256 (hyperv-is-9.1.1.1.tar.gz) = ab4dc50d4f66ef983bd0de96388ba95e29d1e987362336bf44e3ff971425245a
|
||||
SIZE (hyperv-is-9.1.1.1.tar.gz) = 94286
|
||||
SHA256 (hyperv-is-9.2.1.1.tar.gz) = 75e4ed3ba0c75ce5c67efed7b4f72ada3047f4cc986659b64c14979227292fd5
|
||||
SIZE (hyperv-is-9.2.1.1.tar.gz) = 94294
|
||||
SHA256 (hyperv-is-9.3.1.1.tar.gz) = 10a63b7b2a7bbfd158eed3852b0c25bfba3362c3cec28dfac641e22e61b23587
|
||||
SIZE (hyperv-is-9.3.1.1.tar.gz) = 94296
|
||||
SHA256 (hv-kvp-1.0.tar.gz) = c2c60ae645cae75b25934aae7b18c8a29bf00660a1e4ade5d8f31bb98d7ecc78
|
||||
SIZE (hv-kvp-1.0.tar.gz) = 30815
|
19
emulators/hyperv-is/files/pkg-message.A.in
Normal file
19
emulators/hyperv-is/files/pkg-message.A.in
Normal file
|
@ -0,0 +1,19 @@
|
|||
#############################################################################
|
||||
After installing do the following steps:
|
||||
# Deleting Hyper-v BIS driver names
|
||||
sed -i "" '/Loader labels for Hyper-v BIS driver/d' /boot/loader.conf
|
||||
sed -i "" '/hv_vmbus_load/d' /boot/loader.conf
|
||||
sed -i "" '/hv_utils_load/d' /boot/loader.conf
|
||||
sed -i "" '/hv_storvsc_load/d' /boot/loader.conf
|
||||
sed -i "" '/hv_netvsc_load/d' /boot/loader.conf
|
||||
sed -i "" '/hv_ata_pci_disengage_load/d' /boot/loader.conf
|
||||
|
||||
#Hyper-v driver names
|
||||
echo "# Loader labels for Hyper-v BIS drivers -do not modify" >> /boot/loader.conf
|
||||
echo 'hv_vmbus_load="YES"' >> /boot/loader.conf
|
||||
echo 'hv_utils_load="YES"' >> /boot/loader.conf
|
||||
echo 'hv_storvsc_load="YES"' >> /boot/loader.conf
|
||||
echo 'hv_netvsc_load="YES"' >> /boot/loader.conf
|
||||
echo 'hv_ata_pci_disengage_load="YES"' >>/boot/loader.conf
|
||||
When deinstalled, restore /boot/loader.conf
|
||||
#############################################################################
|
17
emulators/hyperv-is/files/pkg-message.B.in
Normal file
17
emulators/hyperv-is/files/pkg-message.B.in
Normal file
|
@ -0,0 +1,17 @@
|
|||
#############################################################################
|
||||
To enable hv_kvp, you should do the steps following:
|
||||
# Deleting kvp label
|
||||
sed -i "" '/Loader labels for Hyper-V KVP drivers/d' /etc/rc.conf
|
||||
sed -i "" '/hv_kvp_load/d' /etc/rc.conf
|
||||
|
||||
#hyperv driver names
|
||||
echo '# Loader labels for Hyper-V KVP drivers -do not modify' >> /boot/loader.conf
|
||||
echo 'hv_kvp_load="YES"' >> /boot/loader.conf
|
||||
|
||||
# KVP - daemon label
|
||||
sed -i "" '/Label for KVP daemon/d' /etc/rc.conf
|
||||
sed -i "" '/hv_kvp_daemon_enable/d' /etc/rc.conf
|
||||
echo '# Label for KVP daemon -do not modify' >> /etc/rc.conf
|
||||
echo 'hv_kvp_daemon_enable="YES"' >> /etc/rc.conf
|
||||
After deinstall, you should restore /boot/loader.conf and /etc/rc.conf
|
||||
#############################################################################
|
13
emulators/hyperv-is/pkg-descr
Normal file
13
emulators/hyperv-is/pkg-descr
Normal file
|
@ -0,0 +1,13 @@
|
|||
The hyperv-is provision a collection of kernel mode drivers as well as
|
||||
user-space daemons to facilitate integration with Hyper-v to provide a
|
||||
feature rich and high performance FreeBSD guest experience.
|
||||
|
||||
The FreeBSD Integration Service on Hyper-v includes a collection of kernel
|
||||
mode drivers as well as user-space daemons to interact with the drivers
|
||||
that are required to run Hyper-V-specific devices known as FreeBSD
|
||||
Integration Services (BIS). It is to facilitate integration with Hyper-v
|
||||
to provide a feature rich and high performance FreeBSD guest experience.
|
||||
See the man page for a list of binaries and their functions.
|
||||
|
||||
FreeBSD support for hyperv-is was first added by Microsoft BSD Integration
|
||||
Services Team <bsdic@microsoft.com>.
|
55
emulators/hyperv-is/pkg-install
Normal file
55
emulators/hyperv-is/pkg-install
Normal file
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# make install or pkg_add script
|
||||
# Checks labels/gptids for roots and swap partitions
|
||||
# adds hyperv labels in loader.conf
|
||||
#
|
||||
|
||||
#Check poudriere workdirs
|
||||
POD_WRK_HOME=/wrkdirs
|
||||
if [ ! -d ${POD_WRK_HOME} ]; then
|
||||
POD_WRK_HOME=/
|
||||
fi
|
||||
|
||||
WRKDIRS=${POD_WRK_HOME}$(pwd |awk '{print $1}')/work/stage
|
||||
if [ ! -d ${WRKDIRS} ]; then
|
||||
WRKDIRS=/
|
||||
fi
|
||||
|
||||
if [ "$2" = "PRE-INSTALL" ]; then
|
||||
echo "===> Pre-install Check"
|
||||
|
||||
#rootfs check
|
||||
root_flag=$(mount | awk '/ on \/ / { print $1 }' | cut -d / -f3-)
|
||||
if [ "$root_flag" != "" ]; then
|
||||
fs_test=$(glabel status | awk '{print $1}' | grep $root_flag)
|
||||
if [ "$fs_test" == "" ]; then
|
||||
echo " xxx rootfs Label/gptid missing in fstab"
|
||||
fi
|
||||
else
|
||||
echo " xxx rootfs Label/gptid missing in fstab"
|
||||
fi
|
||||
#swap check
|
||||
[ -f /etc/fstab ] && swap_flag=$(grep swap /etc/fstab | awk '{print $1}' | cut -d / -f3-)
|
||||
if [ "$swap_flag" != "" ]; then
|
||||
sw_test=$(glabel status | awk '{print $1}' | grep $swap_flag)
|
||||
if [ "$sw_test" == "" ]; then
|
||||
echo " xxx swap Label/gptid missing in fstab"
|
||||
fi
|
||||
else
|
||||
echo " xxx swap Label/gptid missing in fstab "
|
||||
fi
|
||||
|
||||
if [ "$fs_test" != "" -a "$sw_test" != "" ]; then
|
||||
echo "===> Labels/gptids Found"
|
||||
echo "===> Hyper-V BIS Installation Continues"
|
||||
else
|
||||
echo "===> Labels/gptids Not found"
|
||||
echo "===> Hyper-V BIS Installation Aborted"
|
||||
echo "===> Refer to Disk UUID section in README document"
|
||||
echo "===> Please refer the Prerequisites page and complete all steps"
|
||||
echo "WWW: https://github.com/FreeBSDonHyper-V/Hyperv-Ports/wiki/Prerequisites "
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
exit 0
|
25
emulators/hyperv-is/pkg-plist
Normal file
25
emulators/hyperv-is/pkg-plist
Normal file
|
@ -0,0 +1,25 @@
|
|||
hyperv/scripts/hv_get_dhcp_info
|
||||
hyperv/scripts/hv_get_dns_info
|
||||
hyperv/scripts/hv_set_ifconfig
|
||||
@cwd /boot/kernel
|
||||
%%A%%hv_ata_pci_disengage.ko
|
||||
%%A%%hv_netvsc.ko
|
||||
%%A%%hv_storvsc.ko
|
||||
%%A%%hv_utils.ko
|
||||
%%A%%hv_vmbus.ko
|
||||
%%B%%hv_kvp.ko
|
||||
@cwd /etc/rc.d
|
||||
hv_kvpd
|
||||
%%A%%@cwd /usr/share/man/man1
|
||||
%%A%%hyperv-is.1.gz
|
||||
%%B%%@cwd /usr/sbin
|
||||
%%B%%hv_kvp_daemon
|
||||
@cwd /usr/share/man/man4
|
||||
%%A%%hv_ata_pci_disengage.4.gz
|
||||
hv_kvp.4.gz
|
||||
%%A%%hv_netvsc.4.gz
|
||||
%%A%%hv_storvsc.4.gz
|
||||
%%A%%hv_utils.4.gz
|
||||
%%A%%hv_vmbus.4.gz
|
||||
%%B%%@cwd /usr/share/man/man8
|
||||
%%B%%hv_kvp_daemon.8.gz
|
Loading…
Reference in a new issue