Re: [OpenWrt-Devel] [PATCH] packages/debootstrap: update to version 1.0.40

2012-04-26 Thread Luka Perkov
On Fri, Apr 27, 2012 at 03:24:36AM +0300, Daniel Golle wrote:
> The old version is not available on the mirror any longer, which made
> me update it.

I'll test and apply it this weekend.

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


[OpenWrt-Devel] [PATCH] packages/debootstrap: update to version 1.0.40

2012-04-26 Thread Daniel Golle
The old version is not available on the mirror any longer, which made
me update it.

Signed-off-by: Daniel Golle 


Index: admin/debootstrap/patches/100-busybox_fix.patch
===
--- admin/debootstrap/patches/100-busybox_fix.patch (revision 31477)
+++ admin/debootstrap/patches/100-busybox_fix.patch (working copy)
@@ -1,6 +1,8 @@
 a/usr/share/debootstrap/functions
-+++ b/usr/share/debootstrap/functions
-@@ -839,8 +839,6 @@ choose_extractor () {
+Index: debootstrap-1.0.40/usr/share/debootstrap/functions
+===
+--- debootstrap-1.0.40.orig/usr/share/debootstrap/functions
 debootstrap-1.0.40/usr/share/debootstrap/functions
+@@ -832,8 +832,6 @@ choose_extractor () {
  
if [ -n "$EXTRACTOR_OVERRIDE" ]; then
extractor="$EXTRACTOR_OVERRIDE"
Index: admin/debootstrap/Makefile
===
--- admin/debootstrap/Makefile  (revision 31477)
+++ admin/debootstrap/Makefile  (working copy)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=debootstrap
-PKG_VERSION:=1.0.38
+PKG_VERSION:=1.0.40
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/debootstrap
-PKG_MD5SUM:=9bc9c55504c73bad27105aeed1a94f42
+PKG_MD5SUM:=298ed4d39eda12b9db46f446465d6f7f
 
 UNPACK_CMD=ar -p "$(DL_DIR)/$(PKG_SOURCE)" data.tar.gz | ( cd $(1) && tar -xzf 
- )
 


pgpBcWdHWKe33.pgp
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Snapshot chmod request

2012-04-26 Thread Ray Gibson
Would someone please chmod a+r 
http://downloads.openwrt.org/snapshots/trunk/ar71xx/config or point me 
to another copy?  It's currently 403.


--
Ray Gibson





This communication constitutes an electronic communication within the meaning 
of the Electronic Communications Privacy Act, 18 USC 2510, and its disclosure 
is strictly limited to the recipient intended by the sender of this message. 
This e-mail and any files transmitted with it are proprietary and intended for 
the sole use of the individual or entity to whom they are addressed. They are 
not to be viewed, shared, copied or forwarded, regardless to whom, without the 
expressed permission of Future Concepts I.S., Inc. If you have received this 
e-mail in error, please notify the sender and immediately delete it from your 
system. Thank you.

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


Re: [OpenWrt-Devel] [PATCH] New package NUT 2.6.3 (RESENT)

2012-04-26 Thread Abaakouk Mehdi

RESENT: Updated patch with last remarks fixed


Makefile and patch for package NUT 2.6.3

Signed-off-by: Mehdi Abaakouk 


Index: utils/nut/patches/001-fix-missing-libmath-flags.patch
===
--- utils/nut/patches/001-fix-missing-libmath-flags.patch   (revision 0)
+++ utils/nut/patches/001-fix-missing-libmath-flags.patch   (revision 0)
@@ -0,0 +1,11 @@
+--- nut-2.6.3.orig/drivers/Makefile.am	2011-12-05 16:36:46.0 
+0100

 nut-2.6.3/drivers/Makefile.am  2012-04-19 10:51:52.152059206 +0200
+@@ -165,7 +165,7 @@
+ tripplite_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm
+
+ bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c usb-common.c
+-bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS)
++bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm
+
+ blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c usb-common.c
+ blazer_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm
Index: utils/nut/Makefile
===
--- utils/nut/Makefile  (revision 0)
+++ utils/nut/Makefile  (revision 0)
@@ -0,0 +1,215 @@
+#
+# Copyright (C) 2006-2012 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:=nut
+PKG_VERSION:=2.6.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.6/
+PKG_MD5SUM:=8db00c21f8bc03add6e14d15f634ec6a
+
+PKG_BUILD_DEPENDS:=libusb libnetsnmp
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+PKG_BUILD_PARALLEL:=1
+
+define Package/nut/Default
+  URL:=http://www.networkupstools.org/
+  TITLE:= Network UPS Tools
+  DEPENDS:=@USB_SUPPORT +libnetsnmp
+  SECTION:=utils
+  CATEGORY:=Utilities
+endef
+
+define Package/nut/description
+  Network UPS Tools (NUT) is a client/server monitoring system that
+  allows computers to share uninterruptible power supply (UPS) and
+  power distribution unit (PDU) hardware. Clients access the hardware
+  through the server, and are notified whenever the power status
+  changes.
+endef
+
+define Package/nut
+$(call Package/nut/Default)
+  MENU:=1
+#  TITLE+= (common)
+endef
+
+define Package/nut-server
+$(call Package/nut/Default)
+  TITLE+= (server)
+  DEPENDS+= nut
+endef
+
+define Package/nut-client
+$(call Package/nut/Default)
+  TITLE+= (client)
+  DEPENDS+= nut
+endef
+
+define Package/nut-logger
+$(call Package/nut/Default)
+  TITLE+= (logger)
+  DEPENDS+= nut
+endef
+
+define Package/nut-monitor
+$(call Package/nut/Default)
+  TITLE+= (monitor)
+  DEPENDS+= nut
+endef
+
+define Package/nut/install
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(INSTALL_DIR) $(1)/etc/nut
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupsclient.so* $(1)/usr/lib/
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/nut.conf.sample 
$(1)/etc/nut/nut.conf
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/ups.conf.sample 
$(1)/etc/nut/ups.conf

+endef
+
+define Package/nut/conffiles
+/etc/nut/nut.conf
+/etc/nut/ups.conf
+endef
+
+define Package/nut-client/install
+   $(INSTALL_DIR) $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upsc $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upsrw $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upscmd $(1)/usr/bin
+endef
+
+define Package/nut-server/install
+   $(INSTALL_DIR) $(1)/etc/nut
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_DIR) $(1)/lib/nut
+   $(INSTALL_DIR) $(1)/usr/share/nut
+
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsd $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/nut/upsdrvctl $(1)/lib/nut
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsd.conf.sample 
$(1)/etc/nut/upsd.conf
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsd.users.sample 
$(1)/etc/nut/upsd.users
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/nut/cmdvartab 
$(1)/usr/share/nut/cmdvartab
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/nut/driver.list 
$(1)/usr/share/nut/driver.list

+endef
+
+define Package/nut-server/conffiles
+/etc/nut/upsd.users
+/etc/nut/upsd.conf
+endef
+
+define Package/nut-logger/install
+   $(INSTALL_DIR) $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upslog $(1)/usr/bin
+endef
+
+define Package/nut-monitor/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_DIR) $(1)/etc/nut
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsmon $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upssched $(1)/usr/sbin
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsmon.conf.sample 
$(1)/etc/nut/upsmon.conf
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upssched.conf.sample 
$(1)/etc/nut/upssched.conf

+endef
+
+define Package/nut-monitor/conffiles
+/etc/nut/upsmon.conf
+/etc/nut/upssched.conf
+endef
+
+NUT_DRIVERS :=
+
+define driver
+  define Package/nut-driver-$(strip $(1))
+$(call Package/nut/Default)
+TITLE+= ($(strip $(1)) driver)

Re: [OpenWrt-Devel] AT91: what's happening ?

2012-04-26 Thread Christian Gagneraud

On 24/04/12 07:52, Claudio Mignanti wrote:

Hi Christian Gagneraud,

Il 23 aprile 2012 14:52, Christian Gagneraud  ha scritto:

Hi all,

I've manifested my interest in the AT91 a couple of weeks ago, and nobody
even answer any of my calls.
I would like to work hand in hand with other peoples that use AT91 based
boards.
Obviously, someone started some important modifications on the at91
directory, which look like a good idea to me, but my point is that why this
person never speak about these changes on the mailing list.
One of the big change is the linux version bump, now it seems that it has to
be the untested 3.3.2 instead of the working 2.6.38.8.


Well, important changes was applied to at91 target and subtarget, as
you can see those improvement is not only related to the at91 target
but to the whole OpenWrt project. Our intention is to update all
target to latest kernel and than make a new release soon, so the
kernel dump is a the first step in this direction.


Could this person gives details on what the plans are for the AT91 target?
Maybe we could share some thoughts and ideas.

I have access to the stamp9G20 and the portux9G20, so i can tests these two
boards. I really would like to help and contribute, but it would be nice if
the plans are known in advance.



