Re: [OpenWrt-Devel] [PATCH v3] ramips: Add support for Netgear EX2700

2016-02-07 Thread John Crispin
Hi,

the patch is whitespace broken. please fix and resend

John

On 21/01/2016 23:23, Joseph C. Lehner wrote:
> This patch adds support for the Netgear EX2700 and builds an approriate
> sysupgrade image.
> 
> What's missing is the option to build a factory image flashable via the
> router's stock web interface, but this approach is hindered by the fact
> that u-boot operforms an additional integrity check, which expects a
> uImage header in the last 64 bytes of the "kernel" partition, which
> the bootloader expects to be 960k, a size exceeded by the standard
> OpenWrt kernel.
> 
> Signed-off-by: Joseph C. Lehner 
> 
> ---
> 
> Changes for v3:
> * Fix led name in /etc/board.d/01_leds
> * Cleanup device tree
> 
> Changes for v2:
> * Fix alphabetical ordering (image/Makefile is not really sorted, so I've
> put the EX2700 immediately below the E1700).
> 
> 
> 
> 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 c3a81a4..b10f5f1 100755
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -125,6 +125,10 @@ dir-810l|\
> mzk-dp150n)
> ucidef_set_led_default "power" "power" "$board:green:power" "1"
> ;;
> +ex2700)
> + ucidef_set_led_default "power_r" "POWER (red)" "$board:red:power" "0"
> + set_wifi_led "$board:green:router"
> + ;;
> f5d8235-v1|\
> f5d8235-v2)
> set_usb_led "$board:blue:storage"
> 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 dafa3e9..9853729 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -141,7 +141,8 @@ ramips_setup_interfaces()
> ucidef_add_switch "switch0" \
> "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
> ;;
> - cf-wr800n)
> + cf-wr800n|\
> + ex2700)
> ucidef_add_switch "switch0" \
> "4:lan" "6t@eth0"
> ;;
> diff --git a/target/linux/ramips/base-files/etc/diag.sh
> b/target/linux/ramips/base-files/etc/diag.sh
> index acc500b..59c5965 100644
> --- a/target/linux/ramips/base-files/etc/diag.sh
> +++ b/target/linux/ramips/base-files/etc/diag.sh
> @@ -34,6 +34,7 @@ get_status_led() {
> a5-v11|\
> d105|\
> dcs-930l-b1|\
> + ex2700|\
> hlk-rm04|\
> mpr-a1|\
> mpr-a2)
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh
> b/target/linux/ramips/base-files/lib/ramips.sh
> index 8025a40..aed8350 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -154,6 +154,9 @@ ramips_board_detect() {
> *"ESR-9753")
> name="esr-9753"
> ;;
> + *"EX2700")
> + name="ex2700";
> + ;;
> *"F5D8235 v1")
> name="f5d8235-v1"
> ;;
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> index 39b5f94..78edd22 100755
> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> @@ -51,6 +51,7 @@ platform_check_image() {
> dir-810l|\
> e1700|\
> esr-9753|\
> + ex2700|\
> f7c027|\
> firewrt|\
> fonera20n|\
> diff --git a/target/linux/ramips/dts/EX2700.dts 
> b/target/linux/ramips/dts/EX2700.dts
> new file mode 100644
> index 000..4b5a01a
> --- /dev/null
> +++ b/target/linux/ramips/dts/EX2700.dts
> @@ -0,0 +1,148 @@
> +/*
> + * Device Tree file for the Netgear EX2700
> + *
> + * Copyright (C) 2016 Joseph C. Lehner 
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +/dts-v1/;
> +
> +/include/ "mt7620a.dtsi"
> +
> +/ {
> + compatible = "ralink,mt7620a-soc";
> + model = "Netgear EX2700";
> +
> + chosen {
> + bootargs = "console=ttyS0,57600";
> + };
> +
> + palmbus@1000 {
> +
> + gpio0: gpio@600 {
> + status = "okay";
> + };
> +
> + gpio1: gpio@638 {
> + status = "okay";
> + };
> +
> + spi@b00 {
> + status = "okay";
> +
> + m25p80@0 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + compatible = "jedec,spi-nor";
> + reg = <0 0>;
> + linux,modalias = "m25p80", "mx25l3205d";
> + spi-max-frequency = <1000>;
> +
> + partition@0 {
> + label = "u-boot";
> + reg = <0x0 0x3>;
> + read-only;
> + };
> +
> + partition@3 {
> + label = "u-boot-env";
> + reg = <0x3 0x1>;
> + read-only;
> + };
> +
> + partition@4 {
> + label = "firmware";
> + reg = <0x4 0x3b>;
> + };
> +
> + art: partition@3f {
> + label = "art";
> + reg = <0x3f 0x1>;
> + read-only;
> + };
> + };
> + };
> + };
> +
> + ethernet@1010 {
> + mtd-mac-address = < 0x0>;
> + };
> +
> + wmac@1018 {
> + ralink,mtd-eeprom = < 0x1000>;
> + };
> +
> + pinctrl {
> + state_default: pinctrl0 {
> + default {
> + // spi refclk: pins 37, 38, 39
> + // uartf: pins 8, 9, 10, 11, 12, 13, 14

Re: [OpenWrt-Devel] [RFC] replace outdated udev by eudev?

2016-02-07 Thread John Crispin


On 07/02/2016 10:22, Daniel Golle wrote:
> The main reason why I'd like to have udev is persistent aliasing of
> (hotpluggable) serial devices like wwan modems and input devices; udev
> is required for libinput to build.

why dont we just add this to the procd code ?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] CC: ar71xx: add support for the TP-LINK TL-WR1043ND v3

2016-02-07 Thread Matthias Schiffer
On 02/07/2016 05:29 AM, Sven Roederer wrote:
> The hardware of the v3 is identical to the v2.
> 
> Based-on-patch-by: nbd (b9d5ee8)
> 
> - Backport to CC
> - add TPL-WR1043v3 to list of supported boards in config-menu
> - was tested for all 3 boards by freifunk-community Berlin
> 
> Signed-off-by: Sven Roederer 

Hi,
see my comments inline.

> ---
>  target/linux/ar71xx/image/Makefile | 22 
> ++
>  .../610-MIPS-ath79-openwrt-machines.patch  |  2 +-
>  2 files changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/target/linux/ar71xx/image/Makefile 
> b/target/linux/ar71xx/image/Makefile
> index 4336697..8805812 100644
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -598,6 +598,28 @@ define Device/tl-wr1041n-v2
>  endef
>  TARGET_DEVICES += tl-wr1041n-v2
>  
> +define Device/tl-wr1043nd-v1
> +$(Device/tplink-8m)
> +BOARDNAME := TL-WR1043ND
> +DEVICE_PROFILE := TLWR1043
> +TPLINK_HWID := 0x10430001
> +endef
> +
> +define Device/tl-wr1043nd-v2
> +$(Device/tplink-8mlzma)
> +BOARDNAME := TL-WR1043ND-v2
> +DEVICE_PROFILE := TLWR1043
> +TPLINK_HWID := 0x10430002
> +endef
> +
> +define Device/tl-wr1043nd-v3
> +$(Device/tplink-8mlzma)
> +BOARDNAME := TL-WR1043ND-v2
> +DEVICE_PROFILE := TLWR1043
> +TPLINK_HWID := 0x10430003
> +endef
> +TARGET_DEVICES += tl-wr1043nd-v1 tl-wr1043nd-v2 tl-wr1043nd-v3

This looks wrong. You are adding new-style definitions for all revisions
of the WR1043ND without removing the old-style definitions.

Either remove the old-style definitions, or just add an old-style
definition for the v3, like this:

https://github.com/freifunk-gluon/gluon/blob/master/patches/openwrt/0037-ar71xx-add-support-for-TP-Link-TL-WR1043ND-v3.patch

(on a related note: we have a lot of such backport patches in Gluon, I
should finally get down to submitting them here...)


> +
>  define Device/tl-wdr4900-v2
>  $(Device/tplink-8mlzma)
>  BOARDNAME := TL-WDR4900-v2
> diff --git 
> a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch 
> b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
> index 2fa041b..ca1b194 100644
> --- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
> +++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
> @@ -1268,7 +1268,7 @@
>  +select ATH79_DEV_WMAC
>  +
>  +config ATH79_MACH_TL_WR1043ND_V2
> -+bool "TP-LINK TL-WR1043ND v2 support"
> ++bool "TP-LINK TL-WR1043ND v2/v3 support"
>  +select SOC_QCA955X
>  +select ATH79_DEV_ETH
>  +select ATH79_DEV_GPIO_BUTTONS
> 
The Kconfig change is not necessary at all, these strings are never seen
by humans anyways (unless you use kernel_menuconfig or similar).

We could start to care, but this should be done in trunk first, and
there are many many more occurences of multiple models using the same
BOARDNAME (TL-WR741ND is used 7 times for some very different models,
I'm not sure if we want to list them all ;) ).

Thanks,
Matthias






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


Re: [OpenWrt-Devel] [RFC] replace outdated udev by eudev?

2016-02-07 Thread John Crispin


On 07/02/2016 10:22, Daniel Golle wrote:
> Hi!
> 
> I recently bumped into eudev, a fork of systemd-udev 220 which doesn't
> require all the rest of systemd. The gentoo folks came up with it as
> many of them still use OpenRC or SystemV init.
> It was easy to port it to OpenWrt by re-using and modifying the
> existing udev packaging. See
> https://github.com/openwrt/packages/pull/2354
> 
> However, there are some problems which I'd like to discuss:
> * PROVIDES and CONFLICTS doesn't work well in opkg and proper support
>   for alternative packages (except for build-variants) is missing in
>   buildroot. Any idea on how this could be fixed?
> * Why is udev-173 part of core? I can't see what actually depends on it
>   since udevtrigger is provided by procd for ages now.
> * eudev and udev conflict also in terms of InstallDev providing the
>   same header filenames and consuming packages expect to find them
>   there. This means they cannot co-exist in the same buildroot without
>   overwriting each others staging files...
> * We could just switch to eudev instead of the (unmaintained and
>   outdated) version of udev we currently got -- however,
> * eudev got almost twice of the binary size of udev...
> 
> The main reason why I'd like to have udev is persistent aliasing of
> (hotpluggable) serial devices like wwan modems and input devices; udev
> is required for libinput to build.
> 
> Please share your ideas and opinions on the issues above and whatever
> else comes to your mind when you think about udev and linux hotplug on
> OpenWrt!
> 
> 


maybe i am missing the point but why would you want udev on your system
in the first place ?


> Cheers
> 
> 
> Daniel
> ___
> 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] [RFC] replace outdated udev by eudev?

2016-02-07 Thread John Crispin


On 07/02/2016 10:53, Daniel Golle wrote:
> Hi John!
> 
> On Sun, Feb 07, 2016 at 10:28:25AM +0100, John Crispin wrote:
>> maybe i am missing the point but why would you want udev on your system
>> in the first place ?
> 
> There are situations when udev is currently the only way, such are:
> * more than one 3g/wwan/usb-serial device and the need to differentiate
>   them based on their serial number rather than on the order the kernel
>   probes them.
>   I really like those /dev/serial/by-id/ symlinks, because they prevent
>   comgt to try speaking with my solar-charger and collectd from trying
>   to query battery-voltage and PWM currents from the 3G modem -- both
>   are detected as usb-serial devices, thus /dev/ttyUSB* device nodes
>   are created in the order they are probed -- which differs e.g.
>   depending on cold start or warm reset of the OS.
> * similar things apply when having multiple V4L, ALSA or HID devices...
> * udev rules are needed for certain USB devices to be accessible for
>   non-root users
> 

which brings us back to my second question, why not add these features
to procd ? my experience is that these features can be implemented in
100 lines +/-


> I agree that the both implementations (udev and eudev) are over-bloated
> and I'm sure that the use-cases I'm interested in can be provided by
> a few dozend lines of code and a few kilobytes in binary instead of
> that 1.2M executable which includes support for all sorts of weird
> legacy stuff like 3.5" floppy drivers conencted via USB...
> 
> 
> Cheers
> 
> 
> Daniel
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC] replace outdated udev by eudev?

2016-02-07 Thread Daniel Golle
Hi John!

On Sun, Feb 07, 2016 at 10:28:25AM +0100, John Crispin wrote:
> maybe i am missing the point but why would you want udev on your system
> in the first place ?

There are situations when udev is currently the only way, such are:
* more than one 3g/wwan/usb-serial device and the need to differentiate
  them based on their serial number rather than on the order the kernel
  probes them.
  I really like those /dev/serial/by-id/ symlinks, because they prevent
  comgt to try speaking with my solar-charger and collectd from trying
  to query battery-voltage and PWM currents from the 3G modem -- both
  are detected as usb-serial devices, thus /dev/ttyUSB* device nodes
  are created in the order they are probed -- which differs e.g.
  depending on cold start or warm reset of the OS.
* similar things apply when having multiple V4L, ALSA or HID devices...
* udev rules are needed for certain USB devices to be accessible for
  non-root users

I agree that the both implementations (udev and eudev) are over-bloated
and I'm sure that the use-cases I'm interested in can be provided by
a few dozend lines of code and a few kilobytes in binary instead of
that 1.2M executable which includes support for all sorts of weird
legacy stuff like 3.5" floppy drivers conencted via USB...


Cheers


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


[OpenWrt-Devel] [PATCH] udev: include missing stdint.h header

2016-02-07 Thread Daniel Golle
udev failed to build due to an augmented dependency on certain targets,
as spotted on buildbot. Fix this by explicitely including stdint.h.

Signed-off-by: Daniel Golle 
---
http://buildbot.openwrt.org:8010/broken_packages/cns3xxx/udev/compile.txt
http://buildbot.openwrt.org:8010/broken_packages/oxnas/udev/compile.txt

 package/system/udev/patches/0004-mtd_probe-uses-stdint_h.patch | 10 ++
 1 file changed, 10 insertions(+)
 create mode 100644 
package/system/udev/patches/0004-mtd_probe-uses-stdint_h.patch

diff --git a/package/system/udev/patches/0004-mtd_probe-uses-stdint_h.patch 
b/package/system/udev/patches/0004-mtd_probe-uses-stdint_h.patch
new file mode 100644
index 000..3d02f01
--- /dev/null
+++ b/package/system/udev/patches/0004-mtd_probe-uses-stdint_h.patch
@@ -0,0 +1,10 @@
+--- a/extras/mtd_probe/mtd_probe.h
 b/extras/mtd_probe/mtd_probe.h
+@@ -18,6 +18,7 @@
+  */
+ 
+ #include 
++#include 
+ 
+ /* Full oob structure as written on the flash */
+ struct sm_oob {
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC] replace outdated udev by eudev?

2016-02-07 Thread Felix Fietkau
On 2016-02-07 10:22, Daniel Golle wrote:
> Hi!
> 
> I recently bumped into eudev, a fork of systemd-udev 220 which doesn't
> require all the rest of systemd. The gentoo folks came up with it as
> many of them still use OpenRC or SystemV init.
> It was easy to port it to OpenWrt by re-using and modifying the
> existing udev packaging. See
> https://github.com/openwrt/packages/pull/2354
> 
> However, there are some problems which I'd like to discuss:
> * PROVIDES and CONFLICTS doesn't work well in opkg and proper support
>   for alternative packages (except for build-variants) is missing in
>   buildroot. Any idea on how this could be fixed?
> * Why is udev-173 part of core? I can't see what actually depends on it
>   since udevtrigger is provided by procd for ages now.
I think it was probably simply forgotten - we should just delete it from
trunk.

> * eudev and udev conflict also in terms of InstallDev providing the
>   same header filenames and consuming packages expect to find them
>   there. This means they cannot co-exist in the same buildroot without
>   overwriting each others staging files...
> * We could just switch to eudev instead of the (unmaintained and
>   outdated) version of udev we currently got -- however,
> * eudev got almost twice of the binary size of udev...
I don't really care about the binary size increase, I don't think many
people need udev.

> The main reason why I'd like to have udev is persistent aliasing of
> (hotpluggable) serial devices like wwan modems and input devices; udev
> is required for libinput to build.
Interesting.

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


Re: [OpenWrt-Devel] [PATCH] x86: enable CONFIG_PWM

2016-02-07 Thread Felix Fietkau
On 2016-02-06 00:09, Dirk Neukirchen wrote:
> fixes buildbot error:
> linux-4.4/drivers/video/backlight/pwm_bl.ko' is missing
> 
> Signed-off-by: Dirk Neukirchen 
I think this should be handled via KCONFIG instead.

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


[OpenWrt-Devel] [PATCHv2] ar71xx: add support for the TP-LINK TL-WR1043ND v3

2016-02-07 Thread Sven Roederer
The hardware of the v3 is identical to the v2.

- adds support via old-style-definition. So less code is changed and there is 
less potential to break other projects
- based on 
https://github.com/freifunk-gluon/gluon/blob/master/patches/openwrt/0037-ar71xx-add-support-for-TP-Link-TL-WR1043ND-v3.patch
- also update Kconfig for this board

Signed-off-by: Sven Roederer 
---
 target/linux/ar71xx/image/Makefile | 3 ++-
 target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 4336697..61e62cd 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -2007,6 +2007,7 @@ $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR941NV4,tl-wr941nd-v4,TL-WR741ND,tt
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR1043V1,tl-wr1043nd-v1,TL-WR1043ND,ttyS0,115200,0x10430001,1,8M))
 
 $(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V2,tl-wr1043nd-v2,TL-WR1043ND-v2,ttyS0,115200,0x10430002,1,8M))
+$(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V3,tl-wr1043nd-v3,TL-WR1043ND-v2,ttyS0,115200,0x10430003,1,8M))
 $(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v
 3.13.99))
 
 $(eval $(call 
SingleProfile,TPLINK-SAFELOADER,64kraw,CPE510,cpe210-220-510-520,CPE510,ttyS0,115200,$$(cpe510_mtdlayout),CPE510))
@@ -2071,7 +2072,7 @@ $(eval $(call MultiProfile,TLWR743,TLWR743NV1))
 $(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 
TLWR841NV7))
 $(eval $(call MultiProfile,TLWR842,TLWR842V1))
 $(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4))
-$(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2))
+$(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2 TLWR1043V3))
 $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 
TLWDR4300V1IL TLWDR4310V1 MW4530RV1))
 $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
 $(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 
UBNTBULLETM UBNTROCKETM UBNTROCKETMXW UBNTNANOM UBNTNANOMXW UBNTLOCOXW 
UBNTUNIFI UBNTUNIFIOUTDOOR UBNTUNIFIOUTDOORPLUS UAPPRO UBNTAIRGW))
diff --git 
a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch 
b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
index 2fa041b..ca1b194 100644
--- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
+++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
@@ -1268,7 +1268,7 @@
 +  select ATH79_DEV_WMAC
 +
 +config ATH79_MACH_TL_WR1043ND_V2
-+  bool "TP-LINK TL-WR1043ND v2 support"
++  bool "TP-LINK TL-WR1043ND v2/v3 support"
 +  select SOC_QCA955X
 +  select ATH79_DEV_ETH
 +  select ATH79_DEV_GPIO_BUTTONS
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC] replace outdated udev by eudev?

2016-02-07 Thread Daniel Golle
Hi John,

On Sun, Feb 07, 2016 at 11:03:16AM +0100, John Crispin wrote:
> >> maybe i am missing the point but why would you want udev on your system
> >> in the first place ?
> > 
> > There are situations when udev is currently the only way, such are:
> > * more than one 3g/wwan/usb-serial device and the need to differentiate
> >   them based on their serial number rather than on the order the kernel
> >   probes them.
> >   I really like those /dev/serial/by-id/ symlinks, because they prevent
> >   comgt to try speaking with my solar-charger and collectd from trying
> >   to query battery-voltage and PWM currents from the 3G modem -- both
> >   are detected as usb-serial devices, thus /dev/ttyUSB* device nodes
> >   are created in the order they are probed -- which differs e.g.
> >   depending on cold start or warm reset of the OS.
> > * similar things apply when having multiple V4L, ALSA or HID devices...
> > * udev rules are needed for certain USB devices to be accessible for
> >   non-root users
> > 
> 
> which brings us back to my second question, why not add these features
> to procd ? my experience is that these features can be implemented in
> 100 lines +/-

I agree that I'd be quite easy to sort-out the persistent aliases for
serial and all sorts of other devices.

However, e.g. libinput uses a quite wide set of udev's functions:
udev_enumerate_scan_devices
udev_device_get_action
udev_enumerate_unref
udev_device_new_from_devnum
udev_device_get_devnode
udev_enumerate_add_match_subsystem
udev_device_ref
udev_monitor_receive_device
udev_device_new_from_syspath
udev_new
udev_device_get_udev
udev_enumerate_new
udev_device_get_parent
udev_enumerate_get_list_entry
udev_unref
udev_device_get_sysname
udev_device_get_syspath
udev_monitor_new_from_netlink
udev_ref
udev_list_entry_get_name
udev_list_entry_get_next
udev_device_get_property_value
udev_monitor_get_fd
udev_monitor_filter_add_match_subsystem_devtype
udev_device_unref
udev_monitor_unref
udev_device_get_is_initialized
udev_monitor_enable_receiving

So re-implementing all of this seems overkill to me...
And I'd really like to see Wayland/weston on OpenWrt targets capable of
providing a GUI (and not just on RaspbPi). Wait for better days?
Stick to lcdproc and directfb?
Many routers (3g/mobile as well as top-edge home-user devices) come
with small touch-screens in our days, I'd like to see that supported in
some way, and preferably not by re-implementing the whole graphics and
input stack yet another time (unless some really feels like going into
that)


Cheers


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


Re: [OpenWrt-Devel] [RFC] replace outdated udev by eudev?

2016-02-07 Thread Daniel Golle
Hi John,

On Sun, Feb 07, 2016 at 11:33:00AM +0100, John Crispin wrote:
> >> which brings us back to my second question, why not add these features
> >> to procd ? my experience is that these features can be implemented in
> >> 100 lines +/-
> > 
> > I agree that I'd be quite easy to sort-out the persistent aliases for
> > serial and all sorts of other devices.

I shall investigate and maybe suggest an implementation for persistent
aliases of serial devices inside procd within the next weeks.

> > However, e.g. libinput uses a quite wide set of udev's functions:
> > [...]
> ah ok, you are building desktop stuff. i dont really care in that case.
> it thought you wanted to run udev on a router which made me wonder.

Ok, so I'd suggest to drop udev from OpenWrt core and provide eudev via
the packages feed for things which require it beyond the core use-cases
OpenWrt is designed for. Does that sound agreeable to everyone?


About the GUI libraries, please consider devices like those:

This 4" touch-screen doesn't exactly make it a desktop device, I'm not
planning to run libreoffice and firefox on top of Gnome shell and all
that... it's still a special-purpose thing, just that it warns you when
your shitty smart TV calls home or shows some bandwidth graphs, allows
you to enter credentials for authentication with the ISP or provide a
password for cryptsetup storage on your NAS box -- in a way which
doesn't depend on other devices (usually running a vulnerable browser
and a proprietary or at least tainted OS) to be free from keyloggers,
rootkits and all that...

OpenWrt is a nice platform for all sorts of so-called 'IoT' stuff which
in some cases could use udev for meaningful things and yet it's not at
all a desktop system -- think of printers, scanners, IoT remotes with
touch-screens, fridges, coffee-machines and also (outdated) mobile
phones running vanilla Linux like the Nokia N9 and yet no useful
minimalistic GUI... I'd love to see EFL on top of OpenWrt running on
the N9 without all the bloat of Android, Tizen, MER, megoo and
what-not...



Cheers


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


[OpenWrt-Devel] [PATCH] openconnect: add mising liblz4 dependency

2016-02-07 Thread Mauro Carvalho Chehab
Fixes the following build issue:
find 
openwrt/build_dir/target-mips_34kc_musl-1.1.12/openconnect-7.06/ipkg-ar71xx/openconnect
 -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Package openconnect is missing dependencies for the following libraries:
liblz4.so.1

Signed-off-by: Mauro Carvalho Chehab 
---
 net/openconnect/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/openconnect/Makefile b/net/openconnect/Makefile
index 33f107861f48..ca24ddf59a88 100644
--- a/net/openconnect/Makefile
+++ b/net/openconnect/Makefile
@@ -30,7 +30,7 @@ endef
 define Package/openconnect
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libxml2 +kmod-tun +resolveip +vpnc-scripts 
+OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_GNUTLS:libgnutls 
+OPENCONNECT_STOKEN:libstoken
+  DEPENDS:=+libxml2 +kmod-tun +resolveip +vpnc-scripts 
+OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_GNUTLS:libgnutls 
+OPENCONNECT_STOKEN:libstoken +liblz4
   TITLE:=OpenConnect VPN client (Cisco AnyConnect compatible)
   MAINTAINER:=Nikos Mavrogiannopoulos 
   URL:=http://www.infradead.org/openconnect/
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Patches to fix kernel panic in Yuncore XD3200 initial commit.

2016-02-07 Thread Felix Fietkau
On 2016-01-31 05:31, Jeff Wischkaemper wrote:
> Signed-off-by: Jeff Wischkaemper 
Please send a new patch combining the original change + this patch.
Also, please fix the patch subject, it should be something like:
ar71xx: add support for Yuncore XD3200

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


[OpenWrt-Devel] [PATCH RESEND] openconnect: add mising liblz4 dependency

2016-02-07 Thread Mauro Carvalho Chehab
Fixes the following build issue:
find 
openwrt/build_dir/target-mips_34kc_musl-1.1.12/openconnect-7.06/ipkg-ar71xx/openconnect
 -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
Package openconnect is missing dependencies for the following libraries:
liblz4.so.1

Signed-off-by: Mauro Carvalho Chehab 
---

Patch was not sent to the openconnect maintainer. Resending it.

 net/openconnect/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/openconnect/Makefile b/net/openconnect/Makefile
index 33f107861f48..ca24ddf59a88 100644
--- a/net/openconnect/Makefile
+++ b/net/openconnect/Makefile
@@ -30,7 +30,7 @@ endef
 define Package/openconnect
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libxml2 +kmod-tun +resolveip +vpnc-scripts 
+OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_GNUTLS:libgnutls 
+OPENCONNECT_STOKEN:libstoken
+  DEPENDS:=+libxml2 +kmod-tun +resolveip +vpnc-scripts 
+OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_GNUTLS:libgnutls 
+OPENCONNECT_STOKEN:libstoken +liblz4
   TITLE:=OpenConnect VPN client (Cisco AnyConnect compatible)
   MAINTAINER:=Nikos Mavrogiannopoulos 
   URL:=http://www.infradead.org/openconnect/
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] ISC-DHCP server removed from Chaos Calmer packages, why?

2016-02-07 Thread Janne Cederberg
Greetings!
I was curious to the reason why the ISC-DHCP server seems to have been
removed from Chaos Calmer packages; tried to find info in mailing list
archive and by general googling but was unable to.

Anyone know why it was removed?

BACKGROUND:
Dnsmasq (at least on Barrier Breaker) isn't too fast on handling multiple
parallel DHCP requests. I understood the isc-dhcp-server-ipv4 would be
better suited for this and more performant and was researching
using/switching to it.

Has the DHCP functionality of Dnsmasq possibly been improved in Chaos
Calmer? Any other comments/suggestions?

Best regards,

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


Re: [OpenWrt-Devel] [PATCH] CC: ar71xx: add support for the TP-LINK TL-WR1043ND v3

2016-02-07 Thread Sven Roederer
Hi,

you are right regarding the old-style vs. new-style. I have seen this, but 
forgot about. I'll fix this with a new patch.

The Kconfig-stuff is indeed only cosmetic, but as is will not break anything I 
think it's ok. There might be no general rule if all models should be listed 
or just some examples. It may depend on the number of models for this board 
and personal mood.

I prefer upstreaming working patches, to have others taking advantage of this 
work more easily.

Sven

Am Sunday 07 February 2016, 09:00:19 schrieben Sie:
> 
> This looks wrong. You are adding new-style definitions for all revisions
> of the WR1043ND without removing the old-style definitions.
> 

> 
> The Kconfig change is not necessary at all, these strings are never seen
> by humans anyways (unless you use kernel_menuconfig or similar).
> 


