[OpenWrt-Devel] [PATCH] ppp switch to version 2.4.4

2009-07-26 Thread Vladimir Voronkov
This patch changes version of ppp to 2.4.4, which is required for openl2tp-1.6 
to work.
Patch with integration of openl2tp will be sent in my next email.

All current patches to ppp-2.4.3 are changed according to a new version of ppp,
some of them are removed (namely 102, 202, 205, 207) because they already exist 
in ppp-2.4.4.

Also kmod-pppol2tp kernel module has been added in configuration.

Signed-off-by: Vladimir Voronkov voronkovv at mail.ru

---

Index: package/kernel/modules/network.mk
===
--- package/kernel/modules/network.mk   (revision 16973)
+++ package/kernel/modules/network.mk   (working copy)
@@ -367,6 +367,7 @@
   FILES:= \
$(LINUX_DIR)/drivers/net/pppoe.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/drivers/net/pppox.$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoLoad,40,pppox pppoe)
 endef
 
 define KernelPackage/pppoe/description
@@ -376,6 +377,22 @@
 $(eval $(call KernelPackage,pppoe))
 
 
+define KernelPackage/pppol2tp
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=PPPoL2TP support
+  DEPENDS:=kmod-ppp +kmod-pppoe
+  KCONFIG:=CONFIG_PPPOL2TP
+  FILES:=$(LINUX_DIR)/drivers/net/pppol2tp.$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoLoad,40,pppol2tp)
+endef
+
+define KernelPackage/pppol2tp/description
+ Kernel modules for PPPoL2TP (PPP over L2TP) support
+endef
+
+$(eval $(call KernelPackage,pppol2tp))
+
+
 define KernelPackage/pppoa
   SUBMENU:=$(NETWORK_SUPPORT_MENU)
   TITLE:=PPPoA support
Index: package/ppp/patches/101-debian_ip-up_option.patch
===
--- package/ppp/patches/101-debian_ip-up_option.patch   (revision 16973)
+++ package/ppp/patches/101-debian_ip-up_option.patch   (working copy)
@@ -2,37 +2,37 @@
 ===
 --- ppp-2.4.3.orig/pppd/ipcp.c 2007-06-04 13:22:08.478566344 +0200
 +++ ppp-2.4.3/pppd/ipcp.c  2007-06-04 13:22:09.003486544 +0200
-@@ -1846,7 +1846,7 @@
+@@ -1850,7 +1850,7 @@
   */
  if (ipcp_script_state == s_down  ipcp_script_pid == 0) {
ipcp_script_state = s_up;
--  ipcp_script(_PATH_IPUP);
-+  ipcp_script(path_ipup);
+-  ipcp_script(_PATH_IPUP, 0);
++  ipcp_script(path_ipup, 0);
  }
  }
  
-@@ -1896,7 +1896,7 @@
+@@ -1900,7 +1900,7 @@
  /* Execute the ip-down script */
  if (ipcp_script_state == s_up  ipcp_script_pid == 0) {
ipcp_script_state = s_down;
--  ipcp_script(_PATH_IPDOWN);
-+  ipcp_script(path_ipdown);
+-  ipcp_script(_PATH_IPDOWN, 0);
++  ipcp_script(path_ipdown, 0);
  }
  }
  
-@@ -1950,13 +1950,13 @@
+@@ -1954,13 +1954,13 @@
  case s_up:
if (ipcp_fsm[0].state != OPENED) {
ipcp_script_state = s_down;
--  ipcp_script(_PATH_IPDOWN);
-+  ipcp_script(path_ipdown);
+-  ipcp_script(_PATH_IPDOWN, 0);
++  ipcp_script(path_ipdown, 0);
}
break;
  case s_down:
if (ipcp_fsm[0].state == OPENED) {
ipcp_script_state = s_up;
--  ipcp_script(_PATH_IPUP);
-+  ipcp_script(path_ipup);
+-  ipcp_script(_PATH_IPUP, 0);
++  ipcp_script(path_ipup, 0);
}
break;
  }
@@ -40,7 +40,7 @@
 ===
 --- ppp-2.4.3.orig/pppd/main.c 2007-06-04 13:22:08.487564976 +0200
 +++ ppp-2.4.3/pppd/main.c  2007-06-04 13:22:09.004486392 +0200
-@@ -314,6 +314,9 @@
+@@ -315,6 +315,9 @@
  struct protent *protp;
  char numbuf[16];
  
@@ -54,7 +54,7 @@
 ===
 --- ppp-2.4.3.orig/pppd/options.c  2007-06-04 13:22:08.495563760 +0200
 +++ ppp-2.4.3/pppd/options.c   2007-06-04 13:22:09.005486240 +0200
-@@ -108,6 +108,8 @@
+@@ -113,6 +113,8 @@
  bool  tune_kernel;/* may alter kernel settings */
  int   connect_delay = 1000;   /* wait this many ms after connect script */
  int   req_unit = -1;  /* requested interface unit */
@@ -63,7 +63,7 @@
  bool  multilink = 0;  /* Enable multilink operation */
  char  *bundle_name = NULL;/* bundle name for multilink */
  bool  dump_options;   /* print out option values */
-@@ -276,6 +278,13 @@
+@@ -281,6 +283,13 @@
Number of seconds to wait for child processes at exit,
OPT_PRIO },
  
Index: package/ppp/patches/202-atm_fix.patch (deleted)
===
Index: package/ppp/patches/209-compensate_time_change.patch
===
--- package/ppp/patches/209-compensate_time_change.patch(revision 16973)
+++ package/ppp/patches/209-compensate_time_change.patch(working copy)
@@ -18,7 +18,7 @@
  static void setup_signals __P((void));
  static void create_pidfile __P((int pid));
  static void create_linkpidfile __P((int pid));
-@@ -531,6 +533,7 @@
+@@ -532,6 +534,7 @@

[OpenWrt-Devel] [PATCH] openl2tp-1.6 package support

2009-07-26 Thread Vladimir Voronkov
This patch is for packages branch adds integration of openl2tp-1.6 support.
Startup script openl2tp.init has to be changed for common use.
I included it as an example of openl2tp module usage.

Signed-off-by: Vladimir Voronkov voronkovv at mail.ru

---

