Re: [OpenWrt-Devel] [PATCH] toolchain/uClibc: add uclibc-ng 1.0.3

2015-07-08 Thread Steven Barth
Thanks for the effort. However, I personally think we should rather phase out 
uclibc
completely and focus on musl which has a much cleaner codebase. I don't think 
it is
worth in the long run to maintain support for both libcs given our limited 
ressources.


Cheers,

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


[OpenWrt-Devel] [PATCH] Add dts patch to enable RFKill and USB Power GPIO Control

2015-07-08 Thread gwlim
---
 This patch adds the RFKill GPIO control switch and enables another GPIO to
 control power supply to USB Ports by emulating an LED GPIO.
 Signed-off-by: Guo Wei Lim alphasp...@gmail.com
 
 .../mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts 
b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
index 2beb39c..0abc297 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
@@ -198,6 +198,11 @@
gpios = gpio0 4 1; /* active low */
label = tp-link:green:usb2;
};
+   
+   usbpower {
+   gpios = gpio0 10 1; /* active low */
+   label = tp-link:usb:power;
+   };
};
 
buttons {
@@ -208,6 +213,12 @@
gpios = gpio0 5 1; /* active low */
linux,code = 0x198; /* KEY_RESTART */
};
+
+   rfkill {
+   label = RFKILL switch;
+   gpios = gpio0 11 1; /* active low */
+   linux,code = 0xf7; /* RFKill */
+   };
};
 };
 
-- 
1.8.3.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v3] ncm: add support to run via proto wwan

2015-07-08 Thread Aleksandr Kolesnik
Signed-off-by: Aleksandr Kolesnik ner...@gmail.com
mailto:ner...@gmail.com 

 

--- a/package/network/utils/comgt/files/ncm.sh

+++ b/package/network/utils/comgt/files/ncm.sh

@@ -27,6 +27,8 @@ proto_ncm_setup() {

   local device apn auth username password pincode delay mode

   json_get_vars device apn auth username password pincode delay
mode

+ [ -n $ctl_device ]  device=$ctl_device

+ 

   [ -n $device ] || {

   echo No control device specified

   proto_notify_error $interface NO_DEVICE

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


Re: [OpenWrt-Devel] [PATCH] [RESEND] swconfig: swlib.c: Fix another memleak

2015-07-08 Thread Felix Fietkau
On 2015-07-08 08:37, Alexandru Ardelean wrote:
 From: Helmut Schaa h...@ocedo.com
 
 Signed-off-by: Helmut Schaa helmut.sc...@googlemail.com
Erm... The author is supposed to add the Signed-off-by himself, as
described in https://dev.openwrt.org/wiki/SubmittingPatches

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


Re: [OpenWrt-Devel] [PATCH] Add dts patch to enable RFKill and USB Power GPIO Control

2015-07-08 Thread Rafał Miłecki
On 8 July 2015 at 14:04, gwlim alphasp...@gmail.com wrote:
 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
 +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts

This patch doesn't add a patch, but simply modifies DTS files. Your
patch subject is wrong.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] malta: add harddisk support

2015-07-08 Thread Yousong Zhou
On 8 July 2015 at 14:17, Dirk Neukirchen dirkneukirc...@web.de wrote:
 works with:
 qemu-system-mipsel -M malta \
 -hda openwrt-malta-le-root.ext4 \
 -kernel openwrt-malta-le-vmlinux.elf \
 -nographic -append root=/dev/sda console=ttyS0


Nice.  Never get a chance to play with a real malta board, I have been
wondering whether we should convert malta to a router type DEVICE_TYPE
and give it 2 interfaces for lan and wan by default.

I have run OpenWrt within QEMU Malta for quite a while and it's
working very well.  In case someone is interested, a gist for the
steps involved is available in
https://gist.github.com/yousong/8d94c6823a2a6f0f79fd

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


Re: [OpenWrt-Devel] [PATCH] ar71xx: Allow to use ath79_gpio_output_select on QCA955x

2015-07-08 Thread Felix Fietkau
On 2015-06-25 16:30, Sven Eckelmann wrote:
 Signed-off-by: Sven Eckelmann s...@open-mesh.com
I had to revert this one because it was breaking the build (patch did
not apply). Please fix and re-submit

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


Re: [OpenWrt-Devel] Hardening Issues / Revert r46146 ?

2015-07-08 Thread Dirk Neukirchen
On 08.07.2015 09:41, Steven Barth wrote:
 The reason for the commit was that supporting hardening such as SSP
 accross 3 libcs is a PITA to maintain. I'm fine if someone comes up
 with a patch that would fix it, though.
 
 In general, you suggest to always enabled UCLIBCs SSP options and get
 rid of the GCCs libssp?
 

If I read the documents correctly libssp will be empty because
glibc and uclibc both contain the symbols for SSP in libc.so/ldso
(by default (?) in glibc, if enabled in uclibc case)
This since around 2005/2006.

Most normal software should link/use that glibc/uclibc implementation in 
OpenWrt environment.

Since libssp is empty the libssp switch should have no effect on building 
binaries
because gcc decides what to link against in both cases of 
--disable/enable-libssp
(If your libc does not provide SSP, then libssp will be linked automatically.)

so we only need libssp when:
- using a libc without SSP that requires libssp from gcc (dietlibc)
- we disable the SSP features that are in uclibc/glibc
- software not linked against libc (?, example: grub2 upstream disables ssp)

The main issues are probably bad __FLAGS handling when cross compiling and
most of these issues are/should be already fixed by upstream, other hardened 
distros 
or variants of these.


 
 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


Re: [OpenWrt-Devel] [PATCH][v2] ar71xx: add support for D-Link DIR-615 rev. Ix board

2015-07-08 Thread Karl Palsson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

a couple of places look to be out of order...


 On 07/07/2015 15:18, Jaehoon You wrote:
  diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
  b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  old mode 100644
  new mode 100755
  index 6d76af8..e0712a5
  --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
  @@ -214,6 +214,7 @@ tl-wr941nd)
   
   r6100 |\
   smart-300 |\
  +dir-615-i1 |\
   tl-mr3420-v2 |\
   tl-wr841n-v8 |\
   tl-wr842n-v2 |\

This one...



  diff --git 
  a/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx 
  b/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx
  index b40dff5..c39169a 100644
  --- a/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx
  +++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx
  @@ -29,6 +29,9 @@ preinit_set_mac_address() {
  fetch_mac_from_mtd config lan_mac wan_mac
  echo 1  
  /sys/class/leds/dir-615-c1:green:wancpu/brightness
  ;;
  +   dir-615-i1)
  +   fetch_mac_from_mtd nvram sys_lan_mac sys_wan_mac
  +   ;;
  r6100)
  mac_lan=$(mtd_get_mac_binary caldata 0)
  [ -n $mac_lan ]  ifconfig eth1 hw ether $mac_lan

This one...


  diff --git a/target/linux/ar71xx/image/Makefile 
  b/target/linux/ar71xx/image/Makefile
  index 53ce56b..05e9595 100644
  --- a/target/linux/ar71xx/image/Makefile
  +++ b/target/linux/ar71xx/image/Makefile
  @@ -1154,6 +1154,7 @@ 
  cameo_ap91_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,3712k(firmware)
   
  cameo_ap99_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,3520k(firmware),64k(mac)ro,192k(lp)ro,64k(art)ro
   
  cameo_ap121_mtdlayout=mtdparts=spi0.0:64k(u-boot)ro,64k(art)ro,64k(mac)ro,64k(nvram)ro,192k(language)ro,3648k(firmware)
   
  cameo_ap121_mtdlayout_8M=mtdparts=spi0.0:64k(u-boot)ro,64k(art)ro,64k(mac)ro,64k(nvram)ro,256k(language)ro,7680k@0x8(firmware)
  +cameo_ap123_mtdlayout_4M=mtdparts=spi0.0:64k(u-boot)ro,64k(nvram)ro,3712k(firmware),192k(lang)ro,64k(art)ro
   
  cameo_db120_mtdlayout=mtdparts=spi0.0:64k(uboot)ro,64k(nvram)ro,15936k(firmware),192k(lang)ro,64k(mac)ro,64k(art)ro
   
  cameo_db120_mtdlayout_8M=mtdparts=spi0.0:64k(uboot)ro,64k(nvram)ro,7872k(firmware),128k(lang)ro,64k(art)ro
   
  cap4200ag_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),320k(custom)ro,1536k(kernel),12096k(rootfs),2048k(failsafe),64k(art),13632k@0xa(firmware)
  @@ -1336,6 +1337,10 @@ Image/Build/CameoAP99/buildkernel=$(call 
  MkuImageLzma,$(2),$(3) $(cameo_ap99_mtd
   Image/Build/CameoAP99=$(call 
  Image/Build/Cameo,$(1),$(2),$(3),$(cameo_ap99_mtdlayout),$(4),65536)
   Image/Build/CameoAP99/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) 
  $(cameo_ap99_mtdlayout))
   
  +Image/Build/CameoAP123_4M/buildkernel=$(call MkuImageLzma,$(2),$(3) 
  $(cameo_ap123_mtdlayout_4M))
  +Image/Build/CameoAP123_4M=$(call 
  Image/Build/Cameo,$(1),$(2),$(3),$(cameo_ap123_mtdlayout_4M),$(4),26)
  +Image/Build/CameoAP123_4M/initramfs=$(call 
  MkuImageLzma/initramfs,$(2),$(3) $(cameo_ap123_mtdlayout_4M))
  +
   Image/Build/CameoAP135/buildkernel=$(call MkuImageLzma,$(2),$(3) $(4))
   Image/Build/CameoAP135=$(call 
  Image/Build/Cameo,$(1),$(2),$(3),$(4),$(5),26)
   Image/Build/CameoAP135/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) 
  $(4))
  @@ -2004,6 +2009,9 @@ $(eval $(call 
  SingleProfile,CameoAP91,64kraw,FR54RTR,fr-54rtr,DIR-600-A1,ttyS0,1
   $(eval $(call 
  SingleProfile,CameoAP99,64kraw,DIR615E1,dir-615-e1,DIR-615-E1,ttyS0,115200,AP93-AR7240-RT-081028-00))
   $(eval $(call 
  SingleProfile,CameoAP99,64kraw,DIR615E4,dir-615-e4,DIR-615-E4,ttyS0,115200,AP99-AR7240-RT-091105-05))
   
  +$(eval $(call 
  SingleProfile,CameoAP123_4M,64kraw,DIR615I1,dir-615-i1,DIR-615-I1,ttyS0,115200,00DB120AR9341-RT-1012I1-00))
  +$(eval $(call 
  SingleProfile,CameoAP123_4M,64kraw,DIR615I3,dir-615-i3,DIR-615-I1,ttyS0,115200,00DB120AR9341-RT-101214-00))
  +
   $(eval $(call 
  SingleProfile,CameoAP81,64kraw-nojffs,A02RBW300N,a02-rb-w300n,TEW-632BRP,ttyS0,115200,AP81-AR9130-RT-070614-03))
   $(eval $(call 
  SingleProfile,CameoAP81,64kraw-nojffs,DIR615C1,dir-615-c1,DIR-615-C1,ttyS0,115200,AP81-AR9130-RT-070614-02))
   $(eval $(call 
  SingleProfile,CameoAP81,64kraw-nojffs,TEW632BRP,tew-632brp,TEW-632BRP,ttyS0,115200,AP81-AR9130-RT-070614-00))
  @@ -2124,6 +2132,7 @@ $(eval $(call 
  SingleProfile,Zcomax,64k,ZCN1523H516,zcn-1523h-5-16,ZCN-1523H-5,tt
   $(eval $(call 
  SingleProfile,ZyXEL,64k,NBG_460N_550N_550NH,nbg460n_550n_550nh,NBG460N,ttyS0,115200,NBG-460N))
   
   $(eval $(call MultiProfile,AP121,AP121_2M AP121_4M))
  +$(eval $(call MultiProfile,DIR615IX,DIR615I1 DIR615I3))
   $(eval $(call MultiProfile,AP136,AP136_010 AP136_020))

And this 

Re: [OpenWrt-Devel] [PATCH v2 6/8] generic: replace request_irq by request_threaded_irq to fix non working ledtrig-gpio

2015-07-08 Thread Guenther Kelleter
 -Original Message-
 From: Felix Fietkau [mailto:n...@openwrt.org]
 Sent: Wednesday, July 08, 2015 2:35 PM
 To: Guenther Kelleter; openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] [PATCH v2 6/8] generic: replace request_irq by
 request_threaded_irq to fix non working ledtrig-gpio
 
 On 2015-07-07 11:48, Guenther Kelleter wrote:
  -Original Message-
  From: Felix Fietkau [mailto:n...@openwrt.org]
  Sent: Monday, July 06, 2015 3:00 PM
  To: Guenther Kelleter; openwrt-devel@lists.openwrt.org
  Subject: Re: [OpenWrt-Devel] [PATCH v2 6/8] generic: replace
  request_irq by request_threaded_irq to fix non working ledtrig-gpio
 
  On 2015-07-06 14:14, Guenther Kelleter wrote:
  
   -Original Message-
   From: Felix Fietkau [mailto:n...@openwrt.org]
   Sent: Monday, July 06, 2015 12:43 PM
   To: Guenther Kelleter; openwrt-devel@lists.openwrt.org
   Subject: Re: [OpenWrt-Devel] [PATCH v2 6/8] generic: replace
   request_irq by request_threaded_irq to fix non working
   ledtrig-gpio
  
   On 2015-07-02 13:47, Günther Kelleter wrote:
Signed-off-by: Günther Kelleter guenther.kelle...@devolo.de
   What issue does this fix?
  
   - Felix
  
   Without this change, gpio_trig_gpio_store() throws this error:
   [   88.54] leds devolo:status:dlan: request_irq failed with error -22
   [   88.55] leds devolo:error:dlan: request_irq failed with error -22
  If you rework the GPIO IRQ handler code to not require threading, you
  probably won't have to change this generic code.
 
  - Felix
 
  I don't see how I could rework this. It fails because of nested interrupt
 handlers.
  Someone already tried to solve this issue on lkml
  http://lkml.iu.edu/hypermail/linux/kernel/1409.1/00930.html
  but this also requires generic code changes.
 Do you really need to use a threaded IRQ for the nested interrupt handler for
 GPIO?
 Can't you change the ar71xx GPIO patch to use request_irq instead and drop the
 irq_set_nested_thread part?
 
 - Felix


Yes, I did that already and it's still working. PATCH v3 was posted yesterday.
But: Not really sure what I'm doing. All those interrupt handling functionality 
looks really confusing to me...
 
The patches sent yesterday don't apply anymore today. Guess I have to rebase 
them again.

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


Re: [OpenWrt-Devel] [PATCH] [RESEND] swconfig: swlib.c: Fix another memleak

2015-07-08 Thread Helmut Schaa
On Wed, Jul 8, 2015 at 2:05 PM, Felix Fietkau n...@openwrt.org wrote:
 On 2015-07-08 08:37, Alexandru Ardelean wrote:
 From: Helmut Schaa h...@ocedo.com

 Signed-off-by: Helmut Schaa helmut.sc...@googlemail.com
 Erm... The author is supposed to add the Signed-off-by himself, as
 described in https://dev.openwrt.org/wiki/SubmittingPatches

Sorry, should have used my googlemail address ...

Signed-off-by: Helmut Schaa helmut.sc...@googlemail.com

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


[OpenWrt-Devel] [PATCH] Enable RFKill and USB Power GPIO Control for WDR4900v1

2015-07-08 Thread gwlim
 This patch adds the RFKill GPIO control switch and enables another GPIO to
 control power supply to USB Ports by emulating an LED GPIO.
 
 Signed-off-by: Guo Wei Lim alphasp...@gmail.com

---
 
 .../mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts 
b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
index 2beb39c..0abc297 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
@@ -198,6 +198,11 @@
gpios = gpio0 4 1; /* active low */
label = tp-link:green:usb2;
};
+   
+   usbpower {
+   gpios = gpio0 10 1; /* active low */
+   label = tp-link:usb:power;
+   };
};
 
buttons {
@@ -208,6 +213,12 @@
gpios = gpio0 5 1; /* active low */
linux,code = 0x198; /* KEY_RESTART */
};
+
+   rfkill {
+   label = RFKILL switch;
+   gpios = gpio0 11 1; /* active low */
+   linux,code = 0xf7; /* RFKill */
+   };
};
 };
 