signature.asc
Description: This is a digitally signed message part.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC] replace outdated udev by eudev?

2016-02-07 Thread John Crispin


On 07/02/2016 11:29, Daniel Golle wrote:
> Hi John,
> 
> On Sun, Feb 07, 2016 at 11:03:16AM +0100, John Crispin wrote:
 maybe i am missing the point but why would you want udev on your system
 in the first place ?
>>>
>>> There are situations when udev is currently the only way, such are:
>>> * more than one 3g/wwan/usb-serial device and the need to differentiate
>>>   them based on their serial number rather than on the order the kernel
>>>   probes them.
>>>   I really like those /dev/serial/by-id/ symlinks, because they prevent
>>>   comgt to try speaking with my solar-charger and collectd from trying
>>>   to query battery-voltage and PWM currents from the 3G modem -- both
>>>   are detected as usb-serial devices, thus /dev/ttyUSB* device nodes
>>>   are created in the order they are probed -- which differs e.g.
>>>   depending on cold start or warm reset of the OS.
>>> * similar things apply when having multiple V4L, ALSA or HID devices...
>>> * udev rules are needed for certain USB devices to be accessible for
>>>   non-root users
>>>
>>
>> which brings us back to my second question, why not add these features
>> to procd ? my experience is that these features can be implemented in
>> 100 lines +/-
> 
> I agree that I'd be quite easy to sort-out the persistent aliases for
> serial and all sorts of other devices.
> 
> However, e.g. libinput uses a quite wide set of udev's functions:
> udev_enumerate_scan_devices
> udev_device_get_action
> udev_enumerate_unref
> udev_device_new_from_devnum
> udev_device_get_devnode
> udev_enumerate_add_match_subsystem
> udev_device_ref
> udev_monitor_receive_device
> udev_device_new_from_syspath
> udev_new
> udev_device_get_udev
> udev_enumerate_new
> udev_device_get_parent
> udev_enumerate_get_list_entry
> udev_unref
> udev_device_get_sysname
> udev_device_get_syspath
> udev_monitor_new_from_netlink
> udev_ref
> udev_list_entry_get_name
> udev_list_entry_get_next
> udev_device_get_property_value
> udev_monitor_get_fd
> udev_monitor_filter_add_match_subsystem_devtype
> udev_device_unref
> udev_monitor_unref
> udev_device_get_is_initialized
> udev_monitor_enable_receiving
> 
> So re-implementing all of this seems overkill to me...
> And I'd really like to see Wayland/weston on OpenWrt targets capable of
> providing a GUI (and not just on RaspbPi). Wait for better days?
> Stick to lcdproc and directfb?
> Many routers (3g/mobile as well as top-edge home-user devices) come
> with small touch-screens in our days, I'd like to see that supported in
> some way, and preferably not by re-implementing the whole graphics and
> input stack yet another time (unless some really feels like going into
> that)
> 

ah ok, you are building desktop stuff. i dont really care in that case.
it thought you wanted to run udev on a router which made me wonder.



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


Re: [OpenWrt-Devel] ISC-DHCP server removed from Chaos Calmer packages, why?

2016-02-07 Thread Hannu Nyman

Janne Cederberg wrote at Sun Feb 7 11:46:05 CET 2016
> I was curious to the reason why the ISC-DHCP server seems to have been 
removed from Chaos Calmer packages; tried to find info in mailing list 
archive and by general googling but was unable to.


That is the effect of the move to a new packages feeds repository two years ago.
https://lists.openwrt.org/pipermail/openwrt-devel/2014-June/025810.html
https://forum.openwrt.org/viewtopic.php?id=52219

Nobody has been willing to maintain the the isc-dhcp package, so it has been 
left at the "oldpackages" repo.

http://git.openwrt.org/?p=packages.git;a=summary
http://git.openwrt.org/?p=packages.git;a=blob;f=net/isc-dhcp/Makefile;hb=HEAD

"oldpackages" have not been compiled for CC15.05 (or for trunk snapshots), 
but you can enable the feed in your own build environment.


If you want the package imported to the current packages feed at Github, you 
could assume its maintainership and create a pull request at Github.

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


Re: [OpenWrt-Devel] [PATCH] Added support for TL-WA801NDv3

2016-02-07 Thread John Crispin
Hi,

2 small nitpicks

1) please prefix the subject with "ar71xx:"

[...]

> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h 
> b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> index a170e8d..967a012 100644
> --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
> @@ -161,12 +161,13 @@ enum ath79_mach_type {
>   ATH79_MACH_TL_MR3420_V2,/* TP-LINK TL-MR3420 v2 */
>   ATH79_MACH_TL_WA701ND_V2,   /* TP-LINK TL-WA701ND v2 */
>   ATH79_MACH_TL_WA750RE,  /* TP-LINK TL-WA750RE */
> -   ATH79_MACH_TL_WA7210N_V2,   /* TP-LINK TL-WA7210N v2 */
> + ATH79_MACH_TL_WA7210N_V2,   /* TP-LINK TL-WA7210N v2 */
>   ATH79_MACH_TL_WA7510N_V1,   /* TP-LINK TL-WA7510N v1*/
>   ATH79_MACH_TL_WA850RE,  /* TP-LINK TL-WA850RE */
>   ATH79_MACH_TL_WA860RE,  /* TP-LINK TL-WA860RE */
>   ATH79_MACH_TL_WA801ND_V2,   /* TP-LINK TL-WA801ND v2 */
>   ATH79_MACH_TL_WA830RE_V2,   /* TP-LINK TL-WA830RE v2 */
> + ATH79_MACH_TL_WA801ND_V3,   /* TP-LINK TL-WA801ND v3 */
>   ATH79_MACH_TL_WA901ND,  /* TP-LINK TL-WA901ND */
>   ATH79_MACH_TL_WA901ND_V2,   /* TP-LINK TL-WA901ND v2 */
>   ATH79_MACH_TL_WA901ND_V3,   /* TP-LINK TL-WA901ND v3 */

2) the whitespace fix is great but please put it into a separate patch.

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


Re: [OpenWrt-Devel] [PATCH RESEND] openconnect: add mising liblz4 dependency

2016-02-07 Thread John Crispin
this package is hosted on github. please submit the patch there



On 07/02/2016 14:17, Mauro Carvalho Chehab wrote:
> Fixes the following build issue:
>   find 
> openwrt/build_dir/target-mips_34kc_musl-1.1.12/openconnect-7.06/ipkg-ar71xx/openconnect
>  -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| xargs -r rm -rf
>   Package openconnect is missing dependencies for the following libraries:
>   liblz4.so.1
> 
> Signed-off-by: Mauro Carvalho Chehab 
> ---
> 
> Patch was not sent to the openconnect maintainer. Resending it.
> 
>  net/openconnect/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/openconnect/Makefile b/net/openconnect/Makefile
> index 33f107861f48..ca24ddf59a88 100644
> --- a/net/openconnect/Makefile
> +++ b/net/openconnect/Makefile
> @@ -30,7 +30,7 @@ endef
>  define Package/openconnect
>SECTION:=net
>CATEGORY:=Network
> -  DEPENDS:=+libxml2 +kmod-tun +resolveip +vpnc-scripts 
> +OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_GNUTLS:libgnutls 
> +OPENCONNECT_STOKEN:libstoken
> +  DEPENDS:=+libxml2 +kmod-tun +resolveip +vpnc-scripts 
> +OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_GNUTLS:libgnutls 
> +OPENCONNECT_STOKEN:libstoken +liblz4
>TITLE:=OpenConnect VPN client (Cisco AnyConnect compatible)
>MAINTAINER:=Nikos Mavrogiannopoulos 
>URL:=http://www.infradead.org/openconnect/
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v4 6/8] ar71xx: WNR2000v3: exclude USB modules from image