Index: net/openl2tp/files/openl2tpd.init
===
--- net/openl2tp/files/openl2tpd.init   (revision 0)
+++ net/openl2tp/files/openl2tpd.init   (revision 0)
@@ -0,0 +1,351 @@
+#!/bin/sh /etc/rc.common
+
+START=47
+
+USER='username'
+
+IP='85.21.0.251'
+
+L2TP='openl2tpd'
+OPTS='-u 1701'
+CONF='l2tpconfig'
+RPC='portmap'
+MOD='pppol2tp'
+L2TPRT='/var/run/openl2tpd.route'
+LED='/proc/diag/led/dmz'
+
+replace_default_route() {
+  if [ -r $L2TPRT ]; then
+GW=`cat $L2TPRT | awk '{if ($1 == GW) print $2}'`
+  else
+GW=`route -n 2 /dev/null | awk '{if ($1 == 0.0.0.0  $2 !=
0.0.0.0  $8 ~ eth) print $2}'`
+  fi
+  
+  if [ -z $GW ]; then
+echo failed, no default gateway
+return 1
+  fi
+  
+  TUNIP=`route -n | awk '{if ($2 == 0.0.0.0  $4 ~ H  $8 ~
ppp) print $1}'`
+
+  if [ -z $TUNIP ]; then
+echo failed, no tunnel
+return 1
+  fi
+
+  if ! (route del default gw $GW 2 /dev/null) || ! (route add default
gw $TUNIP 2 /dev/null); then
+echo failed
+return 1
+  fi
+
+  echo done
+}
+
+restore_default_route() {
+  if [ -r $L2TPRT ]; then
+GW=`cat $L2TPRT | awk '{if ($1 == GW) print $2}'`
+  else
+IP=`nslookup tp.corbina.net 2 /dev/null | awk '{if ($1 ~ Address
 $4 ~ corbina.net) print $3}'`
+if [ -z $IP ]; then
+  echo failed
+  return 1
+fi
+GW=`route -n 2 /dev/null | awk -v IP=$IP '{if ($1 == IP  $2 !=
0.0.0.0  $8 ~ eth) print $2}'`
+  fi
+  
+  TUNIP=`route -n 2 /dev/null | awk '{if ($1 == 0.0.0.0  $2 !=
0.0.0.0  $4 ~ G   $8 ~ ppp) print $2}'`
+  if [ -n $TUNIP ]; then
+route del default gw $TUNIP 2 /dev/null
+  fi
+  
+  if [ -z $GW ] || ! route add default gw $GW 2 /dev/null; then
+echo failed
+return 1
+  fi
+  
+  echo done
+}
+
+#IPTABLES=echo iptables
+IPTABLES=iptables
+zone='wan'
+ifname='ppp+'
+
+add_iptables_rules() {
+  $IPTABLES -A input -i $ifname -j zone_${zone}
+  $IPTABLES -I zone_${zone}_MSSFIX 1 -o $ifname -p tcp --tcp-flags
SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
+  $IPTABLES -I zone_${zone}_ACCEPT 1 -o $ifname -j ACCEPT
+  $IPTABLES -I zone_${zone}_DROP 1 -o $ifname -j DROP
+  $IPTABLES -I zone_${zone}_REJECT 1 -o $ifname -j reject
+  $IPTABLES -I zone_${zone}_ACCEPT 1 -i $ifname -j ACCEPT
+  $IPTABLES -I zone_${zone}_DROP 1 -i $ifname -j DROP
+  $IPTABLES -I zone_${zone}_REJECT 1 -i $ifname -j reject
+  $IPTABLES -I zone_${zone}_nat 1 -t nat -o $ifname -j MASQUERADE
+  $IPTABLES -I PREROUTING 1 -t nat -i $ifname -j zone_
${zone}_prerouting
+  $IPTABLES -A forward -i $ifname -j zone_${zone}_forward
+  #iptables -A INPUT -p udp -j ACCEPT --dport 1701 -m state --state NEW
+
+  echo done
+}
+
+del_iptables_rules() {
+  $IPTABLES -D input -i $ifname -j zone_${zone}
+  $IPTABLES -D zone_${zone}_MSSFIX -o $ifname -p tcp --tcp-flags
SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
+  $IPTABLES -D zone_${zone}_ACCEPT -o $ifname -j ACCEPT
+  $IPTABLES -D zone_${zone}_DROP -o $ifname -j DROP
+  $IPTABLES -D zone_${zone}_REJECT -o $ifname -j reject
+  $IPTABLES -D zone_${zone}_ACCEPT -i $ifname -j ACCEPT
+  $IPTABLES -D zone_${zone}_DROP -i $ifname -j DROP
+  $IPTABLES -D zone_${zone}_REJECT -i $ifname -j reject
+  $IPTABLES -D zone_${zone}_nat -t nat -o $ifname -j MASQUERADE
+  $IPTABLES -D PREROUTING -t nat -i $ifname -j zone_
${zone}_prerouting
+  $IPTABLES -D forward -i $ifname -j zone_${zone}_forward
+
+  echo done
+}
+
+add_l2tp_route() {
+  if [ -r $L2TPRT ]; then
+rm -f $L2TPRT
+  fi
+  if [ -z $IP ]; then
+IP=`nslookup tp.corbina.net 2 /dev/null | awk '{if ($1 ~ Address
 $4 ~ corbina.net) print $3}'`
+if [ -z $IP ]; then
+  echo failed, no IP for L2TP server.
+  return 1
+fi
+  fi
+
+  RT=`route -n 2 /dev/null | awk -v IP=$IP '{if ($1 == IP  $2 !=
0.0.0.0  $8 ~ eth) print $2}'`
+  if [ -n $RT ]; then
+echo IP $IP  $L2TPRT
+echo GW $RT  $L2TPRT
+echo ok, route is already created.
+return
+  fi
+
+  GW=`route -n 2 /dev/null | awk '{if ($1 == 0.0.0.0  $2 !=
0.0.0.0  $8 ~ eth) print $2}'`
+  if [ -z $GW ]; then
+echo failed, no default gateway.
+return 1
+  fi
+
+  route add $IP gw $GW
+  RT=`route -n 2 /dev/null | awk -v IP=$IP '{if ($1 == IP  $2 !=
0.0.0.0  $8 ~ eth) print $2}'`
+  if [ -z $RT ]; then
+echo failed
+return 1
+  fi
+
+  echo IP $IP  $L2TPRT
+  echo GW $GW  $L2TPRT
+  echo done
+}
+
+del_l2tp_route() {
+  if [ -r $L2TPRT ]; then
+IP=`cat $L2TPRT | awk '{if ($1 == IP) print $2}'`
+GW=`cat $L2TPRT | awk '{if ($1 == GW) print $2}'`
+rm -f $L2TPRT
+  else
+echo -n using hostname... 
+if [ -z $IP ]; then
+  IP=`nslookup tp.corbina.net 2 /dev/null | awk '{if ($1 ~
Address  $4 ~ corbina.net) print $3}'`
+  if [ -z $IP ]; then
+echo 

[OpenWrt-Devel] Bump gpsd version and use uclibc++

2009-07-26 Thread Roberto Riggio
Changes:

 - use version 2.39
 - use uclibc++
 - remove obsolete patches

Signed-off-by: Roberto Riggio roberto.rig...@create-net.org

--

Index: gpsd/patches/100-reduce-size.patch
===
--- gpsd/patches/100-reduce-size.patch  (revision 16991)
+++ gpsd/patches/100-reduce-size.patch  (working copy)
@@ -1,26 +0,0 @@
 a/gpsd.c
-+++ b/gpsd.c
-@@ -42,6 +42,7 @@
- #include locale.h
- #endif
- 
-+#undef DBUS_ENABLE
- #ifdef DBUS_ENABLE
- #include gpsd_dbus.h
- #endif
-@@ -297,6 +298,7 @@
-  * This array fills from the bottom, so as an extreme case you could
-  * reduce LIMITED_MAX_DEVICES to 1.
-  */
-+#define LIMITED_MAX_DEVICES 1
- #ifdef LIMITED_MAX_DEVICES
- #define MAXDEVICESLIMITED_MAX_DEVICES
- #else
-@@ -304,6 +306,7 @@
- #define MAXDEVICES4
- #endif
- 
-+#define LIMITED_MAX_CLIENTS 16
- #ifdef LIMITED_MAX_CLIENTS
- #define MAXSUBSCRIBERS LIMITED_MAX_CLIENTS
- #else
Index: gpsd/patches/101-trimble.patch
===
--- gpsd/patches/101-trimble.patch  (revision 16991)
+++ gpsd/patches/101-trimble.patch  (working copy)
@@ -1,40 +0,0 @@
 a/drivers.c
-+++ b/drivers.c
-@@ -202,9 +202,13 @@
-   /* probe for the FV-18 -- expect $PFEC,GPint followed by data */
-   (void)nmea_send(session-gpsdata.gps_fd, $PFEC,GPint);
-   break;
-+case 3:
-+  /* probe for the Trimble Copernicus */
-+  (void)nmea_send(session-gpsdata.gps_fd, $PTNLSNM,0139,01);
-+  break;
- #endif /* NMEA_ENABLE */
- #ifdef EVERMORE_ENABLE
--case 3:
-+case 4:
-   /* Enable checksum and GGA(1s), GLL(0s), GSA(1s), GSV(1s), RMC(1s), 
VTG(0s), PEMT101(1s) */
-   /* EverMore will reply with: \x10\x02\x04\x38\x8E\xC6\x10\x03 */
-   (void)gpsd_write(session,
-@@ -212,19 +216,19 @@
-   break;
- #endif /* EVERMORE_ENABLE */
- #ifdef ITRAX_ENABLE
--case 4:
-+case 5:
-   /* probe for iTrax, looking for $PFST,OK */
-   (void)nmea_send(session-gpsdata.gps_fd, $PFST);
-   break;
- #endif /* ITRAX_ENABLE */
- #ifdef GPSCLOCK_ENABLE
--case 5:
-+case 6:
-   /* probe for Furuno Electric GH-79L4-N (GPSClock) */
-   (void)nmea_send(session-gpsdata.gps_fd, $PFEC,GPsrq);
-   break;
- #endif /* GPSCLOCK_ENABLE */
- #ifdef ASHTECH_ENABLE
--case 6:
-+case 7:
-   /* probe for Ashtech -- expect $PASHR */
-   (void)nmea_send(session-gpsdata.gps_fd, $PASHQ,RID);
-   break;
Index: gpsd/Makefile
===
--- gpsd/Makefile   (revision 16991)
+++ gpsd/Makefile   (working copy)
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gpsd
-PKG_VERSION:=2.37
-PKG_RELEASE:=3
+PKG_VERSION:=2.39
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.berlios.de/gpsd/
-PKG_MD5SUM:=6c96cc0b2df0279cb7baac1ebc5881d3
+PKG_MD5SUM:=3db437196a6840c252fca99b6c19d4d0
 
-PKG_FIXUP = libtool
+PKG_FIXUP:=libtool-ucxx
 
 PKG_BUILD_DEPENDS=libncurses
 
@@ -24,31 +24,30 @@
 define Package/gpsd
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libpthread +libstdcpp
+  DEPENDS:=+libpthread +uclibcxx
   TITLE:=An interface daemon for GPS receivers
   URL:=http://gpsd.berlios.de/
 endef
 
 CONFIGURE_ARGS += \
-   --disable-dbus \
-   --disable-python \
-   --disable-sirf \
-   --disable-tsip \
-   --disable-fv18 \
-   --disable-tripmate \
-   --disable-earthmate \
-   --disable-itrax \
-   --disable-navcom \
-   --disable-garmin \
-   --disable-ubx \
-   --disable-evermore \
-   --disable-rtcm104 \
-   --disable-ntrip \
-   --disable-ntpshm \
-   --disable-pps \
-   --disable-reconfigure \
-   --without-x \
+--disable-dbus \
+--disable-tsip \
+--disable-fv18 \
+--disable-tripmate \
+--disable-earthmate \
+--disable-itrax \
+--disable-navcom \
+--disable-ubx \
+--disable-evermore \
+--disable-ntrip \
+--without-x \
 
+CONFIGURE_VARS += \
+   CXXFLAGS=CXXFLAGS -fno-builtin -fno-rtti -nostdinc++  \
+   CPPFLAGS=CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ 
-I$(LINUX_DIR)/include \
+   LDFLAGS=LDFLAGS \
+   LIBS=-nodefaultlibs -luClibc++ -lm -lgcc \
+
 define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR=$(PKG_INSTALL_DIR) \
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] openl2tp-1.6 package support

2009-07-26 Thread Florian Fainelli
Le Sunday 26 July 2009 10:52:24 Vladimir Voronkov, vous avez écrit :
 This patch is for packages branch adds integration of openl2tp-1.6 support.
 Startup script openl2tp.init has to be changed for common use.
 I included it as an example of openl2tp module usage.

Your mailer inserted linebreaks for spaces, so the patch is unusable. Please 
resubmit with
your mailer fixed. Also, the current init script has a huge number of 
hardcoded values and
this is not acceptable for something meant to be generic.

Create a configuration file in /etc/config/openl2tpd which contains the 
following items (you already though of them):
 - USER
 - IP
 - OPTS
 - L2TPRT
 - LED

Then load your configuration with UCI just like other packages do. I applied 
the part which adds openl2tpd to packages so that you can resubmit an 
incremental patch adding the init script only.

Thanks !


 Signed-off-by: Vladimir Voronkov voronkovv at mail.ru

 ---

 Index: net/openl2tp/files/openl2tpd.init
 ===
 --- net/openl2tp/files/openl2tpd.init (revision 0)
 +++ net/openl2tp/files/openl2tpd.init (revision 0)
 @@ -0,0 +1,351 @@
 +#!/bin/sh /etc/rc.common
 +
 +START=47
 +
 +USER='username'
 +
 +IP='85.21.0.251'
 +
 +L2TP='openl2tpd'
 +OPTS='-u 1701'
 +CONF='l2tpconfig'
 +RPC='portmap'
 +MOD='pppol2tp'
 +L2TPRT='/var/run/openl2tpd.route'
 +LED='/proc/diag/led/dmz'
 +
 +replace_default_route() {
 +  if [ -r $L2TPRT ]; then
 +GW=`cat $L2TPRT | awk '{if ($1 == GW) print $2}'`
 +  else
 +GW=`route -n 2 /dev/null | awk '{if ($1 == 0.0.0.0  $2 !=
 0.0.0.0  $8 ~ eth) print $2}'`
 +  fi
 +
 +  if [ -z $GW ]; then
 +echo failed, no default gateway
 +return 1
 +  fi
 +
 +  TUNIP=`route -n | awk '{if ($2 == 0.0.0.0  $4 ~ H  $8 ~
 ppp) print $1}'`
 +
 +  if [ -z $TUNIP ]; then
 +echo failed, no tunnel
 +return 1
 +  fi
 +
 +  if ! (route del default gw $GW 2 /dev/null) || ! (route add default
 gw $TUNIP 2 /dev/null); then
 +echo failed
 +return 1
 +  fi
 +
 +  echo done
 +}
 +
 +restore_default_route() {
 +  if [ -r $L2TPRT ]; then
 +GW=`cat $L2TPRT | awk '{if ($1 == GW) print $2}'`
 +  else
 +IP=`nslookup tp.corbina.net 2 /dev/null | awk '{if ($1 ~ Address
  $4 ~ corbina.net) print $3}'`
 +if [ -z $IP ]; then
 +  echo failed
 +  return 1
 +fi
 +GW=`route -n 2 /dev/null | awk -v IP=$IP '{if ($1 == IP  $2 !=
 0.0.0.0  $8 ~ eth) print $2}'`
 +  fi
 +
 +  TUNIP=`route -n 2 /dev/null | awk '{if ($1 == 0.0.0.0  $2 !=
 0.0.0.0  $4 ~ G   $8 ~ ppp) print $2}'`
 +  if [ -n $TUNIP ]; then
 +route del default gw $TUNIP 2 /dev/null
 +  fi
 +
 +  if [ -z $GW ] || ! route add default gw $GW 2 /dev/null; then
 +echo failed
 +return 1
 +  fi
 +
 +  echo done
 +}
 +
 +#IPTABLES=echo iptables
 +IPTABLES=iptables
 +zone='wan'
 +ifname='ppp+'
 +
 +add_iptables_rules() {
 +  $IPTABLES -A input -i $ifname -j zone_${zone}
 +  $IPTABLES -I zone_${zone}_MSSFIX 1 -o $ifname -p tcp --tcp-flags
 SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
 +  $IPTABLES -I zone_${zone}_ACCEPT 1 -o $ifname -j ACCEPT
 +  $IPTABLES -I zone_${zone}_DROP 1 -o $ifname -j DROP
 +  $IPTABLES -I zone_${zone}_REJECT 1 -o $ifname -j reject
 +  $IPTABLES -I zone_${zone}_ACCEPT 1 -i $ifname -j ACCEPT
 +  $IPTABLES -I zone_${zone}_DROP 1 -i $ifname -j DROP
 +  $IPTABLES -I zone_${zone}_REJECT 1 -i $ifname -j reject
 +  $IPTABLES -I zone_${zone}_nat 1 -t nat -o $ifname -j MASQUERADE
 +  $IPTABLES -I PREROUTING 1 -t nat -i $ifname -j zone_
 ${zone}_prerouting
 +  $IPTABLES -A forward -i $ifname -j zone_${zone}_forward
 +  #iptables -A INPUT -p udp -j ACCEPT --dport 1701 -m state --state NEW
 +
 +  echo done
 +}
 +
 +del_iptables_rules() {
 +  $IPTABLES -D input -i $ifname -j zone_${zone}
 +  $IPTABLES -D zone_${zone}_MSSFIX -o $ifname -p tcp --tcp-flags
 SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
 +  $IPTABLES -D zone_${zone}_ACCEPT -o $ifname -j ACCEPT
 +  $IPTABLES -D zone_${zone}_DROP -o $ifname -j DROP
 +  $IPTABLES -D zone_${zone}_REJECT -o $ifname -j reject
 +  $IPTABLES -D zone_${zone}_ACCEPT -i $ifname -j ACCEPT
 +  $IPTABLES -D zone_${zone}_DROP -i $ifname -j DROP
 +  $IPTABLES -D zone_${zone}_REJECT -i $ifname -j reject
 +  $IPTABLES -D zone_${zone}_nat -t nat -o $ifname -j MASQUERADE
 +  $IPTABLES -D PREROUTING -t nat -i $ifname -j zone_
 ${zone}_prerouting
 +  $IPTABLES -D forward -i $ifname -j zone_${zone}_forward
 +
 +  echo done
 +}
 +
 +add_l2tp_route() {
 +  if [ -r $L2TPRT ]; then
 +rm -f $L2TPRT
 +  fi
 +  if [ -z $IP ]; then
 +IP=`nslookup tp.corbina.net 2 /dev/null | awk '{if ($1 ~ Address
  $4 ~ corbina.net) print $3}'`
 +if [ -z $IP ]; then
 +  echo failed, no IP for L2TP server.
 +  return 1
 +fi
 +  fi
 +
 +  RT=`route -n 2 /dev/null | awk -v IP=$IP '{if ($1 == IP  $2 !=
 0.0.0.0  $8 ~ eth) print $2}'`
 +  if [ -n $RT ]; then
 +echo IP $IP  $L2TPRT
 +echo GW $RT  $L2TPRT
 +echo ok, route is already created.
 +return
 +  fi

Re: [OpenWrt-Devel] [PATCH] ppp switch to version 2.4.4

2009-07-26 Thread Florian Fainelli
Hi Validimir,

Le Sunday 26 July 2009 10:45:38 Vladimir Voronkov, vous avez écrit :
 This patch changes version of ppp to 2.4.4, which is required for
 openl2tp-1.6 to work. Patch with integration of openl2tp will be sent in my
 next email.

 All current patches to ppp-2.4.3 are changed according to a new version of
 ppp, some of them are removed (namely 102, 202, 205, 207) because they
 already exist in ppp-2.4.4.

ppp-2.4.4 has been updated a while already, so I have only applied the 
kmod-pppol2tp part of this patch. Also PPP over L2TP only appeared in 2.6.28 
therefore the module is restricted to the kernel versions it can be built on.


 Also kmod-pppol2tp kernel module has been added in configuration.

 Signed-off-by: Vladimir Voronkov voronkovv at mail.ru

 ---

 Index: package/kernel/modules/network.mk
 ===
 --- package/kernel/modules/network.mk (revision 16973)
 +++ package/kernel/modules/network.mk (working copy)
 @@ -367,6 +367,7 @@
FILES:= \
   $(LINUX_DIR)/drivers/net/pppoe.$(LINUX_KMOD_SUFFIX) \
   $(LINUX_DIR)/drivers/net/pppox.$(LINUX_KMOD_SUFFIX)
 +  AUTOLOAD:=$(call AutoLoad,40,pppox pppoe)
  endef

  define KernelPackage/pppoe/description
 @@ -376,6 +377,22 @@
  $(eval $(call KernelPackage,pppoe))


 +define KernelPackage/pppol2tp
 +  SUBMENU:=$(NETWORK_SUPPORT_MENU)
 +  TITLE:=PPPoL2TP support
 +  DEPENDS:=kmod-ppp +kmod-pppoe
 +  KCONFIG:=CONFIG_PPPOL2TP
 +  FILES:=$(LINUX_DIR)/drivers/net/pppol2tp.$(LINUX_KMOD_SUFFIX)
 +  AUTOLOAD:=$(call AutoLoad,40,pppol2tp)
 +endef
 +
 +define KernelPackage/pppol2tp/description
 + Kernel modules for PPPoL2TP (PPP over L2TP) support
 +endef
 +
 +$(eval $(call KernelPackage,pppol2tp))
 +
 +
  define KernelPackage/pppoa
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=PPPoA support
 Index: package/ppp/patches/101-debian_ip-up_option.patch
 ===
 --- package/ppp/patches/101-debian_ip-up_option.patch (revision 16973)
 +++ package/ppp/patches/101-debian_ip-up_option.patch (working copy)
 @@ -2,37 +2,37 @@
  ===
  --- ppp-2.4.3.orig/pppd/ipcp.c   2007-06-04 13:22:08.478566344 +0200
  +++ ppp-2.4.3/pppd/ipcp.c2007-06-04 13:22:09.003486544 +0200
 -@@ -1846,7 +1846,7 @@
 +@@ -1850,7 +1850,7 @@
*/
   if (ipcp_script_state == s_down  ipcp_script_pid == 0) {
   ipcp_script_state = s_up;
 --ipcp_script(_PATH_IPUP);
 -+ipcp_script(path_ipup);
 +-ipcp_script(_PATH_IPUP, 0);
 ++ipcp_script(path_ipup, 0);
   }
   }

 -@@ -1896,7 +1896,7 @@
 +@@ -1900,7 +1900,7 @@
   /* Execute the ip-down script */
   if (ipcp_script_state == s_up  ipcp_script_pid == 0) {
   ipcp_script_state = s_down;
 --ipcp_script(_PATH_IPDOWN);
 -+ipcp_script(path_ipdown);
 +-ipcp_script(_PATH_IPDOWN, 0);
 ++ipcp_script(path_ipdown, 0);
   }
   }

 -@@ -1950,13 +1950,13 @@
 +@@ -1954,13 +1954,13 @@
   case s_up:
   if (ipcp_fsm[0].state != OPENED) {
   ipcp_script_state = s_down;
 --ipcp_script(_PATH_IPDOWN);
 -+ipcp_script(path_ipdown);
 +-ipcp_script(_PATH_IPDOWN, 0);
 ++ipcp_script(path_ipdown, 0);
   }
   break;
   case s_down:
   if (ipcp_fsm[0].state == OPENED) {
   ipcp_script_state = s_up;
 --ipcp_script(_PATH_IPUP);
 -+ipcp_script(path_ipup);
 +-ipcp_script(_PATH_IPUP, 0);
 ++ipcp_script(path_ipup, 0);
   }
   break;
   }
 @@ -40,7 +40,7 @@
  ===
  --- ppp-2.4.3.orig/pppd/main.c   2007-06-04 13:22:08.487564976 +0200
  +++ ppp-2.4.3/pppd/main.c2007-06-04 13:22:09.004486392 +0200
 -@@ -314,6 +314,9 @@
 +@@ -315,6 +315,9 @@
   struct protent *protp;
   char numbuf[16];

 @@ -54,7 +54,7 @@
  ===
  --- ppp-2.4.3.orig/pppd/options.c2007-06-04 13:22:08.495563760 +0200
  +++ ppp-2.4.3/pppd/options.c 2007-06-04 13:22:09.005486240 +0200
 -@@ -108,6 +108,8 @@
 +@@ -113,6 +113,8 @@
   booltune_kernel;/* may alter kernel settings */
   int connect_delay = 1000;   /* wait this many ms after connect script */
   int req_unit = -1;  /* requested interface unit */
 @@ -63,7 +63,7 @@
   boolmultilink = 0;  /* Enable multilink operation */
   char*bundle_name = NULL;/* bundle name for multilink */
   booldump_options;   /* print out option values */
 -@@ -276,6 +278,13 @@
 +@@ -281,6 +283,13 @@
 Number of seconds to wait for child processes at exit,
 OPT_PRIO },

 Index: package/ppp/patches/202-atm_fix.patch (deleted)
 ===
 Index: package/ppp/patches/209-compensate_time_change.patch
 

Re: [OpenWrt-Devel] [patch] liboping

2009-07-26 Thread Florian Fainelli
Hi Daniel,

Le Thursday 23 July 2009 15:17:19 poelzi, vous avez écrit :
 hi,

 this adds liboping package. i'm doing a collectd update and they do not
 ship with liboping anymore, so i created a liboping package which is
 better anyways :-)

Added in changeset 16998, thanks !


 regards
  daniel



-- 
Best regards, Florian Fainelli
Email: flor...@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
---


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


Re: [OpenWrt-Devel] [PATCH] Add btrfs module

2009-07-26 Thread Florian Fainelli
Hi Benjamin,

Le Friday 24 July 2009 07:12:05 Benjamin Cama, vous avez écrit :
 Hi,

 This patch adds the btrfs (http://btrfs.wiki.kernel.org/) filesystem
 module in the kernel options. I also have btrfs-progs on the way.

Applied in r16999, thanks !


 Benjamin
 --
 Index: package/kernel/modules/fs.mk
 ===
 --- package/kernel/modules/fs.mk  (révision 16963)
 +++ package/kernel/modules/fs.mk  (copie de travail)
 @@ -357,6 +357,30 @@
  $(eval $(call KernelPackage,fs-xfs))


 +define KernelPackage/fs-btrfs
 +  SUBMENU:=$(FS_MENU)
 +  TITLE:=BTRFS filesystem support
 +  KCONFIG:=\
 + CONFIG_CRYPTO_CRC32C \
 + CONFIG_LIBCRC32C \
 + CONFIG_BTRFS_FS \
 + CONFIG_BTRFS_FS_POSIX_ACL=n
 +  # for crc32c
 +  DEPENDS:= +kmod-crypto-core
 +  FILES:=\
 + $(LINUX_DIR)/crypto/crc32c.$(LINUX_KMOD_SUFFIX) \
 + $(LINUX_DIR)/lib/libcrc32c.$(LINUX_KMOD_SUFFIX) \
 + $(LINUX_DIR)/fs/btrfs/btrfs.$(LINUX_KMOD_SUFFIX)
 +  AUTOLOAD:=$(call AutoLoad,30,crc32c libcrc32c btrfs)
 +endef
 +
 +define KernelPackage/fs-btrfs/description
 + Kernel module for BTRFS support
 +endef
 +
 +$(eval $(call KernelPackage,fs-btrfs))
 +
 +
  define KernelPackage/nls-base
SUBMENU:=$(FS_MENU)
TITLE:=Native Language Support


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



-- 
Best regards, Florian Fainelli
Email: flor...@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
---


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


Re: [OpenWrt-Devel] [PATCH] Btrfs utilities package

2009-07-26 Thread Florian Fainelli
Hi Benjamin,

Le Friday 24 July 2009 07:25:01 Benjamin Cama, vous avez écrit :
 Hi,

 Here is a patch to add a btrfs utilities package to OpenWRT.

Added in r17000, thanks !


 Benjamin
 --
 Index: btrfs-progs/patches/001-Makefile-gcc-fix
 ===
 --- btrfs-progs/patches/001-Makefile-gcc-fix  (revision 0)
 +++ btrfs-progs/patches/001-Makefile-gcc-fix  (revision 0)
 @@ -0,0 +1,53 @@
 +diff --git a/Makefile b/Makefile
 +index 3349079..cf5392f 100644
 +--- a/Makefile
  b/Makefile
 +@@ -36,37 +36,37 @@ version:
 + bash version.sh
 +
 + btrfsctl: $(objects) btrfsctl.o
 +-gcc $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS)
 ++$(CC) $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS)
 +
 + btrfs-vol: $(objects) btrfs-vol.o
 +-gcc $(CFLAGS) -o btrfs-vol btrfs-vol.o $(objects) $(LDFLAGS) $(LIBS)
 ++$(CC) $(CFLAGS) -o btrfs-vol btrfs-vol.o $(objects) $(LDFLAGS) $(LIBS)
 +
 + btrfs-show: $(objects) btrfs-show.o
 +-gcc $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS)
 ++$(CC) $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS)
 +
 + btrfsck: $(objects) btrfsck.o bit-radix.o
 +-gcc $(CFLAGS) -o btrfsck btrfsck.o $(objects) bit-radix.o $(LDFLAGS)
 $(LIBS) ++$(CC) $(CFLAGS) -o btrfsck btrfsck.o $(objects) bit-radix.o
 $(LDFLAGS) $(LIBS) +
 + mkfs.btrfs: $(objects) mkfs.o
 +-gcc $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS)
 ++$(CC) $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS)
 +
 + btrfs-debug-tree: $(objects) debug-tree.o
 +-gcc $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o $(LDFLAGS)
 $(LIBS) ++$(CC) $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o
 $(LDFLAGS) $(LIBS) +
 + btrfstune: $(objects) btrfstune.o
 +-gcc $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(LDFLAGS) $(LIBS)
 ++$(CC) $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(LDFLAGS) $(LIBS)
 +
 + btrfs-image: $(objects) btrfs-image.o
 +-gcc $(CFLAGS) -o btrfs-image $(objects) btrfs-image.o -lpthread -lz
 $(LDFLAGS) $(LIBS) ++ $(CC) $(CFLAGS) -o btrfs-image $(objects)
 btrfs-image.o -lpthread -lz $(LDFLAGS) $(LIBS) +
 + dir-test: $(objects) dir-test.o
 +-gcc $(CFLAGS) -o dir-test $(objects) dir-test.o $(LDFLAGS) $(LIBS)
 ++$(CC) $(CFLAGS) -o dir-test $(objects) dir-test.o $(LDFLAGS) $(LIBS)
 +
 + quick-test: $(objects) quick-test.o
 +-gcc $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS)
 ++$(CC) $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS)
 +
 + convert: $(objects) convert.o
 +-gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS)
 $(LIBS) ++$(CC) $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs
 $(LDFLAGS) $(LIBS) +
 + clean :
 + rm -f $(progs) cscope.out *.o .*.d btrfs-convert
 Index: btrfs-progs/Makefile
 ===
 --- btrfs-progs/Makefile  (revision 0)
 +++ btrfs-progs/Makefile  (revision 0)
 @@ -0,0 +1,55 @@
 +#
 +# Copyright (C) 2009 OpenWrt.org
 +#
 +# This is free software, licensed under the GNU General Public License v2.
 +# See /LICENSE for more information.
 +#
 +# $Id$
 +
 +include $(TOPDIR)/rules.mk
 +
 +PKG_NAME:=btrfs-progs
 +PKG_VERSION:=0.18
 +PKG_RELEASE:=1
 +
 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 +PKG_SOURCE_URL:=http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/
 +PKG_MD5SUM:=1dfe59152a558eb2f79a4c398de6c4ef
 +
 +include $(INCLUDE_DIR)/package.mk
 +
 +define Package/btrfs-progs
 +  SECTION:=utils
 +  CATEGORY:=Utilities
 +  DEPENDS:=+libuuid
 +  TITLE:=Btrfs filesystems utilities
 +  URL:=http://btrfs.wiki.kernel.org/
 +endef
 +
 +define Package/btrfs-progs/description
 + Btrfs is a new copy on write filesystem for Linux aimed at implementing
 + advanced features while focusing on fault tolerance, repair and easy
 + administration. Initially developed by Oracle, Btrfs is licensed under
 the + GPL and open for contribution from anyone.
 +endef
 +
 +progs = btrfsctl btrfsck mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol
 \ +   btrfstune btrfs-image
 +
 +define Build/Compile
 + $(MAKE) -C $(PKG_BUILD_DIR) \
 + CC=$(TARGET_CC) \
 + CFLAGS=$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) \
 + LDFLAGS=$(TARGET_LDFLAGS) \
 + prefix=/usr \
 + DESTDIR=$(PKG_INSTALL_DIR) \
 + all install
 +endef
 +
 +define Package/btrfs-progs/install
 + $(INSTALL_DIR) $(1)/usr/bin
 + $(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs))
 $(1)/usr/bin/ +endef
 +
 +$(eval $(call BuildPackage,btrfs-progs))
 +


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



