aboutsummaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorIon-Mihai Tetcu <itetcu@FreeBSD.org>2006-06-17 21:16:13 +0000
committerIon-Mihai Tetcu <itetcu@FreeBSD.org>2006-06-17 21:16:13 +0000
commitd8d1209c77b810ea33afeee2d99415b52608ee27 (patch)
treeaa95ee4a4c7600599af53acc386e4765da0e8da8 /comms
parentb86f9f257bf15a7e3b1fe03cff23407a44d5c8c1 (diff)
downloadports-d8d1209c77b810ea33afeee2d99415b52608ee27.tar.gz
ports-d8d1209c77b810ea33afeee2d99415b52608ee27.zip
Notes
Diffstat (limited to 'comms')
-rw-r--r--comms/vpb-driver/Makefile12
-rw-r--r--comms/vpb-driver/files/patch-FreeBSD-Makefile7
-rw-r--r--comms/vpb-driver/files/patch-FreeBSD-vpb.c36
-rw-r--r--comms/vpb-driver/files/pkg-message.in16
-rw-r--r--comms/vpb-driver/files/vpb.sh.in2
-rw-r--r--comms/vpb-driver/pkg-plist4
6 files changed, 40 insertions, 37 deletions
diff --git a/comms/vpb-driver/Makefile b/comms/vpb-driver/Makefile
index ac1b2e70887c..57157538a252 100644
--- a/comms/vpb-driver/Makefile
+++ b/comms/vpb-driver/Makefile
@@ -7,7 +7,7 @@
PORTNAME= vpb-driver
PORTVERSION= 2.4.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= comms
MASTER_SITES= http://www.voicetronix.com/Downloads/
@@ -18,7 +18,11 @@ USE_GMAKE= yes
USE_RC_SUBR= vpb.sh
SUB_FILES+= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
-MAKE_ENV+= KMODDIR=${PREFIX}/lib
+KMODDIR?= /boot/modules
+MAKE_ENV+= KMODDIR=${KMODDIR}
+
+PLIST_SUB+= KMODDIR=${KMODDIR}
+SUB_LIST+= KMODDIR=${KMODDIR}
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%DOCSDIR%%,${DOCSDIR},g' \
@@ -36,8 +40,8 @@ IGNORE= requires kernel source (/usr/src/sys) to build
BROKEN= Does not compile on sparc64
.endif
-.if ${OSVERSION} < 502000 || ${OSVERSION} >= 600000
-IGNORE= is not for FreeBSD versions < 502000, or >= 600000
+.if ${OSVERSION} < 502000
+IGNORE= is not for FreeBSD versions < 502000
.endif
do-configure:
diff --git a/comms/vpb-driver/files/patch-FreeBSD-Makefile b/comms/vpb-driver/files/patch-FreeBSD-Makefile
index 507900f225c2..c452f0a68622 100644
--- a/comms/vpb-driver/files/patch-FreeBSD-Makefile
+++ b/comms/vpb-driver/files/patch-FreeBSD-Makefile
@@ -1,8 +1,9 @@
---- FreeBSD/Makefile Thu Jan 1 10:00:00 1970
-+++ FreeBSD/Makefile Fri Feb 11 16:21:52 2005
-@@ -0,0 +1,5 @@
+--- FreeBSD/Makefile.orig Mon Apr 10 09:28:04 2006
++++ FreeBSD/Makefile Mon Apr 10 09:40:04 2006
+@@ -0,0 +1,6 @@
+SRCS=vpb.c
+SRCS+=bus_if.h device_if.h pci_if.h
+KMOD=vpb
++WERROR=
+
+.include <bsd.kmod.mk>
diff --git a/comms/vpb-driver/files/patch-FreeBSD-vpb.c b/comms/vpb-driver/files/patch-FreeBSD-vpb.c
index e94ea3a2da68..f7953e805dde 100644
--- a/comms/vpb-driver/files/patch-FreeBSD-vpb.c
+++ b/comms/vpb-driver/files/patch-FreeBSD-vpb.c
@@ -1,5 +1,5 @@
---- FreeBSD/vpb.c Mon May 3 13:49:58 2004
-+++ FreeBSD/vpb.c Mon Mar 14 10:47:29 2005
+--- FreeBSD/vpb.c.orig Mon May 3 05:49:58 2004
++++ FreeBSD/vpb.c Mon Apr 10 09:35:03 2006
@@ -52,8 +52,6 @@
#define BLOCK_DELAY 1 /* delay (us) between adjacent blocks */
#define SIZE_LCR 128 /* size of 9050 local config reg space in bytes */
@@ -38,7 +38,7 @@
#include <machine/clock.h>
#include <vm/vm.h>
#include <vm/pmap.h>
-@@ -113,26 +115,34 @@
+@@ -113,26 +115,36 @@
\*---------------------------------------------------------------------------*/
/* Character device entry points */
@@ -71,7 +71,7 @@
- nopsize,
- D_TTY,
- -1
-+#if __FreeBSD_version > 503000
++#if __FreeBSD_version > 502103
+ .d_version = D_VERSION,
+#endif
+ .d_open = vpb_open,
@@ -80,7 +80,9 @@
+ .d_write = vpb_write,
+ .d_ioctl = vpb_ioctl,
+ .d_name = "vpb",
++#if __FreeBSD_version < 502103
+ .d_maj = CDEV_MAJOR,
++#endif
};
/* number of valid PCI devices detected */
@@ -89,7 +91,7 @@
/* translated base address of PLX9050 regions */
static unsigned char *base0[MAX_V4PCI];
-@@ -144,7 +154,7 @@
+@@ -144,7 +156,7 @@
static short buf[SIZE_WD];
/* vars */
@@ -98,7 +100,7 @@
static device_method_t vpb_methods[] = {
/* Device interface */
-@@ -154,15 +164,19 @@
+@@ -154,15 +166,19 @@
DEVMETHOD(device_shutdown, vpb_shutdown),
DEVMETHOD(device_suspend, vpb_suspend),
DEVMETHOD(device_resume, vpb_resume),
@@ -120,7 +122,7 @@
};
static devclass_t vpb_devclass;
-@@ -173,7 +187,7 @@
+@@ -173,7 +189,7 @@
open/close/read/write at this point */
static int
@@ -129,7 +131,7 @@
{
int err = 0;
-@@ -181,7 +195,7 @@
+@@ -181,7 +197,7 @@
}
static int
@@ -138,7 +140,7 @@
{
int err=0;
-@@ -189,7 +203,7 @@
+@@ -189,7 +205,7 @@
}
static int
@@ -147,7 +149,7 @@
{
int err = 0;
-@@ -197,7 +211,7 @@
+@@ -197,7 +213,7 @@
}
static int
@@ -156,7 +158,7 @@
{
int err = 0;
-@@ -205,7 +219,7 @@
+@@ -205,7 +221,7 @@
}
static int
@@ -165,7 +167,7 @@
{
VPB_DATA *vpb_data; /* ioctl parameters from user space */
short *data; /* user space address of data */
-@@ -318,8 +332,14 @@
+@@ -318,8 +334,14 @@
int subsystem;
char *s;
@@ -180,7 +182,7 @@
/* check that subsytem ID & Subsytem Vendor matches */
subsystem = pci_read_config(dev, 0x2c, 4);
s = (char*)&subsystem;
-@@ -327,7 +347,7 @@
+@@ -327,7 +349,7 @@
if ((s[3] == 'V') && (s[2] == '4') && (s[1] == 'V') && (s[0] == 'T')) {
printf("V4PCI %d found!\n", numPCI);
@@ -189,7 +191,7 @@
return 0;
}
}
-@@ -341,13 +361,16 @@
+@@ -341,13 +363,16 @@
vpb_attach(device_t dev)
{
vm_offset_t paddr;
@@ -208,7 +210,7 @@
/* OK, V4PCI found, so map address regions..... */
paddr = (vm_offset_t)pci_read_config(dev, PCI_BASE_ADDR0, 4) & ~0xf;
-@@ -357,7 +380,9 @@
+@@ -357,7 +382,9 @@
base2[numPCI] = pmap_mapdev(paddr, sizeof(short)*SIZE_WD);
/* set wait-states */
@@ -219,7 +221,7 @@
numPCI++;
-@@ -369,6 +394,11 @@
+@@ -369,6 +396,11 @@
static int
vpb_detach(device_t dev)
{
@@ -231,7 +233,7 @@
return 0;
}
-@@ -491,4 +521,4 @@
+@@ -491,4 +523,4 @@
cntrl &= 1;
return(cntrl);
}
diff --git a/comms/vpb-driver/files/pkg-message.in b/comms/vpb-driver/files/pkg-message.in
index f6f568331be3..14304b2346fb 100644
--- a/comms/vpb-driver/files/pkg-message.in
+++ b/comms/vpb-driver/files/pkg-message.in
@@ -3,25 +3,21 @@ IMPORTANT INFORMATION!
To load(use) the driver, run (as root):
- # kldload %%PREFIX%%/lib/vpb.ko
+ # kldload %%KMODDIR%%/vpb.ko
To unload it:
# kldunload vpb
-Alternatively you can copy the provided sample script
+Alternatively you can add
- %%PREFIX%%/etc/rc.d/vpb.sh.sample
-
-to
-
- %%PREFIX%%/etc/rc.d/vpb.sh
+ vpb_driver_enable="YES"
-and add
+to your /etc/rc.conf file or
- vpb_driver_enable="YES"
+ vpb_load="YES"
-to your /etc/rc.conf file.
+to your /boot/loader.conf file.
This port is based on the original driver for FreeBSD RELENG_4 by Voicetronix.
I have updated the driver to compile as a kernel loadable module and added
diff --git a/comms/vpb-driver/files/vpb.sh.in b/comms/vpb-driver/files/vpb.sh.in
index 5628aaeb3c64..f7fe5a2af638 100644
--- a/comms/vpb-driver/files/vpb.sh.in
+++ b/comms/vpb-driver/files/vpb.sh.in
@@ -21,7 +21,7 @@ name=vpb_driver
rcvar=`set_rcvar`
required_dirs=
-vpb_module=%%PREFIX%%/lib/vpb.ko
+vpb_module=%%KMODDIR%%/vpb.ko
required_files=${vpb_module}
start_cmd=start_cmd
diff --git a/comms/vpb-driver/pkg-plist b/comms/vpb-driver/pkg-plist
index ec37dbfbaf33..f992511bc69b 100644
--- a/comms/vpb-driver/pkg-plist
+++ b/comms/vpb-driver/pkg-plist
@@ -2,7 +2,7 @@ etc/vpb/vlcmain.out
etc/vpb/vpbmain_isa.out
etc/vpb/vpbmain_pci.out
include/vpbapi.h
-lib/gettext/linker.hints
lib/libvpb.a
-lib/vpb.ko
@dirrm etc/vpb
+@cwd /
+%%KMODDIR%%/vpb.ko