2016-02-07 Thread John Crispin


On 01/02/2016 22:59, Michal wrote:
> From: Michal Cieslakiewicz 
> Subject: [PATCH v4 6/8] ar71xx: WNR2000v3: exclude USB modules from image
> 
> Netgear WNR2000v3 has no USB port yet default system image
> includes USB kernel modules. This patch fixes that.
> 
> Signed-off-by: Michal Cieslakiewicz 
> ---
>  target/linux/ar71xx/generic/profiles/netgear.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target/linux/ar71xx/generic/profiles/netgear.mk 
> b/target/linux/ar71xx/generic/profiles/netgear.mk
> index ca22a18..0b05adf 100644
> --- a/target/linux/ar71xx/generic/profiles/netgear.mk
> +++ b/target/linux/ar71xx/generic/profiles/netgear.mk
> @@ -30,6 +30,7 @@ $(eval $(call Profile,WNDR3700))
>  
>  define Profile/WNR2000V3
>   NAME:=NETGEAR WNR2000V3
> + PACKAGES:=

Hi

dont override the whole variable please. you can deselect specifc
packages by placing a "-" in front of the name.

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


[OpenWrt-Devel] [PATCH] ramips: set read-only flag to u-boot partition on Xiaomi MiWiFi Mini

2016-02-07 Thread Tom Psyborg
Current device profile allows overwriting u-boot partition, setting
read-only flag will prevent mtd device unlock and thus accidental partition
overwrite.

Signed-off-by: Tomislav Požega 
---
Same fix is required in CC branch.

PATCH

diff -purN a/target/linux/ramips/dts/MIWIFI-MINI.dts
b/target/linux/ramips/dts/MIWIFI-MINI.dts
--- a/target/linux/ramips/dts/MIWIFI-MINI.dts 2016-02-08 04:57:37.567841929
+0100
+++ b/target/linux/ramips/dts/MIWIFI-MINI.dts 2016-02-08 04:58:04.271972487
+0100
@@ -37,6 +37,7 @@
  partition@0 {
  label = "u-boot";
  reg = <0x0 0x3>;
+ read-only;
  };

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


[OpenWrt-Devel] [PATCH] packages: fix airmon-ng output in multi bssid mode

2016-02-07 Thread Tom Psyborg
Create a patch that removes the output of unnecessary interface
informations which occur if the radio broadcasts more than one ssid to
speed up the operation and provide clean output. Also removes scanProcesses
function to get rid of the busybox output garbage.

Signed-off-by: Tomislav Požega 
---
Removing the scanProcesses function should not affect the operations since
the function is intended for distributions that use external
network-managers and daemons. Same fix is required in CC branch.

Patch

diff -purN
a/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
b/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
---
a/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
1970-01-01
01:00:00.0 +0100
+++
b/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
2016-02-08
03:21:30.743649000 +0100
@@ -0,0 +1,105 @@
+--- a/scripts/airmon-ng 2014-10-31 21:39:43.0 +0100
 b/scripts/airmon-ng 2016-02-08 03:13:34.221319763 +0100
+@@ -101,67 +101,6 @@ getDriver() {
+
+ }
+
+-scanProcesses() {
+-if [ -f "`which service 2>&1`" ] && [ x"$1" = "xkill" ]
+-then
+- service network-manager stop 2>/dev/null >/dev/null
+- service avahi-daemon stop 2>/dev/null >/dev/null
+-fi
+-
+-match=`ps -A -o comm= | grep $PROCESSES | grep -v grep | wc -l`
+-if [ $match -gt 0 -a x"$1" != "xkill" ]
+-then
+-printf "\n\n"
+-echo "Found $match processes that could cause trouble."
+-echo "If airodump-ng, aireplay-ng or airtun-ng stops working
after"
+-echo "a short period of time, you may want to kill (some of)
them!"
+-echo -e "\nPID\tName"
+-else
+-if [ x"$1" != "xkill" ]
+-then
+-return
+-fi
+-fi
+-
+-if [ $match -gt 0 -a x"$1" = "xkill" ]
+-then
+-echo "Killing all those processes..."
+-fi
+-
+-i=1
+-while [ $i -le $match ]
+-do
+-pid=`ps -A -o pid= -o comm= | grep $PROCESSES | grep -v grep |
head -n $i | tail -n 1 | awk '{print $1}'`
+-pname=`ps -A -o pid= -o comm= | grep $PROCESSES | grep -v grep |
head -n $i | tail -n 1 | awk '{print $2}'`
+-if [ x"$1" != "xkill" ]
+-then
+-printf "$pid\t$pname\n"
+-else
+-kill $pid
+-fi
+-i=$(($i+1))
+-done
+-}
+-
+-checkProcessesIface() {
+-if [ x"$1" = "x" ]
+-then
+-return
+-fi
+-
+-match2=`ps -o comm= -p 1 2>&1 | grep $PS_ERROR | grep -v grep | wc -l`
+-if [ $match2 -gt 0 ]
+-then
+- return
+-fi
+-
+-for i in `ps auxw | grep $1 | grep -v "grep" | grep -v "airmon-ng" |
awk '{print $2}'`
+-do
+-pname=`ps -o comm= -p $i`
+-echo "Process with PID $i ($pname) is running on interface $1"
+-done
+-}
+-
+ getStack() {
+ if [ x"$1" = "x" ]
+ then
+@@ -505,22 +444,15 @@ iwpriv > /dev/null 2> /dev/null ||
+
+ if [ x"$1" = "xcheck" ] || [ x"$1" = "xstart" ]
+ then
+-scanProcesses
+-for iface in `iwconfig 2>/dev/null | egrep
'(IEEE|ESSID|802\.11|WLAN)' | sed 's/^\([a-zA-Z0-9_.]*\) .*/\1/' | grep -v
wifi`
++for iface in `iwconfig 2>/dev/null | egrep
'(IEEE|ESSID|802\.11|WLAN)' | sed 's/^\([a-zA-Z0-9_-]*\) .*/\1/' | grep -v
wifi`
+ do
+-# getModule $iface
+-# getDriver $iface
+-checkProcessesIface $iface
+-done
+
+-if [ x"$2" = "xkill" ]
+-then
+-scanProcesses "$2"
+-fi
+ if [ x"$1" = "xcheck" ]
+ then
+ exit
+ fi
++
++done
+ fi
+
+ printf "\n\n"
+@@ -605,7 +537,7 @@ then
+ sleep 1s
+ fi
+
+-for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|WLAN)' |
sed 's/^\([a-zA-Z0-9_.]*\) .*/\1/' | grep -v wifi`
++for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|WLAN)' |
sed 's/^\([a-zA-Z0-9_-]*\) .*/\1/' | grep -v wifi`
+ do
+  getModule  $iface
+  getDriver  $iface
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: fix device names in GL-AR150 and GL-AR300 profiles

