Browse Source

ramips: add user-space support for ALL0256N

This adds uci-defaults and sysupgrade support for the ALL0256N.

Signed-off-by: Daniel Golle <[email protected]>

SVN-Revision: 29883
Gabor Juhos 14 years ago
parent
commit
944c8aacdb

+ 1 - 0
target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom

@@ -46,6 +46,7 @@ case "$FIRMWARE" in
 		rt2x00_eeprom_extract "u-boot" 262144 272
 		rt2x00_eeprom_extract "u-boot" 262144 272
 		;;
 		;;
 
 
+	all0256n | \
 	argus-atp52b | \
 	argus-atp52b | \
 	bc2 | \
 	bc2 | \
 	esr-9753 | \
 	esr-9753 | \

+ 3 - 0
target/linux/ramips/base-files/etc/uci-defaults/leds

@@ -33,6 +33,9 @@ EOF
 board=$(ramips_board_name)
 board=$(ramips_board_name)
 
 
 case $board in
 case $board in
+	all0256n)
+		set_wifi_led "rt2800pci-phy0::radio"
+		;;
 	bc2)
 	bc2)
 		set_usb_led "bc2:blue:usb"
 		set_usb_led "bc2:blue:usb"
 		;;
 		;;

+ 8 - 0
target/linux/ramips/base-files/etc/uci-defaults/network

@@ -16,6 +16,10 @@ ramips_setup_interfaces()
 	ucidef_set_interface_loopback
 	ucidef_set_interface_loopback
 
 
 	case $board in
 	case $board in
+	all0256n)
+		ucidef_set_interface_lan "eth0.1"
+		;;
+
 	argus-atp52b | \
 	argus-atp52b | \
 	b2c | \
 	b2c | \
 	nw718 | \
 	nw718 | \
@@ -65,6 +69,10 @@ ramips_setup_macs()
 	local wan_mac=""
 	local wan_mac=""
 
 
 	case $board in
 	case $board in
+	all0256n)
+		lan_mac=$(ramips_get_mac_binary factory 40)
+		;;
+
 	argus-atp52b | \
 	argus-atp52b | \
 	b2c | \
 	b2c | \
 	f5d8235-v1 | \
 	f5d8235-v1 | \

+ 4 - 1
target/linux/ramips/base-files/lib/preinit/06_set_iface_mac

@@ -8,7 +8,9 @@ preinit_set_mac_address() {
 	. /lib/ramips.sh
 	. /lib/ramips.sh
 
 
 	case $(ramips_board_name) in
 	case $(ramips_board_name) in
-	bc2 | nw718 | esr-9753)
+	bc2 |\
+	nw718 |\
+	esr-9753)
 		mac=$(ramips_get_mac_binary factory 4)
 		mac=$(ramips_get_mac_binary factory 4)
 		mac=$(maccalc or "$mac" "02:00:00:00:00:00")
 		mac=$(maccalc or "$mac" "02:00:00:00:00:00")
 		ifconfig eth0 hw ether $mac 2>/dev/null
 		ifconfig eth0 hw ether $mac 2>/dev/null
@@ -19,6 +21,7 @@ preinit_set_mac_address() {
                 mac=$(ramips_get_mac_binary devdata 16388)
                 mac=$(ramips_get_mac_binary devdata 16388)
                 ifconfig eth0 hw ether $mac 2>/dev/null
                 ifconfig eth0 hw ether $mac 2>/dev/null
                 ;;
                 ;;
+	all0256n |\
 	hw550-3g |\
 	hw550-3g |\
 	nbg-419n |\
 	nbg-419n |\
 	omni-emb |\
 	omni-emb |\

+ 3 - 0
target/linux/ramips/base-files/lib/ramips.sh

@@ -47,6 +47,9 @@ ramips_board_name() {
 	machine=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo)
 	machine=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo)
 
 
 	case "$machine" in
 	case "$machine" in
+	*"Allnet ALL0256N")
+		name="all0256n"
+		;;
 	*"Argus ATP-52B")
 	*"Argus ATP-52B")
 		name="argus-atp52b"
 		name="argus-atp52b"
 		;;
 		;;

+ 1 - 0
target/linux/ramips/base-files/lib/upgrade/platform.sh

@@ -14,6 +14,7 @@ platform_check_image() {
 	[ "$ARGC" -gt 1 ] && return 1
 	[ "$ARGC" -gt 1 ] && return 1
 
 
 	case "$board" in
 	case "$board" in
+	all0256n | \
 	bc2 | \
 	bc2 | \
 	dir-300-b1 | \
 	dir-300-b1 | \
 	dir-600-b1 | \
 	dir-600-b1 | \