aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-03-17 09:43:13 +0000
committerJohn Crispin <blogic@openwrt.org>2015-03-17 09:43:13 +0000
commitefedd48f33eb9c8068009c5cf883ba3c93e87b10 (patch)
tree759e0bd15e516aa940c4ea989bc9a39f35fbfd28 /target/linux
parent05ec2ad883cadbd9633c4acc24f89afb292964aa (diff)
downloadupstream-efedd48f33eb9c8068009c5cf883ba3c93e87b10.tar.gz
upstream-efedd48f33eb9c8068009c5cf883ba3c93e87b10.tar.bz2
upstream-efedd48f33eb9c8068009c5cf883ba3c93e87b10.zip
ar71xx: detect GL.iNet model
There are two versions of the GL.iNet, the 6408A and the 6416A. The only difference is the flash size. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44860 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 050d6ba29e..04fb716c42 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -274,6 +274,19 @@ tplink_pharos_board_detect() {
[ -n "$model" ] && AR71XX_MODEL="$model v$2"
}
+gl_inet_board_detect() {
+ local size="$(mtd_get_part_size 'firmware')"
+
+ case "$size" in
+ 8192000)
+ AR71XX_MODEL='GL-iNet 6408A v1'
+ ;;
+ 16580608)
+ AR71XX_MODEL='GL-iNet 6416A v1'
+ ;;
+ esac
+}
+
ar71xx_board_detect() {
local machine
local name
@@ -401,6 +414,7 @@ ar71xx_board_detect() {
;;
*"GL-CONNECT INET v1")
name="gl-inet"
+ gl_inet_board_detect
;;
*"EnGenius ESR1750")
name="esr1750"