2016-02-07 Thread Tom Psyborg
Fix names displayed in the main Luci page for GL-AR150 and GL-AR300 devices.

Signed-off-by: Tomislav Požega 
---

Patch

diff -pur a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh 2016-02-05
08:17:54.907348279 +0100
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh 2016-02-05
08:34:24.488186080 +0100
@@ -503,10 +503,10 @@ ar71xx_board_detect() {
  name="gl-inet"
  gl_inet_board_detect
  ;;
- *"GL AR150")
+ *"GL-AR150")
  name="gl-ar150"
  ;;
- *"GL AR300")
+ *"GL-AR300")
  name="gl-ar300"
  ;;
  *"EnGenius EPG5000")
diff -pur a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 2016-02-05
08:25:30.205574118 +0100
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 2016-02-05
08:33:47.392004734 +0100
@@ -547,7 +547,7 @@ config ATH79_MACH_EL_MINI
  select ATH79_DEV_WMAC

 config ATH79_MACH_GL_AR150
- bool "GL AR150 support"
+ bool "GL-AR150 support"
  select SOC_AR933X
  select ATH79_DEV_ETH
  select ATH79_DEV_GPIO_BUTTONS
@@ -557,7 +557,7 @@ config ATH79_MACH_GL_AR150
  select ATH79_DEV_WMAC

 config ATH79_MACH_GL_AR300
- bool "GL_AR300 support"
+ bool "GL-AR300 support"
  select SOC_AR934X
  select ATH79_DEV_ETH
  select ATH79_DEV_GPIO_BUTTONS
diff -pur a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c 2016-02-05
08:23:48.561077207 +0100
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c 2016-02-05
08:30:56.807170793 +0100
@@ -122,4 +122,4 @@ static void __init gl_ar150_setup(void)
  ath79_register_wmac(art + GL_AR150_CALDATA_OFFSET, art +
GL_AR150_WMAC_MAC_OFFSET);
 }

-MIPS_MACHINE(ATH79_MACH_GL_AR150, "GL-AR150", "GL AR150",gl_ar150_setup);
+MIPS_MACHINE(ATH79_MACH_GL_AR150, "GL-AR150", "GL-AR150",gl_ar150_setup);
diff -pur a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c 2016-02-04
03:10:39.860872000 +0100
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c 2016-02-05
08:35:30.844510514 +0100
@@ -100,4 +100,4 @@ static void __init gl_ar300_setup(void)
  ath79_register_wmac(art + GL_AR300_CALDATA_OFFSET, art +
GL_AR300_WMAC_MAC_OFFSET);
 }

-MIPS_MACHINE(ATH79_MACH_GL_AR300, "GL-AR300", "GL AR300",gl_ar300_setup);
+MIPS_MACHINE(ATH79_MACH_GL_AR300, "GL-AR300", "GL-AR300",gl_ar300_setup);
diff -pur a/target/linux/ar71xx/generic/profiles/gli.mk
b/target/linux/ar71xx/generic/profiles/gli.mk
--- a/target/linux/ar71xx/generic/profiles/gli.mk 2016-02-05
08:20:46.872188948 +0100
+++ b/target/linux/ar71xx/generic/profiles/gli.mk 2016-02-05
08:32:23.759595824 +0100
@@ -16,23 +16,23 @@ endef
 $(eval $(call Profile,GLINET))

 define Profile/GL-AR150
- NAME:=GL AR150
+ NAME:=GL-AR150
  PACKAGES:=kmod-usb-core kmod-usb2
 endef

 define Profile/GL-AR150/Description
- Configuration of GL AR150.
+ Configuration of GL-AR150.
 endef

 $(eval $(call Profile,GL-AR150))

 define Profile/GL-AR300
- NAME:=GL AR300
+ NAME:=GL-AR300
  PACKAGES:=kmod-usb-core kmod-usb2
 endef

 define Profile/GL-AR300/Description
- Configuration of GL AR300.
+ Configuration of GL-AR300.
 endef

 $(eval $(call Profile,GL-AR300))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] oldpackages: fix mdk3 build issue

2016-02-07 Thread Tom Psyborg
Create a patch that fixes an issue with mdk3 package that would break build
process with -Werror=format-security message. Closes ticket
https://dev.openwrt.org/ticket/20698

Signed-off-by: Tomislav Požega 
---

Patch

diff -purN a/feeds/oldpackages/net/mdk3/patches/030-werror.patch
b/feeds/oldpackages/net/mdk3/patches/030-werror.patch
--- a/feeds/oldpackages/net/mdk3/patches/030-werror.patch 1970-01-01
01:00:00.0 +0100
+++ b/feeds/oldpackages/net/mdk3/patches/030-werror.patch 2016-02-03
02:41:03.542276000 +0100
@@ -0,0 +1,238 @@
+--- a/mdk3.c 2015-10-07 17:08:02.49786 +0200
 b/mdk3.c 2015-10-07 17:02:15.071857000 +0200
