[OpenWrt-Devel] [BB] feeds.conf.default: telephony repository is now on github

2014-12-11 Thread Jiri Slachta

Signed-off-by: Jiri Slachta slac...@cesnet.cz
---
 feeds.conf.default | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/feeds.conf.default b/feeds.conf.default
index 4e6627b..7dfc9a8 100644
--- a/feeds.conf.default
+++ b/feeds.conf.default
@@ -1,7 +1,7 @@
 src-git packages https://github.com/openwrt/packages.git;for-14.07
 src-git luci https://github.com/openwrt/luci.git;luci-0.12
 src-git routing https://github.com/openwrt-routing/packages.git;for-14.07
-src-git telephony http://git.openwrt.org/feed/telephony.git;for-14.07
+src-git telephony http://github.com/openwrt/telephony.git;for-14.07
 src-git management https://github.com/openwrt-management/packages.git;for-14.07
 src-git oldpackages http://git.openwrt.org/14.07/packages.git
 #src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package
-- 
2.1.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] feeds.conf.default: telephony repository is now on github

2014-12-11 Thread Jiri Slachta

Signed-off-by: Jiri Slachta slac...@cesnet.cz
---
 feeds.conf.default | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/feeds.conf.default b/feeds.conf.default
index 30b9eed..7053240 100644
--- a/feeds.conf.default
+++ b/feeds.conf.default
@@ -1,7 +1,7 @@
 src-git packages https://github.com/openwrt/packages.git
 src-git luci https://github.com/openwrt/luci.git
 src-git routing https://github.com/openwrt-routing/packages.git
-src-git telephony http://git.openwrt.org/feed/telephony.git
+src-git telephony http://github.com/openwrt/telephony.git
 src-git management https://github.com/openwrt-management/packages.git
 #src-git oldpackages http://git.openwrt.org/packages.git
 #src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package
-- 
2.1.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] iwinfo: Fix incorrect buffer allocation in nl80211_get_ifcomb_cb()

2014-12-11 Thread Andrew McDonnell
This fixes a buffer overwrite, I found it when building with SSP enabled

---

 iwinfo_nl80211.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 2731b2b..be58c56 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -2446,15 +2446,15 @@ static int nl80211_get_ifcomb_cb(struct nl_msg *msg, 
void *arg)
[NL80211_IFACE_COMB_LIMITS] = { .type = NLA_NESTED },
[NL80211_IFACE_COMB_MAXNUM] = { .type = NLA_U32 },
};
-   struct nlattr *tb_comb[NUM_NL80211_IFACE_COMB];
+   struct nlattr *tb_comb[NUM_NL80211_IFACE_COMB+1];
static struct nla_policy 
iface_limit_policy[NUM_NL80211_IFACE_LIMIT] = {
[NL80211_IFACE_LIMIT_TYPES] = { .type = NLA_NESTED },
[NL80211_IFACE_LIMIT_MAX] = { .type = NLA_U32 },
};
-   struct nlattr *tb_limit[NUM_NL80211_IFACE_LIMIT];
+   struct nlattr *tb_limit[NUM_NL80211_IFACE_LIMIT+1];
struct nlattr *limit;
 
-   nla_parse_nested(tb_comb, NL80211_BAND_ATTR_MAX, comb, 
iface_combination_policy);
+   nla_parse_nested(tb_comb, NUM_NL80211_IFACE_COMB, comb, 
iface_combination_policy);
 
if (!tb_comb[NL80211_IFACE_COMB_LIMITS])
continue;
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Did you do any testing on 3.18?

2014-12-11 Thread Felix Fietkau
On 2014-12-09 22:02, Heiner Kallweit wrote:
 Thanks, Trond.
 With change set 43563 the kernel was updated to 3.14.26 so I guess that
 all mpc85xx builds since then will face this problem caused by
 commit cfd854909d7d68b752456137f14601bbae66d7d4.
 
 After having a brief look at this commit I think that instead of reverting
 this commit the better fix would be to fix the dts for TL-WDR4900 to
 have proper ranges definitions.
In my tests, 3.14.26 works just fine on the TL-WDR4900

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


[OpenWrt-Devel] [PATCH] kirkwood: enable EA4500 switch on 3.18

2014-12-11 Thread Claudio Leite
Signed-off-by: Claudio Leite lei...@staticky.com
---
 target/linux/kirkwood/patches-3.18/160-ea4500.patch | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/target/linux/kirkwood/patches-3.18/160-ea4500.patch 
b/target/linux/kirkwood/patches-3.18/160-ea4500.patch
index bf33756..7456b13 100644
--- a/target/linux/kirkwood/patches-3.18/160-ea4500.patch
+++ b/target/linux/kirkwood/patches-3.18/160-ea4500.patch
@@ -10,7 +10,7 @@
kirkwood-ib62x0.dtb \
 --- /dev/null
 +++ b/arch/arm/boot/dts/kirkwood-ea4500.dts
-@@ -0,0 +1,156 @@
+@@ -0,0 +1,167 @@
 +/*
 + * kirkwood-ea4500.dts - Device Tree file for Linksys EA4500
 + *
@@ -120,6 +120,17 @@
 +  gpios = gpio0 14 GPIO_ACTIVE_HIGH;
 +  };
 +  };
++
++  mvsw6171 {
++  compatible = marvell,88e6171;
++  status = okay;
++  reg = 0x10;
++
++  mii-bus = mdio;
++  cpu-port-0 = 5;
++  cpu-port-1 = 6;
++  is-indirect;
++  };
 +};
 +
 +nand {
-- 
2.1.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] netifd: Set source IP for DHCP static routes as well

2014-12-11 Thread Hans Dedecker
Commit ce92f6650bd8a86db04c7a6cbb58e7fdb200a7e6 added source IP support
for DHCP default routes. As a side effect of this change the default route
could be present twice in netifd (once with source IP set and once with
source IP unset) if it was sent by the server in both the router and static
route options. Therefore add source IP support as well for static routes as this
case was not considered. Additional remove unused parameter type.

Signed-off-by: Hans Dedecker dedec...@gmail.com
---
 package/network/config/netifd/files/lib/netifd/dhcp.script | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script 
b/package/network/config/netifd/files/lib/netifd/dhcp.script
index 17e22af..54d3aa1 100755
--- a/package/network/config/netifd/files/lib/netifd/dhcp.script
+++ b/package/network/config/netifd/files/lib/netifd/dhcp.script
@@ -6,9 +6,8 @@
 
 set_classless_routes() {
local max=128
-   local type
while [ -n $1 -a -n $2 -a $max -gt 0 ]; do
-   proto_add_ipv4_route ${1%%/*} ${1##*/} $2
+   proto_add_ipv4_route ${1%%/*} ${1##*/} $2 $ip
max=$(($max-1))
shift 2
done
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/5] ustream: add function ustream_fill_with_read_buf().

2014-12-11 Thread Felix Fietkau
On 2014-11-11 11:51, Yousong Zhou wrote:
 Useful in the following use pattern.
 
   int available = ustream_pending_data(s, false);
   if (available = sizeof(struct msghdr)) {
   struct msghdr h;
   ustream_fill_with_read_buf(s, h, sizeof(h));
   }
 
 Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
I'd prefer to have this named ustream_read() instead - similar to
ustream_write().

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


Re: [OpenWrt-Devel] [PATCH 5/5] ustream: call notify_write() when bytes are written.

2014-12-11 Thread Felix Fietkau
On 2014-11-11 11:51, Yousong Zhou wrote:
 
 Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
The idea behind the notify_write callback was to notify callers of
buffers being drained. What's the intended use case for this patch?

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


Re: [OpenWrt-Devel] [PATCH 2/3] Fix SSL negotiation being interrupted by .notify_write from BIO method.

2014-12-11 Thread Felix Fietkau
On 2014-11-11 11:34, Yousong Zhou wrote:
 ustream_ssl_check_conn() may be called by .notify_write while a previous
 SSL_connect() is still in process.  This can happen because the
 .notify_write callback will may be triggered by writes in the BIO
 methods.
 
 Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
 ---
  ustream-ssl.c |   19 +++
  ustream-ssl.h |1 +
  2 files changed, 16 insertions(+), 4 deletions(-)
 
 diff --git a/ustream-ssl.c b/ustream-ssl.c
 index dd0faf9..84104b0 100644
 --- a/ustream-ssl.c
 +++ b/ustream-ssl.c
 @@ -34,12 +34,22 @@ static void ustream_ssl_error_cb(struct uloop_timeout *t)
   us-notify_error(us, error, __ustream_ssl_strerror(us-error, 
 buffer, sizeof(buffer)));
  }
  
 +static enum ssl_conn_status ustream_ssl_do_connect(struct ustream_ssl *us)
 +{
 + enum ssl_conn_status status;
 +
 + us-connecting = true;
 + status = __ustream_ssl_connect(us);
 + us-connecting = false;
 + return status;
 +}
 +
I think this can be fixed in a much simpler way. Simply prevent
re-entrant calls to __ustream_ssl_connect through a static variable. The
other checks for us-connecting should be unnecessary, I think
!us-connected is enough.

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


Re: [OpenWrt-Devel] [PATCH v2 00/10] libubox: various minor fixes and enhancements.

2014-12-11 Thread Felix Fietkau
On 2014-11-12 14:59, Yousong Zhou wrote:
 Yousong Zhou (10):
   libubox: drop legacy json-c support
   lua: do not hardcode /opt/local/include for Apple.
   examples: fix build.
   ustream: add function ustream_fill_with_read_buf().
   ustream: call notify_write() when bytes are written.
   blobmsg: remove unneeded assignment in blobmsg_alloc_string_buffer().
   jshn: add error handling and fix memory leak in jshn_format().
   json_script: fix logic invert of handle_expr_not().
   json_script: fix eval_string().
   json_script: remove unneed argument check before calling
 __json_script_file_free().
Merged all patches except for the ones I commented on. Thanks!

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


Re: [OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-11 Thread Jonas Gorski
Hi,

On Mon, Dec 8, 2014 at 7:19 AM, John Crispin blo...@openwrt.org wrote:
 Hi,
 also if anyone feels like testing the 3.14 i would appreciate the effort.


Flashed it onto my WAG354G, and it booted through with the expected
module load issue of acx-mac80211, and an unexpected watchdog
failure(?).


Jonas


Booting...
[0.00] Linux version 3.14.26 (jonas@newshaker64) (gcc version
4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r43560) ) #1 Thu Dec 11 19:53:05
CET 2014
[0.00] ar7-gpio: registered 32 GPIOs
[0.00] bootconsole [early0] enabled
[0.00] CPU0 revision is: 00018448 (MIPS 4KEc)
[0.00] TI AR7 (TNETD7300), ID: 0x0005, Revision: 0x27
[0.00] Determined physical RAM map:
[0.00]  memory: 0100 @ 1400 (usable)
[0.00] Initrd not found or empty - disabling initrd
...
[   20.42] acx_mac80211: Unknown symbol ieee80211_queue_stopped (err 0)
[   20.44] acx_mac80211: Unknown symbol ieee80211_free_hw (err 0)
[   20.46] acx_mac80211: Unknown symbol ieee80211_probereq_get (err 0)
[   20.48] acx_mac80211: Unknown symbol ieee80211_register_hw (err 0)
[   20.50] acx_mac80211: Unknown symbol ieee80211_restart_hw (err 0)
...
[3.32] Freeing unused kernel memory: 128K (9440 - 9442)
procd: Console is alive
procd: WDT failed to write: Bad file descriptor
procd: WDT failed to write: Bad file descriptor
procd: WDT failed to write: Bad file descriptor
procd: - preinit -
...
[   48.54] br-lan: port 3(eth0.1) entered forwarding state
[   48.64] br-lan: port 4(eth0.2) entered forwarding state
procd: - init complete -



BusyBox v1.22.1 (2014-12-08 12:48:22 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  ___ __
 |   |.-.-.-.|  |  |  |..|  |_
 |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
 |___||   __|_|__|__||||__|  ||
  |__| W I R E L E S S   F R E E D O M
 -
 CHAOS CALMER (Bleeding Edge, r43578)
 -
  * 1 1/2 oz GinShake with a glassful
  * 1/4 oz Triple Sec   of broken ice and pour
  * 3/4 oz Lime Juice   unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -
root@OpenWrt:/#
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] enable vlan filtering.

2014-12-11 Thread Jonathan Thibault
This is quite useful when you want to encapsulate l2 into a vpn and
other things of that nature.

I've called the package containing the 'bridge' command bridge2 (from
iproute2) to avoid conflicting with old package 'bridge' which should
really be called 'bridge-utils' and which provides 'brctl'.

It could be called 'iproute2-bridge' or something else, I'll let
maintainers decide what is best.

Maybe since brctl is now provided by busybox, there's no real need for
the original 'bridge' package.

diff --git a/package/kernel/linux/modules/netsupport.mk
b/package/kernel/linux/modules/netsupport.mk
index fc85e22..542462b 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -86,7 +86,8 @@ define KernelPackage/bridge
   DEPENDS:=+kmod-stp
   KCONFIG:= \
CONFIG_BRIDGE \
-   CONFIG_BRIDGE_IGMP_SNOOPING=y
+   CONFIG_BRIDGE_IGMP_SNOOPING=y \
+   CONFIG_BRIDGE_VLAN_FILTERING=y
   FILES:=$(LINUX_DIR)/net/bridge/bridge.ko
   AUTOLOAD:=$(call AutoLoad,11,bridge)
 endef
diff --git a/package/network/utils/iproute2/Makefile
b/package/network/utils/iproute2/Makefile
index fc47159..98cc8fd 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -53,6 +53,11 @@ $(call Package/iproute2/Default)
   TITLE:=General netlink utility frontend
 endef
 
+define Package/bridge2
+$(call Package/iproute2/Default)
+  TITLE:=Bridge configuration utility
+endef
+
 define Package/ss
 $(call Package/iproute2/Default)
   TITLE:=Socket statistics utility
@@ -122,6 +127,11 @@ define Package/genl/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
 endef
 
+define Package/bridge2/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/
+endef
+
 define Package/ss/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/
@@ -131,4 +141,5 @@ $(eval $(call BuildPackage,ip))
 $(eval $(call BuildPackage,ip-full))
 $(eval $(call BuildPackage,tc))
 $(eval $(call BuildPackage,genl))
+$(eval $(call BuildPackage,bridge2))
 $(eval $(call BuildPackage,ss))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-11 Thread John Crispin


On 11/12/2014 20:08, Jonas Gorski wrote:
 procd: WDT failed to write: Bad file descriptor

this is  a bug in procd. i have a fix staged already and will push it
tomorrow with 2 other fixes

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


Re: [OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-11 Thread Jonas Gorski
On Thu, Dec 11, 2014 at 8:39 PM, John Crispin blo...@openwrt.org wrote:


 On 11/12/2014 20:08, Jonas Gorski wrote:
 procd: WDT failed to write: Bad file descriptor

 this is  a bug in procd. i have a fix staged already and will push it
 tomorrow with 2 other fixes

Great, thanks for the heads up. I just pushed a fix/workaround for the
mac-acx80211 loading issue.


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


Re: [OpenWrt-Devel] request for ar7 test hw / 3.14 testing

2014-12-11 Thread John Crispin


On 11/12/2014 20:43, Jonas Gorski wrote:
 On Thu, Dec 11, 2014 at 8:39 PM, John Crispin blo...@openwrt.org wrote:


 On 11/12/2014 20:08, Jonas Gorski wrote:
 procd: WDT failed to write: Bad file descriptor

 this is  a bug in procd. i have a fix staged already and will push it
 tomorrow with 2 other fixes
 
 Great, thanks for the heads up. I just pushed a fix/workaround for the
 mac-acx80211 loading issue.
 
 
 Jonas
 


thanks, i think we fixed most of the left over fallout today and
tonights CC test build should yield good results which puts us on track
for a Christmas Calmer ;) (no promises though)

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


[OpenWrt-Devel] Can we have init call for diag.sh (set_state)?

2014-12-11 Thread Rafał Miłecki
Let me simplify booting process into following stages:
1) preinit (LED blinking with medium freq)
2) init (LED blinking with medium freq)
3) done (LED state on)

The problem is this duplicated medium freq and that diag.sh
(set_state) has only two of above stages:
1) preinit
2) done
So we can't signal that OpenWrt went from preinit to init and e.g.
failsafe is not accessible anymore.

Could we change it? Is that OK if we add something like
init)
status_led_blink_init
with some low blinking frequency?

The purpose of that is to let user know it's too late for entering a
failsafe mode.

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


Re: [OpenWrt-Devel] Can we have init call for diag.sh (set_state)?

2014-12-11 Thread John Crispin


On 11/12/2014 20:59, Rafał Miłecki wrote:
 Let me simplify booting process into following stages:
 1) preinit (LED blinking with medium freq)
 2) init (LED blinking with medium freq)
 3) done (LED state on)
 
 The problem is this duplicated medium freq and that diag.sh
 (set_state) has only two of above stages:
 1) preinit
 2) done
 So we can't signal that OpenWrt went from preinit to init and e.g.
 failsafe is not accessible anymore.
 
 Could we change it? Is that OK if we add something like
 init)
 status_led_blink_init
 with some low blinking frequency?
 
 The purpose of that is to let user know it's too late for entering a
 failsafe mode.
 

sure sound like a good idea, wanna cook a patch ?

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


[OpenWrt-Devel] [PATCH] oxnas: use ARM BCJ filter for XZ decompression

2014-12-11 Thread Daniel Golle
Restoring the config for kernel 3.14 didn't contain that change already
made to config-3.18.
It is needed to make squashfs in the kernel match the compression settings
for ARCH=arm in the framework.
If set to ARMTHUMB, boot fails due to squashfs being unreadable if the
filesystem was generated for wth ARM BCJ filter.

in include/image.mk:BCJ_FILTER:=-Xbcj $(LINUX_KARCH)
Thus the ARM filter is used for all ARM targets.

Signed-off-by: Daniel Golle dan...@makrotopia.org
---
 target/linux/oxnas/config-3.14 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/oxnas/config-3.14 b/target/linux/oxnas/config-3.14
index 727d81e..086f870 100644
--- a/target/linux/oxnas/config-3.14
+++ b/target/linux/oxnas/config-3.14
@@ -339,7 +339,7 @@ CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_WATCHDOG_CORE=y
 CONFIG_WATCHDOG_NOWAYOUT=y
 CONFIG_XPS=y
-CONFIG_XZ_DEC_ARMTHUMB=y
+CONFIG_XZ_DEC_ARM=y
 CONFIG_XZ_DEC_BCJ=y
 CONFIG_ZBOOT_ROM_BSS=0
 CONFIG_ZBOOT_ROM_TEXT=0
-- 
2.1.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] mxs: indention and whitespace fixes

2014-12-11 Thread Michael Heimpold
Align this file with the style of most other modules.mk.

Signed-off-by: Michael Heimpold m...@heimpold.de
---

Rebased to latest head since usb was moved to common modules, see
http://git.openwrt.org/?p=openwrt.git;a=commit;h=602ce5f770d3fb4b8f2c458a27579f9c87d46e82

 target/linux/mxs/modules.mk |   73 ++-
 1 file changed, 37 insertions(+), 36 deletions(-)

diff --git a/target/linux/mxs/modules.mk b/target/linux/mxs/modules.mk
index 10ea3d6..187ae60 100644
--- a/target/linux/mxs/modules.mk
+++ b/target/linux/mxs/modules.mk
@@ -1,86 +1,87 @@
 #
-# Copyright (C) 2013 OpenWrt.org
+# Copyright (C) 2013-2014 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 
 define KernelPackage/rtc-stmp3xxx
-SUBMENU:=$(OTHER_MENU)
-TITLE:=STMP3xxx SoC built-in RTC support
-DEPENDS:=@TARGET_mxs
-$(call AddDepends/rtc)
-KCONFIG:= \
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=STMP3xxx SoC built-in RTC support
+  DEPENDS:=@TARGET_mxs
+  $(call AddDepends/rtc)
+  KCONFIG:= \
CONFIG_RTC_CLASS=y \
CONFIG_RTC_DRV_STMP=m
-FILES:=$(LINUX_DIR)/drivers/rtc/rtc-stmp3xxx.ko
-AUTOLOAD:=$(call AutoLoad,50,rtc-stmp3xxx)
+  FILES:=$(LINUX_DIR)/drivers/rtc/rtc-stmp3xxx.ko
+  AUTOLOAD:=$(call AutoLoad,50,rtc-stmp3xxx)
 endef
 
 $(eval $(call KernelPackage,rtc-stmp3xxx))
 
 define KernelPackage/wdt-stmp3xxx
-SUBMENU:=$(OTHER_MENU)
-TITLE:=STMP3xxx Watchdog timer
-DEPENDS:=kmod-rtc-stmp3xxx
-KCONFIG:=CONFIG_STMP3XXX_RTC_WATCHDOG
-FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/stmp3xxx_rtc_wdt.ko
-AUTOLOAD:=$(call AutoLoad,51,stmp3xxx_rtc_wdt)
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=STMP3xxx Watchdog timer
+  DEPENDS:=kmod-rtc-stmp3xxx
+  KCONFIG:=CONFIG_STMP3XXX_RTC_WATCHDOG
+  FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/stmp3xxx_rtc_wdt.ko
+  AUTOLOAD:=$(call AutoLoad,51,stmp3xxx_rtc_wdt)
 endef
 
 define KernelPackage/wdt-stmp3xxx/description
-Kernel module for STMP3xxx watchdog timer.
+  Kernel module for STMP3xxx watchdog timer.
 endef
 
 $(eval $(call KernelPackage,wdt-stmp3xxx))
 
 define KernelPackage/sound-soc-mxs
-TITLE:=Freescale i.MX23/i.MX28 built-in SoC sound support
-KCONFIG:= \
+  TITLE:=Freescale i.MX23/i.MX28 built-in SoC sound support
+  KCONFIG:= \
CONFIG_SND_SOC_MXS_BUILTIN_CODEC \
CONFIG_SND_MXS_SOC_BUILTIN
-FILES:= \
+  FILES:= \
$(LINUX_DIR)/sound/soc/mxs/snd-soc-mxs-builtin-audio.ko \
$(LINUX_DIR)/sound/soc/mxs/snd-soc-mxs-builtin-dai.ko \
$(LINUX_DIR)/sound/soc/mxs/snd-soc-mxs-builtin-pcm.ko \
$(LINUX_DIR)/sound/soc/codecs/snd-soc-mxs-builtin-codec.ko
-AUTOLOAD:=$(call AutoLoad,65,snd-soc-mxs-builtin-pcm 
snd-soc-mxs-builtin-dai snd-soc-mxs-builtin-codec snd-soc-mxs-builtin-audio)
-DEPENDS:=@TARGET_mxs +kmod-sound-soc-core
-$(call AddDepends/sound)
+  AUTOLOAD:=$(call AutoLoad,65,snd-soc-mxs-builtin-pcm snd-soc-mxs-builtin-dai 
snd-soc-mxs-builtin-codec snd-soc-mxs-builtin-audio)
+  DEPENDS:=@TARGET_mxs +kmod-sound-soc-core
+  $(call AddDepends/sound)
 endef
 
 define KernelPackage/sound-soc-mxs/description
-Kernel support for Freescale i.MX23/i.MX28 built-in SoC audio
+  Kernel support for Freescale i.MX23/i.MX28 built-in SoC audio
 endef
 
 $(eval $(call KernelPackage,sound-soc-mxs))
 
 define KernelPackage/iio-mxs-lradc
-SUBMENU:=$(OTHER_MENU)
-TITLE:=LRADC driver for i.MX23/28
-DEPENDS:=@TARGET_mxs
-KCONFIG:=CONFIG_MXS_LRADC
-FILES:=$(LINUX_DIR)/drivers/staging/iio/adc/mxs-lradc.ko \
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=LRADC driver for i.MX23/28
+  DEPENDS:=@TARGET_mxs
+  KCONFIG:=CONFIG_MXS_LRADC
+  FILES:= \
+   $(LINUX_DIR)/drivers/staging/iio/adc/mxs-lradc.ko \
$(LINUX_DIR)/drivers/iio/industrialio-triggered-buffer.ko
-AUTOLOAD:=$(call AutoLoad,70,industrialio-triggered-buffer mxs-lradc)
+  AUTOLOAD:=$(call AutoLoad,70,industrialio-triggered-buffer mxs-lradc)
 endef
 
 define KernelPackage/iio-mxs-lradc/description
-Kernel module for i.MX23/28 LRADC driver
+  Kernel module for i.MX23/28 LRADC driver
 endef
 
 $(eval $(call KernelPackage,iio-mxs-lradc))
 
 define KernelPackage/crypto-hw-dcp
-TITLE:=i.MX23/28 DCP hardware crypto module
-DEPENDS:=@TARGET_mxs
-KCONFIG:=CONFIG_CRYPTO_DEV_MXS_DCP
-FILES:=$(LINUX_DIR)/drivers/crypto/mxs-dcp.ko
-AUTOLOAD:=$(call AutoLoad,90,mxs-dcp)
-$(call AddDepends/crypto,+kmod-crypto-authenc +kmod-crypto-des)
+  TITLE:=i.MX23/28 DCP hardware crypto module
+  DEPENDS:=@TARGET_mxs
+  KCONFIG:=CONFIG_CRYPTO_DEV_MXS_DCP
+  FILES:=$(LINUX_DIR)/drivers/crypto/mxs-dcp.ko
+  AUTOLOAD:=$(call AutoLoad,90,mxs-dcp)
+  $(call AddDepends/crypto,+kmod-crypto-authenc +kmod-crypto-des)
 endef
 
 define KernelPackage/crypto-hw-dcp/description
-Kernel support for the i.MX23/28 DCP crypto engine
+  Kernel support for the i.MX23/28 DCP crypto engine
 endef
 
 $(eval $(call 

Re: [OpenWrt-Devel] [PATCH] au1000: distinguish different models and set correct MAC-address

2014-12-11 Thread Bruno Randolf
Hi Bastian,

There is a syntax error in the /etc/uci-defaults/02_network script, but
even when I fix that, the MAC address is not set. What is
ucidef_set_interface_macaddr supposed to do?

Some more comments below:

On 12/10/2014 09:26 PM, Bastian Bittorf wrote:
 The target au1000 has at least 2 different models, the
 'InternetBox' and the 'MeshCube' which look very similar
 from the kernel point of view but are totally different
 devices which base on the same design. Populating /tmp/sysinfo
 now. The 1st one has an issue which leads to a random
 mac-address after each boot which is corrected now via
 reading the bootloader-env. The real fix would be
 converting to DTS, this is only a workaround now.
 Signed-off-by: Bastian Bittorf bitt...@bluebottle.com
 ---
  .../au1000/base-files/etc/uci-defaults/02_network  |   17 ++
  target/linux/au1000/base-files/lib/au1000.sh   |   59 
 
  2 files changed, 76 insertions(+)
  create mode 100755 target/linux/au1000/base-files/etc/uci-defaults/02_network
  create mode 100644 target/linux/au1000/base-files/lib/au1000.sh
 
 diff --git a/target/linux/au1000/base-files/etc/uci-defaults/02_network 
 b/target/linux/au1000/base-files/etc/uci-defaults/02_network
 new file mode 100755
 index 000..80bfb73
 --- /dev/null
 +++ b/target/linux/au1000/base-files/etc/uci-defaults/02_network
 @@ -0,0 +1,17 @@
 +#!/bin/sh
 +
 +. /lib/au1000.sh
 +. /lib/functions/system.sh
 +. /lib/functions/uci-defaults.sh
 +MAC=
 +
 +case $(au1000_board_name) in
 + 'internetbox')
 + MAC=$( au1000_yamonenv_getvar 'ethaddr' )
 + MAC=$( macaddr_canonicalize $MAC )
 +
 + [ -n $MAC ]  ucidef_set_interface_macaddr lan $MAC

/etc/uci-defaults/02_network: line 13: syntax error: unterminated quoted
string - around $MAC

 + ;;
 +esac
 +
 +[ -z $MAC ] || uci commit network
 diff --git a/target/linux/au1000/base-files/lib/au1000.sh 
 b/target/linux/au1000/base-files/lib/au1000.sh
 new file mode 100644
 index 000..556598d
 --- /dev/null
 +++ b/target/linux/au1000/base-files/lib/au1000.sh
 @@ -0,0 +1,59 @@
 +#!/bin/sh
 +
 +au1000_yamonenv_getvar()
 +{
 + local varname=$1
 + local partition
 +
 + . /lib/functions.sh
 +
 + partition=$( find_mtd_part 'yamon env' )
 + YAMONENVFILE=$partition yamonenv $varname

That part also works on the Cube with JFFS2. I get the MAC address
correctly.

 +au1000_detect()
 +{
 + local line board_name model
 +
 + while read line; do
 + case $line in
 + 'system type'*)
 + break
 + ;;
 + esac
 + done '/proc/cpuinfo'
 +
 + case $line in
 + *' MTX-1')
 + # both models appear nearly similar: the 'InternetBox' 
 has
 + # the same design but shrinked to 1 PCB and only 1 x 
 miniPCI
 + # for WiFi/ath5k and 1 x miniPCI for CardBus/UMTS, they 
 differ
 + # in BogoMIPS but there are old MeshCubes with 330 Mhz 
 instead
 + # of 400 MHz and no Cube has 'imei' (for UMTS) set in 
 bootloader-env
 +
 + if [ -n $( au1000_yamonenv_getvar 'imei' ) ]; then
 + board_name='internetbox'
 + model='T-Mobile InternetBox TMD SB1-S'
 + else
 + board_name='meshcube'
 + model='4G Systems AccessCube/MeshCube'
 + fi
 + ;;
 + *)
 + board_name='unknown'
 + model='unknown'

That case statement looks pointless, but it makes sense to easily extend
the Models. For example there is one more au1000 based board I know of,
the XXS1500 from mycable.de

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


[OpenWrt-Devel] [PATCH] uhttpd2: Set HTTPS environment variable

2014-12-11 Thread Dan Staples
Currently, the only way for cgi scripts to determine if the request was made 
over SSL seems to be to check if the SERVER_PORT environment variable is set to 
443, which is less than ideal. This sets the HTTPS environment variable, like 
the first version of uhttpd.

Signed-off-by: Dan Staples danstaples at opentechinstitute.org
---
 proc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/proc.c b/proc.c
index 9c4b685..b520b91 100644
--- a/proc.c
+++ b/proc.c
@@ -81,6 +81,7 @@ enum extra_vars {
VAR_METHOD,
VAR_PATH_INFO,
VAR_USER,
+   VAR_TLS,
VAR_REDIRECT,
VAR_SERVER_NAME,
VAR_SERVER_ADDR,
@@ -108,6 +109,7 @@ static struct env_var extra_vars[] = {
[VAR_METHOD] = { REQUEST_METHOD },
[VAR_PATH_INFO] = { PATH_INFO },
[VAR_USER] = { REMOTE_USER },
+   [VAR_TLS] = { HTTPS },
[VAR_REDIRECT] = { REDIRECT_STATUS, redirect_status },
[VAR_SERVER_NAME] = { SERVER_NAME, local_addr },
[VAR_SERVER_ADDR] = { SERVER_ADDR, local_addr },
@@ -143,6 +145,7 @@ struct env_var *uh_get_process_vars(struct client *cl, 
struct path_info *pi)
extra_vars[VAR_METHOD].value = http_methods[req-method];
extra_vars[VAR_PATH_INFO].value = pi-info;
extra_vars[VAR_USER].value = req-realm ? req-realm-user : NULL;
+   extra_vars[VAR_TLS].value = cl-tls ? on : NULL;
 
snprintf(redirect_status, sizeof(redirect_status),
 %d, req-redirect_status);
-- 
1.8.3.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [OpenWrt-Users] note: grep-2.21 now treats ISO-8859 text files as binary

2014-12-11 Thread camden lindsay
Devs-

What is the proper resolution to this?

A newer version of grep breaks the feeds script for (at least ) one package
(clearsilver) in oldpackages because it recognizes the file as being binary
and reports such... ending up breaking the pattern matching in the
following script lines.

What is the appropriate way to fix this?
- Add the -a flag to offending line  to allow binary files to be treated as
text
- Set environmental flag (somehow) to force locale to C (LC_ALL=C); another
suggestion from the GNU.org folks
- Contact package maintainer and request the file locale be changed to
ASCII (If i'm not wrong the only character in it not ASCII is the
'MAINTAINER:=' field)

This will break build for anyone enabling oldpackages in their
feeds.conf(.default)

thanks
Camden


On Thu, Dec 11, 2014 at 12:49 PM, Robert P. J. Day rpj...@crashcourse.ca
wrote:

 On Thu, 11 Dec 2014, camden lindsay wrote:

  If i'm reading that thread correctly, this is a 'feature' rather
  than a 'bug'.. From that discussion:

   This is another side effect of using a multibyte locale. As long
  as there are no NUL bytes in your input, you can work around the
  issue by running grep in the C locale:
 
LC_ALL=C grep ...
  
  Yes, the C locale has the nice effect of EVERY byte being a valid single
  byte character, leaving only NUL bytes and a non-empty file not ending
  in newline as the only reasons for a file to be marked binary.
  

   i won't argue that it's a feature, only that it has the potential to
 catch the occasional person unawares. :-P

  I wonder if this is something that the devs would consider
  patching... i'm not sure what the proper way to declare a variable
  would be (or if they woudl want to do it)... or if it would be
  better to use -a in that grep line.

   the only gotcha i've run across is a single Makefile being
 interpreted as ISO-8859, so just fixing *that* call to grep would be
 sufficient.

 rday

 --

 
 Robert P. J. Day Ottawa, Ontario, CANADA
 http://crashcourse.ca

 Twitter:   http://twitter.com/rpjday
 LinkedIn:   http://ca.linkedin.com/in/rpjday
 
 ___
 openwrt-users mailing list
 openwrt-us...@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users


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


[OpenWrt-Devel] [PATCH 1/2] uboot-oxnas: install u-boot.bin also to KERNEL_BUILD_DIR

2014-12-11 Thread Daniel Golle
Signed-off-by: Daniel Golle dan...@makrotopia.org
---
 package/boot/uboot-oxnas/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/boot/uboot-oxnas/Makefile 
b/package/boot/uboot-oxnas/Makefile
index e233943..825907b 100644
--- a/package/boot/uboot-oxnas/Makefile
+++ b/package/boot/uboot-oxnas/Makefile
@@ -82,6 +82,8 @@ define Package/uboot/install/default
$(INSTALL_DIR) $(BIN_DIR)
$(CP) $(PKG_BUILD_DIR)/u-boot.bin \
$(BIN_DIR)/openwrt-$(BOARD)-$(1)-u-boot.bin
+   $(CP) $(PKG_BUILD_DIR)/u-boot.bin \
+   $(KERNEL_BUILD_DIR)/u-boot.bin
 endef
 
 define Package/uboot/install/template
-- 
2.1.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] oxnas: use u-boot.bin in KDIR

2014-12-11 Thread Daniel Golle
This fixes building *u-boot-initramfs.bin images using ImageBuilder

Signed-off-by: Daniel Golle dan...@makrotopia.org
---
 target/linux/oxnas/image/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/oxnas/image/Makefile 
b/target/linux/oxnas/image/Makefile
index 3a2a58d..a3dae16 100644
--- a/target/linux/oxnas/image/Makefile
+++ b/target/linux/oxnas/image/Makefile
@@ -36,8 +36,8 @@ define Image/BuildKernel/Template
  ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
$(call 
Image/BuildKernel/MkFIT,$(1),$(KDIR)/zImage-initramfs,$(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb,none,0x60008000,0x60008000,-initramfs)
$(CP) $(KDIR)/fit-$(1)-initramfs.itb 
$(BIN_DIR)/$(IMG_PREFIX)-$(1)-fit-uImage-initramfs.itb
-   if [ -e $(BIN_DIR)/$(IMG_PREFIX)-ox820-u-boot.bin ]; then \
-   ( dd if=$(BIN_DIR)/$(IMG_PREFIX)-ox820-u-boot.bin bs=128k conv=sync ; 
dd if=$(KDIR)/fit-$(1)-initramfs.itb bs=128k conv=sync ) \
+   if [ -e $(KDIR)/u-boot.bin ]; then \
+   ( dd if=$(KDIR)/u-boot.bin bs=128k conv=sync ; dd 
if=$(KDIR)/fit-$(1)-initramfs.itb bs=128k conv=sync ) \
 $(BIN_DIR)/$(IMG_PREFIX)-$(1)-u-boot-initramfs.itb; \
fi
  endif
-- 
2.1.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] oxnas: clean up default package selection

2014-12-11 Thread Daniel Golle
Signed-off-by: Daniel Golle dan...@makrotopia.org
---
 target/linux/oxnas/Makefile|  2 +-
 target/linux/oxnas/profiles/100-Generic.mk | 10 ++
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/target/linux/oxnas/Makefile b/target/linux/oxnas/Makefile
index d957fca..e0f2d4c 100644
--- a/target/linux/oxnas/Makefile
+++ b/target/linux/oxnas/Makefile
@@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/target.mk
 
 DEFAULT_PACKAGES += \
kmod-button-hotplug kmod-input-gpio-keys-polled kmod-leds-gpio  
\
-   kmod-i2c-gpio uboot-envtools uboot-oxnas-ox820
+   kmod-usb2-oxnas uboot-envtools uboot-oxnas-ox820
 
 KERNELNAME:=zImage dtbs
 
diff --git a/target/linux/oxnas/profiles/100-Generic.mk 
b/target/linux/oxnas/profiles/100-Generic.mk
index 4e53fcb..a42cd26 100644
--- a/target/linux/oxnas/profiles/100-Generic.mk
+++ b/target/linux/oxnas/profiles/100-Generic.mk
@@ -7,8 +7,6 @@
 
 define Profile/POGOPLUG_PRO
   NAME:=PogoPlug Pro
-  PACKAGES:= \
-   uboot-envtools kmod-usb2-oxnas
 endef
 
 define Profile/POGOPLUG_PRO/Description
@@ -18,8 +16,6 @@ endef
 
 define Profile/POGOPLUG_V3
   NAME:=PogoPlug V3
-  PACKAGES:= \
-   uboot-envtools kmod-usb2-oxnas
 endef
 
 define Profile/POGOPLUG_V3/Description
@@ -29,8 +25,6 @@ endef
 
 define Profile/STG212
   NAME:=MitraStar STG-212
-  PACKAGES:= \
-   uboot-envtools kmod-usb2-oxnas
 endef
 
 define Profile/STG212/Description
@@ -40,8 +34,8 @@ endef
 define Profile/KD20
   NAME:=Shuttle KD20
   PACKAGES:= \
-   uboot-envtools kmod-usb2-oxnas kmod-usb3 kmod-usb-storage \
-   kmod-rtc-pcf8563 kmod-gpio-beeper
+   kmod-usb3 kmod-usb-storage \
+   kmod-i2c-gpio kmod-rtc-pcf8563 kmod-gpio-beeper
 endef
 
 define Profile/KD20/Description
-- 
2.1.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] oxnas: build S-ATA driver as a module

2014-12-11 Thread Daniel Golle
Signed-off-by: Daniel Golle dan...@makrotopia.org
---
 package/kernel/linux/modules/block.mk | 16 
 target/linux/oxnas/config-3.14|  2 --
 target/linux/oxnas/config-3.18|  2 --
 3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/package/kernel/linux/modules/block.mk 
b/package/kernel/linux/modules/block.mk
index 8a84aa4..20588ac 100644
--- a/package/kernel/linux/modules/block.mk
+++ b/package/kernel/linux/modules/block.mk
@@ -116,6 +116,22 @@ endef
 $(eval $(call KernelPackage,ata-nvidia-sata))
 
 
+define KernelPackage/ata-oxnas-sata
+  TITLE:=oxnas Serial ATA support
+  KCONFIG:=CONFIG_SATA_OXNAS
+  DEPENDS:=@TARGET_oxnas
+  FILES:=$(LINUX_DIR)/drivers/ata/sata_oxnas.ko
+  AUTOLOAD:=$(call AutoLoad,41,sata_oxnas,1)
+  $(call AddDepends/ata)
+endef
+
+define KernelPackage/ata-oxnas-sata/description
+ SATA support for OX934 core found in the OX82x/PLX782x SoCs
+endef
+
+$(eval $(call KernelPackage,ata-oxnas-sata))
+
+
 define KernelPackage/ata-pdc202xx-old
   SUBMENU:=$(BLOCK_MENU)
   TITLE:=Older Promise PATA controller support
diff --git a/target/linux/oxnas/config-3.14 b/target/linux/oxnas/config-3.14
index 086f870..473a2bf 100644
--- a/target/linux/oxnas/config-3.14
+++ b/target/linux/oxnas/config-3.14
@@ -25,7 +25,6 @@ CONFIG_ARM_NR_BANKS=8
 CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
-CONFIG_ATA=y
 CONFIG_AUTO_ZRELADDR=y
 # CONFIG_BLK_DEV_INITRD is not set
 CONFIG_BLK_DEV_SD=y
@@ -298,7 +297,6 @@ CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
 CONFIG_RTC_CLASS=y
 # CONFIG_RTC_DRV_CMOS is not set
-CONFIG_SATA_OXNAS=y
 CONFIG_SCHED_HRTICK=y
 CONFIG_SCSI=y
 CONFIG_SERIAL_8250_NR_UARTS=1
diff --git a/target/linux/oxnas/config-3.18 b/target/linux/oxnas/config-3.18
index f66650a..56dce65 100644
--- a/target/linux/oxnas/config-3.18
+++ b/target/linux/oxnas/config-3.18
@@ -29,7 +29,6 @@ CONFIG_ARM_L1_CACHE_SHIFT=5
 CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
-CONFIG_ATA=y
 # CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set
 CONFIG_AUTO_ZRELADDR=y
 # CONFIG_BLK_DEV_INITRD is not set
@@ -316,7 +315,6 @@ CONFIG_RTC_CLASS=y
 # CONFIG_RTC_DRV_CMOS is not set
 CONFIG_RWSEM_SPIN_ON_OWNER=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_SATA_OXNAS=y
 CONFIG_SCHED_HRTICK=y
 CONFIG_SCSI=y
 CONFIG_SERIAL_8250_NR_UARTS=1
-- 
2.1.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 08/10] json_script: fix logic invert of handle_expr_not().

2014-12-11 Thread Yousong Zhou
On 12 December 2014 at 00:52, Felix Fietkau n...@openwrt.org wrote:
 On 2014-11-12 14:59, Yousong Zhou wrote:
 Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
 ---
  json_script.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/json_script.c b/json_script.c
 index 0ec7b38..0d51f79 100644
 --- a/json_script.c
 +++ b/json_script.c
 @@ -338,7 +338,7 @@ static int handle_expr_not(struct json_call *call, 
 struct blob_attr *expr)
   if (!tb[1])
   return -1;

 - return json_process_expr(call, tb[1]);
 + return !json_process_expr(call, tb[1]);
 Simply adding ! is not enough. This needs to check for ret  0 for
 proper error handling.

Yes.  I will fix this.

BTW, I see that blobmsg_realloc_string_buffer() should return NULL if
blob_buf_grow() fails, but I can not decide the proper return value of
eval_string() in this case.  Currently it's non-zero for
non-terminated variable reference.  I tend to add various
ERR_JSON_SCRIPT_OOM and json_script_err2str() for use with
handle_error(), but I am afraid that it may break too much packages


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


Re: [OpenWrt-Devel] [PATCH 4/5] ustream: add function ustream_fill_with_read_buf().

2014-12-11 Thread Yousong Zhou
On 12 December 2014 at 00:33, Felix Fietkau n...@openwrt.org wrote:
 On 2014-11-11 11:51, Yousong Zhou wrote:
 Useful in the following use pattern.

   int available = ustream_pending_data(s, false);
   if (available = sizeof(struct msghdr)) {
   struct msghdr h;
   ustream_fill_with_read_buf(s, h, sizeof(h));
   }

 Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
 I'd prefer to have this named ustream_read() instead - similar to
 ustream_write().

Makes sense.  Will adapt the patch.

yousong


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


Re: [OpenWrt-Devel] [PATCH 2/3] Fix SSL negotiation being interrupted by .notify_write from BIO method.

2014-12-11 Thread Yousong Zhou
On 12 December 2014 at 00:42, Felix Fietkau n...@openwrt.org wrote:
 On 2014-11-11 11:34, Yousong Zhou wrote:
 ustream_ssl_check_conn() may be called by .notify_write while a previous
 SSL_connect() is still in process.  This can happen because the
 .notify_write callback will may be triggered by writes in the BIO
 methods.

 Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
 ---
  ustream-ssl.c |   19 +++
  ustream-ssl.h |1 +
  2 files changed, 16 insertions(+), 4 deletions(-)

 diff --git a/ustream-ssl.c b/ustream-ssl.c
 index dd0faf9..84104b0 100644
 --- a/ustream-ssl.c
 +++ b/ustream-ssl.c
 @@ -34,12 +34,22 @@ static void ustream_ssl_error_cb(struct uloop_timeout *t)
   us-notify_error(us, error, __ustream_ssl_strerror(us-error, 
 buffer, sizeof(buffer)));
  }

 +static enum ssl_conn_status ustream_ssl_do_connect(struct ustream_ssl *us)
 +{
 + enum ssl_conn_status status;
 +
 + us-connecting = true;
 + status = __ustream_ssl_connect(us);
 + us-connecting = false;
 + return status;
 +}
 +
 I think this can be fixed in a much simpler way. Simply prevent
 re-entrant calls to __ustream_ssl_connect through a static variable.

Guarding it with a single static variable do not work well with
multiple instances of ustream_ssl.

 The
 other checks for us-connecting should be unnecessary, I think
 !us-connected is enough.

Yes.

yousong


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


Re: [OpenWrt-Devel] [PATCH v2 00/10] libubox: various minor fixes and enhancements.

2014-12-11 Thread Yousong Zhou
On 12 December 2014 at 01:05, Felix Fietkau n...@openwrt.org wrote:
 On 2014-11-12 14:59, Yousong Zhou wrote:
 Yousong Zhou (10):
   libubox: drop legacy json-c support
   lua: do not hardcode /opt/local/include for Apple.
   examples: fix build.
   ustream: add function ustream_fill_with_read_buf().
   ustream: call notify_write() when bytes are written.
   blobmsg: remove unneeded assignment in blobmsg_alloc_string_buffer().
   jshn: add error handling and fix memory leak in jshn_format().
   json_script: fix logic invert of handle_expr_not().
   json_script: fix eval_string().
   json_script: remove unneed argument check before calling
 __json_script_file_free().
 Merged all patches except for the ones I commented on. Thanks!

Thank you for your time.  I will adapt and send the rest.


yousong


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