Re: [OpenWrt-Devel] [PATCH] explicitely ignore return value of symlink(3) call

2015-10-28 Thread Felix Fietkau
On 2015-10-22 23:15, Daniel Golle wrote:
> glibc sets __attribute_warn_unused_result__ on symlink(3) if
> FORTIFY_SOURCE is set. This breaks procd which deliberately ignores
> the result of the symlink(3) call early during init as there wouldn't
> be anything better to do in that case other than ignoring the error and
> trying to survive.
> 
> Introduce libc-compat.h to work-around libc anomalities.
> 
> Signed-off-by: Daniel Golle 
> --- /dev/null
> +++ b/libc-compat.h
> @@ -0,0 +1,10 @@
> +#ifndef __PROCD_LIBC_COMPAT_H
> +#define __PROCD_LIBC_COMPAT_H
> +
> +#if defined(__GLIBC__) && !defined(__UCLIBC__)
> +static inline int ignore(int x) {return x;}
> +#else
> +#define ignore(x) x
> +#endif
This libc detection hackery looks completely useless to me.
Why did you add it?

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/5] malta: convert to router type target.

2015-10-28 Thread Yousong Zhou
There is currently no relevant definition for developerboard device type
in include/target.mk, thus packages like iptables, firewall, dnsmasq
etc. are missing in the default images, rendering it almost useless
for regular testing or normal use.

Signed-off-by: Yousong Zhou 
---
 target/linux/malta/Makefile |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile
index c9f1586..0cce15e 100644
--- a/target/linux/malta/Makefile
+++ b/target/linux/malta/Makefile
@@ -15,7 +15,7 @@ MAINTAINER:=Florian Fainelli 
 
 KERNEL_PATCHVER:=3.18
 
-DEVICE_TYPE:=developerboard
+DEVICE_TYPE:=router
 
 include $(INCLUDE_DIR)/target.mk
 
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/5] malta: set CPU_TYPE:=24kc.

2015-10-28 Thread Yousong Zhou
There are instructions (e.g. wsbh) only available in MIPS32R2 which is
the isa level used by many MIPS targets in OpenWrt.  As we use the malta
target mostly for development and testing purposes, setting the CPU_TYPE
to 24Kc will make the emulation more real.

The following is output from qemu-system-mipsel 2.3.0

root@OpenWrt:/# cat /proc/cpuinfo  | grep 'cpu model\|isa'
cpu model   : MIPS 24Kc V0.0  FPU V0.0
isa : mips1 mips2 mips32r1 mips32r2

Signed-off-by: Yousong Zhou 
---
 target/linux/malta/Makefile |1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile
index 06cb68a..c9f1586 100644
--- a/target/linux/malta/Makefile
+++ b/target/linux/malta/Makefile
@@ -8,6 +8,7 @@ include $(TOPDIR)/rules.mk
 
 BOARD:=malta
 BOARDNAME:=MIPS Malta CoreLV board (qemu)
+CPU_TYPE:=24kc
 SUBTARGETS:=le be #le64 be64
 INITRAMFS_EXTRA_FILES:=
 MAINTAINER:=Florian Fainelli 
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/5] target.mk: add optimization flags for MIPS 24Kc.

2015-10-28 Thread Yousong Zhou
Signed-off-by: Yousong Zhou 
---
 include/target.mk |1 +
 1 file changed, 1 insertion(+)

diff --git a/include/target.mk b/include/target.mk
index 3e7f17d..119f88c 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -212,6 +212,7 @@ ifeq ($(DUMP),1)
 CPU_CFLAGS_mips32 = -mips32 -mtune=mips32
 CPU_CFLAGS_mips32r2 = -mips32r2 -mtune=mips32r2
 CPU_CFLAGS_mips64 = -mips64 -mtune=mips64 -mabi=64
+CPU_CFLAGS_24kc = -mips32r2 -mtune=24kc
 CPU_CFLAGS_24kec = -mips32r2 -mtune=24kec
 CPU_CFLAGS_34kc = -mips32r2 -mtune=34kc
 CPU_CFLAGS_74kc = -mips32r2 -mtune=74kc
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/5] malta: changes for better testing environment

2015-10-28 Thread Yousong Zhou
The series is a refreshed version of a previous mixed one in September [1].

With many kind advices from linux-mips, the kernel patch was merged in upstream
since release 4.3-rc5.  It was run-tested with 3.18 kernel and only
compile-tested with 4.0 and 4.1.

[1] 
https://lists.openwrt.org/pipermail/openwrt-devel/2015-September/thread.html#35515

Yousong Zhou (5):
  generic: fix unrecognized opcode wsbh when building for MIPS16.
  target.mk: add optimization flags for MIPS 24Kc.
  malta: set CPU_TYPE:=24kc.
  malta: convert to router type target.
  malta: use "static" proto for lan interface

 include/target.mk  |1 +
 ...gnore-__arch_swab-16-32-64-when-using-MIP.patch |   58 
 ...gnore-__arch_swab-16-32-64-when-using-MIP.patch |   58 
 ...gnore-__arch_swab-16-32-64-when-using-MIP.patch |   58 
 target/linux/malta/Makefile|3 +-
 .../malta/base-files/etc/uci-defaults/02-network   |5 +-
 6 files changed, 181 insertions(+), 2 deletions(-)
 create mode 100644 
target/linux/generic/patches-3.18/133-MIPS-UAPI-Ignore-__arch_swab-16-32-64-when-using-MIP.patch
 create mode 100644 
target/linux/generic/patches-4.0/133-MIPS-UAPI-Ignore-__arch_swab-16-32-64-when-using-MIP.patch
 create mode 100644 
target/linux/generic/patches-4.1/133-MIPS-UAPI-Ignore-__arch_swab-16-32-64-when-using-MIP.patch

-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/5] target.mk: add optimization flags for MIPS 24Kc.

