ramips: add user-space support for ALL0256N
authorGabor Juhos <juhosg@openwrt.org>
Tue, 24 Jan 2012 11:48:47 +0000 (11:48 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Tue, 24 Jan 2012 11:48:47 +0000 (11:48 +0000)
This adds uci-defaults and sysupgrade support for the ALL0256N.

Signed-off-by: Daniel Golle <dgolle@allnet.de>
SVN-Revision: 29883

target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
target/linux/ramips/base-files/etc/uci-defaults/leds
target/linux/ramips/base-files/etc/uci-defaults/network
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac
target/linux/ramips/base-files/lib/ramips.sh
target/linux/ramips/base-files/lib/upgrade/platform.sh

index 259c5d75fd201920f4f0c3f24b8237b1a191aa75..9a714ddc697671ea9c1e3f0dc943fb462125572d 100644 (file)
@@ -46,6 +46,7 @@ case "$FIRMWARE" in
                rt2x00_eeprom_extract "u-boot" 262144 272
                ;;
 
+       all0256n | \
        argus-atp52b | \
        bc2 | \
        esr-9753 | \
index 02d522a6d85d09785ed9b62bf414478832a2f79b..bcd17f9d045479fea47eede059e3ccc3c3ec985b 100755 (executable)
@@ -33,6 +33,9 @@ EOF
 board=$(ramips_board_name)
 
 case $board in
+       all0256n)
+               set_wifi_led "rt2800pci-phy0::radio"
+               ;;
        bc2)
                set_usb_led "bc2:blue:usb"
                ;;
index 89a3e359ada54582a9c9554ceba72c189eb591fd..cc5600bcfdb96a5941655495540370d7f2a29cc7 100755 (executable)
@@ -16,6 +16,10 @@ ramips_setup_interfaces()
        ucidef_set_interface_loopback
 
        case $board in
+       all0256n)
+               ucidef_set_interface_lan "eth0.1"
+               ;;
+
        argus-atp52b | \
        b2c | \
        nw718 | \
@@ -65,6 +69,10 @@ ramips_setup_macs()
        local wan_mac=""
 
        case $board in
+       all0256n)
+               lan_mac=$(ramips_get_mac_binary factory 40)
+               ;;
+
        argus-atp52b | \
        b2c | \
        f5d8235-v1 | \
index f1d641cd29b3a5cae825fddd51a8919f709d5f92..9a4d515b19bc9b1c8c946f54da5e0f2d83fdcf5f 100644 (file)
@@ -8,7 +8,9 @@ preinit_set_mac_address() {
        . /lib/ramips.sh
 
        case $(ramips_board_name) in
-       bc2 | nw718 | esr-9753)
+       bc2 |\
+       nw718 |\
+       esr-9753)
                mac=$(ramips_get_mac_binary factory 4)
                mac=$(maccalc or "$mac" "02:00:00:00:00:00")
                ifconfig eth0 hw ether $mac 2>/dev/null
@@ -19,6 +21,7 @@ preinit_set_mac_address() {
                 mac=$(ramips_get_mac_binary devdata 16388)
                 ifconfig eth0 hw ether $mac 2>/dev/null
                 ;;
+       all0256n |\
        hw550-3g |\
        nbg-419n |\
        omni-emb |\
index dca2d1d91b55b641619a91f9037ebb015d879693..ca9b3c9cfc5acbdf24c16220487764892d77a5fc 100755 (executable)
@@ -47,6 +47,9 @@ ramips_board_name() {
        machine=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo)
 
        case "$machine" in
+       *"Allnet ALL0256N")
+               name="all0256n"
+               ;;
        *"Argus ATP-52B")
                name="argus-atp52b"
                ;;
index b4826f5598662431078cf6a1e637692f4470e678..30754b5c2fee02d2148035c132dafd0b6ca4b32d 100755 (executable)
@@ -14,6 +14,7 @@ platform_check_image() {
        [ "$ARGC" -gt 1 ] && return 1
 
        case "$board" in
+       all0256n | \
        bc2 | \
        dir-300-b1 | \
        dir-600-b1 | \