The spare time is always a rare resource and the facto I didn't
develop this target until a couple of days ago.
So I start to read all the missing think that was remarked on mailing
list (few topics in a years, not exactly a famous platform) and also
your interest to stampg20 was noted.
The Stampg20 is now merged with the old netus subtaget inside the new
9g20 subtarget, the reorganization was mainly done to avoid the
increase of subtarget that are all using the same SoC.
https://dev.openwrt.org/browser/trunk/target/linux/at91/9g20/config-default

The default image generated by buildbot should work on StampG20, and
other G20 card enabled as well.
Hope that this can help.


Hi Claudio,

I'm updating the few patches I have here, and will send them soon to the 
list.


There are 2 patches I would like your opinion.

The first one concerns the uImage generation. In the target's Makefile 
the uImage is generated without compression, and then only for the 
flexibility board is copied over the rootfs.
Other boards use a separate MTD partition for the kernel, and needs a 
compressed kernel.
So this first patch move the mkimage call inside the "if flexibility" 
and fallback for the other boards to the already built (and compressed) 
image found in the kernel built tree.

Do you have any issue with that?

The second one concerns the SPI CS pins, there's a patch that "hijack" 
the SPI pins definition (805-free_some_portc_pins.patch), in my case 
this is not wanted. Do you know which board requires this? Is this patch 
still needed since you removed some boards recently?


Regards,
Chris




Claudio

PS I just discover that some empty directories are not deleted by the
git dcommit and it is really frustating to deal with svn-git
inteoperability issues... some additional cleanup will follow.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



--
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] compcache compile fix > linux 2.6.38

2012-04-26 Thread Christoph Thielecke
Hello,

I just build trunk and the compcache package was enabled and failed to build. 
After some research I found that bd_claim/bd_release has been changed with 
commit 
http://git.cmpxchg.org/?p=linux-mmotm.git;a=commitdiff_plain;h=e525fd89d380c4a94c0d63913a1dd1a593ed25e7

Here is the patch and the module compiles again ;)


With best regards

Christoph
-- 
Linux User Group Wernigerode
http://www.lug-wr.de/
--- a/ramzswap_drv.c	2012-04-26 14:58:10.017908430 +0200
+++ b/ramzswap_drv.c	2012-04-26 15:08:09.005924115 +0200
@@ -525,7 +525,11 @@
 
 	if (S_ISBLK(inode->i_mode)) {
 		bdev = I_BDEV(inode);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
+		blkdev_get(bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL, setup_backing_swap);
+#else
 		ret = bd_claim(bdev, setup_backing_swap);
+#endif
 		if (ret < 0) {
 			bdev = NULL;
 			goto bad_param;
@@ -557,7 +561,11 @@
 
 bad_param:
 	if (bdev)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
+		blkdev_put(bdev, FMODE_READ | FMODE_WRITE | FMODE_EXCL);
+#else
 		bd_release(bdev);
+#endif
 	filp_close(swap_file, NULL);
 
 out:
@@ -1097,7 +1105,11 @@
 	/* Close backing swap device, if present */
 	if (rzs->backing_swap) {
 		if (is_backing_blkdev)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
+			blkdev_put(rzs->backing_swap, FMODE_READ | FMODE_WRITE | FMODE_EXCL);
+#else
 			bd_release(rzs->backing_swap);
+#endif
 		filp_close(rzs->swap_file, NULL);
 		rzs->backing_swap = NULL;
 		memset(rzs->backing_swap_name, 0, MAX_SWAP_NAME_LEN);


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 support for Huawei E970

2012-04-26 Thread Mathias Adam

Hi Hauke,

Am 25.04.2012 23:43, schrieb Hauke Mehrtens:

Hi Mathias,

sorry for answering so late. I haven't seen this patch since now.


don't worry. Thanks for picking it up now.


On 12/17/2011 09:46 PM, Mathias Adam wrote:

This patch adds support for Huawei E970 wireless gateway devices.
It has been tested on an E970 labelled as T-Mobile web'n'walk Box IV.
E960/B970 should work too, from what I know it's basically the same hardware.

The device has a Broadcom BCM5354 SoC and a built-in 3G USB modem.
For reference, it has already been addressed in this open ticket:


The device has a hardware watchdog which needs GPIO-7 to be toggled at least
every 1-2 seconds. Therefore a timer is being setup early in the boot process
in order to take care of this  (see arch/mips/bcm47xx/time.c).

Tested and works:  3G wan,  wlan+LED,  VLAN config,  failsafe using reset
button,   image to be used for upgrade from OEM firmware's web interface

Link to the wiki page I've created:

Issues:

* lzma-loader crashes, so gzipped kernel is used. Presumably due to watchdog
   reset during kernel decompress.
* b43 wireless driver crashes after loading firmware, use proprietary module
   (wl) instead. Perhaps due to watchdog, too.


In fact it's not only the driver crashing but the whole system doing an 
immediate reboot.




(kernel patch below)

Signed-off-by: Mathias Adam

---

Index: target/linux/brcm47xx/image/Makefile
===
--- target/linux/brcm47xx/image/Makefile(Revision 29557)
+++ target/linux/brcm47xx/image/Makefile(Arbeitskopie)
@@ -13,6 +13,7 @@

  define Image/Prepare
cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 
-lp2 -pb2>  $(KDIR)/vmlinux.lzma
+   gzip -nc9 $(KDIR)/vmlinux>  $(KDIR)/vmlinux.gz
rm -f $(KDIR)/loader.gz
$(MAKE) -C lzma-loader \
BUILD_DIR="$(KDIR)" \
@@ -51,6 +52,11 @@
$(STAGING_DIR_HOST)/bin/trx2edips $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx 
$(BIN_DIR)/openwrt-$(2)-$(3).bin
  endef

+define Image/Build/Huawei
+   cp ./huawei-e970-padding $(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin

where is huawei-e970-padding ?

cp: cannot stat `./huawei-e970-padding': No such file or directory


my mistake. As it's binary it wasn't included in the patch.
I attach it to this mail. The patch expects it to be in:
target/linux/brcm47xx/image/




+   cat $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx>>  
$(BIN_DIR)/openwrt-$(2)-$(3)-gz.bin
+endef
+
  define trxalign/jffs2-128k
  -a 0x2 -f $(KDIR)/root.$(1)
  endef
@@ -107,9 +113,13 @@
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
$(call trxalign/$(1),$(1))
+   $(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1)-gz.trx \
+   -f $(KDIR)/vmlinux.gz \
+   $(call trxalign/$(1),$(1))
$(call Image/Build/$(1),$(1))
$(call Image/Build/Motorola,$(1),wr850g,1,$(1))
$(call Image/Build/USR,$(1),usr5461,$(1))
+   $(call Image/Build/Huawei,$(1),e970,$(1))
$(call Image/Build/Chk,$(1),wnr834b_v2,U12H081T00_NETGEAR,2,$(patsubst 
jffs2-%,jffs2,$(1)))
  # $(call Image/Build/Chk,$(1),wndr3400_v1,U12H155T00_NETGEAR,2,$(patsubst 
jffs2-%,jffs2,$(1)))
  # $(call Image/Build/Chk,$(1),wgr614_v8,U12H072T00_NETGEAR,2,$(patsubst 
jffs2-%,jffs2,$(1)))
Index: package/broadcom-diag/src/diag.c
===
--- package/broadcom-diag/src/diag.c(Revision 29557)
+++ package/broadcom-diag/src/diag.c(Arbeitskopie)
@@ -142,6 +142,9 @@

/* Edimax */
PS1208MFG,
+
+   /* Huawei */
+   HUAWEI_E970,
  };

  static void __init bcm4780_init(void) {
@@ -921,6 +924,16 @@
{ .name = "wlan", .gpio = 1<<  0, .polarity = 
NORMAL },
},
},
+   /* Huawei */
+   [HUAWEI_E970] = {
+   .name   = "Huawei E970",
+   .buttons= {
+   { .name = "reset",.gpio = 1<<  6 },
+   },
+   .leds = {
+   { .name = "wlan", .gpio = 1<<  0, .polarity = 
NORMAL },
+   },
+   },
  };

  static struct platform_t __init *platform_detect(void)
@@ -1155,6 +1168,9 @@
!strcmp(getvar("status_gpio"), "1")) /* gpio based detection */
return&platforms[PS1208MFG];

+   if (!strcmp(boardnum, "0x5347")&&  !strcmp(boardtype, "0x048e"))  /* 
Huawei E970 */
+   return&platforms[HUAWEI_E970];
+
/* not found */
return NULL;
  }


---

following patch has to be applied to kernel (3.0):


diff -Nur a/arch/mips/bcm47xx/time.c b/arch/mips/bcm47xx/time.c
--- a/arch/mips/bcm47xx/time.c  2011-11-29 16:51:22.0 +0100
+++ b/arch/mips/b

[OpenWrt-Devel] fixed Wi-Fi from UR-336UN

2012-04-26 Thread Дмитрий Лебедев
Index: target/linux/ramips/image/Makefile
===
--- target/linux/ramips/image/Makefile (revision 31481)
+++ target/linux/ramips/image/Makefile (working copy)
@@ -414,7 +414,7 @@


 define Image/Build/Profile/UPVEL
- $(call
Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,ur-336un,UR-336UN,ttyS1,57600,phys)
+ $(call
Image/Build/Template/$(fs_squash)/$(1),GENERIC_8M,ur-336un,UR-336UN,ttyS1,57600,phys)
 endef

 define Image/Build/Profile/WR6202
Index:
target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
===
--- target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
(revision
31481)
+++ target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
(working
copy)
@@ -75,6 +75,7 @@
  wli-tx4-ag300n | \
  wr512-3gn | \
  wr6202 | \
+ ur-336un | \
  xdxrn502j)
  rt2x00_eeprom_extract "factory" 0 272
  ;;

-- 
Lebedev Dmitry 


ur-336un.patch
Description: Binary data
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] New package NUT 2.6.3

2012-04-26 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

comments inline.

> Index: utils/nut/patches/001-fix-missing-libmath-flags.patch 
> ===
>
> 
- --- utils/nut/patches/001-fix-missing-libmath-flags.patch(revision 0)
> +++ utils/nut/patches/001-fix-missing-libmath-flags.patch
> (revision 0) @@ -0,0 +1,11 @@ +---
> nut-2.6.3.orig/drivers/Makefile.am2011-12-05
> 16:36:46.0 +0100  nut-2.6.3/drivers/Makefile.am
> 2012-04-19 10:51:52.152059206 +0200 +@@ -165,7 +165,7 @@ +
> tripplite_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm + +
> bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c usb-common.c 
> +-bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) 
> ++bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm + +
> blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c usb-common.c +
> blazer_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm Index:
> utils/nut/Makefile 
> ===
>
> 
- --- utils/nut/Makefile(revision 0)
> +++ utils/nut/Makefile(revision 0) @@ -0,0 +1,217 @@ +# +#
> Copyright (C) 2006-2010 OpenWrt.org

2012

> +# +# This is free software, licensed under the GNU General Public
> License v2. +# See /LICENSE for more information. +# + +include
> $(TOPDIR)/rules.mk + +PKG_NAME:=nut +PKG_VERSION:=2.6.3 
> +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
> +PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.6/ 
> +PKG_MD5SUM:=8db00c21f8bc03add6e14d15f634ec6a + 
> +PKG_BUILD_DEPENDS:=libusb libnetsnmp +PKG_FIXUP:=libtool
> autoreconf

Remove libtool. Both fixups are equivalent.

> +PKG_INSTALL:=1 + +PKG_BUILD_PARALLEL:=1 + +define
> Package/nut/Default +  URL:=http://www.networkupstools.org/ +
> TITLE:= Network UPS Tools +  DEPENDS:=@USB_SUPPORT +libnetsnmp +
> SECTION:=utils +  CATEGORY:=Utilities +endef + +define
> Package/nut/description +  Network UPS Tools (NUT) is a
> client/server monitoring system that +  allows computers to share
> uninterruptible power supply (UPS) and +  power distribution unit
> (PDU) hardware. Clients access the hardware +  through the server,
> and are notified whenever the power status +  changes. +endef + 
> +define Package/nut +$(call Package/nut/Default) +  MENU:=1 +#
> TITLE+= (common) +endef + +define Package/nut-server +$(call
> Package/nut/Default) +  TITLE+= (server) +  DEPENDS+= nut +endef + 
> +define Package/nut-client +$(call Package/nut/Default) +  TITLE+=
> (client) +  DEPENDS+= nut +endef + +define Package/nut-logger 
> +$(call Package/nut/Default) +  TITLE+= (logger) +  DEPENDS+= nut 
> +endef + +define Package/nut-monitor +$(call Package/nut/Default) +
> TITLE+= (monitor) +  DEPENDS+= nut +endef + +define
> Package/nut/install +$(INSTALL_DIR) $(1)/usr/lib +
> $(INSTALL_DIR) $(1)/etc/nut +$(CP)
> $(PKG_INSTALL_DIR)/usr/lib/libupsclient.so* $(1)/usr/lib/ +
> $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/nut.conf.sample 
> $(1)/etc/nut/nut.conf +$(INSTALL_CONF)
> $(PKG_INSTALL_DIR)/etc/nut/ups.conf.sample $(1)/etc/nut/ups.conf 
> +endef + +define Package/nut/conffiles +/etc/nut/nut.conf 
> +/etc/nut/ups.conf +endef + +define Package/nut-client/install +
> $(INSTALL_DIR) $(1)/usr/bin +$(INSTALL_BIN)
> $(PKG_INSTALL_DIR)/usr/bin/upsc $(1)/usr/bin +$(INSTALL_BIN)
> $(PKG_INSTALL_DIR)/usr/bin/upsrw $(1)/usr/bin +$(INSTALL_BIN)
> $(PKG_INSTALL_DIR)/usr/bin/upscmd $(1)/usr/bin +endef + +define
> Package/nut-server/install +$(INSTALL_DIR) $(1)/etc/nut +
> $(INSTALL_DIR) $(1)/usr/sbin +$(INSTALL_DIR) $(1)/lib/nut +
> $(INSTALL_DIR) $(1)/usr/share/nut + +$(INSTALL_BIN)
> $(PKG_INSTALL_DIR)/usr/sbin/upsd $(1)/usr/sbin +$(INSTALL_BIN)
> $(PKG_INSTALL_DIR)/lib/nut/upsdrvctl $(1)/lib/nut +
> $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsd.conf.sample 
> $(1)/etc/nut/upsd.conf +$(INSTALL_CONF)
> $(PKG_INSTALL_DIR)/etc/nut/upsd.users.sample 
> $(1)/etc/nut/upsd.users +$(INSTALL_DATA)
> $(PKG_INSTALL_DIR)/usr/share/nut/cmdvartab 
> $(1)/usr/share/nut/cmdvartab +$(INSTALL_DATA)
> $(PKG_INSTALL_DIR)/usr/share/nut/driver.list 
> $(1)/usr/share/nut/driver.list +endef + +define
> Package/nut-server/conffiles +/etc/nut/upsd.users 
> +/etc/nut/upsd.conf +endef + +define Package/nut-logger/install +
> $(INSTALL_DIR) $(1)/usr/bin +$(INSTALL_BIN)
> $(PKG_INSTALL_DIR)/usr/bin/upslog $(1)/usr/bin +endef + +define
> Package/nut-monitor/install +$(INSTALL_DIR) $(1)/usr/sbin +
> $(INSTALL_DIR) $(1)/etc/nut +$(INSTALL_BIN)
> $(PKG_INSTALL_DIR)/usr/sbin/upsmon $(1)/usr/sbin +
> $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upssched $(1)/usr/sbin +
> $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsmon.conf.sample 
> $(1)/etc/nut/upsmon.conf +$(INSTALL_CONF)
> $(PKG_INSTALL_DIR)/etc/nut/upssched.conf.sample 
> $(1)/etc/nut/upssched.conf +endef + +define
> Package/nut-monitor/conffiles +/etc/nut/upsmon.conf 
> +/etc/nut/upssched.conf +endef + +NUT_DRIVERS := + +define dr

[OpenWrt-Devel] [PATCH] New package NUT 2.6.3

2012-04-26 Thread Abaakouk Mehdi


Makefile and patch for package NUT 2.6.3

Signed-off-by: Mehdi Abaakouk 

Index: utils/nut/patches/001-fix-missing-libmath-flags.patch
===
--- utils/nut/patches/001-fix-missing-libmath-flags.patch   (revision 0)
+++ utils/nut/patches/001-fix-missing-libmath-flags.patch   (revision 0)
@@ -0,0 +1,11 @@
+--- nut-2.6.3.orig/drivers/Makefile.am	2011-12-05 16:36:46.0 
+0100

 nut-2.6.3/drivers/Makefile.am  2012-04-19 10:51:52.152059206 +0200
+@@ -165,7 +165,7 @@
+ tripplite_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm
+
+ bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c usb-common.c
+-bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS)
++bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm
+
+ blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c usb-common.c
+ blazer_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm
Index: utils/nut/Makefile
===
--- utils/nut/Makefile  (revision 0)
+++ utils/nut/Makefile  (revision 0)
@@ -0,0 +1,217 @@
+#
+# Copyright (C) 2006-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:=nut
+PKG_VERSION:=2.6.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.6/
+PKG_MD5SUM:=8db00c21f8bc03add6e14d15f634ec6a
+
+PKG_BUILD_DEPENDS:=libusb libnetsnmp
+PKG_FIXUP:=libtool autoreconf
+PKG_INSTALL:=1
+
+PKG_BUILD_PARALLEL:=1
+
+define Package/nut/Default
+  URL:=http://www.networkupstools.org/
+  TITLE:= Network UPS Tools
+  DEPENDS:=@USB_SUPPORT +libnetsnmp
+  SECTION:=utils
+  CATEGORY:=Utilities
+endef
+
+define Package/nut/description
+  Network UPS Tools (NUT) is a client/server monitoring system that
+  allows computers to share uninterruptible power supply (UPS) and
+  power distribution unit (PDU) hardware. Clients access the hardware
+  through the server, and are notified whenever the power status
+  changes.
+endef
+
+define Package/nut
+$(call Package/nut/Default)
+  MENU:=1
+#  TITLE+= (common)
+endef
+
+define Package/nut-server
+$(call Package/nut/Default)
+  TITLE+= (server)
+  DEPENDS+= nut
+endef
+
+define Package/nut-client
+$(call Package/nut/Default)
+  TITLE+= (client)
+  DEPENDS+= nut
+endef
+
+define Package/nut-logger
+$(call Package/nut/Default)
+  TITLE+= (logger)
+  DEPENDS+= nut
+endef
+
+define Package/nut-monitor
+$(call Package/nut/Default)
+  TITLE+= (monitor)
+  DEPENDS+= nut
+endef
+
+define Package/nut/install
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(INSTALL_DIR) $(1)/etc/nut
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libupsclient.so* $(1)/usr/lib/
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/nut.conf.sample 
$(1)/etc/nut/nut.conf
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/ups.conf.sample 
$(1)/etc/nut/ups.conf

+endef
+
+define Package/nut/conffiles
+/etc/nut/nut.conf
+/etc/nut/ups.conf
+endef
+
+define Package/nut-client/install
+   $(INSTALL_DIR) $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upsc $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upsrw $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upscmd $(1)/usr/bin
+endef
+
+define Package/nut-server/install
+   $(INSTALL_DIR) $(1)/etc/nut
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_DIR) $(1)/lib/nut
+   $(INSTALL_DIR) $(1)/usr/share/nut
+
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsd $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/nut/upsdrvctl $(1)/lib/nut
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsd.conf.sample 
$(1)/etc/nut/upsd.conf
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsd.users.sample 
$(1)/etc/nut/upsd.users
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/nut/cmdvartab 
$(1)/usr/share/nut/cmdvartab
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/nut/driver.list 
$(1)/usr/share/nut/driver.list

+endef
+
+define Package/nut-server/conffiles
+/etc/nut/upsd.users
+/etc/nut/upsd.conf
+endef
+
+define Package/nut-logger/install
+   $(INSTALL_DIR) $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upslog $(1)/usr/bin
+endef
+
+define Package/nut-monitor/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(INSTALL_DIR) $(1)/etc/nut
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upsmon $(1)/usr/sbin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/upssched $(1)/usr/sbin
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsmon.conf.sample 
$(1)/etc/nut/upsmon.conf
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upssched.conf.sample 
$(1)/etc/nut/upssched.conf

+endef
+
+define Package/nut-monitor/conffiles
+/etc/nut/upsmon.conf
+/etc/nut/upssched.conf
+endef
+
+NUT_DRIVERS :=
+
+define driver
+  define Package/nut-driver-$(strip $(1))
+$(call Package/nut/Default)
+TITLE+= ($(strip $(1)) driver)
+DEPENDS+=libusb nut-server
+  endef

Re: [OpenWrt-Devel] [PATCH] usbip: update userspace to match kernel part (UPDATED)

2012-04-26 Thread Abaakouk Mehdi


Update: md5sum of usb.ids have been updated.

After kernel 2.6.39, usbip kernel and userspace are in kernel tree
The new kernel modules names have already been updated in openwrt for
kernel > 2.6.39

This patch, allow to build the new corresponding usbip userspace tool
when of the device use a kernel > 2.6.39
And continue to build version 0.1.7 for older version.

Fix #10992

Signed-off-by: Mehdi Abaakouk 

Index: net/usbip/Makefile
===
--- net/usbip/Makefile  (revision 31360)
+++ net/usbip/Makefile  (working copy)
@@ -9,13 +9,35 @@
 include $(INCLUDE_DIR)/kernel.mk

 PKG_NAME:=usbip
-PKG_VERSION:=0.1.7
 PKG_RELEASE:=2

+ifeq ($(strip $(call 
CompareKernelPatchVer,$(KERNEL_PATCHVER),le,2.6.39)),1)

+
+PKG_VERSION:=0.1.7
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/usbip
 PKG_MD5SUM:=d1094b6d4449787864f8be001639232c

+else
+
+# Since kernel 2.6.39.1 userspace tools are inside the kernel tree
+# Package Automatic match version in kernel
+# MD5SUM is not useful kernel package already check it
+
+PKG_VERSION:=$(shell  sed -n -e 
'/^AC_INIT/s/.*\[\([[:digit:]\.]*\)\].*/\1/gp' 
$(LINUX_DIR)/drivers/staging/usbip/userspace/configure.ac)

+PKG_SOURCE:=
+PKG_SOURCE_URL:=
+PKG_MD5SUM:=unknown
+PATCH_DIR:=./patches-$(PKG_VERSION)
+
+define prepare_source_directory
+   rm -rf $(PKG_BUILD_DIR)
+   $(CP) $(LINUX_DIR)/drivers/staging/usbip/userspace $(PKG_BUILD_DIR)
+endef
+Hooks/Prepare/Pre += prepare_source_directory
+
+endif
+
 PKG_BUILD_DEPENDS:=glib2 sysfsutils
 PKG_FIXUP:=libtool autoreconf
 PKG_INSTALL:=1
@@ -51,7 +73,11 @@
 define Package/usbip-server
 $(call Package/usbip/Default)
   TITLE+= (server)
+ ifeq ($(strip $(call 
CompareKernelPatchVer,$(KERNEL_PATCHVER),le,2.6.39)),1)

   DEPENDS+= usbip +glib2 +kmod-usbip-server
+ else
+  DEPENDS+= usbip usbip-client +glib2 +kmod-usbip-server
+ endif
 endef

 define KernelPackage/usbip/Default
@@ -100,12 +126,30 @@

 include $(INCLUDE_DIR)/kernel-defaults.mk

+ifeq ($(strip $(call 
CompareKernelPatchVer,$(KERNEL_PATCHVER),le,2.6.39)),1)

 CONFIGURE_PATH:=./src
 MAKE_PATH:=./src
 LIBTOOL_PATHS:=./src
+else
+define Build/Configure
+   (cd $(PKG_BUILD_DIR); ./autogen.sh );
+   $(call Build/Configure/Default)
+endef
+CONFIGURE_PATH:=.
+MAKE_PATH:=.
+LIBTOOL_PATHS:=.
+MAKE_FLAGS+=CFLAGS="-Wno-implicit-function-declaration"
+endif

 CFLAGS+="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include"

+define Download/usb.ids
+  URL:=http://www.linux-usb.org/
+  FILE:=usb.ids
+  MD5SUM:=b759fa4a38d6ef65f9b753239bedb6b1
+endef
+$(eval $(call Download,usb.ids))
+
 define Build/Compile/kmod
$(MAKE) $(KERNEL_MAKEOPTS) \
SUBDIRS="$(LINUX_DIR)/drivers/staging/usbip" \
@@ -123,6 +167,7 @@
 $(call Build/Compile/kmod)
 endef

+ifeq ($(strip $(call 
CompareKernelPatchVer,$(KERNEL_PATCHVER),le,2.6.39)),1)

 define Package/usbip/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) \
@@ -132,7 +177,7 @@
$(CP) \
$(PKG_INSTALL_DIR)/usr/share/usbip/usb.ids \
$(1)/usr/share/usbip/
-endef
+endif

 define Package/usbip-client/install
$(INSTALL_DIR) $(1)/usr/bin
@@ -140,7 +185,6 @@
$(PKG_INSTALL_DIR)/usr/bin/usbip \
$(1)/usr/bin/
 endef
-
 define Package/usbip-server/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) \
@@ -150,7 +194,32 @@
$(PKG_INSTALL_DIR)/usr/bin/bind_driver \
$(1)/usr/bin/usbip_bind_driver
 endef
+else
+define Package/usbip/install
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) \
+   $(PKG_INSTALL_DIR)/usr/lib/libusbip.so.* \
+   $(1)/usr/lib/
+   $(INSTALL_DIR) $(1)/usr/share/hwdata
+   $(CP) \
+   $(DL_DIR)/usb.ids \
+   $(1)/usr/share/hwdata/
+endef

+define Package/usbip-client/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(CP) \
+   $(PKG_INSTALL_DIR)/usr/sbin/usbip \
+   $(1)/usr/sbin/
+endef
+define Package/usbip-server/install
+   $(INSTALL_DIR) $(1)/usr/sbin
+   $(CP) \
+   $(PKG_INSTALL_DIR)/usr/sbin/usbipd \
+   $(1)/usr/sbin/
+endef
+endif
+
 $(eval $(call BuildPackage,usbip))
 $(eval $(call BuildPackage,usbip-client))
 $(eval $(call BuildPackage,usbip-server))

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