[OpenWrt-Devel] [PATCH] libftdi

2010-07-12 Thread Michael Grigorev
libftdi - library to control and program the FTDI USB controller
Index: libs/libftdi/Makefile
===
--- libs/libftdi/Makefile (revision 0)
+++ libs/libftdi/Makefile (revision 0)
@@ -0,0 +1,76 @@
+#
+# Copyright (C) 2006 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:=libftdi
+PKG_VERSION:=0.18
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.intra2net.com/en/developer/libftdi/download/
+PKG_MD5SUM:=916f65fa68d154621fc0cf1f405f2726
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libftdi
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+libusb
+  TITLE:=Library to control and program the FTDI USB controller
+  
URL:=http://www.intra2net.com/en/developer/libftdi/
+endef
+
+define Package/libftdi/description
+ A library to talk to FTDI chips: FT232BM/245BM, FT2232C/D and FT232/245R
using libusb,
+ including the popular bitbang mode. This library is linked with your
program in userspace,
+ no kernel driver required.
+endef
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ chmod -R u+w $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+  $(TARGET_CONFIGURE_OPTS) \
+  OFLAGS="$(TARGET_CFLAGS)" \
+  DESTDIR="$(PKG_INSTALL_DIR)" \
+  install
+endef
+
+define Build/InstallDev
+ mkdir -p $(STAGING_DIR)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/ftdi.h $(STAGING_DIR)/usr/include/
+ mkdir -p $(STAGING_DIR)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.{a,so*} $(STAGING_DIR)/usr/lib/
+ mkdir -p $(STAGING_DIR)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/libftdi-config $(STAGING_DIR)/usr/bin/
+ mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libftdi.pc \
+  $(STAGING_DIR)/usr/lib/pkgconfig
+endef
+
+define Build/UninstallDev
+ rm -rf \
+  $(STAGING_DIR)/usr/include/ftdi.h \
+  $(STAGING_DIR)/usr/lib/libftdi.{a,so*} \
+  $(STAGING_DIR)/usr/bin/libftdi-config \
+  $(STAGING_DIR)/usr/lib/pkgconfig/libftdi.pc
+endef
+
+define Package/libftdi/install
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libftdi.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libftdi))

--
With the best regards, Michael Grigorev
NVStat lead developer
--
Russia
Chelyabinsk
WWW: http://novell.chel.ru
E-Mail: sleuthho...@gmail.com
ICQ: 161867489
--
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Execute some script at the first boot

2010-07-12 Thread Roberto Riggio

Hi,

is there an openwrt way for a package to execute
some script at the first boot?

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


Re: [OpenWrt-Devel] Execute some script at the first boot

2010-07-12 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi.

> is there an openwrt way for a package to execute
> some script at the first boot?

Yes, put it into /etc/uci-defaults/, it will get executed once and
removed afterwards.


~ Jow
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkw7KX4ACgkQdputYINPTPMOXACglGEQoyJuGLIHjZUJ1O/DBF7d
HL8AoJwyOUl8eZIOcB1SrvjuL33Z1N21
=HkHL
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Wireless Interface

2010-07-12 Thread Filippo Sallemi
Hi,

is there an openwrt way to set up wireless interfaces in certain order?

ex.

ath0 essid mesh mode adhoc
ath1 essid public mode master

At this time the order of interfaces in /etc/config/wireless is not used.

Any suggest?


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


Re: [OpenWrt-Devel] Wireless Interface

2010-07-12 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi.

If you rely on a certain order of wifi ifaces you're most likely doing
sth. wrong. Explain some more why you need it.

~ Jow
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkw7O9EACgkQdputYINPTPPr1gCfVKNhS6oL9rWRL57fziydAzJ7
a9AAn3hx1s6707e4NTQ+ZU2Cgktlc7eL
=5H35
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Execute some script at the first boot

2010-07-12 Thread Roberto Riggio

On 07/12/2010 04:41 PM, Jo-Philipp Wich wrote:

is there an openwrt way for a package to execute
some script at the first boot?
 

Yes, put it into /etc/uci-defaults/, it will get executed once and
removed afterwards.
   

When is the code being executed?

What I'm trying to do is to implement dynamic labeling of the
hotspot according to some local parameter. basically I want
to read the eth0 mac address and use it as suffix for the ssid

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


Re: [OpenWrt-Devel] Execute some script at the first boot

2010-07-12 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> When is the code being executed?

In /etc/init.d/boot, after preinit but before module loading and hotplug
availability.


~ Jow
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkw7QBkACgkQdputYINPTPPthACfcWnIvVkFXWB5ZZG+KHuzo+9U
FbsAnRX1Zlib/OK1I2SVfe+Sh87bI/U0
=xsqO
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Is r22145 not a little bit short-sighted?

2010-07-12 Thread Matthias Buecher / Germany
Just saw r22145 and was wondering why this has been changed.
What if 2.8 changes again the suffix? Re-replace everything?
If someone is still compiling 2.4 for any reason with latest trunk he
will have problems (lots of manual changes).

I think the previous situation was a good general solution for all times
coming.
Only the check could have been against >= 2.6

This is just my two cents for QA.
No offense to the committer, I know this was just a clean-up.

Kind regards
Maddes

-- 
http://www.maddes.net/
Home: Earth / Germany / Ruhr-Area
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Wireless Interface

2010-07-12 Thread RHS Linux User

  FWIW, the first interface has different properties from the others.

  wiz


On Mon, 12 Jul 2010, Jo-Philipp Wich wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi.
> 
> If you rely on a certain order of wifi ifaces you're most likely doing
> sth. wrong. Explain some more why you need it.
> 
> ~ Jow
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkw7O9EACgkQdputYINPTPPr1gCfVKNhS6oL9rWRL57fziydAzJ7
> a9AAn3hx1s6707e4NTQ+ZU2Cgktlc7eL
> =5H35
> -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] [PATCH] comgt

2010-07-12 Thread Michael Grigorev
Signed-off-by: Michael Grigorev 

Index: package/comgt/patches/004-CHANGELOG.diff
===
--- package/comgt/patches/004-CHANGELOG.diff (revision 0)
+++ package/comgt/patches/004-CHANGELOG.diff (revision 0)
@@ -0,0 +1,18 @@
+--- a/CHANGELOG Fri Oct 20 20:49:46 2006
 b/CHANGELOG Tue Jul 13 09:38:59 2010
+@@ -1,7 +1,14 @@
+-Change log $Id: CHANGELOG,v 1.3 2006/10/20 14:30:19 pharscape Exp $
++Change log $Id: CHANGELOG,v 1.4 2010/02/26 00:09:08 gknauf Exp $
+ ==
+ Changes to comgt
+ 
++Tues Jul. 13th 2010 Michael Grigorev
++- fixed use CGREG for registration checking
++
++Fri Feb. 26th 2010 Guenter Knauf
++- fixed typo in builtin script APN (bug ID 1610044).
++- silenced compiler warning (patch ID 1667936).
++
+ Fri Oct. 20th 2006 Paul Hardwick
+ - Scripts distributed with package are now located in scripts
sub-directory
+ - Install now copies scripts to /etc/comgt see scripts/README for list
of scripts
Index: package/comgt/patches/002-comgt.c.diff
===
--- package/comgt/patches/002-comgt.c.diff (revision 0)
+++ package/comgt/patches/002-comgt.c.diff (revision 0)
@@ -0,0 +1,26 @@
+--- a/comgt.c Fri Oct 20 20:49:46 2006
 b/comgt.c Tue Jul 13 09:31:23 2010
+@@ -22,7 +22,7 @@
+  */
+
+
/***
+-* $Id: comgt.c,v 1.4 2006/10/20 14:30:19 pharscape Exp $
++* $Id: comgt.c,v 1.5 2010/02/25 23:47:30 gknauf Exp $
+
/
+
+
+@@ -1539,7 +1539,7 @@
+   unsigned char terminator='\n';
+   char *devenv,line[STRINGL];
+
+-  //Load up the COMGT device env variable if it exists
++  /* Load up the COMGT device env variable if it exists */
+   devenv = getenv("COMGTDEVICE");
+   if (devenv != NULL && strlen(devenv)){
+   strcpy(device,devenv);
+@@ -1737,4 +1737,5 @@
+   sprintf(msg,"Exit with code %d.\n",a);
+   vmsg(msg);
+   ext(a);
++  return 0; /* NOTREACHED */
+ }
Index: package/comgt/patches/003-comgt.h.diff
===
--- package/comgt/patches/003-comgt.h.diff (revision 0)
+++ package/comgt/patches/003-comgt.h.diff (revision 0)
@@ -0,0 +1,48 @@
+--- a/comgt.h Fri Oct 20 20:49:46 2006
 b/comgt.h Tue Jul 13 09:36:18 2010
