Re: [OpenWrt-Devel] Add support for AVM Fritzbox 7360 SL

2016-05-16 Thread Christian Mehlis

Am 15.05.2016 um 22:13 schrieb Martin Blumenstingl:

On Sun, May 15, 2016 at 9:45 PM, Sebastian Ortwein  wrote:

Am 15.05.2016 um 17:37 schrieb Martin Blumenstingl:
Okay thank you for support. Now all thinks works fine LAN, WIFI, Switch and
USB.
I attach my patch to add the support for OpenWRT.

Great - congratulations :-)


Hi Sebastian,

I'm interested in some details about the flashing procedure.

Did you replace the original avm bootloader with uboot?

   a) YEA: How to replace it, with which uboot version, where to find 
the code?
   b) NO: How to flash openwrt with avm bootloader? Can I flash without 
any extra hardware? Only with serial and the right commands? Please name 
them.


Thanks,
Christian
___
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 Compex WPJ342

2016-03-25 Thread Christian Mehlis
OpenWrt can be flashed with following uboot commands:

tftpboot 0x8050 openwrt-ar71xx-generic-wpj342-16M-squashfs-sysupgrade.bin
erase 0x9f03 +$filesize
cp.b $fileaddr 0x9f03 $filesize

Signed-off-by: Christian Mehlis <christ...@m3hlis.de>
---
 .../linux/ar71xx/base-files/etc/board.d/02_network |   5 +
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 target/linux/ar71xx/config-4.4 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  10 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-wpj342.c | 178 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/profiles/compex.mk |  10 ++
 target/linux/ar71xx/image/Makefile |   3 +
 target/linux/ar71xx/mikrotik/config-default|   1 +
 13 files changed, 218 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj342.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index bd488a2..c6a2014 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -405,6 +405,11 @@ gl-ar300)
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
;;
 
+wpj342)
+   ucidef_add_switch "switch0" \
+   "0@eth0" "1:lan" "2:wan"
+   ;;
+
 wpj344)
ucidef_add_switch "switch0" \
"0@eth0" "3:lan" "2:wan"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index a2251d1..3b88007 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -385,6 +385,9 @@ get_status_led() {
wp543)
status_led="wp543:green:diag"
;;
+   wpj342)
+   status_led="wpj342:green:sig3"
+   ;;
wpj344)
status_led="wpj344:green:status"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 0d1405a..d77483e 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -953,6 +953,9 @@ ar71xx_board_detect() {
*WPE72)
name="wpe72"
;;
+   *WPJ342)
+   name="wpj342"
+   ;;
*WPJ344)
name="wpj344"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 1d3695f..8da5afb 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -251,6 +251,7 @@ platform_check_image() {
rw2458n | \
wpj531 | \
wndap360 | \
+   wpj342 | \
wpj344 | \
wzr-hp-g300nh2 | \
wzr-hp-g300nh | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index d6ad850..cc410f6 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -176,6 +176,7 @@ CONFIG_ATH79_MACH_WNR2000_V4=y
 CONFIG_ATH79_MACH_WNR2200=y
 CONFIG_ATH79_MACH_WP543=y
 CONFIG_ATH79_MACH_WPE72=y
+CONFIG_ATH79_MACH_WPJ342=y
 CONFIG_ATH79_MACH_WPJ344=y
 CONFIG_ATH79_MACH_WPJ531=y
 CONFIG_ATH79_MACH_WPJ558=y
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 49cecc5..f5b475b 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -179,6 +179,7 @@ CONFIG_ATH79_MACH_WNR2000_V4=y
 CONFIG_ATH79_MACH_WNR2200=y
 CONFIG_ATH79_MACH_WP543=y
 CONFIG_ATH79_MACH_WPE72=y
+CONFIG_ATH79_MACH_WPJ342=y
 CONFIG_ATH79_MACH_WPJ344=y
 CONFIG_ATH79_MACH_WPJ531=y
 CONFIG_ATH79_MACH_WPJ558=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index f47f1b9..d9c8737 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -346,6 +346,16 @@ config ATH79_MACH_WPE72
select ATH79_DEV_USB
select MYLOADER
 
+config ATH79_MACH_WPJ342
+   bool "Compex WPJ342 board support"
+   select SOC_AS934X
+   select ATH79_DEV_ETH
+   select ATH79_DEV_GPIO_BUTTONS
+   select ATH79_DEV_LEDS_GPIO
+   select ATH79_DEV_M25P80
+   select ATH79_DEV_USB
+   select ATH79_DEV_WMAC
+
 config ATH79_MACH_WPJ344
bool "Compex WPJ

[OpenWrt-Devel] git.nbd.name is down: ubox git not accessible

2016-01-04 Thread Christian Mehlis

Hi *,

can someone please bring back https://git.nbd.name/ ?

As the ubox project is hosted on this server only, it is difficult to 
work around this issue.


Is it possible to move all openwrt basis projects to the openwrt.org git 
server, to have a long standing solution?


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


[OpenWrt-Devel] [PATCH] ramips: added gpio spi refclk support for wrtnode board

2015-07-14 Thread Christian Mehlis
This syncs the dts file with the one provided by the wrtnode team:
https://github.com/WRTnode/openwrt-patches/blob/master/R41508/wrtnode_factory_firmware_dts.patch

Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ramips/dts/WRTNODE.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/WRTNODE.dts 
b/target/linux/ramips/dts/WRTNODE.dts
index 793c02f..2a4dd19 100644
--- a/target/linux/ramips/dts/WRTNODE.dts
+++ b/target/linux/ramips/dts/WRTNODE.dts
@@ -76,7 +76,7 @@
pinctrl {
state_default: pinctrl0 {
default {
-   ralink,group = ephy, wled, pa, i2c, 
wdt, uartf;
+   ralink,group = ephy, wled, pa, i2c, 
wdt, uartf, spi refclk;
ralink,function = gpio;
};
};
-- 
2.3.4.263.gf53fc38
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips: added led support for wrtnode board

2015-07-11 Thread Christian Mehlis
This syncs the dts file with the one provided by the wrtnode team:
https://github.com/WRTnode/openwrt-patches/blob/master/R41508/wrtnode_factory_firmware_dts.patch

Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ramips/dts/WRTNODE.dts | 12 
 1 file changed, 12 insertions(+)

diff --git a/target/linux/ramips/dts/WRTNODE.dts 
b/target/linux/ramips/dts/WRTNODE.dts
index 3fb2303..793c02f 100644
--- a/target/linux/ramips/dts/WRTNODE.dts
+++ b/target/linux/ramips/dts/WRTNODE.dts
@@ -7,6 +7,10 @@
model = WRTNODE;
 
palmbus@1000 {
+   gpio1: gpio@638 {
+   status = okay;
+   };
+
gpio2: gpio@660 {
status = okay;
};
@@ -77,4 +81,12 @@
};
};
};
+
+   gpio-leds {
+   compatible = gpio-leds;
+   indicator {
+   label = wrtnode:blue:indicator;
+   gpios = gpio1 14 1;
+   };
+   };
 };
-- 
2.1.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/5] ar71xx: compex wpj531 remove unnecessary switch initialization

2015-07-09 Thread Christian Mehlis

Am 09.07.2015 um 08:14 schrieb John Crispin:

why is this unnecessary ? do we now rely on the bootloader to have
already made the setup ?


Hi John,

I see, I couldn't find any difference in calling this function or not 
from a perspective within the system (swconfig, ethtool).


Perhaps I'm just lucky and uboot did everything right...let's keep this 
line!


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


[OpenWrt-Devel] [PATCH 2/5] ar71xx: compex wpj531 fix setting mac address on ethernet

