Re: [OpenWrt-Devel] [PATCH 2/2] ar71xx: add support for TP-LINK TL-WR841N/ND v10

2015-10-26 Thread Alexander Couzens
After taking some time to think about this.

Wouldn't luci tell the user it's running on a 841 v9?
This could confuse them because a v9 sysupgrade wouldn't work.
sysupgrade fails then. Also an automatic upgrade based on system info
wouldn't work either.

As long we don't have dts support, I see here two solution. Add another
mips machine or change the board detection to detect this difference.

Best,
lynxis

On Mon, 26 Oct 2015 15:28:09 +0100
Alexander Couzens  wrote:

> On Mon, 26 Oct 2015 01:21:58 +0100
> Matthias Schiffer  wrote:
> 
> > Thanks, but I know what I'm doing. The hardware is similar enough to
> > boot with the exact same initialization routines as the v9, thus
> > reusing the BOARDNAME is fine (it is done like this for other
> > hardware as well - OpenWrt has a distinction between "board" and
> > "model", where multiple models can have the same board, but still
> > each model has its own images)
> > 
> > On TP-LINK devices, sysupgrade checks the TPLINK_HWID of the image
> > against the one in the flash, the BOARDNAME doesn't matter (except
> > to determine that it is a TP-LINK device).  
> 
> Sorry, no offensive. I forgot the tplink specific check within
> sysupgrade.



-- 
Alexander Couzens

mail: lyn...@fe80.eu
jabber: lyn...@fe80.eu
mobile: +4915123277221
gpg: 390D CF78 8BF9 AA50 4F8F  F1E2 C29E 9DA6 A0DF 8604


pgpnPCcVPhvn6.pgp
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] ar71xx: add support for TP-LINK TL-WR841N/ND v10

2015-10-26 Thread Matthias Schiffer
No, LuCI uses util.ubus("system", "board"), which doesn't even expose
the internal board_name, but only the model name, so it will only see
the v10.

Automatic upgrade systems should also rely on the model name only, not
the board name.

The board name is really only an internal identifier. Reusing a board
name when new hardware has been released which is compatible with
another model is very common, just take a look at
target/linux/ar71xx/image/Makefile. There's a total of 7 models using
"TL-WR741ND", 5 models using "TL-WR741ND-v4" and another 5 using
"TL-WA901ND" as their BOARDNAME value...

Matthias


On 10/27/2015 02:50 AM, Alexander Couzens wrote:
> After taking some time to think about this.
> 
> Wouldn't luci tell the user it's running on a 841 v9?
> This could confuse them because a v9 sysupgrade wouldn't work.
> sysupgrade fails then. Also an automatic upgrade based on system info
> wouldn't work either.
> 
> As long we don't have dts support, I see here two solution. Add another
> mips machine or change the board detection to detect this difference.
> 
> Best,
> lynxis
> 
> On Mon, 26 Oct 2015 15:28:09 +0100
> Alexander Couzens  wrote:
> 
>> On Mon, 26 Oct 2015 01:21:58 +0100
>> Matthias Schiffer  wrote:
>>
>>> Thanks, but I know what I'm doing. The hardware is similar enough to
>>> boot with the exact same initialization routines as the v9, thus
>>> reusing the BOARDNAME is fine (it is done like this for other
>>> hardware as well - OpenWrt has a distinction between "board" and
>>> "model", where multiple models can have the same board, but still
>>> each model has its own images)
>>>
>>> On TP-LINK devices, sysupgrade checks the TPLINK_HWID of the image
>>> against the one in the flash, the BOARDNAME doesn't matter (except
>>> to determine that it is a TP-LINK device).  
>>
>> Sorry, no offensive. I forgot the tplink specific check within
>> sysupgrade.
> 
> 
> 




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] ar71xx: add support for TP-LINK TL-WR841N/ND v10

2015-10-26 Thread Alexander Couzens
On Mon, 26 Oct 2015 01:21:58 +0100
Matthias Schiffer  wrote:

> Thanks, but I know what I'm doing. The hardware is similar enough to
> boot with the exact same initialization routines as the v9, thus
> reusing the BOARDNAME is fine (it is done like this for other
> hardware as well - OpenWrt has a distinction between "board" and
> "model", where multiple models can have the same board, but still
> each model has its own images)
> 
> On TP-LINK devices, sysupgrade checks the TPLINK_HWID of the image
> against the one in the flash, the BOARDNAME doesn't matter (except to
> determine that it is a TP-LINK device).

Sorry, no offensive. I forgot the tplink specific check within
sysupgrade.


pgpWoicOvHEwn.pgp
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] ar71xx: add support for TP-LINK TL-WR841N/ND v10

2015-10-25 Thread Alexander Couzens
Hi Matthias,

as long you can not flash the exact same image as v9,
you have to create a mips machine, but you can use the same setup
function as v9.

Many parts of openwrt use the mips machine to detect the board, like
sysupgrade.

Add your machine id to
target/linux/ar71xx/patches-4.1/700-MIPS-ath79-openwrt-machines.patch
and use the MIPS_MACHINE macro in 
target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c

Best
lynxis

PS. Nice catch on the revision/version fix for ar9533. The problem why
v9 didn't work in the first time was quite similiar.

On Thu, 22 Oct 2015 14:01:40 +0200
Matthias Schiffer  wrote:

> The TL-WR841N/ND v10 is mostly identical to the v9. Apart from some
> minor changes, it contains a newer revision of the QCA9533 SoC and
> the CPU clock is significantly higher.
> 
> Signed-off-by: Matthias Schiffer 
> ---
>  target/linux/ar71xx/image/Makefile | 9 -
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/target/linux/ar71xx/image/Makefile
> b/target/linux/ar71xx/image/Makefile index 7759a0d..a659af9 100644
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -704,6 +704,13 @@ define Device/tl-wr841n-v9
>  TPLINK_HWID := 0x08410009
>  endef
>  
> +define Device/tl-wr841n-v10
> +$(Device/tplink-4mlzma)
> +BOARDNAME := TL-WR841N-v9
> +DEVICE_PROFILE := TLWR841
> +TPLINK_HWID := 0x08410010
> +endef
> +
-- 
Alexander Couzens

mail: lyn...@fe80.eu
jabber: lyn...@fe80.eu
mobile: +4915123277221
gpg: 390D CF78 8BF9 AA50 4F8F  F1E2 C29E 9DA6 A0DF 8604


pgpgHUvyqxe1a.pgp
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] ar71xx: add support for TP-LINK TL-WR841N/ND v10

2015-10-25 Thread Matthias Schiffer
Thanks, but I know what I'm doing. The hardware is similar enough to
boot with the exact same initialization routines as the v9, thus reusing
the BOARDNAME is fine (it is done like this for other hardware as well -
OpenWrt has a distinction between "board" and "model", where multiple
models can have the same board, but still each model has its own images)

On TP-LINK devices, sysupgrade checks the TPLINK_HWID of the image
against the one in the flash, the BOARDNAME doesn't matter (except to
determine that it is a TP-LINK device).

Matthias


On 10/25/2015 11:47 PM, Alexander Couzens wrote:
> Hi Matthias,
> 
> as long you can not flash the exact same image as v9,
> you have to create a mips machine, but you can use the same setup
> function as v9.
> 
> Many parts of openwrt use the mips machine to detect the board, like
> sysupgrade.
> 
> Add your machine id to
> target/linux/ar71xx/patches-4.1/700-MIPS-ath79-openwrt-machines.patch
> and use the MIPS_MACHINE macro in 
> target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
> 
> Best
> lynxis
> 
> PS. Nice catch on the revision/version fix for ar9533. The problem why
> v9 didn't work in the first time was quite similiar.
> 
> On Thu, 22 Oct 2015 14:01:40 +0200
> Matthias Schiffer  wrote:
> 
>> The TL-WR841N/ND v10 is mostly identical to the v9. Apart from some
>> minor changes, it contains a newer revision of the QCA9533 SoC and
>> the CPU clock is significantly higher.
>>
>> Signed-off-by: Matthias Schiffer 
>> ---
>>  target/linux/ar71xx/image/Makefile | 9 -
>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/target/linux/ar71xx/image/Makefile
>> b/target/linux/ar71xx/image/Makefile index 7759a0d..a659af9 100644
>> --- a/target/linux/ar71xx/image/Makefile
>> +++ b/target/linux/ar71xx/image/Makefile
>> @@ -704,6 +704,13 @@ define Device/tl-wr841n-v9
>>  TPLINK_HWID := 0x08410009
>>  endef
>>  
>> +define Device/tl-wr841n-v10
>> +$(Device/tplink-4mlzma)
>> +BOARDNAME := TL-WR841N-v9
>> +DEVICE_PROFILE := TLWR841
>> +TPLINK_HWID := 0x08410010
>> +endef
>> +




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] ar71xx: add support for TP-LINK TL-WR841N/ND v10

2015-10-22 Thread Matthias Schiffer
The TL-WR841N/ND v10 is mostly identical to the v9. Apart from some minor
changes, it contains a newer revision of the QCA9533 SoC and the CPU clock
is significantly higher.

Signed-off-by: Matthias Schiffer 
---
 target/linux/ar71xx/image/Makefile | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 7759a0d..a659af9 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -704,6 +704,13 @@ define Device/tl-wr841n-v9
 TPLINK_HWID := 0x08410009
 endef
 
+define Device/tl-wr841n-v10
+$(Device/tplink-4mlzma)
+BOARDNAME := TL-WR841N-v9
+DEVICE_PROFILE := TLWR841
+TPLINK_HWID := 0x08410010
+endef
+
 define Device/tl-wr842n-v1
 $(Device/tplink-8m)
 BOARDNAME := TL-MR3420
@@ -731,7 +738,7 @@ define Device/tl-wr847n-v8
 DEVICE_PROFILE := TLWR841
 TPLINK_HWID := 0x08470008
 endef
-TARGET_DEVICES += tl-wr841nd-v3 tl-wr841nd-v5 tl-wr841nd-v7 tl-wr841n-v8 
tl-wr841n-v9 tl-wr842n-v1 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8
+TARGET_DEVICES += tl-wr841nd-v3 tl-wr841nd-v5 tl-wr841nd-v7 tl-wr841n-v8 
tl-wr841n-v9 tl-wr841n-v10 tl-wr842n-v1 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8
 
 define Device/tl-wr941nd-v2
 $(Device/tplink-4m)
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel