diff mbox

[OpenWrt-Devel] ar71xx: detect GL.iNet model

Message ID e7e0e6a1720b86dd97edf275848473d893598061.1426527355.git.mschiffer@universe-factory.net
State Accepted
Headers show

Commit Message

Matthias Schiffer March 16, 2015, 5:35 p.m. UTC
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>
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Cezary Jackiewicz March 16, 2015, 6:50 p.m. UTC | #1
Dnia 2015-03-16, o godz. 18:35:55
Matthias Schiffer <mschiffer@universe-factory.net> napisał(a):

> 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>
> ---
>  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

Hi, 
GL-iNet 64xxA v1? Why not just GL-iNet 64xxA according to 
http://www.gl-inet.com/w/?page_id=308 ?
Matthias Schiffer March 16, 2015, 7:03 p.m. UTC | #2
On 03/16/2015 07:50 PM, Cezary Jackiewicz wrote:
> Dnia 2015-03-16, o godz. 18:35:55
> Matthias Schiffer <mschiffer@universe-factory.net> napisał(a):
> 
>> 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>
>> ---
>>  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
> 
> Hi, 
> GL-iNet 64xxA v1? Why not just GL-iNet 64xxA according to 
> http://www.gl-inet.com/w/?page_id=308 ?
> 

Yes, that would also be a possibility. I've kept the v1 from the current
string "GL-CONNECT INET v1" (which is read from /proc/cpuinfo).

Regards,
Matthias
Mark Janssen March 17, 2015, 10:16 p.m. UTC | #3
I've spoken with the manufacturer of the GL-Inet's .... there have only
been a very small amount of 6408's made, and they currently only make the
6416.

(I'm the importer for .nl / .be www.gl-inet.nl )

On Mon, Mar 16, 2015 at 8:03 PM, Matthias Schiffer <
mschiffer@universe-factory.net> wrote:

> On 03/16/2015 07:50 PM, Cezary Jackiewicz wrote:
> > Dnia 2015-03-16, o godz. 18:35:55
> > Matthias Schiffer <mschiffer@universe-factory.net> napisał(a):
> >
> >> 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>
> >> ---
> >>  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
> >
> > Hi,
> > GL-iNet 64xxA v1? Why not just GL-iNet 64xxA according to
> > http://www.gl-inet.com/w/?page_id=308 ?
> >
>
> Yes, that would also be a possibility. I've kept the v1 from the current
> string "GL-CONNECT INET v1" (which is read from /proc/cpuinfo).
>
> Regards,
> Matthias
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
diff mbox

Patch

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"