-- 
Best regards, Florian Fainelli
Email: flor...@openwrt.org
Web: http://openwrt.org
IRC: [florian] on 

Re: [OpenWrt-Devel] Bump gpsd version and use uclibc++

2009-07-26 Thread Florian Fainelli
Le Sunday 26 July 2009 12:08:10 Roberto Riggio, vous avez écrit :
 Changes:

  - use version 2.39
  - use uclibc++
  - remove obsolete patches

 Signed-off-by: Roberto Riggio roberto.rig...@create-net.org

Applied in r17001, thanks !


 --

 Index: gpsd/patches/100-reduce-size.patch
 ===
 --- gpsd/patches/100-reduce-size.patch(revision 16991)
 +++ gpsd/patches/100-reduce-size.patch(working copy)
 @@ -1,26 +0,0 @@
  a/gpsd.c
 -+++ b/gpsd.c
 -@@ -42,6 +42,7 @@
 - #include locale.h
 - #endif
 -
 -+#undef DBUS_ENABLE
 - #ifdef DBUS_ENABLE
 - #include gpsd_dbus.h
 - #endif
 -@@ -297,6 +298,7 @@
 -  * This array fills from the bottom, so as an extreme case you could
 -  * reduce LIMITED_MAX_DEVICES to 1.
 -  */
 -+#define LIMITED_MAX_DEVICES 1
 - #ifdef LIMITED_MAX_DEVICES
 - #define MAXDEVICES  LIMITED_MAX_DEVICES
 - #else
 -@@ -304,6 +306,7 @@
 - #define MAXDEVICES  4
 - #endif
 -
 -+#define LIMITED_MAX_CLIENTS 16
 - #ifdef LIMITED_MAX_CLIENTS
 - #define MAXSUBSCRIBERS LIMITED_MAX_CLIENTS
 - #else
 Index: gpsd/patches/101-trimble.patch
 ===
 --- gpsd/patches/101-trimble.patch(revision 16991)
 +++ gpsd/patches/101-trimble.patch(working copy)
 @@ -1,40 +0,0 @@
  a/drivers.c
 -+++ b/drivers.c
 -@@ -202,9 +202,13 @@
 - /* probe for the FV-18 -- expect $PFEC,GPint followed by data */
 - (void)nmea_send(session-gpsdata.gps_fd, $PFEC,GPint);
 - break;
 -+case 3:
 -+/* probe for the Trimble Copernicus */
 -+(void)nmea_send(session-gpsdata.gps_fd, $PTNLSNM,0139,01);
 -+break;
 - #endif /* NMEA_ENABLE */
 - #ifdef EVERMORE_ENABLE
 --case 3:
 -+case 4:
 - /* Enable checksum and GGA(1s), GLL(0s), GSA(1s), GSV(1s), RMC(1s),
 VTG(0s), PEMT101(1s) */ - /* EverMore will reply with:
 \x10\x02\x04\x38\x8E\xC6\x10\x03 */ - (void)gpsd_write(session,
 -@@ -212,19 +216,19 @@
 - break;
 - #endif /* EVERMORE_ENABLE */
 - #ifdef ITRAX_ENABLE
 --case 4:
 -+case 5:
 - /* probe for iTrax, looking for $PFST,OK */
 - (void)nmea_send(session-gpsdata.gps_fd, $PFST);
 - break;
 - #endif /* ITRAX_ENABLE */
 - #ifdef GPSCLOCK_ENABLE
 --case 5:
 -+case 6:
 - /* probe for Furuno Electric GH-79L4-N (GPSClock) */
 - (void)nmea_send(session-gpsdata.gps_fd, $PFEC,GPsrq);
 - break;
 - #endif /* GPSCLOCK_ENABLE */
 - #ifdef ASHTECH_ENABLE
 --case 6:
 -+case 7:
 - /* probe for Ashtech -- expect $PASHR */
 - (void)nmea_send(session-gpsdata.gps_fd, $PASHQ,RID);
 - break;
 Index: gpsd/Makefile
 ===
 --- gpsd/Makefile (revision 16991)
 +++ gpsd/Makefile (working copy)
 @@ -8,14 +8,14 @@
  include $(TOPDIR)/rules.mk

  PKG_NAME:=gpsd
 -PKG_VERSION:=2.37
 -PKG_RELEASE:=3
 +PKG_VERSION:=2.39
 +PKG_RELEASE:=1

  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  PKG_SOURCE_URL:=http://download.berlios.de/gpsd/
 -PKG_MD5SUM:=6c96cc0b2df0279cb7baac1ebc5881d3
 +PKG_MD5SUM:=3db437196a6840c252fca99b6c19d4d0

 -PKG_FIXUP = libtool
 +PKG_FIXUP:=libtool-ucxx

  PKG_BUILD_DEPENDS=libncurses

 @@ -24,31 +24,30 @@
  define Package/gpsd
SECTION:=net
CATEGORY:=Network
 -  DEPENDS:=+libpthread +libstdcpp
 +  DEPENDS:=+libpthread +uclibcxx
TITLE:=An interface daemon for GPS receivers
URL:=http://gpsd.berlios.de/
  endef

  CONFIGURE_ARGS += \
 - --disable-dbus \
 - --disable-python \
 - --disable-sirf \
 - --disable-tsip \
 - --disable-fv18 \
 - --disable-tripmate \
 - --disable-earthmate \
 - --disable-itrax \
 - --disable-navcom \
 - --disable-garmin \
 - --disable-ubx \
 - --disable-evermore \
 - --disable-rtcm104 \
 - --disable-ntrip \
 - --disable-ntpshm \
 - --disable-pps \
 - --disable-reconfigure \
 - --without-x \
 +--disable-dbus \
 +--disable-tsip \
 +--disable-fv18 \
 +--disable-tripmate \
 +--disable-earthmate \
 +--disable-itrax \
 +--disable-navcom \
 +--disable-ubx \
 +--disable-evermore \
 +--disable-ntrip \
 +--without-x \

 +CONFIGURE_VARS += \
 + CXXFLAGS=CXXFLAGS -fno-builtin -fno-rtti -nostdinc++  \
 + CPPFLAGS=CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++
 -I$(LINUX_DIR)/include \ +   LDFLAGS=LDFLAGS \
 + LIBS=-nodefaultlibs -luClibc++ -lm -lgcc \
 +
  define Build/Compile
   $(MAKE) -C $(PKG_BUILD_DIR) \
   DESTDIR=$(PKG_INSTALL_DIR) \
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel



-- 
Best regards, Florian Fainelli
Email: flor...@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
---


signature.asc
Description: This is a 

Re: [OpenWrt-Devel] [PATCH] Update mjpg-streamer

2009-07-26 Thread Florian Fainelli
Le Sunday 26 July 2009 12:10:43 roberto.rig...@create-net.org, vous avez 
écrit :
 Changes:

  - use version
  - add config and init script
  - add hotplug support (start the video server qhen the usb cam is plugged)

Applied in r17002. Thanks !



 Signed-off-by: roberto.rig...@create-net.org

 --

 Index: mjpg-streamer/files/mjpg-streamer.init
 ===
 --- mjpg-streamer/files/mjpg-streamer.init(revision 0)
 +++ mjpg-streamer/files/mjpg-streamer.init(revision 0)
 @@ -0,0 +1,23 @@
 +#!/bin/sh /etc/rc.common
 +# Copyright (C) 2009 OpenWrt.org
 +START=50
 +
 +SSD=start-stop-daemon
 +NAME=mjpg_streamer
 +PIDF=/var/run/$NAME.pid
 +PROG=/usr/bin/$NAME
 +
 +start() {
 + config_load mjpg-streamer
 + config_get device core device
 + config_get resolution core resolution
 + config_get fps core fps
 + config_get port core port
 + config_get_bool enabled core enabled
 + [ $enabled -gt 0 -a -c $device ]  sleep 3  $SSD -S -m -p $PIDF -q -x
 $PROG -- --input input_uvc.so --device $device --fps $fps --resolution
 $resolution --output output_http.so --port $port  +}
 +
 +stop() {
 + $SSD -K -p $PIDF
 +}
 +

 Property changes on: mjpg-streamer/files/mjpg-streamer.init
 ___
 Added: svn:executable
+ *

 Index: mjpg-streamer/files/mjpg-streamer.config
 ===
 --- mjpg-streamer/files/mjpg-streamer.config  (revision 0)
 +++ mjpg-streamer/files/mjpg-streamer.config  (revision 0)
 @@ -0,0 +1,6 @@
 +config mjpg-streamer core
 + option device   /dev/video0
 + option resolution   640x480
 + option fps  5
 + option port 8080
 + option enabled  true
 Index: mjpg-streamer/files/mjpg-streamer.hotplug
 ===
 --- mjpg-streamer/files/mjpg-streamer.hotplug (revision 0)
 +++ mjpg-streamer/files/mjpg-streamer.hotplug (revision 0)
 @@ -0,0 +1,11 @@
 +case $ACTION in
 + add)
 + # start process
 + /etc/init.d/mjpg-streamer start
 + ;;
 + remove)
 + # stop process
 + /etc/init.d/mjpg-streamer stop
 + ;;
 +esac
 +
 Index: mjpg-streamer/patches/001-no_input_testpictures.patch
 ===
 --- mjpg-streamer/patches/001-no_input_testpictures.patch (revision 16991)
 +++ mjpg-streamer/patches/001-no_input_testpictures.patch (working copy)
 @@ -1,11 +0,0 @@
 -diff -urN mjpg-streamer-r74/Makefile mjpg-streamer-r74.new/Makefile
  mjpg-streamer-r74/Makefile   2009-02-08 14:51:37.0 +0100
 -+++ mjpg-streamer-r74.new/Makefile   2009-02-08 14:52:48.0 +0100
 -@@ -31,7 +31,6 @@
 - PLUGINS = input_uvc.so
 - PLUGINS += output_file.so
 - PLUGINS += output_http.so
 --PLUGINS += input_testpicture.so
 - PLUGINS += output_autofocus.so
 - PLUGINS += input_gspcav1.so
 - PLUGINS += input_file.so
 Index: mjpg-streamer/Makefile
 ===
 --- mjpg-streamer/Makefile(revision 16991)
 +++ mjpg-streamer/Makefile(working copy)
 @@ -1,5 +1,5 @@
  #
 -# Copyright (C) 2007-2009 OpenWrt.org
 +# Copyright (C) 2006-2009 OpenWrt.org
  #
  # This is free software, licensed under the GNU General Public License v2.
  # See /LICENSE for more information.
 @@ -25,7 +25,7 @@
CATEGORY:=Multimedia
TITLE:=MJPG-streamer
DEPENDS:=...@linux_2_6 +libpthread +libjpeg
 -  URL:=http://www.naaa.de/uvc_streamer.htm
 +  URL:=http://mjpg-streamer.wiki.sourceforge.net/
  endef

  define Package/mjpg-streamer/description
 @@ -35,13 +35,17 @@
  EXTRA_CFLAGS += $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)

  define Package/mjpg-streamer/install
 - $(INSTALL_DIR) $(1)/sbin
 - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/sbin
 + $(INSTALL_DIR) $(1)/usr/bin
 + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/usr/bin/
 + $(INSTALL_DIR) $(1)/etc/config
 + $(CP) ./files/mjpg-streamer.config $(1)/etc/config/mjpg-streamer
 + $(INSTALL_DIR) $(1)/etc/init.d
 + $(CP) ./files/mjpg-streamer.init $(1)/etc/init.d/mjpg-streamer
   $(INSTALL_DIR) $(1)/usr/lib
   $(CP) $(foreach input_plugin,file uvc
 gspcav1,$(PKG_BUILD_DIR)/input_$(input_plugin).so) $(1)/usr/lib $(CP)
 $(foreach output_plugin,http file
 autofocus,$(PKG_BUILD_DIR)/output_$(output_plugin).so) $(1)/usr/lib
 - $(INSTALL_DIR) $(1)/webcam_www
 - $(CP) $(PKG_BUILD_DIR)/www/* $(1)/webcam_www
 + $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
 + $(INSTALL_DATA) ./files/mjpg-streamer.hotplug
 $(1)/etc/hotplug.d/usb/20-mjpg-streamer endef

  $(eval $(call BuildPackage,mjpg-streamer))
 Index: uvc-streamer/files/uvc-streamer.init
 ===
 --- 

Re: [OpenWrt-Devel] openwrt-devel Digest, Vol 43, Issue 43

2009-07-26 Thread paolo del bene

 than Re: Contents of openwrt-devel digest...


 Today's Topics:

   1. Re: [openwrt for linksys wrt 54gl and linksys wrt 54gs  Pavlz (Paolo
 Del Bene)

 --

 Message: 2
 Date: Sun, 26 Jul 2009 14:29:00:00 +0200
 From: Paolo Del Bene ninux...@gmail.con flor...@openwrt.org
 To: openwrt-devel@lists.openwrt.org
 Subject: Re: [OpenWrt-Devel] [linksys wrt 54gl and linksys wrt 54gs] Pavlz
 Message-ID: 200907261239.42559.flor...@openwrt.org
 Content-Type: text/plain; charset=utf-8

 Hi,


   I got 3 linksys:

   1 linksys wrt 54gs and 2 linksys wrt 54gl, i would to install openwrt on
them, but i
   don't know where i must to download the *.src and *.binary of
openwrt-squashifs.bin

 anyone can help me ?


   awaiting your reply,

   Paolo Del Bene on irc.freenode.net #openwrt my nick is Pavlz




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


Re: [OpenWrt-Devel] [PATCH] ppp switch to versi on 2.4.4

2009-07-26 Thread Vladimir Voronkov
Hi, Florian,

I am new to submitting patches for openWRT, I am sorry for some mistakes in the 
emails. Should I re-send 
them again or you have applied the patches? How can I see the revision number 
with my changes?

About configuration file for OpenL2TP - I was unable to build it with 
L2TP_FEATURE_LOCAL_CONF_FILE because 
of some dependencies that I couldn't resolve. For now OpenL2TP can only be 
configured via rpc tool 
l2tpconfig, see how it is used in my script. I understand that it is not 
acceptable for generic purposes, 
I just included in for you guys to see how it can be used in openwrt 
configuration. Unfortunately I am not 
aware of how UCI works. If you give me advice on how I can create startup 
scrips or maybe some link where 
I can read more info about it I will definitely improve that. I have in plans 
to integrate it also in 
luci-admin tool but I still investigating the code how you do this.

About kmod-pppol2tp for kernel version 2.6.28 and newer - what I can say is - 
it works on my system:
device is Linksys WRT54GL v. 1.1

 KAMIKAZE (8.09.1, r16973) 
r...@openwrt:~# cat /proc/version
Linux version 2.6.25.20 (v...@vvv-vm-ubuntu) (gcc version 4.1.2) #6 Sat Jul 25 
22:44:13 MSD 2009

and loaded

r...@openwrt:~# lsmod
Module  Size  Used byNot tainted
...
pppol2tp   29648  4


OpenL2TP doesn't work without it.

I also have quiestion about WiFi for my device. I built the firmware from 
revision r16973, choosing 
Broadcom BCM947xx/953xx [2.6] as a target and Broadcom BCM43xx WiFi as a 
profile but I don't see that 
kmod-b43 module is built and installed in my system. Revision is 8.09.1, 
r16973. That is why WiFi isn't 
working. Could you please explain what I did wrong or maybe what packages I 
should include into my build.

Thanks for your support!

-Original Message-
From: Florian Fainelli flor...@openwrt.org
To: openwrt-devel@lists.openwrt.org
Date: Sun, 26 Jul 2009 12:27:22 +0200
Subject: Re: [OpenWrt-Devel] [PATCH] ppp switch to version 2.4.4

 Hi Validimir,
 
 Le Sunday 26 July 2009 10:45:38 Vladimir Voronkov, vous avez Иcrit :
  This patch changes version of ppp to 2.4.4, which is required for
  openl2tp-1.6 to work. Patch with integration of openl2tp will be sent in my
  next email.
 
  All current patches to ppp-2.4.3 are changed according to a new version of
  ppp, some of them are removed (namely 102, 202, 205, 207) because they
  already exist in ppp-2.4.4.
 
 ppp-2.4.4 has been updated a while already, so I have only applied the 
 kmod-pppol2tp part of this patch. Also PPP over L2TP only appeared in 2.6.28 
 therefore the module is restricted to the kernel versions it can be built on.
 
 
  Also kmod-pppol2tp kernel module has been added in configuration.
 
  Signed-off-by: Vladimir Voronkov voronkovv at mail.ru
 
  ---
 
  Index: package/kernel/modules/network.mk
  ===
  --- package/kernel/modules/network.mk   (revision 16973)
  +++ package/kernel/modules/network.mk   (working copy)
  @@ -367,6 +367,7 @@
 FILES:= \
  $(LINUX_DIR)/drivers/net/pppoe.$(LINUX_KMOD_SUFFIX) \
  $(LINUX_DIR)/drivers/net/pppox.$(LINUX_KMOD_SUFFIX)
  +  AUTOLOAD:=$(call AutoLoad,40,pppox pppoe)
   endef
 
   define KernelPackage/pppoe/description
  @@ -376,6 +377,22 @@
   $(eval $(call KernelPackage,pppoe))
 
 
  +define KernelPackage/pppol2tp
  +  SUBMENU:=$(NETWORK_SUPPORT_MENU)
  +  TITLE:=PPPoL2TP support
  +  DEPENDS:=kmod-ppp +kmod-pppoe
  +  KCONFIG:=CONFIG_PPPOL2TP
  +  FILES:=$(LINUX_DIR)/drivers/net/pppol2tp.$(LINUX_KMOD_SUFFIX)
  +  AUTOLOAD:=$(call AutoLoad,40,pppol2tp)
  +endef
  +
  +define KernelPackage/pppol2tp/description
  + Kernel modules for PPPoL2TP (PPP over L2TP) support
  +endef
  +
  +$(eval $(call KernelPackage,pppol2tp))
  +
  +
   define KernelPackage/pppoa
 SUBMENU:=$(NETWORK_SUPPORT_MENU)
 TITLE:=PPPoA support
  Index: package/ppp/patches/101-debian_ip-up_option.patch
  ===
  --- package/ppp/patches/101-debian_ip-up_option.patch   (revision 16973)
  +++ package/ppp/patches/101-debian_ip-up_option.patch   (working copy)
  @@ -2,37 +2,37 @@
   ===
   --- ppp-2.4.3.orig/pppd/ipcp.c 2007-06-04 13:22:08.478566344 +0200
   +++ ppp-2.4.3/pppd/ipcp.c  2007-06-04 13:22:09.003486544 +0200
  -@@ -1846,7 +1846,7 @@
  +@@ -1850,7 +1850,7 @@
 */
