Re: [OpenWrt-Devel] [OpenWrt] #6081: Wifi toggle package propose

2009-11-01 Thread Nuno Gonçalves
No Idea what that is...

Nuno

On Sun, Nov 1, 2009 at 18:00, OpenWrt  wrote:
> #6081: Wifi toggle package propose
> ---+
>  Reporter:  nuno...@…          |       Owner:  developers
>     Type:  enhancement        |      Status:  new
>  Priority:  normal             |   Milestone:  Kamikaze
> Component:  packages           |     Version:  Trunk
>  Keywords:                     |
> ---+
>
> Comment(by anonymous):
>
>  Hmm, is it generic enough for mac80201 drivers?
>
> --
> Ticket URL: 
> OpenWrt 
> Opensource Wireless Router Technology
>



-- 
\ Nuno Gonçalves
/
\ Bugs? Features!
/
\ nuno...@gmail.com
/ PORTUGAL
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Add hotplug script for usb modeswitch

2009-11-01 Thread Roberto Riggio
Add an hotplug script for usb-modeswitch. The script runs usb_modeswitch 
without

parameter is a storage class device is plugged.

Signed-off-by: Roberto Riggio 

--

Index: utils/usb-modeswitch/files/usb-modeswitch.hotplug
===
--- utils/usb-modeswitch/files/usb-modeswitch.hotplug(revision 0)
+++ utils/usb-modeswitch/files/usb-modeswitch.hotplug(revision 0)
@@ -0,0 +1,10 @@
+case "$ACTION" in
+add)
+# start process
+# only storage devices are handled
+if [ "$(echo $INTERFACE | cut -d/ -f1)" = "8" ]; then
+echo sh -c "sleep 4; /usr/bin/usb_modeswitch"
+fi
+;;
+esac
+
Index: utils/usb-modeswitch/Makefile
===
--- utils/usb-modeswitch/Makefile(revision 18258)
+++ utils/usb-modeswitch/Makefile(working copy)
@@ -9,7 +9,7 @@

 PKG_NAME:=usb_modeswitch
 PKG_VERSION:=1.0.5
-PKG_RELEASE:=2
+PKG_RELEASE:=3

 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch
@@ -31,7 +31,7 @@
 endef

 define Build/Compile
-$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \
+"$(TARGET_CC)" $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \
 -lusb \
 -o $(PKG_BUILD_DIR)/usb_modeswitch-OpenWrt \
 $(PKG_BUILD_DIR)/usb_modeswitch.c
@@ -40,6 +40,8 @@
 define Package/usb-modeswitch/install
 $(INSTALL_DIR) $(1)/usr/bin
 $(INSTALL_BIN) $(PKG_BUILD_DIR)/usb_modeswitch-OpenWrt 
$(1)/usr/bin/usb_modeswitch

+$(INSTALL_DIR) $(1)/etc/hotplug.d/usb
+$(INSTALL_DATA) ./files/usb-modeswitch.hotplug 
$(1)/etc/hotplug.d/usb/80-usb-modeswitch

 endef

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


[OpenWrt-Devel] [PATCH] Add init and hotplug script for gpsd package

2009-11-01 Thread Roberto Riggio

This patch adds an init script and an hotplug script for the gpsd package.

An UCI-based configuration file is also provided. Supported option are:

device, where the gps receiver is plugged
port, port on which gpsd shall listen for incoming queries
enabled, turn gpsd on/off

Signed-off-by: Roberto Riggio 

--

Index: net/gpsd/files/gpsd.init
===
--- net/gpsd/files/gpsd.init(revision 0)
+++ net/gpsd/files/gpsd.init(revision 0)
@@ -0,0 +1,69 @@
+#!/bin/sh /etc/rc.common
+
+START=50
+NAME=gpsd
+PIDF=/var/run/$NAME.pid
+PROG=/usr/sbin/$NAME
+
+. /etc/functions.sh
+
+start() {
+config_load gpsd
+config_get device core device
+config_get port core port
+config_get_bool enabled core enabled
+[ $enabled == 0 ] && exit 1
+logger "Starting: $NAME"
+[ -f "$PIDF" ] && {
+logger "Already running ($NAME). Exiting."
+exit 1
+}
+[ ! -c "$device" ] && {
+logger "Unable to find device $device. Exiting."
+exit 1
+}
+($PROG -n -N -P $PIDF -S $port $device &) &
+[ ! -f "$PIDF" ] && {
+logger "Unable to start $NAME. Exiting."
+exit 1
+}
+}
+
+stop() {
+logger "Stopping: $NAME"
+[ -f "$PIDF" ] && {
+kill -9 $(cat $PIDF)
+rm $PIDF
+}
+}
+
Index: net/gpsd/files/gpsd.config
===
--- net/gpsd/files/gpsd.config(revision 0)
+++ net/gpsd/files/gpsd.config(revision 0)
@@ -0,0 +1,4 @@
+config gpsd core
+option device"/dev/ttyUSB0"
+option port"2947"
+option enabled"true"
Index: net/gpsd/files/gpsd.hotplug
===
--- net/gpsd/files/gpsd.hotplug(revision 0)
+++ net/gpsd/files/gpsd.hotplug(revision 0)
@@ -0,0 +1,17 @@
+case "$ACTION" in
+add)
+# start process
+# only pl2303 devices are handled
+if [ "$PRODUCT" = "67b/2303/300" ] && [ "$TYPE" = "0/0/0" ] && 
[ "$INTERFACE" = "255/0/0" ]; then

+/etc/init.d/gpsd start
+fi
+;;
+remove)
+# stop process
+# only pl2303 devices are handled
+if [ "$PRODUCT" = "67b/2303/300" ] && [ "$TYPE" = "0/0/0" ] && 
[ "$INTERFACE" = "255/0/0" ]; then

+/etc/init.d/gpsd stop
+fi
+;;
+esac
+
Index: net/gpsd/Makefile
===
--- net/gpsd/Makefile(revision 18258)
+++ net/gpsd/Makefile(working copy)
@@ -66,6 +66,12 @@
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/
 $(INSTALL_DIR) $(1)/usr/sbin
 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/
+$(INSTALL_DIR) $(1)/etc/config
+$(INSTALL_DATA) ./files/gpsd.config $(1)/etc/config/gpsd
+$(INSTALL_DIR) $(1)/etc/init.d
+$(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd
+$(INSTALL_DIR) $(1)/etc/hotplug.d/usb
+$(INSTALL_DATA) ./files/gpsd.hotplug $(1)/etc/hotplug.d/usb/20-gpsd
 endef

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


[OpenWrt-Devel] [PATCH] missing MEDIA_SUPPORT symbol

2009-11-01 Thread Roberto Riggio

Missing symbol MEDIA_SUPPORT on kernel 2.6.31. Tested with
logitech af sphere webcam on x86 terget.

Signed-off-by: Roberto RIggio 

--
Index: package/kernel/modules/video.mk
===
--- package/kernel/modules/video.mk(revision 18041)
+++ package/kernel/modules/video.mk(working copy)
@@ -13,6 +13,7 @@
   TITLE=Video4Linux support
   DEPENDS:=...@pci_support||USB_SUPPORT
   KCONFIG:= \
+CONFIG_MEDIA_SUPPORT \
 CONFIG_VIDEO_DEV \
 CONFIG_VIDEO_V4L1=y \
 CONFIG_VIDEO_CAPTURE_DRIVERS=y \

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