- Clean up and minor fixes

- Make portlint satisfy
  - Avoid creating files out of WRKDIR
  - Remove the void directory "patch" (What ever was this?)
  - Adjust whitespace
  - Fix some ungrammatical wordings
  - Modify COMMENT and DESCR
- Drop fakeprocfs support due to the import of Linux procfs to the base system
- Show MESSAGE after installation
- Change maintainer to the -emulation list because:
  - Vladimir seems too busy or unreachable these days
  - This port depends very much on Linux compatibility stuff
- Get it to check if the system has Linux procfs module and stop if not

PR:		ports/16960 (add WWW to DESCR)
No response by:	maintainer
This commit is contained in:
Akinori MUSHA 2000-03-25 20:24:32 +00:00
parent 403c782e43
commit 9225c521c3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=27045
28 changed files with 606 additions and 294 deletions

View file

@ -1,14 +1,14 @@
# ports collection makefile for: VMware For Linux # ports collection makefile for: VMware 1.1.2 for Linux
# Version required: 1.1.1 # Version required: 1.1.2
# Date created: Fri 26 Nov 19:16:47 EST 1999 # Date created: Fri 26 Nov 19:16:47 EST 1999
# Whom: vns@delta.odessa.ua # Whom: vns@delta.odessa.ua
# #
# $vmFreeBSD: vmware/vmmon-only/freebsd/port/Makefile,v 1.8 1999/12/17 00:38:27 vsilyaev Exp $
# $FreeBSD$ # $FreeBSD$
# $vmFreeBSD: vmware/vmmon-only/freebsd/port/Makefile,v 1.8 1999/12/17 00:38:27 vsilyaev Exp $
# #
DISTNAME= VMware-1.1.2-364 DISTNAME= VMware-1.1.2-364
PKGNAME= vmware-1.1.2 PKGNAME= vmware-1.1.2.364
CATEGORIES= emulators linux CATEGORIES= emulators linux
MASTER_SITES= http://www4.vmware.com/software/ \ MASTER_SITES= http://www4.vmware.com/software/ \
http://vmware-svca.www.conxion.com/software/ \ http://vmware-svca.www.conxion.com/software/ \
@ -24,54 +24,54 @@ PATCH_SITES= http://www.mindspring.com/~vsilyaev/vmware/files/ \
PATCHFILES= vmmon-freebsd-0.94.tar.gz \ PATCHFILES= vmmon-freebsd-0.94.tar.gz \
vmnet-freebsd-0.10.tar.gz vmnet-freebsd-0.10.tar.gz
MAINTAINER= vns@delta.odessa.ua MAINTAINER= freebsd-emulation@FreeBSD.org
RUN_DEPENDS= ${LINUX_DIR}/lib/libc.so.6:${PORTSDIR}/emulators/linux_base RUN_DEPENDS= ${LINUX_DIR}/lib/libc.so.6:${PORTSDIR}/emulators/linux_base
IS_INTERACTIVE= yes # vmnet-freebsd-* querries user for network settings RESTRICTED= "Not sure if we can redistribute it"
ONLY_FOR_ARCHS= i386 LINUX_DIR= /compat/linux
VMDIR= ${PREFIX}/lib/vmware
ONLY_FOR_ARCHS= i386
USE_XLIB= yes USE_XLIB= yes
WRKSRC= ${WRKDIR}/vmware-distrib WRKSRC= ${WRKDIR}/vmware-distrib
LINUX_DIR= /compat/linux GZCAT= ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/extract
MAN1= vmware.1 MAN1= vmware.1
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${OSVERSION} < 400013 .if ${OSVERSION} < 400013
BROKEN= YES BROKEN= "Systems prior to 400013 is out of support"
.endif .endif
.if exists(${MASTERDIR}/Makefile.inc.net) .if exists(/modules/linprocfs.ko) || exists(${PREFIX}/modules/linprocfs.ko)
.include "${MASTERDIR}/Makefile.inc.net" HAVE_LINPROCFS= yes
.endif .endif
.if exists(${MASTERDIR}/Makefile.inc.linproc) .if !defined(HAVE_LINPROCFS)
.include "${MASTERDIR}/Makefile.inc.linproc" BROKEN= "You need Linux procfs to run this software"
.endif .endif
VMSUBDIR= lib/vmware .if exists(${WRKDIRPREFIX}${.CURDIR}/work/Makefile.inc.net)
VMDIR= ${PREFIX}/${VMSUBDIR} .include "${WRKDIRPREFIX}${.CURDIR}/work/Makefile.inc.net"
SCRIPTS_ENV+= LINUX_DIR=${LINUX_DIR} \ .endif
VMNET_HOST_IP=${VMNET_HOST_IP} \
VMNET_NETMASK=${VMNET_NETMASK}
MAKE_ARGS= "KMODDIR=${VMDIR}/lib/modules" SCRIPTS_ENV+= LINUX_DIR="${LINUX_DIR}" \
VMNET_HOST_IP="${VMNET_HOST_IP}" \
# Small hack for alternate processing patchfiles VMNET_NETMASK="${VMNET_NETMASK}"
GZCAT= ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/extract MAKE_ARGS= KMODDIR="${VMDIR}/lib/modules"
post-patch: post-patch:
@${CP} ${FILESDIR}/Makefile ${WRKSRC} ${CP} ${FILESDIR}/Makefile ${WRKSRC}
setoptions: setoptions:
${SED} -e 's;@@PREFIX@@;${PREFIX};' ${FILESDIR}/vmware > ${WRKDIR}/vmware ${SED} -e 's;@@PREFIX@@;${PREFIX};' \
${SED} -e 's;@@PREFIX@@;${PREFIX};' \
-e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \ -e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \
-e 's;@@NETMASK@@;${VMNET_NETMASK};' \ -e 's;@@NETMASK@@;${VMNET_NETMASK};' \
${FILESDIR}/config > ${WRKDIR}/config ${FILESDIR}/config > ${WRKDIR}/config
${SED} -e 's;@@PREFIX@@;${PREFIX};' \ ${SED} -e 's;@@PREFIX@@;${PREFIX};' \
-e 's;@@NETWORKING@@;${VMNET_NETWORKING};' \ -e 's;@@NETWORKING@@;${VMNET_NETWORKING};' \
-e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \ -e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \
-e 's;@@NETMASK@@;${VMNET_NETMASK};' \ -e 's;@@NETMASK@@;${VMNET_NETMASK};' \
@ -87,7 +87,6 @@ pre-install: setoptions
${INSTALL_SCRIPT} ${WRKDIR}/vmware.sh ${PREFIX}/etc/rc.d ${INSTALL_SCRIPT} ${WRKDIR}/vmware.sh ${PREFIX}/etc/rc.d
${MKDIR} ${VMDIR}/bin ${MKDIR} ${VMDIR}/bin
${INSTALL_SCRIPT} ${FILESDIR}/fakeprocfs.sh ${VMDIR}/bin
${INSTALL_SCRIPT} ${FILESDIR}/df ${VMDIR}/bin ${INSTALL_SCRIPT} ${FILESDIR}/df ${VMDIR}/bin
[ -f ${LINUX_DIR}/bin/df ] || ${LN} -s ${VMDIR}/bin/df ${LINUX_DIR}/bin/ [ -f ${LINUX_DIR}/bin/df ] || ${LN} -s ${VMDIR}/bin/df ${LINUX_DIR}/bin/
${INSTALL_SCRIPT} ${WRKSRC}/bin/*.pl ${VMDIR}/bin ${INSTALL_SCRIPT} ${WRKSRC}/bin/*.pl ${VMDIR}/bin
@ -95,15 +94,10 @@ pre-install: setoptions
vmnet-bridge vmnet-dhcpd vmnet-sniffer \ vmnet-bridge vmnet-dhcpd vmnet-sniffer \
vmware-loop vmware-ping vmware-wizard \ vmware-loop vmware-ping vmware-wizard \
; do \ ; do \
${INSTALL_SCRIPT} ${WRKSRC}/bin/$${i} ${VMDIR}/bin; \ ${INSTALL_SCRIPT} ${WRKSRC}/bin/$${i} ${VMDIR}/bin; \
done done
.if defined(USE_LINPROC)
${INSTALL_SCRIPT} -m 4555 ${WRKSRC}/bin/vmware ${VMDIR}/bin ${INSTALL_SCRIPT} -m 4555 ${WRKSRC}/bin/vmware ${VMDIR}/bin
${LN} -s ${VMDIR}/bin/vmware ${PREFIX}/bin/ ${LN} -s ${VMDIR}/bin/vmware ${PREFIX}/bin/
.else
${INSTALL_SCRIPT} ${WRKSRC}/bin/vmware ${VMDIR}/bin
${INSTALL_SCRIPT} ${WRKDIR}/vmware ${PREFIX}/bin
.endif
${MKDIR} ${VMDIR}/lib ${MKDIR} ${VMDIR}/lib
${INSTALL_DATA} ${WRKSRC}/lib/config ${VMDIR}/lib ${INSTALL_DATA} ${WRKSRC}/lib/config ${VMDIR}/lib
${MKDIR} ${VMDIR}/lib/help ${MKDIR} ${VMDIR}/lib/help
@ -117,18 +111,7 @@ pre-install: setoptions
.endif .endif
post-install: post-install:
@${LN} -s ${PREFIX}/etc/vmware /etc/vmware ${LN} -s ${PREFIX}/etc/vmware /etc/vmware
.if !defined(BATCH) @${CAT} ${PKGMESSAGE}
@${ECHO} "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
@${ECHO} "Before launch vmware, execute the next command"
@${ECHO} ${PREFIX}/etc/rc.d/vmware.sh start
@${ECHO}
@${ECHO} "to load required kernel modules"
@${ECHO} "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
.endif
pre-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc.linproc \
${WRKDIRPREFIX}${.CURDIR}/Makefile.inc.net
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View file

@ -1,5 +1,5 @@
# $FreeBSD$ # $FreeBSD$
SUBDIR= vmmon-only vmnet-only/freebsd SUBDIR= vmmon-only vmnet-only/freebsd
.include <bsd.subdir.mk> .include <bsd.subdir.mk>

View file

@ -3,7 +3,6 @@
# Start or stop vmware # Start or stop vmware
# #
# $FreeBSD$ # $FreeBSD$
#
vmware_dir=@@PREFIX@@/lib/vmware vmware_dir=@@PREFIX@@/lib/vmware
networking=@@NETWORKING@@ networking=@@NETWORKING@@
@ -14,27 +13,27 @@ netmask=@@NETMASK@@
exec >/dev/null exec >/dev/null
case $1 in case $1 in
start) start)
kldload ${vmware_dir}/lib/modules/vmmon.ko kldload ${vmware_dir}/lib/modules/vmmon.ko
if [ $networking -eq 1 ]; then if [ $networking -eq 1 ]; then
kldload ${vmware_dir}/lib/modules/vmnet.ko kldload ${vmware_dir}/lib/modules/vmnet.ko
echo -n >/dev/vmnet1 echo -n >/dev/vmnet1
ifconfig vmnet1 $host_ip netmask $netmask ifconfig vmnet1 $host_ip netmask $netmask
fi fi
echo -n " VMware" >/dev/tty echo -n " VMware" >/dev/tty
;; ;;
stop) stop)
kldunload vmmon kldunload vmmon
if [ $networking -eq 1 ]; then if [ $networking -eq 1 ]; then
ifconfig vmnet1 down ifconfig vmnet1 down
ifconfig vmnet1 delete $host_ip ifconfig vmnet1 delete $host_ip
kldunload vmnet kldunload vmnet
fi fi
;; ;;
*) *)
echo "usage: `basename $0` {start|stop}" >&2 echo "usage: `basename $0` {start|stop}" >&2
exit 64 exit 64
;; ;;
esac esac

View file

@ -1 +1 @@
VMware virtual machine emulator A virtual machine emulator - a full PC in a window

View file

@ -1,4 +1,14 @@
This is the Linux version of the VMware virtual machine emulator made to This is the Linux version of the VMware virtual machine emulator made
run on FreeBSD using the Linux compatibility mode. VMware can be used to to run on FreeBSD using the Linux compatibility mode. VMware can be
run IBM's OS/2, Microsoft Windows 95/98, Microsoft NT, Linux, or any other used to run Microsoft MS-DOS, Windows 95/98/NT/2000, Linux, FreeBSD,
operating system that runs on the i486. or any other operating system that runs on the i486.
Official VMware, Inc. web site:
WWW: http://www.vmware.com/
We all are thankful to Vladimir N. Silyaev for porting vmmon/vmnet
modules to FreeBSD. Have a look at his page for the latest
information:
http://www.mindspring.com/~vsilyaev/vmware/

View file

@ -0,0 +1,13 @@
************************************************************
Add the following entry to /etc/fstab:
linproc /compat/linux/proc linprocfs rw 0 0
and you can play with VMware after the next boot.
Or hit the following commands to play now. :)
/sbin/mount_linprocfs linproc /compat/linux/proc
/usr/local/etc/rc.d/vmware.sh start
************************************************************

View file

@ -1,7 +1,7 @@
bin/vmware bin/vmware
etc/rc.d/vmware.sh
etc/vmware/config etc/vmware/config
lib/vmware/bin/df lib/vmware/bin/df
lib/vmware/bin/fakeprocfs.sh
lib/vmware/bin/vmware lib/vmware/bin/vmware
lib/vmware/bin/vmnet-bridge lib/vmware/bin/vmnet-bridge
lib/vmware/bin/vmnet-dhcpd lib/vmware/bin/vmnet-dhcpd
@ -113,7 +113,7 @@ share/doc/vmware/README.FreeBSD
@exec ln -s %D/etc/vmware /etc/vmware @exec ln -s %D/etc/vmware /etc/vmware
@exec mknod /dev/vmmon c 200 0 @exec mknod /dev/vmmon c 200 0
@exec mknod /dev/vmnet1 c 201 1 @exec mknod /dev/vmnet1 c 201 1
@unexec rm -f /etc/vmware /dev/vmmon /dev/vmnet1 /compat/linux/dev/tty[0-9]* /compat/linux/dev/hd? @unexec rm -f /etc/vmware /dev/vmmon /dev/vmnet1 /compat/linux/bin/df /compat/linux/dev/tty[0-9]* /compat/linux/dev/hd?
@dirrm etc/vmware @dirrm etc/vmware
@dirrm lib/vmware/bin @dirrm lib/vmware/bin
@dirrm lib/vmware/lib/help @dirrm lib/vmware/lib/help

View file

@ -1,5 +1,104 @@
#!/bin/sh #!/bin/sh
mkdir -p ${WRKDIRPREFIX}${CURDIR}
. `dirname $0`/configure.linproc
. `dirname $0`/configure.net
[ "_$VMNET_HOST_IP" = _ ] && VMNET_HOST_IP="192.168.254.1"
[ "_$VMNET_NETMASK" = _ ] && VMNET_NETMASK="255.255.255.0"
host_ip=$VMNET_HOST_IP
netmask=$VMNET_NETMASK
title="VMware network options"
get_network_settings() {
result=`/usr/bin/dialog --title "$title" --clear --inputbox \
"\n"\
"What will be the IP address of your host on your private network?:"\
10 40 $host_ip \
2>&1 >/dev/tty `
case $? in
0)
if [ -z "$result" ]; then
return 1
fi
host_ip=$result
;;
1)
return 1
;;
esac
result=`/usr/bin/dialog --title "$title" --clear --inputbox \
"\n"\
"What will be the netmask of your private network?:"\
10 40 $netmask \
2>&1 >/dev/tty `
case $? in
0)
if [ -z "$result" ]; then
return 1
fi
netmask=$result
;;
1)
return 1
;;
esac
return 0;
}
do_network() {
while true; do
get_network_settings
/usr/bin/dialog --title "Confirmation" --clear --yesno \
"\n"\
"Are the following options correct?\n\n"\
"IP address: $host_ip\n"\
"Netmask: $netmask\n"\
10 40
[ $? -eq 0 ] && return 0
/usr/bin/dialog --title "Confirmation" --clear --yesno \
"\n"\
"Do you want to edit network options again?\n"\
10 40
[ $? -eq 0 ] && continue
/usr/bin/dialog --title "Confirmation" --clear --yesno \
"\n"\
"Do you want to continue without networking?\n"\
10 50
[ $? -eq 0 ] && return 1
host_ip=$VMNET_HOST_IP
netmask=$VMNET_NETMASK
return 0;
done
}
networking=0
if [ _$BATCH = _ ]; then
do_network
if [ $? -eq 0 ]; then
networking=1
/usr/bin/dialog --title "$title" --infobox \
"\n"\
"The following options will be used.\n\n"\
"IP address: $host_ip\n"\
"Netmask: $netmask\n"\
10 40
fi
else #BATCH
[ -f ${WRKDIR}/Makefile.inc.net ] && exit
fi #BATCH
(
exec > ${WRKDIR}/Makefile.inc.net
echo '#' `date`
echo VMNET_HOST_IP=$host_ip
echo VMNET_NETMASK=$netmask
[ $networking -ne 0 ] && echo VMNET_NETWORKING=1
)

View file

@ -1,26 +1,23 @@
#!/bin/sh #!/bin/sh
#exec 1>&2
#echo $@
#env
case $1 in case $1 in
vmmon*) vmmon*)
target=vmmon target=vmmon
;; ;;
vmnet*) vmnet*)
target=vmnet target=vmnet
;; ;;
*) *)
echo unknown patch $1 echo unknown patch $1
exit 64 exit 64
;; ;;
esac esac
dir=${WRKSRC}/lib/modules/source dir=${WRKSRC}/lib/modules/source
tar -xf ${dir}/${target}.tar -C ${WRKSRC} tar -xf ${dir}/${target}.tar -C ${WRKSRC}
tar -zxf $1 -C ${WRKSRC} tar -zxf $1 -C ${WRKSRC}
if [ $target = vmmon ] ; then if [ $target = vmmon ] ; then
Makefile=${WRKSRC}/vmmon-only/Makefile Makefile=${WRKSRC}/vmmon-only/Makefile
mv ${Makefile}.FreeBSD $Makefile mv ${Makefile}.FreeBSD $Makefile
fi fi
cat ${WRKSRC}/${target}-freebsd.diff cat ${WRKSRC}/${target}-freebsd.diff

View file

@ -1,15 +1,16 @@
#!/bin/sh #!/bin/sh
echo Setup Linux compatible /dev directory
echo Setup Linux compatible /dev directory
linux_dev=${LINUX_DIR}/dev linux_dev=${LINUX_DIR}/dev
if [ \! -d $linux_dev ]; then if [ ! -d $linux_dev ]; then
echo Creating $linux_dev echo Creating $linux_dev
mkdir $linux_dev mkdir $linux_dev
chown root:wheel $linux_dev chown root:wheel $linux_dev
chmod 755 $linux_dev chmod 755 $linux_dev
fi fi
echo Creating $linux_dev/tty\? echo Creating $linux_dev/tty\?
for n in 0 1 2 3 4 5 6 7 8 9; do for n in 0 1 2 3 4 5 6 7 8 9; do
ln -s /dev/ttyv$n $linux_dev/tty`expr 1 + $n`; ln -s /dev/ttyv$n $linux_dev/tty`expr 1 + $n`;
done done
ln -s /dev/ttyva ${linux_dev}/tty11 ln -s /dev/ttyva ${linux_dev}/tty11
ln -s /dev/ttyvb ${linux_dev}/tty12 ln -s /dev/ttyvb ${linux_dev}/tty12
@ -17,7 +18,7 @@ ln -s ${linux_dev}/tty1 ${linux_dev}/tty0
echo Creating $linux_dev/hd\? echo Creating $linux_dev/hd\?
mknod ${linux_dev}/hda b 0 0x00010002 mknod ${linux_dev}/hda b 0 0x00010002
mknod ${linux_dev}/hdb b 0 0x0001000a mknod ${linux_dev}/hdb b 0 0x0001000a
# Not enable wd2-3, because vmware-wizard locked, when # Do not enable below, because vmware-wizard is locked when
# doing something like access("/dev/hdc"...) # doing something like access("/dev/hdc"...)
#mknod ${linux_dev}/hdc b 0 0x00010012 #mknod ${linux_dev}/hdc b 0 0x00010012
#mknod ${linux_dev}/hdd b 0 0x0001001a #mknod ${linux_dev}/hdd b 0 0x0001001a

View file

@ -1,14 +1,14 @@
# ports collection makefile for: VMware For Linux # ports collection makefile for: VMware 1.1.2 for Linux
# Version required: 1.1.1 # Version required: 1.1.2
# Date created: Fri 26 Nov 19:16:47 EST 1999 # Date created: Fri 26 Nov 19:16:47 EST 1999
# Whom: vns@delta.odessa.ua # Whom: vns@delta.odessa.ua
# #
# $vmFreeBSD: vmware/vmmon-only/freebsd/port/Makefile,v 1.8 1999/12/17 00:38:27 vsilyaev Exp $
# $FreeBSD$ # $FreeBSD$
# $vmFreeBSD: vmware/vmmon-only/freebsd/port/Makefile,v 1.8 1999/12/17 00:38:27 vsilyaev Exp $
# #
DISTNAME= VMware-1.1.2-364 DISTNAME= VMware-1.1.2-364
PKGNAME= vmware-1.1.2 PKGNAME= vmware-1.1.2.364
CATEGORIES= emulators linux CATEGORIES= emulators linux
MASTER_SITES= http://www4.vmware.com/software/ \ MASTER_SITES= http://www4.vmware.com/software/ \
http://vmware-svca.www.conxion.com/software/ \ http://vmware-svca.www.conxion.com/software/ \
@ -24,54 +24,54 @@ PATCH_SITES= http://www.mindspring.com/~vsilyaev/vmware/files/ \
PATCHFILES= vmmon-freebsd-0.94.tar.gz \ PATCHFILES= vmmon-freebsd-0.94.tar.gz \
vmnet-freebsd-0.10.tar.gz vmnet-freebsd-0.10.tar.gz
MAINTAINER= vns@delta.odessa.ua MAINTAINER= freebsd-emulation@FreeBSD.org
RUN_DEPENDS= ${LINUX_DIR}/lib/libc.so.6:${PORTSDIR}/emulators/linux_base RUN_DEPENDS= ${LINUX_DIR}/lib/libc.so.6:${PORTSDIR}/emulators/linux_base
IS_INTERACTIVE= yes # vmnet-freebsd-* querries user for network settings RESTRICTED= "Not sure if we can redistribute it"
ONLY_FOR_ARCHS= i386 LINUX_DIR= /compat/linux
VMDIR= ${PREFIX}/lib/vmware
ONLY_FOR_ARCHS= i386
USE_XLIB= yes USE_XLIB= yes
WRKSRC= ${WRKDIR}/vmware-distrib WRKSRC= ${WRKDIR}/vmware-distrib
LINUX_DIR= /compat/linux GZCAT= ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/extract
MAN1= vmware.1 MAN1= vmware.1
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${OSVERSION} < 400013 .if ${OSVERSION} < 400013
BROKEN= YES BROKEN= "Systems prior to 400013 is out of support"
.endif .endif
.if exists(${MASTERDIR}/Makefile.inc.net) .if exists(/modules/linprocfs.ko) || exists(${PREFIX}/modules/linprocfs.ko)
.include "${MASTERDIR}/Makefile.inc.net" HAVE_LINPROCFS= yes
.endif .endif
.if exists(${MASTERDIR}/Makefile.inc.linproc) .if !defined(HAVE_LINPROCFS)
.include "${MASTERDIR}/Makefile.inc.linproc" BROKEN= "You need Linux procfs to run this software"
.endif .endif
VMSUBDIR= lib/vmware .if exists(${WRKDIRPREFIX}${.CURDIR}/work/Makefile.inc.net)
VMDIR= ${PREFIX}/${VMSUBDIR} .include "${WRKDIRPREFIX}${.CURDIR}/work/Makefile.inc.net"
SCRIPTS_ENV+= LINUX_DIR=${LINUX_DIR} \ .endif
VMNET_HOST_IP=${VMNET_HOST_IP} \
VMNET_NETMASK=${VMNET_NETMASK}
MAKE_ARGS= "KMODDIR=${VMDIR}/lib/modules" SCRIPTS_ENV+= LINUX_DIR="${LINUX_DIR}" \
VMNET_HOST_IP="${VMNET_HOST_IP}" \
# Small hack for alternate processing patchfiles VMNET_NETMASK="${VMNET_NETMASK}"
GZCAT= ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/extract MAKE_ARGS= KMODDIR="${VMDIR}/lib/modules"
post-patch: post-patch:
@${CP} ${FILESDIR}/Makefile ${WRKSRC} ${CP} ${FILESDIR}/Makefile ${WRKSRC}
setoptions: setoptions:
${SED} -e 's;@@PREFIX@@;${PREFIX};' ${FILESDIR}/vmware > ${WRKDIR}/vmware ${SED} -e 's;@@PREFIX@@;${PREFIX};' \
${SED} -e 's;@@PREFIX@@;${PREFIX};' \
-e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \ -e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \
-e 's;@@NETMASK@@;${VMNET_NETMASK};' \ -e 's;@@NETMASK@@;${VMNET_NETMASK};' \
${FILESDIR}/config > ${WRKDIR}/config ${FILESDIR}/config > ${WRKDIR}/config
${SED} -e 's;@@PREFIX@@;${PREFIX};' \ ${SED} -e 's;@@PREFIX@@;${PREFIX};' \
-e 's;@@NETWORKING@@;${VMNET_NETWORKING};' \ -e 's;@@NETWORKING@@;${VMNET_NETWORKING};' \
-e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \ -e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \
-e 's;@@NETMASK@@;${VMNET_NETMASK};' \ -e 's;@@NETMASK@@;${VMNET_NETMASK};' \
@ -87,7 +87,6 @@ pre-install: setoptions
${INSTALL_SCRIPT} ${WRKDIR}/vmware.sh ${PREFIX}/etc/rc.d ${INSTALL_SCRIPT} ${WRKDIR}/vmware.sh ${PREFIX}/etc/rc.d
${MKDIR} ${VMDIR}/bin ${MKDIR} ${VMDIR}/bin
${INSTALL_SCRIPT} ${FILESDIR}/fakeprocfs.sh ${VMDIR}/bin
${INSTALL_SCRIPT} ${FILESDIR}/df ${VMDIR}/bin ${INSTALL_SCRIPT} ${FILESDIR}/df ${VMDIR}/bin
[ -f ${LINUX_DIR}/bin/df ] || ${LN} -s ${VMDIR}/bin/df ${LINUX_DIR}/bin/ [ -f ${LINUX_DIR}/bin/df ] || ${LN} -s ${VMDIR}/bin/df ${LINUX_DIR}/bin/
${INSTALL_SCRIPT} ${WRKSRC}/bin/*.pl ${VMDIR}/bin ${INSTALL_SCRIPT} ${WRKSRC}/bin/*.pl ${VMDIR}/bin
@ -95,15 +94,10 @@ pre-install: setoptions
vmnet-bridge vmnet-dhcpd vmnet-sniffer \ vmnet-bridge vmnet-dhcpd vmnet-sniffer \
vmware-loop vmware-ping vmware-wizard \ vmware-loop vmware-ping vmware-wizard \
; do \ ; do \
${INSTALL_SCRIPT} ${WRKSRC}/bin/$${i} ${VMDIR}/bin; \ ${INSTALL_SCRIPT} ${WRKSRC}/bin/$${i} ${VMDIR}/bin; \
done done
.if defined(USE_LINPROC)
${INSTALL_SCRIPT} -m 4555 ${WRKSRC}/bin/vmware ${VMDIR}/bin ${INSTALL_SCRIPT} -m 4555 ${WRKSRC}/bin/vmware ${VMDIR}/bin
${LN} -s ${VMDIR}/bin/vmware ${PREFIX}/bin/ ${LN} -s ${VMDIR}/bin/vmware ${PREFIX}/bin/
.else
${INSTALL_SCRIPT} ${WRKSRC}/bin/vmware ${VMDIR}/bin
${INSTALL_SCRIPT} ${WRKDIR}/vmware ${PREFIX}/bin
.endif
${MKDIR} ${VMDIR}/lib ${MKDIR} ${VMDIR}/lib
${INSTALL_DATA} ${WRKSRC}/lib/config ${VMDIR}/lib ${INSTALL_DATA} ${WRKSRC}/lib/config ${VMDIR}/lib
${MKDIR} ${VMDIR}/lib/help ${MKDIR} ${VMDIR}/lib/help
@ -117,18 +111,7 @@ pre-install: setoptions
.endif .endif
post-install: post-install:
@${LN} -s ${PREFIX}/etc/vmware /etc/vmware ${LN} -s ${PREFIX}/etc/vmware /etc/vmware
.if !defined(BATCH) @${CAT} ${PKGMESSAGE}
@${ECHO} "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
@${ECHO} "Before launch vmware, execute the next command"
@${ECHO} ${PREFIX}/etc/rc.d/vmware.sh start
@${ECHO}
@${ECHO} "to load required kernel modules"
@${ECHO} "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
.endif
pre-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc.linproc \
${WRKDIRPREFIX}${.CURDIR}/Makefile.inc.net
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View file

@ -1,5 +1,5 @@
# $FreeBSD$ # $FreeBSD$
SUBDIR= vmmon-only vmnet-only/freebsd SUBDIR= vmmon-only vmnet-only/freebsd
.include <bsd.subdir.mk> .include <bsd.subdir.mk>

View file

@ -3,7 +3,6 @@
# Start or stop vmware # Start or stop vmware
# #
# $FreeBSD$ # $FreeBSD$
#
vmware_dir=@@PREFIX@@/lib/vmware vmware_dir=@@PREFIX@@/lib/vmware
networking=@@NETWORKING@@ networking=@@NETWORKING@@
@ -14,27 +13,27 @@ netmask=@@NETMASK@@
exec >/dev/null exec >/dev/null
case $1 in case $1 in
start) start)
kldload ${vmware_dir}/lib/modules/vmmon.ko kldload ${vmware_dir}/lib/modules/vmmon.ko
if [ $networking -eq 1 ]; then if [ $networking -eq 1 ]; then
kldload ${vmware_dir}/lib/modules/vmnet.ko kldload ${vmware_dir}/lib/modules/vmnet.ko
echo -n >/dev/vmnet1 echo -n >/dev/vmnet1
ifconfig vmnet1 $host_ip netmask $netmask ifconfig vmnet1 $host_ip netmask $netmask
fi fi
echo -n " VMware" >/dev/tty echo -n " VMware" >/dev/tty
;; ;;
stop) stop)
kldunload vmmon kldunload vmmon
if [ $networking -eq 1 ]; then if [ $networking -eq 1 ]; then
ifconfig vmnet1 down ifconfig vmnet1 down
ifconfig vmnet1 delete $host_ip ifconfig vmnet1 delete $host_ip
kldunload vmnet kldunload vmnet
fi fi
;; ;;
*) *)
echo "usage: `basename $0` {start|stop}" >&2 echo "usage: `basename $0` {start|stop}" >&2
exit 64 exit 64
;; ;;
esac esac

View file

@ -1 +1 @@
VMware virtual machine emulator A virtual machine emulator - a full PC in a window

View file

@ -1,4 +1,14 @@
This is the Linux version of the VMware virtual machine emulator made to This is the Linux version of the VMware virtual machine emulator made
run on FreeBSD using the Linux compatibility mode. VMware can be used to to run on FreeBSD using the Linux compatibility mode. VMware can be
run IBM's OS/2, Microsoft Windows 95/98, Microsoft NT, Linux, or any other used to run Microsoft MS-DOS, Windows 95/98/NT/2000, Linux, FreeBSD,
operating system that runs on the i486. or any other operating system that runs on the i486.
Official VMware, Inc. web site:
WWW: http://www.vmware.com/
We all are thankful to Vladimir N. Silyaev for porting vmmon/vmnet
modules to FreeBSD. Have a look at his page for the latest
information:
http://www.mindspring.com/~vsilyaev/vmware/

View file

@ -0,0 +1,13 @@
************************************************************
Add the following entry to /etc/fstab:
linproc /compat/linux/proc linprocfs rw 0 0
and you can play with VMware after the next boot.
Or hit the following commands to play now. :)
/sbin/mount_linprocfs linproc /compat/linux/proc
/usr/local/etc/rc.d/vmware.sh start
************************************************************

View file

@ -1,7 +1,7 @@
bin/vmware bin/vmware
etc/rc.d/vmware.sh
etc/vmware/config etc/vmware/config
lib/vmware/bin/df lib/vmware/bin/df
lib/vmware/bin/fakeprocfs.sh
lib/vmware/bin/vmware lib/vmware/bin/vmware
lib/vmware/bin/vmnet-bridge lib/vmware/bin/vmnet-bridge
lib/vmware/bin/vmnet-dhcpd lib/vmware/bin/vmnet-dhcpd
@ -113,7 +113,7 @@ share/doc/vmware/README.FreeBSD
@exec ln -s %D/etc/vmware /etc/vmware @exec ln -s %D/etc/vmware /etc/vmware
@exec mknod /dev/vmmon c 200 0 @exec mknod /dev/vmmon c 200 0
@exec mknod /dev/vmnet1 c 201 1 @exec mknod /dev/vmnet1 c 201 1
@unexec rm -f /etc/vmware /dev/vmmon /dev/vmnet1 /compat/linux/dev/tty[0-9]* /compat/linux/dev/hd? @unexec rm -f /etc/vmware /dev/vmmon /dev/vmnet1 /compat/linux/bin/df /compat/linux/dev/tty[0-9]* /compat/linux/dev/hd?
@dirrm etc/vmware @dirrm etc/vmware
@dirrm lib/vmware/bin @dirrm lib/vmware/bin
@dirrm lib/vmware/lib/help @dirrm lib/vmware/lib/help

View file

@ -1,5 +1,104 @@
#!/bin/sh #!/bin/sh
mkdir -p ${WRKDIRPREFIX}${CURDIR}
. `dirname $0`/configure.linproc
. `dirname $0`/configure.net
[ "_$VMNET_HOST_IP" = _ ] && VMNET_HOST_IP="192.168.254.1"
[ "_$VMNET_NETMASK" = _ ] && VMNET_NETMASK="255.255.255.0"
host_ip=$VMNET_HOST_IP
netmask=$VMNET_NETMASK
title="VMware network options"
get_network_settings() {
result=`/usr/bin/dialog --title "$title" --clear --inputbox \
"\n"\
"What will be the IP address of your host on your private network?:"\
10 40 $host_ip \
2>&1 >/dev/tty `
case $? in
0)
if [ -z "$result" ]; then
return 1
fi
host_ip=$result
;;
1)
return 1
;;
esac
result=`/usr/bin/dialog --title "$title" --clear --inputbox \
"\n"\
"What will be the netmask of your private network?:"\
10 40 $netmask \
2>&1 >/dev/tty `
case $? in
0)
if [ -z "$result" ]; then
return 1
fi
netmask=$result
;;
1)
return 1
;;
esac
return 0;
}
do_network() {
while true; do
get_network_settings
/usr/bin/dialog --title "Confirmation" --clear --yesno \
"\n"\
"Are the following options correct?\n\n"\
"IP address: $host_ip\n"\
"Netmask: $netmask\n"\
10 40
[ $? -eq 0 ] && return 0
/usr/bin/dialog --title "Confirmation" --clear --yesno \
"\n"\
"Do you want to edit network options again?\n"\
10 40
[ $? -eq 0 ] && continue
/usr/bin/dialog --title "Confirmation" --clear --yesno \
"\n"\
"Do you want to continue without networking?\n"\
10 50
[ $? -eq 0 ] && return 1
host_ip=$VMNET_HOST_IP
netmask=$VMNET_NETMASK
return 0;
done
}
networking=0
if [ _$BATCH = _ ]; then
do_network
if [ $? -eq 0 ]; then
networking=1
/usr/bin/dialog --title "$title" --infobox \
"\n"\
"The following options will be used.\n\n"\
"IP address: $host_ip\n"\
"Netmask: $netmask\n"\
10 40
fi
else #BATCH
[ -f ${WRKDIR}/Makefile.inc.net ] && exit
fi #BATCH
(
exec > ${WRKDIR}/Makefile.inc.net
echo '#' `date`
echo VMNET_HOST_IP=$host_ip
echo VMNET_NETMASK=$netmask
[ $networking -ne 0 ] && echo VMNET_NETWORKING=1
)

View file

@ -1,15 +1,16 @@
#!/bin/sh #!/bin/sh
echo Setup Linux compatible /dev directory
echo Setup Linux compatible /dev directory
linux_dev=${LINUX_DIR}/dev linux_dev=${LINUX_DIR}/dev
if [ \! -d $linux_dev ]; then if [ ! -d $linux_dev ]; then
echo Creating $linux_dev echo Creating $linux_dev
mkdir $linux_dev mkdir $linux_dev
chown root:wheel $linux_dev chown root:wheel $linux_dev
chmod 755 $linux_dev chmod 755 $linux_dev
fi fi
echo Creating $linux_dev/tty\? echo Creating $linux_dev/tty\?
for n in 0 1 2 3 4 5 6 7 8 9; do for n in 0 1 2 3 4 5 6 7 8 9; do
ln -s /dev/ttyv$n $linux_dev/tty`expr 1 + $n`; ln -s /dev/ttyv$n $linux_dev/tty`expr 1 + $n`;
done done
ln -s /dev/ttyva ${linux_dev}/tty11 ln -s /dev/ttyva ${linux_dev}/tty11
ln -s /dev/ttyvb ${linux_dev}/tty12 ln -s /dev/ttyvb ${linux_dev}/tty12
@ -17,7 +18,7 @@ ln -s ${linux_dev}/tty1 ${linux_dev}/tty0
echo Creating $linux_dev/hd\? echo Creating $linux_dev/hd\?
mknod ${linux_dev}/hda b 0 0x00010002 mknod ${linux_dev}/hda b 0 0x00010002
mknod ${linux_dev}/hdb b 0 0x0001000a mknod ${linux_dev}/hdb b 0 0x0001000a
# Not enable wd2-3, because vmware-wizard locked, when # Do not enable below, because vmware-wizard is locked when
# doing something like access("/dev/hdc"...) # doing something like access("/dev/hdc"...)
#mknod ${linux_dev}/hdc b 0 0x00010012 #mknod ${linux_dev}/hdc b 0 0x00010012
#mknod ${linux_dev}/hdd b 0 0x0001001a #mknod ${linux_dev}/hdd b 0 0x0001001a

View file

@ -1,14 +1,14 @@
# ports collection makefile for: VMware For Linux # ports collection makefile for: VMware 1.1.2 for Linux
# Version required: 1.1.1 # Version required: 1.1.2
# Date created: Fri 26 Nov 19:16:47 EST 1999 # Date created: Fri 26 Nov 19:16:47 EST 1999
# Whom: vns@delta.odessa.ua # Whom: vns@delta.odessa.ua
# #
# $vmFreeBSD: vmware/vmmon-only/freebsd/port/Makefile,v 1.8 1999/12/17 00:38:27 vsilyaev Exp $
# $FreeBSD$ # $FreeBSD$
# $vmFreeBSD: vmware/vmmon-only/freebsd/port/Makefile,v 1.8 1999/12/17 00:38:27 vsilyaev Exp $
# #
DISTNAME= VMware-1.1.2-364 DISTNAME= VMware-1.1.2-364
PKGNAME= vmware-1.1.2 PKGNAME= vmware-1.1.2.364
CATEGORIES= emulators linux CATEGORIES= emulators linux
MASTER_SITES= http://www4.vmware.com/software/ \ MASTER_SITES= http://www4.vmware.com/software/ \
http://vmware-svca.www.conxion.com/software/ \ http://vmware-svca.www.conxion.com/software/ \
@ -24,54 +24,54 @@ PATCH_SITES= http://www.mindspring.com/~vsilyaev/vmware/files/ \
PATCHFILES= vmmon-freebsd-0.94.tar.gz \ PATCHFILES= vmmon-freebsd-0.94.tar.gz \
vmnet-freebsd-0.10.tar.gz vmnet-freebsd-0.10.tar.gz
MAINTAINER= vns@delta.odessa.ua MAINTAINER= freebsd-emulation@FreeBSD.org
RUN_DEPENDS= ${LINUX_DIR}/lib/libc.so.6:${PORTSDIR}/emulators/linux_base RUN_DEPENDS= ${LINUX_DIR}/lib/libc.so.6:${PORTSDIR}/emulators/linux_base
IS_INTERACTIVE= yes # vmnet-freebsd-* querries user for network settings RESTRICTED= "Not sure if we can redistribute it"
ONLY_FOR_ARCHS= i386 LINUX_DIR= /compat/linux
VMDIR= ${PREFIX}/lib/vmware
ONLY_FOR_ARCHS= i386
USE_XLIB= yes USE_XLIB= yes
WRKSRC= ${WRKDIR}/vmware-distrib WRKSRC= ${WRKDIR}/vmware-distrib
LINUX_DIR= /compat/linux GZCAT= ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/extract
MAN1= vmware.1 MAN1= vmware.1
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${OSVERSION} < 400013 .if ${OSVERSION} < 400013
BROKEN= YES BROKEN= "Systems prior to 400013 is out of support"
.endif .endif
.if exists(${MASTERDIR}/Makefile.inc.net) .if exists(/modules/linprocfs.ko) || exists(${PREFIX}/modules/linprocfs.ko)
.include "${MASTERDIR}/Makefile.inc.net" HAVE_LINPROCFS= yes
.endif .endif
.if exists(${MASTERDIR}/Makefile.inc.linproc) .if !defined(HAVE_LINPROCFS)
.include "${MASTERDIR}/Makefile.inc.linproc" BROKEN= "You need Linux procfs to run this software"
.endif .endif
VMSUBDIR= lib/vmware .if exists(${WRKDIRPREFIX}${.CURDIR}/work/Makefile.inc.net)
VMDIR= ${PREFIX}/${VMSUBDIR} .include "${WRKDIRPREFIX}${.CURDIR}/work/Makefile.inc.net"
SCRIPTS_ENV+= LINUX_DIR=${LINUX_DIR} \ .endif
VMNET_HOST_IP=${VMNET_HOST_IP} \
VMNET_NETMASK=${VMNET_NETMASK}
MAKE_ARGS= "KMODDIR=${VMDIR}/lib/modules" SCRIPTS_ENV+= LINUX_DIR="${LINUX_DIR}" \
VMNET_HOST_IP="${VMNET_HOST_IP}" \
# Small hack for alternate processing patchfiles VMNET_NETMASK="${VMNET_NETMASK}"
GZCAT= ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/extract MAKE_ARGS= KMODDIR="${VMDIR}/lib/modules"
post-patch: post-patch:
@${CP} ${FILESDIR}/Makefile ${WRKSRC} ${CP} ${FILESDIR}/Makefile ${WRKSRC}
setoptions: setoptions:
${SED} -e 's;@@PREFIX@@;${PREFIX};' ${FILESDIR}/vmware > ${WRKDIR}/vmware ${SED} -e 's;@@PREFIX@@;${PREFIX};' \
${SED} -e 's;@@PREFIX@@;${PREFIX};' \
-e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \ -e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \
-e 's;@@NETMASK@@;${VMNET_NETMASK};' \ -e 's;@@NETMASK@@;${VMNET_NETMASK};' \
${FILESDIR}/config > ${WRKDIR}/config ${FILESDIR}/config > ${WRKDIR}/config
${SED} -e 's;@@PREFIX@@;${PREFIX};' \ ${SED} -e 's;@@PREFIX@@;${PREFIX};' \
-e 's;@@NETWORKING@@;${VMNET_NETWORKING};' \ -e 's;@@NETWORKING@@;${VMNET_NETWORKING};' \
-e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \ -e 's;@@HOST_IP@@;${VMNET_HOST_IP};' \
-e 's;@@NETMASK@@;${VMNET_NETMASK};' \ -e 's;@@NETMASK@@;${VMNET_NETMASK};' \
@ -87,7 +87,6 @@ pre-install: setoptions
${INSTALL_SCRIPT} ${WRKDIR}/vmware.sh ${PREFIX}/etc/rc.d ${INSTALL_SCRIPT} ${WRKDIR}/vmware.sh ${PREFIX}/etc/rc.d
${MKDIR} ${VMDIR}/bin ${MKDIR} ${VMDIR}/bin
${INSTALL_SCRIPT} ${FILESDIR}/fakeprocfs.sh ${VMDIR}/bin
${INSTALL_SCRIPT} ${FILESDIR}/df ${VMDIR}/bin ${INSTALL_SCRIPT} ${FILESDIR}/df ${VMDIR}/bin
[ -f ${LINUX_DIR}/bin/df ] || ${LN} -s ${VMDIR}/bin/df ${LINUX_DIR}/bin/ [ -f ${LINUX_DIR}/bin/df ] || ${LN} -s ${VMDIR}/bin/df ${LINUX_DIR}/bin/
${INSTALL_SCRIPT} ${WRKSRC}/bin/*.pl ${VMDIR}/bin ${INSTALL_SCRIPT} ${WRKSRC}/bin/*.pl ${VMDIR}/bin
@ -95,15 +94,10 @@ pre-install: setoptions
vmnet-bridge vmnet-dhcpd vmnet-sniffer \ vmnet-bridge vmnet-dhcpd vmnet-sniffer \
vmware-loop vmware-ping vmware-wizard \ vmware-loop vmware-ping vmware-wizard \
; do \ ; do \
${INSTALL_SCRIPT} ${WRKSRC}/bin/$${i} ${VMDIR}/bin; \ ${INSTALL_SCRIPT} ${WRKSRC}/bin/$${i} ${VMDIR}/bin; \
done done
.if defined(USE_LINPROC)
${INSTALL_SCRIPT} -m 4555 ${WRKSRC}/bin/vmware ${VMDIR}/bin ${INSTALL_SCRIPT} -m 4555 ${WRKSRC}/bin/vmware ${VMDIR}/bin
${LN} -s ${VMDIR}/bin/vmware ${PREFIX}/bin/ ${LN} -s ${VMDIR}/bin/vmware ${PREFIX}/bin/
.else
${INSTALL_SCRIPT} ${WRKSRC}/bin/vmware ${VMDIR}/bin
${INSTALL_SCRIPT} ${WRKDIR}/vmware ${PREFIX}/bin
.endif
${MKDIR} ${VMDIR}/lib ${MKDIR} ${VMDIR}/lib
${INSTALL_DATA} ${WRKSRC}/lib/config ${VMDIR}/lib ${INSTALL_DATA} ${WRKSRC}/lib/config ${VMDIR}/lib
${MKDIR} ${VMDIR}/lib/help ${MKDIR} ${VMDIR}/lib/help
@ -117,18 +111,7 @@ pre-install: setoptions
.endif .endif
post-install: post-install:
@${LN} -s ${PREFIX}/etc/vmware /etc/vmware ${LN} -s ${PREFIX}/etc/vmware /etc/vmware
.if !defined(BATCH) @${CAT} ${PKGMESSAGE}
@${ECHO} "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
@${ECHO} "Before launch vmware, execute the next command"
@${ECHO} ${PREFIX}/etc/rc.d/vmware.sh start
@${ECHO}
@${ECHO} "to load required kernel modules"
@${ECHO} "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
.endif
pre-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc.linproc \
${WRKDIRPREFIX}${.CURDIR}/Makefile.inc.net
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View file

@ -1,5 +1,5 @@
# $FreeBSD$ # $FreeBSD$
SUBDIR= vmmon-only vmnet-only/freebsd SUBDIR= vmmon-only vmnet-only/freebsd
.include <bsd.subdir.mk> .include <bsd.subdir.mk>

View file

@ -3,7 +3,6 @@
# Start or stop vmware # Start or stop vmware
# #
# $FreeBSD$ # $FreeBSD$
#
vmware_dir=@@PREFIX@@/lib/vmware vmware_dir=@@PREFIX@@/lib/vmware
networking=@@NETWORKING@@ networking=@@NETWORKING@@
@ -14,27 +13,27 @@ netmask=@@NETMASK@@
exec >/dev/null exec >/dev/null
case $1 in case $1 in
start) start)
kldload ${vmware_dir}/lib/modules/vmmon.ko kldload ${vmware_dir}/lib/modules/vmmon.ko
if [ $networking -eq 1 ]; then if [ $networking -eq 1 ]; then
kldload ${vmware_dir}/lib/modules/vmnet.ko kldload ${vmware_dir}/lib/modules/vmnet.ko
echo -n >/dev/vmnet1 echo -n >/dev/vmnet1
ifconfig vmnet1 $host_ip netmask $netmask ifconfig vmnet1 $host_ip netmask $netmask
fi fi
echo -n " VMware" >/dev/tty echo -n " VMware" >/dev/tty
;; ;;
stop) stop)
kldunload vmmon kldunload vmmon
if [ $networking -eq 1 ]; then if [ $networking -eq 1 ]; then
ifconfig vmnet1 down ifconfig vmnet1 down
ifconfig vmnet1 delete $host_ip ifconfig vmnet1 delete $host_ip
kldunload vmnet kldunload vmnet
fi fi
;; ;;
*) *)
echo "usage: `basename $0` {start|stop}" >&2 echo "usage: `basename $0` {start|stop}" >&2
exit 64 exit 64
;; ;;
esac esac

View file

@ -1 +1 @@
VMware virtual machine emulator A virtual machine emulator - a full PC in a window

View file

@ -1,4 +1,14 @@
This is the Linux version of the VMware virtual machine emulator made to This is the Linux version of the VMware virtual machine emulator made
run on FreeBSD using the Linux compatibility mode. VMware can be used to to run on FreeBSD using the Linux compatibility mode. VMware can be
run IBM's OS/2, Microsoft Windows 95/98, Microsoft NT, Linux, or any other used to run Microsoft MS-DOS, Windows 95/98/NT/2000, Linux, FreeBSD,
operating system that runs on the i486. or any other operating system that runs on the i486.
Official VMware, Inc. web site:
WWW: http://www.vmware.com/
We all are thankful to Vladimir N. Silyaev for porting vmmon/vmnet
modules to FreeBSD. Have a look at his page for the latest
information:
http://www.mindspring.com/~vsilyaev/vmware/

View file

@ -0,0 +1,13 @@
************************************************************
Add the following entry to /etc/fstab:
linproc /compat/linux/proc linprocfs rw 0 0
and you can play with VMware after the next boot.
Or hit the following commands to play now. :)
/sbin/mount_linprocfs linproc /compat/linux/proc
/usr/local/etc/rc.d/vmware.sh start
************************************************************

View file

@ -1,7 +1,7 @@
bin/vmware bin/vmware
etc/rc.d/vmware.sh
etc/vmware/config etc/vmware/config
lib/vmware/bin/df lib/vmware/bin/df
lib/vmware/bin/fakeprocfs.sh
lib/vmware/bin/vmware lib/vmware/bin/vmware
lib/vmware/bin/vmnet-bridge lib/vmware/bin/vmnet-bridge
lib/vmware/bin/vmnet-dhcpd lib/vmware/bin/vmnet-dhcpd
@ -113,7 +113,7 @@ share/doc/vmware/README.FreeBSD
@exec ln -s %D/etc/vmware /etc/vmware @exec ln -s %D/etc/vmware /etc/vmware
@exec mknod /dev/vmmon c 200 0 @exec mknod /dev/vmmon c 200 0
@exec mknod /dev/vmnet1 c 201 1 @exec mknod /dev/vmnet1 c 201 1
@unexec rm -f /etc/vmware /dev/vmmon /dev/vmnet1 /compat/linux/dev/tty[0-9]* /compat/linux/dev/hd? @unexec rm -f /etc/vmware /dev/vmmon /dev/vmnet1 /compat/linux/bin/df /compat/linux/dev/tty[0-9]* /compat/linux/dev/hd?
@dirrm etc/vmware @dirrm etc/vmware
@dirrm lib/vmware/bin @dirrm lib/vmware/bin
@dirrm lib/vmware/lib/help @dirrm lib/vmware/lib/help

View file

@ -1,5 +1,104 @@
#!/bin/sh #!/bin/sh
mkdir -p ${WRKDIRPREFIX}${CURDIR}
. `dirname $0`/configure.linproc
. `dirname $0`/configure.net
[ "_$VMNET_HOST_IP" = _ ] && VMNET_HOST_IP="192.168.254.1"
[ "_$VMNET_NETMASK" = _ ] && VMNET_NETMASK="255.255.255.0"
host_ip=$VMNET_HOST_IP
netmask=$VMNET_NETMASK
title="VMware network options"
get_network_settings() {
result=`/usr/bin/dialog --title "$title" --clear --inputbox \
"\n"\
"What will be the IP address of your host on your private network?:"\
10 40 $host_ip \
2>&1 >/dev/tty `
case $? in
0)
if [ -z "$result" ]; then
return 1
fi
host_ip=$result
;;
1)
return 1
;;
esac
result=`/usr/bin/dialog --title "$title" --clear --inputbox \
"\n"\
"What will be the netmask of your private network?:"\
10 40 $netmask \
2>&1 >/dev/tty `
case $? in
0)
if [ -z "$result" ]; then
return 1
fi
netmask=$result
;;
1)
return 1
;;
esac
return 0;
}
do_network() {
while true; do
get_network_settings
/usr/bin/dialog --title "Confirmation" --clear --yesno \
"\n"\
"Are the following options correct?\n\n"\
"IP address: $host_ip\n"\
"Netmask: $netmask\n"\
10 40
[ $? -eq 0 ] && return 0
/usr/bin/dialog --title "Confirmation" --clear --yesno \
"\n"\
"Do you want to edit network options again?\n"\
10 40
[ $? -eq 0 ] && continue
/usr/bin/dialog --title "Confirmation" --clear --yesno \
"\n"\
"Do you want to continue without networking?\n"\
10 50
[ $? -eq 0 ] && return 1
host_ip=$VMNET_HOST_IP
netmask=$VMNET_NETMASK
return 0;
done
}
networking=0
if [ _$BATCH = _ ]; then
do_network
if [ $? -eq 0 ]; then
networking=1
/usr/bin/dialog --title "$title" --infobox \
"\n"\
"The following options will be used.\n\n"\
"IP address: $host_ip\n"\
"Netmask: $netmask\n"\
10 40
fi
else #BATCH
[ -f ${WRKDIR}/Makefile.inc.net ] && exit
fi #BATCH
(
exec > ${WRKDIR}/Makefile.inc.net
echo '#' `date`
echo VMNET_HOST_IP=$host_ip
echo VMNET_NETMASK=$netmask
[ $networking -ne 0 ] && echo VMNET_NETWORKING=1
)

View file

@ -1,15 +1,16 @@
#!/bin/sh #!/bin/sh
echo Setup Linux compatible /dev directory
echo Setup Linux compatible /dev directory
linux_dev=${LINUX_DIR}/dev linux_dev=${LINUX_DIR}/dev
if [ \! -d $linux_dev ]; then if [ ! -d $linux_dev ]; then
echo Creating $linux_dev echo Creating $linux_dev
mkdir $linux_dev mkdir $linux_dev
chown root:wheel $linux_dev chown root:wheel $linux_dev
chmod 755 $linux_dev chmod 755 $linux_dev
fi fi
echo Creating $linux_dev/tty\? echo Creating $linux_dev/tty\?
for n in 0 1 2 3 4 5 6 7 8 9; do for n in 0 1 2 3 4 5 6 7 8 9; do
ln -s /dev/ttyv$n $linux_dev/tty`expr 1 + $n`; ln -s /dev/ttyv$n $linux_dev/tty`expr 1 + $n`;
done done
ln -s /dev/ttyva ${linux_dev}/tty11 ln -s /dev/ttyva ${linux_dev}/tty11
ln -s /dev/ttyvb ${linux_dev}/tty12 ln -s /dev/ttyvb ${linux_dev}/tty12
@ -17,7 +18,7 @@ ln -s ${linux_dev}/tty1 ${linux_dev}/tty0
echo Creating $linux_dev/hd\? echo Creating $linux_dev/hd\?
mknod ${linux_dev}/hda b 0 0x00010002 mknod ${linux_dev}/hda b 0 0x00010002
mknod ${linux_dev}/hdb b 0 0x0001000a mknod ${linux_dev}/hdb b 0 0x0001000a
# Not enable wd2-3, because vmware-wizard locked, when # Do not enable below, because vmware-wizard is locked when
# doing something like access("/dev/hdc"...) # doing something like access("/dev/hdc"...)
#mknod ${linux_dev}/hdc b 0 0x00010012 #mknod ${linux_dev}/hdc b 0 0x00010012
#mknod ${linux_dev}/hdd b 0 0x0001001a #mknod ${linux_dev}/hdd b 0 0x0001001a