[zaptel-commits] tzafrir: branch tzafrir/sysfs r4371 - in /team/tzafrir/sysfs: ./ build_tools/...
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Sat Jun 28 11:29:11 CDT 2008
Author: tzafrir
Date: Sat Jun 28 11:29:10 2008
New Revision: 4371
URL: http://svn.digium.com/view/zaptel?view=rev&rev=4371
Log:
Sync branch.
Added:
team/tzafrir/sysfs/build_tools/zaptel_svn_tarball
- copied unchanged from r4368, branches/1.4/build_tools/zaptel_svn_tarball
team/tzafrir/sysfs/doc/ztscan.8
- copied unchanged from r4368, branches/1.4/doc/ztscan.8
team/tzafrir/sysfs/kernel/fxo_modes.h
- copied unchanged from r4368, branches/1.4/kernel/fxo_modes.h
team/tzafrir/sysfs/kernel/voicebus.c
- copied unchanged from r4368, branches/1.4/kernel/voicebus.c
team/tzafrir/sysfs/kernel/voicebus.h
- copied unchanged from r4368, branches/1.4/kernel/voicebus.h
team/tzafrir/sysfs/kernel/xpp/init_card_1_30
- copied unchanged from r4368, branches/1.4/kernel/xpp/init_card_1_30
team/tzafrir/sysfs/kernel/xpp/init_card_2_30
- copied unchanged from r4368, branches/1.4/kernel/xpp/init_card_2_30
team/tzafrir/sysfs/kernel/xpp/init_card_3_30
- copied unchanged from r4368, branches/1.4/kernel/xpp/init_card_3_30
team/tzafrir/sysfs/kernel/xpp/init_card_4_30
- copied unchanged from r4368, branches/1.4/kernel/xpp/init_card_4_30
team/tzafrir/sysfs/kernel/xpp/utils/xpp_timing
- copied unchanged from r4368, branches/1.4/kernel/xpp/utils/xpp_timing
Removed:
team/tzafrir/sysfs/kernel/xpp/init_card_3_29
team/tzafrir/sysfs/kernel/xpp/init_card_4_29
team/tzafrir/sysfs/kernel/xpp/init_card_6_29
team/tzafrir/sysfs/kernel/xpp/init_card_7_29
team/tzafrir/sysfs/kernel/xpp/init_card_9_29
Modified:
team/tzafrir/sysfs/ (props changed)
team/tzafrir/sysfs/Makefile
team/tzafrir/sysfs/README
team/tzafrir/sysfs/build_tools/genudevrules
team/tzafrir/sysfs/build_tools/test_kernel_git
team/tzafrir/sysfs/build_tools/uninstall-modules
team/tzafrir/sysfs/doc/module-parameters.txt
team/tzafrir/sysfs/firmware/Makefile
team/tzafrir/sysfs/fxotune.c
team/tzafrir/sysfs/hdlcstress.c
team/tzafrir/sysfs/hdlctest.c
team/tzafrir/sysfs/install_prereq
team/tzafrir/sysfs/kernel/GNUmakefile
team/tzafrir/sysfs/kernel/Kbuild
team/tzafrir/sysfs/kernel/digits.h
team/tzafrir/sysfs/kernel/hpec/hpec_zaptel.h
team/tzafrir/sysfs/kernel/jpah.h
team/tzafrir/sysfs/kernel/kb1ec.h
team/tzafrir/sysfs/kernel/mg2ec.h
team/tzafrir/sysfs/kernel/pciradio.c
team/tzafrir/sysfs/kernel/sec-2.h
team/tzafrir/sysfs/kernel/sec.h
team/tzafrir/sysfs/kernel/tor2.c
team/tzafrir/sysfs/kernel/torisa.c
team/tzafrir/sysfs/kernel/wcfxo.c
team/tzafrir/sysfs/kernel/wct1xxp.c
team/tzafrir/sysfs/kernel/wct4xxp/base.c
team/tzafrir/sysfs/kernel/wct4xxp/wct4xxp-diag.c
team/tzafrir/sysfs/kernel/wct4xxp/wct4xxp.h
team/tzafrir/sysfs/kernel/wctc4xxp/Kbuild
team/tzafrir/sysfs/kernel/wctc4xxp/base.c
team/tzafrir/sysfs/kernel/wctdm.c
team/tzafrir/sysfs/kernel/wctdm24xxp/GpakApi.c
team/tzafrir/sysfs/kernel/wctdm24xxp/Kbuild
team/tzafrir/sysfs/kernel/wctdm24xxp/base.c
team/tzafrir/sysfs/kernel/wctdm24xxp/wctdm24xxp.h
team/tzafrir/sysfs/kernel/wcte11xp.c
team/tzafrir/sysfs/kernel/wcte12xp/GpakApi.c
team/tzafrir/sysfs/kernel/wcte12xp/Kbuild
team/tzafrir/sysfs/kernel/wcte12xp/base.c
team/tzafrir/sysfs/kernel/wcte12xp/vpmadt032.c
team/tzafrir/sysfs/kernel/wcte12xp/wcte12xp.h
team/tzafrir/sysfs/kernel/wcusb.c
team/tzafrir/sysfs/kernel/xpp/.version
team/tzafrir/sysfs/kernel/xpp/Changelog_xpp
team/tzafrir/sysfs/kernel/xpp/Kbuild
team/tzafrir/sysfs/kernel/xpp/README.Astribank
team/tzafrir/sysfs/kernel/xpp/calibrate_slics
team/tzafrir/sysfs/kernel/xpp/card_bri.c
team/tzafrir/sysfs/kernel/xpp/card_fxo.c
team/tzafrir/sysfs/kernel/xpp/card_fxo.h
team/tzafrir/sysfs/kernel/xpp/card_fxs.c
team/tzafrir/sysfs/kernel/xpp/card_fxs.h
team/tzafrir/sysfs/kernel/xpp/card_global.c
team/tzafrir/sysfs/kernel/xpp/card_global.h
team/tzafrir/sysfs/kernel/xpp/card_pri.c
team/tzafrir/sysfs/kernel/xpp/firmwares/FPGA_1141.hex
team/tzafrir/sysfs/kernel/xpp/firmwares/FPGA_1151.hex
team/tzafrir/sysfs/kernel/xpp/firmwares/FPGA_FXS.hex
team/tzafrir/sysfs/kernel/xpp/utils/Makefile
team/tzafrir/sysfs/kernel/xpp/utils/astribank_hook
team/tzafrir/sysfs/kernel/xpp/utils/fpga_load.8
team/tzafrir/sysfs/kernel/xpp/utils/fpga_load.c
team/tzafrir/sysfs/kernel/xpp/utils/genzaptelconf
team/tzafrir/sysfs/kernel/xpp/utils/print_modes.c
team/tzafrir/sysfs/kernel/xpp/utils/xpp.rules
team/tzafrir/sysfs/kernel/xpp/utils/xpp_blink
team/tzafrir/sysfs/kernel/xpp/utils/xpp_fxloader
team/tzafrir/sysfs/kernel/xpp/utils/xpp_modprobe
team/tzafrir/sysfs/kernel/xpp/utils/zapconf
team/tzafrir/sysfs/kernel/xpp/utils/zconf/Zaptel/Chans.pm
team/tzafrir/sysfs/kernel/xpp/utils/zconf/Zaptel/Config/Defaults.pm
team/tzafrir/sysfs/kernel/xpp/utils/zconf/Zaptel/Hardware.pm
team/tzafrir/sysfs/kernel/xpp/utils/zconf/Zaptel/Hardware/PCI.pm
team/tzafrir/sysfs/kernel/xpp/utils/zconf/Zaptel/Span.pm
team/tzafrir/sysfs/kernel/xpp/utils/zconf/Zaptel/Xpp.pm
team/tzafrir/sysfs/kernel/xpp/utils/zconf/Zaptel/Xpp/Line.pm
team/tzafrir/sysfs/kernel/xpp/utils/zconf/Zaptel/Xpp/Xbus.pm
team/tzafrir/sysfs/kernel/xpp/utils/zconf/Zaptel/Xpp/Xpd.pm
team/tzafrir/sysfs/kernel/xpp/xbus-core.c
team/tzafrir/sysfs/kernel/xpp/xbus-core.h
team/tzafrir/sysfs/kernel/xpp/xbus-pcm.c
team/tzafrir/sysfs/kernel/xpp/xbus-pcm.h
team/tzafrir/sysfs/kernel/xpp/xbus-sysfs.c
team/tzafrir/sysfs/kernel/xpp/xdefs.h
team/tzafrir/sysfs/kernel/xpp/xframe_queue.c
team/tzafrir/sysfs/kernel/xpp/xpd.h
team/tzafrir/sysfs/kernel/xpp/xpp_usb.c
team/tzafrir/sysfs/kernel/xpp/xpp_zap.c
team/tzafrir/sysfs/kernel/xpp/xpp_zap.h
team/tzafrir/sysfs/kernel/xpp/xproto.c
team/tzafrir/sysfs/kernel/xpp/xproto.h
team/tzafrir/sysfs/kernel/xpp/zap_debug.c
team/tzafrir/sysfs/kernel/xpp/zap_debug.h
team/tzafrir/sysfs/kernel/zaptel-base.c
team/tzafrir/sysfs/kernel/zaptel.h
team/tzafrir/sysfs/kernel/ztd-eth.c
team/tzafrir/sysfs/kernel/ztdummy.c
team/tzafrir/sysfs/kernel/ztdynamic.c
team/tzafrir/sysfs/kernel/zttranscode.c
team/tzafrir/sysfs/live_zap
team/tzafrir/sysfs/ppp/Makefile
team/tzafrir/sysfs/ppp/zaptel.c
team/tzafrir/sysfs/sethdlc-new.c
team/tzafrir/sysfs/sethdlc.c
team/tzafrir/sysfs/tonezone.c
team/tzafrir/sysfs/tonezone.h
team/tzafrir/sysfs/zaptel.conf.sample
team/tzafrir/sysfs/zaptel.init
team/tzafrir/sysfs/zonedata.c
team/tzafrir/sysfs/ztcfg-dude.c
team/tzafrir/sysfs/ztcfg.c
team/tzafrir/sysfs/ztmonitor.c
team/tzafrir/sysfs/ztscan.c
Propchange: team/tzafrir/sysfs/
------------------------------------------------------------------------------
--- branch-1.2-blocked (original)
+++ branch-1.2-blocked Sat Jun 28 11:29:10 2008
@@ -1,1 +1,1 @@
-/branches/1.2:917,937,1073,1206,1613,2018,2434,2583,2668,2750,2789,2868,2871,2878,3083,3098-3099,3201,3509,3645
+/branches/1.2:917,937,1073,1206,1613,2018,2434,2583,2668,2750,2789,2868,2871,2878,3083,3098-3099,3201,3509,3645,3833,3847,3917,3951,4037-4038,4117,4233
Propchange: team/tzafrir/sysfs/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/tzafrir/sysfs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jun 28 11:29:10 2008
@@ -7,6 +7,8 @@
Module.symvers
Modules.symvers
README.html
+zaptel.conf.asciidoc
+tonezones.txt
autom4te.cache
config.log
config.status
Propchange: team/tzafrir/sysfs/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Jun 28 11:29:10 2008
@@ -1,1 +1,1 @@
-/branches/1.4:1-3818
+/branches/1.4:1-4370
Modified: team/tzafrir/sysfs/Makefile
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/Makefile?view=diff&rev=4371&r1=4370&r2=4371
==============================================================================
--- team/tzafrir/sysfs/Makefile (original)
+++ team/tzafrir/sysfs/Makefile Sat Jun 28 11:29:10 2008
@@ -18,7 +18,9 @@
PWD:=$(shell pwd)
endif
+ifeq ($(ARCH),)
ARCH:=$(shell uname -m | sed -e s/i.86/i386/)
+endif
ifeq ($(DEB_HOST_GNU_TYPE),)
UNAME_M:=$(shell uname -m)
@@ -41,6 +43,20 @@
KVERS_MAJ:=$(shell echo $(KVERS) | cut -d. -f1-2)
KINCLUDES:=$(KSRC)/include
+# We use the kernel's .config file as an indication that the KSRC
+# directory is indeed a valid and configured kernel source (or partial
+# source) directory.
+#
+# We also source it, as it has the format of Makefile variables list.
+# Thus we will have many CONFIG_* variables from there.
+KCONFIG:=$(KSRC)/.config
+ifneq (,$(wildcard $(KCONFIG)))
+ HAS_KSRC=yes
+ include $(KCONFIG)
+else
+ HAS_KSRC=no
+endif
+
ifeq ($(KVERS_MAJ),2.4)
BUILDVER:=linux24
else
@@ -54,26 +70,14 @@
DYNFS=yes
UDEVRULES=yes
endif
- HOTPLUG_FIRMWARE:=$(shell if grep CONFIG_FW_LOADER $(KINCLUDES)/linux/autoconf.h | grep -q undef; then echo "no"; else echo "yes"; fi)
-else
- # Hotplug firmware loading is not supported on any other version then 2.6
- HOTPLUG_FIRMWARE:=no
-endif
-
-ifeq ($(HOTPLUG_FIRMWARE),yes)
- CFLAGS+=-DHOTPLUG_FIRMWARE
-endif
-
-ifeq ($(ARCH),i386)
-ifneq ($(wildcard $(PWD)/hpec/hpec_x86_32.o_shipped),)
-HPEC_PRESENT=yes
-endif
-endif
-
-ifeq ($(ARCH),x86_64)
-ifneq ($(wildcard $(PWD)/hpec/hpec_x86_64.o_shipped),)
-HPEC_PRESENT=yes
-endif
+ ifeq (yes,$(HAS_KSRC))
+ HOTPLUG_FIRMWARE:=$(shell if grep -q '^CONFIG_FW_LOADER=[ym]' $(KCONFIG); then echo "yes"; else echo "no"; fi)
+ endif
+endif
+
+ifneq (,$(findstring $(CONFIG_DEVFS_FS),y m))
+ DYNFS=yes
+ HAS_DEVFS=yes
endif
# If the file .zaptel.makeopts is present in your home directory, you can
@@ -140,16 +144,10 @@
ifeq ($(BUILDVER),linux24)
INSTALL_MODULES:=$(BUILD_TOPDIR_MODULES:%=$(KERN_DIR)/%.o)
- INSTALL_MODULES+=$(foreach mod,$(BUILD_SUBDIR_MODULES),$(mod)/$(mod).o)
+ INSTALL_MODULES+=$(foreach mod,$(BUILD_SUBDIR_MODULES),$(KERN_DIR)/$(mod)/$(mod).o)
ALL_MODULES:=$(TOPDIR_MODULES:%=$(KERN_DIR)/%.o)
ALL_MODULES+=$(SUBDIR_MODULES:%=$(KERN_DIR)/%/%.o)
else
- INSTALL_MODULES:=$(BUILD_TOPDIR_MODULES:%=$(KERN_DIR)/%.ko)
- INSTALL_MODULES+=$(foreach mod,$(filter-out xpp,$(BUILD_SUBDIR_MODULES)),$(KERN_DIR)/$(mod)/$(mod).ko)
- ifneq ($(filter xpp,$(BUILD_SUBDIR_MODULES)),)
- INSTALL_MODULES+=$(patsubst %,$(KERN_DIR)/xpp/%.ko,xpp_usb xpd_fxo xpd_fxs xpp)
- endif
-
ALL_MODULES:=$(TOPDIR_MODULES:%=%.ko)
ALL_MODULES+=$(foreach mod,$(filter-out xpp,$(SUBDIR_MODULES)),$(mod)/$(mod).ko)
ALL_MODULES+=$(patsubst %,xpp/%.ko,xpp_usb xpd_fxo xpd_fxs xpp)
@@ -189,10 +187,12 @@
KFLAGS+=-DSTANDALONE_ZAPATA
CFLAGS+=-DSTANDALONE_ZAPATA
ifeq ($(BUILDVER),linux24)
-KMAKE = $(MAKE) -C kernel HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) \
+KMAKE = $(MAKE) -C kernel HOTPLUG_FIRMWARE=no \
+ HOSTCC=$(HOSTCC) ARCH=$(ARCH) KSRC=$(KSRC) LD=$(LD) CC=$(CC) \
+ UNAME_M=$(UNAME_M) \
BUILD_TOPDIR_MODULES="$(BUILD_TOPDIR_MODULES)" BUILD_SUBDIR_MODULES="$(BUILD_SUBDIR_MODULES)"
else
-KMAKE = $(MAKE) -C $(KSRC) SUBDIRS=$(PWD)/kernel \
+KMAKE = $(MAKE) -C $(KSRC) ARCH=$(ARCH) SUBDIRS=$(PWD)/kernel \
HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE) KBUILD_OBJ_M="$(KBUILD_OBJ_M)"
endif
KMAKE_INST = $(KMAKE) \
@@ -279,7 +279,7 @@
MAN_PAGES:=$(wildcard $(BINS:%=doc/%.8))
# All the man pages. Not just installed ones:
-GROFF_PAGES := $(wildcard doc/*.8)
+GROFF_PAGES := $(wildcard doc/*.8 kernel/xpp/utils/*.8)
GROFF_HTML := $(GROFF_PAGES:%=%.html)
all: menuselect.makeopts
@@ -299,25 +299,11 @@
utils: $(BINS) utils-subdirs
modules: prereq
- @if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
-#ifeq ($(BUILDVER),linux26)
+ifeq (no,$(HAS_KSRC))
+ echo "You do not appear to have the sources for the $(KVERS) kernel installed."
+ exit 1
+endif
$(KMAKE) modules
-#else
-#modules: $(INSTALL_MODULES)
-#endif
-
-ifeq ($(HPEC_PRESENT),yes)
-ifeq ($(ARCH),i386)
-ZAPTEL_HPEC:=hpec/hpec_x86_32.o_shipped
-endif
-
-ifeq ($(ARCH),x86_64)
-ZAPTEL_HPEC:=hpec/hpec_x86_64.o_shipped
-endif
-
-KFLAGS+=-DECHO_CAN_HPEC -I$(PWD)/hpec
-zaptel-base.o: hpec/hpec_zaptel.h hpec/hpec_user.h
-endif
version.h:
@ZAPTELVERSION="${ZAPTELVERSION}" build_tools/make_version_h > $@.tmp
@@ -328,11 +314,15 @@
tests: patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
-zonedata.lo: zonedata.c
- $(CC) -c $(CFLAGS) -o $@ $^
-
-tonezone.lo: tonezone.c
- $(CC) -c $(CFLAGS) -o $@ $^
+zonedata.o: tonezone.h
+
+zonedata.lo: zonedata.c tonezone.h
+ $(CC) -c $(CFLAGS) -o $@ $<
+
+tonezone.o: kernel/zaptel.h tonezone.h
+
+tonezone.lo: tonezone.c tonezone.h kernel/zaptel.h
+ $(CC) -c $(CFLAGS) -o $@ $<
prereq: config.status version.h
@@ -380,42 +370,24 @@
fxotune: LDLIBS+=-lm
fxsdump: LDLIBS+=-lm
-ifeq ($(BUILDVER),linux24)
-wct4xxp/wct4xxp.o:
- $(MAKE) -C wct4xxp KFLAGS="$(KFLAGS) -I.." CFLAGS="$(CFLAGS) -I.."
-
-tor2.o: tor2-hw.h tor2fw.h
-
-zaptel-base.o: digits.h arith.h sec.h sec-2.h kb1ec.h mg2ec.h zconfig.h
-
-wcusb.o: wcusb.h
-
-wctdm.o: wctdm.h
-
-wctdm24xxp/wctdm24xxp.o:
- $(MAKE) -C wctdm24xxp KFLAGS="$(KFLAGS) -I.." CFLAGS="$(CFLAGS) -I.."
-
-wcte12xp/wcte12xp.o:
- $(MAKE) -C wcte12xp KFLAGS="$(KFLAGS) -I.." CFLAGS="$(CFLAGS) -I.."
-
-pciradio.o: radfw.h
-
-ztdummy.o: ztdummy.h
-
-zaptel.o: zaptel-base.o $(ZAPTEL_HPEC)
- $(LD) -r -o $@ $< $(ZAPTEL_HPEC)
-
-$(filter-out zaptel.o,$(BUILD_TOPDIR_MODULES:%=%.o)) zaptel-base.o: %.o: %.c zaptel.h
- $(CC) $(KFLAGS) -o $@ -c $<
-endif
-
stackcheck: checkstack modules
- ./checkstack *.ko */*.ko
-
-README.html: README
+ ./checkstack kernel/*.ko kernel/*/*.ko
+
+
+tonezones.txt: zonedata.c
+ perl -ne 'next unless (/\.(country|description) = *"([^"]*)/); \
+ print (($$1 eq "country")? "* $$2\t":"$$2\n");' $< \
+ >$@
+
+zaptel.conf.asciidoc: zaptel.conf.sample
+ perl -n -e \
+ 'if (/^#($$|\s)(.*)/){ if (!$$in_doc){print "\n"}; $$in_doc=1; print "$$2\n" } else { if ($$in_doc){print "\n"}; $$in_doc=0; print " $$_" }' \
+ $< >$@
+
+README.html: README zaptel.conf.asciidoc tonezones.txt
$(ASCIIDOC) -n -a toc -a toclevels=3 $<
-xpp/README.Astribank.html: xpp/README.Astribank
+kernel/xpp/README.Astribank.html: kernel/xpp/README.Astribank
cd $(@D); $(ASCIIDOC) -o $(@F) -n -a toc -a toclevels=4 $(<F)
# on Debian: this requires the full groof, not just groff-base.
@@ -425,8 +397,8 @@
htmlman: $(GROFF_HTML)
-MISDNVERSION=1_1_3
-MISDNUSERVERSION=1_1_3
+MISDNVERSION=1_1_7_2
+MISDNUSERVERSION=1_1_7_2
b410p:
@if test "$(DOWNLOAD)" = ":" ; then \
echo "**************************************************"; \
@@ -485,7 +457,7 @@
install-firmware:
ifeq ($(HOTPLUG_FIRMWARE),yes)
- $(MAKE) -C firmware hotplug-install DESTDIR=$(DESTDIR)
+ $(MAKE) -C firmware hotplug-install DESTDIR=$(DESTDIR) HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
endif
install-libs: libs
@@ -517,7 +489,7 @@
$(INSTALL) -D -m 644 kernel/zaptel.h $(DESTDIR)$(INC_DIR)/zaptel.h
devices:
-ifndef DYNFS
+ifneq (yes,$(DYNFS))
mkdir -p $(DESTDIR)/dev/zap
rm -f $(DESTDIR)/dev/zap/ctl
rm -f $(DESTDIR)/dev/zap/channel
@@ -540,11 +512,11 @@
N=$$[$$N+1]; \
done
else # DYNFS
- ifdef UDEVRULES
+ ifneq (yes,$(UDEVRULES)) #!UDEVRULES
+ @echo "**** Dynamic filesystem detected -- not creating device nodes"
+ else # UDEVRULES
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
endif
@@ -553,29 +525,18 @@
uninstall-hotplug:
$(MAKE) -C firmware hotplug-uninstall DESTDIR=$(DESTDIR)
-BASENAMES=$(sort $(shell for x in $(ALL_MODULES); do basename $x; done))
uninstall-modules:
+ifneq ($(BUILDVER),linux24)
+ @./build_tools/uninstall-modules $(DESTDIR)/lib/modules/$(KVERS) $(ALL_MODULES)
+endif
+
ifeq ($(BUILDVER),linux24)
-else
- @./build_tools/uninstall-modules $(DESTDIR)/lib/modules/$(KVERS) $(BASENAMES)
- @for x in $(ALL_MODULES); do \
- rm -f $(DESTDIR)/lib/modules/$(KVERS)/extra/$$x ; \
- rm -f $(DESTDIR)/lib/modules/$(KVERS)/misc/$$x ; \
- rm -f $(DESTDIR)/lib/modules/$(KVERS)/zaptel/$$x ; \
- done;
-endif
-
-BASENAMES=$(sort $(shell for mod in $(ALL_MODULES); do basename $$mod; done))
-
install-modules: $(INSTALL_MODULES) uninstall-modules
-ifeq ($(BUILDVER),linux24)
$(INSTALL) -d $(DESTDIR)$(MOD_DIR)
$(INSTALL) -m 644 $(INSTALL_MODULES) $(DESTDIR)$(MOD_DIR)
else
+install-modules: uninstall-modules
$(KMAKE_INST)
- ifneq (,$(wildcard datamods/syncppp.ko))
- $(MAKE) -C datamods install
- endif
endif
[ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || :
@@ -624,7 +585,11 @@
rm -f $(BINS)
rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
rm -f $(LTZ_SO) $(LTZ_A) *.lo
+ifeq (yes,$(HAS_KSRC))
$(KMAKE) clean
+else
+ rm -f kernel/*.o kernel/*.ko kernel/*/*.o kernel/*/*.ko
+endif
@for dir in $(SUBDIRS_UTILS_ALL); do \
$(MAKE) -C $$dir clean; \
done
@@ -637,7 +602,8 @@
rm -f ztcfg-shared fxstest
rm -rf misdn*
rm -rf mISDNuser*
- rm -rf README.html xpp/README.Astribank.html
+ rm -rf $(GROFF_HTML)
+ rm -rf README.html xpp/README.Astribank.html zaptel.conf.asciidoc
distclean: dist-clean
@@ -670,8 +636,6 @@
@echo "Generating input for menuselect ..."
@build_tools/make_tree > $@
-.EXPORT_ALL_VARIABLES:
-
.PHONY: menuselect distclean dist-clean clean version.h all _all install b410p devices programs modules tests devel data stackcheck install-udev config update install-programs install-modules install-include install-libs install-utils-subdirs utils-subdirs uninstall-modules
endif
Modified: team/tzafrir/sysfs/README
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/README?view=diff&rev=4371&r1=4370&r2=4371
==============================================================================
--- team/tzafrir/sysfs/README (original)
+++ team/tzafrir/sysfs/README Sat Jun 28 11:29:10 2008
@@ -9,14 +9,20 @@
------------------
Digital Cards
~~~~~~~~~~~~~
-- wct4xxp:
- * Digium newer quad-span T1/E1/J1 cards: Wildcard TE420P/TE410P/TE405P
- * Digium newer dual-span T1/E1/J1 cards: Wildcard TE220P/TE210P/TE205P
-- wcte12xp: Digium Wildcard TE120P and the TE122P single-span T1/E1/J1 card
-- wcte11xp: Digium Wildcard TE110P T1/E1/J1
+- wct4xxp:
+ * Digium TE205P/TE207P/TE210P/TE212P: PCI dual-port T1/E1/J1
+ * Digium TE405P/TE407P/TE410P/TE412P: PCI quad-port T1/E1/J1
+ * Digium TE220: PCI-Express dual-port T1/E1/J1
+ * Digium TE420: PCI-Express quad-port T1/E1/J1
+- wcte12xp:
+ * Digium TE120P: PCI single-port T1/E1/J1
+ * Digium TE121: PCI-Express single-port T1/E1/J1
+ * Digium TE122: PCI single-port T1/E1/J1
+- wcte11xp:
+ * Digium TE110P: PCI single-port T1/E1/J1
- wct1xxp:
- * Wildcard T100P (old single-span T1)
- * Wildcard E100P (old single-span E1)
+ * Digium T100P: PCI single-port T1
+ * Digium E100P: PCI single-port E1
- tor2: Tormenta quad-span T1/E1 card from the Zapata Telephony project
- torisa: The old dual-span ISA T1 card from Zapata Telephony
@@ -24,11 +30,13 @@
Analog Cards
~~~~~~~~~~~~
- wctdm24xxp:
- * Digium TDM2400P card: up to 24 analog ports
- * Digium TDM800P card: up to 8 analog ports
-- wctdm: Digium TDM400P card: up to 4 analog ports
+ * Digium TDM2400P/AEX2400: up to 24 analog ports
+ * Digium TDM800P/AEX800: up to 8 analog ports
+ * Digium TDM410: up to 4 analog ports
+- wctdm:
+ * Digium TDM400P: up to 4 analog ports
- xpp: Xorcom Astribank: a USB connected unit of up to 32 ports
- (also BRI)
+ (includeing the digital BRI and E1/T1 modules)
- wcfxo: X100P, similar and clones. A simple single-port FXO card
- wcusb: Digium S100U: A simple single-port USB FXS unit
@@ -326,6 +334,103 @@
Currently that file must set "TELEPHONY=yes" for the zaptel init.d to
work.
+Module Parameters
+~~~~~~~~~~~~~~~~~
+The kernel modules can be configured through module parameters. Module
+parameters can optionally be set at load time. They are normally set (if
+needed) by a line in a file under /etc/modprobe.d/ or in the file
+/etc/modprobe.conf (Or /etc/modules.conf in kernel 2.4).
+
+Example line:
+
+ options zaptel debug=1
+
+The module parameters can normally be modified at runtime through sysfs:
+
+ pungenday:~# cat /sys/module/zaptel/parameters/debug
+ 0
+ pungenday:~# echo 1 >/sys/module/zaptel/parameters/debug
+ pungenday:~# cat /sys/module/zaptel/parameters/debug
+ 1
+
+Viewing and setting parameters that way is possible as of kernel 2.6 .
+In kernels older than 2.6.10, the sysfs "files" for the parameters
+reside directly under /sys/module/'module_name' .
+
+Useful module parameters:
+
+debug (most modules)::
+ Sets debug mode / debug level. With most modules 'debug' can be either
+ disabled (0, the default value) or enabled (any other value).
+ +
+ +
+ wctdm and wcte1xp print several extra debugging messages if the value
+ of debug is more than 1.
+ +
+ +
+ Some modules have "debugging flags" bits - the value of debug is a
+ bitmask and several messages are printed if some bits are set:
+ - ztdummy:
+ * 1: DEBUG_GENERAL - general error messages.
+ * 2: DEBUG_TICKS - Show that the module is alive :-)
+ - wctdm24xxp:
+ * 1: DEBUG_CARD
+ * 2: DEBUG_ECHOCAN
+ - wct4xxp:
+ * 1: DEBUG_MAIN
+ * 2: DEBUG_DTMF
+ * 4: DEBUG_REGS
+ * 8: DEBUG_TSI
+ * 16: DEBUG_ECHOCAN
+ * 32: DEBUG_RBS
+ * 64: DEBUG_FRAMER
+ - xpp: Previously (before 1.2.26 / 1.4.11) it was called "print_dbg".
+ See also README.Astribank:
+ * 1: GENERAL - General debug comments.
+ * 2: PCM - PCM-related messages. Tend to flood logs.
+ * 4: LEDS - Anything related to the LEDs status control. The driver
+ produces a lot of messages when the option is enabled.
+ * 8: SYNC - Synchronization related messages.
+ * 16: SIGNAL - Zaptel signalling related messages.
+ * 32: PROC - Messages related to the procfs interface.
+ * 64: REGS - Reading and writing to chip registers. Tends to flood
+ logs.
+ * 128: DEVICES - Device instantiation, destruction and such.
+ * 256 - COMMANDS - Protocol commands. Tends to flood logs.
+
+deftaps (zaptel)::
+ The default size for the echo canceller. The number is in "taps", that
+ is "samples", 1/8 ms. The default is 64 - for a tail size of 8 ms.
+ +
+ +
+ Asterisk's chan_zap tends to pass its own value anyway, with a
+ different default size. So normally setting this doesn't change
+ anything.
+
+To get a list of parameters supported by a module, use
+
+ modinfo module_name
+
+Or, for a module you have just built:
+
+ modinfo ./module_name.ko
+
+For the xpp modules this will also include the description and default
+value of the module. You can find a list of useful xpp module parameters
+in README.Astribank .
+
+
+Reference Configuration
+-----------------------
+include::zaptel.conf.asciidoc[]
+
+Tonezones
+~~~~~~~~~
+The file zonedata.c contains the information about the tone zones used
+in libtonezone (and hence also in ztcfg). Here is a list of those zones:
+
+include::tonezones.txt[]
+
Zaptel PERL modules
-------------------
@@ -370,7 +475,6 @@
what PCI/USB Zaptel hardware is connected and if it is currently used
by a driver. Shows also some more information for Astrobanks from
/proc/xpp .
-
Internals
---------
@@ -489,6 +593,95 @@
2 XPP_FXS/0/0/1 FXOLS (In use)
+
+ABI Compatibility
+~~~~~~~~~~~~~~~~~
+Like any other kernel code, Zaptel strives to maintain a stable
+interface to userspace programs. The API of Zaptel to userspace
+programs, zaptel.h, has remained backword-compatible for a long time and
+is expected to remain so in the future. With the ABI (the bits
+themselves) things are slightly trickier.
+
+Zaptel's interface to userspace is mostly ioctl(3) calls. Ioctl calls
+are identified by a number that stems from various things, one of which
+is the size of the data structure passed between the kernel and
+userspace.
+
+Many of the Zaptel ioctl-s use some sepcific structs to pass information
+between kernel and userspace. In some cases the need arose to pass a few
+more data members in each call. Simply adding a new member to the struct
+would have meant a new number for the ioctl, as its number depends on
+the size of the data passed.
+
+Thus we would add a new ioctl with the same base number and with the
+original struct.
+
+So suppose we had the following ioctl:
+----------------------------------
+struct zt_example {
+ int sample;
+}
+
+#define ZT_EXAMPLE _IOWR (ZT_CODE, 62, struct zt_example)
+----------------------------------
+
+And we want to add the field 'int onemore', we won't just add it to the
+struct. We will do something that is more complex:
+------------------------------------
+/* The original, unchanged: */
+struct zt_example_v1 {
+ int sample;
+}
+
+/* The new struct: */
+struct zt_example {
+ int sample;
+ int onemore;
+}
+
+#define ZT_EXAMPLE_V1 _IOWR (ZT_CODE, 62, struct zt_example_v1)
+#define ZT_EXAMPLE _IOWR (ZT_CODE, 62, struct zt_example)
+------------------------------------
+We actually have here two different ioctls: the old ZT_EXAMPLE would be
+0xC0044A3E . ZT_EXAMPLE_V1 would have the same value. But the new value
+of ZT_EXAMPLE would be 0xC0084A3E .
+
+Programs built with the original zaptel.h (before the change) use the
+original ioctl, whether or not the kerenl code is actually of the newer
+version. Thus in most cases there are no compatibility issues.
+
+When can we have compatibility issues? if we have code built with the
+new zaptel.h, but the loaded kernel code (modules) are of the older
+version. Thus the userspace program will try to use the newer ZT_EXAMPLE
+(0xC0084A3E). But the kernel code has no handler for that ioctl. The
+result: the error 25, ENOTTY, which means "Inappropriate ioctl for
+device".
+
+As a by-product of that method, for each interface change a new #define
+is added. That definition is for the old version and thus it might
+appear slightly confusing in the code, but it is useful for writing code
+that works with both versions of Zaptel.
+
+
+Past Incompatibilities
+^^^^^^^^^^^^^^^^^^^^^^
+
+.Zaptel 1.4.10:
+* Semantics of ZT_LOADZONE. Using newer ztcfg with older modules will
+ yield -EINVAL with the kernel message 'Invalid tone (96) defined'
+
+.Zaptel 1.4.8:
+* ZT_GET_PARAMS_V1
+* ZT_SET_PARAMS_V1
+* ZT_SPANINFO_V2
+
+.Zaptel 1.4.6:
+* ZT_SPANINFO_V1
+
+ZT_SPANINFO_V1 was originally called (up to zaptel 1.4.8)
+"ZT_SPANINFO_COMPAT".
+
+
PPP Support
-----------
Zaptel digital cards can provide data channels through ppp as
Modified: team/tzafrir/sysfs/build_tools/genudevrules
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/build_tools/genudevrules?view=diff&rev=4371&r1=4370&r2=4371
==============================================================================
--- team/tzafrir/sysfs/build_tools/genudevrules (original)
+++ team/tzafrir/sysfs/build_tools/genudevrules Sat Jun 28 11:29:10 2008
@@ -3,8 +3,8 @@
ver=`udevinfo -V | cut -f3 -d" "`
if [ -z "${ver}" ]; then
- echo Cannot determine the version of udev installed this system... exiting.
- exit 1
+ # nobody has that old version, anyway.
+ ver=54
fi
# udev versions prior to 055 use a single '=' for matching key values
@@ -31,5 +31,5 @@
KERNEL${match}"zap[0-9]*", NAME="zap/%n"
# zaptel devices with ownership/permissions for running as non-root
-SUBSYSTEM=="zaptel", OWNER="asterisk", GROUP="asterisk", MODE="0660"
+SUBSYSTEM${match}"zaptel", OWNER="asterisk", GROUP="asterisk", MODE="0660"
EOF
Modified: team/tzafrir/sysfs/build_tools/test_kernel_git
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/build_tools/test_kernel_git?view=diff&rev=4371&r1=4370&r2=4371
==============================================================================
--- team/tzafrir/sysfs/build_tools/test_kernel_git (original)
+++ team/tzafrir/sysfs/build_tools/test_kernel_git Sat Jun 28 11:29:10 2008
@@ -6,12 +6,15 @@
CONF_FILE=build_tools/git_test.conf
usage() {
- echo "$0: test building Zaptel vs. kernel from git"
+ me=`basename $0`
+ echo "$me: test building Zaptel vs. kernel from git"
echo "Usage:"
- echo " $0 checkout <kerneldir> Pull a kernel version into <kerneldir>"
- echo " $0 update Update (pull) the kernel tree."
- echo " $0 setver <kernel_ver> Set the kernel version"
- echo " $0 test Test-build"
+ echo " $me checkout <kerneldir> Pull a kernel version into <kerneldir>"
+ echo " $me update Update (pull) the kernel tree."
+ echo " $me setver <kernel_ver> Set the kernel version"
+ echo " $me test Test-build"
+ echo ""
+ echo " $me versions [pattern] List available versions."
}
# Set a variable in $CONF_FILE
@@ -25,7 +28,7 @@
if grep -q "^$var=" $CONF_FILE 2>/dev/null; then
sed -i -e "s|^$var=.*|$var=\"$val\"|" $CONF_FILE
else
- echo "$var=\"$value\"" >>$CONF_FILE
+ echo "$var=\"$val\"" >>$CONF_FILE
fi
}
@@ -43,11 +46,15 @@
kernel_dir="$2"
cd "$kernel_dir"
git clone $GIT_URL
- set_ver kernel_dir "$kernel_dir/linux-2.6"
+ set_var kernel_dir "$kernel_dir/linux-2.6"
;;
update)
cd "$kernel_dir"
- git-pull
+ git pull
+ ;;
+ versions)
+ cd "$kernel_dir"
+ git tag -l $2 | cut -c2-
;;
setver)
kernel_ver="$2"
Modified: team/tzafrir/sysfs/build_tools/uninstall-modules
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/build_tools/uninstall-modules?view=diff&rev=4371&r1=4370&r2=4371
==============================================================================
--- team/tzafrir/sysfs/build_tools/uninstall-modules (original)
+++ team/tzafrir/sysfs/build_tools/uninstall-modules Sat Jun 28 11:29:10 2008
@@ -14,8 +14,8 @@
echo "Usage:"
echo " $0 MODULES_BASE_DIR mod1 [mod2 [...]]"
echo ""
- echo " MODULES_BASE_DIR - typically /lib/odules/KVERS"
- echo " modN - (optinally partial) module name to remove."
+ echo " MODULES_BASE_DIR - typically /lib/modules/KVERS"
+ echo " modN - (optionally partial) module name to remove."
}
if [ -z "$KERNEL_MODULES_DIR" ]; then
@@ -30,9 +30,10 @@
exit 1;
fi
for mod in $MODULES; do
- for file in `cat $KERNEL_MODULES_DIR/modules.dep | cut -d : -f 1 | grep $mod`; do
+ BASE=`basename $mod`
+ for file in `cat $KERNEL_MODULES_DIR/modules.dep | cut -d : -f 1 | grep "$BASE$"`; do
if [ -e "$file" ]; then
- echo "Deleting $file."
+ #echo "Deleting $file."
rm -f $file
fi
done
Modified: team/tzafrir/sysfs/doc/module-parameters.txt
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/doc/module-parameters.txt?view=diff&rev=4371&r1=4370&r2=4371
==============================================================================
--- team/tzafrir/sysfs/doc/module-parameters.txt (original)
+++ team/tzafrir/sysfs/doc/module-parameters.txt Sat Jun 28 11:29:10 2008
@@ -2,6 +2,7 @@
(Note: this list is woefully incomplete, but is a starting point and
will be improved as time permits.)
+
--- VPMADT032 Parameters ---
@@ -42,3 +43,15 @@
When vpmnlptype is 'Suppress', this value indicates the
relative energy level decrease that should be applied to the
echo signal).
+
+ --- General Module Parameters ---
+
+latency - 3 to 32, defaults to 3
+
+ For the wctdm24xxp and wcte12xp drivers. Specifies the amount of
+ latency the driver inserts into the voice conversation. On systems
+ that are unable to service the interrupt in a timely manner,
+ increasing the latency can decrease module init time since the driver
+ will not need to dynamically grow the latency during initialization.
+ However, the latency in the driver does add to the overall latency of
+ any voice conversation.
Modified: team/tzafrir/sysfs/firmware/Makefile
URL: http://svn.digium.com/view/zaptel/team/tzafrir/sysfs/firmware/Makefile?view=diff&rev=4371&r1=4370&r2=4371
==============================================================================
--- team/tzafrir/sysfs/firmware/Makefile (original)
+++ team/tzafrir/sysfs/firmware/Makefile Sat Jun 28 11:29:10 2008
@@ -13,7 +13,7 @@
.PHONY: dist-clean all uninstall have_download install
--include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/makeopts
+-include ../menuselect.makeopts ../makeopts
PWD:=$(shell pwd)
@@ -66,92 +66,33 @@
ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes)
@echo "Attempting to download $@"
@if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi;
- if test ! -f $@; then exit 1; fi; \
- (cat $@ | gzip -d | tar -xf -)
-ifeq ($(HOTPLUG_FIRMWARE),yes)
- @echo "Installing zaptel-fw-oct6114-064.bin to hotplug firmware directories"
- if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \
- $(INSTALL) -m 644 zaptel-fw-oct6114-064.bin $(DESTDIR)/usr/lib/hotplug/firmware; \
- rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-*; \
- touch $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION); \
- fi
- if [ -d $(DESTDIR)/lib/firmware ]; then \
- $(INSTALL) -m 644 zaptel-fw-oct6114-064.bin $(DESTDIR)/lib/firmware; \
- rm -rf $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-064-*; \
- touch $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION); \
- fi
-endif
-else
- @echo "Firmware zaptel-fw-oct6114-064.bin is already installed with required version $(OCT6114_064_VERSION)"
-endif
+ @if test ! -f $@; then exit 1; fi; \
+ (cat $@ | gzip -d | tar -xf -)
+endif
+
zaptel-fw-oct6114-128-%.tar.gz: have_download
ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes)
@echo "Attempting to download $@"
@if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi;
- if test ! -f $@; then exit 1; fi; \
- (cat $@ | gzip -d | tar -xf -)
-ifeq ($(HOTPLUG_FIRMWARE),yes)
- @echo "Installing zaptel-fw-oct6114-128.bin to hotplug firmware directories"
- if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \
- $(INSTALL) -m 644 zaptel-fw-oct6114-128.bin $(DESTDIR)/usr/lib/hotplug/firmware; \
- rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-128-*; \
- touch $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_VERSION); \
- fi
- if [ -d $(DESTDIR)/lib/firmware ]; then \
- $(INSTALL) -m 644 zaptel-fw-oct6114-128.bin $(DESTDIR)/lib/firmware; \
- rm -rf $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-128-*; \
- touch $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-128-$(OCT6114_128_VERSION); \
- fi
-endif
-else
- @echo "Firmware zaptel-fw-oct6114-128.bin is already installed with required version $(OCT6114_128_VERSION)"
+ @if test ! -f $@; then exit 1; fi; \
+ (cat $@ | gzip -d | tar -xf -)
endif
zaptel-fw-tc400m-%.tar.gz: have_download
ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-tc400m-$(TC400M_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.zaptel-fw-tc400m-$(TC400M_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes)
@echo "Attempting to download $@"
@if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi;
- if test ! -f $@; then exit 1; fi; \
- (cat $@ | gzip -d | tar -xf -)
-ifeq ($(HOTPLUG_FIRMWARE),yes)
- @echo "Installing zaptel-fw-tc400m.bin to hotplug firmware directories"
- if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \
- $(INSTALL) -m 644 zaptel-fw-tc400m.bin $(DESTDIR)/usr/lib/hotplug/firmware; \
- rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-tc400m-*; \
- touch $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-tc400m-$(TC400M_VERSION); \
- fi
- if [ -d $(DESTDIR)/lib/firmware ]; then \
- $(INSTALL) -m 644 zaptel-fw-tc400m.bin $(DESTDIR)/lib/firmware; \
- rm -rf $(DESTDIR)/lib/firmware/.zaptel-fw-tc400m-*; \
- touch $(DESTDIR)/lib/firmware/.zaptel-fw-tc400m-$(TC400M_VERSION); \
- fi
-endif
-else
- @echo "Firmware zaptel-fw-tc400m.bin is already installed with required version $(TC400M_VERSION)"
+ @if test ! -f $@; then exit 1; fi; \
+ (cat $@ | gzip -d | tar -xf -)
endif
zaptel-fw-vpmadt032-%.tar.gz: have_download
ifeq ($(shell if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes)
@echo "Attempting to download $@"
@if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi;
- if test ! -f $@; then exit 1; fi; \
- (cat $@ | gzip -d | tar -xf -)
-ifeq ($(HOTPLUG_FIRMWARE),yes)
- @echo "Installing zaptel-fw-vpmadt032.bin to hotplug firmware directories"
- if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \
- $(INSTALL) -m 644 zaptel-fw-vpmadt032.bin $(DESTDIR)/usr/lib/hotplug/firmware; \
- rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-vpmadt032-*; \
- touch $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_VERSION); \
- fi
- if [ -d $(DESTDIR)/lib/firmware ]; then \
- $(INSTALL) -m 644 zaptel-fw-vpmadt032.bin $(DESTDIR)/lib/firmware; \
- rm -rf $(DESTDIR)/lib/firmware/.zaptel-fw-vpmadt032-*; \
- touch $(DESTDIR)/lib/firmware/.zaptel-fw-vpmadt032-$(VPMADT032_VERSION); \
- fi
-endif
-else
- @echo "Firmware zaptel-fw-vpmadt032.bin is already installed with required version $(VPMADT032_VERSION)"
+ @if test ! -f $@; then exit 1; fi; \
+ (cat $@ | gzip -d | tar -xf -)
endif
# Clean up any downloaded/extracted firmware packages
@@ -168,6 +109,68 @@
# Install all downloaded firmware images for hotplug usage and build headers for inclusion
hotplug-install: $(FIRMWARE)
+ifeq ($(HOTPLUG_FIRMWARE),yes)
+ifeq ($(shell if ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION) ] ); then echo "yes"; else echo "no"; fi),yes)
+ @echo "Installing zaptel-fw-oct6114-064.bin to hotplug firmware directories"
+ if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \
+ $(INSTALL) -m 644 zaptel-fw-oct6114-064.bin $(DESTDIR)/usr/lib/hotplug/firmware && \
+ (rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-*; \
+ touch $(DESTDIR)/usr/lib/hotplug/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION)); \
+ fi
+ if [ -d $(DESTDIR)/lib/firmware ]; then \
+ $(INSTALL) -m 644 zaptel-fw-oct6114-064.bin $(DESTDIR)/lib/firmware && \
+ (rm -rf $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-064-*; \
+ touch $(DESTDIR)/lib/firmware/.zaptel-fw-oct6114-064-$(OCT6114_064_VERSION)); \
+ fi
+else
+ @echo "Firmware zaptel-fw-oct6114-064.bin is already installed with required version $(OCT6114_064_VERSION)"
+endif
[... 23991 lines stripped ...]
More information about the zaptel-commits
mailing list