2015-10-28 Thread Cristian Morales Vega
On 28 October 2015 at 12:55, Yousong Zhou  wrote:
> --- a/include/target.mk
> +++ b/include/target.mk
> @@ -212,6 +212,7 @@ ifeq ($(DUMP),1)
>  CPU_CFLAGS_mips32 = -mips32 -mtune=mips32
>  CPU_CFLAGS_mips32r2 = -mips32r2 -mtune=mips32r2
>  CPU_CFLAGS_mips64 = -mips64 -mtune=mips64 -mabi=64
> +CPU_CFLAGS_24kc = -mips32r2 -mtune=24kc
>  CPU_CFLAGS_24kec = -mips32r2 -mtune=24kec
>  CPU_CFLAGS_34kc = -mips32r2 -mtune=34kc
>  CPU_CFLAGS_74kc = -mips32r2 -mtune=74kc

Nothing against the patch itself. But was wondering, since the builds
are so device specific, what's the point of building for a generic
mips32(r2)?

Isn't just

CPU_CFLAGS_74kc = -march=74kc
(which the gcc manual says implies -mtune=74kc)

going to generate faster code than

CPU_CFLAGS_74kc = -mips32r2 -mtune=74kc

without any drawback?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] AR9344 Openwrt - LAN and WAN interface link issue

2015-10-28 Thread Afkar Rafique
Hi Jow,

Thank you so much for the reply. Below is my /etc/config/network file

config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config interface 'lan'
option ifname 'eth0.1 eth1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'

config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'

config switch
option name 'eth0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'eth0'
option vlan '1'
option ports '0t 2 3 4 5'

config switch_vlan
option device 'eth0'
option vlan '2'
option ports '0t 1'

config switch
option name 'eth1'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'eth1'
option vlan '1'
option ports '0 1 2 3 4 5'

Could you please tell how i can use command to check WAN and LAN link
separately using switch command.

Regards,


On Wed, Oct 28, 2015 at 6:51 PM, Jo-Philipp Wich  wrote:

> Hi Afkar,
>
> > The same thing if we connect only WAN cable and check "cat
> > /sys/class/net/eth0.1/carrier" and "cat /sys/class/net/eth0.2/carrier"
> > both returns "1" . But it should not be like this.
>
> This is expected since both eth0.1 and eth0.2 are actually SoC
> connection to the external switch ICs CPU port, those PCB traces are
> always connected.
>
> In order to get the link state for single ports on the external switch,
> use the swconfig command.
>
> ~ Jow
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] AR9344 Openwrt - LAN and WAN interface link issue

2015-10-28 Thread Jo-Philipp Wich
Hi Afkar,

WAN:

swconfig dev switch0 port 1 get link

LAN:

swconfig dev switch0 port 1 get link
swconfig dev switch0 port 2 get link
swconfig dev switch0 port 3 get link
swconfig dev switch0 port 4 get link


~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: Add support for wdr7500v3

2015-10-28 Thread Srdjan Rosic
Fixed the commit message to make it more descriptive.
Sorry for the noise.

Srdjan Rosic (1):
  ar71xx: Add support for wdr7500v3

 target/linux/ar71xx/image/Makefile | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

-- 
2.6.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add initial support for wdr7500v3

2015-10-28 Thread Srdjan Rosic
Fixed the commit messages and resent.
Please ignore this thread, and look for one prefixed with ar71xx
Srdjan Rosic


On Tue, Oct 27, 2015 at 10:12 PM, Srdjan Rosic  wrote:
> Ooops, it's my first patch to openwrt and I didn't know :(
> I'm fine with resending, but I'd prefer if there are other changes I
> should make to make them in one batch to not spam the list with new
> threads.
>
> Thank you,
> -s
>
> On Tue, Oct 27, 2015 at 10:06 PM, Rafał Miłecki  wrote:
>> On 27 October 2015 at 22:43, Srdjan Rosic  wrote:
>>> Signed-off-by: Srdjan Rosic 
>>
>> Please use a correct prefix for your patches, you can get an idea by
>> looking at the log, e.g.:
>> git log --one-line target/linux/ar71xx/
>>
>> This should be something like:
>> ar71xx: Add initial support for wdr7500v3
>>
>> Not sure if maintainer will want you to resend or will fix it on his own.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] backport 46936 (procd: rework makefile, split ujail/seccomp)

2015-10-28 Thread John Crispin
if you send a patch it would be faster :) i just got into the office and
will be here all day so i can merge it promptly.

John

On 28/10/2015 00:10, Etienne Champetier wrote:
> Hi John,
> 
> since 47268, we need -DUTRACE_SUPPORT=1 to compile utrace
> https://dev.openwrt.org/changeset/47268/
> http://nbd.name/gitweb.cgi?p=luci2/procd.git;a=summary
> 
> can you (or anyone else) backport r46936 or should i resend?
> https://dev.openwrt.org/changeset/46936/trunk/package/system/procd
> 
> Thanks in advance
> Etienne
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: Add support for wdr7500v3

2015-10-28 Thread Srdjan Rosic
The device is similar to Archer C7 v2, but with 8M of flash, and 6 external
antennas.  Reason for breaking the naming pattern is that sticker on the back
mentions "WDR7500" and has no mention of "Archer".

Signed-off-by: Srdjan Rosic 
---
 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 a659af9..8f7aae0 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -369,7 +369,14 @@ define Device/archer-c7-v2
 DEVICE_PROFILE := ARCHERC7
 TPLINK_HWID := 0xc702
 endef
-TARGET_DEVICES += archer-c5-v1 archer-c7-v1 archer-c7-v2
+
+define Device/tl-wdr7500-v3
+$(Device/tplink-8mlzma)
+BOARDNAME := ARCHER-C7
+DEVICE_PROFILE := ARCHERC7
+TPLINK_HWID := 0x7503
+endef
+TARGET_DEVICES += archer-c5-v1 archer-c7-v1 archer-c7-v2 tl-wdr7500-v3
 
 define Device/antminer-s1
 $(Device/tplink-8mlzma)
-- 
2.6.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 5/5] malta: use "static" proto for lan interface

2015-10-28 Thread Florian Fainelli
On Oct 28, 2015 5:56 AM, "Yousong Zhou"  wrote:
>
> This is almost the default config of OpenWrt targets (currently even
> those sunxi boards with only one ethernet interface use static IP
> address for its lan interface).

And this is intend intended, because Malta is primarily used under qemu,
from which you get your network to be NAT'd or bridged from/with the host.
Your change would force an user to reconfigure the network on boot, and
that seems like a less sensible default to me.

>
> While at it, also configure a wan interface if eth1 exists.
>
> Signed-off-by: Yousong Zhou 
> ---
>  target/linux/malta/base-files/etc/uci-defaults/02-network |5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/target/linux/malta/base-files/etc/uci-defaults/02-network
b/target/linux/malta/base-files/etc/uci-defaults/02-network
> index e90ecbe..1b22ec5 100644
> --- a/target/linux/malta/base-files/etc/uci-defaults/02-network
> +++ b/target/linux/malta/base-files/etc/uci-defaults/02-network
> @@ -3,4 +3,7 @@
>  . /lib/functions/uci-defaults.sh
>
>  ucidef_set_interface_loopback
> -ucidef_set_interface_raw "lan" "eth0" "dhcp"
> +ucidef_set_interface_lan "eth0"
> +if [ -d "/sys/class/net/eth1" ]; then
> +   ucidef_set_interface_wan "eth1"
> +fi
> --
> 1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/5] malta: convert to router type target.

2015-10-28 Thread Florian Fainelli
On Oct 28, 2015 5:56 AM, "Yousong Zhou"  wrote:
>
> There is currently no relevant definition for developerboard device type
> in include/target.mk, thus packages like iptables, firewall, dnsmasq
> etc. are missing in the default images, rendering it almost useless
> for regular testing or normal use.

This is by design as well here, Malta being used mostly for kernel,
toolchain and user space development, but not being an ideal router
platform.

AFAIR, the default device type is already router, so you could just
eliminate that.

>
> Signed-off-by: Yousong Zhou 
> ---
>  target/linux/malta/Makefile |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile
> index c9f1586..0cce15e 100644
> --- a/target/linux/malta/Makefile
> +++ b/target/linux/malta/Makefile
> @@ -15,7 +15,7 @@ MAINTAINER:=Florian Fainelli 
>
>  KERNEL_PATCHVER:=3.18
>
> -DEVICE_TYPE:=developerboard
> +DEVICE_TYPE:=router
>
>  include $(INCLUDE_DIR)/target.mk
>
> --
> 1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips: add support for the Asus RP-N53 in the "02_network" boot script

2015-10-28 Thread Alberto Mattea
This patch adds a case for the Asus RP-N53 in the "02_network" boot script. 
Without this, the lan interface does not get configured on startup, effectively 
bricking the device.

Signed-off-by:  Alberto Mattea 
---
diff -uN a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network

--- a/target/linux/ramips/base-files/etc/board.d/02_network 2015-10-28 
18:45:05.993476654 +0100
+++ b/target/linux/ramips/base-files/etc/board.d/02_network 2015-10-28 
18:47:02.505480181 +0100
@@ -127,6 +127,11 @@
ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
ucidef_add_switch_vlan "switch0" "2" "0 6t"
;;
+   rp-n53)
+   ucidef_set_interface_lan "eth0.1"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
+   ;;
awapn2403)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Fwd: [OpenWrt-Commits] r47262 - trunk/target/linux/ar71xx/patches-4.1

2015-10-28 Thread Daniel Petre
Uhm, is there any chance for the wr841n v10 full support by Mr. Matthias 
Schiffer to be back ported to Chaos Calmer? After all it is not a "new device" 
but a subversion of an existing supported equipment..
Thanks!


 Forwarded Message 
Subject: [OpenWrt-Commits] r47262 - trunk/target/linux/ar71xx/patches-4.1
Date: Mon, 26 Oct 2015 10:01:34 +0100
From: openwrt-comm...@openwrt.org
Reply-To: OpenWrt SVN Commits 
To: openwrt-comm...@lists.openwrt.org

Author: blogic
Date: 2015-10-26 10:01:34 +0100 (Mon, 26 Oct 2015)
New Revision: 47262

Modified:
   
trunk/target/linux/ar71xx/patches-4.1/620-MIPS-ath79-add-support-for-QCA953x-SoC.patch
   
trunk/target/linux/ar71xx/patches-4.1/621-MIPS-ath79-add-support-for-QCA956x-SoC.patch
Log:
ar71xx: fix ath79_soc_rev value for QCA9531 ver. 2

ath9k expects to get revision id 2 for the QCA9531 ver. 2 rev. 0. This
fixes the very low TX power on some devices like the TP-LINK
TL-WR841ND v10.

As ath79_soc_rev is only used to get the revision number to ath9k on the
QCA9533, just set it to the expected value on the ver. 2.

Signed-off-by: Matthias Schiffer 
Tested-by: Felix Kaechele 

Modified: 
trunk/target/linux/ar71xx/patches-4.1/620-MIPS-ath79-add-support-for-QCA953x-SoC.patch
===
--- 
trunk/target/linux/ar71xx/patches-4.1/620-MIPS-ath79-add-support-for-QCA953x-SoC.patch
  2015-10-26 09:01:28 UTC (rev 47261)
+++ 
trunk/target/linux/ar71xx/patches-4.1/620-MIPS-ath79-add-support-for-QCA953x-SoC.patch
  2015-10-26 09:01:34 UTC (rev 47262)
@@ -413,12 +413,13 @@
  
id = ath79_reset_rr(AR71XX_RESET_REG_REV_ID);
major = id & REV_ID_MAJOR_MASK;
-@@ -152,6 +153,16 @@ static void __init ath79_detect_sys_type
+@@ -152,6 +153,17 @@ static void __init ath79_detect_sys_type
rev = id & AR934X_REV_ID_REVISION_MASK;
break;
  
 +  case REV_ID_MAJOR_QCA9533_V2:
 +  ver = 2;
++  ath79_soc_rev = 2;
 +  /* drop through */
 +
 +  case REV_ID_MAJOR_QCA9533:
@@ -430,15 +431,23 @@
case REV_ID_MAJOR_QCA9556:
ath79_soc = ATH79_SOC_QCA9556;
chip = "9556";
-@@ -170,7 +181,7 @@ static void __init ath79_detect_sys_type
+@@ -168,11 +180,12 @@ static void __init ath79_detect_sys_type
+   panic("ath79: unknown SoC, id:0x%08x", id);
+   }
  
-   ath79_soc_rev = rev;
+-  ath79_soc_rev = rev;
++  if (ver == 1)
++  ath79_soc_rev = rev;
  
 -  if (soc_is_qca955x())
+-  sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u",
+-  chip, rev);
 +  if (soc_is_qca953x() || soc_is_qca955x())
-   sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u",
-   chip, rev);
++  sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u",
++  chip, ver, rev);
else
+   sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev);
+   pr_info("SoC: %s\n", ath79_sys_type);
 --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
 +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
 @@ -105,6 +105,21 @@

Modified: 
trunk/target/linux/ar71xx/patches-4.1/621-MIPS-ath79-add-support-for-QCA956x-SoC.patch
===
--- 
trunk/target/linux/ar71xx/patches-4.1/621-MIPS-ath79-add-support-for-QCA956x-SoC.patch
  2015-10-26 09:01:28 UTC (rev 47261)
+++ 
trunk/target/linux/ar71xx/patches-4.1/621-MIPS-ath79-add-support-for-QCA956x-SoC.patch
  2015-10-26 09:01:34 UTC (rev 47262)
@@ -452,7 +452,7 @@
return -ENODEV;
 --- a/arch/mips/ath79/setup.c
 +++ b/arch/mips/ath79/setup.c
-@@ -175,14 +175,29 @@ static void __init ath79_detect_sys_type
+@@ -176,6 +176,18 @@ static void __init ath79_detect_sys_type
rev = id & QCA955X_REV_ID_REVISION_MASK;
break;
  
@@ -471,19 +471,20 @@
default:
panic("ath79: unknown SoC, id:0x%08x", id);
}
+@@ -183,9 +195,12 @@ static void __init ath79_detect_sys_type
+   if (ver == 1)
+   ath79_soc_rev = rev;
  
-   ath79_soc_rev = rev;
- 
 -  if (soc_is_qca953x() || soc_is_qca955x())
--  sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s rev %u",
 +  if (soc_is_qca953x() || soc_is_qca955x() || soc_is_qca9561())
-+  sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u",
-+  chip, ver, rev);
+   sprintf(ath79_sys_type, "Qualcomm Atheros QCA%s ver %u rev %u",
+   chip, ver, rev);
 +  else if (soc_is_tp9343())
 +  sprintf(ath79_sys_type, "Qualcomm Atheros TP%s rev %u",
-   chip, rev);
++  chip, rev);
else
sprintf(ath79_sys_type, 

Re: [OpenWrt-Devel] [PATCH] ramips: add support for the Asus RP-N53 in the "02_network" boot script

2015-10-28 Thread Piotr Dymacz
Hello Alberto,

Two comments:
1. Your patch breaks alphabetical order.
2. If you look more deeply into the file, you will easily find there
other boards with exactly the same configuration: asl26555 and re6500.
Please, don't add unnecessary code and use what's already there.

Cheers,
Piotr

2015-10-28 19:07 GMT+01:00 Alberto Mattea :
> This patch adds a case for the Asus RP-N53 in the "02_network" boot script. 
> Without this, the lan interface does not get configured on startup, 
> effectively bricking the device.
>
> Signed-off-by:  Alberto Mattea 
> ---
> diff -uN a/target/linux/ramips/base-files/etc/board.d/02_network 
> b/target/linux/ramips/base-files/etc/board.d/02_network
>
> --- a/target/linux/ramips/base-files/etc/board.d/02_network 2015-10-28 
> 18:45:05.993476654 +0100
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network 2015-10-28 
> 18:47:02.505480181 +0100
> @@ -127,6 +127,11 @@
> ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
> ucidef_add_switch_vlan "switch0" "2" "0 6t"
> ;;
> +   rp-n53)
> +   ucidef_set_interface_lan "eth0.1"
> +   ucidef_add_switch "switch0" "1" "1"
> +   ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
> +   ;;
> awapn2403)
> ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
> ucidef_add_switch "switch0" "1" "1"
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ramips: add support for the Asus RP-N53 in the "02_network" boot script

2015-10-28 Thread Alberto Mattea
Hey,

thanks for the quick review. To be honest I hadn't noticed they were in 
alphabetical order :) I'll fix and resubmit

Cheers
Alberto

In data mer 28 ottobre 2015 19:46:50, Piotr Dymacz ha scritto:
> Hello Alberto,
> 
> Two comments:
> 1. Your patch breaks alphabetical order.
> 2. If you look more deeply into the file, you will easily find there
> other boards with exactly the same configuration: asl26555 and re6500.
> Please, don't add unnecessary code and use what's already there.
> 
> Cheers,
> Piotr
> 
> 2015-10-28 19:07 GMT+01:00 Alberto Mattea :
> > This patch adds a case for the Asus RP-N53 in the "02_network" boot
> > script. Without this, the lan interface does not get configured on
> > startup, effectively bricking the device.
> > 
> > Signed-off-by:  Alberto Mattea 
> > ---
> > diff -uN a/target/linux/ramips/base-files/etc/board.d/02_network
> > b/target/linux/ramips/base-files/etc/board.d/02_network
> > 
> > --- a/target/linux/ramips/base-files/etc/board.d/02_network 2015-10-28
> > 18:45:05.993476654 +0100 +++
> > b/target/linux/ramips/base-files/etc/board.d/02_network 2015-10-28
> > 18:47:02.505480181 +0100 @@ -127,6 +127,11 @@
> > 
> > ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
> > ucidef_add_switch_vlan "switch0" "2" "0 6t"
> > ;;
> > 
> > +   rp-n53)
> > +   ucidef_set_interface_lan "eth0.1"
> > +   ucidef_add_switch "switch0" "1" "1"
> > +   ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
> > +   ;;
> > 
> > awapn2403)
> > 
> > ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
> > ucidef_add_switch "switch0" "1" "1"
> > 
> > ___
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] ramips: add support for the Asus RP-N53 in the "02_network" boot script

2015-10-28 Thread Alberto Mattea
This patch adds a case for the Asus RP-N53 in the "02_network" boot script. 
Without this, the lan interface does not get configured on startup, effectively 
bricking the device.

Signed-off-by:  Alberto Mattea 
---
diff -uN a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network

--- a/target/linux/ramips/base-files/etc/board.d/02_network 2015-10-28 
18:45:05.993476654 +0100
+++ b/target/linux/ramips/base-files/etc/board.d/02_network 2015-10-28 
19:50:22.261595206 +0100
@@ -104,7 +104,8 @@
ucidef_add_switch_vlan "switch0" "2" "4 5t"
;;
asl26555|\
-   re6500)
+   re6500|\
+   rp-n53)
ucidef_set_interface_lan "eth0.1"
ucidef_add_switch "switch0" "1" "1"
ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ramips: add support for the Asus RP-N53 in the "02_network" boot script

2015-10-28 Thread Piotr Dymacz
Hey,

Thanks for fast fix!

Cheers,
Piotr

2015-10-28 19:56 GMT+01:00 Alberto Mattea :
> Hey,
>
> thanks for the quick review. To be honest I hadn't noticed they were in
> alphabetical order :) I'll fix and resubmit
>
> Cheers
> Alberto
>
> In data mer 28 ottobre 2015 19:46:50, Piotr Dymacz ha scritto:
>> Hello Alberto,
>>
>> Two comments:
>> 1. Your patch breaks alphabetical order.
>> 2. If you look more deeply into the file, you will easily find there
>> other boards with exactly the same configuration: asl26555 and re6500.
>> Please, don't add unnecessary code and use what's already there.
>>
>> Cheers,
>> Piotr
>>
>> 2015-10-28 19:07 GMT+01:00 Alberto Mattea :
>> > This patch adds a case for the Asus RP-N53 in the "02_network" boot
>> > script. Without this, the lan interface does not get configured on
>> > startup, effectively bricking the device.
>> >
>> > Signed-off-by:  Alberto Mattea 
>> > ---
>> > diff -uN a/target/linux/ramips/base-files/etc/board.d/02_network
>> > b/target/linux/ramips/base-files/etc/board.d/02_network
>> >
>> > --- a/target/linux/ramips/base-files/etc/board.d/02_network 2015-10-28
>> > 18:45:05.993476654 +0100 +++
>> > b/target/linux/ramips/base-files/etc/board.d/02_network 2015-10-28
>> > 18:47:02.505480181 +0100 @@ -127,6 +127,11 @@
>> >
>> > ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
>> > ucidef_add_switch_vlan "switch0" "2" "0 6t"
>> > ;;
>> >
>> > +   rp-n53)
>> > +   ucidef_set_interface_lan "eth0.1"
>> > +   ucidef_add_switch "switch0" "1" "1"
>> > +   ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
>> > +   ;;
>> >
>> > awapn2403)
>> >
>> > ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
>> > ucidef_add_switch "switch0" "1" "1"
>> >
>> > ___
>> > openwrt-devel mailing list
>> > openwrt-devel@lists.openwrt.org
>> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] AR9344 Openwrt - LAN and WAN interface link issue

2015-10-28 Thread Afkar Rafique
Hi Jow,

Thanks a lot for the reply. I have tried the switch command but getting
failed response as below:
root@openwrt:/# swconfig dev switch0 port 1 get link
failed
root@openwrt:/# swconfig dev switch0 port 2 get link
failed
root@openwrt:/# swconfig dev switch0 port 3 get link
failed
root@openwrt:/# swconfig dev switch0 port 4 get link
failed

Do i need to change the /etc/config/network file which i share in previous
mail.


One more thing, the switch command below both are same, then how will get
to know differentiate between WAN and LAN.
WAN:
swconfig dev switch0 port 1 get link

LAN:
swconfig dev switch0 port 1 get link

Could you please guide, as I newbie to this.

Regards,
Afkar


On Wed, Oct 28, 2015 at 11:29 PM, Jo-Philipp Wich  wrote:

> Hi Afkar,
>
> WAN:
>
> swconfig dev switch0 port 1 get link
>
> LAN:
>
> swconfig dev switch0 port 1 get link
> swconfig dev switch0 port 2 get link
> swconfig dev switch0 port 3 get link
> swconfig dev switch0 port 4 get link
>
>
> ~ Jow
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 5/5] malta: use "static" proto for lan interface

2015-10-28 Thread Yousong Zhou
On 29 October 2015 at 00:19, Florian Fainelli  wrote:
> On Oct 28, 2015 5:56 AM, "Yousong Zhou"  wrote:
>>
>> This is almost the default config of OpenWrt targets (currently even
>> those sunxi boards with only one ethernet interface use static IP
>> address for its lan interface).
>
> And this is intend intended, because Malta is primarily used under qemu,
> from which you get your network to be NAT'd or bridged from/with the host.
> Your change would force an user to reconfigure the network on boot, and that
> seems like a less sensible default to me.
>

The current default is not that sensible anyway.  If I understand it
correctly, many packages in OpenWrt assume that lan is for the
"internal" part of the network map, e.g. by default, dnsmasq will
serve DHCP requests on lan interface, firewall will also allow
forwarding on lan interface.  A workaround can be making eth0 the
default wan interface.

When it comes to OpenWrt development with QEMU Malta, the benefits of
a better emulated dev/network environment can definitely compensate
for the efforts of setting up the environment needed only for the
first time.

yousong

>>
>> While at it, also configure a wan interface if eth1 exists.
>>
>> Signed-off-by: Yousong Zhou 
>> ---
>>  target/linux/malta/base-files/etc/uci-defaults/02-network |5 -
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/target/linux/malta/base-files/etc/uci-defaults/02-network
>> b/target/linux/malta/base-files/etc/uci-defaults/02-network
>> index e90ecbe..1b22ec5 100644
>> --- a/target/linux/malta/base-files/etc/uci-defaults/02-network
>> +++ b/target/linux/malta/base-files/etc/uci-defaults/02-network
>> @@ -3,4 +3,7 @@
>>  . /lib/functions/uci-defaults.sh
>>
>>  ucidef_set_interface_loopback
>> -ucidef_set_interface_raw "lan" "eth0" "dhcp"
>> +ucidef_set_interface_lan "eth0"
>> +if [ -d "/sys/class/net/eth1" ]; then
>> +   ucidef_set_interface_wan "eth1"
>> +fi
>> --
>> 1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Fwd: [PATCH 2/5] target.mk: add optimization flags for MIPS 24Kc.

2015-10-28 Thread Yousong Zhou
Fwd to openwrt-devel list.

-- Forwarded message --
From: Yousong Zhou 
Date: 29 October 2015 at 09:59
Subject: Re: [OpenWrt-Devel] [PATCH 2/5] target.mk: add optimization
flags for MIPS 24Kc.
To: Cristian Morales Vega 


On 28 October 2015 at 22:18, Cristian Morales Vega
 wrote:
> On 28 October 2015 at 12:55, Yousong Zhou  wrote:
>> --- a/include/target.mk
>> +++ b/include/target.mk
>> @@ -212,6 +212,7 @@ ifeq ($(DUMP),1)
>>  CPU_CFLAGS_mips32 = -mips32 -mtune=mips32
>>  CPU_CFLAGS_mips32r2 = -mips32r2 -mtune=mips32r2
>>  CPU_CFLAGS_mips64 = -mips64 -mtune=mips64 -mabi=64
>> +CPU_CFLAGS_24kc = -mips32r2 -mtune=24kc
>>  CPU_CFLAGS_24kec = -mips32r2 -mtune=24kec
>>  CPU_CFLAGS_34kc = -mips32r2 -mtune=34kc
>>  CPU_CFLAGS_74kc = -mips32r2 -mtune=74kc
>
> Nothing against the patch itself. But was wondering, since the builds
> are so device specific, what's the point of building for a generic
> mips32(r2)?
>
> Isn't just
>
> CPU_CFLAGS_74kc = -march=74kc
> (which the gcc manual says implies -mtune=74kc)
>
> going to generate faster code than
>
> CPU_CFLAGS_74kc = -mips32r2 -mtune=74kc
>
> without any drawback?

Previously I also wondered why ar71xx set the CPU_TYPE to 34kc while there are
24kc SoCs like AR9331.  According to the GCC manual

  -mips32r2 is equivalent to -march=mips32r2

  ...

  By using ‘-march’ and ‘-mtune’ together, it is possible to generate
  code that will run on a family of processors, but optimize the code for one
  particular member of that family.

So I guess it's just that `-mips32r2 -mtune=74kc` is safer than
`-march=74kc`

yousong

> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/3] ramips: mt7620 add icplus phy driver kernel config symbol

2015-10-28 Thread John Crispin
Hi,

On 29/10/2015 02:26, Andrej Vlasic wrote:
> Add missing icplus phy driver kernel config symbol to mt7620 subtarget.
> This is needed since some mt7620 devices have icplus ip1001 ethernet 
> transceiver
> 
> Signed-off-by: Andrej Vlasic 

are you sure this is needed ? older IC+ phys worked with the generic phy
driver. however that might have changed for the gbit version.

John


> ---
>  target/linux/ramips/mt7620/config-3.18 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target/linux/ramips/mt7620/config-3.18 
> b/target/linux/ramips/mt7620/config-3.18
> index 0263bba..5dbfaa2 100644
> --- a/target/linux/ramips/mt7620/config-3.18
> +++ b/target/linux/ramips/mt7620/config-3.18
> @@ -11,6 +11,7 @@ CONFIG_ARCH_REQUIRE_GPIOLIB=y
>  CONFIG_ARCH_SUSPEND_POSSIBLE=y
>  CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
>  CONFIG_AT803X_PHY=y
> +CONFIG_ICPLUS_PHY=y
>  CONFIG_CC_OPTIMIZE_FOR_SIZE=y
>  CONFIG_CEVT_R4K=y
>  CONFIG_CLKDEV_LOOKUP=y
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] ramips: mt7620 add icplus phy driver kernel config symbol

2015-10-28 Thread Andrej Vlasic
Add missing icplus phy driver kernel config symbol to mt7620 subtarget.
This is needed since some mt7620 devices have icplus ip1001 ethernet transceiver

Signed-off-by: Andrej Vlasic 
---
 target/linux/ramips/mt7620/config-3.18 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ramips/mt7620/config-3.18 
b/target/linux/ramips/mt7620/config-3.18
index 0263bba..5dbfaa2 100644
--- a/target/linux/ramips/mt7620/config-3.18
+++ b/target/linux/ramips/mt7620/config-3.18
@@ -11,6 +11,7 @@ CONFIG_ARCH_REQUIRE_GPIOLIB=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_AT803X_PHY=y
+CONFIG_ICPLUS_PHY=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
 CONFIG_CLKDEV_LOOKUP=y
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] ramips: add function to change rt2x00 wifi eeprom mac