-- 
1.8.3.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: Fix LED-to-phy mapping for EnGenius ESR1750.

2015-07-08 Thread Christian Beier
wlan5g is phy0tpt and wlan2g phy1tpt.

Signed-off-by: Christian Beier c...@shoutrlabs.com
---
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 4bb8d40..a361b77 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -184,8 +184,8 @@ esr900)
;;
 
 esr1750)
-   ucidef_set_led_wlan wlan2g WLAN 2.4 GHz esr1750:blue:wlan-2g 
phy0tpt
-   ucidef_set_led_wlan wlan5g WLAN 5 GHz esr1750:blue:wlan-5g 
phy1tpt
+   ucidef_set_led_wlan wlan2g WLAN 2.4 GHz esr1750:blue:wlan-2g 
phy1tpt
+   ucidef_set_led_wlan wlan5g WLAN 5 GHz esr1750:blue:wlan-5g 
phy0tpt
;;
 
 epg5000)
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] mpc85xx: Enable RFKill and USB Power GPIO Control for WDR4900v1

2015-07-08 Thread gwlim
This patch adds the RFKill GPIO control switch and enables another GPIO to 
control power supply to USB Ports by emulating an LED GPIO for WDR4900v1.

Signed-off-by: Guo Wei Lim alphasp...@gmail.com

---
 .../mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts 
b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
index 2beb39c..148c7a2 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
@@ -198,6 +198,11 @@
gpios = gpio0 4 1; /* active low */
label = tp-link:green:usb2;
};
+
+   usbpower {
+   gpios = gpio0 10 1; /* active low */
+   label = tp-link:usb:power;
+   };
};
 
buttons {
@@ -208,6 +213,12 @@
gpios = gpio0 5 1; /* active low */
linux,code = 0x198; /* KEY_RESTART */
};
+
+   rfkill {
+   label = RFKILL switch;
+   gpios = gpio0 11 1; /* active low */
+   linux,code = 0xf7; /* RFKill */
+   };
};
 };
 
-- 
1.8.3.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: ag71xx remove IRQF_DISABLED

2015-07-08 Thread Dirk Neukirchen
no-op since 2.6.35
removed in Kernel 4.1
see https://lwn.net/Articles/380931/

Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de
---
 .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index dc77699..c7671d9 100644
--- 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -1248,7 +1248,7 @@ static int ag71xx_probe(struct platform_device *pdev)
 
dev-irq = platform_get_irq(pdev, 0);
err = request_irq(dev-irq, ag71xx_interrupt,
- IRQF_DISABLED,
+ 0x0,
  dev-name, dev);
if (err) {
dev_err(pdev-dev, unable to request IRQ %d\n, dev-irq);
-- 
2.4.5
___
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


Re: [OpenWrt-Devel] [PATCH] mpc85xx: Enable RFKill and USB Power GPIO Control for WDR4900v1

2015-07-08 Thread Rafał Miłecki
On 8 July 2015 at 17:00, gwlim alphasp...@gmail.com wrote:
 This patch adds the RFKill GPIO control switch and enables another GPIO to 
 control power supply to USB Ports by emulating an LED GPIO for WDR4900v1.

 Signed-off-by: Guo Wei Lim alphasp...@gmail.com

The patch format looks fine :) The commit message could use a line
break, but I'm sure commiter can handle that if he cares at all.

Thanks for working on it!
___
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


Re: [OpenWrt-Devel] AES module vs builtin

2015-07-08 Thread Dirk Neukirchen
On 08.07.2015 16:20, Cristian Morales Vega wrote:
 target/linux/generic/config-* has CONFIG_CRYPTO_AES=y.

for reference its introduced in: https://dev.openwrt.org/changeset/35329/

 But package/kernel/linux/modules/crypto.mk still defines a
 kmod-crypto-aes package which just contains a file in /etc/modules.d/
 trying to load a module which doesn't exist.
 
 Not sure how the config files in target/linux/generic files are
 created... Should kmod-crypto-aes be removed, or is
 CONFIG_CRYPTO_AES=y what shouldn't be there?
 
 
 Also, it's a bit worrisome that there was no build failure since the
 kmod-crypto-aes package description defines
 FILES:=$(LINUX_DIR)/crypto/aes_generic.ko
 and the file doesn't exist.
 There is an OpenWRT build system expert around? Otherwise I will try
 to take a look.

If you enable logging there will be messages that help you find cases of 
builtin modules
or other inconsistencies:

NOTICE: module 
'.../build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.10.58/drivers/net/phy/rtl8366s.ko'
 is built-in.
WARNING: kmod-pwm is not available in the kernel config - generating empty 
package

No build failure makes sense because
- some modules depend on other symbols not available on all target archs
- some modules have to be built-in to boot from a rootfs (ext4) when on other 
targets built-in does not make sense
(4mb flash routers with squashfs)

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


[OpenWrt-Devel] Raspberry Pi 2 sysupgrade

2015-07-08 Thread Bruno Randolf
Hi!

I have the below change to add rudimentary support for sysupgrade on the
Raspberry Pi. I looked at the way platform_copy_config() is implemented
for x86 and tried to do the same, but I get the following error on mount:

mount: mounting /dev/mmcblk0p2 on /mnt failed: Device or resource busy

I believe I'd need some way to re-read the partition table after the dd
command. How does it work on x86? Any ideas?

Also would it be OK to gzip the sdcard image to save space? It
compresses from 76M to 11M.

Below is the diff, but this is not a properly formatted patch, yet.

bruno

diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
new file mode 100644
index 000..95ade38
--- /dev/null
+++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
@@ -0,0 +1,19 @@
+platform_check_image() {
+   # i know no way to verify the image
+   return 0;
+}
+
+platform_do_upgrade() {
+   sync
+   get_image $1 | dd of=/dev/mmcblk0 bs=2M conv=fsync
+   sleep 1
+}
+
+## mount does not work. I think I'd need to re-read the partition table!
+#platform_copy_config() {
+#  echo *** platform_copy_config called  /dev/console
+#  mount -t ext4 -o rw,noatime /dev/mmcblk0p2 /mnt
+#  cp -af $CONF_TAR /mnt/
+#  umount /mnt
+#  echo *** platform_copy_config done  /dev/console
+#}
diff --git a/target/linux/brcm2708/image/Makefile
b/target/linux/brcm2708/image/Makefile
index e70bdd0..095cf0d 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -28,6 +28,7 @@ define Image/Build/RaspberryPi
mcopy -i $(KDIR)/boot.img $(KDIR)/Image ::kernel.img  # Copy
OpenWrt built kernel
./gen_rpi_sdcard_img.sh
$(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img $(KDIR)/boot.img
$(KDIR)/root.$(1) \
$(CONFIG_BRCM2708_SD_BOOT_PARTSIZE)
$(CONFIG_TARGET_ROOTFS_PARTSIZE)
+   gzip -k -f $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img
 endef

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


[OpenWrt-Devel] [PATCH 2/4] gemini: add NAS packages to Raidsonic profile

2015-07-08 Thread Roman Yeryomin
Signed-off-by: Roman Yeryomin ro...@advem.lv
---
 target/linux/gemini/raidsonic/target.mk | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/target/linux/gemini/raidsonic/target.mk 
b/target/linux/gemini/raidsonic/target.mk
index 56eda4e..d158090 100644
--- a/target/linux/gemini/raidsonic/target.mk
+++ b/target/linux/gemini/raidsonic/target.mk
@@ -4,6 +4,13 @@
 
 SUBTARGET:=raidsonic
 BOARDNAME:=Raidsonic NAS42x0
+FEATURES+=usb
+DEFAULT_PACKAGES+=kmod-usb2 kmod-md-mod kmod-md-linear kmod-md-multipath \
+   kmod-md-raid0 kmod-md-raid1 kmod-md-raid10 kmod-md-raid456 \
+   kmod-fs-btrfs kmod-fs-cifs kmod-fs-ext4 kmod-fs-nfs \
+   kmod-fs-nfsd kmod-fs-ntfs kmod-fs-reiserfs kmod-fs-vfat \
+   kmod-nls-utf8 kmod-usb-storage-extras \
+   samba36-server mdadm cfdisk fdisk e2fsprogs badblocks
 
 define Target/Description
Build firmware images for Raidsonic NAS4220.
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/4] gemini: copy kernel image to BIN_DIR

2015-07-08 Thread Roman Yeryomin
Signed-off-by: Roman Yeryomin ro...@advem.lv
---
 target/linux/gemini/image/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/gemini/image/Makefile 
b/target/linux/gemini/image/Makefile
index 7ed1d61..1c51b62 100644
--- a/target/linux/gemini/image/Makefile
+++ b/target/linux/gemini/image/Makefile
@@ -74,7 +74,8 @@ define Image/Build
dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img of=$(BIN_DIR)/rd.gz bs=6144k 
count=1
 #  dd if=/dev/zero of=$(BIN_DIR)/hddapp.tgz bs=6144k count=1
dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img of=$(BIN_DIR)/hddapp.tgz 
bs=6144k count=1 seek=1
-   cp $(KDIR)/$(IMG_PREFIX)-nas4220-zImage $(BIN_DIR)/zImage
+   cp $(KDIR)/$(IMG_PREFIX)-nas4220-zImage $(BIN_DIR)/
+   cp $(BIN_DIR)/$(IMG_PREFIX)-nas4220-zImage $(BIN_DIR)/zImage
cp ./ImageInfo-ib4220 $(BIN_DIR)/ImageInfo
(cd $(BIN_DIR); tar -czf $(IMG_PREFIX)-sysupgrade-ib4220.tar.gz 
ImageInfo zImage rd.gz hddapp.tgz)
mv $(BIN_DIR)/rd.gz $(BIN_DIR)/$(IMG_PREFIX)-nas4220-rd.gz
-- 
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] [PATCH] x86/xen_domu: enable image generation

2015-07-08 Thread Luiz Angelo Daros de Luca
This was already accepted in trunk. Is there any chance to backport to cc?

Em seg, 15 de jun de 2015 04:10, Luiz Angelo Daros de Luca 
luizl...@gmail.com escreveu:

 Add features ext4 targz to target x86/xen_domu in order to
 generate images in defconfig.

 This fixes #18074.

 Signed-off-by: Luiz Angelo Daros de Luca luizl...@gmail.com
 ---
  target/linux/x86/xen_domu/target.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/target/linux/x86/xen_domu/target.mk
 b/target/linux/x86/xen_domu/target.mk
 index 80bac3b..f7a69bf 100644
 --- a/target/linux/x86/xen_domu/target.mk
 +++ b/target/linux/x86/xen_domu/target.mk
 @@ -1,3 +1,3 @@
  BOARDNAME:=Xen Paravirt Guest
  DEFAULT_PACKAGES += kmod-xen-fs kmod-xen-evtchn kmod-xen-netdev
 kmod-xen-kbddev
 -FEATURES:=display
 +FEATURES:=display ext4 targz
 --
 2.1.4


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


[OpenWrt-Devel] [PATCH 4/4] gemini: switch to 4.1

2015-07-08 Thread Roman Yeryomin
Signed-off-by: Roman Yeryomin ro...@advem.lv
---
 target/linux/gemini/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/gemini/Makefile b/target/linux/gemini/Makefile
index 3667254..42f8c1e 100644
--- a/target/linux/gemini/Makefile
+++ b/target/linux/gemini/Makefile
@@ -14,7 +14,7 @@ FEATURES:=squashfs pci rtc
 CPU_TYPE:=fa526
 MAINTAINER:=Roman Yeryomin ro...@advem.lv
 
-KERNEL_PATCHVER:=3.18
+KERNEL_PATCHVER:=4.1
 
 KERNELNAME:=zImage
 
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] swconfig: swlib.c: Fix another memleak

2015-07-08 Thread Alexandru Ardelean
From: Helmut Schaa h...@ocedo.com

---
 openwrt/package/network/config/swconfig/src/swlib.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/network/config/swconfig/src/swlib.c 
