aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/apm821xx/base-files')
-rwxr-xr-xtarget/linux/apm821xx/base-files/etc/board.d/01_leds8
-rwxr-xr-xtarget/linux/apm821xx/base-files/etc/board.d/02_network3
-rwxr-xr-xtarget/linux/apm821xx/base-files/etc/diag.sh15
-rwxr-xr-xtarget/linux/apm821xx/base-files/lib/apm821xx.sh4
-rw-r--r--target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx3
-rwxr-xr-xtarget/linux/apm821xx/base-files/lib/upgrade/merakinand.sh9
-rwxr-xr-xtarget/linux/apm821xx/base-files/lib/upgrade/platform.sh6
7 files changed, 32 insertions, 16 deletions
diff --git a/target/linux/apm821xx/base-files/etc/board.d/01_leds b/target/linux/apm821xx/base-files/etc/board.d/01_leds
index 38cfbdcd7a..ad9bef9c09 100755
--- a/target/linux/apm821xx/base-files/etc/board.d/01_leds
+++ b/target/linux/apm821xx/base-files/etc/board.d/01_leds
@@ -16,6 +16,14 @@ mr24)
ucidef_set_led_wlan "wlan4" "WLAN4" "mr24:green:wifi4" "phy0tpt"
;;
+mx60)
+ ucidef_set_led_switch "wan" "WAN" "mx60:green:wan" "switch0" "0x20"
+ ucidef_set_led_switch "lan1" "LAN1" "mx60:green:lan1" "switch0" "0x10"
+ ucidef_set_led_switch "lan2" "LAN2" "mx60:green:lan2" "switch0" "0x08"
+ ucidef_set_led_switch "lan3" "LAN3" "mx60:green:lan3" "switch0" "0x04"
+ ucidef_set_led_switch "lan4" "LAN4" "mx60:green:lan4" "switch0" "0x02"
+ ;;
+
mbl)
ucidef_set_led_ide "sata" "SATA" "mbl:blue:power"
;;
diff --git a/target/linux/apm821xx/base-files/etc/board.d/02_network b/target/linux/apm821xx/base-files/etc/board.d/02_network
index 3a25709a2a..90a8c1a8d2 100755
--- a/target/linux/apm821xx/base-files/etc/board.d/02_network
+++ b/target/linux/apm821xx/base-files/etc/board.d/02_network
@@ -9,11 +9,12 @@ board_config_update
board=$(apm821xx_board_name)
case "$board" in
-mbl | \
+mbl|\
mr24)
ucidef_set_interface_lan "eth0"
;;
+mx60|\
wndr4700)
ucidef_add_switch "switch0" \
"0@eth0" "4:lan" "3:lan" "2:lan" "1:lan" "5:wan"
diff --git a/target/linux/apm821xx/base-files/etc/diag.sh b/target/linux/apm821xx/base-files/etc/diag.sh
index 3ddd21d844..3e480f1fe4 100755
--- a/target/linux/apm821xx/base-files/etc/diag.sh
+++ b/target/linux/apm821xx/base-files/etc/diag.sh
@@ -4,17 +4,14 @@
. /lib/apm821xx.sh
get_status_led() {
- case $(apm821xx_board_name) in
- mbl)
- status_led="mbl:green:power"
- ;;
-
- mr24)
- status_led="mr24:green:power"
- ;;
+ local board=$(apm821xx_board_name)
+ case $board in
+ mbl|\
+ mr24|\
+ mx60|\
wndr4700)
- status_led="wndr4700:green:power"
+ status_led="$board:green:power"
;;
*)
diff --git a/target/linux/apm821xx/base-files/lib/apm821xx.sh b/target/linux/apm821xx/base-files/lib/apm821xx.sh
index 78fe452184..98f6ee92ab 100755
--- a/target/linux/apm821xx/base-files/lib/apm821xx.sh
+++ b/target/linux/apm821xx/base-files/lib/apm821xx.sh
@@ -14,6 +14,10 @@ apm821xx_board_detect() {
name="mr24"
;;
+ *"Meraki MX60/MX60W Security Appliance")
+ name="mx60"
+ ;;
+
*"MyBook Live"*)
name="mbl"
;;
diff --git a/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx b/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx
index 5dc7175730..750af042e1 100644
--- a/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx
+++ b/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx
@@ -4,7 +4,8 @@
preinit_set_mac_address() {
case $(apm821xx_board_name) in
- mr24)
+ mr24|\
+ mx60)
mac_lan=$(mtd_get_mac_binary_ubi board-config 102)
[ -n "$mac_lan" ] && ifconfig eth0 hw ether "$mac_lan"
;;
diff --git a/target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh b/target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh
index 5861d97f12..f025082e76 100755
--- a/target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh
+++ b/target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh
@@ -15,7 +15,8 @@ merakinand_do_kernel_check() {
# What is our kernel magic string?
case "$board_name" in
- "mr24")
+ "mr24"|\
+ "mx60")
[ "$image_magic_word" == "8e73ed8a" ] && {
echo "pass" && return 0
}
@@ -33,7 +34,8 @@ merakinand_do_platform_check() {
local kernel_magic="$(merakinand_do_kernel_check $1 $2)"
case "$board_name" in
- "mr24")
+ "mr24"|\
+ "mx60")
[ "$control_length" = 0 -o "$file_type" != "squashfs" -o "$kernel_magic" != "pass" ] && {
echo "Invalid sysupgrade file for $board_name"
return 1
@@ -54,7 +56,8 @@ merakinand_do_upgrade() {
# Do we need to do any platform tweaks?
case "$board_name" in
- "mr24")
+ "mr24"|\
+ "mx60")
nand_do_upgrade $1
;;
*)
diff --git a/target/linux/apm821xx/base-files/lib/upgrade/platform.sh b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh
index 5559767a26..ca6aa8d4be 100755
--- a/target/linux/apm821xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh
@@ -16,7 +16,8 @@ platform_check_image() {
return $?;
;;
- mr24)
+ mr24|\
+ mx60)
merakinand_do_platform_check $board "$1"
return $?;
;;
@@ -38,7 +39,8 @@ platform_pre_upgrade() {
local board=$(apm821xx_board_name)
case "$board" in
- mr24)
+ mr24|\
+ mx60)
merakinand_do_upgrade "$1"
;;