From 716ca530e1c4515d8683c9d5be3d56b301758b66 Mon Sep 17 00:00:00 2001 From: James <> Date: Wed, 4 Nov 2015 11:49:21 +0000 Subject: trunk-47381 --- package/network/config/ltq-adsl-app/Makefile | 84 ++++++++++++++++++++++ .../network/config/ltq-adsl-app/files/dsl_control | 59 +++++++++++++++ .../patches/010-eglibc_compile_fix.patch | 23 ++++++ 3 files changed, 166 insertions(+) create mode 100644 package/network/config/ltq-adsl-app/Makefile create mode 100644 package/network/config/ltq-adsl-app/files/dsl_control create mode 100644 package/network/config/ltq-adsl-app/patches/010-eglibc_compile_fix.patch (limited to 'package/network/config/ltq-adsl-app') diff --git a/package/network/config/ltq-adsl-app/Makefile b/package/network/config/ltq-adsl-app/Makefile new file mode 100644 index 0000000..9670119 --- /dev/null +++ b/package/network/config/ltq-adsl-app/Makefile @@ -0,0 +1,84 @@ +# +# Copyright (C) 2011-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:=dsl_cpe_control_danube +PKG_VERSION:=3.24.4.4 +PKG_RELEASE:=2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION) +PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/ +PKG_MD5SUM:=ee315306626b68794d3d3636dabfe161 +PKG_MAINTAINER:=John Crispin +PKG_LICENSE:=BSD-3-Clause + +PKG_FIXUP:=autoreconf + +PKG_CONFIG_DEPENDS:=\ + CONFIG_LTQ_DSL_ENABLE_SOAP \ + CONFIG_LTQ_DSL_ENABLE_DSL_EVENT_POLLING + +PKG_BUILD_DEPENDS:=TARGET_lantiq_xway:kmod-ltq-adsl-danube TARGET_lantiq_ase:kmod-ltq-adsl-ase + +include $(INCLUDE_DIR)/package.mk + +define Package/ltq-adsl-app + SECTION:=net + CATEGORY:=Network + TITLE:=Lantiq DSL userland tool + URL:=http://www.lantiq.com/ + DEPENDS:=@(TARGET_lantiq_xway||TARGET_lantiq_ase) +libpthread + MENU:=1 +endef + +define Package/ltq-adsl-app/description + Infineon DSL CPE API for Amazon SE, Danube and Vinax. +endef + +LTQ_DSL_MAX_DEVICE=1 +LTQ_DSL_LINES_PER_DEVICE=1 +LTQ_DSL_CHANNELS_PER_LINE=1 + +CONFIGURE_ARGS += \ + --with-max-device="$(LTQ_DSL_MAX_DEVICE)" \ + --with-lines-per-device="$(LTQ_DSL_LINES_PER_DEVICE)" \ + --with-channels-per-line="$(LTQ_DSL_CHANNELS_PER_LINE)" \ + --enable-danube \ + --enable-driver-include="-I$(STAGING_DIR)/usr/include/adsl/" \ + --enable-debug-prints \ + --enable-add-appl-cflags="-DMAX_CLI_PIPES=2" \ + --enable-cli-support \ + --enable-cmv-scripts \ + --enable-debug-tool-interface \ + --enable-adsl-led \ + --enable-dsl-ceoc \ + --enable-script-notification \ + --enable-dsl-pm \ + --enable-dsl-pm-total \ + --enable-dsl-pm-history \ + --enable-dsl-pm-showtime \ + --enable-dsl-pm-channel-counters \ + --enable-dsl-pm-datapath-counters \ + --enable-dsl-pm-line-counters \ + --enable-dsl-pm-channel-thresholds \ + --enable-dsl-pm-datapath-thresholds \ + --enable-dsl-pm-line-thresholds \ + --enable-dsl-pm-optional-parameters + +TARGET_CFLAGS += -I$(LINUX_DIR)/include + +define Package/ltq-adsl-app/install + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/dsl_control $(1)/etc/init.d/ + + $(INSTALL_DIR) $(1)/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control $(1)/sbin +endef + +$(eval $(call BuildPackage,ltq-adsl-app)) diff --git a/package/network/config/ltq-adsl-app/files/dsl_control b/package/network/config/ltq-adsl-app/files/dsl_control new file mode 100644 index 0000000..cece347 --- /dev/null +++ b/package/network/config/ltq-adsl-app/files/dsl_control @@ -0,0 +1,59 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2012 OpenWrt.org + +START=99 + +EXTRA_COMMANDS="status lucistat" +EXTRA_HELP=" status Get DSL status information + lucistat Get status information if lua friendly format" + +SERVICE_DAEMONIZE=1 +SERVICE_WRITE_PID=1 + +[ -f /lib/functions/lantiq_dsl.sh ] && . /lib/functions/lantiq_dsl.sh + +annex_b=10_00_10_00_00_04_00_00 +annex_bdmt=10_00_00_00_00_00_00_00 +annex_b2=00_00_10_00_00_00_00_00 +annex_b2p=00_00_00_00_00_04_00_00 +annex_a=04_01_04_00_00_01_00_00 +annex_at1=01_00_00_00_00_00_00_00 +annex_alite=00_01_00_00_00_00_00_00 +annex_admt=04_00_00_00_00_00_00_00 +annex_a2=00_00_04_00_00_00_00_00 +annex_a2p=00_00_00_00_00_01_00_00 +annex_l=00_00_00_00_04_00_00_00 +annex_m=00_00_00_00_40_00_04_00 +annex_m2=00_00_00_00_40_00_00_00 +annex_m2p=00_00_00_00_00_00_04_00 + +start() { + local annex + local firmware + local xtu + config_load network + config_get annex dsl annex + config_get firmware dsl firmware + + eval "xtu=\"\${annex_$annex}\"" + + [ -z "${firmware}" ] && + firmware=/lib/firmware/adsl.bin + [ -f "${firmware}" ] || { + echo failed to find $firmware + return 1 + } + + service_start /sbin/dsl_cpe_control -i${xtu} \ + -n /sbin/dsl_notify.sh \ + -f ${firmware} +} + +stop() { + DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \ + DSL_INTERFACE_STATUS="DOWN" \ + /sbin/dsl_notify.sh + + service_stop /sbin/dsl_cpe_control +} + diff --git a/package/network/config/ltq-adsl-app/patches/010-eglibc_compile_fix.patch b/package/network/config/ltq-adsl-app/patches/010-eglibc_compile_fix.patch new file mode 100644 index 0000000..268f868 --- /dev/null +++ b/package/network/config/ltq-adsl-app/patches/010-eglibc_compile_fix.patch @@ -0,0 +1,23 @@ +--- a/configure.in ++++ b/configure.in +@@ -29,6 +29,8 @@ AC_C_VOLATILE + #AC_FUNC_STRTOD + #AC_CHECK_FUNCS([ftime gethostbyname gettimeofday localtime_r memset select socket strchr strerror strstr strtoull]) + ++AC_SEARCH_LIBS([clock_gettime],[rt]) ++ + # + # save the configure arguments + # +--- a/src/dsl_cpe_linux.h ++++ b/src/dsl_cpe_linux.h +@@ -45,7 +45,8 @@ + #include + #include /* socket */ + #include /* semget */ +-#include /* sem_t */ ++#include /* sem_t */ ++#include + + #ifdef DSL_DEBUG_TOOL_INTERFACE + #include -- cgit v1.2.3