aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-vdsl
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/lantiq/ltq-vdsl')
-rw-r--r--package/kernel/lantiq/ltq-vdsl/Makefile76
-rw-r--r--package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch80
2 files changed, 156 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-vdsl/Makefile b/package/kernel/lantiq/ltq-vdsl/Makefile
new file mode 100644
index 0000000..617d9bf
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl/Makefile
@@ -0,0 +1,76 @@
+# Copyright (C) 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:=ltq-vdsl-vr9
+PKG_VERSION:=4.16.2.4
+PKG_RELEASE:=1
+
+PKG_BASE_NAME:=drv_dsl_cpe_api_vrx
+PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/xdarklight/$(PKG_BASE_NAME)/archive/v$(PKG_VERSION)
+PKG_MD5SUM:=0a3e35d199eb8936f3e8f61bb074223a
+
+PKG_USE_MIPS16:=0
+
+PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/ltq-vdsl-vr9
+ TITLE:=vdsl driver
+ SECTION:=sys
+ SUBMENU:=Network Devices
+ DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-vdsl-vr9-mei
+ FILES:=$(PKG_BUILD_DIR)/src/drv_dsl_cpe_api.ko
+ AUTOLOAD:=$(call AutoLoad,51,drv_dsl_cpe_api)
+endef
+
+define Package/ltq-vdsl-vr9/description
+ This package contains the Lantiq DSL CPE API driver.
+
+ Supported Devices:
+ - VRX200 Family
+endef
+
+EXTRA_CFLAGS = -fno-pic -mno-abicalls -mlong-calls -G 0
+
+MAKE_FLAGS += \
+ SHELL="$(BASH)"
+
+CONFIGURE_ARGS += --enable-kernel-include="$(LINUX_DIR)/include" \
+ --with-max-device="1" \
+ --with-lines-per-device="1" \
+ --with-channels-per-line="1" \
+ --enable-vrx \
+ --enable-vrx-device=vr9 \
+ --enable-ifxos \
+ --enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos" \
+ --enable-driver-include="-I$(STAGING_DIR)/usr/include/vdsl" \
+ --enable-add-drv-cflags="-DMODULE -DINCLUDE_DSL_ATM_PTM_INTERFACE_SUPPORT" \
+ --enable-adsl-led=no \
+ --enable-adsl-mib=no \
+ --enable-dsl-ceoc=no \
+ --enable-dsl-bonding=no \
+ --enable-linux-26 \
+ --enable-kernelbuild="$(LINUX_DIR)" \
+ --enable-debug-prints=no \
+ KERNEL_ARCH=mips
+
+CONFIGURE_ARGS += --enable-model=full
+#CONFIGURE_ARGS += --enable-model=lite
+#CONFIGURE_ARGS += --enable-model=footprint
+#CONFIGURE_ARGS += --enable-model=typical
+#CONFIGURE_ARGS += --enable-model=debug
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/drv_vdsl_cpe_api
+ $(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe*.h $(1)/usr/include/drv_vdsl_cpe_api/
+endef
+
+$(eval $(call KernelPackage,ltq-vdsl-vr9))
diff --git a/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch b/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
new file mode 100644
index 0000000..e68a6f0
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
@@ -0,0 +1,80 @@
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -63,7 +63,7 @@ POST_UNINSTALL = :
+
+ # the headerfile of linux kernels 2.6.x contain to much arithmetic
+ # with void pointers (which is allowed for gcc!)
+-@KERNEL_2_6_FALSE@am__append_6 = -Wpointer-arith
++@KERNEL_2_6_FALSE@am__append_6 =
+ subdir = src
+ DIST_COMMON = $(drv_dsl_cpe_api_include_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+--- a/src/common/drv_dsl_cpe_os_linux.c
++++ b/src/common/drv_dsl_cpe_os_linux.c
+@@ -11,6 +11,7 @@
+
+ #define DSL_INTERN
+
++#include <linux/device.h>
+ #include "drv_dsl_cpe_api.h"
+ #include "drv_dsl_cpe_api_ioctl.h"
+
+@@ -238,24 +239,10 @@ static DSL_long_t DSL_DRV_Ioctls(DSL_DRV
+ }
+
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+- if (pFile->f_dentry != DSL_NULL)
+- {
+- pINode = pFile->f_dentry->d_inode;
+- }
+- else
+- {
+- pINode = DSL_NULL;
+- }
++ pINode = file_inode(pFile);
+ #endif
+
+- if (pINode == DSL_NULL)
+- {
+- bIsInKernel = DSL_TRUE;
+- }
+- else
+- {
+ bIsInKernel = DSL_FALSE;
+- }
+
+ if ( (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API) ||
+ (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_G997) ||
+@@ -1102,6 +1089,9 @@ static void DSL_DRV_DebugInit(void)
+ return;
+ }
+
++static struct class *dsl_class;
++static dev_t dsl_devt;
++
+ /* Entry point of driver */
+ int __init DSL_ModuleInit(void)
+ {
+@@ -1140,6 +1130,10 @@ int __init DSL_ModuleInit(void)
+
+ DSL_DRV_DevNodeInit();
+
++ dsl_class = class_create(THIS_MODULE, "dsl_cpe_api0");
++ dsl_devt = MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0);
++ device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api0");
++
+ return 0;
+ }
+
+@@ -1147,6 +1141,11 @@ void __exit DSL_ModuleCleanup(void)
+ {
+ printk("Module will be unloaded"DSL_DRV_CRLF);
+
++ device_destroy(dsl_class, dsl_devt);
++ dsl_devt = NULL;
++ class_destroy(dsl_class);
++ dsl_class = NULL;
++
+ unregister_chrdev(nMajorNum, DRV_DSL_CPE_API_DEV_NAME);
+
+ DSL_DRV_Cleanup();