From patchwork Mon Mar 16 17:35:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 450700 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B7A40140119 for ; Tue, 17 Mar 2015 04:36:29 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 3FE8128C667; Mon, 16 Mar 2015 18:35:56 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id B794C280969 for ; Mon, 16 Mar 2015 18:35:50 +0100 (CET) X-policyd-weight: using cached result; rate: -7.6 Received: from chaos.universe-factory.net (chaos.universe-factory.net [37.72.148.22]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Mon, 16 Mar 2015 18:35:50 +0100 (CET) Received: from avalon.meute.ffhl (i59F44A74.versanet.de [89.244.74.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by chaos.universe-factory.net (Postfix) with ESMTPSA id 964A018971A for ; Mon, 16 Mar 2015 18:36:15 +0100 (CET) From: Matthias Schiffer To: openwrt-devel@lists.openwrt.org Date: Mon, 16 Mar 2015 18:35:55 +0100 Message-Id: X-Mailer: git-send-email 2.3.3 Subject: [OpenWrt-Devel] [PATCH] ar71xx: detect GL.iNet model X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" 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 --- target/linux/ar71xx/base-files/lib/ar71xx.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 3116305..db5e983 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -286,6 +286,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 @@ -413,6 +426,7 @@ ar71xx_board_detect() { ;; *"GL-CONNECT INET v1") name="gl-inet" + gl_inet_board_detect ;; *"EnGenius ESR1750") name="esr1750"