if (ipcp_script_state == s_down  ipcp_script_pid == 0) {
  ipcp_script_state = s_up;
  --  ipcp_script(_PATH_IPUP);
  -+  ipcp_script(path_ipup);
  +-  ipcp_script(_PATH_IPUP, 0);
  ++  ipcp_script(path_ipup, 0);
}
}
 
  -@@ -1896,7 +1896,7 @@
  +@@ -1900,7 +1900,7 @@
/* Execute the ip-down script */
if (ipcp_script_state == s_up  ipcp_script_pid == 0) {
  ipcp_script_state = s_down;
  

Re: [OpenWrt-Devel] Bump gpsd version and use uclibc++

2009-07-26 Thread Chris Lang
101-trimble.patch was not an obsolete patch. There is no support for the
trimble devices in the latest gpsd version and  without this patch gpsd will
not work with certain trimble devices.

Thanks,

- Chris

On Sun, Jul 26, 2009 at 4:03 AM, Florian Fainelli flor...@openwrt.orgwrote:

 Le Sunday 26 July 2009 12:08:10 Roberto Riggio, vous avez écrit :
  Changes:
 
   - use version 2.39
   - use uclibc++
   - remove obsolete patches
 
  Signed-off-by: Roberto Riggio roberto.rig...@create-net.org

 Applied in r17001, thanks !

 
  --
 
  Index: gpsd/patches/100-reduce-size.patch
  ===
  --- gpsd/patches/100-reduce-size.patch(revision 16991)
  +++ gpsd/patches/100-reduce-size.patch(working copy)
  @@ -1,26 +0,0 @@
   a/gpsd.c
  -+++ b/gpsd.c
  -@@ -42,6 +42,7 @@
  - #include locale.h
  - #endif
  -
  -+#undef DBUS_ENABLE
  - #ifdef DBUS_ENABLE
  - #include gpsd_dbus.h
  - #endif
  -@@ -297,6 +298,7 @@
  -  * This array fills from the bottom, so as an extreme case you could
  -  * reduce LIMITED_MAX_DEVICES to 1.
  -  */
  -+#define LIMITED_MAX_DEVICES 1
  - #ifdef LIMITED_MAX_DEVICES
  - #define MAXDEVICES  LIMITED_MAX_DEVICES
  - #else
  -@@ -304,6 +306,7 @@
  - #define MAXDEVICES  4
  - #endif
  -
  -+#define LIMITED_MAX_CLIENTS 16
  - #ifdef LIMITED_MAX_CLIENTS
  - #define MAXSUBSCRIBERS LIMITED_MAX_CLIENTS
  - #else
  Index: gpsd/patches/101-trimble.patch
  ===
  --- gpsd/patches/101-trimble.patch(revision 16991)
  +++ gpsd/patches/101-trimble.patch(working copy)
  @@ -1,40 +0,0 @@
   a/drivers.c
  -+++ b/drivers.c
  -@@ -202,9 +202,13 @@
  - /* probe for the FV-18 -- expect $PFEC,GPint followed by data */
  - (void)nmea_send(session-gpsdata.gps_fd, $PFEC,GPint);
  - break;
  -+case 3:
  -+/* probe for the Trimble Copernicus */
  -+(void)nmea_send(session-gpsdata.gps_fd, $PTNLSNM,0139,01);
  -+break;
  - #endif /* NMEA_ENABLE */
  - #ifdef EVERMORE_ENABLE
  --case 3:
  -+case 4:
  - /* Enable checksum and GGA(1s), GLL(0s), GSA(1s), GSV(1s), RMC(1s),
  VTG(0s), PEMT101(1s) */ - /* EverMore will reply with:
  \x10\x02\x04\x38\x8E\xC6\x10\x03 */ - (void)gpsd_write(session,
  -@@ -212,19 +216,19 @@
  - break;
  - #endif /* EVERMORE_ENABLE */
  - #ifdef ITRAX_ENABLE
  --case 4:
  -+case 5:
  - /* probe for iTrax, looking for $PFST,OK */
  - (void)nmea_send(session-gpsdata.gps_fd, $PFST);
  - break;
  - #endif /* ITRAX_ENABLE */
  - #ifdef GPSCLOCK_ENABLE
  --case 5:
  -+case 6:
  - /* probe for Furuno Electric GH-79L4-N (GPSClock) */
  - (void)nmea_send(session-gpsdata.gps_fd, $PFEC,GPsrq);
  - break;
  - #endif /* GPSCLOCK_ENABLE */
  - #ifdef ASHTECH_ENABLE
  --case 6:
  -+case 7:
  - /* probe for Ashtech -- expect $PASHR */
  - (void)nmea_send(session-gpsdata.gps_fd, $PASHQ,RID);
  - break;
  Index: gpsd/Makefile
  ===
  --- gpsd/Makefile (revision 16991)
  +++ gpsd/Makefile (working copy)
  @@ -8,14 +8,14 @@
   include $(TOPDIR)/rules.mk
 
   PKG_NAME:=gpsd
  -PKG_VERSION:=2.37
  -PKG_RELEASE:=3
  +PKG_VERSION:=2.39
  +PKG_RELEASE:=1
 
   PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
   PKG_SOURCE_URL:=http://download.berlios.de/gpsd/
  -PKG_MD5SUM:=6c96cc0b2df0279cb7baac1ebc5881d3
  +PKG_MD5SUM:=3db437196a6840c252fca99b6c19d4d0
 
  -PKG_FIXUP = libtool
  +PKG_FIXUP:=libtool-ucxx
 
   PKG_BUILD_DEPENDS=libncurses
 
  @@ -24,31 +24,30 @@
   define Package/gpsd
 SECTION:=net
 CATEGORY:=Network
  -  DEPENDS:=+libpthread +libstdcpp
  +  DEPENDS:=+libpthread +uclibcxx
 TITLE:=An interface daemon for GPS receivers
 URL:=http://gpsd.berlios.de/
   endef
 
   CONFIGURE_ARGS += \
  - --disable-dbus \
  - --disable-python \
  - --disable-sirf \
  - --disable-tsip \
  - --disable-fv18 \
  - --disable-tripmate \
  - --disable-earthmate \
  - --disable-itrax \
  - --disable-navcom \
  - --disable-garmin \
  - --disable-ubx \
  - --disable-evermore \
  - --disable-rtcm104 \
  - --disable-ntrip \
  - --disable-ntpshm \
  - --disable-pps \
  - --disable-reconfigure \
  - --without-x \
  +--disable-dbus \
  +--disable-tsip \
  +--disable-fv18 \
  +--disable-tripmate \
  +--disable-earthmate \
  +--disable-itrax \
  +--disable-navcom \
  +--disable-ubx \
  +--disable-evermore \
  +--disable-ntrip \
  +--without-x \
 
  +CONFIGURE_VARS += \
  + CXXFLAGS=CXXFLAGS -fno-builtin -fno-rtti -nostdinc++  \
  + CPPFLAGS=CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++
  -I$(LINUX_DIR)/include \ +   LDFLAGS=LDFLAGS \
  + LIBS=-nodefaultlibs -luClibc++ -lm -lgcc \
  +
   define Build/Compile

[OpenWrt-Devel] [patch] corrected test syntax in sslh init script

2009-07-26 Thread Matthias Buecher / Germany
Signed-off-by: Matthias Buecher m...@maddes.net

Index: net/sslh/files/sslh.init
===
--- net/sslh/files/sslh.init(revision 17004)
+++ net/sslh/files/sslh.init(working copy)
@@ -13,7 +13,7 @@
# check if section is enabled (default)
local enabled
config_get_bool enabled ${section} enable 1
-   [ ${enabled} -eq 0 ]  return 1
+   [ ${enabled} -eq 0 ]  return 1
 
# increase pid file count to handle multiple instances correctly
PIDCOUNT=$(( ${PIDCOUNT} + 1 ))
@@ -23,23 +23,23 @@
local val
# A) listen parameter
config_get val ${section} listen
-   [ ! -z ${val} ]  append args -p ${val}
+   [ ! -z ${val} ]  append args -p ${val}
# B) ssh parameter
config_get val ${section} ssh
-   [ ! -z ${val} ]  append args -s ${val}
+   [ ! -z ${val} ]  append args -s ${val}
# C) ssl parameter
config_get val ${section} ssl
-   [ ! -z ${val} ]  append args -l ${val}
+   [ ! -z ${val} ]  append args -l ${val}
# D) timeout (for ssh, then ssl is assumed)
config_get val ${section} timeout
-   [ ! -z ${val} ]  append args -t ${val}
+   [ ! -z ${val} ]  append args -t ${val}
# E) verbose parameter
local verbosed
config_get_bool verbosed ${section} verbose 0
-   [ ${verbosed} -ne 0 ]  append args -v
+   [ ${verbosed} -ne 0 ]  append args -v
 
# execute program and return its exit code
-   [ ${verbosed} -ne 0 ]  echo ${NAME}: section ${section} starting 
${PROG} ${args}
+   [ ${verbosed} -ne 0 ]  echo ${NAME}: section ${section} starting 
${PROG} ${args}
${PROG} ${args}
return $?
 }
@@ -70,7 +70,7 @@
for pid in `pidof sslh`
 do
# check if correct program
-   ps | grep ${pid} | grep ${PROG} /dev/null
+   ps | grep ${pid} | grep ${PROG} /dev/null
[ $? -ne 0 ]  continue
 
# kill process
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [patch] combined uci support for etherake and wol

2009-07-26 Thread Matthias Buecher / Germany
This patch adds combined uci support for etherwake and wol.
It is similar to the uci support currently only in the wol package.

Package uci-etherwake adds uci support for etherwake (and also
busybox's ether-wake). The uci settings are used by script
/bin/uci-etherwake. Package uci-wol adds the same for wol.
Package uci-wakeonlan adds uci support for defining wol targets, that
can be waked up either by etherwake or wol. Targets can also be waked up
on system boot via init script.

These packages, etherwake and wol are moved into a separate submenu.

Used in production with recent trunk on WRT350Nv2 (Marvell Orion) and
with Kamikaze 8.09.1 on WRT54G v2.2

Signed-off-by: Matthias Buecher m...@maddes.net

Index: net/etherwake/Makefile
===
--- net/etherwake/Makefile  (revision 17017)
+++ net/etherwake/Makefile  (working copy)
@@ -1,8 +1,9 @@
 #
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
+#
 
 include $(TOPDIR)/rules.mk
 
@@ -21,7 +22,8 @@
 define Package/etherwake
   SECTION:=net
   CATEGORY:=Network
-  TITLE:=A little tool to send magic Wake-on-LAN packets
+  SUBMENU:=Wake-On-LAN
+  TITLE:=WoL client for magic packets via ethernet frames
   URL:=http://ftp.debian.org/debian/pool/main/e/etherwake
 endef
 
Index: net/wol/Makefile
===
--- net/wol/Makefile(revision 17017)
+++ net/wol/Makefile(working copy)
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2007 OpenWrt.org
+# Copyright (C) 2007-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -20,7 +20,8 @@
 define Package/wol
   SECTION:=net
   CATEGORY:=Network
-  TITLE:=Wake On LAN client
+  SUBMENU:=Wake-On-LAN
+  TITLE:=WoL client for magic packets via udp
   URL:=http://ahh.sourceforge.net/wol/
 endef
 
Index: net/uci-etherwake/Makefile
===
--- net/uci-etherwake/Makefile  (revision 0)
+++ net/uci-etherwake/Makefile  (revision 0)
@@ -0,0 +1,47 @@
+#
+# Copyright (C) 2009 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:=uci-etherwake
+PKG_VERSION:=0.9
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/uci-etherwake
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Wake-On-LAN
+  DEPENDS:=+uci-wakeonlan
+  TITLE:=uci support for etherwake and also busybox's ether-wake
+  PKGARCH:=all
+endef
+
+define Package/uci-etherwake/description
+   You can define system defaults via uci.
+   The script uci-etherwake uses these defaults for calling etherwake.
+   No more need to remember which interface to use or if broadcasting is 
necessary.
+   Also supports sudo, so that non-root users can send magic packets
+   via ethernet frames too.
+endef
+
+define Build/Compile
+endef
+
+define Package/uci-etherwake/install
+   $(INSTALL_DIR) $(1)/bin
+   $(INSTALL_BIN) files/bin/$(PKG_NAME) $(1)/bin/
+   $(INSTALL_DIR) $(1)/etc/config
+   $(INSTALL_DATA) files/etc/config/$(PKG_NAME) $(1)/etc/config/
+   $(INSTALL_DIR) $(1)/lib/uci-wakeonlan
+   $(INSTALL_DATA) files/lib/uci-wakeonlan/$(PKG_NAME).sh 
$(1)/lib/uci-wakeonlan/
+endef
+
+$(eval $(call BuildPackage,uci-etherwake))
Index: net/uci-etherwake/files/etc/config/uci-etherwake
===
--- net/uci-etherwake/files/etc/config/uci-etherwake(revision 0)
+++ net/uci-etherwake/files/etc/config/uci-etherwake(revision 0)
@@ -0,0 +1,11 @@
+config 'uci-etherwake' 'setup'
+   # possible program pathes
+   option 'pathes' '/usr/bin/etherwake /usr/bin/ether-wake'
+   # use sudo, defaults to off
+   option 'sudo' 'off'
+   # interface, defaults to 'eth0'
+   # -i ifname
+   option 'interface' ''
+   # send wake-up packet to the broadcast address, defaults to off
+   # -b
+   option 'broadcast' 'off'
Index: net/uci-etherwake/files/bin/uci-etherwake
===
--- net/uci-etherwake/files/bin/uci-etherwake   (revision 0)
+++ net/uci-etherwake/files/bin/uci-etherwake   (revision 0)
@@ -0,0 +1,44 @@
+#!/bin/sh
+# Copyright (C) 2009 OpenWrt.org
+
+NAME='etherwake'
+
+. /etc/functions.sh
+include /lib/uci-wakeonlan
+
+config_load uci-${NAME}
+
+local searchlist=''
+config_get searchlist 'setup' 'pathes'
+
+local program=''
+program=$(search_wolprogram ${searchlist})
+[ -z ${program} ]  {
+   echo No ${NAME} program installed. Check: opkg list | grep ${NAME}
+   exit 1
+}
+
+local value=''
+local cmd=''
+
+# sudo

Re: [OpenWrt-Devel] openwrt-devel Digest, Vol 43, Issue 45 [openwrt binary and source code for linksys wrt 54gl version 1.1 and linksys wrt 54gs version 1.1]

2009-07-26 Thread paolo del bene
Re: openwrt-devel Digest, Vol 43, Issue 43 [openwrt binary and source code
for linksys wrt 54gl version 1.1 and linksys wrt 54gs version 1.1]

1. Re: openwrt-devel Digest, Vol 43, Issue 45 (paolo del bene)


  --
 
  Message: 2
  Date: Sun, 26 Jul 2009 14:29:00:00 +0200
  From: Paolo Del Bene ninux...@gmail.con flor...@openwrt.org
  To: openwrt-devel@lists.openwrt.org
  Subject: Re: [OpenWrt-Devel] [linksys wrt 54gl and linksys wrt 54gs]
 Pavlz
  Message-ID: 200907261239.42559.flor...@openwrt.org
  Content-Type: text/plain; charset=utf-8
 
  Hi,


   I got 3 linksys:

   1 linksys wrt 54gs and 2 linksys wrt 54gl, i would to install openwrt on
 them, but i
   don't know where i must to download the *.src and *.binary of
 openwrt-squashifs.bin

  anyone can help me ?


   awaiting your reply,

   Paolo Del Bene on irc.freenode.net #openwrt my nick is Pav

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


Re: [OpenWrt-Devel] openwrt-devel Digest, Vol 43, Issue 45 [openwrt binary and source code for linksys wrt 54gl version 1.1 and linksys wrt 54gs version 1.1]

2009-07-26 Thread Matthias Buecher / Germany
Did you check if your hardware is supported and how to install OpenWrt
on it?
If not, then always remember to search the documentation/wiki first.
http://nuwiki.openwrt.org/oldwiki/hardware/linksys

Maddes

On 26.07.2009 21:38, paolo del bene wrote:
 
 Re: openwrt-devel Digest, Vol 43, Issue 43 [openwrt binary and source
 code for linksys wrt 54gl version 1.1 and linksys wrt 54gs version 1.1]
 
 1. Re: openwrt-devel Digest, Vol 43, Issue 45 (paolo del bene)
 
 
  --
 
  Message: 2
  Date: Sun, 26 Jul 2009 14:29:00:00 +0200
  From: Paolo Del Bene ninux...@gmail.con flor...@openwrt.org
 mailto:flor...@openwrt.org
  To: openwrt-devel@lists.openwrt.org
 mailto:openwrt-devel@lists.openwrt.org
  Subject: Re: [OpenWrt-Devel] [linksys wrt 54gl and linksys wrt
 54gs] Pavlz
  Message-ID: 200907261239.42559.flor...@openwrt.org
 mailto:200907261239.42559.flor...@openwrt.org
  Content-Type: text/plain; charset=utf-8
 
  Hi,
 
 
   I got 3 linksys:
 
   1 linksys wrt 54gs and 2 linksys wrt 54gl, i would to install
 openwrt on
 them, but i
   don't know where i must to download the *.src and *.binary of
 openwrt-squashifs.bin
 
  anyone can help me ?
 
 
   awaiting your reply,
 
   Paolo Del Bene on irc.freenode.net http://irc.freenode.net
 #openwrt my nick is Pav
 

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


[OpenWrt-Devel] [Fwd: compile error STRIP variable not set with last commit]

2009-07-26 Thread Xiangfu Liu


 Original Message 
Subject:compile error STRIP variable not set with last commit
Date:   Mon, 27 Jul 2009 04:13:01 +0800
From:   Xiangfu Liu xian...@qi-hardware.com
To: OpenWrt Development List openwrt-devel@lists.openwrt.org



Hi

I just merge the last openwrt commit to openwrt-x-burst[1]
but there is STRIP variable not set error, never show this 
error before merge. attch is the error message

give me some tip. very thanks.

[1] http://github.com/lindnermarek/openwrt-x-burst/commits/x-burst



-- 
http://www.qi-hardware.com
Best Regards
Xiangfu Liu


mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/CONTROL
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/dev
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/etc/crontabs
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/etc/rc.d
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/jffs
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/lib/firmware
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/mnt
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/proc
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/tmp
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/usr/lib
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/usr/bin
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/sys
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/www
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/root
ln -sf /proc/mounts 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/etc/mtab
rm -f 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/var
ln -sf /tmp 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/var
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/etc
ln -sf /tmp/resolv.conf /tmp/fstab /tmp/TZ 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/etc/
for conffile in 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/etc/config/*;
 do if [ -f $conffile ]; then grep $conffile 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/CONTROL/conffiles
 || echo 
${conffile##/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst}
  
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst/CONTROL/conffiles;
 fi done
mkdir -p 
/home/xiangfu/PanGu/openwrt-x-burst/bin/packages/target-mipsel_uClibc-0.9.30.1
find 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst
 -name 'CVS' -o -name '.svn' -o -name '.#*' | xargs -r rm -rf
NM=mipsel-openwrt-linux-uclibc-nm STRIP= 
STRIP_KMOD=mipsel-openwrt-linux-uclibc-strip --strip-unneeded 
--remove-section=.comment 
/home/xiangfu/PanGu/openwrt-x-burst/scripts/rstrip.sh 
/home/xiangfu/PanGu/openwrt-x-burst/build_dir/linux-xburst/base-files/ipkg/base-files-xburst
rstrip.sh: strip command not defined (STRIP variable not set)
make[3]: *** 
[/home/xiangfu/PanGu/openwrt-x-burst/bin/packages/target-mipsel_uClibc-0.9.30.1/base-files-xburst_24-r17023_mipsel.ipk]
 Error 1
make[3]: Leaving directory 
`/home/xiangfu/PanGu/openwrt-x-burst/package/base-files'
make[2]: *** [package/base-files/compile] Error 2
make[2]: Leaving directory `/home/xiangfu/PanGu/openwrt-x-burst'
make[1]: *** 
[/home/xiangfu/PanGu/openwrt-x-burst/staging_dir/target-mipsel_uClibc-0.9.30.1/stamp/.package_compile]
 Error 2
make[1]: Leaving directory `/home/xiangfu/PanGu/openwrt-x-burst'
make: *** [world] Error 2


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


Re: [OpenWrt-Devel] [Fwd: compile error STRIP variable not set with last commit]

2009-07-26 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi.

There was a new option introduced that allows one to choose between
several options to strip target binaries.

If you run make menuconfig and save the config again (without actually
modifying it), the required option should be set.

An alternative is to append CONFIG_USE_SSTRIP=y to your local .config
which has the same effect.

Hope this helps,
JoW
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpsuoUACgkQdputYINPTPPthwCeMT68vxR2vpkvjJRGMT2DAwFN
+uAAn0fQ4M7lqC30VvMQqv0ns7t9g04P
=KcJx
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] 回复: Re: [Fwd: compile er ror STRIP variable not set with last commit]

2009-07-26 Thread xiangfu liu
thanks joW.

http://www.qi-hardware.com

在 2009-Jul-27 4:20 AM,Jo-Philipp Wich x...@subsignal.org 说:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi.

There was a new option introduced that allows one to choose between
several options to strip target binaries.

If you run make menuconfig and save the config again (without actually
modifying it), the required option should be set.

An alternative is to append CONFIG_USE_SSTRIP=y to your local .config
which has the same effect.

Hope this helps,
JoW
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpsuoUACgkQdputYINPTPPthwCeMT68vxR2vpkvjJRGMT2DAwFN
+uAAn0fQ4M7lqC30VvMQqv0ns7t9g04P
=KcJx
-END PGP SIGNATURE-
___
openwrt-devel mailing list

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


[OpenWrt-Devel] Stop at Please be patient, while OpenWrt loads

2009-07-26 Thread Xiangfu Liu
Hi there
I work on a jz4740 cpu device. there[1] is all the code.
your can find the kernel patch at [2]

the .24 kernel is work, but the .28 boot to Please be patient, while OpenWrt 
loads
then stop. I put rootfs in mmcblk0p1 with ext2.

I use tar jxvf openwrt-xburst-rootfs.tgz[3] /media/MMCBLK0P1 to cp the rootfs 
to sd card.

is there something wrong with rootfs?

thanks for help.


[1] http://github.com/lindnermarek/openwrt-x-burst/commits/x-burst
[2] 
http://github.com/lindnermarek/openwrt-x-burst/tree/76e7e9d1590d2f1a742c5dc96420e22bc4e5d234/target/linux/xburst
[3] 
http://www.openmobilefree.net/other/file/Ben_NanoNote/openwrt-xburst-rootfs.tgz
-- 
http://www.qi-hardware.com
Best Regards
Xiangfu Liu

NAND Secondary Program Loader   
   

U-Boot 2009.06-dirty (Jul 26 2009 - 16:40:30)   

Board: Qi LB60 (Ingenic XBurst Jz4740 SoC, Speed 252 MHz)   
DRAM:  32 MB
NAND:  2048 MiB 
Linux version 2.6.28.10-ge8db213 (xian...@openmobilefree.net) (gcc version 4.1.9
CPU revision is: 0ad0024f (Ingenic JZRISC)  
CPU clock: 252MHz, System clock: 84MHz, Peripheral clock: 84MHz, Memory clock: z
Qi Hardware JZ4740 QI_LB60 setup
Determined physical RAM map:
 memory: 0400 @  (usable)   
User-defined physical RAM map:  
 memory: 0200 @  (usable)   
Zone PFN ranges:
  Normal   0x - 0x2000 
Movable zone start PFN for each node
early_node_map[1] active PFN ranges 
0: 0x - 0x2000 
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 8128  
Kernel command line: mem=32M console=ttyS0,57600n8 rootfstype=ext2 root=/dev/mm2
Primary instruction cache 16kB, VIPT, 4-way, linesize 32 bytes. 
Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes 
PID hash table entries: 128 (order: 7, 512 bytes)   
[ cut here ]
WARNING: at kernel/time/clockevents.c:175 ()
Modules linked in:  
Call Trace:[80024890] 0x80024890  
[80024890] 0x80024890 
[80041188] 0x80041188 
[803df198] 0x803df198 
[80041810] 0x80041810 
[803debd8] 0x803debd8 
[803f2e14] 0x803f2e14 
[803f12c8] 0x803f12c8 
[803ded54] 0x803ded54 
[80067640] 0x80067640 
[80069f28] 0x80069f28 
[80068764] 0x80068764 
[803d95d8] 0x803d95d8 
[803d5938] 0x803d5938 
[803d50d8] 0x803d50d8 

---[ end trace 4eaa2a86a8e2da22 ]---
Console: colour dummy device 80x25  
console [ttyS0] enabled 
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)   
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) 
Memory: 28252k/32768k available (3186k kernel code, 4516k reserved, 671k data, )
Calibrating delay loop... 250.67 BogoMIPS (lpj=1253376) 
Mount-cache hash table entries: 512 
net_namespace: 288