[OpenWrt-Devel] [PATCH] uloop lua binding: Added fd_add method; Fix bug of GC and stack overflow.
From: Xiongfei(Alex) Guo xf...@credosemi.com Added fd_add method for uloop lua binding. Use uloop.fd_add like this: local socket = require socket udp = socket.udp() udp_read_ev = uloop.fd_add( udp, -- socket function( -- callback function ufd,-- socket object when register the fd events -- uloop events. eg. uloop.ULOOP_READ . ) local words, msg_or_ip, port_or_nil = ufd:receivefrom() print( 'Recv UDP packet from '.. msg_or_ip ..':'..port_or_nil.. ' : '..words ) end, uloop.ULOOP_READ -- event you want to listen ) udp_read_ev:cancel() -- cancel it The `examples/uloop-example.lua` show an example of this work. Fix stack overflow bug. The static variable `state` in `lua/uloop.c` should be clean after every callback. Fix bug of GC fd and timeout lua object has a __gc method in its metatable. After the object is freed and if another new object use the same reference number in __uloop_cb and __uloop_fds, the new object will be freed by the old __gc of the old object when garbag collecting. Signed-off-by: Xiongfei(Alex) Guo xf...@credosemi.com --- examples/uloop-example.lua | 34 + lua/uloop.c| 168 +++- 2 files changed, 201 insertions(+), 1 deletion(-) diff --git a/examples/uloop-example.lua b/examples/uloop-example.lua index 2da6ebd..ab85a5d 100755 --- a/examples/uloop-example.lua +++ b/examples/uloop-example.lua @@ -1,8 +1,14 @@ #!/usr/bin/env lua +local socket = require socket + local uloop = require(uloop) uloop.init() +local udp = socket.udp() +udp:settimeout(0) +udp:setsockname('*', 8080) + -- timer example 1 local timer function t() @@ -40,5 +46,33 @@ uloop.timer( end, 2000 ) +udp_ev = uloop.fd_add(udp, function(ufd, events) + local words, msg_or_ip, port_or_nil = ufd:receivefrom() + print('Recv UDP packet from '..msg_or_ip..':'..port_or_nil..' : '..words) + if words == Stop! then + udp_ev:cancel() + end +end, uloop.ULOOP_READ) + +udp_count = 0 +udp_send_timer = uloop.timer( + function() + local s = socket.udp() + local words + if udp_count 3 then + words = Stop! + udp_send_timer:cancel() + else + words = 'Hello!' + udp_send_timer:set(1000) + end + print('Send UDP packet to 127.0.0.1:8080 :'..words) + s:sendto(words, '127.0.0.1', 8080) + s:close() + + udp_count = udp_count + 1 + end, 3000 +) + uloop.run() diff --git a/lua/uloop.c b/lua/uloop.c index 51f53c2..5bc0e6c 100644 --- a/lua/uloop.c +++ b/lua/uloop.c @@ -25,6 +25,12 @@ #include ../uloop.h #include ../list.h +struct lua_uloop_fd { + struct uloop_fd fd; + int r; + int fd_r; +}; + struct lua_uloop_timeout { struct uloop_timeout t; int r; @@ -43,7 +49,10 @@ static void ul_timer_cb(struct uloop_timeout *t) lua_getglobal(state, __uloop_cb); lua_rawgeti(state, -1, tout-r); + lua_remove(state, -2); + lua_call(state, 0, 0); + } static int ul_timer_set(lua_State *L) @@ -70,8 +79,15 @@ static int ul_timer_free(lua_State *L) struct lua_uloop_timeout *tout = lua_touserdata(L, 1); uloop_timeout_cancel(tout-t); + + /* obj.__index.__gc = nil , make sure executing only once*/ + lua_getfield(L, -1, __index); + lua_pushstring(L, __gc); + lua_pushnil(L); + lua_settable(L, -3); + lua_getglobal(state, __uloop_cb); - luaL_unref(L, -1, tout-r); + luaL_unref(state, -1, tout-r); return 1; } @@ -126,13 +142,136 @@ static int ul_timer(lua_State *L) return 1; } +static void ul_ufd_cb(struct uloop_fd *fd, unsigned int events) +{ + struct lua_uloop_fd *ufd = container_of(fd, struct lua_uloop_fd, fd); + + lua_getglobal(state, __uloop_cb); + lua_rawgeti(state, -1, ufd-r); + lua_remove(state, -2); + + /* push fd object */ + lua_getglobal(state, __uloop_fds); + lua_rawgeti(state, -1, ufd-fd_r); + lua_remove(state, -2); + + /* push events */ + lua_pushinteger(state, events); + lua_call(state, 2, 0); +} + + +static int get_sock_fd(lua_State* L, int idx) { + int fd; + if(lua_isnumber(L, idx)) { + fd = lua_tonumber(L, idx); + } else { + luaL_checktype(L, idx, LUA_TUSERDATA); + lua_getfield(L, idx, getfd); + if(lua_isnil(L, -1)) + return luaL_error(L, socket type missing 'getfd' method); + lua_pushvalue(L, idx - 1); + lua_call(L, 1, 1); + fd = lua_tointeger(L, -1); + lua_pop(L, 1); + } + return fd;
Re: [OpenWrt-Devel] Fix VLAN on Atheros AR8327N
Hello Alvaro, I have another user (Cc: in this email) reporting wdr4300 working with the original patch. I updated my tree with your changes, and rebased on current trunk: https://github.com/zioproto/openwrt-trunk-zioproto/commits/ticket12181 You are just deleting this code right ? https://github.com/zioproto/openwrt-trunk-zioproto/commit/c4a8e0a8f164d03074d55e649e883422ae03c905 Alvaro and Domantas MrVisata, can you please tell me your testing setup? I would like to understand what is working for Domantas and what is not working for Alvaro. If you just post your /etc/config/network it would be enough. Thanks. Saverio 2014-05-02 3:07 GMT+02:00 Álvaro Fernández Rojas nolt...@gmail.com: Hello, I've tested this patch but I couldn't get it completely fixed on AR8327 (TL-WDR4300). However, I've modified it and successfully configured the switch for untagged + tagged. https://dl.dropboxusercontent.com/u/4708147/openwrt/patches/ar8327.patch The problem was in ar8327_sw_set_ports(), which I suspect was copied from ar8216_sw_set_ports(), without removing the code that disables all tagged ports if an untagged port is already present. P.S: @Saverio feel free to resend the patch yourself if you agree with the changes. Regards, Álvaro. El 24/04/2014 12:56, Saverio Proto escribió: Hello, the patch is attached to this email. thanks Saverio 2014-04-24 12:47 GMT+02:00 John Crispin j...@phrozen.org: On 24/04/2014 12:44, Saverio Proto wrote: Hello, talking about: https://dev.openwrt.org/ticket/12181 patch has been tested @ Ninux.org on TP-Link WDR3600. We are now able to successfully have tagged and untagged frames together on the same port. Here is the clean version of the patch rebased on current trunk: https://github.com/zioproto/openwrt-trunk-zioproto/commit/e7226ba45d7198dff71fde3caa1be9962f9f4ef1 please review it and merge it into trunk. Saverio hi Saverio, can you send the cleaned up version to the -devel list ? that way its inside out patchwork and we can mark the old version superseeded John ___ 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
[OpenWrt-Devel] [PATCH] [packages] etherpuppet: correct broken url
Signed-off-by: Russell Senior russ...@personaltelco.net --- net/etherpuppet/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/etherpuppet/Makefile b/net/etherpuppet/Makefile index f85f9d2..0851f84 100644 --- a/net/etherpuppet/Makefile +++ b/net/etherpuppet/Makefile @@ -13,7 +13,7 @@ PKG_VERSION:=0.3_r$(PKG_REV) PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://hg.secdev.org/etherpuppet +PKG_SOURCE_URL:=https://bitbucket.org/secdev/etherpuppet PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_PROTO:=hg -- 1.8.3.2 -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [packages] bemused: fix build by including more include files
Signed-off-by: Russell Senior russ...@personaltelco.net --- utils/bemused/Makefile | 4 ++-- utils/bemused/patches/110-missing_includes.patch | 19 +++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/utils/bemused/Makefile b/utils/bemused/Makefile index 61cc101..c30c7c3 100644 --- a/utils/bemused/Makefile +++ b/utils/bemused/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008-2011 OpenWrt.org +# Copyright (C) 2008-2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bemused-mpd PKG_VERSION:=r062 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://download.origo.ethz.ch/bemused-lnx-mpdhack/526 diff --git a/utils/bemused/patches/110-missing_includes.patch b/utils/bemused/patches/110-missing_includes.patch index c049e36..7f14a42 100644 --- a/utils/bemused/patches/110-missing_includes.patch +++ b/utils/bemused/patches/110-missing_includes.patch @@ -1,11 +1,22 @@ -diff -urN bemused-mpd-r062/main.cpp bemused-mpd-r062.new/main.cpp bemused-mpd-r062/main.cpp 2008-02-23 08:01:38.0 +0100 -+++ bemused-mpd-r062.new/main.cpp 2010-03-29 13:00:07.0 +0200 -@@ -16,6 +16,7 @@ +--- a/main.cpp b/main.cpp +@@ -16,6 +16,9 @@ ***/ #include stdlib.h +#include stdio.h ++#include getopt.h ++#include unistd.h #include iostream #include BemusedServerDlg.h +--- a/BemusedServerDlg.cpp b/BemusedServerDlg.cpp +@@ -28,6 +28,7 @@ + #include cerrno + #include csignal + ++#include unistd.h + #include sys/types.h + #include sys/stat.h + #include dirent.h -- 1.8.3.2 -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [openwrt-routing] mcast-tools: fix linux/pim.h include
fix wrong struct in pim.h big endian case it leads to compile error on ar71xx and other arch Error was: In file included from debug.c:71:0: ../include/linux/pim.h:14:3: error: expected specifier-qualifier-list before 'pim_type' pim_type:4; /* PIM message type */ ^ make[6]: *** [debug.o] Error 1 Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de --- mcast-tools/patches/0004-fix_linux_pim.h_include.patch | 11 +++ 1 file changed, 11 insertions(+) create mode 100644 mcast-tools/patches/0004-fix_linux_pim.h_include.patch diff --git a/mcast-tools/patches/0004-fix_linux_pim.h_include.patch b/mcast-tools/patches/0004-fix_linux_pim.h_include.patch new file mode 100644 index 000..7f8b9bc --- /dev/null +++ b/mcast-tools/patches/0004-fix_linux_pim.h_include.patch @@ -0,0 +1,11 @@ +--- a/include/linux/pim.h b/include/linux/pim.h +@@ -10,7 +10,7 @@ struct pim { + __u8pim_type:4, /* PIM message type */ + pim_ver:4; /* PIM version */ + #elif defined(__BIG_ENDIAN_BITFIELD) +- __u8pim_ver:4; /* PIM version */ ++ __u8pim_ver:4, /* PIM version */ + pim_type:4; /* PIM message type */ + #endif + __u8pim_rsv;/* Reserved */ -- 2.0.0.rc0 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] Fix VLAN on Atheros AR8327N
Hello Saverio, Yeah, I just deleted that code, which was preventing my port 5 from being set as tagged on previous VLANs and removed it completely from those VLANs if it was marked as tagged later. I think that the problem is that the code that I removed is sequential and it only removes tagged ports configured before the untagged appearence, because Domantas config has the untagged appearence port first and the tagged later, whereas mine has the tagged first and the untagged later. And my config: --- config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'fd0c:518e:715b::/48' config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option vid '1' option ports '0t 3 4 5t' config switch_vlan option device 'switch0' option vlan '2' option ports '0t 1t' option vid '2' config switch_vlan option device 'switch0' option vlan '3' option ports '0t 1t' option vid '3' config switch_vlan option device 'switch0' option vlan '4' option vid '4' option ports '0t 2 5' config interface 'lan' option ifname 'eth0.1' option type 'bridge' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option ip6assign '60' option igmp_snooping '1' config interface 'iptv' option ifname 'eth0.2' option proto 'static' option ipaddr '172.26.208.63' option netmask '255.255.240.0' option gateway '10.26.208.1' option defaultroute '0' option peerdns '0' config interface 'voip' option ifname 'eth0.3' option proto 'dhcp' option defaultroute '0' option peerdns '0' config interface 'wan' option ifname 'eth0.6' option proto 'pppoe' option username 'adslppp@telefonicanetpa' option password 'adslppp' config switch_vlan option device 'switch0' option vlan '6' option ports '0t 1t' option vid '6' config interface 'tvlan' option proto 'static' option ifname 'eth0.4' option ipaddr '10.217.47.233' option netmask '255.255.255.248' --- Regards, Álvaro. El 02/05/2014 9:46, Saverio Proto escribió: Hello Alvaro, I have another user (Cc: in this email) reporting wdr4300 working with the original patch. I updated my tree with your changes, and rebased on current trunk: https://github.com/zioproto/openwrt-trunk-zioproto/commits/ticket12181 You are just deleting this code right ? https://github.com/zioproto/openwrt-trunk-zioproto/commit/c4a8e0a8f164d03074d55e649e883422ae03c905 Alvaro and Domantas MrVisata, can you please tell me your testing setup? I would like to understand what is working for Domantas and what is not working for Alvaro. If you just post your /etc/config/network it would be enough. Thanks. Saverio 2014-05-02 3:07 GMT+02:00 Álvaro Fernández Rojas nolt...@gmail.com: Hello, I've tested this patch but I couldn't get it completely fixed on AR8327 (TL-WDR4300). However, I've modified it and successfully configured the switch for untagged + tagged. https://dl.dropboxusercontent.com/u/4708147/openwrt/patches/ar8327.patch The problem was in ar8327_sw_set_ports(), which I suspect was copied from ar8216_sw_set_ports(), without removing the code that disables all tagged ports if an untagged port is already present. P.S: @Saverio feel free to resend the patch yourself if you agree with the changes. Regards, Álvaro. El 24/04/2014 12:56, Saverio Proto escribió: Hello, the patch is attached to this email. thanks Saverio 2014-04-24 12:47 GMT+02:00 John Crispin j...@phrozen.org: On 24/04/2014 12:44, Saverio Proto wrote: Hello, talking about: https://dev.openwrt.org/ticket/12181 patch has been tested @ Ninux.org on TP-Link WDR3600. We are now able to successfully have tagged and untagged frames together on the same port. Here is the clean version of the patch rebased on current trunk: https://github.com/zioproto/openwrt-trunk-zioproto/commit/e7226ba45d7198dff71fde3caa1be9962f9f4ef1 please review it and merge it into trunk. Saverio hi Saverio, can you send the cleaned up version to the -devel list ? that way its inside out patchwork and we can mark the old version superseeded John ___ 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
Re: [OpenWrt-Devel] About upstream advanced features for AR8337N switch
I would love to see more of the features for the ar8xxxN switches added to openwrt. If I understand the question correctly, you just have to send the patches to this mailing list as described here: https://dev.openwrt.org/wiki/SubmittingPatches Correctly submitted patches will end up here ( http://patchwork.openwrt.org/project/openwrt/list/ ) for review. On 2014-04-30 17:43, l...@codeaurora.org wrote: Hi, Currently, we delivered ssdk component for ar8337n switch chip via CAF with more advanced features. I wonder if I can upstream these advance features to openWRT as an independent component under package directory. Would you please give me a guide for it? Thanks in advance. Thanks lun ___ 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] htop: bump version to 1.03
There is a new 1.03 version of htop: http://www.freelists.org/post/htop/ANN-htop-103 This patch bumps htop from 1.02 to 1.03. Since January 2014 the releases are made from developer's own site instead of Sourceforge, so I have changed the download location accordingly. http://sourceforge.net/projects/htop/ http://hisham.hm/htop/ Sources are on github: https://github.com/hishamhm/htop Signed-off-by: hannu.ny...@iki.fi Index: packages/admin/htop/Makefile === --- packages/admin/htop/Makefile(revision 40659) +++ packages/admin/htop/Makefile(working copy) @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=htop -PKG_VERSION:=1.0.2 +PKG_VERSION:=1.0.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_MD5SUM:=0d01cca8df3349c74569cefebbd9919e +PKG_SOURCE_URL:=http://hisham.hm/htop/releases/$(PKG_VERSION)/ +PKG_MD5SUM:=e768b9b55c033d9c1dffda72db3a6ac7 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Oolite V1.0 Support
Michel Stempin michel.stempin at wanadoo.fr writes: They will pick it up, but it may take some time, it is not a full time job ;) If you don't see it acknowledged after a while, just send a ping... You can check the status here: http://patchwork.openwrt.org/project/openwrt/list/ -- Michel Just FYI, the manufacturer of the oolite module maintains their openwrt branch of Attitude Adjustment at: https://github.com/ooioe/Oolitev1 They ship with that code already on them. I picked up a dozen modules and a couple of their dev boards recently for a project we are prototyping. So far they are working great, and we expect to use them in our final product. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] haveged: bump
Patch to bump haveged to version 1.9.1 released in February 2014. http://www.issihosts.com/haveged/downloads.html Compiled and tested on ar71xx/wndr3700. signed-off-by: hannu.ny...@iki.fi Index: packages/utils/haveged/Makefile === --- packages/utils/haveged/Makefile (revision 40659) +++ packages/utils/haveged/Makefile (working copy) @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2012 OpenWrt.org +# Copyright (C) 2006-2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=haveged -PKG_VERSION:=1.7c +PKG_VERSION:=1.9.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.issihosts.com/$(PKG_NAME) -PKG_MD5SUM:=036760389b1827a2532e248dd3cc46d3 +PKG_MD5SUM:=015ff58cd10607db0e0de60aeca2f5f8 #ensure this is consistent with the dir in the tarball!!! PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] pptpd: bump to version 1.4.0 (fix bugs 12909, 15490, 15635)
Old pptpd 1.3.4 suffers from an old bug that gcc 4.8 has apparently brought to surface (analysed in bug 12909). The problem has been fixed upstream and is included in 1.4.0 release from October 2013. http://sourceforge.net/p/poptop/mailman/message/30453437/ http://sourceforge.net/p/poptop/git/ci/db9a847936fa1c890d337ed609b9d3600834870a/ http://sourceforge.net/projects/poptop/ The patch bumps pptpd from 6-year old 1.3.4 to 1.4.0. Related bugs 15428, 15635, 12909, 15490. https://dev.openwrt.org/ticket/12909 https://dev.openwrt.org/ticket/15428 (AA12.09) https://dev.openwrt.org/ticket/15490 https://dev.openwrt.org/ticket/15635 I have compiled and briefly tested on ar71xx/wndr3700 with trunk. signed-off-by: hannu.ny...@iki.fi Index: packages/net/pptpd/Makefile === --- packages/net/pptpd/Makefile (revision 40659) +++ packages/net/pptpd/Makefile (working copy) @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2006-2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pptpd -PKG_VERSION:=1.3.4 -PKG_RELEASE:=2 +PKG_VERSION:=1.4.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/poptop -PKG_MD5SUM:=b38df9c431041922c997c1148bedf591 +PKG_MD5SUM:=36f9f45c6ffa92bc3b6e24ae2d053505 PKG_INSTALL:=1 Index: packages/net/pptpd/patches/001-bad_pqueue_debug.patch === --- packages/net/pptpd/patches/001-bad_pqueue_debug.patch (revision 40659) +++ packages/net/pptpd/patches/001-bad_pqueue_debug.patch (working copy) @@ -1,5 +1,5 @@ pptpd-1.3.4.orig/pqueue.c 2005-08-03 10:53:22.0 +0200 -+++ pptpd-1.3.4/pqueue.c 2009-12-03 17:47:26.976174000 +0100 +--- a/pqueue.c b/pqueue.c @@ -7,13 +7,11 @@ #include pqueue.h Index: packages/net/pptpd/patches/002-makefile_fix.patch === --- packages/net/pptpd/patches/002-makefile_fix.patch (revision 40659) +++ packages/net/pptpd/patches/002-makefile_fix.patch (working copy) @@ -1,5 +1,5 @@ pptpd-1.3.4.orig/plugins/Makefile 2006-08-03 04:02:01.0 +0200 -+++ pptpd-1.3.4/plugins/Makefile 2009-12-03 21:18:09.678467590 +0100 +--- a/plugins/Makefile b/plugins/Makefile @@ -18,7 +18,7 @@ all: $(PLUGINS) %.so: %.c $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD) Index: packages/net/pptpd/patches/003-opt_flags.patch === --- packages/net/pptpd/patches/003-opt_flags.patch (revision 40659) +++ packages/net/pptpd/patches/003-opt_flags.patch (working copy) @@ -1,7 +1,6 @@ -diff -ruN pptpd-1.3.0-old/Makefile.in pptpd-1.3.0-new/Makefile.in pptpd-1.3.0-old/Makefile.in2005-08-03 09:47:42.0 +0200 -+++ pptpd-1.3.0-new/Makefile.in2006-10-27 18:22:00.0 +0200 -@@ -106,7 +106,7 @@ +--- a/Makefile.in b/Makefile.in +@@ -153,7 +153,7 @@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] [qos-scripts] Improve usability by adding comment field to rules
It's quite unconveniet to remember which ports are used by which applications, especially for not so advanced users. Together with luci patch (discussed on IRC) this improves qos-scripts usability. Signed-off-by: Roman Yeryomin ro...@advem.lv --- package/network/config/qos-scripts/files/usr/lib/qos/generate.sh | 4 1 file changed, 4 insertions(+) diff --git a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh index 440b43f..07ec34f 100755 --- a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh +++ b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh @@ -118,6 +118,10 @@ parse_matching_rule() { add_insmod ipt_connbytes append $var -m connbytes --connbytes $value --connbytes-dir both --connbytes-mode bytes ;; + *:comment) + add_insmod xt_comment + append $var -m comment --comment '$value' + ;; *:tos) add_insmod ipt_tos case $value in -- 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 2/2] [qos-scripts] Add comments to existing rules
Signed-off-by: Roman Yeryomin ro...@advem.lv --- package/network/config/qos-scripts/files/etc/config/qos | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/network/config/qos-scripts/files/etc/config/qos b/package/network/config/qos-scripts/files/etc/config/qos index 8faff18..b90bb3f 100644 --- a/package/network/config/qos-scripts/files/etc/config/qos +++ b/package/network/config/qos-scripts/files/etc/config/qos @@ -11,13 +11,16 @@ config interface wan config classify option target Priority option ports22,53 + option comment ssh, dns config classify option target Normal option prototcp option ports20,21,25,80,110,443,993,995 + option comment ftp, smtp, http(s), imap config classify option target Express option ports5190 + option comment AOL, iChat, ICQ config default option target Express option protoudp -- 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] [udpxy] Add config file and use procd.
Add config file and use procd. Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/net/udpxy/Makefile b/net/udpxy/Makefile index f9ac4fc..97a5618 100644 --- a/net/udpxy/Makefile +++ b/net/udpxy/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=udpxy PKG_REV:=1.0.23 PKG_TAG:=9 PKG_VERSION:=$(PKG_REV)-$(PKG_TAG) -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME).$(PKG_REV)-$(patsubst %,%-prod,$(PKG_TAG)).tar.gz PKG_SOURCE_URL:=http://www.udpxy.com/download/1_23 @@ -24,18 +24,22 @@ include $(INCLUDE_DIR)/package.mk define Package/udpxy SECTION:=net CATEGORY:=Network - TITLE:=convert UDP IPTV streams into http stream + TITLE:=Convert UDP IPTV streams into HTTP streams URL:=http://www.udpxy.com/index-en.html endef define Package/udpxy/description - udproxy makes it possible to convert UDP IPTV streams into http - streams which can be viewed even over wlans. http streams do + udproxy makes it possible to convert UDP IPTV streams into HTTP + streams which can be viewed even over WLANs. HTTP streams do not generate huge amounts of multicast traffic, so a sd stream - only takes about 300k. interesting for peoply who have IPTV at + only takes about 300k. Interesting for peoply who have IPTV at home and do not want to rent multiple decoders from their - provider but just use their own streaming client for example - popcornhour/mediatomb/vlc/etc. + provider but just use their own streaming client (for example + popcornhour/mediatomb/vlc). +endef + +define Package/udpxy/conffiles +/etc/config/udpxy endef MAKE_FLAGS += \ @@ -43,7 +47,8 @@ MAKE_FLAGS += \ ALL_CFLAGS=$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) define Package/udpxy/install - $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/config + $(INSTALL_CONF) ./files/udpxy.conf $(1)/etc/config/udpxy $(INSTALL_BIN) ./files/udpxy.init $(1)/etc/init.d/udpxy $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udpxy $(1)/usr/bin/ diff --git a/net/udpxy/files/udpxy.conf b/net/udpxy/files/udpxy.conf new file mode 100644 index 000..5ef2e27 --- /dev/null +++ b/net/udpxy/files/udpxy.conf @@ -0,0 +1,13 @@ +config udpxy + option verbose '0' + option status '1' + option bind '0.0.0.0' + option port '4022' + option source '0.0.0.0' + option max_clients '3' + option log_file '/var/log/udpxy' + option buffer_size '2048' + option buffer_messages '1' + option buffer_time '1' + option nice_increment '0' + option mcsub_renew '0' diff --git a/net/udpxy/files/udpxy.init b/net/udpxy/files/udpxy.init index 41d7481..183a200 100644 --- a/net/udpxy/files/udpxy.init +++ b/net/udpxy/files/udpxy.init @@ -1,27 +1,61 @@ #!/bin/sh /etc/rc.common +# Copyright (C) 2006-2014 OpenWrt.org -# To open multicast traffic, add the following rule at the end of -# /etc/config/firewall file: -# -# config 'rule' -# option 'target' 'ACCEPT' -# option '_name' 'multicast' -# option 'src' 'wan' -# option 'proto' 'all' -# option 'dest_ip' '224.0.0.0/4' +START=50 +USE_PROCD=1 -START=99 -STOP=10 +udpxy_parse() { + local cfg=$1 -SERVICE_DAEMONIZE=1 -SERVICE_WRITE_PID=1 + local cfg_verbose + local cfg_status + local cfg_mcsub_renew + local cfg_bind + local cfg_port + local cfg_source + local cfg_max_clients + local cfg_log_file + local cfg_buffer_size + local cfg_buffer_messages + local cfg_buffer_time + local cfg_nice_increment + local cfg_mcsub_renew -OPTIONS=-T -S -p 4022 + config_get_bool cfg_verbose $cfg 'verbose' 0 + config_get_bool cfg_status $cfg 'status' 1 + config_get cfg_bind $cfg 'bind' '0.0.0.0' + config_get cfg_port $cfg 'port' '4022' + config_get cfg_source $cfg 'source' '0.0.0.0' + config_get cfg_max_clients $cfg 'max_clients' '3' + config_get cfg_log_file $cfg 'log_file' '/var/log/udpxy' + config_get cfg_buffer_size $cfg 'buffer_size' '2048' + config_get cfg_buffer_messages $cfg 'buffer_messages' '1' + config_get cfg_buffer_time $cfg 'buffer_time' '1' + config_get cfg_nice_increment $cfg 'nice_increment' '0' + config_get cfg_mcsub_renew $cfg 'mcsub_renew' 0 -start() { - service_start /usr/bin/udpxy $OPTIONS + procd_open_instance + + procd_set_param command /usr/bin/udpxy + procd_append_param command -T + [ $cfg_verbose -eq 1 ] procd_append_param command -v + [ $cfg_status -eq 1 ] procd_append_param command -S + procd_append_param command -a $cfg_bind + procd_append_param command -p $cfg_port + procd_append_param command -m $cfg_source + procd_append_param command -c $cfg_max_clients + procd_append_param command -l $cfg_log_file + [ $cfg_nice_increment -ge 4096 ]
[OpenWrt-Devel] option ip6assign 60
Hiya, I've installed trunk (r40576) on a few boxes because I want to play around with homenet (hnetd / package hnet-full). Before I even get there, I'm wondering about something. The sample /etc/config/network file has an option in there which confuses me: config interface 'lan' option ifname 'eth1' #option type 'bridge' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option ip6assign '60' what is option ip6assign good for, and why does it default to 60? (option bridge commented out by me, as hnetd supposedly does not like bridges) The effect it has is that the interface in question receives a /60 as IPv6 network connected to it: root@OpenWrt:/etc/config# ifconfig -a eth1 Link encap:Ethernet HWaddr 10:FE:ED:E6:5F:32 inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::12fe:edff:fee6:5f32/64 Scope:Link inet6 addr: fd83:af19:9ef::1/60 Scope:Global inet6 addr: 2001:608:0:c10::1/60 Scope:Global ... which is not exactly what the IETF says should be on a LAN - but some other parts of the system see the prefix as /64, like when sending out a RA on that LAN 17:51:19.741002 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 192) fe80::12fe:edff:fee6:5f32 ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 192 hop limit 0, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0s, retrans time 0s source link-address option (1), length 8 (1): 10:fe:ed:e6:5f:32 mtu option (5), length 8 (1): 1500 prefix info option (3), length 32 (4): 2001:608:0:c10::/64, Flags [onlink, auto], valid time 2817s, pref. time 1017s prefix info option (3), length 32 (4): fd83:af19:9ef::/64, Flags [onlink, auto], valid time 7200s, pref. time 1800s ... which is perfectly correct, as SLAAC only works for /64. So, well, my question boils down to why is that default there?, and what effects does this option have, besides assigning /60 prefixes to LAN interfaces?. (As a side note: I really like the way IPv6 has gotten integrated into newer releases. Plug in that thing, received DHCPv6-PD from upstream routers, offer v6 to connected LANs, off you go...) gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025g...@net.informatik.tu-muenchen.de pgpj0iFsvpaNY.pgp Description: PGP signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] option ip6assign 60
A /64 prefix and SLAAC can only really be applied to a single link in your network, so if you wanted to separate your network into multiple links (ie: not bridging) then you would use a shorter prefix to get the routing right between each of those links. For example, the IPv6 prefix generated by your router might be fd83:af19:9ef::/60, but your your ethernet devices would see fd83:af19:9ef:1::/64 for SLAAC, and your WiFi devices might see fd83:af19:9ef:2::/64 for SLAAC. Because they are both subnets of the broader /60 prefix, your router can advertise itself as the router for all of the links in your home network. Cheers, Owen P.S. This is all hypothetical, I haven't actually played with this option to see what it does... but this is the typical use case for IPv6 prefixes shorter than 64-bits and ULAs. On 14-05-02 11:14 AM, Gert Doering wrote: Hiya, I've installed trunk (r40576) on a few boxes because I want to play around with homenet (hnetd / package hnet-full). Before I even get there, I'm wondering about something. The sample /etc/config/network file has an option in there which confuses me: config interface 'lan' option ifname 'eth1' #option type 'bridge' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option ip6assign '60' what is option ip6assign good for, and why does it default to 60? (option bridge commented out by me, as hnetd supposedly does not like bridges) The effect it has is that the interface in question receives a /60 as IPv6 network connected to it: root@OpenWrt:/etc/config# ifconfig -a eth1 Link encap:Ethernet HWaddr 10:FE:ED:E6:5F:32 inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::12fe:edff:fee6:5f32/64 Scope:Link inet6 addr: fd83:af19:9ef::1/60 Scope:Global inet6 addr: 2001:608:0:c10::1/60 Scope:Global ... which is not exactly what the IETF says should be on a LAN - but some other parts of the system see the prefix as /64, like when sending out a RA on that LAN 17:51:19.741002 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 192) fe80::12fe:edff:fee6:5f32 ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 192 hop limit 0, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0s, retrans time 0s source link-address option (1), length 8 (1): 10:fe:ed:e6:5f:32 mtu option (5), length 8 (1): 1500 prefix info option (3), length 32 (4): 2001:608:0:c10::/64, Flags [onlink, auto], valid time 2817s, pref. time 1017s prefix info option (3), length 32 (4): fd83:af19:9ef::/64, Flags [onlink, auto], valid time 7200s, pref. time 1800s ... which is perfectly correct, as SLAAC only works for /64. So, well, my question boils down to why is that default there?, and what effects does this option have, besides assigning /60 prefixes to LAN interfaces?. (As a side note: I really like the way IPv6 has gotten integrated into newer releases. Plug in that thing, received DHCPv6-PD from upstream routers, offer v6 to connected LANs, off you go...) gert ___ 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] option ip6assign 60
Hi, On Fri, May 02, 2014 at 11:28:29AM -0700, Owen Kirby wrote: A /64 prefix and SLAAC can only really be applied to a single link in your network, so if you wanted to separate your network into multiple links (ie: not bridging) then you would use a shorter prefix to get the routing right between each of those links. For example, the IPv6 prefix generated by your router might be fd83:af19:9ef::/60, but your your ethernet devices would see fd83:af19:9ef:1::/64 for SLAAC, and your WiFi devices might see fd83:af19:9ef:2::/64 for SLAAC. Because they are both subnets of the broader /60 prefix, your router can advertise itself as the router for all of the links in your home network. I do understand *that*, and I can see that if you do multi-level DHCPv6-PD, the first router might want to give the second router a /60, so that this one has 16 /64s for all of its LANs (and so on). But you'd then normally not configure the /60 onto a LAN segment in between, but have a /64 between router A and router B, and the /60 routed across that... gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025g...@net.informatik.tu-muenchen.de pgpXyce0NB9VQ.pgp Description: PGP signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] option ip6assign 60
Hi Gert, In regular OpenWrt ip6assign means that - as already written - a /60 (if available) is taken from the DP and the assigned to the given interface. That value was chosen rather arbitrarily. The first /64 of that DP is handed out via RA and stateful DHCPv6 (IA_NA). The rest of the /60 (or whatever you set in ip6assign) can be acquired by downstream routers on that interface via DHCPv6-PD. Regarding homenet / hnetd, please see http://www.homewrt.org for some documentation. Also feel free to ask me (I'm one of the authors of the draft and implementation) or join us on #hnet-hackers on freenode about anything you might need / want to know. hnetd implements its own prefix delegation algorithm (as its managed throughout the homenet) so usual ip6assign-stuff doesn't apply here. You can also use it with bridges but it might make more sense to use individual ports instead to e.g. avoid unnecessary traffic on WiFi or make proper use of the border detection (e.g. use one switch-port for a second uplink and another for downstream or so). Cheers, Steven ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] OpenWrt signaling early boot cycle (blinking LED) all the time on 1st boot
2014-02-08 0:36 GMT+01:00 Rafał Miłecki zaj...@gmail.com: On the first boot after installation OpenWrt starts linking my LED and never stops. It starts around Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level It was fixed by John in: http://git.openwrt.org/?p=openwrt.git;a=commitdiff;h=c19daf65afa1dfe10d7f5710bf7f06a30f6b78c4 procd: update to latest git head John: it would be cool to reply to ppl and let them know about the fix ;) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] option ip6assign 60
Hi Gert, you are right its a bit unusual and you may very well consider it bad practice and if I have enough time it will hopefully solve it in a better way at some point. The reasoning behind this is that this way the DHCPv6 (PD) server can easily learn about the whole available prefix range and any lifetime etc. changes immediately via Kernel netlink updates and thus reconfigure clients and downstream routers easily if needed without a separate IPC or configuration channel. Of course it still sets up a more specific routes once a prefixes is actually assigned to a downstream router so that routing works correctly. Cheers, Steven ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [openwrt-routing] mcast-tools: fix linux/pim.h include
Applied, thx. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] option ip6assign 60
Hi, On Fri, May 02, 2014 at 08:44:06PM +0200, Steven Barth wrote: In regular OpenWrt ip6assign means that - as already written - a /60 (if available) is taken from the DP and the assigned to the given interface. That value was chosen rather arbitrarily. The first /64 of that DP is handed out via RA and stateful DHCPv6 (IA_NA). The rest of the /60 (or whatever you set in ip6assign) can be acquired by downstream routers on that interface via DHCPv6-PD. Ah! So it's a reservation for downstream-DHCPv6-PD. It's still slightly confusing, tbh, to see the ifconfig and route values point the /60 towards the actual interface. But maybe that's just me :-) - it certainly isn't causing problems, just to say that again. Regarding homenet / hnetd, please see http://www.homewrt.org for some documentation. Also feel free to ask me (I'm one of the authors of the draft and implementation) or join us on #hnet-hackers on freenode about anything you might need / want to know. Thanks for the offer. Right now, only one of the routers is life (due to convenience of access to stuff, like arbitrary upstream routers, I'm building this at office, and 3 out of 4 boxes are still at home...), but I'm planning to have this operational in the next few days - and I'm sure questions will come. I've read everything that's linked from the start page on http://www.homewrt.org/ - but it's not really much as far as how can I see what it does? how can I debug it? Is there only one single option to turn this on and off (option proto 'hnet'), or is there more? Does hnetd handle IPv4 and IPv6 today? How do I force selection of a certain /64 on a specific interface? question go... :-) (I *have* read all the *-homenet-* drafts, so I feel I understand the basic concepts and requirements, but now I need to see it) hnetd implements its own prefix delegation algorithm (as its managed throughout the homenet) so usual ip6assign-stuff doesn't apply here. You Understood. I was just curious what it was, spending too much time on side-track curiousity again :-) can also use it with bridges but it might make more sense to use individual ports instead to e.g. avoid unnecessary traffic on WiFi or make proper use of the border detection (e.g. use one switch-port for a second uplink and another for downstream or so). I think the does not like bridges thing came from the old stuff on http://github.org/fingon/hnet-core/ or something like that - can't find it right now. It's good to know that it works, though I'm fully intending to not use bridging anyway :-) - I really really like the hnet approach. Will let you know how it works out! thanks, gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025g...@net.informatik.tu-muenchen.de pgpnvZ5qjUsp7.pgp Description: PGP signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] option ip6assign 60
Am 02.05.2014 21:00, schrieb Gert Doering: Ah! So it's a reservation for downstream-DHCPv6-PD. It's still slightly confusing, tbh, to see the ifconfig and route values point the /60 towards the actual interface. But maybe that's just me :-) - it certainly isn't causing problems, just to say that again. Yes, please see other e-mail in the thread for justification ;) Thanks for the offer. Right now, only one of the routers is life (due to convenience of access to stuff, like arbitrary upstream routers, I'm building this at office, and 3 out of 4 boxes are still at home...), but I'm planning to have this operational in the next few days - and I'm sure questions will come. I've read everything that's linked from the start page on http://www.homewrt.org/ - but it's not really much as far as how can I see what it does? how can I debug it? Is there only one single option to turn this on and off (option proto 'hnet'), or is there more? Does hnetd handle IPv4 and IPv6 today? How do I force selection of a certain /64 on a specific interface? question go... :-) Yeah to turn it on on a given interface simply change the proto to hnet (and remove any previous interface using the same interface in /etc/config/network). If you want to not use bridging you need to create one logical interface in /etc/config/network for each switch-port / vlan. Once you have configured an interface e.g. like this: config interface h1 option ifname eth1 option proto hnet and brough it up with /etc/init.d/network reload ifup h1 you can watch its state using: ifstatus h1. hnet also automatically creates a dhcp and dhcpv6 client subinterface which you can also monitor using ifstatus h1_4 and ifstatus h1_6. If there is 6rd or dslite provided by dhcp / dhcpv6 then there is a in addition an interface h1_6rd or h1_dslite. All these virtual interface are created automatically (you don't need to put then in /etc/config/network). Also hnetd at the moment is very talkative in syslog so you should get a pretty good view of whats going on. Forcing a certain prefix on an interface is implemented but not exposed to interface config yet. I will try to put it on todo for sometime next week and push a new version to OpenWrt once its working shouldn't be very hard. Regards, Steven ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [xupnpd] Update to latest version, switch to procd and add parameter for root directory
Update to latest version, switch to procd and add parameter for root directory. Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/multimedia/xupnpd/Makefile b/multimedia/xupnpd/Makefile index 3d3f015..2a5ad55 100644 --- a/multimedia/xupnpd/Makefile +++ b/multimedia/xupnpd/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xupnpd -PKG_REV:=387 +PKG_REV:=398 PKG_VERSION:=$(PKG_REV) -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE_PROTO:=svn PKG_SOURCE_VERSION:=$(PKG_REV) diff --git a/multimedia/xupnpd/files/xupnpd.init b/multimedia/xupnpd/files/xupnpd.init index eddd0f4..29c458a 100644 --- a/multimedia/xupnpd/files/xupnpd.init +++ b/multimedia/xupnpd/files/xupnpd.init @@ -1,23 +1,15 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2013 OpenWrt.org +# Copyright (C) 2013-2014 OpenWrt.org -START=99 -STOP=99 +START=50 +USE_PROCD=1 -SERVICE_DAEMONIZE=1 -SERVICE_WRITE_PID=1 +start_service() { + procd_open_instance -XUPNPDROOTDIR=/usr/share/xupnpd -XUPNPD=/usr/bin/xupnpd + procd_set_param command /usr/bin/xupnpd + procd_append_param command -d /usr/share/xupnpd -start() { -service_start $XUPNPD -} - -stop() { -service_stop $XUPNPD -} - -reload() { -service_reload $XUPNPD + procd_set_param respawn + procd_close_instance } diff --git a/multimedia/xupnpd/patches/101-root_dir_param.patch b/multimedia/xupnpd/patches/101-root_dir_param.patch new file mode 100644 index 000..72d98ae --- /dev/null +++ b/multimedia/xupnpd/patches/101-root_dir_param.patch @@ -0,0 +1,84 @@ +diff -uprN a/main.cpp b/main.cpp +--- a/main.cpp 2014-05-02 20:56:01.019582499 +0200 b/main.cpp 2014-05-02 20:44:48.861436800 +0200 +@@ -4,11 +4,14 @@ + * https://tsdemuxer.googlecode.com/svn/trunk/xupnpd + */ + ++#include ctype.h + #include stdio.h + #include syslog.h + #include string.h + #include unistd.h + #include stdlib.h ++#include sys/stat.h ++#include sys/types.h + #include luacompat.h + #include luaxlib.h + #include luaxcore.h +@@ -16,35 +19,36 @@ + + int main(int argc,char** argv) + { +-const char* p=strrchr(argv[0],'/'); +- +-int rc; +- +-if(p) +-{ +-char location[512]; +-int n=p-argv[0]; +-if(n=sizeof(location)) +-n=sizeof(location)-1; +-strncpy(location,argv[0],n); +-location[n]=0; +- +-rc=chdir(location); +- +-argv[0]=(char*)p+1; +-} +- +-const char* root=getenv(XUPNPDROOTDIR); +-if(root *root) +-rc=chdir(root); +- +-{ +-FILE* fp=fopen(xupnpd.lua,r); +-if(fp) +-fclose(fp); +-else +-rc=chdir(/usr/share/xupnpd/); +-} ++ int c; ++ char *xupnpd_root = /usr/share/xupnpd/; ++ struct stat s; ++ ++ opterr = 0; ++ while ((c = getopt (argc, argv, d:)) != -1) { ++ switch (c) { ++ case 'd': ++ xupnpd_root = optarg; ++ break; ++ case '?': ++ if (optopt == 'd') ++ fprintf(stderr, Option -%c requires an argument.\n, optopt); ++ else if (isprint(optopt)) ++ fprintf(stderr, Unknown option \-%c\.\n, optopt); ++ else ++ fprintf(stderr, Unknown option\n); ++ return 1; ++ default: ++ abort(); ++ } ++ } ++ ++ if(stat(xupnpd_root, s) != -1 S_ISDIR(s.st_mode)) { ++ c = chdir(xupnpd_root); ++ } ++ else { ++ fprintf(stderr, Directory %s doesn't exist.\n, xupnpd_root); ++ return 1; ++ } + + lua_State* L=lua_open(); + if(L) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] hnet tests
Hi, On Fri, May 02, 2014 at 09:31:43PM +0200, Steven Barth wrote: I've read everything that's linked from the start page on http://www.homewrt.org/ - but it's not really much as far as how can I see what it does? how can I debug it? Is there only one single option to turn this on and off (option proto 'hnet'), or is there more? Does hnetd handle IPv4 and IPv6 today? How do I force selection of a certain /64 on a specific interface? question go... :-) Yeah to turn it on on a given interface simply change the proto to hnet (and remove any previous interface using the same interface in /etc/config/network). If you want to not use bridging you need to create one logical interface in /etc/config/network for each switch-port / vlan. OK. What about the wan6 interface? Default OpenWRT config has config interface 'wan' option ifname 'eth0' option proto 'dhcp' config interface 'wan6' option ifname '@wan' option proto 'dhcpv6' so I assume the wan6 interface would completely go away, leading to config interface 'wan' option ifname 'eth0' option proto 'hnet' #config interface 'wan6' #option ifname '@wan' #option proto 'dhcpv6' right? ... but that doesn't work out for me :-( - I can see hnetd talk, but I completely lost global IPv6 - no RA learning on the WAN anymore, and no DHCPv6 PD either. The upstream server complains about IA-NA not being supported (Cisco), but I don't see a PD request in there... May 2 22:47:09: IPv6 DHCP: Received SOLICIT from FE80::CC4F:57BB:3A1:93FD on Vlan2 May 2 22:47:09: IPv6 DHCP: Option IA-NA(3) is not supported yet May 2 22:47:09: IPv6 DHCP: Sending ADVERTISE to FE80::CC4F:57BB:3A1:93FD on Vlan2 May 2 22:47:09: IPv6 DHCP: Received SOLICIT from FE80::12FE:EDFF:FEE6:5F33 on Vlan62 May 2 22:47:09: IPv6 DHCP: Option USER-CLASS(15) is not processed May 2 22:47:09: IPv6 DHCP: Option RECONF-ACCEPT(20) is not processed May 2 22:47:09: IPv6 DHCP: Option UNKNOWN(39) is not processed May 2 22:47:09: IPv6 DHCP: Option IA-NA(3) is not supported yet May 2 22:47:09: IPv6 DHCP: Sending ADVERTISE to FE80::12FE:EDFF:FEE6:5F33 on Vlan62 (Upstream router sends RA with A and O bit set, and that worked nicely with proto dhcpv6) and ifstatus wan also looks very much passive... root@OpenWrt:~# ifstatus wan { up: true, pending: false, available: true, autostart: true, uptime: 419, l3_device: eth0, proto: hnet, device: eth0, metric: 0, delegation: true, ipv4-address: [ ], ipv6-address: [ ], ipv6-prefix: [ ], ipv6-prefix-assignment: [ ], route: [ ], dns-server: [ 195.30.0.2 ], dns-search: [ ], inactive: { ipv4-address: [ ], ipv6-address: [ ], route: [ ], dns-server: [ ], dns-search: [ ] }, data: { dhcpv4: disabled, dhcpv6: disabled, ra: disabled, ra_management: 1, zone: wan } } ... so, something I am missing... :-/ thanks, gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025g...@net.informatik.tu-muenchen.de pgp9S8EpMh09K.pgp Description: PGP signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] hnet tests
Hi, On Fri, May 02, 2014 at 10:56:07PM +0200, Gert Doering wrote: May 2 22:47:09: IPv6 DHCP: Received SOLICIT from FE80::CC4F:57BB:3A1:93FD on Vlan2 May 2 22:47:09: IPv6 DHCP: Option IA-NA(3) is not supported yet May 2 22:47:09: IPv6 DHCP: Sending ADVERTISE to FE80::CC4F:57BB:3A1:93FD on Vlan2 Ooops, *this* was a red herring. Some other device in that test LAN... May 2 22:47:09: IPv6 DHCP: Received SOLICIT from FE80::12FE:EDFF:FEE6:5F33 on Vlan62 May 2 22:47:09: IPv6 DHCP: Option USER-CLASS(15) is not processed May 2 22:47:09: IPv6 DHCP: Option RECONF-ACCEPT(20) is not processed May 2 22:47:09: IPv6 DHCP: Option UNKNOWN(39) is not processed May 2 22:47:09: IPv6 DHCP: Option IA-NA(3) is not supported yet May 2 22:47:09: IPv6 DHCP: Sending ADVERTISE to FE80::12FE:EDFF:FEE6:5F33 on Vlan62 But *that* is the WRT Box... gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025g...@net.informatik.tu-muenchen.de pgp79HgkYe95i.pgp Description: PGP signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] hnet tests
Hi, On Fri, May 02, 2014 at 10:56:07PM +0200, Gert Doering wrote: ... so, something I am missing... :-/ Oh well. First thing is I should have looked at 'ifstatus wan_6' which indeed tells me WAN is working: root@OpenWrt:/etc/config# ifstatus wan_6 { up: false, pending: true, available: true, autostart: true, proto: dhcpv6, device: eth0, data: { } } Second thing is what tcpdump tells me... 21:07:24.773303 IP6 (hlim 1, next-header UDP (17) payload length: 148) fe80::12fe:edff:fee6:5f33.546 ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=eacb5 (elapsed-time 12979) (option-request SIP-servers-domain SIP-servers-address DNS-server DNS-search-list SNTP-servers NTP-server AFTR-Name opt_67 opt_82 opt_83) (client-ID hwaddr type 1 10feede65f33) (user-class) (reconfigure-accept) (Client-FQDN) (IA_NA IAID:1 T1:0 T2:0) (IA_PD IAID:1 T1:0 T2:0 (IA_PD-prefix ::/0 pltime:0 vltime:0))) 21:07:24.774839 IP6 (class 0xe0, hlim 255, next-header UDP (17) payload length: 59) fe80::214:1cff:fed2:30c0.547 fe80::12fe:edff:fee6:5f33.546: [udp sum ok] dhcp6 advertise (xid=eacb5 (server-ID hwaddr type 1 00141cd230c0) (client-ID hwaddr type 1 10feede65f33) (status-code no addresses)) ... so hnetd is asking for IA_NA and IA_PD, which the upstream Cisco doesn't support (at least not in the IOS version that's running, need to research whether a different Cisco platform could do IA_NA), so the Cisco returns no addresses, and then hnetd is unhappy and does not want to ask again for only IA_PD. Questions :-) - is hnetd intentionally ignoring the A-Bit in RA? - what's the recommended config on the upstream side to make it work? Remove the O-Bit? (I have that because I cannot send RFC6106 info from IOS, so RA+stateless DHCP is what we currently use to get IPv6 addresses + DNS addresses into the client devices) thanks, gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025g...@net.informatik.tu-muenchen.de pgpgZawD_JHMS.pgp Description: PGP signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/5] tools: genext2fs: add support for blocksize != 1024
This patch series is extracted from http://ftp.de.debian.org/debian/pool/main/g/genext2fs/genext2fs_1.4.1-4.debian.tar.gz The patches are used in Debian for quite a long time, so I assume that this is solid material. At least, my Ubuntu host fsck.ext4 does not bark :-) The goal is to allow building filesystems with larger blocksizes instead of the current default of 1k. This should improve performance and lifetime when the filesystem is stored e.g. on a SD card (on Raspberry Pi/I2SE Duckbill for example) which uses internal flash memory. Writing to flash memory is slow because writing the data of one block results in erasing a whole erase block of the flash memory. Thus it is preferable to align the filesystem block size on a flash device with the erase blocksize, or at least bring it closer to the later one, to avoid unnecessary write amplification. Signed-off-by: Michael Heimpold m...@heimpold.de --- tools/genext2fs/patches/100-c99_scanf.patch| 21 + tools/genext2fs/patches/200-autoconf.patch | 13 + .../genext2fs/patches/300-blocksize-creator.patch | 558 tools/genext2fs/patches/400-byteswap_fix.patch | 44 ++ 4 files changed, 636 insertions(+) create mode 100644 tools/genext2fs/patches/100-c99_scanf.patch create mode 100644 tools/genext2fs/patches/200-autoconf.patch create mode 100644 tools/genext2fs/patches/300-blocksize-creator.patch create mode 100644 tools/genext2fs/patches/400-byteswap_fix.patch diff --git a/tools/genext2fs/patches/100-c99_scanf.patch b/tools/genext2fs/patches/100-c99_scanf.patch new file mode 100644 index 000..e7aa17c --- /dev/null +++ b/tools/genext2fs/patches/100-c99_scanf.patch @@ -0,0 +1,21 @@ +commit 3b8ca0ce9a0b58287a780747c90c449bdebfe464 +Author: Xavier Bestel besto...@users.sourceforge.net +Date: Mon Jan 14 08:52:44 2008 + + +removed use of %as is scanf (GNU conflicts with C99) by Giacomo Catenazzi c...@debian.org + +diff --git a/genext2fs.c b/genext2fs.c +index 070b270..f0d797d 100644 +--- a/genext2fs.c b/genext2fs.c +@@ -286,7 +286,9 @@ typedef unsigned int uint32; + // older solaris. Note that this is still not very portable, in that + // the return value cannot be trusted. + +-#if SCANF_CAN_MALLOC ++#if 0 // SCANF_CAN_MALLOC ++// C99 define a for floating point, so you can have runtime surprise ++// according the library versions + # define SCANF_PREFIX a + # define SCANF_STRING(s) (s) + #else diff --git a/tools/genext2fs/patches/200-autoconf.patch b/tools/genext2fs/patches/200-autoconf.patch new file mode 100644 index 000..b3317bd --- /dev/null +++ b/tools/genext2fs/patches/200-autoconf.patch @@ -0,0 +1,13 @@ +Index: genext2fs/m4/ac_func_scanf_can_malloc.m4 +=== +--- genext2fs.orig/m4/ac_func_scanf_can_malloc.m4 2011-09-03 21:28:49.0 +0200 genext2fs/m4/ac_func_scanf_can_malloc.m4 2011-09-03 21:29:41.0 +0200 +@@ -9,7 +9,7 @@ + # -- + AC_DEFUN([AC_FUNC_SCANF_CAN_MALLOC], + [ AC_CHECK_HEADERS([stdlib.h]) +-AC_CACHE_CHECK([whether scanf can malloc], [ac_scanf_can_malloc], ++AC_CACHE_CHECK([whether scanf can malloc], [ac_cv_func_scanf_can_malloc], + [ AC_RUN_IFELSE( + [ AC_LANG_PROGRAM( + [ diff --git a/tools/genext2fs/patches/300-blocksize-creator.patch b/tools/genext2fs/patches/300-blocksize-creator.patch new file mode 100644 index 000..97a4836 --- /dev/null +++ b/tools/genext2fs/patches/300-blocksize-creator.patch @@ -0,0 +1,558 @@ +Index: genext2fs/genext2fs.c +=== +--- genext2fs.orig/genext2fs.c 2011-09-03 14:21:17.0 +0200 genext2fs/genext2fs.c 2011-09-03 14:21:17.0 +0200 +@@ -151,13 +151,24 @@ + + // block size + +-#define BLOCKSIZE 1024 ++static int blocksize = 1024; ++ ++#define BLOCKSIZE blocksize + #define BLOCKS_PER_GROUP 8192 + #define INODES_PER_GROUP 8192 + /* Percentage of blocks that are reserved.*/ + #define RESERVED_BLOCKS 5/100 + #define MAX_RESERVED_BLOCKS 25/100 + ++/* The default value for s_creator_os. */ ++#if defined(__GNU__) ++# define CREATOR_OS 1 /* Hurd */ ++#elif defined(__FreeBSD__) ++# define CREATOR_OS 3 /* FreeBSD */ ++#else ++# define CREATOR_OS 0 /* Linux */ ++#endif ++ + + // inode block size (why is it != BLOCKSIZE ?!?) + /* The field i_blocks in the ext2 inode stores the number of data blocks +@@ -239,10 +250,10 @@ + (fs)-sb.s_blocks_per_group - 1) / (fs)-sb.s_blocks_per_group) + + // Get group block bitmap (bbm) given the group number +-#define GRP_GET_GROUP_BBM(fs,grp) ( get_blk((fs),(fs)-gd[(grp)].bg_block_bitmap) ) ++#define GRP_GET_GROUP_BBM(fs,grp) ( get_blk((fs), get_gd((fs),(grp))-bg_block_bitmap) ) + + // Get group inode bitmap (ibm) given the group number +-#define GRP_GET_GROUP_IBM(fs,grp) ( get_blk((fs),(fs)-gd[(grp)].bg_inode_bitmap) )
[OpenWrt-Devel] [PATCH 0/5] Improve ext4 image generation
The following patch series tries to improve the creation of ext4 root filesystem images. It can also be pulled from: https://github.com/mhei/openwrt/tree/ext4images Michael Heimpold (5): tools: genext2fs: add support for blocksize != 1024 image: ext4: move ext4 specific options into submenu image: ext4: allow to choose a block size for the rootfs image: ext4: allow creation of a journaling filesystem image: ext4: rename config options as these are only used for ext4 image creation config/Config-images.in| 62 ++- include/image.mk |6 +- tools/genext2fs/patches/100-c99_scanf.patch| 21 + tools/genext2fs/patches/200-autoconf.patch | 13 + .../genext2fs/patches/300-blocksize-creator.patch | 558 tools/genext2fs/patches/400-byteswap_fix.patch | 44 ++ 6 files changed, 686 insertions(+), 18 deletions(-) create mode 100644 tools/genext2fs/patches/100-c99_scanf.patch create mode 100644 tools/genext2fs/patches/200-autoconf.patch create mode 100644 tools/genext2fs/patches/300-blocksize-creator.patch create mode 100644 tools/genext2fs/patches/400-byteswap_fix.patch -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 5/5] image: ext4: rename config options as these are only used for ext4 image creation
Signed-off-by: Michael Heimpold m...@heimpold.de --- config/Config-images.in |4 ++-- include/image.mk|2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/Config-images.in b/config/Config-images.in index e867391..93b55ec 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -72,14 +72,14 @@ menu Target Images help Build a ext4 root filesystem - config TARGET_ROOTFS_MAXINODE + config TARGET_EXT4_MAXINODE int Maximum number of inodes in root filesystem depends on TARGET_ROOTFS_EXT4FS default 6000 help Allows you to change the maximum number of inodes in the root filesystem - config TARGET_ROOTFS_RESERVED_PCT + config TARGET_EXT4_RESERVED_PCT int Percentage of reserved blocks in root filesystem depends on TARGET_ROOTFS_EXT4FS default 0 diff --git a/include/image.mk b/include/image.mk index 2f60ce0..a03d418 100644 --- a/include/image.mk +++ b/include/image.mk @@ -188,7 +188,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_EXT4FS),) define Image/mkfs/ext4 # generate an ext2 fs - $(STAGING_DIR_HOST)/bin/genext2fs -U -B $(CONFIG_TARGET_EXT4_BLOCKSIZE) -b $(E2SIZE) -N $(CONFIG_TARGET_ROOTFS_MAXINODE) -d $(TARGET_DIR)/ $(KDIR)/root.ext4 -m $(CONFIG_TARGET_ROOTFS_RESERVED_PCT) $(MKFS_DEVTABLE_OPT) + $(STAGING_DIR_HOST)/bin/genext2fs -U -B $(CONFIG_TARGET_EXT4_BLOCKSIZE) -b $(E2SIZE) -N $(CONFIG_TARGET_EXT4_MAXINODE) -d $(TARGET_DIR)/ $(KDIR)/root.ext4 -m $(CONFIG_TARGET_EXT4_RESERVED_PCT) $(MKFS_DEVTABLE_OPT) # convert it to ext4 $(STAGING_DIR_HOST)/bin/tune2fs $(if $(CONFIG_TARGET_EXT4_JOURNAL),-j) -O extents,uninit_bg,dir_index $(KDIR)/root.ext4 # fix it up -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/5] image: ext4: move ext4 specific options into submenu
Signed-off-by: Michael Heimpold m...@heimpold.de --- config/Config-images.in | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/config/Config-images.in b/config/Config-images.in index c9a75e4..b71a0d6 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -66,11 +66,25 @@ menu Target Images comment Root filesystem images - config TARGET_ROOTFS_EXT4FS + menuconfig TARGET_ROOTFS_EXT4FS bool ext4 default y if USES_EXT4 help - Ext4 file system with some free space for uml images + Build a ext4 root filesystem + + config TARGET_ROOTFS_MAXINODE + int Maximum number of inodes in root filesystem + depends on TARGET_ROOTFS_EXT4FS + default 6000 + help + Allows you to change the maximum number of inodes in the root filesystem + + config TARGET_ROOTFS_RESERVED_PCT + int Percentage of reserved blocks in root filesystem + depends on TARGET_ROOTFS_EXT4FS + default 0 + help + Allows you to change the percentage of reserved blocks in the root filesystem config TARGET_ROOTFS_ISO bool iso @@ -223,19 +237,6 @@ menu Target Images The root partition on the final device. If you don't know, you probably want the default (/dev/sda2). - config TARGET_ROOTFS_MAXINODE - int Maximum number of inodes in root filesystem - depends on TARGET_ROOTFS_EXT4FS - default 6000 - help - Allows you to change the maximum number of inodes in the root filesystem - - config TARGET_ROOTFS_RESERVED_PCT - int Percentage of reserved blocks in root filesystem - depends on TARGET_ROOTFS_EXT4FS - default 0 - help - Allows you to change the percentage of reserved blocks in the root filesystem menuconfig TARGET_ROOTFS_INCLUDE_KERNEL bool Include kernel in root filesystem -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/5] image: ext4: allow to choose a block size for the rootfs
Signed-off-by: Michael Heimpold m...@heimpold.de --- config/Config-images.in | 24 include/image.mk|4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/config/Config-images.in b/config/Config-images.in index b71a0d6..2deee67 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -86,6 +86,30 @@ menu Target Images help Allows you to change the percentage of reserved blocks in the root filesystem + choice + prompt Root filesystem block size + default TARGET_EXT4_BLOCKSIZE_4K + depends TARGET_ROOTFS_EXT4FS + help + Allows you to change the block size of the root filesystem + + config TARGET_EXT4_BLOCKSIZE_4K + bool 4k + + config TARGET_EXT4_BLOCKSIZE_2K + bool 2k + + config TARGET_EXT4_BLOCKSIZE_1K + bool 1k + endchoice + + config TARGET_EXT4_BLOCKSIZE + int + default 4096 if TARGET_EXT4_BLOCKSIZE_4K + default 2048 if TARGET_EXT4_BLOCKSIZE_2K + default 1024 if TARGET_EXT4_BLOCKSIZE_1K + depends TARGET_ROOTFS_EXT4FS + config TARGET_ROOTFS_ISO bool iso default n diff --git a/include/image.mk b/include/image.mk index 5391905..e9cb0cc 100644 --- a/include/image.mk +++ b/include/image.mk @@ -184,11 +184,11 @@ ifneq ($(CONFIG_TARGET_ROOTFS_TARGZ),) endif ifneq ($(CONFIG_TARGET_ROOTFS_EXT4FS),) - E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024))) + E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024*1024/$(CONFIG_TARGET_EXT4_BLOCKSIZE define Image/mkfs/ext4 # generate an ext2 fs - $(STAGING_DIR_HOST)/bin/genext2fs -U -b $(E2SIZE) -N $(CONFIG_TARGET_ROOTFS_MAXINODE) -d $(TARGET_DIR)/ $(KDIR)/root.ext4 -m $(CONFIG_TARGET_ROOTFS_RESERVED_PCT) $(MKFS_DEVTABLE_OPT) + $(STAGING_DIR_HOST)/bin/genext2fs -U -B $(CONFIG_TARGET_EXT4_BLOCKSIZE) -b $(E2SIZE) -N $(CONFIG_TARGET_ROOTFS_MAXINODE) -d $(TARGET_DIR)/ $(KDIR)/root.ext4 -m $(CONFIG_TARGET_ROOTFS_RESERVED_PCT) $(MKFS_DEVTABLE_OPT) # convert it to ext4 $(STAGING_DIR_HOST)/bin/tune2fs -O extents,uninit_bg,dir_index $(KDIR)/root.ext4 # fix it up -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/5] image: ext4: allow creation of a journaling filesystem
Signed-off-by: Michael Heimpold m...@heimpold.de --- config/Config-images.in |7 +++ include/image.mk|2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/Config-images.in b/config/Config-images.in index 2deee67..e867391 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -110,6 +110,13 @@ menu Target Images default 1024 if TARGET_EXT4_BLOCKSIZE_1K depends TARGET_ROOTFS_EXT4FS + config TARGET_EXT4_JOURNAL + bool Create a journaling filesystem + depends on TARGET_ROOTFS_EXT4FS + default n + help + Create an ext4 filesystem with a journal + config TARGET_ROOTFS_ISO bool iso default n diff --git a/include/image.mk b/include/image.mk index e9cb0cc..2f60ce0 100644 --- a/include/image.mk +++ b/include/image.mk @@ -190,7 +190,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_EXT4FS),) # generate an ext2 fs $(STAGING_DIR_HOST)/bin/genext2fs -U -B $(CONFIG_TARGET_EXT4_BLOCKSIZE) -b $(E2SIZE) -N $(CONFIG_TARGET_ROOTFS_MAXINODE) -d $(TARGET_DIR)/ $(KDIR)/root.ext4 -m $(CONFIG_TARGET_ROOTFS_RESERVED_PCT) $(MKFS_DEVTABLE_OPT) # convert it to ext4 - $(STAGING_DIR_HOST)/bin/tune2fs -O extents,uninit_bg,dir_index $(KDIR)/root.ext4 + $(STAGING_DIR_HOST)/bin/tune2fs $(if $(CONFIG_TARGET_EXT4_JOURNAL),-j) -O extents,uninit_bg,dir_index $(KDIR)/root.ext4 # fix it up $(STAGING_DIR_HOST)/bin/e2fsck -fy $(KDIR)/root.ext4 $(call Image/Build,ext4) -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mxs: rename files so that profiles are sorted alphabetically
While at it, make spelling at little bit more consistent, at least for my taste :-) Signed-off-by: Michael Heimpold m...@heimpold.de --- target/linux/mxs/profiles/{02-duckbill.mk = 01-duckbill.mk} |2 +- .../mxs/profiles/{01-olinuxino-maxi.mk = 02-olinuxino-maxi.mk} |6 +++--- target/linux/mxs/profiles/03-olinuxino-micro.mk |1 - 3 files changed, 4 insertions(+), 5 deletions(-) rename target/linux/mxs/profiles/{02-duckbill.mk = 01-duckbill.mk} (94%) rename target/linux/mxs/profiles/{01-olinuxino-maxi.mk = 02-olinuxino-maxi.mk} (87%) diff --git a/target/linux/mxs/profiles/02-duckbill.mk b/target/linux/mxs/profiles/01-duckbill.mk similarity index 94% rename from target/linux/mxs/profiles/02-duckbill.mk rename to target/linux/mxs/profiles/01-duckbill.mk index 4a68238..3f75a7a 100644 --- a/target/linux/mxs/profiles/02-duckbill.mk +++ b/target/linux/mxs/profiles/01-duckbill.mk @@ -6,7 +6,7 @@ # define Profile/duckbill - NAME:=I2SE Duckbill series + NAME:=I2SE Duckbill boards DEPENDS:=+@TARGET_ROOTFS_INCLUDE_KERNEL +@TARGET_ROOTFS_INCLUDE_DTB FEATURES+=usbgadget PACKAGES+= \ diff --git a/target/linux/mxs/profiles/01-olinuxino-maxi.mk b/target/linux/mxs/profiles/02-olinuxino-maxi.mk similarity index 87% rename from target/linux/mxs/profiles/01-olinuxino-maxi.mk rename to target/linux/mxs/profiles/02-olinuxino-maxi.mk index 408d26d..40a800e 100644 --- a/target/linux/mxs/profiles/01-olinuxino-maxi.mk +++ b/target/linux/mxs/profiles/02-olinuxino-maxi.mk @@ -6,7 +6,7 @@ # define Profile/olinuxino-maxi - NAME:=Olimex OLinuXino MAXI/MINI boards + NAME:=Olimex OLinuXino Maxi/Mini boards PACKAGES += imx-bootlets uboot-mxs-mx23_olinuxino \ kmod-usb-mxs-phy kmod-usb-net kmod-usb-net-smsc95xx \ kmod-gpio-mcp23s08 kmod-leds-gpio kmod-ledtrig-heartbeat kmod-rtc-stmp3xxx \ @@ -14,7 +14,7 @@ define Profile/olinuxino-maxi endef define Profile/olinuxino-maxi/Description - Olimex OLinuXino MAXI/MINI boards + Olimex OLinuXino Maxi/Mini boards endef -$(eval $(call Profile,olinuxino-maxi)) +$(eval $(call Profile,olinuxino-maxi)) diff --git a/target/linux/mxs/profiles/03-olinuxino-micro.mk b/target/linux/mxs/profiles/03-olinuxino-micro.mk index 7079f9c..6e180bb 100644 --- a/target/linux/mxs/profiles/03-olinuxino-micro.mk +++ b/target/linux/mxs/profiles/03-olinuxino-micro.mk @@ -18,4 +18,3 @@ define Profile/olinuxino-micro/Description endef $(eval $(call Profile,olinuxino-micro)) - -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mxs/imx6: make boardnames consistent with other targets
Remove 'series' as all other target do not use this, too. It should be obviously clear, that these targets refer to a whole CPU family. Signed-off-by: Michael Heimpold m...@heimpold.de --- target/linux/imx6/Makefile |2 +- target/linux/mxs/Makefile |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/imx6/Makefile b/target/linux/imx6/Makefile index 4d46c3e..b2065f5 100644 --- a/target/linux/imx6/Makefile +++ b/target/linux/imx6/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=imx6 -BOARDNAME:=Freescale i.MX 6 Series +BOARDNAME:=Freescale i.MX 6 FEATURES:=audio display fpu gpio pcie rtc usb usbgadget squashfs targz ubifs CPU_TYPE:=cortex-a9 CPU_SUBTYPE:=neon diff --git a/target/linux/mxs/Makefile b/target/linux/mxs/Makefile index f914e47..d153475 100644 --- a/target/linux/mxs/Makefile +++ b/target/linux/mxs/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=mxs -BOARDNAME:=Freescale i.MX23/i.MX28 series +BOARDNAME:=Freescale i.MX23/i.MX28 FEATURES:=ext4 rtc usb gpio CPU_TYPE:=arm926ej-s -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mxs: fix typo in patch filename
Signed-off-by: Michael Heimpold m...@heimpold.de --- .../mxs/patches-3.13/{110-dt-add-lradc.path = 110-dt-add-lradc.patch} |0 1 file changed, 0 insertions(+), 0 deletions(-) rename target/linux/mxs/patches-3.13/{110-dt-add-lradc.path = 110-dt-add-lradc.patch} (100%) diff --git a/target/linux/mxs/patches-3.13/110-dt-add-lradc.path b/target/linux/mxs/patches-3.13/110-dt-add-lradc.patch similarity index 100% rename from target/linux/mxs/patches-3.13/110-dt-add-lradc.path rename to target/linux/mxs/patches-3.13/110-dt-add-lradc.patch -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH try3 2/2] [luaposix]: update to v31
v31 adds more interfaces to POSIX. New compared to v5.1.11: nanosleep, open, close, read, write, pipe, dup, dup2, setfl, getfl, fcntl, poll, fnmatch, memrchr, strptime, statvfs, mkdtemp, isatty, openpt, ptsname, grantpt, unlockpt, killpg, openpty, realpath, socket functions and constants, fixes, optimizations, etc. New dependency: luabitop (provided as a separate patch) New in try3: PKG_BUILD_DEPENDS:=+lua/host. Should address I do not have Lua installed locally and it looks like it wants to check my local lua version. Signed-off-by: Maxim Storchak m.storc...@gmail.com --- lang/luaposix/Makefile| 19 ++--- lang/luaposix/patches/100-eglibc-compat.patch | 28 + 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/lang/luaposix/Makefile b/lang/luaposix/Makefile index 95e0135..0747c77 100644 --- a/lang/luaposix/Makefile +++ b/lang/luaposix/Makefile @@ -8,13 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luaposix -PKG_VERSION:=5.1.11 -PKG_RELEASE:=2 +PKG_VERSION:=v31 +PKG_RELEASE:=1 +_BASENAME:=release -PKG_SOURCE:=v$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(_BASENAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/luaposix/luaposix/archive/ -PKG_MD5SUM:=8254576c52bd2d0e160353d24880bb89 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_MD5SUM:=a25ff76d54bbbebf7a1f3b20c9806ee3 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(_BASENAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk @@ -24,7 +25,8 @@ define Package/luaposix CATEGORY:=Languages TITLE:=luaposix URL:=http://luaforge.net/projects/luaposix/ - DEPENDS:=+lua +librt + DEPENDS:=+lua +librt +luabitop + PKG_BUILD_DEPENDS:=+lua/host endef define Package/luaposix/description @@ -33,6 +35,8 @@ define Package/luaposix/description endef define Build/Configure + cd $(PKG_BUILD_DIR) ./bootstrap + $(call Build/Configure/Default) endef TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99 @@ -46,7 +50,8 @@ endif define Package/luaposix/install $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/posix.so $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ext/posix/.libs/posix_c.so $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix.lua $(1)/usr/lib/lua endef $(eval $(call BuildPackage,luaposix)) diff --git a/lang/luaposix/patches/100-eglibc-compat.patch b/lang/luaposix/patches/100-eglibc-compat.patch index 96a6fce..10aad20 100644 --- a/lang/luaposix/patches/100-eglibc-compat.patch +++ b/lang/luaposix/patches/100-eglibc-compat.patch @@ -1,26 +1,28 @@ a/lposix.c -+++ b/lposix.c -@@ -960,11 +960,13 @@ static int Pctermid(lua_State *L)/** c +--- luaposix-release-v31/ext/posix/posix.c.orig2014-03-10 14:22:45.0 +0200 luaposix-release-v31/ext/posix/posix.c 2014-03-10 14:25:04.0 +0200 +@@ -1970,6 +1970,7 @@ + return 1; } - +#ifndef NO_GETLOGIN - static int Pgetlogin(lua_State *L)/** getlogin() */ - { + /*** + Current logged-in user. + @see getlogin(3) +@@ -1980,6 +1981,7 @@ lua_pushstring(L, getlogin()); return 1; } +#endif - static void Fgetpasswd(lua_State *L, int i, const void *data) -@@ -1778,7 +1780,9 @@ static const luaL_reg R[] = + { +@@ -3786,7 +3788,9 @@ #if _POSIX_VERSION = 200112L - {getgroups, Pgetgroups}, + MENTRY( Pgetgroups ), #endif +#ifndef NO_GETLOGIN - {getlogin,Pgetlogin}, + MENTRY( Pgetlogin ), +#endif - {getopt_long, Pgetopt_long}, - {getpasswd, Pgetpasswd}, - {getpid, Pgetpid}, + MENTRY( Pgetopt ), + MENTRY( Pgetpasswd ), + MENTRY( Pgetpid ), -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH try3 1/2] [luabitop]: new package
Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers. This is a requirement for the updated luaposix. Note: nothing new compared to try2, repeating it just in case. Signed-off-by: Maxim Storchak m.storc...@gmail.com --- lang/luabitop/Makefile | 51 1 file changed, 51 insertions(+) create mode 100644 lang/luabitop/Makefile diff --git a/lang/luabitop/Makefile b/lang/luabitop/Makefile new file mode 100644 index 000..1eccaa9 --- /dev/null +++ b/lang/luabitop/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2011 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:=luabitop +PKG_VERSION:=1.0.2 +PKG_RELEASE:=1 + +_BASENAME:=LuaBitOp + +PKG_SOURCE:=$(_BASENAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://bitop.luajit.org/download/ +PKG_MD5SUM:=d0c1080fe0c844e8477279668e2d0d06 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(_BASENAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/luabitop + SUBMENU:=Lua + SECTION:=lang + CATEGORY:=Languages + TITLE:=luabitop + URL:=http://bitop.luajit.org/ + DEPENDS:=+lua +endef + +define Package/luabitop/description +Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers. +endef + +define Build/Configure +endef + + +TARGET_CFLAGS += $(FPIC) -DLUA_USE_LINUX -DLUA_NUMBER_DOUBLE + +define Build/Compile + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CPPFLAGS) -std=gnu99 $(FPIC) -DLUA_USE_LINUX -shared -o $(PKG_BUILD_DIR)/bit.so $(PKG_BUILD_DIR)/bit.c +endef + +define Package/luabitop/install + $(INSTALL_DIR) $(1)/usr/lib/lua + $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit.so $(1)/usr/lib/lua +endef + +$(eval $(call BuildPackage,luabitop)) -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mxs: add kernel module for spi interface
Signed-off-by: Michael Heimpold m...@heimpold.de --- target/linux/mxs/modules.mk | 15 +++ 1 file changed, 15 insertions(+) diff --git a/target/linux/mxs/modules.mk b/target/linux/mxs/modules.mk index 0584a73..2db4961 100644 --- a/target/linux/mxs/modules.mk +++ b/target/linux/mxs/modules.mk @@ -100,3 +100,18 @@ define KernelPackage/crypto-hw-dcp/description endef $(eval $(call KernelPackage,crypto-hw-dcp)) + +define KernelPackage/spi-mxs +SUBMENU:=$(SPI_MENU) +TITLE:=Freescale i.MX23/28 SPI driver +DEPENDS:=@TARGET_mxs +KCONFIG:=CONFIG_SPI_MXS +FILES:=$(LINUX_DIR)/drivers/spi/spi-mxs.ko +AUTOLOAD:=$(call AutoProbe,spi-mxs) +endef + +define KernelPackage/spi-mxs/description +Kernel module for Freescale i.MX23/28 SPI controller +endef + +$(eval $(call KernelPackage,spi-mxs)) -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Multiple Pre-Shared Keys for one SSID
Hi everyone, With OpenWrt is there a way to offer multiple PSKs (wifi passwords) for one SSID? It would be great to be able to set different passwords for different devices and/or users, but not require multiple SSIDs. Essentially, I'd like to implement the security features of RADIUS without having to go through the headaches of putting certificates on every device. It looks like this is supported by both Ruckus and Aerohive and their corresponding terminology is Dynamic PSK or Private PSK. Thanks for your help, -Nick ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [packages] weechat: add missing dependencies to fix build
Signed-off-by: Russell Senior russ...@personaltelco.net --- net/weechat/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/weechat/Makefile b/net/weechat/Makefile index d5dec7a..055c598 100644 --- a/net/weechat/Makefile +++ b/net/weechat/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2012 OpenWrt.org +# Copyright (C) 2006-2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=weechat PKG_VERSION:=0.4.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.weechat.org/files/src @@ -27,7 +27,7 @@ define Package/weechat CATEGORY:=Network TITLE:=Lightweight IRC client URL:=http://www.weechat.org/ - DEPENDS:=+libcurl +libgnutls +libncursesw $(ICONV_DEPENDS) + DEPENDS:=+libcurl +libgnutls +libncursesw +libgcrypt +zlib $(ICONV_DEPENDS) endef define Package/weechat/description -- 1.8.3.2 -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel