summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/network/config/ltq-adsl-app/files/dsl_control8
-rw-r--r--package/network/config/ltq-vdsl-app/files/dsl_control13
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/init.d/dsl_fs13
-rw-r--r--target/linux/lantiq/base-files/etc/uci-defaults/02_network20
4 files changed, 38 insertions, 16 deletions
diff --git a/package/network/config/ltq-adsl-app/files/dsl_control b/package/network/config/ltq-adsl-app/files/dsl_control
index e48b72b059..fef0834b12 100644
--- a/package/network/config/ltq-adsl-app/files/dsl_control
+++ b/package/network/config/ltq-adsl-app/files/dsl_control
@@ -38,11 +38,15 @@ start() {
eval "xtu=\"\${annex_$annex}\""
[ -z "${firmware}" ] &&
- firmware=adsl.bin
+ 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 /lib/firmware/${firmware}
+ -f ${firmware}
}
stop() {
diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control b/package/network/config/ltq-vdsl-app/files/dsl_control
index c6be228494..7c423114cb 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -1,7 +1,8 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2012 OpenWrt.org
-START=99
+# needs to start before the atm layer which starts at 50
+START=48
EXTRA_COMMANDS="status lucistat"
EXTRA_HELP=" status Get DSL status information
@@ -153,7 +154,7 @@ start() {
esac
eval "xtse_adsl=\"\${xtse_adsl_$annex}\""
- [ -z "${xtse_adsl}" ] && xtse_adsl=$xtse_adsl_b
+ [ -z "${xtse_adsl}" ] && xtse_adsl=$xtse_adsl_a
eval "tone_adsl=\"\${tone_adsl_$tone}\""
[ -z "${tone_adsl}" ] && tone_adsl=$tone_adsl_av
@@ -161,7 +162,11 @@ start() {
eval "tone_vdsl=\"\${tone_vdsl_$tone}\""
[ -z "${tone_vdsl}" ] && tone_vdsl=$tone_vdsl_av
- [ -z "${firmware}" ] && firmware=vdsl.bin
+ [ -z "${firmware}" ] && firmware=/lib/firmware/vdsl.bin
+ [ -f "${firmware}" ] || {
+ echo failed to find $firmware
+ return 1
+ }
xdsl_scr adsl "${xtse_adsl}"
xdsl_scr vdsl "${xtse_vdsl}"
@@ -170,7 +175,7 @@ start() {
service_start /sbin/vdsl_cpe_control \
-i `echo $xtse_adsl | sed "s/ /_/g"` \
-n /sbin/dsl_notify.sh \
- -f /lib/firmware/${firmware} \
+ -f ${firmware} \
-a /tmp/adsl.scr \
-A /tmp/vdsl.scr \
-l /tmp/lowlevel.cfg \
diff --git a/target/linux/lantiq/base-files/etc/init.d/dsl_fs b/target/linux/lantiq/base-files/etc/init.d/dsl_fs
new file mode 100755
index 0000000000..975f5d8784
--- /dev/null
+++ b/target/linux/lantiq/base-files/etc/init.d/dsl_fs
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2014 OpenWrt.org
+
+. /lib/functions.sh
+
+START=30
+start() {
+ MTD=$(find_mtd_index dsl_fw)
+ [ "$MTD" -gt 0 ] && {
+ mkdir -p /lib/firmware/dsl/
+ mount -t jffs2 /dev/mtdblock$MTD /lib/firmware/dsl/
+ }
+}
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
index ac06e5f278..02f4f6a5fb 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
@@ -32,9 +32,9 @@ set_adsl_modem() {
local annex=$1
local firmware=$2
uci batch <<EOF
-set network.adsl='dsl-modem'
-set network.adsl.annex='$annex'
-set network.adsl.firmware='$firmware'
+set network.dsl='adsl'
+set network.dsl.annex='$annex'
+set network.dsl.firmware='$firmware'
EOF
}
@@ -44,11 +44,11 @@ set_vdsl_modem() {
local tone=$3
local xfer_mode=$4
uci batch <<EOF
-set network.vdsl='dsl-modem'
-set network.vdsl.annex='$annex'
-set network.vdsl.firmware='$firmware'
-set network.vdsl.tone='$tone'
-set network.vdsl.xfer_mode='$xfer_mode'
+set network.dsl='vdsl'
+set network.dsl.annex='$annex'
+set network.dsl.firmware='$firmware'
+set network.dsl.tone='$tone'
+set network.dsl.xfer_mode='$xfer_mode'
EOF
}
@@ -170,9 +170,9 @@ esac
[ -z "$(ls /lib/modules/`uname -r`/ltq_atm*)" ] || set_atm_wan "$vpi" "$vci" "$encaps" "$payload"
if [ -n "$(grep "system type.*: VR9" /proc/cpuinfo)" ]; then
- set_vdsl_modem "$annex" "vdsl.bin" "bv" "ptm"
+ set_vdsl_modem "$annex" "/lib/firmware/vdsl.bin" "av" "ptm"
else
- set_adsl_modem "$annex" "adsl.bin"
+ set_adsl_modem "$annex" "/lib/firmware/adsl.bin"
fi
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr lan $lan_mac