CDC Ethernet driver (driver for USB Linux-based PDAs: Sharp Zaurus, YOPY, etc).

Currently the driver is maintained out-of-tree as a set of files to be
downloaded and built manually.

PR:		ports/76802
Submitted by:	Craig Boston <craig@yekse.gank.org>
This commit is contained in:
Pav Lucistnik 2005-01-29 23:47:47 +00:00
parent 5a16e4d46a
commit 5882969f93
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=127672
8 changed files with 106 additions and 0 deletions

View file

@ -11,6 +11,7 @@
SUBDIR += bforce-kst
SUBDIR += birda
SUBDIR += bpl+
SUBDIR += cdce
SUBDIR += cdr_read
SUBDIR += comserv
SUBDIR += conserver

39
comms/cdce/Makefile Normal file
View file

@ -0,0 +1,39 @@
# New ports collection makefile for: cdce
# Date Created: Jan 25, 2005
# Whom: Craig Boston <craig@yekse.gank.org>
#
# $FreeBSD$
#
PORTNAME= cdce
PORTVERSION= 1.0
CATEGORIES= comms
MASTER_SITES= http://www.gank.org/freebsd/cdce/
MAINTAINER= craig@yekse.gank.org
COMMENT= Driver for point-to-point CDC Ethernet interfaces
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 503000
IGNORE= "FreeBSD versions prior to 5.3 are not supported"
.endif
NO_PACKAGE= Depends on kernel
pre-fetch:
.if !exists(${SRC_BASE}/sys/Makefile)
@${ECHO} "*************************************************"; \
${ECHO} "This port requires the kernel source be available"; \
${ECHO} "*************************************************"; \
exit 1
.endif
do-install:
${MKDIR} ${PREFIX}/lib/cdce
${INSTALL_SCRIPT} ${WRKSRC}/if_cdce.ko ${PREFIX}/lib/cdce
post-install:
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

2
comms/cdce/distinfo Normal file
View file

@ -0,0 +1,2 @@
MD5 (cdce-1.0.tar.gz) = 15d57b1d0d10256e7b88f6f7e237213b
SIZE (cdce-1.0.tar.gz) = 6540

23
comms/cdce/pkg-deinstall Normal file
View file

@ -0,0 +1,23 @@
#!/bin/sh
#
# Unload cdce kernel module if necessary
#
# $FreeBSD$
#
if [ "x$2" != "xDEINSTALL" ]; then
exit 0
fi
echo "Disabling if_cdce."
# Unload if_cdce kernel module
kldstat -n if_cdce 2>/dev/null >/dev/null && kldunload if_cdce
# Remove kernel module
if [ `sysctl -n kern.osreldate` -ge 500000 ]; then
KMODDIR="/boot/modules"
else
KMODDIR="/modules"
fi
[ -f ${KMODDIR}/if_cdce.ko ] && rm -f ${KMODDIR}/if_cdce.ko

10
comms/cdce/pkg-descr Normal file
View file

@ -0,0 +1,10 @@
This port builds a driver for several devices which communicate using Ethernet
over USB (CDC Ethernet specification). It does not yet include support for
more advanced devices such as cable modems, but is sufficient to talk to
several Linux-based PDAs.
This driver has been confirmed to work with Sharp Zaurus and YOPY handhelds.
It currently only works on FreeBSD 5.3 or later.
WWW: http://www.gank.org/freebsd/cdce/

18
comms/cdce/pkg-install Normal file
View file

@ -0,0 +1,18 @@
#!/bin/sh
#
# $FreeBSD$
PREFIX=${PKG_PREFIX:-/usr/local}
[ "x$1" = "x" ] && exit 1
if [ "x$2" = "xPOST-INSTALL" ]; then
if [ `sysctl -n kern.osreldate` -ge 500000 ]; then
KMODDIR="/boot/modules"
else
KMODDIR="/modules"
fi
install -C -o root -g wheel -m 555 ${PREFIX}/lib/cdce/if_cdce.ko \
${KMODDIR}
kldxref ${KMODDIR}
fi

11
comms/cdce/pkg-message Normal file
View file

@ -0,0 +1,11 @@
*******************************************************************************
* Please add the line *
* *
* if_cdce_load="YES" *
* *
* to /boot/loader.conf if you wish the driver to be loaded at system startup. *
*******************************************************************************
* This port contains a prebuilt kernel module. Due to the ever changing *
* nature of FreeBSD it may be necessary to rebuild the module after a kernel *
* source update. To do this, reinstall the port. *
*******************************************************************************

2
comms/cdce/pkg-plist Normal file
View file

@ -0,0 +1,2 @@
lib/cdce/if_cdce.ko
@dirrm lib/cdce