+@@ -20,10 +20,10 @@
+
***/
+
+
/***
+-* $Id: comgt.h,v 1.4 2006/10/20 14:30:19 pharscape Exp $
++* $Id: comgt.h,v 1.5 2010/02/25 23:25:57 gknauf Exp $
+
/
+-#define COMGT_VERSION "0.32"
+-#define YEARS "2005,2006"
++#define COMGT_VERSION "0.33"
++#define YEARS "2005,2006,2010"
+
+ char _default_code[] =
+ "opengt\n\
+@@ -83,8 +83,8 @@
+ print \"Waiting for Registration..(120 sec max)\"\n\
+ let c = 0\n\
+   :waitreg\n\
+-send \"AT+CREG?^m\"\n\
+-waitfor 2 \"+CREG: 0,1\",\"+CREG: 0,5\"\n\
++send \"AT+CGREG?^m\"\n\
++waitfor 2 \"+CGREG: 0,1\",\"+CGREG: 0,5\"\n\
+ if % = -1 goto regagain\n\
+ if % = 0 goto homereg\n\
+ if % = 1 goto roamreg\n\
+@@ -470,13 +470,17 @@
+ if a=0 goto apnerror\n\
+ if a>32 goto apnerror\n\
+   :enterapn\n\
+-send \"AT+CGDCONT=1,\\\"IP\\\",\\\"\n\
+-send $c\n\
++send \"AT+CGDCONT=1,\\\"IP\\\",\\\"\"\n\
++send $x\n\
+ send \"\\\"^m\"\n\
+ waitfor 20 \"OK\",\"ERR\"\n\
+ if % = -1 goto timeerror\n\
+ if % = 0 goto OK\n\
+-if % = 1 goto apnerror\n\
++if % = 1 goto apnseterror\n\
++  :apnseterror\n\
++print \"ERROR entering APN\n\"\n\
++print \"The device did not accept the APN set command\n\"\n\
++exit 1\n\
+   :apnerror\n\
+ print \"ERROR entering APN\n\"\n\
+ print \"The COMGTAPN env variable is not set\n\"\n\
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Using xkeyboard-config with openwrt

2010-07-12 Thread Chris Schimp
hello,
I had some issues setting up Xorg on my kirkwood platform device. My issue 
after installing X was that it would fail to accept keyboard issue due to 
"(EE) XKB: Couldn't open rules file /usr/share/X11/xkb/rules/evdev" I found the 
file to be missing, and that on my gentoo system was provided by 
xkeyboard-config,
which seems to replace xkbdata. I created an xkeyboard-config package for 
openwrt and installed it leading me to find that "/usr/share/X11/XKeysymDB"  
was missing, which is normally provided by libX11. I patched the libX11 
Makefile to include the files that it normally installs in "/usr/share/X11". 
With "/usr/share/X11/XKeysymDB" missing, the keyboard would fail to work in 
Xorg and when starting Xorg you would be presented with a bunch of errors like:

expected keysym, got XF86_Switch_VT_1: line 8 of xfree86
expected keysym, got XF86_Switch_VT_2: line 11 of xfree86

With my patch to the libX11 Makefile to put the contents it installs into 
"/usr/share/X11/" Xorg works correctly.
Included inline are the two patches I created, I hope I have done this 
correctly, for this is the first time I have ever submitted patches to 
anything(I will happily accept criticism and suggestions to get better at this) 
 

Signed-off-by: Chris Schimp 

Index: Xorg/xorg/data/xkeyboard-config/Makefile
===
--- Xorg/xorg/data/xkeyboard-config/Makefile(revision 0)
+++ Xorg/xorg/data/xkeyboard-config/Makefile(revision 0)
@@ -0,0 +1,38 @@
+#
+# Copyright (C) 2008-2010 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:=xkeyboard-config
+PKG_VERSION:=1.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://xlibs.freedesktop.org/xkbdesc/
+PKG_INSTALL:=1
+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/xkeyboard-config
+  SECTION:=xorg-data
+  CATEGORY:=Xorg
+  SUBMENU:=data
+  TITLE:=xkeyboard-config
+  URL:=http://freedesktop.org/wiki/Software/XKeyboardConfig
+endef
+
+define Build/Configure
+   $(call Build/Configure/Default)
+endef
+define Package/xkeyboard-config/install
+  $(INSTALL_DIR) $(1)/usr/share/X11/xkb
+$(CP) -v $(PKG_INSTALL_DIR)/usr/share/X11/xkb \
+  $(1)/usr/share/X11/
+endef
+
+$(eval $(call BuildPackage,xkeyboard-config))


Index: feeds/packages/Xorg/xorg/lib/libX11/Makefile
===
--- feeds/packages/Xorg/xorg/lib/libX11/Makefile(revision 22124)
+++ feeds/packages/Xorg/xorg/lib/libX11/Makefile(working copy)
@@ -74,9 +74,13 @@
 
 define Package/libX11/install
$(INSTALL_DIR) $(1)/usr/lib
+   $(INSTALL_DIR) $(1)/usr/share/X11
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/*.so* \
$(1)/usr/lib/
+   $(CP)  \
+   $(PKG_INSTALL_DIR)/usr/share/X11/* \
+   $(1)/usr/share/X11
 endef
 
 $(eval $(call Feature,libX11))

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