From f478ec2007b93b87fba606eae49688753281c85f Mon Sep 17 00:00:00 2001 From: Chris Blake Date: Wed, 16 Nov 2016 09:38:07 -0600 Subject: apm821xx: Add support for the Cisco Meraki MX60/MX60W This patch adds support for the Cisco Meraki MX60/MX60W Security Appliance. Flashing information can be found at https://github.com/riptidewave93/LEDE-MX60 Specs are as follows: AppliedMicro APM82181 SoC at 800MHz 1GiB NAND - Samsung K9K8G08U0D 512MB DDR RAM - 4x Nanya NT5TU128M8GE-AC Atheros AR8327-BL1A Gigabit Ethernet Switch 1x USB 2.0 Port More info can be found at https://wiki.openwrt.org/toh/meraki/mx60 Cc: Christian Lamparter Signed-off-by: Chris Blake --- target/linux/apm821xx/base-files/lib/apm821xx.sh | 4 ++++ .../apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx | 3 ++- target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh | 9 ++++++--- target/linux/apm821xx/base-files/lib/upgrade/platform.sh | 6 ++++-- 4 files changed, 16 insertions(+), 6 deletions(-) (limited to 'target/linux/apm821xx/base-files/lib') 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" ;; -- cgit v1.2.3