[OpenWrt-Devel] [PATCH] openssl: Fix x86_64 build on some 64bit host systems

2014-02-28 Thread Helmut Schaa
On some build hosts openssl fails to install since openssl installs itself into
lib64 while the openwrt Makefile expects the libs to end up in lib.

install -m0644 
.../openwrt/build_dir/target-x86_64_uClibc-0.9.33.2/openssl-1.0.1e/ipkg-install/usr/lib/libcrypto.so.*
 
.../openwrt/build_dir/target-x86_64_uClibc-0.9.33.2/openssl-1.0.1e/ipkg-x86_64/libopenssl/usr/lib/
install: cannot stat 
'.../openwrt/build_dir/target-x86_64_uClibc-0.9.33.2/openssl-1.0.1e/ipkg-install/usr/lib/libcrypto.so.*':
 No such file or directory
make[2]: *** [/openwrt/bin/x86_64/packages/libopenssl_1.0.1e-2_x86_64.ipk] 
Error 1
make[2]: Leaving directory `/openwrt/package/libs/openssl'
make[1]: *** [package/libs/openssl/compile] Error 2
make[1]: Leaving directory `/openwrt'

Set LIBDIR accordingly to fix this.

Signed-off-by: Helmut Schaa 
---
 package/libs/openssl/Makefile | 5 +
 1 file changed, 5 insertions(+)

diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 19863fb..a086450 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -132,6 +132,7 @@ define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
MAKEDEPPROG="$(TARGET_CROSS)gcc" \
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
+   LIBDIR=lib \
$(OPENSSL_MAKEFLAGS) \
depend
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
@@ -140,6 +141,7 @@ define Build/Compile
AR="$(TARGET_CROSS)ar r" \
RANLIB="$(TARGET_CROSS)ranlib" \
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
+   LIBDIR=lib \
$(OPENSSL_MAKEFLAGS) \
all
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
@@ -148,6 +150,7 @@ define Build/Compile
AR="$(TARGET_CROSS)ar r" \
RANLIB="$(TARGET_CROSS)ranlib" \
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
+   LIBDIR=lib \
$(OPENSSL_MAKEFLAGS) \
build-shared
# Work around openssl build bug to link libssl.so with libcrypto.so.
@@ -155,11 +158,13 @@ define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
+   LIBDIR=lib \
$(OPENSSL_MAKEFLAGS) \
do_linux-shared
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
+   LIBDIR=lib \
$(OPENSSL_MAKEFLAGS) \
install
 endef
-- 
1.8.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] [ar71xx] Add 16MB Flash version for Embedded Wireless Dorin Platform

2014-02-28 Thread Felix Fietkau
On 2014-02-27 10:58, Embedded Wireless GmbH wrote:
> Tested-by: Embedded Wireless GmbH www.embeddedwireless.de
> Signed-off-by: Embedded Wireless GmbH 
Committed in r39763, r39764

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


Re: [OpenWrt-Devel] [PATCHv3 3/3] b53: mdio: Avoid re-registering the same switch device

2014-02-28 Thread Helmut Schaa
Hi Jonas,

On Tue, Feb 18, 2014 at 11:16 AM, Jonas Gorski  wrote:
> On Tue, Feb 18, 2014 at 10:52 AM, Helmut Schaa
>  wrote:
>> On Tue, Feb 18, 2014 at 10:46 AM, Helmut Schaa
>>  wrote:
>>> On Mon, Feb 17, 2014 at 5:37 PM, Jonas Gorski  wrote:
 On Thu, Feb 13, 2014 at 5:00 PM, Helmut Schaa
  wrote:
> When setting the associated interface down and up again a new
> switch device will be registered due to b53_phy_config_init
> doing the necessary allocations and registrations.
>
> Instead, register the switch device already in b53_phy_probe.
>
> Signed-off-by: Helmut Schaa 
> ---

 It would be good to have some changelog here to know what changed
 between v1, v2 and v3.
>>>
>>> Right, sorry bout that ...
>>>
 As far as I can tell you are now dropping the
 ethX alias completely?
