openwrtv4/target/linux/apm821xx/base-files/lib/apm821xx.sh
Chris Blake a57d6e2d47 apm821xx: add support for the Cisco Meraki MR24
This patch adds support for the Cisco Meraki MR24 Access point
to the apm821xx target.

Board:		MR24 - Meraki MR24 Cloud Managed Access Point
CPU:		APM82181 SoC 800 MHz (PLB=200 OPB=100 EBC=100)
Flash size:	32MiB
RAM Size:	128MiB
Wireless:	Atheros AR9380 5.0GHz + Atheros AR9380 2.4GHz
Ethernet ports:	1x Gigabit Atheros AR8035

WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!

For flashing instructions, visit:
<https://github.com/riptidewave93/Openwrt-MR24/blob/master/README.md#flashing>

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2016-07-22 09:48:12 +02:00

40 lines
743 B
Bash
Executable file

#!/bin/sh
APM821XX_BOARD_NAME=
APM821XX_MODEL=
apm821xx_board_detect() {
local model
local name
model=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /model/ {print $2}' /proc/cpuinfo)
case "$model" in
*"Meraki MR24 Access Point")
name="mr24"
;;
*)
name="unknown"
;;
esac
[ -z "$name" ] && name="unknown"
[ -z "$APM821XX_BOARD_NAME" ] && APM821XX_BOARD_NAME="$name"
[ -z "$APM821XX_MODEL" ] && APM821XX_MODEL="$model"
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
echo "$APM821XX_BOARD_NAME" > /tmp/sysinfo/board_name
echo "$APM821XX_MODEL" > /tmp/sysinfo/model
}
apm821xx_board_name() {
local name
[ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
[ -z "$name" ] && name="unknown"
echo "$name"
}