ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
;;
+tube2h)
+ ucidef_set_led_netdev "lan" "LAN" "alfa:blue:lan" "eth0"
+ ucidef_set_rssimon "wlan0" "40000" "1"
+ ucidef_set_led_rssi "signal1" "SIGNAL1" "alfa:red:signal1" "wlan0" "1" "100" "0" "13"
+ ucidef_set_led_rssi "signal2" "SIGNAL2" "alfa:orange:signal2" "wlan0" "26" "100" "-25" "13"
+ ucidef_set_led_rssi "signal3" "SIGNAL3" "alfa:green:signal3" "wlan0" "51" "100" "-50" "13"
+ ucidef_set_led_rssi "signal4" "SIGNAL4" "alfa:green:signal4" "wlan0" "76" "100" "-75" "13"
+ ;;
+
wrt160nl)
ucidef_set_led_wlan "wlan" "WLAN" "wrt160nl:blue:wlan" "phy0tpt"
;;
# Copyright (C) 2011 OpenWrt.org
#
+. /lib/functions/system.sh
. /lib/ar71xx.sh
PART_NAME=firmware
fi
}
+alfa_check_image() {
+ local magic_long="$(get_magic_long "$1")"
+ local fw_part_size=$(mtd_get_part_size firmware)
+
+ case "$magic_long" in
+ "27051956")
+ [ "$fw_part_size" != "16318464" ] && {
+ echo "Invalid image magic \"$magic_long\" for $fw_part_size bytes"
+ return 1
+ }
+ ;;
+
+ "68737173")
+ [ "$fw_part_size" != "7929856" ] && {
+ echo "Invalid image magic \"$magic_long\" for $fw_part_size bytes"
+ return 1
+ }
+ ;;
+ esac
+
+ return 0
+}
+
platform_check_image() {
local board=$(ar71xx_board_name)
local magic="$(get_magic_word "$1")"
return 0
;;
+
+ tube2h)
+ alfa_check_image "$1" && return 0
+ return 1
+ ;;
+
uap-pro)
[ "$magic_long" != "19852003" ] && {
echo "Invalid image type."