>>>
>>> Correct, since the netdev is only known when attaching to the phy
>>> which caused the problem I wanted to fix in the first place ...
>>>
>>> And I agree with your previous comment that it is not safe to
>>> replace the phy name on attaching the netdev to the phy (for various
>>> reasons) ...
>>>
>>> Now, the name is consistent, but the dev_name of the actual switch
>>> is used. Which means you will get a switch device called "bcm53018"
>>> or "bcm53125" (would be bad if you have multiple switches).
>>
>> Actually, this is what the mmap and spi versions do as far as I can see.
>> Helmut
>
> You are thinking too complicated here, all switches are also available
> under a generic switchX name, so usually you only need to do ethX =>
> switch0 replacement (unless there are two switches, but I never saw
> such a device yet on bcm47xx or bcm63xx).

Indeed, didn't notice the switchX alias yet. I haven't found any time
to update the patch yet. Might take some more time, until then I carry
this patch in my tree ...

> The bigger problem is the conversion from the old kmod-switch
> standard, where you had to explicitly untag the cpu if you wanted it
> untagged with 'u', and the cpu was always implicitly tagged.

This seems unrelated or did I miss anything?
Helmut
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [patch] ar71xx: ar934x_nfc: fix memory initialization bug

2014-02-28 Thread Dávid Völgyes
ar71xx: ar934x_nfc: fix memory initialization bug

sizeof(array_from_function_definition) gives back the size of the pointer.
sizeof(type)  * array_size   should be used in memset.

Signed-off-by: David Völgyes 
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c
@@ -43,7 +43,7 @@ static void __init ath79_nfc_init_resource(struct resource res[2],
 	   unsigned long size,
 	   int irq)
 {
-	memset(res, 0, sizeof(res));
+	memset(res, 0, sizeof(struct resource) * 2);
 
 	res[0].flags = IORESOURCE_MEM;
 	res[0].start = base;
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] PATCH AR933x Serial Baud Rate

2014-02-28 Thread Alex Walker
Dear folks,

I noticed that the bit timing of the UART in the WR703N / AR9331
device is inaccurate and provide a patch to improve timing accuracy.

I suppose to change
#define AR933X_UART_MAX_STEP0x
to
#define AR933X_UART_MAX_STEP0x
in
linux-3.10.32/drivers/tty/serial/ar933x_uart.c

The maximum value of UART_STEP should be 13107 as suggested by the
AR9331 datasheet.
See section 6.2.3:
This value should range between 1310-13107 to
maintain a better than +5% accuracy.
13107 corresponds to 0x.

I did a detailed timing analysis using an oscilloscope. I'm using a
different version of picocom which in turn uses termios2 to support
arbitrary baud rates [2]. These are my findings. See [3] for the
screenshots.


Sending ASCII 'U' = 0x55 = 0b01010101
This results in a nice square wave with the start and stop bit. The
bit timing is generated from the 25 MHz internal frequency by a
fractional baud rate generator. This is state of the art to generate
'odd' baud rates as 115200 from 'even' clock rates as 25 MHz.

The setting of UART_CLOCK_SCALE and UART_CLOCK_STEP determine the bit
rate of the UART. These settings are dynamically calculated when
changing the baud rate.

On: BARRIER BREAKER (Bleeding Edge, r39757)
Linux myhost 3.10.32 #1 Fri Feb 28 11:03:52 CET 2014 mips GNU/Linux

Baud 115200
Screenshot 10 - 22

You can see a significant jitter of each bit time. At this baud rate
this is not yet a problem.

Baud 921600
Screenshot 23 - 38

At this baud rate the jitter already accumulated to a significant
portion of the bit time. This can make the connection unreliable.

Baud 50
Screenshot 39 - 41

The setting of UART_BAUD_STEP is much to high resulting in a jitter
that prevented me from having a reliable loopback connection.

I assume that for

Uart Clock:2500
Uart Baud:   50

the kernel calculates the following value

Uart Scale:  15
Uart Step:41943

This gist [1] for a user-landed code from the driver.

The granulation of the bit timing is 640 nsec and the UART_STEP is
41943. This value violates the recommendation from the data sheet.

I then applied my proposed change.

New Kernel with patch 104-tty-ar933x_uart-fix-clock-step-max.patch applied
Linux myhost 3.10.32 #1 Fri Feb 28 17:00:25 CET 2014 mips GNU/Linux

115200 Baud
[  182.15] ar933x_uart_get_scale_step: clk 2500, baud 115200,
scale 20, step 12683
Screenshot 42
compare to screenshot 10 and see that the jitter is a little smaller.

50 Baud
[  426.87] ar933x_uart_get_scale_step: clk 2500, baud 50,
scale 4, step 13107
Screenshot 43
As remainder(25E6, 5E5) is 0 there is no jitter with this
configuration. The bit timing is near perfect.

1 MBaud
[  690.90] ar933x_uart_get_scale_step: clk 2500, baud 100,
scale 1, step 10485
Screenshot 44, 45

2 MBaud
[  804.23] ar933x_uart_get_scale_step: clk 2500, baud 200,
scale 0, step 10485
Screenshot 46, 47

3 MBaud
The code fails so I propose to work on that ...
[  919.83] ar933x_uart_get_scale_step: clk 2500, baud 115200,
scale 20, step 12683

921600 Baud
[  993.68] ar933x_uart_get_scale_step: clk 2500, baud 921600,
scale 1, step 9663
Screenshot 48, 49
Finally, for the highest baudrate that is supported by an unpatched
picoterm the timing is nearly perfect, too.

Here is the patch:

Signed-off-by: Alex Aaron Walker 
---
Index: linux-3.10.32/drivers/tty/serial/ar933x_uart.c
===
--- linux-3.10.32.orig/drivers/tty/serial/ar933x_uart.c 2014-02-28
12:12:03.356386552 +0100
+++ linux-3.10.32/drivers/tty/serial/ar933x_uart.c  2014-02-28
12:15:21.716502356 +0100
@@ -33,7 +33,7 @@
 #define DRIVER_NAME "ar933x-uart"

 #define AR933X_UART_MAX_SCALE  0xff
-#define AR933X_UART_MAX_STEP   0x
+#define AR933X_UART_MAX_STEP   0x

 #define AR933X_UART_MIN_BAUD   300
 #define AR933X_UART_MAX_BAUD   300
@@ -221,6 +221,7 @@
*step = tstep;
}
}
+   printk("ar933x_uart_get_scale_step: clk %u, baud %u, scale %u,
step %u\n", clk, baud, *scale, *step);
 }

 static void ar933x_uart_set_termios(struct uart_port *port,

--

All feedback welcome

Alex

[1] https://gist.github.com/anonymous/9275937
[2] https://github.com/jmesmon/picocom.git
[3] https://plus.google.com/11394747937474864/posts/ZnmUHycHXbJ
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [packages] ddns-scripts : Add dyndns service providers

2014-02-28 Thread billchan



Adding dyndns service providers (dyndns.fr, dyndnspro.com, webdomotic.com and 
dynamicdomain.net).

In File : packages/net/ddns-scripts/files/usr/lib/ddns/services

Signed-off-by: Nabil Chaniour 



Index: packages/net/ddns-scripts/files/usr/lib/ddns/services
===
--- packages/net/ddns-scripts/files/usr/lib/ddns/services   (révision 
39603)
+++ packages/net/ddns-scripts/files/usr/lib/ddns/services   (copie de 
travail)
@@ -8,6 +8,15 @@
 # if you need to enter the same text in the url (which seems very unlikely) put
 # that text in lowercase, while the variables should remain in uppercase

+#Dyndns.fr
+"dyndns.fr" 
"http://[DOMAIN]:[PASSWORD]@dyndns.dyndns.fr/update.php?hostname=[DOMAIN]&myip=[IP]";
+#Dynamicdomain.net
+"dynamicdomain.net" 
"http://[DOMAIN]:[PASSWORD]@dyndns.dynamicdomain.net/update.php?hostname=[DOMAIN]&myip=[IP]";
+#Dyndnspro.com
+"dyndnspro.com" 
"http://[DOMAIN]:[PASSWORD]@dyndns.dyndnspro.com/update.php?hostname=[DOMAIN]&myip=[IP]";
+#webdomotic.com
+"webdomotic.com"
"http://[DOMAIN]:[PASSWORD]@dyndns.webdomotic.com/update.php?hostname=[DOMAIN]&myip=[IP]";
+
 "dyndns.org"   
"http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]";
 "changeip.com" 
"http://[USERNAME]:[PASSWORD]@nic.changeip.com/nic/update?u=[USERNAME]&p=[PASSWORD]&cmd=update&hostname=[DOMAIN]&ip=[IP]";
 "zoneedit.com" 
"http://[USERNAME]:[PASSWORD]@dynamic.zoneedit.com/auth/dynamic.html?host=[DOMAIN]&dnsto=[IP]";
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] cns3xxx: fix uImage build issue