2015-10-28 Thread Andrej Vlasic
Some boards like dovado tiny ac have generic ralink mac in onflash wifi eeprom.
Add eeprom_set_macaddr function to rt2x00 eeprom extract script which changes 
mac addr insde eeprom dump.

Signed-off-by: Andrej Vlasic 
---
 .../base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom   | 12 
 1 file changed, 12 insertions(+)

diff --git 
a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom 
b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index 0cd95a5..1ba6728 100644
--- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -21,10 +21,22 @@ rt2x00_eeprom_extract() {
rt2x00_eeprom_die "failed to extract from $mtd"
 }
 
+rt2x00_eeprom_set_macaddr() {
+   local macaddr=$1
+
+   [ -n "$macaddr" ] || \
+   rt2x00_eeprom_die "invalid wlan mac address"
+
+   macaddr_2bin $macaddr | dd of=/lib/firmware/$FIRMWARE \
+   conv=notrunc bs=1 seek=4 count=6 2>/dev/null || 
\
+   rt2x00_eeprom_die "failed to write mac address to eeprom file"
+}
+
 FW="/lib/firmware/$FIRMWARE"
 [ -e "$FW" ] && exit 0
 
 . /lib/ramips.sh
+. /lib/functions/system.sh
 
 board=$(ramips_board_name)
 
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] ramips: add support for Dovado tiny AC

2015-10-28 Thread Andrej Vlasic
Add support for Dovado tiny AC wifi router.

Soc: mt7620a
ram: 64MB
flash: 8MB
1x usb 2.0
two gigabit lan ports

5ghz wlan is not supported on this board since there is no gpl driverfor 
mt7610e wifi chip.

Signed-off-by: Andrej Vlasic 
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   4 +
 .../linux/ramips/base-files/etc/board.d/02_network |   4 +
 .../etc/hotplug.d/firmware/10-rt2x00-eeprom|   5 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/TINY-AC.dts| 166 +
 target/linux/ramips/image/Makefile |   2 +
 target/linux/ramips/mt7620/profiles/dovado.mk  |  17 +++
 8 files changed, 202 insertions(+)
 create mode 100644 target/linux/ramips/dts/TINY-AC.dts
 create mode 100644 target/linux/ramips/mt7620/profiles/dovado.mk

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index c75a993..5627c8c 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -222,6 +222,10 @@ rt-n14u)
set_wifi_led "$board:blue:air"
set_usb_led "$board:blue:usb"
;;
+tiny-ac)
+   set_wifi_led "$board:orange:wifi"
+   set_usb_led "$board:green:usb"
+   ;;
 vocore)
ucidef_set_led_netdev "eth" "ETH" "$board:orange:eth" "eth0"
set_wifi_led "$board:green:status"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index 0732796..b2b81ea 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -333,6 +333,10 @@ ramips_setup_macs()
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 4)
;;
+   tiny-ac)
+   lan_mac=$(mtd_get_mac_ascii u-boot-env LAN_MAC_ADDR)
+   wan_mac=$(mtd_get_mac_ascii u-boot-env WAN_MAC_ADDR)
+   ;;
w306r-v20)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 5)
diff --git 
a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom 
b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index 1ba6728..0e02177 100644
--- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -57,6 +57,11 @@ case "$FIRMWARE" in
br-6475nd | rt-n56u | whr-600d | whr-1166d)
rt2x00_eeprom_extract "factory" 32768 512
;;
+   tiny-ac)
+   local wifi_mac=$(mtd_get_mac_ascii u-boot-env INIC_MAC_ADDR)
+   rt2x00_eeprom_extract "factory" 0 512
+   rt2x00_eeprom_set_macaddr $wifi_mac
+   ;;
esac
;;
 esac
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 340bc4c..2ed09c9 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -145,6 +145,9 @@ ramips_board_detect() {
*"DIR-860L B1")
name="dir-860l-b1"
;;
+   *"Dovado Tiny AC")
+   name="tiny-ac"
+   ;;
*"E1700")
name="e1700"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index d3d9df3..33ec8cc 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -100,6 +100,7 @@ platform_check_image() {
sl-r7205|\
tew-691gr|\
tew-692gr|\
+   tiny-ac|\
ur-326n4g|\
ur-336un|\
v22rw-2x2|\
diff --git a/target/linux/ramips/dts/TINY-AC.dts 
b/target/linux/ramips/dts/TINY-AC.dts
new file mode 100644
index 000..388f4da
--- /dev/null
+++ b/target/linux/ramips/dts/TINY-AC.dts
@@ -0,0 +1,166 @@
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+   compatible = "TINY-AC", "ralink,mt7620a-soc";
+   model = "Dovado Tiny AC";
+
+   chosen {
+   bootargs = "console=ttyS0,57600";
+   };
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = "okay";
+   };
+
+   gpio2: gpio@660 {
+   status = "okay";
+   };
+
+   gpio3: gpio@688 {
+   status = "okay";
+   };
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = 

Re: [OpenWrt-Devel] [PATCH 4/5] malta: convert to router type target.

2015-10-28 Thread Yousong Zhou
On 29 October 2015 at 00:20, Florian Fainelli  wrote:
> On Oct 28, 2015 5:56 AM, "Yousong Zhou"  wrote:
>>
>> There is currently no relevant definition for developerboard device type
>> in include/target.mk, thus packages like iptables, firewall, dnsmasq
>> etc. are missing in the default images, rendering it almost useless
>> for regular testing or normal use.
>
> This is by design as well here, Malta being used mostly for kernel,
> toolchain and user space development, but not being an ideal router
> platform.
>
> AFAIR, the default device type is already router, so you could just
> eliminate that.
>

Okay, will do that.

yousong