+@@ -3390,7 +3390,7 @@ int mdk_parser(int argc, char *argv[])
+
+ if ((argc < 3) || (strlen(argv[2]) != 1))
+ {
+- printf(use_head);
++ printf("%s", use_head);
+ return -1;
+ }
+
+@@ -3406,11 +3406,11 @@ int mdk_parser(int argc, char *argv[])
+if (! strcmp(argv[t], "-n")) if (argc > t+1) ssid = argv[t+1];
+if (! strcmp(argv[t], "-f")) if (argc > t+1) {
+ if (ssid_file_name == NULL) ssid_file_name = argv[t+1];
+- else { printf(use_beac); return -1; }
++ else { printf("%s", use_beac); return -1; }
+}
+if (! strcmp(argv[t], "-v")) if (argc > t+1) {
+ if (ssid_file_name == NULL) { ssid_file_name = argv[t+1]; adv=1; }
+- else { printf(use_beac); return -1; }
++ else { printf("%s", use_beac); return -1; }
+}
+if (! strcmp(argv[t], "-s")) if (argc > t+1) pps = strtol(argv[t+1],
(char **) NULL, 10);
+if (! strcmp(argv[t], "-c")) if (argc > t+1) fchan = strtol(argv[t+1],
(char **) NULL, 10);
+@@ -3428,12 +3428,12 @@ int mdk_parser(int argc, char *argv[])
+ for (t=3; t t+1) { printf(use_auth); return -1; }
++  if (! argc > t+1) { printf("%s", use_auth); return -1; }
+  ap = (uchar *) parse_mac(argv[t+1]);
+  mode = 'A';
+}
+ if (! strcmp(argv[t], "-i")) {
+-  if (! argc > t+1) { printf(use_auth); return -1; }
++  if (! argc > t+1) { printf("%s", use_auth); return -1; }
+  target = (uchar *) parse_mac(argv[t+1]);
+  mode = 'i';
+  usespeed = 1; pps = 500;
+@@ -3491,7 +3491,7 @@ int mdk_parser(int argc, char *argv[])
+ printf("\nSSID Wordlist Mode activated!\n");
+}
+if (! strcmp(argv[t], "-t")) {
+- if (! argc > t+1) { printf(use_prob); return -1; }
++ if (! argc > t+1) { printf("%s", use_prob); return -1; }
+ target = (uchar *) parse_mac(argv[t+1]);
+}
+if (! strcmp(argv[t], "-s")) if (argc > t+1) {
+@@ -3532,7 +3532,7 @@ int mdk_parser(int argc, char *argv[])
+ for (t=3; t t+1)) { printf(use_mich); return -1; }
++ if (! (argc > t+1)) { printf("%s", use_mich); return -1; }
+ target = (uchar *) parse_mac(argv[t+1]);
+}
+if (! strcmp(argv[t], "-n")) if (argc > t+1) {
+@@ -3552,7 +3552,7 @@ int mdk_parser(int argc, char *argv[])
+ break;
+ case 'x':
+ mode = 'x';
+-if (argc < 4) { printf(use_eapo); return -1; }
++if (argc < 4) { printf("%s", use_eapo); return -1; }
+ eapol_test = strtol(argv[3], (char **) NULL, 10);
+ usespeed = 1;
+ pps = 400;
+@@ -3562,16 +3562,16 @@ int mdk_parser(int argc, char *argv[])
+ for (t=4; t t+1)) { printf(use_eapo); return -1; }
++  if (! (argc > t+1)) { printf("%s", use_eapo); return -1; }
+   ssid = argv[t + 1];
+}
+if (! strcmp(argv[t], "-t")) {
+- if (! (argc > t+1)) { printf(use_eapo); return -1; }
++ if (! (argc > t+1)) { printf("%s", use_eapo); return -1; }
+ target = (uchar *) parse_mac(argv[t+1]);
+ memcpy(eapol_dst, target, ETH_MAC_LEN);
+}
+if (! strcmp(argv[t], "-c")) {
+- if (! (argc > t+1)) { printf(use_eapo); return -1; }
++ if (! (argc > t+1)) { printf("%s", use_eapo); return -1; }
+ mac_sa = (uchar *) parse_mac(argv[t+1]);
+ memcpy(eapol_src, mac_sa, ETH_MAC_LEN);
+}
+@@ -3599,13 +3599,13 @@ int mdk_parser(int argc, char *argv[])
+ usespeed = 1;
+}
+if (! strcmp(argv[t], "-w")) if (argc > t+1) {
+- if (wblist != 0) { printf(use_deau); return -1; }
++ if (wblist != 0) { printf("%s", use_deau); return -1; }
+ load_whitelist(argv[t+1]);
+ list_file = argv[t+1];
+ wblist = 1;
+}
+if (! strcmp(argv[t], "-b")) if (argc > t+1) {
+- if (wblist != 0) { printf(use_deau); return -1; }
++ if (wblist != 0) { printf("%s", use_deau); return -1; }
+ load_whitelist(argv[t+1]);
+ list_file = argv[t+1];
+ wblist = 2;
+@@ -3627,17 +3627,17 @@ int mdk_parser(int argc, char *argv[])
+ for (t=3; t t+1)) { printf(use_macb); return -1; }
++ if (! (argc > t+1)) { printf("%s", use_macb); return -1; }
+ uchar *tmp_mac_addr = (uchar *) parse_mac(argv[t+1]);
+ target = malloc(6);
+ memcpy(target, tmp_mac_addr, 6);
+}
+if (! 

Re: [OpenWrt-Devel] [PATCH] dnsmasq: add dhcp relay option

2016-02-07 Thread Alexandru Ardelean
On Tue, Jan 19, 2016 at 11:38 AM, Dan Bugnar  wrote:

> Should I remove this part? Maybe comment it (to have a sample) or replace
> with something else.
>
> Dan Bugnar
>
> On Tue, Jan 19, 2016 at 11:20 AM, Dan Bugnar  wrote:
>
>> Should I remove this part? Maybe comment it (to have a sample) or replace
>> with something else.
>>
>> Dan Bugnar
>>
>> On Tue, Jan 19, 2016 at 11:11 AM, John Crispin  wrote:
>>
>>>
>>>
>>> On 08/01/2016 16:24, dbugnar wrote:
>>> > Signed-off-by: dbugnar 
>>> > ---
>>> >  package/network/services/dnsmasq/files/dhcp.conf|  6 ++
>>> >  package/network/services/dnsmasq/files/dnsmasq.init | 19
>>> +++
>>> >  2 files changed, 25 insertions(+)
>>> >
>>> > diff --git a/package/network/services/dnsmasq/files/dhcp.conf
>>> b/package/network/services/dnsmasq/files/dhcp.conf
>>> > index 362b90a..7a66b44 100644
>>> > --- a/package/network/services/dnsmasq/files/dhcp.conf
>>> > +++ b/package/network/services/dnsmasq/files/dhcp.conf
>>> > @@ -30,3 +30,9 @@ config dhcp lan
>>> >  config dhcp wan
>>> >   option interfacewan
>>> >   option ignore   1
>>> > +
>>> > +config relay
>>> > + option local_addr   '192.168.1.1'
>>> > + option server_addr  '0.0.0.0'
>>> > + option interface'eth0'
>>>
>>>
>>> NAK on this part. you cannot add a static config for eth0/192.168.1.1 as
>>> that is specific to your board and not generic.
>>>
>>> JOhn
>>>
>>> > +
>>> > diff --git a/package/network/services/dnsmasq/files/dnsmasq.init
>>> b/package/network/services/dnsmasq/files/dnsmasq.init
>>> > index 3ef2b3d..ac45d1b 100644
>>> > --- a/package/network/services/dnsmasq/files/dnsmasq.init
>>> > +++ b/package/network/services/dnsmasq/files/dnsmasq.init
>>> > @@ -538,6 +538,24 @@ dhcp_hostrecord_add() {
>>> >   xappend "--host-record=$record"
>>> >  }
>>> >
>>> > +dhcp_relay_add() {
>>> > + local cfg="$1"
>>> > + local local_addr server_addr interface
>>> > +
>>> > + config_get local_addr "$cfg" local_addr
>>> > + [ -n "$local_addr" ] || return 0
>>> > +
>>> > + config_get server_addr "$cfg" server_addr
>>> > + [ -n "$server_addr" ] || return 0
>>> > +
>>> > + config_get interface "$cfg" interface
>>> > + if [ -z "$interface" ]; then
>>> > + xappend "--dhcp-relay=$local_addr,$server_addr"
>>> > + else
>>> > + xappend
>>> "--dhcp-relay=$local_addr,$server_addr,$interface"
>>> > + fi
>>> > +}
>>> > +
>>> >  service_triggers()
>>> >  {
>>> >   procd_add_reload_trigger "dhcp"
>>> > @@ -597,6 +615,7 @@ start_service() {
>>> >   config_foreach dhcp_subscrid_add subscrid
>>> >   config_foreach dhcp_domain_add domain
>>> >   config_foreach dhcp_hostrecord_add hostrecord
>>> > + config_foreach dhcp_relay_add relay
>>> >
>>> >   # add own hostname
>>> >   local lanaddr
>>> >
>>>
>>
>>
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
Is there a follow-up to this discussion ?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel