[zaptel-commits] kpfleming: branch kpfleming/zaptel-1.2-octasic-PR48 r3103 - in /team/kpflemin...
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Tue Oct 2 14:11:43 CDT 2007
Author: kpfleming
Date: Tue Oct 2 14:11:41 2007
New Revision: 3103
URL: http://svn.digium.com/view/zaptel?view=rev&rev=3103
Log:
update to rev 3099 of base branch
Added:
team/kpfleming/zaptel-1.2-octasic-PR48/ppp/ (props changed)
- copied from r3102, branches/1.2/ppp/
team/kpfleming/zaptel-1.2-octasic-PR48/ppp/Makefile
- copied unchanged from r3102, branches/1.2/ppp/Makefile
team/kpfleming/zaptel-1.2-octasic-PR48/ppp/zaptel.c
- copied unchanged from r3102, branches/1.2/ppp/zaptel.c
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/ (props changed)
- copied from r3102, branches/1.2/wctdm24xxp/
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/GpakApi.c
- copied unchanged from r3102, branches/1.2/wctdm24xxp/GpakApi.c
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/GpakApi.h
- copied unchanged from r3102, branches/1.2/wctdm24xxp/GpakApi.h
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/GpakCust.c
- copied unchanged from r3102, branches/1.2/wctdm24xxp/GpakCust.c
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/GpakCust.h
- copied unchanged from r3102, branches/1.2/wctdm24xxp/GpakCust.h
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/GpakHpi.h
- copied unchanged from r3102, branches/1.2/wctdm24xxp/GpakHpi.h
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/Makefile
- copied unchanged from r3102, branches/1.2/wctdm24xxp/Makefile
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/Makefile.kernel26
- copied unchanged from r3102, branches/1.2/wctdm24xxp/Makefile.kernel26
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/VPMADT032.bin
- copied unchanged from r3102, branches/1.2/wctdm24xxp/VPMADT032.bin
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/base.c
- copied unchanged from r3102, branches/1.2/wctdm24xxp/base.c
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/gpakErrs.h
- copied unchanged from r3102, branches/1.2/wctdm24xxp/gpakErrs.h
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/gpakenum.h
- copied unchanged from r3102, branches/1.2/wctdm24xxp/gpakenum.h
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp/wctdm24xxp.h
- copied unchanged from r3102, branches/1.2/wctdm24xxp/wctdm24xxp.h
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/card_pri.c
- copied unchanged from r3102, branches/1.2/xpp/card_pri.c
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/card_pri.h
- copied unchanged from r3102, branches/1.2/xpp/card_pri.h
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/init_card_3_28
- copied unchanged from r3102, branches/1.2/xpp/init_card_3_28
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/init_card_4_28
- copied unchanged from r3102, branches/1.2/xpp/init_card_4_28
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/init_card_6_28
- copied unchanged from r3102, branches/1.2/xpp/init_card_6_28
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/init_card_7_28
- copied unchanged from r3102, branches/1.2/xpp/init_card_7_28
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/init_card_9_28
- copied unchanged from r3102, branches/1.2/xpp/init_card_9_28
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/param_doc
- copied unchanged from r3102, branches/1.2/xpp/param_doc
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/astribank_hook
- copied unchanged from r3102, branches/1.2/xpp/utils/astribank_hook
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/example_default_zaptel
- copied unchanged from r3102, branches/1.2/xpp/utils/example_default_zaptel
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/xbus-sysfs.c
- copied unchanged from r3102, branches/1.2/xpp/xbus-sysfs.c
Removed:
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm24xxp.c
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/init_card_3_26
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/init_card_4_26
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/init_card_6_26
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/init_card_7_26
Modified:
team/kpfleming/zaptel-1.2-octasic-PR48/ (props changed)
team/kpfleming/zaptel-1.2-octasic-PR48/Makefile
team/kpfleming/zaptel-1.2-octasic-PR48/Makefile.kernel26
team/kpfleming/zaptel-1.2-octasic-PR48/README
team/kpfleming/zaptel-1.2-octasic-PR48/build_tools/install_prereq
team/kpfleming/zaptel-1.2-octasic-PR48/fxotune.c
team/kpfleming/zaptel-1.2-octasic-PR48/pciradio.c
team/kpfleming/zaptel-1.2-octasic-PR48/tor2.c
team/kpfleming/zaptel-1.2-octasic-PR48/torisa.c
team/kpfleming/zaptel-1.2-octasic-PR48/wcfxo.c
team/kpfleming/zaptel-1.2-octasic-PR48/wct1xxp.c
team/kpfleming/zaptel-1.2-octasic-PR48/wct4xxp/base.c
team/kpfleming/zaptel-1.2-octasic-PR48/wctc4xxp/base.c
team/kpfleming/zaptel-1.2-octasic-PR48/wctdm.c
team/kpfleming/zaptel-1.2-octasic-PR48/wcte11xp.c
team/kpfleming/zaptel-1.2-octasic-PR48/wcte12xp.c
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/ (props changed)
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/.version
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/ChangeLog
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/Makefile
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/README.Astribank
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/README.metering
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/card_bri.c
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/card_bri.h
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/card_fxo.c
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/card_fxo.h
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/card_fxs.c
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/card_fxs.h
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/card_global.c
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/card_global.h
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/firmwares/FPGA_1141.hex
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/firmwares/FPGA_1151.hex
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/firmwares/FPGA_FXS.hex
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/ (props changed)
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/Makefile
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/genzaptelconf
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/xpp.rules
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/xpp_fxloader
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/xpp_sync
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/zapconf
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/zconf/Zaptel/Chans.pm
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/zconf/Zaptel/Config/Defaults.pm
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/utils/zconf/Zaptel/Hardware/PCI.pm
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/xbus-core.c
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/xbus-core.h
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/xpd.h
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/xpp_usb.c
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/xpp_zap.c
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/xpp_zap.h
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/xproto.c
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/xproto.h
team/kpfleming/zaptel-1.2-octasic-PR48/xpp/zap_debug.h
team/kpfleming/zaptel-1.2-octasic-PR48/zaptel-base.c
team/kpfleming/zaptel-1.2-octasic-PR48/zaptel.h
team/kpfleming/zaptel-1.2-octasic-PR48/zaptel.init
team/kpfleming/zaptel-1.2-octasic-PR48/zaptel.sysconfig
team/kpfleming/zaptel-1.2-octasic-PR48/zconfig.h
team/kpfleming/zaptel-1.2-octasic-PR48/ztcfg.c
team/kpfleming/zaptel-1.2-octasic-PR48/ztdummy.c
Propchange: team/kpfleming/zaptel-1.2-octasic-PR48/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Oct 2 14:11:41 2007
@@ -2,6 +2,8 @@
ztspeed
ztmonitor
ztcfg
+ztcfg-dude
+ztcfg-shared
zonedata.lo
torisatool
tor2fw.h
@@ -29,6 +31,9 @@
hdlcgen
hdlctest
hdlcverify
+sethdlc-new
+usbfxstest
timertest
+ztdiag
Module.symvers
README.html
Modified: team/kpfleming/zaptel-1.2-octasic-PR48/Makefile
URL: http://svn.digium.com/view/zaptel/team/kpfleming/zaptel-1.2-octasic-PR48/Makefile?view=diff&rev=3103&r1=3102&r2=3103
==============================================================================
--- team/kpfleming/zaptel-1.2-octasic-PR48/Makefile (original)
+++ team/kpfleming/zaptel-1.2-octasic-PR48/Makefile Tue Oct 2 14:11:41 2007
@@ -11,7 +11,11 @@
PWD:=$(shell pwd)
endif
-ARCH:=$(shell uname -m | sed -e s/i.86/i386/)
+ifndef MACHINE
+ MACHINE :=$(shell uname -m)
+endif
+# FIXME: this variable sets ARCH in the kernel Makefile.
+ARCH :=$(shell echo $(MACHINE) | sed -e s/i.86/i386/)
# If you want to build for a kernel other than the current kernel, set KVERS
ifndef KVERS
@@ -36,7 +40,7 @@
# Set HOTPLUG_FIRMWARE=no to override automatic building with hotplug support
# if it is enabled in the kernel.
ifeq ($(BUILDVER),linux26)
- ifneq (,$(wildcard $(INSTALL_PREFIX)/etc/udev/rules.d))
+ ifneq (,$(wildcard $(DESTDIR)/etc/udev/rules.d))
DYNFS=yes
UDEVRULES=yes
endif
@@ -50,20 +54,31 @@
CFLAGS+=-DHOTPLUG_FIRMWARE
endif
-MODULES:=zaptel tor2 torisa wcusb wcfxo wctdm wctdm24xxp \
+MODULES:=zaptel tor2 torisa wcusb wcfxo wctdm \
ztdynamic ztd-eth wct1xxp wcte11xp pciradio \
ztd-loc wcte12xp # ztdummy
#MODULES+=wcfxsusb
ifeq ($(BUILDVER),linux26)
MODULES+=ztdummy zttranscode
endif
+
+# for building extra modules in this directory without editing the
+# Makefiles:
+# running: make MODULES_EXTRA="mod1 mod2" SUBDIRS_EXTRA="subdir1/ subdir2/"
+# "subdir/" only works with kernel 2.6.
+MODULES+=$(MODULES_EXTRA)
+
MODULE_ALIASES=wcfxs wctdm8xxp wct2xxp
MODULESO:=$(MODULES:%=%.o)
MODULESKO:=$(MODULES:%=%.ko)
+ifeq ($(BUILDVER),linux26)
+MODULESO+=$(SUBDIRS_EXTRA:%=%/)
+endif
+
# add this later, so it doesn't become part of MODULESO/MODULESKO
-MODULES+=wct4xxp wctc4xxp
+MODULES+=wct4xxp wctc4xxp wctdm24xxp
ifeq ($(ARCH),i386)
ifneq ($(wildcard $(PWD)/hpec/hpec_x86_32.o_shipped),)
@@ -91,22 +106,23 @@
HOSTCC=gcc
-INSTALL_PREFIX:=$(DESTDIR)
-
-CFLAGS+=-I. -O4 -g -Wall
-CFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
-CFLAGS_X86-64:=$(shell if uname -m | grep -q x86_64; then echo "-m64"; fi)
-CFLAGS+=$(CFLAGS_PPC) $(CFLAGS_X86-64)
-LCFLAGS:=-fPIC $(CFLAGS) -DBUILDING_TONEZONE
+INSTALL_PREFIX := /usr
+
+CFLAGS+=-I. -O4 -g -fPIC -Wall
+ifneq (,$(findstring ppc,$(MACHINE)))
+ CFLAGS += -fsigned-char
+ KFLAGS += -msoft-float -fsigned-char
+endif
+ifneq (,$(findstring x86_64,$(MACHINE)))
+ CFLAGS += -m64
+ KFLAGS += -mcmodel=kernel
+endif
KFLAGS:=-I$(KINCLUDES) -O6
KFLAGS+=-DMODULE -D__KERNEL__ -DEXPORT_SYMTAB -I$(KSRC)/drivers/net \
-Wall -I. -Wstrict-prototypes -fomit-frame-pointer -I$(KSRC)/drivers/net/wan -I$(KINCLUDES)/net
ifneq (,$(wildcard $(KINCLUDES)/linux/modversions.h))
KFLAGS+=-DMODVERSIONS -include $(KINCLUDES)/linux/modversions.h
endif
-KFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-msoft-float -fsigned-char"; fi)
-KFLAGS+=$(KFLAGS_PPC)
-KFLAGS+=$(shell if uname -r | grep -q 2.4; then if uname -m | grep -q x86_64; then echo "-mcmodel=kernel"; fi; fi)
#
# Features are now configured in zconfig.h
@@ -114,9 +130,9 @@
KFLAGS+=-DSTANDALONE_ZAPATA
KMAKE:= $(MAKE) -C $(KSRC) SUBDIRS=$(PWD)
-KMAKE_INST:= $(KMAKE) INSTALL_MOD_PATH=$(INSTALL_PREFIX) INSTALL_MOD_DIR=misc modules_install
-
-CONFIG_FILE:=$(INSTALL_PREFIX)/etc/zaptel.conf
+KMAKE_INST:= $(KMAKE) INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=misc modules_install
+
+CONFIG_FILE:=/etc/zaptel.conf
CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
ifeq ($(BUILDVER),linux24)
@@ -124,12 +140,25 @@
DYNFS:=$(shell ps ax | grep -v grep | grep -q devfsd && echo "yes")
endif
+# Utilities we build with a standard build procedure:
+UTILS = tor2ee zttool zttest ztmonitor ztspeed sethdlc-new ztcfg \
+ ztcfg-dude usbfxstest fxstest fxotune ztdiag torisatool
+
+# Makefile mentions them. Source is not included (anynore?)
+UTILS += fxsdump ztprovision
+
+# some tests:
+UTILS += patgen pattest patlooptest hdlcstress hdlctest hdlcgen \
+ hdlcverify timertest
+
+UTILSO = $(UTILS:%=%.o)
+
# sample makefile "trace print"
#tracedummy=$(shell echo ====== GOT HERE ===== >&2; echo >&2)
CHKCONFIG := $(wildcard /sbin/chkconfig)
UPDATE_RCD := $(wildcard /usr/sbin/update-rc.d)
-ifneq (,$(DESTDIR))
+ifeq (,$(DESTDIR))
ifneq (,$(CHKCONFIG))
ADD_INITD := $(CHKCONFIG) --add zaptel
else
@@ -144,6 +173,7 @@
INIT_TARGET := $(DESTDIR)$(INITRD_DIR)/zaptel
COPY_INITD := install -D zaptel.init $(INIT_TARGET)
endif
+RCCONF_DIR := $(firstword $(wildcard /etc/sysconfig /etc/default))
NETSCR_DIR := $(firstword $(wildcard /etc/sysconfig/network-scripts ))
ifneq (,$(NET_SCR_DIR))
@@ -151,14 +181,7 @@
COPY_NETSCR := install -D ifup-hdlc $(NETSCR_TARGET)
endif
-RCCONF_DIR := $(firstword $(wildcard /etc/default /etc/sysconfig))
-ifneq (,$(RCCONF_DIR))
- RCCONF_TARGET := $(DESTDIR)$(RCCONF_DIR)/zaptel
- # Let's not step over an existing config file:
- ifeq (,$(wildcard $(RCCONF_TARGET)))
- COPY_RCCONF := install -D -m 644 zaptel.sysconfig $(RCCONF_TARGET)
- endif
-endif
+SELINUX_ENABLED := $(shell [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"))
ifneq ($(wildcard .version),)
ZAPTELVERSION:=$(shell cat .version)
@@ -173,22 +196,37 @@
LIBTONEZONE_SO_MAJOR_VER:=1
LIBTONEZONE_SO_MINOR_VER:=0
+LIBDIR := $(INSTALL_PREFIX)/lib
+INCLUDE_DIR := $(INSTALL_PREFIX)/include
+# Note: Zaptel's use of /sbin is slightly non-standard:
+SBINDIR := /sbin
+# No better default. If INSTALL_PREFIX != /usr, I'm not sure
+# where the man page sit. So they need to be manually overriden anyway.
MANDIR = /usr/share/man/man8
-MAN_PAGES_BASE = ztcfg
-BINS=ztcfg torisatool makefw ztmonitor ztspeed zttest fxotune
-ifneq (,$(wildcard /usr/include/newt.h))
+MODS_DIR := /lib/modules/$(KVERS)/misc
+BINS=ztcfg torisatool ztmonitor ztspeed zttest fxotune
+ifneq (,$(wildcard $(INCLUDE_DIR)/newt.h))
BINS+=zttool
-MAN_PAGES_BASE += zttool
-endif
-MAN_PAGES = $(MAN_PAGES_BASE:%=doc/%.8)
+endif
+MAN_PAGES = $(wildcard $(BINS:%=doc/%.8))
+
+ASCIIDOC := asciidoc
+
+all: programs modules
+
+programs: utils libs
+
+utils: $(BINS)
+
+libs: $(LIBTONEZONE_SO)
ifeq ($(BUILDVER),linux24)
-all: prereq $(MODULESO) wct4xxp/wct4xxp.o $(BINS) $(LIBTONEZONE_SO)
-endif
-
-ifeq ($(BUILDVER),linux26)
-all: prereq $(BINS) $(LIBTONEZONE_SO)
- @if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
+modules: prereq $(MODULESO) wct4xxp/wct4xxp.o wctdm24xxp/wctdm24xxp.o
+else
+modules: prereq
+ifeq (,$(wildcard $(KSRC)/.config))
+ @echo "You do not appear to have the sources for the $(KVERS) kernel installed (under $(KSRC))."; exit 1
+endif
$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) modules
endif
@@ -215,6 +253,9 @@
wct4xxp/wct4xxp.o:
$(MAKE) -C wct4xxp KFLAGS="$(KFLAGS) -I.." CFLAGS="$(CFLAGS) -I.."
+wctdm24xxp/wctdm24xxp.o:
+ $(MAKE) -C wctdm24xxp KFLAGS="$(KFLAGS) -I.." CFLAGS="$(CFLAGS) -I.."
+
devel: tor2ee
tests: patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
@@ -234,8 +275,6 @@
wctdm.o: wctdm.h
-wctdm24xxp.o: wctdm.h
-
pciradio.o: radfw.h
ztdummy.o: ztdummy.h
@@ -246,19 +285,8 @@
$(filter-out zaptel.o,$(MODULESO)) zaptel-base.o: %.o: %.c
$(CC) $(KFLAGS) -o $@ -c $<
-tor2ee.o: tor2-hw.h
-
-tor2ee: tor2ee.o
- $(CC) $(CFLAGS) -o $@ $^ -lpci
-
-zonedata.lo: zonedata.c
- $(CC) -c $(LCFLAGS) -o $@ $^
-
-tonezone.lo: tonezone.c
- $(CC) -c $(LCFLAGS) -o $@ $^
-
-torisatool: torisatool.o
- $(CC) -o $@ $^
+zonedata.lo tonezone.lo: %.lo: %.c
+ $(CC) -c $(CFLAGS) -o $@ $^
tones.h: gendigits
./gendigits > $@
@@ -269,107 +297,99 @@
radfw.h: makefw pciradio.rbt
./makefw pciradio.rbt radfw > radfw.h
-gendigits: gendigits.o
- $(CC) -o $@ $^ -lm
+gendigits makefw: %: %.c
+ $(HOSTCC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+$(UTILS): %: %.o
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+$(UTILSO): %.o: %.c
+ $(CC) $(CFLAGS) -c $<
+
+gendigits: LDFLAGS+=-lm
prereq: tones.h tor2fw.h radfw.h version.h
zttool.o: zttool.c zaptel.h
+zttool: LDFLAGS+=-lnewt
+
+tor2ee.o: tor2-hw.h
+tor2ee: LDFLAGS+=-lpci
ztprovision.o: ztprovision.c zaptel.h
ztmonitor.o: ztmonitor.c zaptel.h
-ztspeed.o: ztspeed.c
- $(CC) -o $@ -c $^
-
-zttool: zttool.o
- $(CC) -o $@ $^ -lnewt
-
-ztmonitor: ztmonitor.o
- $(CC) -o $@ $^
-
-ztspeed: ztspeed.o
- $(CC) -o $@ $^
-
-sethdlc-new: sethdlc-new.o
- $(CC) -o $@ $^
-
-sethdlc-new.o: sethdlc-new.c
- $(CC) -o $@ -c $(CFLAGS) -I$(KINCLUDES) $^
+# make sure it is not optimized:
+ztspeed.o: CFLAGS=
+ztspeed: CFLAGS=
+
+sethdlc-new.o: CFLAGS+=-I$(KINCLUDES)
libtonezone.a: $(TZOBJS)
ar rcs libtonezone.a $^
$(LIBTONEZONE_SO): $(TZOBJS)
- $(CC) -shared -Wl,-soname,$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) -lm -o $@ $^
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) -o $@ $^ $(LDFLAGS) -lm
ztcfg.c: ztcfg.h
ztcfg-shared: ztcfg.o $(LIBTONEZONE_SO)
- $(CC) -o $@ $^ -lm
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -lm
ztcfg: ztcfg.o libtonezone.a
- $(CC) -o $@ $^ -lm
-
+ztcfg: LDFLAGS+=-lm
+
+ztcfg-dude: LDFLAGS+=-lm -lstdc++
ztcfg-dude: ztcfg-dude.o mknotch.o complex.o $(LIBTONEZONE_SO)
- $(CC) -o $@ $^ -lm -lstdc++
-
-mknotch.o: mknotch.cc
- $(CC) -o $@ -c $^
-
-complex.o: complex.cc
- $(CC) -o $@ -c $^
-
-usbfxstest.o: usbfxstest.c
- $(CC) -o $@ -g -c $^
-
-usbfxstest: usbfxstest.o
- $(CC) -o $@ $^ -lzap
+
+# FIXME: we assume CC can build the C++ modules:
+complex.o mknotch.o: %.o: %.cc
+ $(CC) $(CFLAGS) -o $@ -c $<
+
+usbfxstest: LDFLAGS+=-lzap
fxstest: fxstest.o $(LIBTONEZONE_SO)
- $(CC) -o $@ $^ -lm
-
-fxotune: fxotune.o
- $(CC) -o $@ $^ -lm
-
-fxsdump: fxsdump.o
- $(CC) -o $@ $^ -lm
+fxstest: LDFLAGS+=-lm
+
+fxotune: LDFLAGS+=-lm
+
+fxsdump: LDFLAGS+=-lm
stackcheck: checkstack all
./checkstack *.ko */*.ko
README.html: README
- asciidoc -n -a toc $<
-
-ztdiag: ztdiag.o
- $(CC) -o $@ $^
+ $(ASCIIDOC) -n -a toc $<
+
+xpp/README.Astribank.html: xpp/README.Astribank
+ cd $(@D); $(ASCIIDOC) -o $(@F) -n -a toc $(<F)
devices:
ifndef DYNFS
- mkdir -p $(INSTALL_PREFIX)/dev/zap
- rm -f $(INSTALL_PREFIX)/dev/zap/ctl
- rm -f $(INSTALL_PREFIX)/dev/zap/channel
- rm -f $(INSTALL_PREFIX)/dev/zap/pseudo
- rm -f $(INSTALL_PREFIX)/dev/zap/timer
- rm -f $(INSTALL_PREFIX)/dev/zap/253
- rm -f $(INSTALL_PREFIX)/dev/zap/252
- rm -f $(INSTALL_PREFIX)/dev/zap/251
- rm -f $(INSTALL_PREFIX)/dev/zap/250
- mknod $(INSTALL_PREFIX)/dev/zap/ctl c 196 0
- mknod $(INSTALL_PREFIX)/dev/zap/timer c 196 253
- mknod $(INSTALL_PREFIX)/dev/zap/channel c 196 254
- mknod $(INSTALL_PREFIX)/dev/zap/pseudo c 196 255
+ mkdir -p $(DESTDIR)/dev/zap
+ rm -f $(DESTDIR)/dev/zap/ctl
+ rm -f $(DESTDIR)/dev/zap/channel
+ rm -f $(DESTDIR)/dev/zap/pseudo
+ rm -f $(DESTDIR)/dev/zap/timer
+ rm -f $(DESTDIR)/dev/zap/253
+ rm -f $(DESTDIR)/dev/zap/252
+ rm -f $(DESTDIR)/dev/zap/251
+ rm -f $(DESTDIR)/dev/zap/250
+ mknod $(DESTDIR)/dev/zap/ctl c 196 0
+ mknod $(DESTDIR)/dev/zap/timer c 196 253
+ mknod $(DESTDIR)/dev/zap/channel c 196 254
+ mknod $(DESTDIR)/dev/zap/pseudo c 196 255
N=1; \
while [ $$N -lt 250 ]; do \
- rm -f $(INSTALL_PREFIX)/dev/zap/$$N; \
- mknod $(INSTALL_PREFIX)/dev/zap/$$N c 196 $$N; \
+ rm -f $(DESTDIR)/dev/zap/$$N; \
+ mknod $(DESTDIR)/dev/zap/$$N c 196 $$N; \
N=$$[$$N+1]; \
done
else # DYNFS
ifdef UDEVRULES
- install -d $(INSTALL_PREFIX)/etc/udev/rules.d
- build_tools/genudevrules > $(INSTALL_PREFIX)/etc/udev/rules.d/zaptel.rules
+ install -d $(DESTDIR)/etc/udev/rules.d
+ build_tools/genudevrules > $(DESTDIR)/etc/udev/rules.d/zaptel.rules
else # !UDEVRULES
@echo "**** Dynamic filesystem detected -- not creating device nodes"
endif
@@ -377,69 +397,99 @@
b410p:
@wget -V >/dev/null || (echo "You need wget in order to install the drivers" ; false)
- [ -f misdn-b410p.tar.gz ] || wget ftp://ftp.digium.com/pub/zaptel/b410p/misdn-b410p.tar.gz
+ [ -f misdn-b410p.tar.gz ] || wget http://downloads.digium.com/pub/zaptel/b410p/misdn-b410p.tar.gz
tar -zxf misdn-b410p.tar.gz
$(MAKE) -C misdn install
- [ -f mISDNuser.tar.gz ] || wget ftp://ftp.digium.com/pub/zaptel/b410p/mISDNuser.tar.gz
+ [ -f mISDNuser.tar.gz ] || wget http://downloads.digium.com/pub/zaptel/b410p/mISDNuser.tar.gz
tar -zxf mISDNuser.tar.gz
$(MAKE) -C mISDNuser install
-install: all devices firmware
- install -D -m 755 ztcfg $(INSTALL_PREFIX)/sbin/ztcfg
- if [ -f sethdlc-new ]; then \
- install -D -m 755 sethdlc-new $(INSTALL_PREFIX)/sbin/sethdlc; \
- elif [ -f sethdlc ]; then \
- install -D -m 755 sethdlc $(INSTALL_PREFIX)/sbin/sethdlc ; \
- fi
- if [ -f zttool ]; then install -D -m 755 zttool $(INSTALL_PREFIX)/sbin/zttool; fi
- install -d $(INSTALL_PREFIX)$(MANDIR)
- install -m 644 $(MAN_PAGES) $(INSTALL_PREFIX)$(MANDIR)
-ifeq ($(BUILDVER),linux26)
- for x in $(MODULESKO); do \
- rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/extra/$$x ; \
- done; \
- $(KMAKE_INST);
-else
- for x in $(MODULESO) wct4xxp/wct4xxp.o; do \
- install -D -m 644 $$x $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/$$x ; \
- done;
-
-endif
- if ! [ -f wcfxsusb.o ]; then \
- rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/wcfxsusb.o; \
- fi; \
- rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/wcfxs.o
- install -D -m 755 $(LIBTONEZONE_SO) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER)
- [ `id -u` = 0 ] && /sbin/ldconfig || :
- rm -f $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
- ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
- $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER)
- ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
- $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
- if [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled") ; then /sbin/restorecon -v $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO); fi
- install -D -m 644 zaptel.h $(INSTALL_PREFIX)/usr/include/linux/zaptel.h
- install -D -m 644 torisa.h $(INSTALL_PREFIX)/usr/include/linux/torisa.h
- install -D -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include/tonezone.h
- install -m 644 doc/ztcfg.8 $(INSTALL_PREFIX)/usr/share/man/man8
- install -m 644 doc/zttool.8 $(INSTALL_PREFIX)/usr/share/man/man8
- [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
- [ -f $(CONFIG_FILE) ] || install -D -m 644 zaptel.conf.sample $(CONFIG_FILE)
- build_tools/genmodconf $(BUILDVER) "$(INSTALL_PREFIX)" "$(filter-out zaptel ztdummy zttranscode wctc4xxp ztdynamic xpp_usb,$(MODULES)) $(MODULE_ALIASES)"
+install: all devices install-modules install-programs firmware
+ @echo "###################################################"
+ @echo "###"
+ @echo "### Zaptel installed successfully."
+ @echo "### If you have not done so before, install init scripts with:"
+ @echo "###"
+ @echo "### make config"
+ @echo "###"
+ @echo "###################################################"
+
+install-programs: install-utils install-libs install-include
+
+install-utils: utils
+ install -d $(DESTDIR)$(SBINDIR)
+ install -m 755 $(BINS) $(DESTDIR)$(SBINDIR)
+ifneq (,$(wildcard sethdlc-new))
+ install -D -m 755 sethdlc-new $(DESTDIR)$(SBINDIR)/sethdlc
+else
+ ifneq (,$(wildcard sethdlc))
+ install -D -m 755 sethdlc $(DESTDIR)$(SBINDIR)/sethdlc
+ endif
+endif
+ install -d $(DESTDIR)$(MANDIR)
+ install -m 644 $(MAN_PAGES) $(DESTDIR)$(MANDIR)
+ifeq (,$(wildcard $(DESTDIR)$(CONFIG_FILE)))
+ install -D -m 644 zaptel.conf.sample $(DESTDIR)$(CONFIG_FILE)
+endif
+
+# Pushing those two to a separate target that is not used by default:
+install-modconf:
+ build_tools/genmodconf $(BUILDVER) "$(DESTDIR)" "$(filter-out zaptel ztdummy zttranscode wctc4xxp ztdynamic xpp_usb,$(MODULES)) $(MODULE_ALIASES)"
+ifeq (,$(DESTDIR))
@if [ -d /etc/modutils ]; then \
/sbin/update-modules ; \
fi
+endif
+
+
+# Specific to a kernel version:
+install-modules: modules
+ifeq ($(BUILDVER),linux26)
+ for x in $(MODULESKO); do \
+ rm -f $(DESTDIR)/lib/modules/$(KVERS)/extra/$$x ; \
+ done
+ $(KMAKE_INST)
+else
+ install -d $(DESTDIR)$(MODS_DIR)
+ install -m 644 $(MODULESO) wct4xxp/wct4xxp.o $(DESTDIR)$(MODS_DIR)
+ install -m 644 $(MODULESO) wctdm24xxp/wctdm24xxp.o $(DESTDIR)$(MODS_DIR)
+endif
+ifeq (,$(wildcard wcfxsusb.o))
+ rm -f $(DESTDIR)$(MODS_DIR)/wcfxsusb.o
+endif
+ rm -f $(DESTDIR)$(MODS_DIR)/wcfxs.o
+ [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
+
+install-libs: libs
+ install -D -m 755 $(LIBTONEZONE_SO) $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER)
+ [ `id -u` = 0 ] && /sbin/ldconfig || :
+ rm -f $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO)
+ ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
+ $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER)
+ ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
+ $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO)
+ install -d $(DESTDIR)$(INCLUDE_DIR)
+ install -m 644 tonezone.h $(DESTDIR)$(INCLUDE_DIR)
+ifneq (,$(SELINUX_ENABLED))
+ /sbin/restorecon -v $(DESTDIR)$(LIBDIR)/$(LIBTONEZONE_SO)
+endif
+
+install-include: zaptel.h torisa.h
+ install -d $(DESTDIR)$(INCLUDE_DIR)/linux
+ install -m 644 zaptel.h torisa.h $(DESTDIR)$(INCLUDE_DIR)/linux/
install-udev: devices
+# FIRMWARE_DIR also implies HOTPLUG_FIRMWARE, unless set manually.
firmware:
ifeq ($(HOTPLUG_FIRMWARE),yes)
- if [ -d $(INSTALL_PREFIX)/usr/lib/hotplug/firmware ]; then \
- install -m 644 wct4xxp/*.ima $(INSTALL_PREFIX)/usr/lib/hotplug/firmware; \
- install -m 644 wctc4xxp/*.bin $(INSTALL_PREFIX)/usr/lib/hotplug/firmware; \
+ if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \
+ install -m 644 wct4xxp/*.ima wctc4xxp/*.bin $(DESTDIR)/usr/lib/hotplug/firmware; \
+ install -m 644 wctdm24xxp/*.bin $(DESTDIR)/usr/lib/hotplug/firmware; \
fi
- if [ -d $(INSTALL_PREFIX)/lib/firmware ]; then \
- install -m 644 wct4xxp/*.ima $(INSTALL_PREFIX)/lib/firmware; \
- install -m 644 wctc4xxp/*.bin $(INSTALL_PREFIX)/lib/firmware; \
+ if [ -d $(DESTDIR)/lib/firmware ]; then \
+ install -m 644 wct4xxp/*.ima wctc4xxp/*.bin $(DESTDIR)/lib/firmware; \
+ install -m 644 wctdm24xxp/*.bin $(DESTDIR)/lib/firmware; \
fi
@echo "Installed firmware"
else
@@ -450,8 +500,10 @@
ifneq (,$(COPY_INITD))
$(COPY_INITD)
endif
-ifneq (,$(COPY_RCCONF))
- $(COPY_RCCONF)
+ifneq (,$(RCCONF_DIR))
+ ifeq (,$(wildcard $(DESTDIR)$(RCCONF_DIR)/zaptel))
+ install -D -m 644 zaptel.sysconfig $(DESTDIR)$(RCCONF_DIR)/zaptel
+ endif
endif
ifneq (,$(COPY_NETSCR))
$(COPY_NETSCR)
@@ -461,12 +513,10 @@
endif
@echo "Zaptel has been configured."
@echo ""
-ifneq (,$(COPY_RCCONF))
@echo "If you have any zaptel hardware it is now recommended to "
- @echo "edit $(RCCONF_TARGET) and set there an optimal value for "
- @echo "the variable MODULES ."
+ @echo "edit /etc/default/zaptel or /etc/sysconfig/zaptel and set there an "
+ @echo "optimal value for the variable MODULES ."
@echo ""
-endif
@echo "I think that the zaptel hardware you have on your system is:"
@xpp/utils/zaptel_hardware || true
@@ -494,6 +544,7 @@
$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) clean
$(MAKE) -C wct4xxp clean
$(MAKE) -C wctc4xxp clean
+ $(MAKE) -C wctdm24xxp clean
rm -rf .tmp_versions
rm -f gendigits tones.h
rm -f libtonezone*
@@ -503,6 +554,7 @@
rm -f ztcfg-shared fxstest
rm -rf misdn*
rm -rf mISDNuser*
+ rm -rf README.html xpp/README.Astribank.html
.EXPORT_ALL_VARIABLES:
Modified: team/kpfleming/zaptel-1.2-octasic-PR48/Makefile.kernel26
URL: http://svn.digium.com/view/zaptel/team/kpfleming/zaptel-1.2-octasic-PR48/Makefile.kernel26?view=diff&rev=3103&r1=3102&r2=3103
==============================================================================
--- team/kpfleming/zaptel-1.2-octasic-PR48/Makefile.kernel26 (original)
+++ team/kpfleming/zaptel-1.2-octasic-PR48/Makefile.kernel26 Tue Oct 2 14:11:41 2007
@@ -1,5 +1,5 @@
obj-m := $(MODULESO)
-obj-m += wct4xxp/ wctc4xxp/
+obj-m += wct4xxp/ wctc4xxp/ wctdm24xxp/
# Also build xpp in the subdirectory xpp/ . But only for >=2.6.8 and only
# for i386 or x86_64. On other platforms it has still not been tested well
@@ -13,7 +13,19 @@
endif
endif
+ifdef ECHO_CAN_NAME
+ ECHO_CAN_CFLAGS := -DECHO_CAN_FROMENV -DECHO_CAN_$(ECHO_CAN_NAME)
+endif
+
EXTRA_CFLAGS := -I$(src)
+EXTRA_CFLAGS += $(ECHO_CAN_CFLAGS)
+
+# fix typo present in CentOS and RHEL 2.6.9 kernels
+BAD_KERNELS_VERS := 22 34 34.0.1 34.0.2
+BAD_KERNELS := $(foreach ver,$(BAD_KERNELS_VERS),2.6.9-$(ver).EL 2.6.9-$(ver).ELsmp)
+ifneq (,$(filter $(KVERS),$(BAD_KERNELS)))
+EXTRA_CFLAGS+=-Drw_lock_t=rwlock_t
+endif
zaptel-objs := zaptel-base.o
Modified: team/kpfleming/zaptel-1.2-octasic-PR48/README
URL: http://svn.digium.com/view/zaptel/team/kpfleming/zaptel-1.2-octasic-PR48/README?view=diff&rev=3103&r1=3102&r2=3103
==============================================================================
--- team/kpfleming/zaptel-1.2-octasic-PR48/README (original)
+++ team/kpfleming/zaptel-1.2-octasic-PR48/README Tue Oct 2 14:11:41 2007
@@ -74,7 +74,7 @@
kernel image.
* On Debian Etch and above and any Ubuntu this is
+++ linux-headers-`uname -r` +++
- * On Fedora RHEL and compatibles (e.g. CentOS) this is the
+ * On Fedora, RHEL and compatibles (e.g. CentOS) this is the
kernel-devel package. Or if you run kernel-smp or kernel-xen, you
need kernel-smp-devel or kernel-xen-devel, respectively.
* On SUSE you seem to need the package kernel-source .
@@ -97,8 +97,11 @@
be selected These can be selected from the "Library Routines" submenu
during kernel configuration via "make menuconfig".
- If you don't have any zaptel hardware, you need ztdummy.
- * ztdummy on i386/amd64 and later kernels (>= 2.6.15) can (and should)
- use the system's RTC (Real Time Clock).
+ * ztdummy on i386/x86_64 with kernels >= 2.6.22 can (and should) use
+ high resolution times (CONFIG_HIGH_RES_TIMERS), and (if available,
+ the system HPET.
+ * ztdummy on i386/x86_64 and later kernels (>= 2.6.15) can use the
+ system's RTC (Real Time Clock).
* Alternatives to that for ztdummy are a UHCI USB controller (USB
controllers made by Intel or VIA) or a kernel that has HZ=1000
(default on kernels 2.6.0-2.6.12, optional on newer kernels. Not
@@ -136,7 +139,7 @@
yum install gcc newt-devel libusb-devel
If the following command produces an error, you need to install
-ithe kernel devel package:
+the kernel devel package:
ls /lib/modules/`uname -r`/build/.config
@@ -166,6 +169,63 @@
#make config
----------------------------------
+
+Build Tweaks
+~~~~~~~~~~~~
+Extra Modules
+^^^^^^^^^^^^^
+To build extra modules / modules directory not included in the Zaptel
+distribution, use the optional variables MODULES_EXTRA and
+SUBDIRS_EXTRA:
+
+ make MODULES_EXTRA="mod1 mod2"
+ make MODULES_EXTRA="mod1 mod2" SUBDIRS_EXTRA="subdir1/ subdir1/"
+
+Note that those names are not guaranteed to continue to work on newer
+versions. Hopefully there will be no need for such extra configuration.
+
+Partial Build/Install
+^^^^^^^^^^^^^^^^^^^^^
+There are some make targets that are provided to build or install just
+parts of Zaptel:
+
+. Build targets:
+ - make modules: build just the kernel modules.
+ - make programs: Build just the Zaptel userspace programs. partial
+ targets of it:
+ * make 'utilname': builds 'utilname' alone (e.g: `make ztdiag`)
+ * make utils: Build libtonezone.
+ * make libs: Build libtonezone.
+. Install targets:
+ - make install-modules: install just kernel modules.
+ - make firmware: download and install firmwares for Digium cards
+ - make install-programs: Userspace: Partial targets of it are:
+ * make install-utils: install Zaptel userspace programs and
+ and basic support files.
+ * make install-libs: install libtonezone
+ * make install-include: install zaptel.h
+ - make config: should be run once to configure
+
+Building to a Subtree
+^^^^^^^^^^^^^^^^^^^^^
+The following may be useful when testing the package or when preparing a
+package for a binary distribution (such as an rpm package) installing
+onto a subtree rather than on th real system.
+
+ make install DESTDIR=targetdir
+
+This can be useful for any partial install target of the above (e.g:
+install-modules or install-programs).
+
+the targetdir must be an absolute path, at least if you install the
+modules. To install to a relative path you can use something like:
+
+ make install-modules DESTDIR=$PWD/target
+
+The 'install' target might fail if run as a user to a DESTDIR when
+attempting to generate device files. In that case, try:
+
+ make install DESTDIR=$PWD/target DYNFS=
zaptel.conf
~~~~~~~~~~~
@@ -265,6 +325,12 @@
of how close it was. Also try running it with the option -v for a
verbose output.
+To check the clock source that is built into ztdummy, you can either
+look at title of its span in /proc/zaptel file for a "source:" in the
+description. Or even run:
+
+ strings zaptel.ko | grep source:
+
Spans and Channels
------------------
@@ -281,8 +347,8 @@
generated, and ditto for spans.
-PROCFS Interface: /proc/zap
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
+PROCFS Interface: /proc/zaptel
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A simple way to get the current list of spans and channels each span
contains is the files under /proc/zaptel . /proc/zaptel is generated by
zaptel as it loads. As each span registers to Zaptel, a file under
@@ -295,8 +361,47 @@
The title line shows the number of the span, its name and title, and
(potentially) the alarms in which it is.
+The title shows the span number and name, followed by any allarms the
+span may have: For example, here is the first span in my system (with no
+alarms):
+
+ Span 1: XBUS-00/XPD-00 "Xorcom XPD #0/0: FXS"
+
The channel line for each channel shows its channel number, name and the
-actual signalling assigned to it through ztcfg.
+actual signalling assigned to it through ztcfg. Before being configured
+by ztcfg: This is Zaptel channel 2, whose name is 'XPP_FXS/0/0/1'.
+
+ 2 XPP_FXS/0/0/1
+
+After being configured by ztcfg: the signalling 'FXOLS' was added. FXS
+channels have FXO signalling and vice versa:
+
+ 2 XPP_FXS/0/0/1 FXOLS
+
+If the channel is in use (typically opened by Asterisk) then you will
+see an extra '(In use)':
+
+ 2 XPP_FXS/0/0/1 FXOLS (In use)
+
+[[ppp]]
+PPP Support
+-----------
+Zaptel digital cards can provide data channels through ppp as
+point-to-point connections. This requires a plugin to the ppp daemon
+that is included in the ppp/ subdirectory. To install it:
+
+1. Make sure you have the PPP source / headers installed. On Debian:
+
+ apt-get install ppp-dev
+
+2. Run 'make' on the ppp subdirectory:
+
+ make -C ppp
+ make -C ppp install
+
+3. Make sure your kernel has support for both PPP (which is common is
+ distribution kernels and for HDLC (much less common) - CONFIG_PPP and
+ CONFIG_HDLC .
What is the license for the zaptel driver?
@@ -307,8 +412,7 @@
If you wish to use the zaptel drivers in an application for which the
GPL is not appropriate (e.g. a proprietary embedded system), licenses
-under more flexible terms can be readily obtained through Digium, Inc.
-at reasonable cost.
+under more flexible terms can be readily obtained through Digium, Inc.at reasonable cost.
How do I report bugs or contribute?
Modified: team/kpfleming/zaptel-1.2-octasic-PR48/build_tools/install_prereq
URL: http://svn.digium.com/view/zaptel/team/kpfleming/zaptel-1.2-octasic-PR48/build_tools/install_prereq?view=diff&rev=3103&r1=3102&r2=3103
==============================================================================
--- team/kpfleming/zaptel-1.2-octasic-PR48/build_tools/install_prereq (original)
+++ team/kpfleming/zaptel-1.2-octasic-PR48/build_tools/install_prereq Tue Oct 2 14:11:41 2007
@@ -26,6 +26,23 @@
esac
+# Fixme: should be done by apt and not by dpkg?
+check_installed_debs() {
+ dpkg-query -W --showformat '${Status} ${Package}\n' "$@" 2>/dev/null \
+ | awk '/ not-installed/{print $4}'
+}
+
+# parsing the output of yum is close to impossible.
+# We'll use rpm and hope for the best:
+check_installed_rpms() {
+ for pack in "$@"
+ do
+ if ! rpm -q $pack >/dev/null 2>/dev/null
+ then echo $pack
+ fi
+ done
+}
+
has_kernel_source() {
test -r /lib/modules/$KVERS/build/.config
@@ -38,6 +55,7 @@
handle_debian() {
# echo "# Distribution is Debian or compatible"
kernel_package=''
+ extra_packs=`check_installed_debs $PACKAGES_DEBIAN`
if ! has_kernel_source; then
kernel_package="linux-headers-$KVERS"
debian_release=`cat /etc/debian_version`
@@ -46,15 +64,16 @@
esac
echo "# Kernel source not found. Installing $kernel_package"
fi
- $testcmd apt-get install -y $PACKAGES_DEBIAN $kernel_package
+ $testcmd apt-get install -y $extra_packs $kernel_package
}
handle_rh() {
- # echo "# Distribution is Debian or compatible"
+ # echo "# Distribution is RedHat or similar."
kernel_package=''
+ extra_packs=`check_installed_rpms $PACKAGES_RH`
if ! has_kernel_source; then
kern_str='' # extra "kernel version"
- case $KVERS in
+ case "$KVERS" in
*smp*) kern_str='-smp';;
*PAE*) kern_str='-PAE';;
*xen*) kern_str='-xen';;
@@ -68,7 +87,7 @@
echo "#"
echo "# and then reboot to upgrade to the newly installed kernel."
fi
- $testcmd yum install -y $PACKAGES_RH $kernel_package
+ $testcmd yum install -y $extra_packs $kernel_package
}
if in_test_mode; then
Modified: team/kpfleming/zaptel-1.2-octasic-PR48/fxotune.c
URL: http://svn.digium.com/view/zaptel/team/kpfleming/zaptel-1.2-octasic-PR48/fxotune.c?view=diff&rev=3103&r1=3102&r2=3103
==============================================================================
--- team/kpfleming/zaptel-1.2-octasic-PR48/fxotune.c (original)
+++ team/kpfleming/zaptel-1.2-octasic-PR48/fxotune.c Tue Oct 2 14:11:41 2007
@@ -231,11 +231,15 @@
return -1;
}
+retry:
/* read return response */
res = read(whichzap, inbuf, BUFFER_LENGTH);
if (res != BUFFER_LENGTH) {
- fprintf(stderr, "Could not fill input buffer\n");
- return -1;
+ int x;
+
+ ioctl(whichzap, ZT_GETEVENT, &x);
+ goto retry;
+
}
/* calculate power of response */
@@ -349,10 +353,10 @@
fputs(usage, stdout);
return -1;
}
- configfd = open(configfile, O_CREAT|O_TRUNC|O_WRONLY);
+ configfd = open(configfile, O_CREAT|O_TRUNC|O_WRONLY, 0666);
if (configfd < 0) {
- fprintf(stderr, "open: %s\n", strerror(errno));
+ fprintf(stderr, "Cannot generate config file %s: open: %s\n", configfile, strerror(errno));
return -1;
}
Modified: team/kpfleming/zaptel-1.2-octasic-PR48/pciradio.c
URL: http://svn.digium.com/view/zaptel/team/kpfleming/zaptel-1.2-octasic-PR48/pciradio.c?view=diff&rev=3103&r1=3102&r2=3103
==============================================================================
--- team/kpfleming/zaptel-1.2-octasic-PR48/pciradio.c (original)
+++ team/kpfleming/zaptel-1.2-octasic-PR48/pciradio.c Tue Oct 2 14:11:41 2007
@@ -1711,7 +1711,7 @@
}
- if (request_irq(pdev->irq, pciradio_interrupt, SA_SHIRQ, "pciradio", rad)) {
+ if (request_irq(pdev->irq, pciradio_interrupt, ZAP_IRQ_SHARED, "pciradio", rad)) {
printk("pciradio: Unable to request IRQ %d\n", pdev->irq);
if (rad->freeregion)
release_region(rad->ioaddr, 0xff);
Propchange: team/kpfleming/zaptel-1.2-octasic-PR48/ppp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct 2 14:11:41 2007
@@ -1,0 +1,1 @@
[... 12375 lines stripped ...]
More information about the zaptel-commits
mailing list