From: Claudio Mignanti Date: Sun, 13 Jun 2010 07:08:08 +0000 (+0000) Subject: [packages] zaptel: update and fix kernel module build for 2.6.34 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=bbdc26fd132eb28e8ec01e29295ae50a21b47e56 [packages] zaptel: update and fix kernel module build for 2.6.34 SVN-Revision: 21774 --- diff --git a/libs/zaptel-1.4.x/Makefile b/libs/zaptel-1.4.x/Makefile index ccb0968501..5cd9deed63 100644 --- a/libs/zaptel-1.4.x/Makefile +++ b/libs/zaptel-1.4.x/Makefile @@ -9,12 +9,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=zaptel -PKG_VERSION:=1.4.9.2 -PKG_RELEASE:=2 +PKG_VERSION:=1.4.12.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://ftp.digium.com/pub/zaptel/releases/ -PKG_MD5SUM:=f6af404cc0244b93a2fc88b237f374bd +PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/zaptel/releases/ \ + http://ftp.digium.com/pub/zaptel/releases/ +PKG_MD5SUM:=71e83a020b020fa60905edecf70e95a3 include $(INCLUDE_DIR)/package.mk @@ -27,6 +28,9 @@ define KernelPackage/zaptel14 $(call Package/zaptel14/Default) SUBMENU:=Other modules TITLE+= (kernel module) + KCONFIG:=CONFIG_FTRACE=y \ + CONFIG_TRACING \ + CONFIG_KMEMTRACE FILES:=$(PKG_BUILD_DIR)/kernel/zaptel.$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/kernel/ztdummy.$(LINUX_KMOD_SUFFIX) AUTOLOAD:=$(call AutoLoad,70,zaptel ztdummy) diff --git a/libs/zaptel-1.4.x/patches/001-Makefile-arch.patch b/libs/zaptel-1.4.x/patches/001-Makefile-arch.patch deleted file mode 100644 index 9e754d4537..0000000000 --- a/libs/zaptel-1.4.x/patches/001-Makefile-arch.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: zaptel-1.4.9.2/Makefile -=================================================================== ---- zaptel-1.4.9.2.orig/Makefile 2008-08-15 01:42:26.000000000 -0700 -+++ zaptel-1.4.9.2/Makefile 2008-08-15 01:42:43.000000000 -0700 -@@ -18,7 +18,9 @@ - PWD:=$(shell pwd) - endif - -+ifndef ARCH - ARCH:=$(shell uname -m | sed -e s/i.86/i386/) -+endif - - ifeq ($(DEB_HOST_GNU_TYPE),) - UNAME_M:=$(shell uname -m) diff --git a/libs/zaptel-1.4.x/patches/300-zaptel-base.patch b/libs/zaptel-1.4.x/patches/300-zaptel-base.patch deleted file mode 100644 index 1575d9a744..0000000000 --- a/libs/zaptel-1.4.x/patches/300-zaptel-base.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -Nru zaptel-1.4.9.2.org/kernel/zaptel-base.c zaptel-1.4.9.2/kernel/zaptel-base.c ---- zaptel-1.4.9.2.org/kernel/zaptel-base.c 2008-02-28 20:00:47.000000000 +0100 -+++ zaptel-1.4.9.2/kernel/zaptel-base.c 2008-03-06 10:02:20.000000000 +0100 -@@ -7346,6 +7346,7 @@ - #endif /* CONFIG_ZAP_UDEV */ - - #ifdef CONFIG_DEVFS_FS -+ umode_t mode = S_IFCHR|S_IRUGO|S_IWUGO; - dev->devfs_handle = devfs_register(zaptel_devfs_dir, dev->name, DEVFS_FL_DEFAULT, ZT_MAJOR, dev->minor, mode, &zt_fops, NULL); - #endif /* CONFIG_DEVFS_FS */ - -diff -Nru zaptel-1.4.9.2.org/kernel/zaptel.h zaptel-1.4.9.2/kernel/zaptel.h ---- zaptel-1.4.9.2.org/kernel/zaptel.h 2008-02-05 00:00:48.000000000 +0100 -+++ zaptel-1.4.9.2/kernel/zaptel.h 2008-03-06 10:00:41.000000000 +0100 -@@ -1203,7 +1203,7 @@ - const char *name; - __u8 minor; - #ifdef CONFIG_DEVFS_FS -- static devfs_handle_t devfs_handle; -+ devfs_handle_t devfs_handle; - #endif - }; - diff --git a/libs/zaptel-1.4.x/patches/305-class_device_removed.patch b/libs/zaptel-1.4.x/patches/305-class_device_removed.patch deleted file mode 100644 index c9647a29cd..0000000000 --- a/libs/zaptel-1.4.x/patches/305-class_device_removed.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -Nru zaptel-1.4.9.2.org/kernel/zaptel-base.c zaptel-1.4.9.2/kernel/zaptel-base.c ---- zaptel-1.4.9.2.org/kernel/zaptel-base.c 2008-02-28 20:00:47.000000000 +0100 -+++ zaptel-1.4.9.2/kernel/zaptel-base.c 2008-11-29 16:01:23.000000000 +0100 -@@ -163,12 +163,32 @@ - /* udev necessary data structures. Yeah! */ - #ifdef CONFIG_ZAP_UDEV - --#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) -+#define CLASS_DEV_CREATE(class, devt, device, name) \ -+ device_create(class, device, devt, NULL, "%s", name) -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) -+#define CLASS_DEV_CREATE(class, devt, device, name) \ -+ device_create(class, device, devt, name) -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) - #define CLASS_DEV_CREATE(class, devt, device, name) \ - class_device_create(class, NULL, devt, device, name) --#else -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) - #define CLASS_DEV_CREATE(class, devt, device, name) \ - class_device_create(class, devt, device, name) -+#else -+#define CLASS_DEV_CREATE(class, devt, device, name) \ -+ class_simple_device_add(class, devt, device, name) -+#endif -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) -+#define CLASS_DEV_DESTROY(class, devt) \ -+ device_destroy(class, devt) -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) -+#define CLASS_DEV_DESTROY(class, devt) \ -+ class_device_destroy(class, devt) -+#else -+#define CLASS_DEV_DESTROY(class, devt) \ -+ class_simple_device_remove(class, devt) - #endif - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) -@@ -177,8 +197,6 @@ - static struct class_simple *zap_class = NULL; - #define class_create class_simple_create - #define class_destroy class_simple_destroy --#define class_device_create class_simple_device_add --#define class_device_destroy(a, b) class_simple_device_remove(b) - #endif - - #endif /* CONFIG_ZAP_UDEV */ -@@ -4973,7 +4991,7 @@ - #ifdef CONFIG_ZAP_UDEV - for (x = 0; x < span->channels; x++) { - if (span->chans[x].channo < 250) -- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo)); -+ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, span->chans[x].channo)); - } - #endif /* CONFIG_ZAP_UDEV */ - -@@ -7355,7 +7373,7 @@ - int zt_unregister_chardev(struct zt_chardev *dev) - { - #ifdef CONFIG_ZAP_UDEV -- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, dev->minor)); -+ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, dev->minor)); - #endif /* CONFIG_ZAP_UDEV */ - - #ifdef CONFIG_DEVFS_FS -@@ -7434,10 +7452,10 @@ - devfs_unregister_chrdev(ZT_MAJOR, "zaptel"); - #else - #ifdef CONFIG_ZAP_UDEV -- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, 253)); /* timer */ -- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, 254)); /* channel */ -- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, 255)); /* pseudo */ -- class_device_destroy(zap_class, MKDEV(ZT_MAJOR, 0)); /* ctl */ -+ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, 253)); /* timer */ -+ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, 254)); /* channel */ -+ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, 255)); /* pseudo */ -+ CLASS_DEV_DESTROY(zap_class, MKDEV(ZT_MAJOR, 0)); /* ctl */ - class_destroy(zap_class); - #endif /* CONFIG_ZAP_UDEV */ - unregister_chrdev(ZT_MAJOR, "zaptel"); diff --git a/libs/zaptel-1.4.x/patches/320-zap-sema.patch b/libs/zaptel-1.4.x/patches/320-zap-sema.patch deleted file mode 100644 index 709b859608..0000000000 --- a/libs/zaptel-1.4.x/patches/320-zap-sema.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff -Nru zaptel-1.4.9.2.org/kernel/wctdm24xxp/base.c zaptel-1.4.9.2/kernel/wctdm24xxp/base.c ---- zaptel-1.4.9.2.org/kernel/wctdm24xxp/base.c 2008-02-05 00:00:48.000000000 +0100 -+++ zaptel-1.4.9.2/kernel/wctdm24xxp/base.c 2008-11-29 15:55:17.000000000 +0100 -@@ -44,7 +44,11 @@ - #include - #include - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) -+#include -+#else - #include -+#endif - - #ifdef LINUX26 - #include -diff -Nru zaptel-1.4.9.2.org/kernel/wctdm24xxp/GpakApi.c zaptel-1.4.9.2/kernel/wctdm24xxp/GpakApi.c ---- zaptel-1.4.9.2.org/kernel/wctdm24xxp/GpakApi.c 2008-02-05 00:00:48.000000000 +0100 -+++ zaptel-1.4.9.2/kernel/wctdm24xxp/GpakApi.c 2008-11-29 15:55:17.000000000 +0100 -@@ -34,7 +34,11 @@ - */ - - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) -+#include -+#else - #include -+#endif - - #include "zaptel.h" - -diff -Nru zaptel-1.4.9.2.org/kernel/wctdm24xxp/GpakCust.c zaptel-1.4.9.2/kernel/wctdm24xxp/GpakCust.c ---- zaptel-1.4.9.2.org/kernel/wctdm24xxp/GpakCust.c 2008-02-05 00:00:48.000000000 +0100 -+++ zaptel-1.4.9.2/kernel/wctdm24xxp/GpakCust.c 2008-11-29 15:55:17.000000000 +0100 -@@ -37,7 +37,11 @@ - - #include - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) -+#include -+#else - #include -+#endif - - #include "zaptel.h" - #include "wctdm24xxp.h" -diff -Nru zaptel-1.4.9.2.org/kernel/wcte12xp/vpmadt032.c zaptel-1.4.9.2/kernel/wcte12xp/vpmadt032.c ---- zaptel-1.4.9.2.org/kernel/wcte12xp/vpmadt032.c 2008-02-05 00:00:48.000000000 +0100 -+++ zaptel-1.4.9.2/kernel/wcte12xp/vpmadt032.c 2008-11-29 15:55:17.000000000 +0100 -@@ -29,7 +29,12 @@ - */ - - #include -+#include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) -+#include -+#else - #include -+#endif - #include - #include - #include -diff -Nru zaptel-1.4.9.2.org/kernel/xpp/xpd.h zaptel-1.4.9.2/kernel/xpp/xpd.h ---- zaptel-1.4.9.2.org/kernel/xpp/xpd.h 2008-02-05 00:00:48.000000000 +0100 -+++ zaptel-1.4.9.2/kernel/xpp/xpd.h 2008-11-29 15:55:17.000000000 +0100 -@@ -29,8 +29,13 @@ - #ifdef __KERNEL__ - #include - #include -+#include - #include -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) -+#include -+#else - #include -+#endif - #include - #ifdef XPP_DEBUGFS - #ifndef CONFIG_DEBUG_FS diff --git a/libs/zaptel-1.4.x/patches/350-2.6.34.patch b/libs/zaptel-1.4.x/patches/350-2.6.34.patch new file mode 100644 index 0000000000..580bc3ad24 --- /dev/null +++ b/libs/zaptel-1.4.x/patches/350-2.6.34.patch @@ -0,0 +1,26 @@ +Index: zaptel-1.4.12.1/kernel/zconfig.h +=================================================================== +--- zaptel-1.4.12.1.orig/kernel/zconfig.h 2010-06-13 08:51:02.000000000 +0200 ++++ zaptel-1.4.12.1/kernel/zconfig.h 2010-06-13 08:53:22.000000000 +0200 +@@ -22,6 +22,8 @@ + #include + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) + #include ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)) ++#include + #else + #include + #endif +Index: zaptel-1.4.12.1/kernel/ztdummy.c +=================================================================== +--- zaptel-1.4.12.1.orig/kernel/ztdummy.c 2010-06-13 08:58:02.000000000 +0200 ++++ zaptel-1.4.12.1/kernel/ztdummy.c 2010-06-13 08:58:23.000000000 +0200 +@@ -38,6 +38,7 @@ + */ + + #include ++#include + + #ifndef VERSION_CODE + # define VERSION_CODE(vers,rel,seq) ( ((vers)<<16) | ((rel)<<8) | (seq) ) +