diff options
author | fjoe <fjoe@FreeBSD.org> | 2012-08-29 19:54:28 +0800 |
---|---|---|
committer | fjoe <fjoe@FreeBSD.org> | 2012-08-29 19:54:28 +0800 |
commit | 2d3b1d00eae2b5defce59c69e1085e6de504f131 (patch) | |
tree | ab3e9093f8d5dd4524e9567ed56dd7a7020df9d8 /misc/dahdi-kmod26 | |
parent | 525c5aad150276e6175c922a1c097eebc1868cdf (diff) | |
download | freebsd-ports-gnome-2d3b1d00eae2b5defce59c69e1085e6de504f131.tar.gz freebsd-ports-gnome-2d3b1d00eae2b5defce59c69e1085e6de504f131.tar.zst freebsd-ports-gnome-2d3b1d00eae2b5defce59c69e1085e6de504f131.zip |
DAHDI 2.6.1 development version:
- Digium TE820: PCI-Express eight-port T1/E1/J1 is now supported
- new FreeBSD compat shims (similar to OFED in FreeBSD 9 and later)
- wcb1xxp support (temporarily) removed - it was not working in 2.4 port anyway
- dahdi_dynamic is likely to be broken
Diffstat (limited to 'misc/dahdi-kmod26')
-rw-r--r-- | misc/dahdi-kmod26/Makefile | 96 | ||||
-rw-r--r-- | misc/dahdi-kmod26/distinfo | 22 | ||||
-rw-r--r-- | misc/dahdi-kmod26/files/dahdi.in | 80 | ||||
-rw-r--r-- | misc/dahdi-kmod26/files/patch-drivers-staging-echo-echo.c | 7 | ||||
-rw-r--r-- | misc/dahdi-kmod26/pkg-descr | 5 | ||||
-rw-r--r-- | misc/dahdi-kmod26/pkg-plist | 32 |
6 files changed, 242 insertions, 0 deletions
diff --git a/misc/dahdi-kmod26/Makefile b/misc/dahdi-kmod26/Makefile new file mode 100644 index 000000000000..d9eadd3d3f04 --- /dev/null +++ b/misc/dahdi-kmod26/Makefile @@ -0,0 +1,96 @@ +# Ports collection makefile for: dahdi +# Date created: 3 Mar 2010 +# Whom: Maxim Khon <fjoe@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= dahdi-kmod26 +PORTVERSION= ${DAHDI_VERSION:S/-/./g} +CATEGORIES= misc kld +MASTER_SITES= ${MASTER_SITE_LOCAL}\ + http://people.freebsd.org/~fjoe/dahdi/\ + http://downloads.digium.com/pub/telephony/firmware/releases/:firmware +MASTER_SITE_SUBDIR= fjoe +DISTNAME= dahdi-freebsd-${DAHDI_VERSION} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}\ + oslec-linux-${OSLEC_VERSION}${EXTRACT_SUFX}\ + zaphfc-${ZAPHFC_VERSION}${EXTRACT_SUFX} + +MAINTAINER= fjoe@FreeBSD.org +COMMENT= Digium/Asterisk Hardware Device Interface + +RUN_DEPENDS= ${LOCALBASE}/sbin/dahdi_cfg:${PORTSDIR}/misc/dahdi + +DAHDI_VERSION= 2.6.1-r10709 +DAHDI_TOOLS_VERSION= 2.4.0-rc1 +OSLEC_VERSION= 2.6.35.4 +ZAPHFC_VERSION= r5 + +FIRMWARES= OCT6114_064 OCT6114_128 OCT6114_256 TC400M HX8 ${_vpmadt032} VPMOCT032 WCT820 +OCT6114_064_VERSION= 1.05.01 +OCT6114_128_VERSION= 1.05.01 +OCT6114_256_VERSION= 1.05.01 +TC400M_VERSION= MR6.12 +HX8_VERSION= 2.06 +VPMADT032_NAME= dahdi-fwload-vpmadt032 +VPMADT032_DIR= dahdi_vpmadt032_loader +VPMADT032_VERSION= 1.25.0 +VPMOCT032_VERSION= 1.12.0 +WCT820_NAME= dahdi-fw-te820 +WCT820_VERSION= 1.76 + +WRKSRC= ${WRKDIR}/${DISTNAME} +#EXTRA_PATCHES= ${WRKDIR}/zaphfc-${ZAPHFC_VERSION} +#PATCH_STRIP= -p1 +MAKEFILE= BSDmakefile +NO_PACKAGE= Should be in sync with the kernel to work correctly +USE_RC_SUBR= dahdi +MAKE_ARGS= NO_FETCH=yes WITHOUT_HEADERS=yes #ADDITIONAL_DRIVERS="wcb1xxp" +GROUPS= dahdi + +ONLY_FOR_ARCHS= i386 amd64 sparc64 +CONFLICTS= zaptel-[0-9]* dahdi-kmod-* + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 703000 || (${OSVERSION} >= 800000 && ${OSVERSION} < 800108) +IGNORE= requires firmware(9) support for kernel modules with hyphens +.endif + +.if !exists(${SRC_BASE}/sys/Makefile) +IGNORE= requires kernel source present in ${SRC_BASE}/sys +.endif + +.if ${ARCH} == "i386" || ${ARCH} == "amd64" +PLIST_SUB+= X86="" +_vpmadt032= VPMADT032 +.else +PLIST_SUB+= X86="@comment " +.endif + +.for _f in ${FIRMWARES} +${_f}_NAME?= dahdi-fw-${_f:L:S/_/-/g} +${_f}_DIR?= ${${_f}_NAME}.bin +${_f}_DISTFILE= ${${_f}_NAME}-${${_f}_VERSION}.tar.gz +DISTFILES+= ${${_f}_DISTFILE}:firmware +.endfor + +post-extract: + @${LN} -s ../../linux-${OSLEC_VERSION}/drivers/staging ${WRKSRC}/drivers +.for _f in ${FIRMWARES} + ${CP} ${DISTDIR}/${${_f}_DISTFILE} ${WRKSRC}/bsd-kmod/${${_f}_DIR} +.endfor + +pre-su-install: + @${MKDIR} ${PREFIX}/lib/dahdi + +post-install: + @${TOUCH} ${PREFIX}/lib/dahdi/linker.hints + +fw-versions: extract +.for _v in ${FIRMWARES:=_VERSION} + @${ECHO_CMD} "${_v}=`${MAKE} -V ${_v} -f ${WRKSRC}/firmware.mk`" +.endfor + +.include <bsd.port.post.mk> diff --git a/misc/dahdi-kmod26/distinfo b/misc/dahdi-kmod26/distinfo new file mode 100644 index 000000000000..e66641677d5b --- /dev/null +++ b/misc/dahdi-kmod26/distinfo @@ -0,0 +1,22 @@ +SHA256 (dahdi-freebsd-2.6.1-r10709.tar.gz) = b51018937a725fa1a9fa693c5f1b06b37d4f75490c5c3ee6d90c8bdb4ed33a43 +SIZE (dahdi-freebsd-2.6.1-r10709.tar.gz) = 1764207 +SHA256 (oslec-linux-2.6.35.4.tar.gz) = 01cfaa1ca64056c822d1a3ebf4f7b3c81127cd7b308ad5b0738ff4eb2026e261 +SIZE (oslec-linux-2.6.35.4.tar.gz) = 12057 +SHA256 (zaphfc-r5.tar.gz) = 7e809b62dcc2bd3caf2e5a882390051b881eb08d37fea1733d7fb55e80bc6756 +SIZE (zaphfc-r5.tar.gz) = 15639 +SHA256 (dahdi-fw-oct6114-064-1.05.01.tar.gz) = 56bac1f2024c76ecf9b6f40992eeea29a1fbee676bb2a37a058179bacfbb1c91 +SIZE (dahdi-fw-oct6114-064-1.05.01.tar.gz) = 165869 +SHA256 (dahdi-fw-oct6114-128-1.05.01.tar.gz) = e1146749d205c41603b9b76852c3f8104dac233d0025d700db24504d10c99775 +SIZE (dahdi-fw-oct6114-128-1.05.01.tar.gz) = 165849 +SHA256 (dahdi-fw-oct6114-256-1.05.01.tar.gz) = 5fe5036a2766cf0e8a968b0c58b700507d86e1cde9296ca437170cc626a9c79c +SIZE (dahdi-fw-oct6114-256-1.05.01.tar.gz) = 171685 +SHA256 (dahdi-fw-tc400m-MR6.12.tar.gz) = 11dd8d009809e41fc9a3a36766f59ff73d29075eede5b8724331d9a6e5259774 +SIZE (dahdi-fw-tc400m-MR6.12.tar.gz) = 1750035 +SHA256 (dahdi-fw-hx8-2.06.tar.gz) = 449ab3fd03d55d808e999efb7677cd04de202b92c9fcb039539a7e48a39a80f5 +SIZE (dahdi-fw-hx8-2.06.tar.gz) = 29252 +SHA256 (dahdi-fwload-vpmadt032-1.25.0.tar.gz) = 3ff26cf80555fd7470b43a87c51d03c1db2a75abcd4561d79f69b6c48298e4a1 +SIZE (dahdi-fwload-vpmadt032-1.25.0.tar.gz) = 149360 +SHA256 (dahdi-fw-vpmoct032-1.12.0.tar.gz) = 6b199cf836f150f9cb35f763f0f502fb52cfa2724a449b500429c746973904ad +SIZE (dahdi-fw-vpmoct032-1.12.0.tar.gz) = 443985 +SHA256 (dahdi-fw-te820-1.76.tar.gz) = 5b823e25828e2c1c6548886ad408b2e31dbc8cd17170c52592792d9c754a199c +SIZE (dahdi-fw-te820-1.76.tar.gz) = 54303 diff --git a/misc/dahdi-kmod26/files/dahdi.in b/misc/dahdi-kmod26/files/dahdi.in new file mode 100644 index 000000000000..7c192566cd76 --- /dev/null +++ b/misc/dahdi-kmod26/files/dahdi.in @@ -0,0 +1,80 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: dahdi +# REQUIRE: NETWORKING +# KEYWORD: shutdown +# BEFORE: asterisk +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# dahdi_enable (bool): YES/NO (default: NO) +# dahdi_modules (list of strings): dahdi modules to load at boot (default: dahdi) +# +# Valid modules are: +# - dahdi +# - dahdi_transcode +# - wcb4xxp +# - wcfxo +# - wct4xxp +# - wctc4xxp +# - wctdm +# - wctdm24xxp +# - wcte11xp +# - wcte12xp +# +# Example: +# +# dahdi_enable="YES" +# dahdi_modules="wct4xxp" +# + +. /etc/rc.subr + +name="dahdi" +rcvar=dahdi_enable + +start_cmd="dahdi_start" +stop_cmd="dahdi_stop" +load_rc_config $name +: ${dahdi_enable="NO"} +: ${dahdi_modules="dahdi"} + +kmod_dir=%%PREFIX%%/lib/dahdi +# reverse list +for m in ${dahdi_modules}; do + dahdi_modules_unload="$m ${dahdi_modules_unload}" +done + +dahdi_start() +{ + echo "Starting ${name}." + + # load kernel modules + kldconfig -mf ${kmod_dir} + for m in ${dahdi_modules}; do + kldload $m || exit 1 + done + + # configure devfs + devfs rule apply path 'dahdi/*' mode 0664 user root group dahdi + + # run configuration utilities + %%PREFIX%%/sbin/dahdi_cfg + if [ -r %%PREFIX%%/etc/fxotune.conf ]; then + echo "Starting fxotune." + %%PREFIX%%/sbin/fxotune -s + fi +} + +dahdi_stop() +{ + echo -n " ${name}" + for m in ${dahdi_modules_unload}; do + kldunload $m + done +} + +run_rc_command "$1" diff --git a/misc/dahdi-kmod26/files/patch-drivers-staging-echo-echo.c b/misc/dahdi-kmod26/files/patch-drivers-staging-echo-echo.c new file mode 100644 index 000000000000..2179da73cb93 --- /dev/null +++ b/misc/dahdi-kmod26/files/patch-drivers-staging-echo-echo.c @@ -0,0 +1,7 @@ +--- drivers/staging/echo/echo.c.orig 2012-08-29 15:54:31.000000000 +0700 ++++ drivers/staging/echo/echo.c 2012-08-29 15:54:42.000000000 +0700 +@@ -659,4 +659,3 @@ + MODULE_LICENSE("GPL"); + MODULE_AUTHOR("David Rowe"); + MODULE_DESCRIPTION("Open Source Line Echo Canceller"); +-MODULE_VERSION("0.3.0"); diff --git a/misc/dahdi-kmod26/pkg-descr b/misc/dahdi-kmod26/pkg-descr new file mode 100644 index 000000000000..d6703144bc6e --- /dev/null +++ b/misc/dahdi-kmod26/pkg-descr @@ -0,0 +1,5 @@ +DAHDi (Digium/Asterisk Hardware Device Interface) is the open source +device interface technology used to control Digium and other telephony +interface cards. + +WWW: http://www.asterisk.org/dahdi/ diff --git a/misc/dahdi-kmod26/pkg-plist b/misc/dahdi-kmod26/pkg-plist new file mode 100644 index 000000000000..d1ab337bf50c --- /dev/null +++ b/misc/dahdi-kmod26/pkg-plist @@ -0,0 +1,32 @@ +lib/dahdi/dahdi-fw-hx8.bin.ko +lib/dahdi/dahdi-fw-oct6114-064.bin.ko +lib/dahdi/dahdi-fw-oct6114-128.bin.ko +lib/dahdi/dahdi-fw-oct6114-256.bin.ko +lib/dahdi/dahdi-fw-tc400m.bin.ko +lib/dahdi/dahdi-fw-te820.bin.ko +lib/dahdi/dahdi.ko +lib/dahdi/dahdi_dynamic.ko +lib/dahdi/dahdi_dynamic_eth.ko +lib/dahdi/dahdi_dynamic_ethmf.ko +lib/dahdi/dahdi_dynamic_loc.ko +lib/dahdi/dahdi_echocan_jpah.ko +lib/dahdi/dahdi_echocan_kb1.ko +lib/dahdi/dahdi_echocan_mg2.ko +lib/dahdi/dahdi_echocan_oslec.ko +lib/dahdi/dahdi_echocan_sec.ko +lib/dahdi/dahdi_echocan_sec2.ko +lib/dahdi/dahdi_transcode.ko +lib/dahdi/dahdi_voicebus.ko +%%X86%%lib/dahdi/dahdi_vpmadt032_loader.ko +lib/dahdi/dahdi-fw-vpmoct032.bin.ko +lib/dahdi/linker.hints +lib/dahdi/ng_dahdi_netdev.ko +lib/dahdi/wcb4xxp.ko +lib/dahdi/wcfxo.ko +lib/dahdi/wct4xxp.ko +lib/dahdi/wctc4xxp.ko +lib/dahdi/wctdm.ko +lib/dahdi/wctdm24xxp.ko +lib/dahdi/wcte11xp.ko +lib/dahdi/wcte12xp.ko +@dirrm lib/dahdi |