b/package/network/config/swconfig/src/swlib.c
index dae603c..f79b826 100644
--- a/package/network/config/swconfig/src/swlib.c
+++ b/package/network/config/swconfig/src/swlib.c
@@ -529,10 +529,13 @@ struct switch_attr *swlib_lookup_attr(struct switch_dev 
*dev,
 static void
 swlib_priv_free(void)
 {
+   if (family)
+   nl_object_put((struct nl_object*)family);
if (cache)
nl_cache_free(cache);
if (handle)
nl_socket_free(handle);
+   family = NULL;
handle = NULL;
cache = NULL;
 }
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [RFC] [RESEND] swconfig: Split libsw out of swconfig for reuse in other packages

2015-07-08 Thread Alexandru Ardelean
From: Helmut Schaa h...@ocedo.com

Signed-off-by: Helmut Schaa helmut.sc...@googlemail.com

---
 package/network/config/swconfig/Makefile | 9 +
 package/network/config/swconfig/src/Makefile | 9 ++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/package/network/config/swconfig/Makefile 
b/package/network/config/swconfig/Makefile
index 50d395c..5af31f7 100644
--- a/package/network/config/swconfig/Makefile
+++ b/package/network/config/swconfig/Makefile
@@ -41,9 +41,18 @@ define Build/Compile
LIBS=$(TARGET_LDFLAGS) -lnl-tiny -lm -luci
 endef
 
+define Build/InstallDev
+   $(INSTALL_DIR) $(1)/usr/include
+   $(CP) $(PKG_BUILD_DIR)/swlib.h $(1)/usr/include/
+
+   $(INSTALL_DIR) $(1)/lib
+   $(CP) $(PKG_BUILD_DIR)/libsw.so $(1)/lib/
+endef
+
 define Package/swconfig/install
$(INSTALL_DIR) $(1)/sbin $(1)/lib/network
$(INSTALL_BIN) $(PKG_BUILD_DIR)/swconfig $(1)/sbin/swconfig
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/libsw.so $(1)/lib
$(INSTALL_DATA) ./files/switch.sh $(1)/lib/network/
 endef
 
diff --git a/package/network/config/swconfig/src/Makefile 
b/package/network/config/swconfig/src/Makefile
index 0d56f43..1176bf0 100644
--- a/package/network/config/swconfig/src/Makefile
+++ b/package/network/config/swconfig/src/Makefile
@@ -6,7 +6,10 @@ LIBS=-lnl -lnl-genl
 all: swconfig
 
 %.o: %.c
-   $(CC) $(CFLAGS) -c -o $@ $^
+   $(CC) $(CFLAGS) -fPIC -c -o $@ $^
 
-swconfig: cli.o swlib.o uci.o
-   $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+libsw.so: swlib.o
+   $(CC) $(CFLAGS) -fPIC -shared -o $@ swlib.o
+
+swconfig: libsw.so cli.o uci.o
+   $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -L./ -lsw
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] swconfig: Split libsw out of swconfig for reuse in other packages

2015-07-08 Thread Alexandru Ardelean
From: Helmut Schaa h...@ocedo.com

Also a bit of an RFC.
We use this patch internally. 

---
 package/network/config/swconfig/Makefile | 9 +
 package/network/config/swconfig/src/Makefile | 9 ++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/package/network/config/swconfig/Makefile 
b/package/network/config/swconfig/Makefile
index 50d395c..5af31f7 100644
--- a/package/network/config/swconfig/Makefile
+++ b/package/network/config/swconfig/Makefile
@@ -41,9 +41,18 @@ define Build/Compile
LIBS=$(TARGET_LDFLAGS) -lnl-tiny -lm -luci
 endef
 
+define Build/InstallDev
+   $(INSTALL_DIR) $(1)/usr/include
+   $(CP) $(PKG_BUILD_DIR)/swlib.h $(1)/usr/include/
+
+   $(INSTALL_DIR) $(1)/lib
+   $(CP) $(PKG_BUILD_DIR)/libsw.so $(1)/lib/
+endef
+
 define Package/swconfig/install
$(INSTALL_DIR) $(1)/sbin $(1)/lib/network
$(INSTALL_BIN) $(PKG_BUILD_DIR)/swconfig $(1)/sbin/swconfig
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/libsw.so $(1)/lib
$(INSTALL_DATA) ./files/switch.sh $(1)/lib/network/
 endef
 
diff --git a/package/network/config/swconfig/src/Makefile 
b/package/network/config/swconfig/src/Makefile
index 0d56f43..1176bf0 100644
--- a/package/network/config/swconfig/src/Makefile
+++ b/package/network/config/swconfig/src/Makefile
@@ -6,7 +6,10 @@ LIBS=-lnl -lnl-genl
 all: swconfig
 
 %.o: %.c
-   $(CC) $(CFLAGS) -c -o $@ $^
+   $(CC) $(CFLAGS) -fPIC -c -o $@ $^
 
-swconfig: cli.o swlib.o uci.o
-   $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+libsw.so: swlib.o
+   $(CC) $(CFLAGS) -fPIC -shared -o $@ swlib.o
+
+swconfig: libsw.so cli.o uci.o
+   $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -L./ -lsw
-- 
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] [PATCH] swconfig: swlib.c: Fix another memleak

2015-07-08 Thread Rafał Miłecki
On 8 July 2015 at 08:21, Alexandru Ardelean ardeleana...@gmail.com wrote:
 From: Helmut Schaa h...@ocedo.com

Missing Signed-off-by
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] swconfig: Split libsw out of swconfig for reuse in other packages

2015-07-08 Thread Rafał Miłecki
On 8 July 2015 at 08:26, Alexandru Ardelean ardeleana...@gmail.com wrote:
 From: Helmut Schaa h...@ocedo.com

 Also a bit of an RFC.
 We use this patch internally.

I believe the preferred way of marking patch a RFC is:
git format-patch --subject-prefix=PATCH RFC
(just for the future)

This patch is also missing Signed-off-by, but you may just wait for
comment as it's RFC anyway :)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [OpenWrt] [LUCI] ar71xx: GUI changes

2015-07-08 Thread John kerry
Hi  Everyone,

I am working on openWRT Luci, I need to create the GUI in such way that WAN
connection is either using wireless or RJ45 using a slide switch.

Could anyone please help me how i can change the GUI based on the above.
Which part of the code i need to change.

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


Re: [OpenWrt-Devel] [PATCH 2/4] gemini: add NAS packages to Raidsonic profile

2015-07-08 Thread John Crispin


On 08/07/2015 23:00, Roman Yeryomin wrote:
 Signed-off-by: Roman Yeryomin ro...@advem.lv
 ---
  target/linux/gemini/raidsonic/target.mk | 7 +++
  1 file changed, 7 insertions(+)
 
 diff --git a/target/linux/gemini/raidsonic/target.mk 
 b/target/linux/gemini/raidsonic/target.mk
 index 56eda4e..d158090 100644
 --- a/target/linux/gemini/raidsonic/target.mk
 +++ b/target/linux/gemini/raidsonic/target.mk
 @@ -4,6 +4,13 @@
  
  SUBTARGET:=raidsonic
  BOARDNAME:=Raidsonic NAS42x0
 +FEATURES+=usb
 +DEFAULT_PACKAGES+=kmod-usb2 kmod-md-mod kmod-md-linear kmod-md-multipath \
 + kmod-md-raid0 kmod-md-raid1 kmod-md-raid10 kmod-md-raid456 \
 + kmod-fs-btrfs kmod-fs-cifs kmod-fs-ext4 kmod-fs-nfs \
 + kmod-fs-nfsd kmod-fs-ntfs kmod-fs-reiserfs kmod-fs-vfat \
 + kmod-nls-utf8 kmod-usb-storage-extras \
 + samba36-server mdadm cfdisk fdisk e2fsprogs badblocks

some of these are not part of trunk. i think there was a policy that
DEFAULT_PACKAGES should only point at stuff in trunk. i guess madm and
badblocks need to be dropped or moved to trunk



  
  define Target/Description
   Build firmware images for Raidsonic NAS4220.
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/4] gemini: copy kernel image to BIN_DIR

2015-07-08 Thread John Crispin


On 08/07/2015 23:00, Roman Yeryomin wrote:
 Signed-off-by: Roman Yeryomin ro...@advem.lv
 ---
  target/linux/gemini/image/Makefile | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/target/linux/gemini/image/Makefile 
 b/target/linux/gemini/image/Makefile
 index 7ed1d61..1c51b62 100644
 --- a/target/linux/gemini/image/Makefile
 +++ b/target/linux/gemini/image/Makefile
 @@ -74,7 +74,8 @@ define Image/Build
   dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img of=$(BIN_DIR)/rd.gz bs=6144k 
 count=1
  #dd if=/dev/zero of=$(BIN_DIR)/hddapp.tgz bs=6144k count=1
   dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img of=$(BIN_DIR)/hddapp.tgz 
 bs=6144k count=1 seek=1
 - cp $(KDIR)/$(IMG_PREFIX)-nas4220-zImage $(BIN_DIR)/zImage
 + cp $(KDIR)/$(IMG_PREFIX)-nas4220-zImage $(BIN_DIR)/
 + cp $(BIN_DIR)/$(IMG_PREFIX)-nas4220-zImage $(BIN_DIR)/zImage

this will lead to the same file being int the bin/ folder twice with
different names. is that intentional ?



   cp ./ImageInfo-ib4220 $(BIN_DIR)/ImageInfo
   (cd $(BIN_DIR); tar -czf $(IMG_PREFIX)-sysupgrade-ib4220.tar.gz 
 ImageInfo zImage rd.gz hddapp.tgz)
   mv $(BIN_DIR)/rd.gz $(BIN_DIR)/$(IMG_PREFIX)-nas4220-rd.gz
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Raspberry Pi 2 sysupgrade

2015-07-08 Thread John Crispin


On 08/07/2015 19:42, Bruno Randolf wrote:
 Hi!
 
 I have the below change to add rudimentary support for sysupgrade on the
 Raspberry Pi. I looked at the way platform_copy_config() is implemented
 for x86 and tried to do the same, but I get the following error on mount:
 
 mount: mounting /dev/mmcblk0p2 on /mnt failed: Device or resource busy

in that case its either still flushing the cache or has not been
properly unmounted i think. you could try adding the partprobe tool to
force a rescan of the table but i am not sure this is the problem here

 
 I believe I'd need some way to re-read the partition table after the dd
 command. How does it work on x86? Any ideas?

partprobe and i think fdisk had a feature for that aswell

 
 Also would it be OK to gzip the sdcard image to save space? It
 compresses from 76M to 11M.
 

ok, as there is not sysupgrade supported yet this change wont break
running installations



 Below is the diff, but this is not a properly formatted patch, yet.
 
 bruno
 
 diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
 b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
 new file mode 100644
 index 000..95ade38
 --- /dev/null
 +++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
 @@ -0,0 +1,19 @@
 +platform_check_image() {
 +   # i know no way to verify the image
 +   return 0;
 +}
 +
 +platform_do_upgrade() {
 +   sync
 +   get_image $1 | dd of=/dev/mmcblk0 bs=2M conv=fsync
 +   sleep 1
 +}
 +
 +## mount does not work. I think I'd need to re-read the partition table!
 +#platform_copy_config() {
 +#  echo *** platform_copy_config called  /dev/console
 +#  mount -t ext4 -o rw,noatime /dev/mmcblk0p2 /mnt
 +#  cp -af $CONF_TAR /mnt/
 +#  umount /mnt
 +#  echo *** platform_copy_config done  /dev/console
 +#}
 diff --git a/target/linux/brcm2708/image/Makefile
 b/target/linux/brcm2708/image/Makefile
 index e70bdd0..095cf0d 100644
 --- a/target/linux/brcm2708/image/Makefile
 +++ b/target/linux/brcm2708/image/Makefile
 @@ -28,6 +28,7 @@ define Image/Build/RaspberryPi
 mcopy -i $(KDIR)/boot.img $(KDIR)/Image ::kernel.img  # Copy
 OpenWrt built kernel
 ./gen_rpi_sdcard_img.sh
 $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img $(KDIR)/boot.img
 $(KDIR)/root.$(1) \
 $(CONFIG_BRCM2708_SD_BOOT_PARTSIZE)
 $(CONFIG_TARGET_ROOTFS_PARTSIZE)
 +   gzip -k -f $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img
  endef
 
  define Image/Build
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ramips mt7620: ArcherC20i USB support and more

2015-07-08 Thread John Crispin
Hi,

the prefix is wrong please change it to ramips: there is also trailing
stuff in the mail and see below

On 08/07/2015 20:57, Gunnar Thorburn wrote:
 For TP-Link Archer C20i, USB port does not work with CC/trunk.
 This patch adds two nodes (ehci, ohci) to the Device Tree, enabling USB.
 
 Signed-off-by: Gunnar Thorburn gun...@thorburn.se
 
 $ diff -up target/linux/ramips/dts/ArcherC20i.dts{.orig,} 
 --- target/linux/ramips/dts/ArcherC20i.dts.orig   2015-07-05 
 15:27:04.763421748 +0200
 +++ target/linux/ramips/dts/ArcherC20i.dts2015-07-07 22:17:28.851225781 
 +0200

this patch is created against the wrong base folder. use git to generate
proper patches please.

