Changeset 30518


Ignore:
Timestamp:
2012-02-14T16:05:49+01:00 (5 years ago)
Author:
blogic
Message:

[ltq-dsl] add annex selection support to ltq_dsl package

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/ltq-dsl-app/files/dsl_control

    r29881 r30518  
    22# Copyright (C) 2008 OpenWrt.org 
    33START=99 
     4 
     5. /lib/functions.sh 
    46 
    57EXTRA_COMMANDS="status lucistat" 
     
    256258} 
    257259 
     260 
     261annex_b=10_00_10_00_00_04_00_00 
     262annex_bdmt=10_00_00_00_00_00_00_00 
     263annex_b2=00_00_10_00_00_00_00_00 
     264annex_b2p=00_00_00_00_00_04_00_00 
     265annex_a=04_01_04_00_00_01_00_00 
     266annex_at1=01_00_00_00_00_00_00_00 
     267annex_alite=00_01_00_00_00_00_00_00 
     268annex_admt=04_00_00_00_00_00_00_00 
     269annex_a2=00_00_04_00_00_00_00_00 
     270annex_a2p=00_00_00_00_00_01_00_00 
     271annex_l=00_00_00_00_04_00_00_00 
     272annex_m=00_00_00_00_40_00_04_00 
     273annex_m2=00_00_00_00_40_00_00_00 
     274annex_m2p=00_00_00_00_00_00_04_00 
     275 
    258276# 
    259277# Simple start routine 
    260278# 
    261279start() { 
     280        local annex 
     281        local xtu 
     282        config_load network 
     283        config_get annex atm annex 
     284 
     285        # get xtu 
     286        eval "xtu=\"\${annex_$annex}\"" 
     287 
     288        # check for invalid annex mode 
     289        [ -n "${annex}" -a -z "${xtu}" ] && 
     290                echo "unknown annex mode $annex" 
     291 
    262292        # start CPE dsl daemon in the background 
    263         service_start /sbin/dsl_cpe_control -i \ 
     293        service_start /sbin/dsl_cpe_control -i${xtu} \ 
    264294                        -n /sbin/dsl_notify.sh \ 
    265295                        -f /lib/firmware/ModemHWE.bin 
  • trunk/package/ltq-dsl/Makefile

    r28723 r30518  
    161161define Package/kmod-ltq-dsl-firmware-$(BUILD_VARIANT)/install 
    162162        $(INSTALL_DIR) $(1)/lib/firmware/ 
    163         $(CP) $(PKG_BUILD_DIR)/$(FW_NAME)/ltq-dsl-fw-$(BUILD_VARIANT).bin $(1)/lib/firmware/ModemHWE.bin 
     163        $(CP) $(PKG_BUILD_DIR)/$(FW_NAME)/ltq-dsl-fw-$(BUILD_VARIANT).bin $(1)/lib/firmware/dsl-fw-$(word 1, $(subst -, ,$(BUILD_VARIANT))).bin 
     164        ln -s /lib/firmware/dsl-fw-$(word 1, $(subst -, ,$(BUILD_VARIANT))).bin $(1)/lib/firmware/ModemHWE.bin 
    164165endef 
    165166 
  • trunk/target/linux/lantiq/base-files/etc/uci-defaults/network

    r29292 r30518  
    5353        local encaps=$3 
    5454        local payload=$4 
    55  
    5655        uci batch <<EOF 
    5756set network.atm='atm-bridge' 
     
    6160set network.atm.encaps='$encaps' 
    6261set network.atm.payload='$payload' 
     62set network.atm.fwannex='$annex' 
     63set network.atm.annex='$annex' 
    6364set network.wan='interface' 
    6465set network.wan.ifname='nas0' 
     
    6667set network.wan.username='foo' 
    6768set network.wan.password='bar' 
     69EOF 
     70} 
     71 
     72set_adsl() { 
     73        local fwannex=$1 
     74        local annex=$2 
     75        uci batch <<EOF 
     76set network.adsl='adsl-device' 
     77set network.adsl.fwannex='$fwannex' 
     78set network.adsl.annex='$annex' 
    6879EOF 
    6980} 
     
    110121set_interface_lan 'eth0' 
    111122 
    112 dsl=$(lantiq_soc_has_adsl) 
    113 [ -z "$dsl" ] || set_atm_wan '1' '32' 'llc' 'bridged' 
     123 
     124vpi=1 
     125vci=32 
     126encaps="llc" 
     127payload="bridged" 
     128fwannex=$(lantiq_dsl_fwannex) 
     129annex="$fwannex" 
    114130 
    115131board=$(lantiq_board_name) 
    116  
    117132case "$board" in 
    118133GIGASX76X) 
     
    120135        add_switch "eth0" "1" "1" 
    121136        add_switch_vlan "eth0" "1" "1 2 3 4 5t" 
    122         set_atm_wan "1" "32" "llc" "bridged" 
    123137        ;; 
    124138 
     
    129143esac 
    130144 
     145dsl=$(lantiq_soc_has_adsl) 
     146[ -z "$dsl" ] || set_atm_wan "$vpi" "vci" "$encaps" "$payload" "$annex" 
     147[ -z "$fwannex" ] || set_adsl "$fwannex" "$annex" 
     148 
    131149uci commit network 
    132150 
  • trunk/target/linux/lantiq/base-files/lib/lantiq.sh

    r29161 r30518  
    1212        grep ^machine /proc/cpuinfo | sed "s/machine.*: \(.*\)/\1/g" | sed "s/\(.*\) - .*/\1/g" 
    1313} 
     14 
     15lantiq_dsl_fwannex() { 
     16        ls /lib/firmware/dsl-fw-*.bin 2> /dev/null | sed "s/.*\([ab]\)\.bin/\1/g" 
     17} 
Note: See TracChangeset for help on using the changeset viewer.