Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
45
package/network/config/soloscli/Makefile
Normal file
45
package/network/config/soloscli/Makefile
Normal file
@@ -0,0 +1,45 @@
|
||||
#
|
||||
# Copyright (C) 2006-2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=soloscli
|
||||
PKG_VERSION:=1.04
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=solos-pci-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/openadsl
|
||||
PKG_HASH:=6379e6970a5c97fd5a223d024138ebb71b15d70e2ad1fe9da09edc5b2d760e1d
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/solos-pci-$(PKG_VERSION)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/soloscli
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Configuration utility for Solos ADSL2+ modems
|
||||
DEPENDS:=+kmod-solos-pci
|
||||
URL:=http://sourceforge.net/projects/openadsl
|
||||
endef
|
||||
|
||||
define Package/soloscli/description
|
||||
This package contains the soloscli utility
|
||||
for interrogating Traverse Technologies' Solos ADSL2+ modems.
|
||||
endef
|
||||
|
||||
define Package/soloscli/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/soloscli/soloscli $(1)/usr/bin/
|
||||
$(INSTALL_BIN) ./files/solos-log-stats $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/atm
|
||||
$(INSTALL_CONF) ./files/etc/hotplug.d/atm/15-solos-init $(1)/etc/hotplug.d/atm/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,soloscli))
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
dialog() {
|
||||
local tag="$(echo "$1" | cut -d= -f1)"
|
||||
local value="$(echo "$1" | cut -d= -f2-)"
|
||||
local response
|
||||
|
||||
response="$(soloscli -s "$port" "$tag" "$value")"
|
||||
[ $? -ne 0 ] && {
|
||||
logger "soloscli($port): $tag '$value' returns $response"
|
||||
}
|
||||
}
|
||||
|
||||
if [ "$ACTION" = "add" ]; then
|
||||
include /lib/network
|
||||
scan_interfaces
|
||||
|
||||
case $DEVICENAME in
|
||||
solos-pci[0-3])
|
||||
port="${DEVICENAME#solos-pci}"
|
||||
device="solos${port}"
|
||||
|
||||
config_list_foreach wan "$device" dialog
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
13
package/network/config/soloscli/files/etc/uci-defaults/solos
Normal file
13
package/network/config/soloscli/files/etc/uci-defaults/solos
Normal file
@@ -0,0 +1,13 @@
|
||||
uci batch <<__EOF__
|
||||
|
||||
delete network.wan.solos0
|
||||
|
||||
add_list network.wan.solos0="ActivateLine=Abort"
|
||||
add_list network.wan.solos0="Retrain=EnableAll"
|
||||
add_list network.wan.solos0="DetectNoise=Enable"
|
||||
add_list network.wan.solos0="BisMCapability=Disable"
|
||||
add_list network.wan.solos0="BisACapability=Disable"
|
||||
add_list network.wan.solos0="ActivateLine=Start"
|
||||
|
||||
commit network
|
||||
__EOF__
|
||||
19
package/network/config/soloscli/files/solos-log-stats
Normal file
19
package/network/config/soloscli/files/solos-log-stats
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /sys/class/atm/ || exit 1
|
||||
|
||||
for PORT in solos-pci* ; do
|
||||
|
||||
RXRATE=`cat $PORT/parameters/RxBitRate`
|
||||
TXRATE=`cat $PORT/parameters/TxBitRate`
|
||||
RXSNR=`cat $PORT/parameters/LocalSNRMargin | sed "s/ dB//"`
|
||||
TXSNR=`cat $PORT/parameters/RemoteSNRMargin | sed "s/ dB//"`
|
||||
RXERR=`cat $PORT/parameters/RSUnCorrectedErrorsDn`
|
||||
TXERR=`cat $PORT/parameters/RSUnCorrectedErrorsUp`
|
||||
RXFEC=`cat $PORT/parameters/RSCorrectedErrorsDn`
|
||||
TXFEC=`cat $PORT/parameters/RSCorrectedErrorsUp`
|
||||
|
||||
echo "$RXRATE $RXSNR $RXERR $RXFEC / $TXRATE $TXSNR $TXERR $TXFEC" |
|
||||
logger -t $PORT
|
||||
done
|
||||
|
||||
11
package/network/config/soloscli/patches/001-no-driver.patch
Normal file
11
package/network/config/soloscli/patches/001-no-driver.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -11,7 +11,7 @@ else
|
||||
KDIR ?= /lib/modules/$(shell uname -r)/build
|
||||
PWD := $(shell pwd)
|
||||
|
||||
-all: soloscli driver
|
||||
+all: soloscli
|
||||
|
||||
soloscli: soloscli/soloscli
|
||||
|
||||
12
package/network/config/soloscli/patches/002-cflags.patch
Normal file
12
package/network/config/soloscli/patches/002-cflags.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- a/soloscli/Makefile
|
||||
+++ b/soloscli/Makefile
|
||||
@@ -4,9 +4,6 @@
|
||||
# Last Mod: 2009-06-16
|
||||
#
|
||||
|
||||
-CC=gcc
|
||||
-CFLAGS=-Wall
|
||||
-
|
||||
soloscli: soloscli.c soloscli.h
|
||||
|
||||
clean:
|
||||
Reference in New Issue
Block a user