John

 @@ -77,6 +77,14 @@
   ralink,port-map = w;
   };
  
 + ehci@101c {
 + status = okay;
 + };
 +
 + ohci@101c1000 {
 + status = okay;
 + };
 +
   gsw@1011 {
   ralink,port4 = ephy;
   };
 
 
 
 
 07.07.2015 11:32 wrote Jonas Gorski:
 Hi,

 [...]

 Please fix and resend.


 Jonas
 
 The other changes (related to gpio, buttons, leds) I will perhaps submit in 
 the future when I have tested and understood better.
 
 Gunnar
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] x86/xen_domu: enable image generation

2015-07-08 Thread John Crispin
r46277 adds the backport to CC



On 08/07/2015 23:39, Luiz Angelo Daros de Luca wrote:
 This was already accepted in trunk. Is there any chance to backport to cc?
 
 
 Em seg, 15 de jun de 2015 04:10, Luiz Angelo Daros de Luca
 luizl...@gmail.com mailto:luizl...@gmail.com escreveu:
 
 Add features ext4 targz to target x86/xen_domu in order to
 generate images in defconfig.
 
 This fixes #18074.
 
 Signed-off-by: Luiz Angelo Daros de Luca luizl...@gmail.com
 mailto:luizl...@gmail.com
 ---
  target/linux/x86/xen_domu/target.mk http://target.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/target/linux/x86/xen_domu/target.mk http://target.mk
 b/target/linux/x86/xen_domu/target.mk http://target.mk
 index 80bac3b..f7a69bf 100644
 --- a/target/linux/x86/xen_domu/target.mk http://target.mk
 +++ b/target/linux/x86/xen_domu/target.mk http://target.mk
 @@ -1,3 +1,3 @@
  BOARDNAME:=Xen Paravirt Guest
  DEFAULT_PACKAGES += kmod-xen-fs kmod-xen-evtchn kmod-xen-netdev
 kmod-xen-kbddev
 -FEATURES:=display
 +FEATURES:=display ext4 targz
 --
 2.1.4
 
 
 
 ___
 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] [ar71xx] Add support for Onion Omega

2015-07-08 Thread Boken Lin
From: Boken Lin b...@onion.io

Add support for Onion Omega.
Signed-off-by: Boken Lin b...@onion.io

---
target/linux/ar71xx/base-files/etc/diag.sh |  3 +
.../ar71xx/base-files/etc/uci-defaults/02_network  |  1 +
target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 +
.../ar71xx/base-files/lib/upgrade/platform.sh  |  1 +
target/linux/ar71xx/config-3.18|  1 +
.../files/arch/mips/ath79/mach-onion-omega.c   | 85 ++
target/linux/ar71xx/generic/profiles/onion.mk  | 16 
target/linux/ar71xx/image/Makefile |  9 +++
.../610-MIPS-ath79-openwrt-machines.patch  | 24 --
tools/firmware-utils/src/mktplinkfw.c  |  8 +-
10 files changed, 144 insertions(+), 7 deletions(-)
create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
create mode 100644 target/linux/ar71xx/generic/profiles/onion.mk

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index ce2b9ba..0015d4c 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -167,6 +167,9 @@ get_status_led() {
om5p-an)
status_led=om5p:blue:power
;;
+onion-omega)
+status_led=onion:amber:system
+;;
pb44)
status_led=pb44:amber:jump1
;;
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 ec709a0..6e9185c 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -313,6 +313,7 @@ mr600 |\
mr600v2 |\
mr900 |\
mr900v2 |\
+onion-omega |\
rb-411 |\
rb-911g-2hpnd |\
rb-911g-5hpacd |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index dd13948..e23ed74 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -550,6 +550,9 @@ ar71xx_board_detect() {
*OM5P AN)
name=om5p-an
;;
+*Onion Omega)
+name=onion-omega
+;;
*PB42)
name=pb42
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 73d8b0d..b045a33 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -312,6 +312,7 @@ platform_check_image() {
gl-inet | \
mc-mac1200r | \
oolite | \
+onion-omega | \
smart-300 | \
tl-mr10u | \
tl-mr11u | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 02857d5..388cb2b 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -86,6 +86,7 @@ CONFIG_ATH79_MACH_NBG460N=y
CONFIG_ATH79_MACH_NBG6716=y
CONFIG_ATH79_MACH_OM2P=y
CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_ONION_OMEGA=y
CONFIG_ATH79_MACH_PB42=y
CONFIG_ATH79_MACH_PB44=y
CONFIG_ATH79_MACH_PB92=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
new file mode 100644
index 000..177e76f
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
@@ -0,0 +1,85 @@
+/*
+ *  Onion Omega board support
+ *
+ *  Copyright (C) 2015 Boken Lin b...@onion.io
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+
+#define OMEGA_GPIO_LED_SYSTEM   27
+#define OMEGA_GPIO_BTN_RESET11
+
+#define OMEGA_GPIO_USB_POWER8
+
+#define OMEGA_KEYS_POLL_INTERVAL20  /* msecs */
+#define OMEGA_KEYS_DEBOUNCE_INTERVAL(3 * OMEGA_KEYS_POLL_INTERVAL)
+
+static const char *omega_part_probes[] = {
+tp-link,
+NULL,
+};
+
+static struct flash_platform_data omega_flash_data = {
+.part_probes= omega_part_probes,
+};
+
+static struct gpio_led omega_leds_gpio[] __initdata = {
+{
+.name   = onion:amber:system,
+.gpio   = OMEGA_GPIO_LED_SYSTEM,
+.active_low = 1,
+},
+};
+
+static struct gpio_keys_button omega_gpio_keys[] __initdata = {
+{
+.desc   = reset,
+.type   = EV_KEY,
+.code   = KEY_RESTART,
+.debounce_interval = OMEGA_KEYS_DEBOUNCE_INTERVAL,
+.gpio   = OMEGA_GPIO_BTN_RESET,
+.active_low = 0,
+}
+};
+
+static void __init onion_omega_setup(void)
+{
+u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
+u8 *ee =