2015-07-08 Thread Christian Mehlis
Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
index b106917..2cc2fe8 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
@@ -94,9 +94,8 @@ static struct gpio_keys_button wpj531_gpio_keys[] __initdata 
= {
 
 static void __init common_setup(void)
 {
-   u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
-   u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
-   u8 tmpmac[ETH_ALEN];
+   u8 *art = (u8 *) KSEG1ADDR(0x1fff);
+   u8 *mac = (u8 *) KSEG1ADDR(0x1f02e000);
 
ath79_register_m25p80(NULL);
 
@@ -109,7 +108,7 @@ static void __init common_setup(void)
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
ath79_eth0_data.speed = SPEED_100;
ath79_eth0_data.phy_mask = BIT(4);
-   ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
+   ath79_init_mac(ath79_eth0_data.mac_addr, mac + WPJ531_MAC0_OFFSET, 0);
ath79_register_eth(0);
 
/* WAN */
@@ -118,10 +117,10 @@ static void __init common_setup(void)
ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
ath79_eth1_data.speed = SPEED_1000;
ath79_switch_data.phy_poll_mask |= BIT(4);
-   ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
+   ath79_init_mac(ath79_eth1_data.mac_addr, mac + WPJ531_MAC1_OFFSET, 0);
ath79_register_eth(1);
 
-   ath79_register_wmac(ee, tmpmac);
+   ath79_register_wmac(art + WPJ531_WMAC_CALDATA_OFFSET, NULL);
 
ath79_register_pci();
 }
-- 
2.3.4.263.gf53fc38
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/5] ar71xx: compex wpj531 register usb support

2015-07-08 Thread Christian Mehlis
Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
index 7a074c8..6992226 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
@@ -121,6 +121,7 @@ static void __init common_setup(void)
ath79_register_wmac(art + WPJ531_WMAC_CALDATA_OFFSET, NULL);
 
ath79_register_pci();
+   ath79_register_usb();
 }
 
 static void __init wpj531_setup(void)
-- 
2.3.4.263.gf53fc38
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/5] ar71xx: compex wpe72 add space to include statement

2015-07-08 Thread Christian Mehlis
Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-wpe72.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpe72.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpe72.c
index 70bf7db..9452484 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpe72.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpe72.c
@@ -8,7 +8,7 @@
  *  by the Free Software Foundation.
  */
 
-#includeasm/mach-ath79/ath79.h
+#include asm/mach-ath79/ath79.h
 
 #include dev-eth.h
 #include dev-gpio-buttons.h
-- 
2.3.4.263.gf53fc38
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/5] ar71xx: compex wpj531 remove unnecessary switch initialization

2015-07-08 Thread Christian Mehlis
Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
index 2cc2fe8..7a074c8 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
@@ -99,8 +99,6 @@ static void __init common_setup(void)
 
ath79_register_m25p80(NULL);
 
-   ath79_setup_ar933x_phy4_switch(false, false);
-
ath79_register_mdio(0, 0x0);
 
/* LAN */
-- 
2.3.4.263.gf53fc38
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/2] ar71xx: rework patch for qca953x/956x

2015-07-06 Thread Christian Mehlis

Am 06.07.2015 um 15:59 schrieb Matthias Schiffer:

could you send me the output of `swconfig dev eth1 show` (or eth0?) on
OpenWrt? The current initialization code looks a bit weird as it's the
same one would use for a device with 4 LAN ports, even though the WPJ531
has only one.


root@OpenWrt:/# swconfig dev eth0 show
Failed to connect to the switch. Use the list command to see which 
switches are available.

root@OpenWrt:/# swconfig dev eth1 show
Global attributes:
enable_vlan: 0
Port 0:
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
pvid: 0
link: port:1 link:down
Port 2:
pvid: 0
link: port:2 link:down
Port 3:
pvid: 0
link: port:3 link:up speed:100baseT full-duplex auto
Port 4:
pvid: 0
link: port:4 link:down
VLAN 0:
vid: 0
ports: 0 1 2 3 4

root@OpenWrt:/# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes:   10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Link partner advertised link modes:  10baseT/Half 10baseT/Full
 100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 4
Transceiver: external
Auto-negotiation: on
Current message level: 0x00ff (255)
   drv probe link timer ifdown ifup rx_err 
tx_err

Link detected: no
root@OpenWrt:/# ethtool eth1
Settings for eth1:
Cannot get device settings: No such device
Current message level: 0x00ff (255)
   drv probe link timer ifdown ifup rx_err 
tx_err

Link detected: yes

###

Both ports are working, but I just took the vendor source code...

In case you have any suggestion to make the initialization more 
correct drop me a mail, I will test your it!


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


Re: [OpenWrt-Devel] [PATCH 1/2] ar71xx: rework patch for qca953x/956x

2015-07-04 Thread Christian Mehlis

Am 02.07.2015 um 23:10 schrieb Matthias Schiffer:

 I've fixed it
up using the following snippet, the Compex WPJ531 will probably need the
same fix (it uses pretty much the same initialization code).


Thanks Matthias,

When submitting the fix for the WR841Nv9 please also include the fix for 
the wpj531.


I'll test and verify!

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


Re: [OpenWrt-Devel] Chaos Calmer regression in RC2 - MediaTek MT7621

2015-06-29 Thread Christian Mehlis

Am 29.06.2015 um 14:32 schrieb John Crispin:

are you sure that your board has 512mb ram ?


Hey John,

good catch!

You are right, my eval board only has 256mb.

/target/linux/ramips/dts/FIREWRT.dts: line 11

can you tell me how this line has to look, with 256mb of RAM?

Is it sufficient to remove the memory block to get the default value 
(=256) from MT7621.dts ?


Can we create a target for this eval-edition of this board?

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


Re: [OpenWrt-Devel] Chaos Calmer regression in RC2 - MediaTek MT7621

2015-06-29 Thread Christian Mehlis

Am 29.06.2015 um 11:07 schrieb John Crispin:

works for me on both trunk and rc2/3. i tested this on 3 boards.

show us the oops please.


have a look at pastebin:


http://pastebin.com/raw.php?i=gCWKmG3J cc-rc1 (working)
http://pastebin.com/raw.php?i=GSXXtPxd cc-rc2 (kernel oops)
http://pastebin.com/raw.php?i=t1qRjzPy r46133 trunk (kernel oops)


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


[OpenWrt-Devel] Chaos Calmer regression in RC2 - MediaTek MT7621

2015-06-28 Thread Christian Mehlis

On my Firewrt (MediaTek MT7621) cc-rc1 was booting up correctly.
cc-rc2 fails with kernel oops:

http://pastebin.com/raw.php?i=gCWKmG3J cc-rc1 (working)
http://pastebin.com/raw.php?i=GSXXtPxd cc-rc2 (kernel oops)
http://pastebin.com/raw.php?i=t1qRjzPy r46133 trunk (kernel oops)

trunk is also broken (on this hardware).

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


Re: [OpenWrt-Devel] alternative for pyserial+python-mini

2015-06-27 Thread Christian Mehlis

Am 26.06.2015 um 14:57 schrieb valent.turko...@gmail.com:

Does micro-python have some alternative or replacement for pyserial?


you can use stty[1] from busybox to configure the tty.
After that every program can use regular read/write calls...

[1] http://unixhelp.ed.ac.uk/CGI/man-cgi?stty

Best
Christian
___
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 compex wpj531

2015-06-01 Thread Christian Mehlis
tftpboot 0x8050 openwrt-ar71xx-generic-wpj531-16M-squashfs-sysupgrade.bin
erase 0x9f03 +$filesize
erase 0x9f68 +1
cp.b $fileaddr 0x9f03 $filesize

---
v2:
  fix indentation with spaces
  refresh patch

Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   4 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-3.18|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-wpj531.c | 136 +
 target/linux/ar71xx/generic/profiles/compex.mk |  10 ++
 target/linux/ar71xx/image/Makefile |   3 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  24 +++-
 9 files changed, 179 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 0553251..d64a5be 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -308,6 +308,9 @@ get_status_led() {
wpj344)
status_led=wpj344:green:status
;;
+   wpj531)
+   status_led=wpj531:green:sig3
+   ;;
wpj558)
status_led=wpj558:green:sig3
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index f5c6865..5f0d302 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -368,6 +368,10 @@ wpj344)
ucidef_add_switch_vlan switch0 2 0t 2
;;
 
+wpj531)
+   ucidef_set_interfaces_lan_wan eth0 eth1
+   ;;
+
 wpj558)
ucidef_set_interfaces_lan_wan eth0.1 eth0.2
ucidef_add_switch switch0 1 1
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index d5dd561..bf18bb7 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -813,6 +813,9 @@ ar71xx_board_detect() {
*WPJ344)
name=wpj344
;;
+   *WPJ531)
+   name=wpj531
+   ;;
*WPJ558)
name=wpj558
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 3dbd91c..ade47fb 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -229,6 +229,7 @@ platform_check_image() {
rocket-m-xw | \
nanostation-m-xw | \
rw2458n | \
+   wpj531 | \
wndap360 | \
wpj344 | \
wzr-hp-g300nh2 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 543b77e..9a7ed7f 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -139,6 +139,7 @@ CONFIG_ATH79_MACH_WNR2200=y
 CONFIG_ATH79_MACH_WP543=y
 CONFIG_ATH79_MACH_WPE72=y
 CONFIG_ATH79_MACH_WPJ344=y
+CONFIG_ATH79_MACH_WPJ531=y
 CONFIG_ATH79_MACH_WPJ558=y
 CONFIG_ATH79_MACH_WRT160NL=y
 CONFIG_ATH79_MACH_WRT400N=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
new file mode 100644
index 000..bc13d70
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
@@ -0,0 +1,136 @@
+/*
+ * Compex WPJ531 board support
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012 Gabor Juhos juh...@openwrt.org
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include linux/irq.h
+#include linux/platform_device.h
+#include linux/ar8216_platform.h
+
+#include asm/mach-ath79/ar71xx_regs.h
+
+#include pci.h
+#include common.h
+#include dev-ap9x-pci.h
+#include dev-gpio-buttons.h
+#include dev-eth.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+
+#define WPJ531_GPIO_LED_SIG114
+#define WPJ531_GPIO_LED_SIG215

Re: [OpenWrt-Devel] [PATCH v4] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created

2015-05-29 Thread Christian Mehlis

Am 29.05.2015 um 15:38 schrieb Thomas Huehn:

This is the case e.g. if JFFS2 partition is full.

see: https://www.mail-archive.com/linux-unionfs@vger.kernel.org/msg00246.html
(a small error in a logmessage was changed and reported upstream)

runtime tested on ar71xx with kernel 3.18.11 and r45772
this paritially fixes #19564


this patch is superfluous because it's already merged...

http://git.openwrt.org/?p=openwrt.git;a=commitdiff;h=f521e44327cab409ba0e4557ba491ef8243cb23e

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


Re: [OpenWrt-Devel] Link detection - TP-Link Archer C7 v2

2015-05-28 Thread Christian Mehlis

Am 27.05.2015 um 20:57 schrieb Gert Doering:

(Which is how certain commercial platforms handle this - if all L2 ports
in a given VLAN go down, the L3 routing interface will also go down,
and I found that usually to be what I expect and want to happen)


This would totally match my usecase.
I like this solution.

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


Re: [OpenWrt-Devel] Link detection - TP-Link Archer C7 v2

2015-05-27 Thread Christian Mehlis

Am 26.05.2015 um 22:48 schrieb Richard Clark:

https://dev.openwrt.org/ticket/17674 (set to closed / duplicate) but no
reference

Any thoughts, suggestions, or can someone give me some pointers on where
I can be digging in the openwrt kernel code for where that Ethernet
driver 'link status' get filled in ?

ps.. This all works on a different Atheros generic device (GL-Inet), so
it is TP-Link specific.


Hi Richard,

I had this problem a moth ago with this board:
http://wiki.openwrt.org/toh/compex/wpj344

Ref:
https://lists.openwrt.org/pipermail/openwrt-devel/2015-April/032786.html

I found no solution so far...

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


Re: [OpenWrt-Devel] [PATCH v2] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created

2015-05-27 Thread Christian Mehlis

Am 27.05.2015 um 16:23 schrieb Bastian Bittorf:

This is the case e.g. if JFFS2 partition is full.

see: https://www.mail-archive.com/linux-unionfs@vger.kernel.org/msg00246.html
runtime tested on ar71xx with kernel 3.18.14 and r45772 (rebased)
this paritially fixes #19564

Signed-off-by: Bastian Bittorf bitt...@bluebottle.com


Tested-By: Christian Mehlis christ...@m3hlis.de

Test run @45772 on ar71xx is available here:
http://pastebin.com/raw.php?i=ez7rtu2u

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


Re: [OpenWrt-Devel] [PATCH] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created

2015-05-21 Thread Christian Mehlis

Am 19.05.2015 um 16:17 schrieb Bastian Bittorf:


+diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
+index 5f0d199..bf8537c 100644
+--- a/fs/overlayfs/super.c
 b/fs/overlayfs/super.c
+@@ -529,7 +529,7 @@ static int ovl_remount(struct super_block *sb, int *flags, 
char *data)


this function was added with linux 4.0, so your patch for 3.18 does not 
apply.


Can you give me a hint to make it work with 3.18?

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


Re: [OpenWrt-Devel] [PATCH] ar8216: Fix problem with AR8337 MAC swap handling

2015-05-20 Thread Christian Mehlis

Am 29.04.2015 um 19:41 schrieb Heiner Kallweit:

AR8337 supports a configuration bit to swap MAC0 and MAC6.
Currently this is set in general if an AR8337 is detected and causes
issues with devices using an AR8334 (internally an AR8337, just
less chip pins).
And it might even cause issues with AR8337-based devices with
different board designs.

Swapping the MAC's however isn't needed for AR8337 in general.
It's just needed in case of certain board designs (affected devices
seem to be based on Atheros reference board AP135/136-010).
Therefore this configuration bit should be moved to platform data.

The patch includes the needed changes to the device initialization
code of affected devices. Hopefully I didn't miss any ..


please merge this for CC.

It makes Ethernet on the compex-wpj344 (which has been merged) working.

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


Re: [OpenWrt-Devel] [PATCH] ar71xx: Add support for the Meraki MR12 MR16

2015-05-11 Thread Christian Mehlis

Am 09.05.2015 um 18:26 schrieb Chris Blake:

This patch is to add support for the Meraki MR12 and MR16 Access Points.
Currently everything is working, minus the 2nd NIC interface on the MR12
which is built into the SoC.

Signed-off-by: Chris R Blake chrisrblak...@gmail.com


Your patch is line wrapped by your mail application.
Please resend with git send-mail.

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


Re: [OpenWrt-Devel] [PATCH] ar71xx: add support for compex wpj531

2015-05-10 Thread Christian Mehlis

Am 27.04.2015 um 16:48 schrieb Christian Mehlis:

OpenWrt can be flashed with following uboot commands:

tftpboot 0x8050
openwrt-ar71xx-generic-wpj531-16M-squashfs-sysupgrade.bin
erase 0x9f03 +$filesize
cp.b $fileaddr 0x9f03 $filesize

Signed-off-by: Christian Mehlis christ...@m3hlis.de


@nbd

are there any comments on the board support?
Any reasons for not merging it?

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


Re: [OpenWrt-Devel] AR8334 switch support

2015-04-29 Thread Christian Mehlis

Am 28.04.2015 um 22:10 schrieb Heiner Kallweit:

It was easier than I thought, here comes the related patch.

Known limitations:
1. The patch supports configuration of this bit for platform-data-configured
platforms only. DT-based platforms would need a similar extension.
2. For now it's for WPJ344 only. Every other AR8334-based device would need the 
same
extension to the platform data.

Rgds, Heiner


Hi Heiner,

this explicit way to talk to the driver is working!
Thank you for your effort!

Tested-By: Christian Mehlis christ...@m3hlis.de

##

Perhaps you know the answer to my last problem with this hardware too:

On plug/unplug I get those events:

[   25.12] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is up
[   37.13] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is down

but the linux network stack is keeping the interface UP.

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

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

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0t 3'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0t 2'

I have never had this behaviour on other platforms...do you think the 
compex-344 specific initialization is done wrong?


#

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


[OpenWrt-Devel] [PATCH] ar71xx: fix sysupgrade for compex-wpj344

2015-04-29 Thread Christian Mehlis
Moved board to the right magic case.

Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index a8cec91..b3c61ef 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -184,7 +184,6 @@ platform_check_image() {
db120 | \
f9k1115v2 |\
hornet-ub | \
-   wpj344 | \
wpj558 | \
zcn-1523h-2 | \
zcn-1523h-5)
@@ -229,6 +228,7 @@ platform_check_image() {
nanostation-m-xw | \
rw2458n | \
wndap360 | \
+   wpj344 | \
wzr-hp-g300nh2 | \
wzr-hp-g300nh | \
wzr-hp-g450h | \
-- 
2.3.4.263.gf53fc38
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] AR8334 switch support

2015-04-29 Thread Christian Mehlis

Am 28.04.2015 um 22:10 schrieb Heiner Kallweit:

It was easier than I thought, here comes the related patch.


do you plan to send this as a patch to make the change available for 
everyone, or should I?


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


Re: [OpenWrt-Devel] AR8334 switch support

2015-04-28 Thread Christian Mehlis

Am 27.04.2015 um 20:56 schrieb Heiner Kallweit:

The only other difference I found is the initial setting of LED_CTRL3 register.
Could you please test the following patch (first remove the initial patch 
attempt)?


[0.85] switch0: Atheros AR833X rev. 2 switch registered on 
ag71xx-mdio.0

[0.86] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: led_val = 3f
[0.86] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Detected 
AR8337


It seems that we have no luck here...
In case you have any new idea I'll test the patch.

Here is a picture of the switch chip:
http://c33.imgup.net/2015-04-166a5b.jpg

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


Re: [OpenWrt-Devel] AR8334 switch support

2015-04-27 Thread Christian Mehlis

Am 24.04.2015 um 20:05 schrieb Heiner Kallweit:

Could you please test this patch and provide the dmesg output?


I tried your patch - dmesg is attached.

After the first run without success:
[0.89] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Detected 
AR8337 switch


I tweaked your patch a bit to print out more (attached).



I also changed:
+   for (i = 0; i  AR8XXX_NUM_PHYS; i++) {
to
+   for (i = 0; i  AR8327_NUM_PORTS; i++) {

with this change we get:

[0.85] switch0: Atheros AR833X rev. 2 switch registered on 
ag71xx-mdio.0
[0.86] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 0 
available
[0.86] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 1 
available
[0.87] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 2 
available
[0.88] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 3 
available
[0.89] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 4 
available
[0.89] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 5 
available
[0.90] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 6 
available
[0.91] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Detected 
AR8337 switch


#

It seems, that your phy based test is not working on ar8334...

Can we test other registers? I'll give it a try.

Best
Christian
# dmesg 
[0.00] Linux version 3.18.11 (c@black) (gcc version 4.8.3 
(OpenWrt/Linaro GCC 4.8-2014.04 r45458) ) #1 Mon Apr 27 13:42:01 CEST 2015
[0.00] MyLoader: sysp=cc7dbb0c, boardp=e9f041c4, parts=cbc748d9
[0.00] bootconsole [early0] enabled
[0.00] CPU0 revision is: 0001974c (MIPS 74Kc)
[0.00] SoC: Atheros AR9344 rev 2
[0.00] Determined physical RAM map:
[0.00]  memory: 0800 @  (usable)
[0.00] Initrd not found or empty - disabling initrd
[0.00] Zone ranges:
[0.00]   Normal   [mem 0x-0x07ff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x07ff]
[0.00] Initmem setup node 0 [mem 0x-0x07ff]
[0.00] On node 0 totalpages: 32768
[0.00] free_area_init_node: node 0, pgdat 803560f0, node_mem_map 
8100
[0.00]   Normal zone: 256 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 32768 pages, LIFO batch:7
[0.00] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[0.00] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 
bytes
[0.00] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[0.00] pcpu-alloc: [0] 0 
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 32512
[0.00] Kernel command line:  board=WPJ344 console=ttyS0,115200 
mtdparts=spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro 
rootfstype=squashfs,jffs2 noinitrd
[0.00] PID hash table entries: 512 (order: -1, 2048 bytes)
[0.00] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[0.00] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[0.00] Writing ErrCtl register=
[0.00] Readback ErrCtl register=
[0.00] Memory: 125920K/131072K available (2471K kernel code, 123K 
rwdata, 528K rodata, 260K init, 188K bss, 5152K reserved)
[0.00] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[0.00] NR_IRQS:51
[0.00] Clocks: CPU:560.000MHz, DDR:450.000MHz, AHB:225.000MHz, 
Ref:40.000MHz
[0.00] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[0.07] pid_max: default: 32768 minimum: 301
[0.07] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.08] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.08] NET: Registered protocol family 16
[0.09] MIPS: machine is Compex WPJ344
[0.10] ar724x-pci ar724x-pci: PCIe link is down
[0.10] registering PCI controller with io_map_base unset
[0.11] ar71xx: using random MAC address for eth0
[0.33] ar71xx: using random MAC address for eth1
[0.55] PCI host bridge to bus :00
[0.56] pci_bus :00: root bus resource [mem 0x1000-0x13ff]
[0.56] pci_bus :00: root bus resource [io  0x]
[0.57] pci_bus :00: No busn resource found for root bus, will use 
[bus 00-ff]
[0.57] pci_bus :00: busn_res: [bus 00-ff] end is updated to 00
[0.57] Switched to clocksource MIPS
[0.58] NET: Registered protocol family 2
[0.58] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[0.58] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[0.59] TCP: Hash tables configured (established 1024 bind 1024)
[0.59] 

[OpenWrt-Devel] [PATCH] netifd-dhcp: supply parameters to user-script

2015-04-27 Thread Christian Mehlis
hand over parameters to user-script e.g. $1=deconfig

Signed-off-by: Leon George l...@georgemail.de
Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 package/network/config/netifd/files/lib/netifd/dhcp.script | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script 
b/package/network/config/netifd/files/lib/netifd/dhcp.script
index fb9f95a..94ae206 100755
--- a/package/network/config/netifd/files/lib/netifd/dhcp.script
+++ b/package/network/config/netifd/files/lib/netifd/dhcp.script
@@ -93,6 +93,6 @@ case $1 in
 esac
 
 # user rules
-[ -f /etc/udhcpc.user ]  . /etc/udhcpc.user
+[ -f /etc/udhcpc.user ]  . /etc/udhcpc.user $@
 
 exit 0
-- 
2.3.4.263.gf53fc38
___
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 compex wpj531

2015-04-27 Thread Christian Mehlis
OpenWrt can be flashed with following uboot commands:

tftpboot 0x8050
openwrt-ar71xx-generic-wpj531-16M-squashfs-sysupgrade.bin
erase 0x9f03 +$filesize
cp.b $fileaddr 0x9f03 $filesize

Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   4 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-3.18|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-wpj531.c | 136 +
 target/linux/ar71xx/generic/profiles/compex.mk |  10 ++
 target/linux/ar71xx/image/Makefile |   3 +
 .../610-MIPS-ath79-openwrt-machines.patch  |  24 +++-
 9 files changed, 179 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index d702d45..b8bd2ec 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -299,6 +299,9 @@ get_status_led() {
wpj344)
status_led=wpj344:green:status
;;
+   wpj531)
+   status_led=wpj531:green:sig3
+   ;;
wpj558)
status_led=wpj558:green:sig3
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index f5c6865..5f0d302 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -368,6 +368,10 @@ wpj344)
ucidef_add_switch_vlan switch0 2 0t 2
;;
 
+wpj531)
+   ucidef_set_interfaces_lan_wan eth0 eth1
+   ;;
+
 wpj558)
ucidef_set_interfaces_lan_wan eth0.1 eth0.2
ucidef_add_switch switch0 1 1
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 645c5d9..aff5548 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -807,6 +807,9 @@ ar71xx_board_detect() {
*WPJ344)
name=wpj344
;;
+   *WPJ531)
+   name=wpj531
+   ;;
*WPJ558)
name=wpj558
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index a8cec91..466d818 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -228,6 +228,7 @@ platform_check_image() {
rocket-m-xw | \
nanostation-m-xw | \
rw2458n | \
+   wpj531 | \
wndap360 | \
wzr-hp-g300nh2 | \
wzr-hp-g300nh | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 36b8bb6..2bed421 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -137,6 +137,7 @@ CONFIG_ATH79_MACH_WNR2200=y
 CONFIG_ATH79_MACH_WP543=y
 CONFIG_ATH79_MACH_WPE72=y
 CONFIG_ATH79_MACH_WPJ344=y
+CONFIG_ATH79_MACH_WPJ531=y
 CONFIG_ATH79_MACH_WPJ558=y
 CONFIG_ATH79_MACH_WRT160NL=y
 CONFIG_ATH79_MACH_WRT400N=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
new file mode 100644
index 000..bc13d70
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
@@ -0,0 +1,136 @@
+/*
+ * Compex WPJ531 board support
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012 Gabor Juhos juh...@openwrt.org
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include linux/irq.h
+#include linux/platform_device.h
+#include linux/ar8216_platform.h
+
+#include asm/mach-ath79/ar71xx_regs.h
+
+#include pci.h
+#include common.h
+#include dev-ap9x-pci.h
+#include dev-gpio-buttons.h
+#include dev-eth.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+
+#define WPJ531_GPIO_LED_SIG114
+#define WPJ531_GPIO_LED_SIG215
+#define

Re: [OpenWrt-Devel] AR8334 switch support

2015-04-27 Thread Christian Mehlis

Am 27.04.2015 um 15:06 schrieb Heiner Kallweit:

Could you please provide te dmesg output of this patch version?


[0.85] switch0: Atheros AR833X rev. 2 switch registered on 
ag71xx-mdio.0
[0.86] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 0 
available, BMSR = 0x7949
[0.87] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 1 
available, BMSR = 0x7949
[0.87] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 2 
available, BMSR = 0x7969
[0.88] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 3 
available, BMSR = 0x7949
[0.89] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 4 
available, BMSR = 0x7949
[0.90] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 5 
available, BMSR = 0x
[0.91] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 6 
available, BMSR = 0x
[0.92] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Detected 
AR8337 switch


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


Re: [OpenWrt-Devel] AR8334 switch support

2015-04-23 Thread Christian Mehlis

Am 22.04.2015 um 19:01 schrieb Heiner Kallweit:

Can you provide a complete dmesg output?


Bootlog is available here:
http://wiki.openwrt.org/toh/compex/wpj344#openwrt_upstream_bootlog

Dmesg is attached.


W/o having seen the datasheets for AR8337/AR8334 I'm hesitant to propose a 
patch.
1. AR8334 identifies itself as AR8337/rev.2. There might be a real AR8337/rev.2 
with 7 ports. How to tell between these two chips?


Perhaps there are some other registers where the number of ports are 
available? But I don't have any datasheets to look into...


Best
Christian
[0.00] Linux version 3.18.11 (c@black) (gcc version 4.8.3 
(OpenWrt/Linaro GCC 4.8-2014.04 r45458) ) #1 Tue Apr 21 18:45:08 CEST 2015
[0.00] MyLoader: sysp=cc7dbb0c, boardp=e9f041c4, parts=cbc748d9
[0.00] bootconsole [early0] enabled
[0.00] CPU0 revision is: 0001974c (MIPS 74Kc)
[0.00] SoC: Atheros AR9344 rev 2
[0.00] Determined physical RAM map:
[0.00]  memory: 0800 @  (usable)
[0.00] Initrd not found or empty - disabling initrd
[0.00] Zone ranges:
[0.00]   Normal   [mem 0x-0x07ff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x07ff]
[0.00] Initmem setup node 0 [mem 0x-0x07ff]
[0.00] On node 0 totalpages: 32768
[0.00] free_area_init_node: node 0, pgdat 803560f0, node_mem_map 
8100
[0.00]   Normal zone: 256 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 32768 pages, LIFO batch:7
[0.00] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[0.00] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 
bytes
[0.00] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[0.00] pcpu-alloc: [0] 0 
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 32512
[0.00] Kernel command line:  board=WPJ344 console=ttyS0,115200 
mtdparts=spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro 
rootfstype=squashfs,jffs2 noinitrd
[0.00] PID hash table entries: 512 (order: -1, 2048 bytes)
[0.00] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[0.00] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[0.00] Writing ErrCtl register=
[0.00] Readback ErrCtl register=
[0.00] Memory: 125920K/131072K available (2470K kernel code, 124K 
rwdata, 528K rodata, 260K init, 188K bss, 5152K reserved)
[0.00] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[0.00] NR_IRQS:51
[0.00] Clocks: CPU:560.000MHz, DDR:450.000MHz, AHB:225.000MHz, 
Ref:40.000MHz
[0.00] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[0.07] pid_max: default: 32768 minimum: 301
[0.07] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.08] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.08] NET: Registered protocol family 16
[0.09] MIPS: machine is Compex WPJ344
[0.10] ar724x-pci ar724x-pci: PCIe link is down
[0.10] registering PCI controller with io_map_base unset
[0.11] ar71xx: using random MAC address for eth0
[0.33] ar71xx: using random MAC address for eth1
[0.55] PCI host bridge to bus :00
[0.56] pci_bus :00: root bus resource [mem 0x1000-0x13ff]
[0.56] pci_bus :00: root bus resource [io  0x]
[0.57] pci_bus :00: No busn resource found for root bus, will use 
[bus 00-ff]
[0.57] pci_bus :00: busn_res: [bus 00-ff] end is updated to 00
[0.57] Switched to clocksource MIPS
[0.58] NET: Registered protocol family 2
[0.58] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[0.58] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[0.59] TCP: Hash tables configured (established 1024 bind 1024)
[0.59] TCP: reno registered
[0.60] UDP hash table entries: 256 (order: 0, 4096 bytes)
[0.60] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[0.61] NET: Registered protocol family 1
[0.61] PCI: CLS 0 bytes, default 32
[0.61] futex hash table entries: 256 (order: -1, 3072 bytes)
[0.63] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[0.63] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) 
(CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[0.64] msgmni has been set to 245
[0.66] io scheduler noop registered
[0.66] io scheduler deadline registered (default)
[0.67] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[0.67] console [ttyS0] disabled
[0.70] serial8250.0: ttyS0 at MMIO 0x1802 (irq = 11, base_baud = 
250) is a 16550A
[0.70] console [ttyS0] enabled
[ 

[OpenWrt-Devel] AR8334 switch support

2015-04-21 Thread Christian Mehlis
I was involved in making upstream support for the compex wpj344 and came 
across the AR8334 embedded switch used on this board.


Unfortunately it seems that this switch is not jet supported by the
ar8327/ar8216 driver in openwrt.

The vendor just did this to their openwrt based sdk:

--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -508,8 +508,10 @@ ar8327_hw_config_pdata(struct ar8xxx_priv *priv,
data-port6_status = ar8327_get_port_init_status(pdata-port6_cfg);

t = ar8327_get_pad_cfg(pdata-pad0_cfg);
+#if 0
if (chip_is_ar8337(priv))
t |= AR8337_PAD_MAC06_EXCHANGE_EN;
+#endif

ar8xxx_write(priv, AR8327_REG_PAD0_MODE, t);
t = ar8327_get_pad_cfg(pdata-pad5_cfg);
--

I tied to find a more generic solution but it seems that my ar8334 is 
identifying itself as Atheros AR8337 rev. 2 switch. The identification 
read from the device is ver:0x13 rev:0x02.


If you have more information on that chip or some source code, feel free 
to reply (or send me a mail).


The board support went upstream in the mean time:

https://dev.openwrt.org/changeset/45527

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


Re: [OpenWrt-Devel] AR8334 switch support

2015-04-21 Thread Christian Mehlis

Am 21.04.2015 um 17:19 schrieb Heiner Kallweit:

All I found regarding AR8334/QCA8334 is that it supposedly has four ports.
(There was even an AR8335 with five ports mentioned).
Considering the port / phy layout of AR8337 and the existing boards
with AR8334 I'd assume that AR8334 has just two phy's.
The 8327/8337 code of the driver at least would have to be extended to
not assume a fixed 7 port / 5 phy layout.


I see.


Apart from the fact that the driver treats AR8334 as a 7 port / 5 phy
chip it also applies the fixups for AR8327 rev. 2, what is at least
questionnable.

Is the AR8334 fully functional with this slightly modified driver or
are certain thing not working?


With the vendor patch, Linux is able to talk to the switch, and 
send/receive data.


Strange things I discovered:

1) on plug out

Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is down

is printed, but linux keeps the interface as UP.

2) # swconfig list (on this board) shows multiple switches?!
Found: switch0 - ag71xx-mdio.0
Found: switch1 - eth1

3) swconfig dev switch0 show
works as expected.

files attached:
1. boot with ports connected
2. disconnect plugs
3. dump the files

If you can supply some sort of patch for the 4 port switch, I would be 
happy to test. - I want to have upstream support for the switch (and 
the compex wpj344).


In case you really need the actual hardware (the compex wpj344) I can 
send you a board.


Best
Christian

Global attributes:
enable_vlan: 1
enable_mirror_rx: 0
enable_mirror_tx: 0
mirror_monitor_port: 0
mirror_source_port: 0
arl_table: address resolution table
Port 0: MAC 56:61:d1:e9:13:d6

Port 0:
mib: Port 0 MIB counters
RxBroad : 19
RxPause : 0
RxMulti : 56
RxFcsErr: 0
RxAlignErr  : 0
RxRunt  : 0
RxFragment  : 0
Rx64Byte: 18
Rx128Byte   : 69
Rx256Byte   : 584
Rx512Byte   : 10
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 127420
RxBadByte   : 0
RxOverFlow  : 0
Filtered: 58
TxBroad : 134
TxPause : 0
TxMulti : 1141
TxUnderRun  : 0
Tx64Byte: 21
Tx128Byte   : 1194
Tx256Byte   : 95
Tx512Byte   : 4
Tx1024Byte  : 4
Tx1518Byte  : 4
TxMaxByte   : 0
TxOverSize  : 0
TxByte  : 121582
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer : 0
TxLateCol   : 0

enable_eee: ???
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow 
Port 1:
mib: Port 1 MIB counters
RxBroad : 0
RxPause : 0
RxMulti : 0
RxFcsErr: 0
RxAlignErr  : 0
RxRunt  : 0
RxFragment  : 0
Rx64Byte: 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered: 0
TxBroad : 0
TxPause : 0
TxMulti : 0
TxUnderRun  : 0
Tx64Byte: 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte  : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer : 0
TxLateCol   : 0

enable_eee: 0
pvid: 0
link: port:1 link:down
Port 2:
mib: Port 2 MIB counters
RxBroad : 98
RxPause : 0
RxMulti : 326
RxFcsErr: 0
RxAlignErr  : 0
RxRunt  : 0
RxFragment  : 0
Rx64Byte: 135
Rx128Byte   : 295
Rx256Byte   : 31
Rx512Byte   : 2
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 40127
RxBadByte   : 0
RxOverFlow  : 0
Filtered: 0
TxBroad : 2
TxPause : 0
TxMulti : 5
TxUnderRun  : 0
Tx64Byte: 3
Tx128Byte   : 37
Tx256Byte   : 5
Tx512Byte   : 2
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte  : 5122
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer : 0
TxLateCol   : 0

enable_eee: 0
pvid: 2
link: port:2 link:down
Port 3:
mib: Port 3 MIB counters
RxBroad : 37
RxPause : 0
RxMulti : 815
RxFcsErr: 0
RxAlignErr  : 0
RxRunt  : 0
RxFragment  : 0
Rx64Byte: 54
Rx128Byte   : 732
Rx256Byte   : 64
Rx512Byte   : 2
Rx1024Byte  : 4
Rx1518Byte  : 4
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 76507
RxBadByte   : 0
RxOverFlow  : 0
Filtered: 1
TxBroad : 2
TxPause : 0
TxMulti : 15
TxUnderRun  : 0
Tx64Byte: 1
Tx128Byte   : 12
Tx256Byte   : 561
Tx512Byte   : 2
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte  : 111573
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer : 0
TxLateCol   : 0

enable_eee: 0
pvid: 1
link: port:3 link:down
Port 4:
mib: Port 4 MIB counters
RxBroad : 0
RxPause : 0
RxMulti : 0
RxFcsErr: 0
RxAlignErr  : 0
RxRunt  : 0
RxFragment  : 0
Rx64Byte: 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 

Re: [OpenWrt-Devel] trunk: Ethernet LEDs not visible in Sysfs

2015-04-13 Thread Christian Mehlis

just for the archive, this patch solved my problem:

commit f3129943ca6748d867ea6e9930b962b65d01ee47
Author: juhosg juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73
AuthorDate: Tue Mar 31 21:31:36 2015 +
Commit: juhosg juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73
CommitDate: Tue Mar 31 21:31:36 2015 +

ar71xx: fix platform device support in the gpio-74x164 driver

Platform device support has been removed from the gpio-74x164
driver in 3.14. Restore that.

Signed-off-by: Gabor Juhos juh...@openwrt.org

Best
Christian


Am 20.03.2015 um 16:38 schrieb Christian Mehlis:

hi,

my Archer-c5 and tplink 4300 routers do have 10 LEDs, but in the sysfs
only the following LEDs are usable/visible:

$ ls /sys/class/leds
ath9k-phy1   tp-link:blue:wlan2g  tp-link:green:usb2
tp-link:blue:qss tp-link:blue:wlan5g
tp-link:blue:system  tp-link:green:usb1

$ cat /sys/kernel/debug/gpio
GPIOs 0-23, ath79:
  gpio-12  (tp-link:blue:wlan2g ) out lo
  gpio-13  (RFKILL switch   ) in  lo
  gpio-14  (tp-link:blue:system ) out lo
  gpio-15  (tp-link:blue:qss) out hi
  gpio-16  (Reset button) in  hi
  gpio-17  (tp-link:blue:wlan5g ) out lo
  gpio-18  (tp-link:green:usb1  ) out hi
  gpio-19  (tp-link:green:usb2  ) out hi
  gpio-21  (USB2 power  ) out hi
  gpio-22  (USB1 power  ) out hi

All LAN and WAN LEDs are missing in sysfs.

Can someone tell me how to make them visible in sysfs in again?

Best
Christian
___
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] update libnetfilter_conntrack to version 1.0.4

2015-03-27 Thread Christian Mehlis
This updates libnetfilter_conntrack to the latest
stable version 1.0.4 which was released Aug-06-2013.

Changeset is available here:
http://git.netfilter.org/libnetfilter_conntrack/log/

Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 package/libs/libnetfilter-conntrack/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/libnetfilter-conntrack/Makefile 
b/package/libs/libnetfilter-conntrack/Makefile
index 4579a02..e60b59a 100644
--- a/package/libs/libnetfilter-conntrack/Makefile
+++ b/package/libs/libnetfilter-conntrack/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libnetfilter_conntrack
-PKG_VERSION:=1.0.3
+PKG_VERSION:=1.0.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
http://www.netfilter.org/projects/libnetfilter_conntrack/files/ \
ftp://ftp.netfilter.org/pub/libnetfilter_conntrack/
-PKG_MD5SUM:=73394a3d8d0cfecc6abb6027b4792d52
+PKG_MD5SUM:=18cf80c4b339a3285e78822dbd4f08d7
 PKG_MAINTAINER:=Jo-Philipp Wich j...@openwrt.org
 
 PKG_FIXUP:=autoreconf
-- 
2.4.0.rc0.16.g283cd32
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] syslog: use appropriate levels for logging

2015-03-26 Thread Christian Mehlis
Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 kmodloader.c  | 2 +-
 log/logread.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 8f41e74..387678a 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -751,7 +751,7 @@ static int main_loader(int argc, char **argv)
if (scan_module_folders())
return -1;
 
-   syslog(0, kmodloader: loading kernel modules from %s\n, path);
+   syslog(LOG_INFO, kmodloader: loading kernel modules from %s\n, path);
 
if (glob(path, gl_flags, NULL, gl)  0)
goto out;
diff --git a/log/logread.c b/log/logread.c
index a7ab567..871cd5b 100644
--- a/log/logread.c
+++ b/log/logread.c
@@ -79,7 +79,7 @@ static void log_handle_reconnect(struct uloop_timeout 
*timeout)
uloop_timeout_set(retry, 1000);
} else {
uloop_fd_add(sender, ULOOP_READ);
-   syslog(0, Logread connected to %s:%s\n, log_ip, log_port);
+   syslog(LOG_INFO, Logread connected to %s:%s\n, log_ip, 
log_port);
}
 }
 
@@ -154,7 +154,7 @@ static int log_notify(struct blob_attr *msg)
err = send(sender.fd, buf, strlen(buf), 0);
 
if (err  0) {
-   syslog(0, failed to send log data to %s:%s via %s\n,
+   syslog(LOG_INFO, failed to send log data to %s:%s via 
%s\n,
log_ip, log_port, (log_udp) ? (udp) : 
(tcp));
uloop_fd_delete(sender);
close(sender.fd);
-- 
2.3.4.263.gf53fc38
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] trunk: Ethernet LEDs not visible in Sysfs

2015-03-20 Thread Christian Mehlis

hi,

my Archer-c5 and tplink 4300 routers do have 10 LEDs, but in the sysfs 
only the following LEDs are usable/visible:


$ ls /sys/class/leds
ath9k-phy1   tp-link:blue:wlan2g  tp-link:green:usb2
tp-link:blue:qss tp-link:blue:wlan5g
tp-link:blue:system  tp-link:green:usb1

$ cat /sys/kernel/debug/gpio
GPIOs 0-23, ath79:
 gpio-12  (tp-link:blue:wlan2g ) out lo
 gpio-13  (RFKILL switch   ) in  lo
 gpio-14  (tp-link:blue:system ) out lo
 gpio-15  (tp-link:blue:qss) out hi
 gpio-16  (Reset button) in  hi
 gpio-17  (tp-link:blue:wlan5g ) out lo
 gpio-18  (tp-link:green:usb1  ) out hi
 gpio-19  (tp-link:green:usb2  ) out hi
 gpio-21  (USB2 power  ) out hi
 gpio-22  (USB1 power  ) out hi

All LAN and WAN LEDs are missing in sysfs.

Can someone tell me how to make them visible in sysfs in again?

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


Re: [OpenWrt-Devel] Question regarding UCI with IPv4 and IPv6 on lan-bridge

2015-03-18 Thread Christian Mehlis

Thanks Steven!

It's working.

Do you or should I add some text in the wiki?

I think this @ notation is not present on
http://wiki.openwrt.org/doc/uci/network.

Best
Christian

Am 18.03.2015 um 16:11 schrieb Steven Barth:

Try

config interface 'lan'
 option type 'bridge'
 option ifname 'eth0.1 bat0'
 option proto 'dhcp'

config interface lan6
 option ifname @lan
 option proto dhcpv6
#option reqprefix no (uncomment if you don't need an IPv6 delegated
prefix)


Cheers,

Steven




___
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] Question regarding UCI with IPv4 and IPv6 on lan-bridge

2015-03-18 Thread Christian Mehlis

Hi,

I want to use a router as a client in my dual stack lan. I'm using ICMP 
router announcements.
Additionally I want to use mesh at the same time, so I'm using a bridge 
on the lan interface.


Is there any way to express that I want dynamic IPv4 and IPv6 on a bridge?

##
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1 bat0'
option proto 'dhcp'

IPv4 assigned
no IPv6 assigned
##
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1 bat0'
option proto 'dhcpv6'

no IPv4 assigned
IPv6 assigned.
##
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1 bat0'
option proto 'dhcp'

config interface 'wan6'
option ifname 'eth0.1'
option proto 'dhcpv6'

the bridge has IPv4 assigned but no IPv6
eth0.1 has no IP at all
##

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


[OpenWrt-Devel] howto enable missing LEDs on archer-c5 in trunk

2015-03-09 Thread Christian Mehlis

hi,

my Archer-c5 has 10 LEDs, but in sysfs only the following LEDs are 
usable/visible:


$ ls /sys/class/leds
ath9k-phy1   tp-link:blue:wlan2g  tp-link:green:usb2
tp-link:blue:qss tp-link:blue:wlan5g
tp-link:blue:system  tp-link:green:usb1

$ cat /sys/kernel/debug/gpio
GPIOs 0-23, ath79:
 gpio-12  (tp-link:blue:wlan2g ) out lo
 gpio-13  (RFKILL switch   ) in  lo
 gpio-14  (tp-link:blue:system ) out lo
 gpio-15  (tp-link:blue:qss) out hi
 gpio-16  (Reset button) in  hi
 gpio-17  (tp-link:blue:wlan5g ) out lo
 gpio-18  (tp-link:green:usb1  ) out hi
 gpio-19  (tp-link:green:usb2  ) out hi
 gpio-21  (USB2 power  ) out hi
 gpio-22  (USB1 power  ) out hi

All LAN and WAN LEDs are missing in sysfs.

Can someone tell me how to make them visible in sysfs in trunk?

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


Re: [OpenWrt-Devel] ar71xx update to v3.18

2015-02-18 Thread Christian Mehlis

tplink archer c5 is working fine 2h.
Tested: boot, ethernet, switch, wifi.

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


Re: [OpenWrt-Devel] [PATCH 1/2] added board support for compex wpj558

2015-02-02 Thread Christian Mehlis

Am 30.01.2015 um 18:48 schrieb Christian Mehlis:


diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index f7b8381..ecaa126 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -687,10 +687,13 @@ Image/Build/MyLoader/initramfs=$(call 
PatchKernel/initramfs,$(2),$(3))
  define Image/Build/MyLoader
$(eval fwsize=$(shell echo $$(($(4)-0x3-4*64*1024
$(eval fwimage=$(KDIR_TMP)/$(2)-$(5)-firmware.bin)
-   $(call 
CatFiles,$(KDIR_TMP)/vmlinux-$(2).bin.lzma,65536,$(KDIR)/root.$(1),$(fwsize),$(fwimage))
+   $(call 
CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage,65536,$(KDIR)/root.$(1),$(fwsize),$(fwimage))
if [ -e $(fwimage) ]; then \
$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) -v \
-   -p0x0003:0:al:0x8006:firmware:$(fwimage) \
+   
-p0x68:0x16:al:0x8006:firmware:$(KDIR_TMP)/vmlinux-$(2).uImage \
+   -p0x05:0x63:::rootfs:$(KDIR)/root.$(1) \
+   -p0x7e:0x01 \
+   -p0x7f:0x01 \
$(call imgname,$(1),$(2))-$(5)-factory.img; \
echo -n   $(KDIR_TMP)/empty.bin; \
sh $(TOPDIR)/scripts/combined-image.sh \


I think this breaks the other compex boards. This code is more a proof 
of concept for the wpj558.


I don't recommend to merge that now, until I found a way to make 
sysupgrade work and not interfere with other boards.


How does linux detect the partitions in the old code where linux and the 
rootfs are combined in one partition?


Best
Christian
___
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] wpj558: use own partition for rootfs

2015-02-02 Thread Christian Mehlis

Am 02.02.2015 um 09:52 schrieb John Crispin:



On 30/01/2015 18:48, Christian Mehlis wrote:

this change breaks rootfs detection



so we should not merge it if it breaks stuff ?


Hi John,

this patch was the second way I tried to make the compex wpj558 work.
Perhaps you can answer my mail:

[OpenWrt-Devel] Compex WPJ558 board support

This port is my first one, so I got some problems with the compex style 
uboot loader. I think jow did the port for at least two other compex 
boards, so I hope someone knows how to accomplish either way 1 or 2.


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


Re: [OpenWrt-Devel] Compex WPJ558 board support

2015-01-30 Thread Christian Mehlis

Am 30.01.2015 um 19:04 schrieb SGT. Garcia:

On Jan 30  18:44 +0100, Christian Mehlis wrote:

Hi,

I did a port for the Compex WPJ558 and it's almost working completely.


hi,
could you tell me where you got this board from? this is the only place
i've found it: http://tinyurl.com/ovb766y


Hi,

I did not order it, but you can contact them directly:

http://www.compex.com.sg/index.php/contactus/

or use the webshop:

http://www.compexshop.com/product_info.php?currency=USDproducts_id=466

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


[OpenWrt-Devel] [PATCH 2/2] wpj558: use own partition for rootfs

2015-01-30 Thread Christian Mehlis
this change breaks rootfs detection

Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ar71xx/image/Makefile | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index ecaa126..9956a01 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -690,10 +690,7 @@ define Image/Build/MyLoader
$(call 
CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage,65536,$(KDIR)/root.$(1),$(fwsize),$(fwimage))
if [ -e $(fwimage) ]; then \
$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) -v \
-   
-p0x68:0x16:al:0x8006:firmware:$(KDIR_TMP)/vmlinux-$(2).uImage \
-   -p0x05:0x63:::rootfs:$(KDIR)/root.$(1) \
-   -p0x7e:0x01 \
-   -p0x7f:0x01 \
+   -p0x0003:0:al:0x8006:firmware:$(fwimage) \
$(call imgname,$(1),$(2))-$(5)-factory.img; \
echo -n   $(KDIR_TMP)/empty.bin; \
sh $(TOPDIR)/scripts/combined-image.sh \
-- 
2.3.0.rc2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Compex WPJ558 board support

2015-01-30 Thread Christian Mehlis

Hi,

I did a port for the Compex WPJ558 and it's almost working completely.
It's booting up, ethernet, wifi and pci is working.

But I got some problems with the image structure.

This board seems to need a uImage instead of bin.lzma ?!

I found two ways of creating an image for this board:

1) create 2 partitions with the compex image format: Linux is 
booting and rootfs is found, but sysupgrade won't work (because the 
compex sysupgrade handler writes on partition and the upgraded system 
lands in case 2)


2) use the same way as the other compex boards and cat together the 
uImage and the rootfs.
   use one partition in the compex image with myloader: in this 
case the rootfs is not mountable.


[0.75] m25p80 spi0.0: found mx25l12805d, expected m25p80
[0.75] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[0.76] 7 cmdlinepart partitions found on MTD device spi0.0
[0.76] Creating 7 MTD partitions on spi0.0:
[0.77] 0x-0x0004 : u-boot
[0.78] 0x0004-0x0005 : u-boot-env
[0.78] 0x0005-0x0068 : rootfs
[0.79] mtd: device 2 (rootfs) set to be root filesystem
[0.79] mtdsplit: no squashfs found in rootfs
[0.80] mtdsplit: no squashfs found in spi0.0
[0.80] 0x0068-0x007e : kernel
[0.81] 0x007e-0x007f : nvram
[0.82] 0x007f-0x0080 : art
[0.82] 0x0005-0x007e : firmware
[0.84] switch0: Atheros AR8327 rev. 4 switch registered on 
ag71xx-mdio.0

[0.93] libphy: ag71xx_mdio: probed
[1.53] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 
[uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]

[1.54] eth0: Atheros AG71xx at 0xb900, irq 4, mode:RGMII
[2.13] eth1: Atheros AG71xx at 0xba00, irq 5, mode:SGMII
[2.14] TCP: cubic registered
[2.14] NET: Registered protocol family 17
[2.14] 8021q: 802.1Q VLAN Support v1.8
[2.15] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not 
found at 0x: 0x96da instead
[2.16] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not 
found at 0x0004: 0x0ca1 instead


So my questions:

0) what's the difference between bin.lzma and uImage?
1) how does a linux kernel determine the beginning of the rootfs?
2) why is it working with two partitions in the compex loader?
3) do you think that the best solution is to make 1) or 2) work?
4) please review my port, I'll collect the comments and reset the 
patches!


I'll send my changes to openwrt in some minutes.

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


[OpenWrt-Devel] [PATCH 1/2] added board support for compex wpj558

2015-01-30 Thread Christian Mehlis
Signed-off-by: Christian Mehlis christ...@m3hlis.de
---
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   7 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   2 +
 target/linux/ar71xx/config-3.14|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-wpj558.c | 187 +
 target/linux/ar71xx/generic/profiles/compex.mk |  13 ++
 target/linux/ar71xx/image/Makefile |  11 +-
 .../507-MIPS-ath79-prom-add-myloader-support.patch |   5 +-
 .../610-MIPS-ath79-openwrt-machines.patch  |  25 ++-
 .../linux/generic/files/include/linux/myloader.h   |   1 +
 tools/firmware-utils/src/mkmylofw.c|   3 +
 tools/firmware-utils/src/myloader.h|   2 +
 13 files changed, 254 insertions(+), 9 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index af6107b..af53afd 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -288,6 +288,9 @@ get_status_led() {
wp543)
status_led=wp543:green:diag
;;
+   wpj558)
+   status_led=wpj558:green:sig3
+   ;;
wrt400n)
status_led=wrt400n:blue:wps
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index a223ae8..1d186de 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -359,6 +359,13 @@ wpe72)
ucidef_set_interfaces_lan_wan eth1 eth0
;;
 
+wpj558)
+   ucidef_set_interfaces_lan_wan eth0.1 eth0.2
+   ucidef_add_switch switch0 1 1
+   ucidef_add_switch_vlan switch0 1 5 6t
+   ucidef_add_switch_vlan switch0 2 1 6t
+   ;;
+
 ap121 |\
 ap121-mini |\
 ap96 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 02872de..4c6594f 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -747,6 +747,9 @@ ar71xx_board_detect() {
*WP543)
name=wp543
;;
+   *WPJ558)
+   name=wpj558
+   ;;
*WPE72)
name=wpe72
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index bc6866d..0db1625 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -408,6 +408,7 @@ platform_check_image() {
ja76pf | \
ja76pf2 | \
jwap003 | \
+   wpj558 | \
wp543 | \
wpe72)
[ $magic != 4349 ]  {
@@ -456,6 +457,7 @@ platform_do_upgrade() {
jwap003)
platform_do_upgrade_combined $ARGV
;;
+   wpj558|\
wp543|\
wpe72)
platform_do_upgrade_compex $ARGV
diff --git a/target/linux/ar71xx/config-3.14 b/target/linux/ar71xx/config-3.14
index 82b2d13..2d9873c 100644
--- a/target/linux/ar71xx/config-3.14
+++ b/target/linux/ar71xx/config-3.14
@@ -130,6 +130,7 @@ CONFIG_ATH79_MACH_WNR2000_V4=y
 CONFIG_ATH79_MACH_WNR2200=y
 CONFIG_ATH79_MACH_WP543=y
 CONFIG_ATH79_MACH_WPE72=y
+CONFIG_ATH79_MACH_WPJ558=y
 CONFIG_ATH79_MACH_WRT160NL=y
 CONFIG_ATH79_MACH_WRT400N=y
 CONFIG_ATH79_MACH_WZR_450HP2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c
new file mode 100644
index 000..a8310a7
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c
@@ -0,0 +1,187 @@
+/*
+ * Compex WPJ558 board support
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012 Gabor Juhos juh...@openwrt.org
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include linux/pci.h
+#include linux/phy.h
+#include linux/gpio.h
+#include linux/platform_device.h
+#include linux