pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
haxm: Add auxiliary scripts
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Wed Feb 13 05:22:48 2019 +0100
Changeset: 17c62f4c79366165e6eede9089c9c182ee0a6d1e
Modified Files:
haxm/Makefile
haxm/PLIST
Added Files:
haxm/files/haxm-mknod
haxm/files/haxm-modload.in
haxm/files/haxm-modunload
Log Message:
haxm: Add auxiliary scripts
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=17c62f4c79366165e6eede9089c9c182ee0a6d1e
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
haxm/Makefile | 16 ++++++++++++++++
haxm/PLIST | 3 +++
haxm/files/haxm-mknod | 18 ++++++++++++++++++
haxm/files/haxm-modload.in | 3 +++
haxm/files/haxm-modunload | 3 +++
5 files changed, 43 insertions(+)
diffs:
diff --git a/haxm/Makefile b/haxm/Makefile
index 52a68dbd21..353cb74eff 100644
--- a/haxm/Makefile
+++ b/haxm/Makefile
@@ -31,12 +31,28 @@ CFLAGS+= -Wno-error=address-of-packed-member
KMOD= haxm.kmod
KMODULEDIR= stand/${MACHINE}/${OS_VERSION}/modules
+INSTALLATION_DIRS+= sbin # auxiliary scripts
INSTALLATION_DIRS+= ${KMODULEDIR}
PLIST_SUBST+= MACHINE=${MACHINE}
+pre-configure:
+.for file in haxm-mknod haxm-modunload
+ ${CP} ${FILESDIR}/${file} ${WRKSRC}
+.endfor
+ ${SED} \
+ -e 's|@PREFIX@|${PREFIX}|g' \
+ -e 's|@MACHINE@|${MACHINE}|g' \
+ -e 's|@OS_VERSION@|${OS_VERSION}|g' \
+ ${FILESDIR}/haxm-modload.in > ${WRKSRC}/haxm-modload
+
do-install:
${RUN} cd ${WRKSRC}/platforms/netbsd && \
${INSTALL_PROGRAM} ${KMOD} ${DESTDIR}${PREFIX}/${KMODULEDIR}
+.for file in haxm-modload haxm-modunload haxm-mknod
+ ${RUN} cd ${WRKSRC} && \
+ ${INSTALL_SCRIPT} ${file} ${DESTDIR}${PREFIX}/sbin
+.endfor
+
.include "../../mk/bsd.pkg.mk"
diff --git a/haxm/PLIST b/haxm/PLIST
index 6fd1c8c5d7..7104bee5e6 100644
--- a/haxm/PLIST
+++ b/haxm/PLIST
@@ -1,2 +1,5 @@
@comment $NetBSD$
+sbin/haxm-mknod
+sbin/haxm-modload
+sbin/haxm-modunload
stand/${MACHINE}/${OS_VERSION}/modules/haxm.kmod
diff --git a/haxm/files/haxm-mknod b/haxm/files/haxm-mknod
new file mode 100644
index 0000000000..0763adae45
--- /dev/null
+++ b/haxm/files/haxm-mknod
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+echo "*** Creating HAX devices ***"
+mknod /dev/HAX c 220 0
+mkdir /dev/hax_vm
+for i in `seq 0 7`; do mkdir /dev/hax_vm0$i; done
+for i in `seq 0 7`; do mknod /dev/hax_vm/vm0$i c 222 $i; done
+
+echo "*** Creating VCPU Nodes ***"
+i=0
+while [ $i -lt 128 ]; do
+ vm=$(echo "$i/16"|bc)
+ vcpu=$(echo "$i%16"|bc)
+ echo "i=$i vm=$vm vcpu=$vcpu"
+ cmd=$(printf "mknod /dev/hax_vm%02d/vcpu%02d c 221 %d" $vm $vcpu $i)
+ $cmd
+ let "i+=1"
+done
diff --git a/haxm/files/haxm-modload.in b/haxm/files/haxm-modload.in
new file mode 100644
index 0000000000..617c9ded99
--- /dev/null
+++ b/haxm/files/haxm-modload.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+modload @PREFIX@/stand/@MACHINE@/@OS_VERSION@/modules/haxm.kmod
diff --git a/haxm/files/haxm-modunload b/haxm/files/haxm-modunload
new file mode 100644
index 0000000000..9e2e279e33
--- /dev/null
+++ b/haxm/files/haxm-modunload
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+modunload haxm
Home |
Main Index |
Thread Index |
Old Index