2014-02-28 Thread Tim Harvey
The uImage target will always fail on a clean build due to dependency issues.
Building the uImage isn't necessary anyway as its re-built with correct
entry points in image/Makefile so remove it.

Signed-off-by: Tim Harvey 
---
 target/linux/cns3xxx/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/cns3xxx/Makefile b/target/linux/cns3xxx/Makefile
index 505be7a..7105c45 100644
--- a/target/linux/cns3xxx/Makefile
+++ b/target/linux/cns3xxx/Makefile
@@ -23,7 +23,7 @@ define Target/Description
eg. the Gateworks Laguna family
 endef
 
-KERNELNAME:="zImage uImage"
+KERNELNAME:="zImage"
 
 DEFAULT_PACKAGES += kmod-ath9k kmod-usb2 wpad-mini
 
-- 
1.8.3.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Fix regression in busybox sysntpd init when specifying more than one ntp server in the config file.

2014-02-28 Thread Vittorio G (VittGam)

Hi,

This patch fixes a regression introduced with r38787.

Before patching:
/usr/sbin/ntpd -n -l -p server1 server2 server3 server4

After patching:
/usr/sbin/ntpd -n -l -p server1 -p server2 -p server3 -p server4

Signed-off-by: Vittorio Gambaletta 
---

--- a/trunk/package/utils/busybox/files/sysntpd	2013-11-28 
12:28:40.0 +0100
+++ b/trunk/package/utils/busybox/files/sysntpd	2014-02-28 
19:51:48.957785869 +0100

@@ -24,7 +24,7 @@
procd_open_instance
procd_set_param command "$PROG" -n
[ "$enable_server" = "1" ] && procd_append_param command -l
-   for peer in "$server"; do
+   for peer in $server; do
procd_append_param command -p $peer
done
procd_set_param respawn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] Updated gmp to 5.1.3

2014-02-28 Thread Nikos Mavrogiannopoulos
Signed-off-by: Nikos Mavrogiannopoulos 
---
 libs/gmp/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libs/gmp/Makefile b/libs/gmp/Makefile
index 0a07990..4f6e167 100644
--- a/libs/gmp/Makefile
+++ b/libs/gmp/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
  PKG_NAME:=gmp
-PKG_VERSION:=5.1.0
+PKG_VERSION:=5.1.3
 PKG_RELEASE:=1
  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.gmplib.org/pub/$(PKG_NAME)-$(PKG_VERSION)/
-PKG_MD5SUM:=362cf515aff8dc240958ce47418e4c78
+PKG_MD5SUM:=a082867cbca5e898371a97bb27b31fea
  PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
-- 
1.8.5.3

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


[OpenWrt-Devel] [PATCH 2/2] Added nettle library

2014-02-28 Thread Nikos Mavrogiannopoulos
This library is needed for DNSSEC support in dnsmasq, and to update
gnutls to a more recent version.

Signed-off-by: Nikos Mavrogiannopoulos 
---
 libs/nettle/Makefile | 72

 1 file changed, 72 insertions(+)
 create mode 100644 libs/nettle/Makefile

diff --git a/libs/nettle/Makefile b/libs/nettle/Makefile
new file mode 100644
index 000..1c9b8d7
--- /dev/null
+++ b/libs/nettle/Makefile
@@ -0,0 +1,72 @@
+# +# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nettle
+PKG_VERSION:=2.7.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/nettle
+PKG_MD5SUM:=003d5147911317931dd453520eb234a5
+
+PKG_LICENSE:=LGPLv2
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libnettle
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=GNU crypto library
+  URL:=http://www.lysator.liu.se/~nisse/nettle/
+  DEPENDS+= +gmp
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+   --enable-shared \
+   --disable-openssl \
+   --disable-documentation \
+   --enable-static
+
+ifeq ($(CPU_SUBTYPE),neon)
+CONFIGURE_ARGS += \
+   --enable-arm-neon
+endif
+
+define Build/Compile
+   +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
+   DESTDIR="$(PKG_INSTALL_DIR)" \
+   all install
+endef
+
+define Build/InstallDev
+   $(INSTALL_DIR) $(1)/usr/include/nettle
+   $(CP) $(PKG_INSTALL_DIR)/usr/include/nettle/*.h $(1)/usr/include/nettle/
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnettle.{a,so*} $(1)/usr/lib/
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhogweed.{a,so*} $(1)/usr/lib/
+   $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
+   $(CP) \
+   $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/nettle.pc \
+   $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/hogweed.pc \
+   $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libnettle/install
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnettle.so.* $(1)/usr/lib/
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhogweed.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libnettle))
-- 
1.8.5.3

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


Re: [OpenWrt-Devel] [PATCH:kernel] OpenWRT for Raspberry PI - _fixed_ second version.

2014-02-28 Thread Florian Fainelli
2014-01-20 2:14 GMT-08:00 Bastian Bittorf :
> * Oskari Rauta  [20.01.2014 08:19]:
>> > Since the current raspberry pi target BCM2708  will never be accepted
>
> just an idea: maybe it should not be a subtarget of BCM2708 but
> a standalone one? than the special patches are not a problem anymore
> got the other BCM2708 ones...

I ended up rebasing raspberry/rpi-3.10.y against the latest
corresponding linux-3.10.y stable release, and that means about 175
patches... The good thing is that this should now bring us in line
with all the fixes you wanted, and it will make it easier to merge
future changes made to this branch.
-- 
Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [ramips] Rewrite rt2880.c pinmux code in latest format

2014-02-28 Thread Claudio Leite
The rt2880 pinmux code from r38026 does not include changes necessary
for the base RT2880 SOC target (rt2880.c) to build. This adapts the
existing code into the latest format.

Signed-off-by: Claudio Leite 
---

--- arch/mips/ralink/rt288x.c.orig  2014-02-26 11:41:22.346741653 -0500
+++ arch/mips/ralink/rt288x.c   2014-02-26 12:33:14.860727339 -0500
@@ -17,46 +17,27 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "common.h"
 
-static struct ralink_pinmux_grp mode_mux[] = {
-   {
-   .name = "i2c",
-   .mask = RT2880_GPIO_MODE_I2C,
-   .gpio_first = 1,
-   .gpio_last = 2,
-   }, {
-   .name = "spi",
-   .mask = RT2880_GPIO_MODE_SPI,
-   .gpio_first = 3,
-   .gpio_last = 6,
-   }, {
-   .name = "uartlite",
-   .mask = RT2880_GPIO_MODE_UART0,
-   .gpio_first = 7,
-   .gpio_last = 14,
-   }, {
-   .name = "jtag",
-   .mask = RT2880_GPIO_MODE_JTAG,
-   .gpio_first = 17,
-   .gpio_last = 21,
-   }, {
-   .name = "mdio",
-   .mask = RT2880_GPIO_MODE_MDIO,
-   .gpio_first = 22,
-   .gpio_last = 23,
-   }, {
-   .name = "sdram",
-   .mask = RT2880_GPIO_MODE_SDRAM,
-   .gpio_first = 24,
-   .gpio_last = 39,
-   }, {
-   .name = "pci",
-   .mask = RT2880_GPIO_MODE_PCI,
-   .gpio_first = 40,
-   .gpio_last = 71,
-   }, {0}
+static struct rt2880_pmx_func i2c_func[] = { FUNC("i2c", 0, 1, 2) };
+static struct rt2880_pmx_func spi_func[] = { FUNC("spi", 0, 3, 6) };
+static struct rt2880_pmx_func uartlite_func[] = { FUNC("uartlite", 0, 7, 14) };
+static struct rt2880_pmx_func jtag_func[] = { FUNC("jtag", 0, 17, 21) };
+static struct rt2880_pmx_func mdio_func[] = { FUNC("mdio", 0, 22, 23) };
+static struct rt2880_pmx_func sdram_func[] = { FUNC("sdram", 0, 24, 39) };
+static struct rt2880_pmx_func pci_func[] = { FUNC("pci", 0, 40, 71) };
+
+static struct rt2880_pmx_group rt2880_pinmux_data_act[] = {
+GRP("i2c", i2c_func, 1, RT2880_GPIO_MODE_I2C),
+GRP("spi", spi_func, 1, RT2880_GPIO_MODE_SPI),
+GRP("uartlite", uartlite_func, 1, RT2880_GPIO_MODE_UART0),
+GRP("jtag", jtag_func, 1, RT2880_GPIO_MODE_JTAG),
+GRP("mdio", mdio_func, 1, RT2880_GPIO_MODE_MDIO),
+GRP("sdram", sdram_func, 1, RT2880_GPIO_MODE_SDRAM),
+GRP("pci", pci_func, 1, RT2880_GPIO_MODE_PCI),
+{ 0 }
 };
 
 static void rt288x_wdt_reset(void)
@@ -69,11 +50,6 @@
rt_sysc_w32(t, SYSC_REG_CLKCFG);
 }
 
-struct ralink_pinmux rt_gpio_pinmux = {
-   .mode = mode_mux,
-   .wdt_reset = rt288x_wdt_reset,
-};
-
 void __init ralink_clk_init(void)
 {
unsigned long cpu_rate;
@@ -140,4 +116,6 @@
soc_info->mem_base = RT2880_SDRAM_BASE;
soc_info->mem_size_min = RT2880_MEM_SIZE_MIN;
soc_info->mem_size_max = RT2880_MEM_SIZE_MAX;
+
+rt2880_pinmux_data = rt2880_pinmux_data_act;
 }
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Can "network_get_device" work without current connection (offline)?

2014-02-28 Thread Rafał Miłecki
I found this issue while trying to get miniupnpd working. It was
constantly failing to start for me because of:
> user.notice upnp daemon: external interface not found, not starting

miniupnpd requires "external_iface" in config file
(/etc/config/upnpd). When starting it translates this "external_iface"
to a real (or VLAN) interface. The most obvious example is setting
"external_iface" to "wan". It should be translated to "eth1" (on most
ar71xx) or "eth0.2" (on most bcm47xx).

To handle this translation /etc/init.d/miniupnpd does:
local ifname
network_get_device ifname ${extiface:-wan}

Unfortunately "network_get_device ifname wan" doesn't set "ifname" to
anything when "wan" interface is down. As soon as I connect cable to
my "wan" (and let it grab DHCP addr) it starts working.
That isn't very helpful as I want "miniupnd" to always start, no
matter what is the status of "wan" interface.

Do you think "network_get_device" could be improved to work in such
scenario? Or is there good reason it doesn't work that way and
miniupnpd should use another way to determine real "wan" interface?

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


[OpenWrt-Devel] trunk build failure for feeds/packages/utils/nut

2014-02-28 Thread Tim Harvey
I've updated to OpenWrt trunk from from a version about 3 mo's old
(r39762) and I'm finding that with the various packages I've selected
in my .config something is causing feeds/packages/utils/nut to build
which fails with:

...
checking for pm_connect... no
checking for avahi-core version via pkg-config (0.6.30 minimum
required)... none found
checking for avahi-client version via pkg-config (0.6.30 minimum
required)... none found
checking for avahi cflags...
checking for avahi ldflags...
checking for avahi-common/malloc.h... no
checking for avahi_free... no
checking whether to build serial drivers... yes
configure: error: "USB drivers requested, but libusb not found."
make[3]: *** 
[/usr/src/openwrt/git/build_dir/target-arm_cortex-a9+neon_uClibc-0.9.33.2_eabi/nut-2.6.5/.configured_]
Error 1
make[3]: Leaving directory `/usr/src/openwrt/git/feeds/packages/utils/nut'
make[2]: *** [package/feeds/packages/nut/compile] Error 2
make[2]: Leaving directory `/usr/src/openwrt/git'
make[1]: *** 
[/usr/src/openwrt/git/staging_dir/target-arm_cortex-a9+neon_uClibc-0.9.33.2_eabi/stamp/.package_compile]
Error 2
make[1]: Leaving directory `/usr/src/openwrt/git'
make: *** [world] Error 2

I do have libusb-1.0=y and libusb-compat=y in my config so I'm still
not clear why nut fails.  I read that nut requires libusb-0.1 but
adding +libusb-compat to its DEPENDS did not help.

However the thing that bothers me more than 'nut' failing, is the fact
that it is _not_ selected in my .config.  What would be causing it to
build?   If I uninstall the package (./scripts/feeds uninstall nut) my
build succeeds fine.

Any ideas?

Thanks,

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


[OpenWrt-Devel] Problem linking libs in Developing a Makefile for mod security

2014-02-28 Thread Derek Werthmuller
I'm working on a makefile for mod security to work with nginx.  I've build
the makefile based on other makefiles and the recommendations.

Having problems having nginx build make use of mod security I started
looking at the details of the mod security build.   I trying to check the
mod security build to make sure that it has the libs linked properly.

Checking the library linking with :
~/development/openwrt/staging_dir/toolchain-arm_arm1176jzf-s+vfp_gcc-4.6-linaro_uClibc-0.9.33.2_eabi/bin$
./arm-openwrt-linux-ld
/home/user/development/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/modsecurity-apache_2.7.7/ipkg-install/usr/lib/standalone.so
and I get a bunch of these warnings:
./arm-openwrt-linux-ld: warning: libpcre.so.0, needed by
/home/user/development/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/modsecurity-apache_2.7.7/ipkg-install/usr/lib/standalone.so,
not found (try using -rpath or -rpath-link)

Any advice much appreciated.


Here is the makefile

#
# Copyright (C) Derek W
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
#

include $(TOPDIR)/rules.mk

PKG_NAME:=modsecurity
PKG_VERSION:=2.7.7
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-apache_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.modsecurity.org/tarball/2.7.7/
PKG_MD5SUM:=5383c59ecc6990c870386627f67e7216

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-apache_$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install

PKG_BUILD_PARALLEL:=0
PKG_BUILD_DEPENDS:=util-linux
PKG_INSTALL:=1

PKG_FIXUP = libtool

include $(INCLUDE_DIR)/package.mk

define Package/modsecurity
  SECTION:=net
  DEPENDS:=+apache +apr +libpcre +apr-util +libxml2 +pcre +libiconv-full
+libiconv +libcurl +expat $(ICONV_DEPENDS) $(INTL_DEPENDS) +lua \
  CATEGORY:=Network
  TITLE:=Modsecurity
  URL:=http://www.modsecurity.org/download/
  MENU:=1
endef

TARGET_CFLAGS += $(FPIC)
#TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE
TARGET_CPPFLAGS += \
-I$(STAGING_DIR)/usr/include/libxml2 \
-I$(STAGING_DIR)/usr/include/apache \
-I$(STAGING_DIR)/usr/include/apr-1 \
#-I$(STAGING_DIR)/usr/lib/pkgconfig \
#-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \

#TARGET_LDFLAGS += \
#-L$(STAGING_DIR)/usr/lib \
#-L$(ICONV_PREFIX)/lib \
#-L$(INTL_PREFIX)/lib \
#-Wl,-rpath=$(STAGING_DIR)/usr/lib \
#-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \

EXTRA_LDFLAGS += $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib

TARGET_LDFLAGS += \
-L$(STAGING_DIR)/usr/lib/ \
-s -rpath-link=$(STAGING_DIR)/usr/lib/ \
-Wl,-rpath=$(STAGING_DIR)/usr/lib/ \
-L$(ICONV_PREFIX)/lib \
-L$(INTL_PREFIX)/lib \
-L$(BUILD_DIR)/curl-7.33.0 -lcurl \
-L$(BUILD_DIR)/libxml2-2.7.8 \
-L$(STAGING_DIR)/usr/include/apache \
-L$(STAGING_DIR)/usr/include/apr-1 \


MAKE_VARS +=\
ICONV_PREFIX="$(ICONV_PREFIX)" \
INTL_PREFIX="$(INTL_PREFIX)" \

#CONFIGURE_VARS += \
#INCLUDES="$(BUILD_DIR)/httpd-2.2.26/include/" \

define Build/Configure
$(PKG_BUILD_DIR)/autogen.sh
$(call Build/Configure/Default,\
--with-apxs=$(STAGING_DIR)/usr/sbin/apxs \
--enable-standalone-module \
--disable-apache2-module \
--disable-mlogc \
--enable-verbose-output \
--enable-strict-compile \
--libdir=$(STAGING_DIR)/usr/lib \
--with-apr=$(STAGING_DIR)/usr/bin/apr-1-config \
--with-apu=$(STAGING_DIR)/usr/bin/apu-1-config \
--with-pcre=$(STAGING_DIR)/usr/bin/pcre-config \
--with-libxml=$(STAGING_DIR)/usr/bin/xml2-config \
--with-cc-opt="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
)
endef
#   --with-gnu-ld \

#   CPPFLAGS="-I$(BUILD_DIR)/libxml2-2.7.8/include \
# -I$(BUILD_DIR)/apr-util-1.3.12/include -I$(BUILD_DIR)/apr-1.4.5/include \
# -I$(BUILD_DIR)/usr/include -I$(STAGING_DIR)/usr/lib \
# -I$(STAGING_DIR)/usr/include/apache" \

define Build/Compile
$(call Build/Compile/Default)
endef

#define Build/Compile
#$(MKDIR) -p $(PKG_INSTALL_DIR)
#$(MAKE) -C $(PKG_BUILD_DIR) -Llib \
#CC="$(TARGET_CC)" \
#DESTDIR="$(PKG_INSTALL_DIR)" \
#HOST_CPU="$(PKGARCH)" \
#all install
#endef

define Package/modsecurity/InstallDev
$(INSTALL_DIR) $(PGK_BUILD_DIR)/usr/lib
$(CP) $(BUILD_DIR)/apr-util-1.3.12/include/apr_buckets.h
$(PGK_BUILD_DIR)/modsecurity-apache_2.7.7/nginx/modsecurity/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_BIN) $(PGK_BUILD_DIR)standalone.so $(1)/usr/include
endef

define Package/modsecurity/install
$(INSTALL_DIR) $(PGK_BUILD_DIR)/usr/lib
endef

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


[OpenWrt-Devel] [PATCH:kernel] OpenWRT for Raspberry PI - _fixed_ second version.

2014-02-28 Thread Oskari Rauta

Sounds great. Hope it works.

> 2014-01-20 2:14 GMT-08:00 Bastian Bittorf :
> 
> I ended up rebasing raspberry/rpi-3.10.y against the latest
> corresponding linux-3.10.y stable release, and that means about 175
> patches... The good thing is that this should now bring us in line
> with all the fixes you wanted, and it will make it easier to merge
>
> future changes made to this branch.
> -- 
> Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] Added nettle library

2014-02-28 Thread Nikos Mavrogiannopoulos
On 02/28/2014 09:27 PM, Nikos Mavrogiannopoulos wrote:
> This library is needed for DNSSEC support in dnsmasq, and to update
> gnutls to a more recent version.
[...]
> +ifeq ($(CPU_SUBTYPE),neon)
> +CONFIGURE_ARGS += \
> + --enable-arm-neon
> +endif

It seems my neon detection is wrong here as there is no cpu subtype as I
can see in non-kernel compilation. Is there a better detection of the
neon instruction set other than adding each board separated?

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