aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-ifxos
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2013-06-21 16:54:37 +0000
committerJohn Crispin <john@openwrt.org>2013-06-21 16:54:37 +0000
commit4ebf19b48fafc8d94e14e4ba779969613b241a6a (patch)
tree9918f890a8915023b49ea30948beb5d048c333fa /package/kernel/lantiq/ltq-ifxos
parent44b1688e6c7b4f16f7165fbd560e1183aef69090 (diff)
downloadupstream-4ebf19b48fafc8d94e14e4ba779969613b241a6a.tar.gz
upstream-4ebf19b48fafc8d94e14e4ba779969613b241a6a.tar.bz2
upstream-4ebf19b48fafc8d94e14e4ba779969613b241a6a.zip
packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37007
Diffstat (limited to 'package/kernel/lantiq/ltq-ifxos')
-rw-r--r--package/kernel/lantiq/ltq-ifxos/Makefile51
-rw-r--r--package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch96
2 files changed, 147 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-ifxos/Makefile b/package/kernel/lantiq/ltq-ifxos/Makefile
new file mode 100644
index 0000000000..1364849bc6
--- /dev/null
+++ b/package/kernel/lantiq/ltq-ifxos/Makefile
@@ -0,0 +1,51 @@
+# Copyright (C) 2009-2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=lib_ifxos
+PKG_VERSION:=1.5.14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_RELEASE:=3
+PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
+PKG_MD5SUM:=bc107f9d8ff6bed4c2760a2817bbb029
+PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/ltq-ifxos
+ SECTION:=sys
+ CATEGORY:=Kernel modules
+ SUBMENU:=Libraries
+ TITLE:=Lantiq OS abstraction library
+ URL:=http://www.lantiq.com/
+ DEPENDS:=@TARGET_lantiq
+ FILES:=$(PKG_BUILD_DIR)/src/drv_ifxos.ko
+ AUTOLOAD:=$(call AutoLoad,10,drv_ifxos)
+endef
+
+CONFIGURE_ARGS += \
+ ARCH=$(LINUX_KARCH) \
+ --enable-linux-26 \
+ --enable-kernelbuild="$(LINUX_DIR)" \
+ --enable-kernelincl="$(LINUX_DIR)/include" \
+ --enable-add_drv_cflags="-fno-pic -mno-abicalls -mlong-calls -G 0"
+
+define Build/Configure
+ (cd $(PKG_BUILD_DIR); aclocal && autoconf && automake)
+ $(call Build/Configure/Default)
+endef
+
+ifdef CONFIG_TARGET_lantiq
+ define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/{lib,include/ifxos}
+ $(CP) $(PKG_BUILD_DIR)/src/include/* $(1)/usr/include/ifxos
+ mkdir -p $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/src/libifxos.a $(1)/usr/lib/libifxos.a
+ endef
+endif
+
+$(eval $(call KernelPackage,ltq-ifxos))
diff --git a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch
new file mode 100644
index 0000000000..2fd7cd3e6d
--- /dev/null
+++ b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch
@@ -0,0 +1,96 @@
+Index: lib_ifxos-1.5.14/configure.in
+===================================================================
+--- lib_ifxos-1.5.14.orig/configure.in 2010-07-22 18:34:07.000000000 +0200
++++ lib_ifxos-1.5.14/configure.in 2013-03-14 08:23:57.481810836 +0100
+@@ -64,7 +64,7 @@
+ AC_ARG_ENABLE(kernelbuild,
+ AS_HELP_STRING(--enable-kernelbuild=x,Set the target kernel build path (only for kernel 2.6.x)),
+ [
+- if test -e $enableval/include/linux/autoconf.h; then
++ if test -e $enableval/include/linux/autoconf.h -o -e $enableval/include/generated/autoconf.h; then
+ AC_SUBST([KERNEL_BUILD_PATH],[$enableval])
+ else
+ AC_MSG_ERROR([The kernel build directory is not valid or not configured!])
+Index: lib_ifxos-1.5.14/src/linux/ifxos_linux_thread_drv.c
+===================================================================
+--- lib_ifxos-1.5.14.orig/src/linux/ifxos_linux_thread_drv.c 2010-01-08 18:10:47.000000000 +0100
++++ lib_ifxos-1.5.14/src/linux/ifxos_linux_thread_drv.c 2013-03-14 08:23:57.481810836 +0100
+@@ -34,8 +34,8 @@
+ #include <linux/sched.h>
+ #include <linux/version.h>
+ #include <linux/completion.h>
+-#include <linux/smp_lock.h>
+ #include <linux/signal.h>
++#include <linux/kthread.h>
+
+
+ #include "ifx_types.h"
+@@ -68,10 +68,6 @@
+ #if ( defined(IFXOS_HAVE_THREAD) && (IFXOS_HAVE_THREAD == 1) )
+
+
+-IFXOS_STATIC IFX_int32_t IFXOS_KernelThreadStartup(
+- IFXOS_ThreadCtrl_t *pThrCntrl);
+-
+-
+ /* ============================================================================
+ IFX Linux adaptation - Kernel Thread handling
+ ========================================================================= */
+@@ -96,9 +92,9 @@
+ - IFX_SUCCESS on success
+ - IFX_ERROR on error
+ */
+-IFXOS_STATIC IFX_int32_t IFXOS_KernelThreadStartup(
+- IFXOS_ThreadCtrl_t *pThrCntrl)
++int IFXOS_KernelThreadStartup(void *data)
+ {
++ IFXOS_ThreadCtrl_t *pThrCntrl = (IFXOS_ThreadCtrl_t*) data;
+ IFX_int32_t retVal = IFX_ERROR;
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+ struct task_struct *kthread = current;
+@@ -139,7 +135,7 @@
+ /* let others run */
+ unlock_kernel();
+ #else
+- daemonize(pThrCntrl->thrParams.pName);
++ //daemonize(pThrCntrl->thrParams.pName);
+
+ /* Enable signals in Kernel >= 2.6 */
+ allow_signal(SIGKILL);
+@@ -218,9 +214,7 @@
+ init_completion(&pThrCntrl->thrCompletion);
+
+ /* start kernel thread via the wrapper function */
+- pThrCntrl->tid = kernel_thread( (IFXOS_KERNEL_THREAD_StartRoutine)IFXOS_KernelThreadStartup,
+- (void *)pThrCntrl,
+- IFXOS_DRV_THREAD_OPTIONS);
++ pThrCntrl->tid = kthread_run(IFXOS_KernelThreadStartup, (void *)pThrCntrl, "ifxos");
+
+ pThrCntrl->bValid = IFX_TRUE;
+
+Index: lib_ifxos-1.5.14/src/include/ifxos_thread.h
+===================================================================
+--- lib_ifxos-1.5.14.orig/src/include/ifxos_thread.h 2010-01-14 10:59:13.000000000 +0100
++++ lib_ifxos-1.5.14/src/include/ifxos_thread.h 2013-03-14 08:24:43.577812806 +0100
+@@ -111,7 +111,7 @@
+ /**
+ Function type of the user thread/task function.
+ */
+-typedef IFX_int32_t (*IFXOS_ThreadFunction_t)(IFXOS_ThreadParams_t *);
++typedef int (*IFXOS_ThreadFunction_t)(void*);
+
+ /** @} */
+
+Index: lib_ifxos-1.5.14/src/include/linux/ifxos_linux_thread.h
+===================================================================
+--- lib_ifxos-1.5.14.orig/src/include/linux/ifxos_linux_thread.h 2010-01-08 18:10:27.000000000 +0100
++++ lib_ifxos-1.5.14/src/include/linux/ifxos_linux_thread.h 2013-03-14 08:25:13.193814073 +0100
+@@ -152,7 +152,7 @@
+ IFXOS_ThreadFunction_t pThrFct;
+
+ /** Kernel thread process ID */
+- IFX_int32_t tid;
++ struct task_struct *tid;
+
+ /** requested kernel thread priority */
+ IFX_int32_t nPriority;