zaptel: update and fix kernel module build for 2.6.34
authorclaudio <claudio@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 13 Jun 2010 07:08:08 +0000 (07:08 +0000)
committerJiri Slachta <slachta@cesnet.cz>
Sat, 8 Mar 2014 11:08:05 +0000 (12:08 +0100)
libs/zaptel-1.4.x/Makefile
libs/zaptel-1.4.x/patches/001-Makefile-arch.patch [deleted file]
libs/zaptel-1.4.x/patches/300-zaptel-base.patch [deleted file]
libs/zaptel-1.4.x/patches/305-class_device_removed.patch [deleted file]
libs/zaptel-1.4.x/patches/320-zap-sema.patch [deleted file]
libs/zaptel-1.4.x/patches/350-2.6.34.patch [new file with mode: 0644]

index ccb0968501774064fec7afb13379edad01f39dfc..5cd9deed6313f747958e2dce2ec23bb63449e5cd 100644 (file)
@@ -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 (file)
index 9e754d4..0000000
+++ /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 (file)
index 1575d9a..0000000
+++ /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 (file)
index c9647a2..0000000
+++ /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 (file)
index 709b859..0000000
+++ /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 <linux/interrupt.h>
- #include <linux/workqueue.h>
- #include <linux/delay.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
-+#include <linux/semaphore.h>
-+#else
- #include <asm/semaphore.h>
-+#endif
- #ifdef LINUX26
- #include <linux/moduleparam.h>
-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 <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
-+#include <linux/semaphore.h>
-+#else
- #include <asm/semaphore.h>
-+#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 <linux/version.h>
- #include <linux/delay.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
-+#include <linux/semaphore.h>
-+#else
- #include <asm/semaphore.h>
-+#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 <linux/delay.h>
-+#include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
-+#include <linux/semaphore.h>
-+#else
- #include <asm/semaphore.h>
-+#endif
- #include <linux/pci.h> 
- #include <linux/firmware.h> 
- #include <linux/list.h> 
-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 <linux/kernel.h>
- #include <linux/device.h>
-+#include <linux/version.h>
- #include <asm/atomic.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
-+#include <linux/semaphore.h>
-+#else
- #include <asm/semaphore.h>
-+#endif
- #include <linux/moduleparam.h>
- #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 (file)
index 0000000..580bc3a
--- /dev/null
@@ -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 <linux/version.h>
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+ #include <linux/config.h>
++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33))
++#include <generated/autoconf.h>
+ #else
+ #include <linux/autoconf.h>
+ #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 <linux/version.h>
++#include <linux/slab.h>
+ #ifndef VERSION_CODE
+ #  define VERSION_CODE(vers,rel,seq) ( ((vers)<<16) | ((rel)<<8) | (seq) )
+