>>
>> Signed-off-by: Yousong Zhou 
>> ---
>>  target/linux/malta/Makefile |2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile
>> index c9f1586..0cce15e 100644
>> --- a/target/linux/malta/Makefile
>> +++ b/target/linux/malta/Makefile
>> @@ -15,7 +15,7 @@ MAINTAINER:=Florian Fainelli 
>>
>>  KERNEL_PATCHVER:=3.18
>>
>> -DEVICE_TYPE:=developerboard
>> +DEVICE_TYPE:=router
>>
>>  include $(INCLUDE_DIR)/target.mk
>>
>> --
>> 1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] tools/cmake: update to 3.3.2

2015-10-28 Thread Hannu Nyman
Update cmake to 3.3.2 and refresh patches.
Add a secondary download location.

Signed-off-by: Hannu Nyman 
---

Release notes 3.0-3.3:
https://cmake.org/cmake/help/v3.3/release/3.0.html
https://cmake.org/cmake/help/v3.3/release/3.1.html
https://cmake.org/cmake/help/v3.3/release/3.2.html
https://cmake.org/cmake/help/v3.3/release/3.3.html

 tools/cmake/Makefile   |  9 +
 tools/cmake/patches/100-disable_qt_tests.patch | 19 +--
 tools/cmake/patches/110-freebsd-compat.patch   |  4 +---
 3 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile
index 08e2b02..b71f1af 100644
--- a/tools/cmake/Makefile
+++ b/tools/cmake/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,11 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cmake
-PKG_VERSION:=2.8.12.2
+PKG_VERSION:=3.3.2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.cmake.org/files/v2.8/
-PKG_MD5SUM:=17c6513483d23590cbce6957ec6d1e66
+PKG_SOURCE_URL:=http://www.cmake.org/files/v3.3/ \
+   https://fossies.org/linux/misc/
+PKG_MD5SUM:=5febbd11bcaac854a27eebaf4a124be2
 
 HOST_BUILD_PARALLEL:=1
 HOST_CONFIGURE_PARALLEL:=1
diff --git a/tools/cmake/patches/100-disable_qt_tests.patch 
b/tools/cmake/patches/100-disable_qt_tests.patch
index 3d44dac..deaa5ae 100644
--- a/tools/cmake/patches/100-disable_qt_tests.patch
+++ b/tools/cmake/patches/100-disable_qt_tests.patch
@@ -1,8 +1,8 @@
 --- a/Tests/RunCMake/CMakeLists.txt
 +++ b/Tests/RunCMake/CMakeLists.txt
-@@ -101,16 +101,6 @@
- add_RunCMake_test(TargetPolicies)
- add_RunCMake_test(alias_targets)
+@@ -160,15 +160,6 @@
+ add_RunCMake_test(no_install_prefix)
+ add_RunCMake_test(configure_file)
  
 -find_package(Qt4 QUIET)
 -find_package(Qt5Core QUIET)
@@ -10,21 +10,20 @@
 -  add_RunCMake_test(IncompatibleQt)
 -endif()
 -if (QT4_FOUND)
--  set(ObsoleteQtMacros_ARGS 
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE})
--  add_RunCMake_test(ObsoleteQtMacros)
+-  add_RunCMake_test(ObsoleteQtMacros 
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE})
 -endif()
 -
- if("${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio [^6]")
-   add_RunCMake_test(include_external_msproject)
-   add_RunCMake_test(SolutionGlobalSections)
+ find_package(PkgConfig QUIET)
+ if(PKG_CONFIG_FOUND)
+   add_RunCMake_test(FindPkgConfig)
 --- a/Tests/CMakeLists.txt
 +++ b/Tests/CMakeLists.txt
-@@ -262,10 +262,6 @@
+@@ -358,10 +358,6 @@
  
list(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX})
  
 -  if(NOT QT4_FOUND)
--find_package(Qt4)
+-find_package(Qt4 QUIET)
 -  endif()
 -
if(QT4_FOUND)
diff --git a/tools/cmake/patches/110-freebsd-compat.patch 
b/tools/cmake/patches/110-freebsd-compat.patch
index d4133b9..9133db5 100644
--- a/tools/cmake/patches/110-freebsd-compat.patch
+++ b/tools/cmake/patches/110-freebsd-compat.patch
@@ -23,7 +23,7 @@ diff --git a/Source/kwsys/SystemInformation.cxx 
b/Source/kwsys/SystemInformation
 index 7c31f3a..2672730 100644
 --- a/Source/kwsys/SystemInformation.cxx
 +++ b/Source/kwsys/SystemInformation.cxx
-@@ -88,6 +88,15 @@ typedef int siginfo_t;
+@@ -91,6 +91,15 @@ typedef int siginfo_t;
  #  include 
  #  define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
  # endif
@@ -39,6 +39,4 @@ index 7c31f3a..2672730 100644
  #endif
  
  #if defined(__OpenBSD__) || defined(__NetBSD__)
--- 
-1.7.10.4
 
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] AR9344 Openwrt - LAN and WAN interface link issue

2015-10-28 Thread Afkar Rafique
Hi,

When I connect only LAN cable and check below command on console
"cat /sys/class/net/eth0.1/carrier"
will get "1"
its correct but when we check "cat /sys/class/net/eth0.2/carrier" even the
only LAN cable is connected it returns "1" but i didn't connect the WAN
cable.

The same thing if we connect only WAN cable and check "cat
/sys/class/net/eth0.1/carrier" and "cat /sys/class/net/eth0.2/carrier" both
returns "1" . But it should not be like this.

Any help would be appreciate.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] AR9344 Openwrt - LAN and WAN interface link issue

2015-10-28 Thread Jo-Philipp Wich
Hi Afkar,

> The same thing if we connect only WAN cable and check "cat
> /sys/class/net/eth0.1/carrier" and "cat /sys/class/net/eth0.2/carrier"
> both returns "1" . But it should not be like this.

This is expected since both eth0.1 and eth0.2 are actually SoC
connection to the external switch ICs CPU port, those PCB traces are
always connected.

In order to get the link state for single ports on the external switch,
use the swconfig command.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel