Re: [OpenWrt-Devel] [PATCH v2] base-files: init/sysfixtime - exclude dnsmasq.time

2015-09-25 Thread Justin Vallon
On 9/22/15 1:52 PM, Bastian Bittorf wrote:
> +maxtime() {
> + local dir file
> +
> + find /etc -type d | while read dir; do
> + file="$dir/$( ls -1t "$dir" | head -n1 )"
> + [ -e "$file" -a "$file" != '/etc/dnsmasq.time' ] && date -r 
> "$file" +%s
> + done | sort -nr | head -n1
> +}
It appears that if /etc/dnsmasq.time is the newest file in /etc, it will
"shadow" the next-newest file.  "ls -lt /etc | head -n1" will be
/etc/dnsmasq.time, and no other /etc/* files will be checked.  The new
code will also check the mod time of directories and symlinks, unlike
the previous implementation.

I was experimenting a little.  The fastest is probably "ls -t $(find
/etc -type f) | head -1", but that does not behave well if there are too
many files in /etc (too many args).  Using xargs to split the ls
invocations is possible, but then each xargs invocation needs to take
the max separately.  The fourth sample below does this.

"test" has: test $a -ot $b ($a older than $b).  This makes the script
reasonably straightforward (only checks files, ignores arbitrary paths)
and pretty fast in my test:

local file newest
for file in $( find /etc -type f ! -path /etc/dnsmasq.time ) ; do
[ -z "$newest" -o "$newest" -ot "$file"] && newest=$file
done
echo $newest

# time sh -c 'find /etc -type f -exec date -r {} +%s \; | sort -nr |
head -n1'
1443239314
real0m 0.77s
user0m 0.17s
sys 0m 0.58s
# time sh -c 'date -r $(ls -t $( find /etc -type f ) | head -1) +%s'   
# fails if /etc contains too many files
1443239314
real0m 0.04s
user0m 0.02s
sys 0m 0.03s
# time sh -c 'local file newest; for file in $(find /etc -type f ! -path
/etc/dnsmasq.time) ; do [ -z "$newest" -o "$newest" -ot "$file" ] &&
newest=$file ; done ; [ "$newest" ] && date -r "$newest" +%s'
1443239314
real0m 0.06s
user0m 0.03s
sys 0m 0.03s
# time sh -c 'find /etc -type f ! -path /etc/dnsmasq.time | xargs sh -c
'\''ls -t "$@" | head -1'\'' - | while read p ; do date -r $p +%s ; done
| sort -nr | head -1'
1443239314
real0m 0.07s
user0m 0.02s
sys 0m 0.06s

Feel free to use or ignore.

-- 
-Justin
justinval...@gmail.com




smime.p7s
Description: S/MIME Cryptographic Signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] How to add ubus users?

2015-09-25 Thread Ronaldo Afonso
  Hi Rudiger,

  I would add another question on your question ...

  I'd like to have some kind of JSON-RPC with no user authentication.

  So, how can I remove user authentication at all?

Thanks in advance ...

2015-09-25 9:20 GMT-03:00 Rüdiger, Christoph <
christoph.ruedi...@thyssenkrupp.com>:

> Hi!
>
> I've seen that there is an ACL concept for the ubus available [1], which
> fits very nice to my plan making our system services available as ubus
> calls instead of maintaining a REST API structure in parallel. However, I
> was not able to figure out how to add additional users to the ubus. There
> is a login method available where you typically login with the root user
> and its password. This can be changed in /etc/config/rpcd, which is working
> fine. But there is only one user available.
>
> So my question is, where do I define the additional users and map them to
> my groups in the ACL files?
>
> Best regards,
> Christoph
>
> [1] http://wiki.openwrt.org/doc/techref/ubus#acls
>
> --
> ThyssenKrupp Elevator Innovation GmbH
> PDC Neuhausen
> TKEI Elevator Control
> Bernhaeuser Straße 45
> 73765 Neuhausen, Germany
>
> Phone +49 7158 12-2615
> christoph.ruedi...@thyssenkrupp.com
>
> Company domicile: Essen  Commercial register: Essen HRB 20 839
> Postal address: ThyssenKrupp Allee 1, 45143 Essen, Germany
> Executive Board: Gerhard Thumm, Katrin Huenger, Philippe Choleau
>
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>



-- 
Ronaldo Afonso
11 9 5252 0484
www.ronaldoafonso.com.br
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/4] ramips: Fix setting of rx buffer length

2015-09-25 Thread Sven Eckelmann
The length of the DMA rx buffer was always set to 0 because the function
for extracting the length was used to calculate the value for setting it.
Instead the macro has to be split in a get and set function similar to the
TX_DMA_(GET_|)PLEN(0|1) macro.

No problem was noticed on MT7621a before this was changed and thus maybe it
was hidden by different problem which is not yet fixed.

Signed-off-by: Sven Eckelmann 
---
 target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c | 2 +-
 target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c 
b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
index db6b197..2691cfb 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
@@ -849,7 +849,7 @@ static int fe_poll_rx(struct napi_struct *napi, int budget,
 
dma_unmap_single(>dev, trxd.rxd1,
ring->rx_buf_size, DMA_FROM_DEVICE);
-   pktlen = RX_DMA_PLEN0(trxd.rxd2);
+   pktlen = RX_DMA_GET_PLEN0(trxd.rxd2);
skb->dev = netdev;
skb_put(skb, pktlen);
if (trxd.rxd4 & checksum_bit) {
diff --git 
a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h 
b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h
index 78e04b0..51b087c 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h
@@ -310,7 +310,8 @@ enum fe_work_flag {
 /* rxd2 */
 #define RX_DMA_DONEBIT(31)
 #define RX_DMA_LSO BIT(30)
-#define RX_DMA_PLEN0(_x)   (((_x) >> 16) & 0x3fff)
+#define RX_DMA_PLEN0(_x)   (((_x) & 0x3fff) << 16)
+#define RX_DMA_GET_PLEN0(_x)   (((_x) >> 16) & 0x3fff)
 #define RX_DMA_TAG BIT(15)
 /* rxd3 */
 #define RX_DMA_TPID(_x)(((_x) >> 16) & 0x)
-- 
2.5.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] ramips: Fix too small rx buffer

2015-09-25 Thread Sven Eckelmann
The driver assumes that the maximum received buffer for non-jumbo frames is
1536 bytes. But the allocation of the rx fragment doesn't reflect that. It
currently allocates fragments which will only be large enough to be used as
rx buffer with the size of 1534 bytes. This is problematic because the GMAC
will now try to write to 2 bytes which don't belong to its receive buffer
when a large enough ethernet frame is received.

This may already be a problem on existing chips but will at least become a
problem when the 1536 byte rx modus is enabled on MT7621a. It is required
on this SoC to receive ethernet frames which use their full 1500 bytes MTU
and a VLAN header next to the switch VLAN tag.

Signed-off-by: Sven Eckelmann 
---
 .../files/drivers/net/ethernet/ralink/ralink_soc_eth.c   | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git 
a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c 
b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
index 2691cfb..05b810a 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -41,8 +42,8 @@
 #include "ralink_ethtool.h"
 
 #defineMAX_RX_LENGTH   1536
-#define FE_RX_HLEN (NET_SKB_PAD + VLAN_ETH_HLEN + VLAN_HLEN + \
-   + NET_IP_ALIGN + ETH_FCS_LEN)
+#define FE_RX_ETH_HLEN (VLAN_ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN)
+#define FE_RX_HLEN (NET_SKB_PAD + FE_RX_ETH_HLEN + NET_IP_ALIGN)
 #define DMA_DUMMY_DESC 0x
 #define FE_DEFAULT_MSG_ENABLE\
 (NETIF_MSG_DRV  | \
@@ -172,14 +173,21 @@ static int fe_set_mac_address(struct net_device *dev, 
void *p)
 
 static inline int fe_max_frag_size(int mtu)
 {
+   /* make sure buf_size will be at least MAX_RX_LENGTH */
+   if (mtu + FE_RX_ETH_HLEN < MAX_RX_LENGTH)
+   mtu = MAX_RX_LENGTH - FE_RX_ETH_HLEN;
+
return SKB_DATA_ALIGN(FE_RX_HLEN + mtu) +
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
 }
 
 static inline int fe_max_buf_size(int frag_size)
 {
-   return frag_size - NET_SKB_PAD - NET_IP_ALIGN -
-   SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
+   int buf_size = frag_size - NET_SKB_PAD - NET_IP_ALIGN -
+  SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
+
+   BUG_ON(buf_size < MAX_RX_LENGTH);
+   return buf_size;
 }
 
 static inline void fe_get_rxd(struct fe_rx_dma *rxd, struct fe_rx_dma *dma_rxd)
-- 
2.5.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] HTTPS with 'letsencrypt.org' on OpenWrt

2015-09-25 Thread Joris de Vries
I would be interested in this as well, although I'm not sure how useful this is 
without configuring a good hostname for routers, also maybe automatically. That 
said, from what I can see there are two options to achieve this.

The first and probably the easiest would be to port their tool to OpenWrt. It 
has a list of required modules 
(https://github.com/letsencrypt/letsencrypt/blob/master/setup.py 
) and I'm not 
sure how one would go about building it. Furthermore, it is built in Python, 
although I'm unsure if that builds to an acceptable size? Although to be honest 
it seems that about 50% of the routers in the ToH have at least 8 MB (capitals) 
of storage which I guess might fit.

The second option would be to implement the standard they use (ACME, 
https://github.com/letsencrypt/acme-spec 
) in an OpenWrt specific tool. This 
might have the added advantage of being easier to integrate with the http 
server OpenWrt uses, as I understand that one of the ways to verify a domain is 
to create a resource at some path on the server.

Cheers,

Joris

> On 25 Sep 2015, at 15:48, Sami Olmari  wrote:
> 
> I have not, I am waiting eagerly to lets encrypt go fully public. That being 
> said I have no deep knowledge of inner workings of the tool(s), but I do hope 
> that some day openwrt would also have package for this, or some method to 
> achieve this :) Will allpha and beta test for sure should there ever be baked 
> something for this! Mine .2
> 
>  Sami Olmari
> 
> On Fri, Sep 25, 2015 at 11:32 AM, Bastian Bittorf  > wrote:
> has anyone played with let's encrypt and their API?
> http://letsencrypt.readthedocs.org/en/latest/api.html 
> 
> 
> at the moment they are doing really complicated stuff,
> but maybe it's possible to hack something simply with
> the built JSON-tools and curl?
> 
> bye, bastian
> ___
> 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 mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] How to add ubus users?

2015-09-25 Thread Jo-Philipp Wich
Hi Ronaldo,

if you refer to the JSON-RPC/UBUS bridge in uhttpd then you can specify
"option no_ubusauth 1" in /etc/config/uhttpd, this will bypass any
permission checks.

Keep in mind that this gives full access to anything exposed by ubus to
any HTTP client!

~ Jow



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


Re: [OpenWrt-Devel] ubus call: Command failed: Not found with odhcp6c

2015-09-25 Thread Hans Dedecker
On Fri, Sep 25, 2015 at 7:26 PM, Brian J. Murrell 
wrote:

> On BB I'm trying to configure an ISP provided IPv6 (over PPPoE).
>  odhcp6c seems to work but the script it calls does not.  I get a bunch
> of "Command failed: Not found" from ubus calls:
>
> + ubus call network.interface notify_proto { "action": 0, "link-up":
> false, "keep": false, "interface": "" }
> Command failed: Not found
>
> and
>
> + ubus call network.interface notify_proto { "action": 0, "link-up": true,
> "data": { "passthru":
> "001700202607f2c111c2"
> }, "keep": false, "ip6addr": [ { "ipaddr":
> "2007:e2b0:1000:13d:9db:95d:80ac:4ef1", "mask": "64", "preferred": 604796,
> "valid": 2591996, "offlink": true } ], "routes6": [ { "target": "::",
> "netmask": "0", "gateway": "fe80::90:1a00:2a4:fee4", "metric": 1024,
> "valid": 1796 }, { "target": "2007:e2b0:a000:13d::", "netmask": "64",
> "metric": 256, "valid": 2591996 } ], "ip6prefix": [
> "2007:e2b0:f00f:cd00::\/56,86400,86400" ], "dns": [ "2007:e2b0::1",
> "2007:e2b0::2" ], "interface": "" }
> Command failed: Not found
>
> No idea why though.  My network configuration for this new IPv6
> connection looks like:
>
> config interface 'wan1'
> option ifname 'eth0.3'
> option proto 'pppoe'
> option username 'xxx'
> option password 'xxx'
> option ppp_redial 'persist'
> option peerdns '0'
> option defaultroute '0'
> option ipv6 '1'
>
> config interface 'wan6'
> option ifname 'pppoe-wan1'
>
This is not correct; try option ifname '@wan1'

Hans

> option proto 'dhcpv6'
> option reqaddress 'try'
> option reqprefix 'auto'
> option defaultroute '0'
> option peerdns '0'
>
> Note that the "wan1" interface ends up being called "pppoe-wan1" when
> it is plumbed.  I have tried both pppoe-wan1 and wan1 in the ifname for
> wan6.
>
> If I hardcode a:
>
> INTERFACE="wan1"
>
> into /lib/netifd/dhcpv6.script:setup_interface() I don't get the secondof
> the above errors and the ubus calls end up being:
>
> + ubus call network.interface notify_proto { "action": 0, "link-up":
> false, "keep": false, "interface": "" }
> Command failed: Not found
> + ubus call network.interface notify_proto { "action": 0, "link-up": true,
> "data": { "passthru":
> "001700202607f2c11c2"
> }, "keep": false, "ip6addr": [ { "ipaddr":
> "2007:e2b0:1000:13d:9db:95d:80ac:4ef1", "mask": "64", "preferred": 604797,
> "valid": 2591997, "offlink": true } ], "routes6": [ { "target": "::",
> "netmask": "0", "gateway": "fe80::90:1a00:2a4:fee4", "metric": 1024,
> "valid": 1797 }, { "target": "2007:e2b0:a000:13d::", "netmask": "64",
> "metric": 256, "valid": 2591997 } ], "ip6prefix": [
> "2007:e2b0:f00f:cd00::\/56,86400,86400" ], "dns": [ "2007:e2b0::1",
> "2007:e2b0::2" ], "interface": "wan1" }
>
> Notice that the second call above differs from the first one in that
> the interface value has "wan1" in it.
>
> It's worth noting that I have a number of other IPv6 interfaces already
> on this router, up and functioning perfectly so basic IPv6 is
> functional here and this is specific to this interface.
>
> So any ideas why this is all failing?
>
> Cheers,
> b.
>
> ___
> 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, v2] base-files: sbin/sysupgrade preserve dnsmasq.time

2015-09-25 Thread Kevin Darbyshire-Bryant
dnsmasq uses /etc/dnsmasq.time as record of the last known good
system time to aid its validation of dnssec timestamps.  dnsmasq
updates the timestamp on process start/stop once it considers the system
time as valid. The timestamp file should be preserved across system
upgrade but should not be included as part of normal configuration
backups to prevent restores corrupting the current timestamps.

Signed-off-by: Kevin Darbyshire-Bryant 
---
v2 - original patch generated from incorrect branch and had all sorts
of rubbish in it.

 package/base-files/files/sbin/sysupgrade | 9 +
 1 file changed, 9 insertions(+)

diff --git a/package/base-files/files/sbin/sysupgrade 
b/package/base-files/files/sbin/sysupgrade
index ef83c4b..a3400e8 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -142,6 +142,15 @@ do_save_conffiles() {
return 0
}
run_hooks "$CONFFILES" $sysupgrade_init_conffiles
+
+   if [ -z $NEED_IMAGE ]; then
+   if [ $(ubus call service list '{"name":"dnsmasq"}' | jsonfilter 
-e '@.*.instances.instance1.running') = "true" ]; then
+   /etc/init.d/dnsmasq restart
+   sleep 1
+   echo "/etc/dnsmasq.time" >>$CONFFILES
+   fi
+   fi
+
ask_bool 0 "Edit config file list" && vi "$CONFFILES"
 
v "Saving config files..."
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] ubus call: Command failed: Not found with odhcp6c

2015-09-25 Thread Brian J. Murrell
On BB I'm trying to configure an ISP provided IPv6 (over PPPoE). 
 odhcp6c seems to work but the script it calls does not.  I get a bunch
of "Command failed: Not found" from ubus calls:

+ ubus call network.interface notify_proto { "action": 0, "link-up": false, 
"keep": false, "interface": "" }
Command failed: Not found

and

+ ubus call network.interface notify_proto { "action": 0, "link-up": true, 
"data": { "passthru": 
"001700202607f2c111c2" }, 
"keep": false, "ip6addr": [ { "ipaddr": "2007:e2b0:1000:13d:9db:95d:80ac:4ef1", 
"mask": "64", "preferred": 604796, "valid": 2591996, "offlink": true } ], 
"routes6": [ { "target": "::", "netmask": "0", "gateway": 
"fe80::90:1a00:2a4:fee4", "metric": 1024, "valid": 1796 }, { "target": 
"2007:e2b0:a000:13d::", "netmask": "64", "metric": 256, "valid": 2591996 } ], 
"ip6prefix": [ "2007:e2b0:f00f:cd00::\/56,86400,86400" ], "dns": [ 
"2007:e2b0::1", "2007:e2b0::2" ], "interface": "" }
Command failed: Not found

