diff options
Diffstat (limited to 'target/linux/lantiq/xway_legacy/base-files')
3 files changed, 103 insertions, 0 deletions
diff --git a/target/linux/lantiq/xway_legacy/base-files/etc/board.d/01_leds b/target/linux/lantiq/xway_legacy/base-files/etc/board.d/01_leds new file mode 100755 index 0000000000..4200dcb0c8 --- /dev/null +++ b/target/linux/lantiq/xway_legacy/base-files/etc/board.d/01_leds @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/leds.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +led_wifi="$(get_dt_led wifi)" +[ -n "$led_wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "$led_wifi" "phy0tpt" + +led_usb="$(get_dt_led usb)" +[ -n "$led_usb" ] && ucidef_set_led_usbdev "usb" "usb" "$led_usb" "1-1" + +led_usb2="$(get_dt_led usb2)" +[ -n "$led_usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "$led_usb2" "2-1" + +led_dsl="$(get_dt_led dsl)" +[ -n "$led_dsl" ] && { + led_internet="$(get_dt_led internet)" + if [ -n "$led_internet" ]; then + ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0" + ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan" + else + ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "dsl0" + fi +} + +board=$(board_name) + +case "$board" in +arcadyan,arv4525pw) + ucidef_set_led_netdev "wifi" "wifi" "arv4525pw:green:wlan" "wlan0" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/lantiq/xway_legacy/base-files/etc/board.d/02_network b/target/linux/lantiq/xway_legacy/base-files/etc/board.d/02_network new file mode 100755 index 0000000000..120857de4c --- /dev/null +++ b/target/linux/lantiq/xway_legacy/base-files/etc/board.d/02_network @@ -0,0 +1,52 @@ +#!/bin/sh +# +# Copyright (C) 2011-2015 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh +. /lib/functions/lantiq.sh + +board_config_update + +annex="a" + +lan_mac="" +wan_mac="" + +board=$(board_name) + +case "$board" in +arcadyan,arv4520pw) + annex="b" + ucidef_add_switch "switch0" \ + "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth0" + ;; +arcadyan,arv4525pw|\ +arcadyan,arv452cqw) + annex="b" + ucidef_set_interface_lan 'eth0' + ;; +*) + ucidef_set_interface_lan 'eth0' + ;; +esac + +ls /lib/modules/$(uname -r)/ltq_atm* 1> /dev/null 2>&1 && \ + ucidef_add_atm_bridge 1 32 "llc" "bridged" "dsl" + +if lantiq_is_vdsl_system; then + ucidef_add_vdsl_modem "$annex" "av" +else + ucidef_add_adsl_modem "$annex" "/lib/firmware/adsl.bin" +fi + +ucidef_set_interface_wan "dsl0" "pppoe" + +[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac" +[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac" + +board_config_flush + +exit 0 + diff --git a/target/linux/lantiq/xway_legacy/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/xway_legacy/base-files/lib/upgrade/platform.sh new file mode 100755 index 0000000000..d088601bb0 --- /dev/null +++ b/target/linux/lantiq/xway_legacy/base-files/lib/upgrade/platform.sh @@ -0,0 +1,10 @@ +PART_NAME=firmware +REQUIRE_IMAGE_METADATA=1 + +platform_check_image() { + return 0 +} + +platform_do_upgrade() { + default_do_upgrade "$1" +} |