No idea why though.  My network configuration for this new IPv6
connection looks like:

config interface 'wan1'
option ifname 'eth0.3'
option proto 'pppoe'
option username 'xxx'
option password 'xxx'
option ppp_redial 'persist'
option peerdns '0'
option defaultroute '0'
option ipv6 '1'

config interface 'wan6'
option ifname 'pppoe-wan1'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
option defaultroute '0'
option peerdns '0'

Note that the "wan1" interface ends up being called "pppoe-wan1" when
it is plumbed.  I have tried both pppoe-wan1 and wan1 in the ifname for
wan6.

If I hardcode a:

INTERFACE="wan1"

into /lib/netifd/dhcpv6.script:setup_interface() I don't get the secondof the 
above errors and the ubus calls end up being:

+ ubus call network.interface notify_proto { "action": 0, "link-up": false, 
"keep": false, "interface": "" }
Command failed: Not found
+ ubus call network.interface notify_proto { "action": 0, "link-up": true, 
"data": { "passthru": 
"001700202607f2c11c2" }, 
"keep": false, "ip6addr": [ { "ipaddr": "2007:e2b0:1000:13d:9db:95d:80ac:4ef1", 
"mask": "64", "preferred": 604797, "valid": 2591997, "offlink": true } ], 
"routes6": [ { "target": "::", "netmask": "0", "gateway": 
"fe80::90:1a00:2a4:fee4", "metric": 1024, "valid": 1797 }, { "target": 
"2007:e2b0:a000:13d::", "netmask": "64", "metric": 256, "valid": 2591997 } ], 
"ip6prefix": [ "2007:e2b0:f00f:cd00::\/56,86400,86400" ], "dns": [ 
"2007:e2b0::1", "2007:e2b0::2" ], "interface": "wan1" }

Notice that the second call above differs from the first one in that
the interface value has "wan1" in it.

It's worth noting that I have a number of other IPv6 interfaces already
on this router, up and functioning perfectly so basic IPv6 is
functional here and this is specific to this interface.

So any ideas why this is all failing?

Cheers,
b.


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


[OpenWrt-Devel] UML not working in master

2015-09-25 Thread Javier Domingo Cansino
Hi,

I wanted to setup for some tests an environment running uml, and I found
it's not compiling on master with default config. The error seems similar
to a previous one I found in the bug tracker.

https://dev.openwrt.org/ticket/870

Is anyone actually maintaining UML or managed to make it work? What other
ways of testing without a device would you propose? I had thought on a qemu
kvm x86 image if there is no other way, but the UML seemed like the most
straightforward to be able to develop in the local machine.

Cheers!

The logs/target/linux/install.txt has the following output:
make[3]: Entering directory '/home/javier/projects/openwrt/target/linux'
make[4]: Entering directory '/home/javier/projects/openwrt/target/linux/uml'
/home/javier/projects/openwrt/scripts/kconfig.pl  +
/home/javier/projects/openwrt/target/linux/generic/config-3.18
/home/javier/projects/openwrt/target/linux/uml/config/x86_64 >
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.target
awk
'/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}'
/home/javier/projects/openwrt/.config >>
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.target
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >>
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.target
echo "# CONFIG_KALLSYMS_ALL is not set" >>
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.target
echo "# CONFIG_KALLSYMS_UNCOMPRESSED is not set" >>
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.target
/home/javier/projects/openwrt/scripts/metadata.pl kconfig
/home/javier/projects/openwrt/tmp/.packageinfo
/home/javier/projects/openwrt/.config 3.18 >
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.override
/home/javier/projects/openwrt/scripts/kconfig.pl 'm+' '+'
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.target
/dev/null
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.override
>
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config
mv
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.old
grep -v INITRAMFS
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config.old
>
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config
echo 'CONFIG_INITRAMFS_SOURCE=""' >>
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config
rm -rf
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/modules
export MAKEFLAGS= ; [ -d
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/user_headers
] || make -C
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21
HOSTCFLAGS="-O2 -I/home/javier/projects/openwrt/staging_dir/host/include
-I/home/javier/projects/openwrt/staging_dir/host/usr/include -Wall
-Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="" ARCH="um"
KBUILD_HAVE_NLS=no CONFIG_SHELL="bash" V='' CC="ccache gcc"
INSTALL_HDR_PATH=/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/user_headers
headers_install
. /home/javier/projects/openwrt/include/shell.sh; grep '=[ym]'
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.config
| LC_ALL=C sort | md5s >
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.vermagic
touch
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21/.configured
rm -f
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/root-uml/init
make -C
/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21
HOSTCFLAGS="-O2 -I/home/javier/projects/openwrt/staging_dir/host/include
-I/home/javier/projects/openwrt/staging_dir/host/usr/include -Wall
-Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="" ARCH="um"
KBUILD_HAVE_NLS=no CONFIG_SHELL="bash" V='' CC="ccache gcc" all modules
make[5]: Entering directory
'/home/javier/projects/openwrt/build_dir/target-x86_64_musl-1.1.11/linux-uml/linux-3.18.21'
scripts/kconfig/conf --silentoldconfig arch/x86/um/Kconfig
net/sched/Kconfig:43: warning: menuconfig statement without prompt
#
# configuration written to .config
#
  CHK include/generated/uapi/linux/version.h
make[6]: 'arch/x86/um/user-offsets.s' is up to date.
  CHK include/config/kernel.release
  CHK include/generated/utsrelease.h
  CALLscripts/checksyscalls.sh
:  CHK

[OpenWrt-Devel] [PATCH] lldpd: wrap procd command args in separate quotes

2015-09-25 Thread Alexandru Ardelean
From: Alexandru Ardelean 

Seems the match pattern was being adapted from 'eth0' to ' eth0'
because of the way I added the procd command args.

This did not seem to be a problem when there were multiple interfaces,
just on devices with single interfaces for lldpd to listen on.

Signed-off-by: Alexandru Ardelean 
---
 package/network/services/lldpd/files/lldpd.init | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/lldpd/files/lldpd.init 
b/package/network/services/lldpd/files/lldpd.init
index 278dbaf..3d7d8b9 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -54,14 +54,14 @@ start_service() {
procd_set_param command /usr/sbin/lldpd
procd_append_param command -d # don't daemonize, procd will handle that 
for us
 
-   [ -n "$ifnames" ] && procd_append_param command "-I $ifnames"
+   [ -n "$ifnames" ] && procd_append_param command -I "$ifnames"
[ $enable_cdp -gt 0 ] && procd_append_param command '-c'
[ $enable_fdp -gt 0 ] && procd_append_param command '-f'
[ $enable_sonmp -gt 0 ] && procd_append_param command '-s'
[ $enable_edp -gt 0 ] && procd_append_param command '-e'
[ $readonly_mode -gt 0 ] && procd_append_param command '-r'
-   [ -n "$lldp_class" ] && procd_append_param command "-M $lldp_class"
-   [ -n "$lldp_description" ] && procd_append_param command "-S 
$lldp_description"
+   [ -n "$lldp_class" ] && procd_append_param command -M "$lldp_class"
+   [ -n "$lldp_description" ] && procd_append_param command -S 
"$lldp_description"
 
# set auto respawn behavior
procd_set_param respawn
-- 
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 2/2] x86/64: enable pata_atiixp driver

2015-09-25 Thread Felix Kaechele
This enables booting from devices that use an ATI PATA controller for
the boot device, such as the embedded CF cards in Fujitsu-Siemens Futro
thin-clients.

Signed-off-by: Felix Kaechele 
---
 target/linux/x86/64/config-default | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/x86/64/config-default 
b/target/linux/x86/64/config-default
index 0c5297d..4432408 100644
--- a/target/linux/x86/64/config-default
+++ b/target/linux/x86/64/config-default
@@ -31,7 +31,6 @@ CONFIG_ARCH_SUPPORTS_INT128=y
 CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
 CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
 # CONFIG_ASUS_LAPTOP is not set
-# CONFIG_ATA_SFF is not set
 CONFIG_AUDIT_ARCH=y
 CONFIG_AVERAGE=y
 CONFIG_BLK_DEV_INTEGRITY=y
@@ -134,6 +133,7 @@ CONFIG_PARAVIRT_CLOCK=y
 # CONFIG_PARAVIRT_DEBUG is not set
 # CONFIG_PARAVIRT_SPINLOCKS is not set
 # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
+CONFIG_PATA_ATIIXP=y
 CONFIG_PCIEAER=y
 CONFIG_PCIEPORTBUS=y
 # CONFIG_PCI_IOAPIC is not set
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] HTTPS with 'letsencrypt.org' on OpenWrt

2015-09-25 Thread Bastian Bittorf
has anyone played with let's encrypt and their API?
http://letsencrypt.readthedocs.org/en/latest/api.html

at the moment they are doing really complicated stuff,
but maybe it's possible to hack something simply with
the built JSON-tools and curl?

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


[OpenWrt-Devel] [PATCH 2/3] x86/generic: enable pata_atiixp driver

2015-09-25 Thread Felix Kaechele
This enables booting from devices that use an ATI PATA controller for
the boot device, such as the embedded CF cards in Fujitsu-Siemens Futro
thin-clients.

Signed-off-by: Felix Kaechele 
---
 target/linux/x86/generic/config-default | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/x86/generic/config-default 
b/target/linux/x86/generic/config-default
index c434a59..29e5845 100644
--- a/target/linux/x86/generic/config-default
+++ b/target/linux/x86/generic/config-default
@@ -152,6 +152,7 @@ CONFIG_NLS=y
 CONFIG_NO_HZ=y
 # CONFIG_PANASONIC_LAPTOP is not set
 CONFIG_PATA_AMD=y
+CONFIG_PATA_ATIIXP=y
 CONFIG_PATA_LEGACY=y
 CONFIG_PATA_MPIIX=y
 CONFIG_PATA_OLDPIIX=y
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] x86/generic: refresh subtarget kernel config

2015-09-25 Thread Felix Kaechele
Signed-off-by: Felix Kaechele 
---
 target/linux/x86/generic/config-default | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/target/linux/x86/generic/config-default 
b/target/linux/x86/generic/config-default
index eb4b357..c434a59 100644
--- a/target/linux/x86/generic/config-default
+++ b/target/linux/x86/generic/config-default
@@ -17,7 +17,6 @@ CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
 CONFIG_ACPI_PROCESSOR=y
 # CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
 # CONFIG_ACPI_PROCFS_POWER is not set
-# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set
 # CONFIG_ACPI_SBS is not set
 CONFIG_ACPI_THERMAL=y
 CONFIG_ACPI_VIDEO=y
@@ -46,7 +45,8 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_BLK_DEV_SR=y
 # CONFIG_BLK_DEV_SR_VENDOR is not set
 CONFIG_CPU_IDLE_GOV_MENU=y
-# CONFIG_DELL_SMO8800 is not set
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_WORKQUEUE=y
 CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DMI=y
 # CONFIG_DMIID is not set
@@ -120,7 +120,6 @@ CONFIG_INPUT_MOUSEDEV=y
 CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INT340X_THERMAL is not set
 CONFIG_INTEL_GTT=y
 CONFIG_INTEL_IDLE=y
 # CONFIG_INTEL_IPS is not set
@@ -173,13 +172,10 @@ CONFIG_PNP_DEBUG_MESSAGES=y
 CONFIG_RAS=y
 # CONFIG_SAMSUNG_Q10 is not set
 CONFIG_SATA_AHCI=y
-# CONFIG_SCx200_ACB is not set
-# CONFIG_SERIAL_8250_FINTEK is not set
 CONFIG_SERIAL_8250_PNP=y
 # CONFIG_THINKPAD_ACPI is not set
 # CONFIG_TOPSTAR_LAPTOP is not set
 # CONFIG_TOSHIBA_BT_RFKILL is not set
-# CONFIG_TOSHIBA_HAPS is not set
 CONFIG_USB=y
 CONFIG_USB_COMMON=y
 CONFIG_USB_EHCI_HCD=y
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/3] x86/generic: add bits to support Futro thin-clients

2015-09-25 Thread Felix Kaechele
Hi list,

As suggested I transferred my patches to support the Futro thin-clients to the 
x86-generic target to keep x86-64 legacy free.
Additionally I enabled the DRM driver for the graphics chip to have modesetting 
available.

Regards,
Felix

Felix Kaechele (3):
  x86/generic: refresh subtarget kernel config
  x86/generic: enable pata_atiixp driver
  x86/generic: enable radeon drm driver

 target/linux/x86/generic/config-default | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

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


[OpenWrt-Devel] [PATCH] lantiq: bugfix uninitialized variables

2015-09-25 Thread Florian Eckert
Signed-off-by: Florian Eckert 
Reported-by: Sylwester Petela 
---

If you are in the luci overview page and the dsl is not in showtime state
and the variables are not initialized we get messages in log and luci brakes
> Thu Sep 17 15:40:16 2015 daemon.err uhttpd[1110]: expr: syntax error
> Thu Sep 17 15:40:16 2015 daemon.err uhttpd[1110]: expr: syntax error
> Thu Sep 17 15:40:16 2015 daemon.err uhttpd[1110]: expr: syntax error
> Thu Sep 17 15:40:16 2015 daemon.err uhttpd[1110]: expr: syntax error
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]:
> /usr/lib/lua/luci/dispatcher.lua:433: Failed to execute function dispatcher
> target for entry '/'.
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]: The called action
> terminated with an exception:
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]:
> /usr/lib/lua/luci/dispatcher.lua:433: Failed to execute firstchild
> dispatcher target for entry '/admin'.
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]: The called action
> terminated with an exception:
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]:
> /usr/lib/lua/luci/dispatcher.lua:433: Failed to execute function dispatcher
> target for entry '/admin/status'.
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]: The called action
> terminated with an exception:
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]:
> /usr/lib/lua/luci/dispatcher.lua:433: Failed to execute template dispatcher
> target for entry '/admin/status/overview'.
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]: The called action
> terminated with an exception:
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]:
> /usr/lib/lua/luci/template.lua:97: Failed to execute template
> 'admin_status/index'.
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]: A runtime error occured:
> [string "/usr/lib/lua/luci/view/admin_status/index.h..."]:85: attempt to
> call local 'dsl_func' (a nil value)
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]: stack traceback:
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]: [C]: in function
> 'assert'
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]:
> /usr/lib/lua/luci/dispatcher.lua:433: in function 'dispatch'
> Thu Sep 17 15:40:17 2015 daemon.err uhttpd[1110]:
> /usr/lib/lua/luci/dispatcher.lua:168: in function
> 

The patch will resolve this issue.

 target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh 
b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
index 7809d01..8f1d0c2 100755
--- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
+++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
@@ -524,6 +524,8 @@ line_data() {
[ -z "$satnu" ] && satnu=0
[ -z "$snrd" ] && snrd=0
[ -z "$snru" ] && snru=0
+   [ -z "$actatpd" ] && actatpd=0
+   [ -z "$actatpu" ] && actatpu=0
 
latnd=$(dbt $latnd)
latnu=$(dbt $latnu)
-- 
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] HTTPS with 'letsencrypt.org' on OpenWrt

2015-09-25 Thread Sami Olmari
I have not, I am waiting eagerly to lets encrypt go fully public. That
being said I have no deep knowledge of inner workings of the tool(s), but I
do hope that some day openwrt would also have package for this, or some
method to achieve this :) Will allpha and beta test for sure should there
ever be baked something for this! Mine .2

 Sami Olmari

On Fri, Sep 25, 2015 at 11:32 AM, Bastian Bittorf 
wrote:

> has anyone played with let's encrypt and their API?
> http://letsencrypt.readthedocs.org/en/latest/api.html
>
> at the moment they are doing really complicated stuff,
> but maybe it's possible to hack something simply with
> the built JSON-tools and curl?
>
> bye, bastian
> ___
> 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 0/2] Add ATI IXP PATA driver to x86/64 target

2015-09-25 Thread Imre Kaloz
On Fri, 25 Sep 2015 10:02:07 +0200, Felix Kaechele  
 wrote:



Hi list,

within the Freifunk project in Germany we currently use very low cost  
thin-clients (FSC Futro S550) for VPN offloading.
Those thin-clients have an internal CF card (1GB) attached to the  
chipset's PATA controller that uses the arcane pata_atiixp driver.

This seems like an ideal storage option for booting the device from.

I would like to enable OpenWrt to boot from this CF card and therefor  
would need this driver to be built into the kernel.


If changes like these to the generic x86_64 target are not desireable  
the other option would be to create an own subtarget specifically for  
this device.


What do you think?


NAK. The x86-64 subtarget is free from legacy stuff and should remain that  
way. Looking at the specs of that thin client it can have either 1 or 2GB  
of ram, so it doesn't make much sense to use it in 64bits anyways. If  
changes are needed to run the generic x86 taget on it, please send patches  
for that.



Cheers,

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