[OpenWrt-Devel] Where to place code to reset a watchdog?

2011-12-04 Thread Mathias Adam

Hi,

I just got OpenWrt running on a Huawei E970 wireless gateway (in my 
case, labelled as T-Mobile web'n'walk Box IV).


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:


However, the device has a hardware watchdog which needs GPIO7 to be 
toggled regularly. Otherwise, the device simply resets after 2-3 secs, 
so I wasn't even able to boot into OpenWrt at first.


As a quick fix I put together a small kernel patch which adds a timer to 
regularly perform the GPIO toggle. While this does work for me, I think 
it could need some cleanup... perhaps, is there already an 
infrastructure related to platform-/board-specific watchdogs where this 
could be attached to?


Are there other devices already supported by OpenWrt with a similar 
watchdog?


(I've also posted to the forum: 
 but didn't 
get any answers, hope it's better suited here...)


Regards,
Mathias Adam
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Where to place code to reset a watchdog?

2011-12-04 Thread Florian Fainelli
Hello Mathias,

Le dimanche 04 décembre 2011 18:16:39, Mathias Adam a écrit :
> Hi,
> 
> I just got OpenWrt running on a Huawei E970 wireless gateway (in my
> case, labelled as T-Mobile web'n'walk Box IV).
> 
> 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:
> 
> 
> However, the device has a hardware watchdog which needs GPIO7 to be
> toggled regularly. Otherwise, the device simply resets after 2-3 secs,
> so I wasn't even able to boot into OpenWrt at first.
> 
> As a quick fix I put together a small kernel patch which adds a timer to
> regularly perform the GPIO toggle. While this does work for me, I think
> it could need some cleanup... perhaps, is there already an
> infrastructure related to platform-/board-specific watchdogs where this
> could be attached to?
> 
> Are there other devices already supported by OpenWrt with a similar
> watchdog?

The MTX-1 board (AMD Alchemy) is using a similar GPIO-based watchdog:

http://lxr.linux.no/#linux+v3.1.4/drivers/watchdog/mtx-1_wdt.c

such a driver could be made generic by the way.

> 
> (I've also posted to the forum:
>  but didn't
> get any answers, hope it's better suited here...)
> 
> Regards,
> Mathias Adam
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [OpenWrt-Devel] Where to place code to reset a watchdog?

2011-12-04 Thread Mathias Adam

Hello Florian,

Am 04.12.2011 18:40, schrieb Florian Fainelli:

Hello Mathias,

Le dimanche 04 décembre 2011 18:16:39, Mathias Adam a écrit :


However, the device has a hardware watchdog which needs GPIO7 to be
toggled regularly. Otherwise, the device simply resets after 2-3 secs,
so I wasn't even able to boot into OpenWrt at first.

As a quick fix I put together a small kernel patch which adds a timer to
regularly perform the GPIO toggle. While this does work for me, I think
it could need some cleanup... perhaps, is there already an
infrastructure related to platform-/board-specific watchdogs where this
could be attached to?

Are there other devices already supported by OpenWrt with a similar
watchdog?


The MTX-1 board (AMD Alchemy) is using a similar GPIO-based watchdog:

http://lxr.linux.no/#linux+v3.1.4/drivers/watchdog/mtx-1_wdt.c

such a driver could be made generic by the way.


merci!  indeed, from a quick glance it seems very similar to my patch. 
I'll look into making a generic driver as you suggest.


For the moment I attach the patch which works for me:

--- 
trunk/build_dir/linux-brcm47xx/linux-3.0.9/drivers/mtd/maps/bcm47xx-pflash.c 
   2011-11-28 13:40:19.0 +0100
+++ 
trunk_copy111203/build_dir/linux-brcm47xx/linux-3.0.9/drivers/mtd/maps/bcm47xx-pflash.c 
2011-12-03 23:01:37.0 +0100

@@ -48,13 +48,39 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 

 #define WINDOW_ADDR 0x1fc0
 #define WINDOW_SIZE 0x40
 #define BUSWIDTH 2

 static struct mtd_info *bcm47xx_mtd;

+static struct timer_list hwwdt_timer;
+
+static void bcm47xx_hwwdt_timer_tick(unsigned long unused)
+{
+int ret;
+//  printk(KERN_INFO "bcm47xx_timer_tick() called\n");
+
+ret = gpio_request(7, "test");
+//printk(KERN_INFO "gpio_request(7)  ret = %i\n", ret);
+
+ret = gpio_direction_input(7);
+//  printk(KERN_INFO "gpio_direction_input(7)  ret = %i\n", ret);
+ret = gpio_get_value(7);
+//  printk(KERN_INFO "gpio_get_value(7)  ret = %i\n", ret);
+
+ret = gpio_direction_output(7, ret ? 0 : 1);
+//  printk(KERN_INFO "gpio_direction_output(7, !ret)  ret = %i\n", 
ret);

+
+gpio_free(7);
+
+   mod_timer(&hwwdt_timer, jiffies + HZ/5);
+}
+
 static void bcm47xx_map_copy_from(struct map_info *map, void *to, 
unsigned long from, ssize_t len)

 {
if (len == 1) {
@@ -91,6 +117,10 @@
struct mtd_partition *partitions = NULL;
int num_partitions = 0;

+   pr_notice("starting hardware watchdog reset timer (for Huawei 
E970 devices)\n");

+   setup_timer(&hwwdt_timer, bcm47xx_hwwdt_timer_tick, 0L);
+   bcm47xx_hwwdt_timer_tick(0);
+
switch (bcm47xx_bus_type) {
 #ifdef CONFIG_BCM47XX_SSB
case BCM47XX_BUS_TYPE_SSB:
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [patch] target orion_generic: use magic_long in sysupgrade

2011-12-04 Thread Matthias Buecher / Germany
Signed-off-by: Matthias Bücher 


Patch is attached and inline for comments

Regards
Maddes


Index: target/linux/orion/generic/base-files/lib/upgrade/platform.sh
===
--- target/linux/orion/generic/base-files/lib/upgrade/platform.sh
(revision 29422)
+++ target/linux/orion/generic/base-files/lib/upgrade/platform.sh
(working copy)
@@ -1,3 +1,7 @@
+#
+# Copyright (C) 2010-2011 OpenWrt.org
+#
+
 # use default "image" for PART_NAME
 # use default for platform_do_upgrade()

@@ -6,17 +10,20 @@

local hardware=`sed -n /Hardware/s/.*:.//p /proc/cpuinfo`
local magic="$(get_magic_word "$1")"
+   local magic_long="$(get_magic_long "$1")"

case "${hardware}" in
-# hardware with padded uImage + padded rootfs
+# hardware with a direct uImage partition
+# image header format as described in U-Boot's include/image.h
+# see
http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/image.h
 'Linksys WRT350N v2')
-   [ "${magic}" != '2705' ] && {
-   echo "Invalid image type ${magic}."
+   [ "${magic_long}" != '27051956' ] && {
+   echo "Invalid image type ${magic_long}."
return 1
}
return 0
;;
-# Netgear WNR854T has extra header before uImage
+# Netgear WNR854T (has uImage as file inside a JFFS2 partition)
 'Netgear WNR854T')
[ "${magic}" != '8519' ] && {
echo "Invalid image type ${magic}."
Index: target/linux/orion/generic/base-files/lib/upgrade/platform.sh
===
--- target/linux/orion/generic/base-files/lib/upgrade/platform.sh	(revision 29422)
+++ target/linux/orion/generic/base-files/lib/upgrade/platform.sh	(working copy)
@@ -1,3 +1,7 @@
+#
+# Copyright (C) 2010-2011 OpenWrt.org
+#
+
 # use default "image" for PART_NAME
 # use default for platform_do_upgrade()
 
@@ -6,17 +10,20 @@
 
 	local hardware=`sed -n /Hardware/s/.*:.//p /proc/cpuinfo`
 	local magic="$(get_magic_word "$1")"
+	local magic_long="$(get_magic_long "$1")"
 
 	case "${hardware}" in
-	 # hardware with padded uImage + padded rootfs
+	 # hardware with a direct uImage partition
+	 # image header format as described in U-Boot's include/image.h
+	 # see http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/image.h
 	 'Linksys WRT350N v2')
-		[ "${magic}" != '2705' ] && {
-			echo "Invalid image type ${magic}."
+		[ "${magic_long}" != '27051956' ] && {
+			echo "Invalid image type ${magic_long}."
 			return 1
 		}
 		return 0
 		;;
-	 # Netgear WNR854T has extra header before uImage
+	 # Netgear WNR854T (has uImage as file inside a JFFS2 partition)
 	 'Netgear WNR854T')
 		[ "${magic}" != '8519' ] && {
 			echo "Invalid image type ${magic}."
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] update wrt350nv2-builder to v2.4 and use new functionality for target orion_generic

2011-12-04 Thread Matthias Buecher / Germany
Signed-off-by: Matthias Bücher 


Patch is attached and inline for comments

Regards
Maddes


Index: tools/wrt350nv2-builder/Makefile
===
--- tools/wrt350nv2-builder/Makefile(revision 29422)
+++ tools/wrt350nv2-builder/Makefile(working copy)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk

 PKG_NAME:=wrt350nv2-builder
-PKG_VERSION:=2.3
+PKG_VERSION:=2.4

 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/${PKG_NAME}-$(PKG_VERSION)

Index: tools/wrt350nv2-builder/src/wrt350nv2-builder.c
===
--- tools/wrt350nv2-builder/src/wrt350nv2-builder.c (revision 29422)
+++ tools/wrt350nv2-builder/src/wrt350nv2-builder.c (working copy)
@@ -1,8 +1,8 @@
 /*

-   WRT350Nv2-Builder 2.3 (previously called buildimg)
+   WRT350Nv2-Builder 2.4 (previously called buildimg)
Copyright (C) 2008-2009 Dirk Teurlings 
-   Copyright (C) 2009-2010 Matthias Buecher (http://www.maddes.net/)
+   Copyright (C) 2009-2011 Matthias Buecher (http://www.maddes.net/)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,6 +33,9 @@
:u-boot 0   /path/to/u-boot.bin
#version0x2020

+   Additionally since v2.4 an already complete image can be used:
+   :image  0   
/path/to/openwrt-wrt350nv2-[squashfs|jffs2-64k].img
+
args:
1   wrt350nv2.par   parameter file describing the 
image layout
2   wrt350nv2.img   output file for linksys style 
image
@@ -62,6 +65,8 @@
https://forum.openwrt.org/viewtopic.php?pid=92928#p92928

Changelog:
+   v2.4 - added ":image" definition for parameter file, this allows
+  to use a complete sysupgrade image without any kernel size check
v2.3 - allow jffs by adding its magic number (0x8519)
   added parameter option -i to ignore unknown magic numbers
v2.2 - fixed checksum byte calculation for other versions than 0x2019
@@ -92,7 +97,7 @@


 // version info
-#define VERSION "2.3"
+#define VERSION "2.4"
 char program_info[] = "WRT350Nv2-Builder v%s by Dirk Teurlings
 and Matthias Buecher (http://www.maddes.net/)\n";

 // verbosity
@@ -112,6 +117,7 @@

 mtd_info mtd_kernel = { "kernel", 0, 0, NULL, 0L, { 0, 0 } };
 mtd_info mtd_rootfs = { "rootfs", 0, 0, NULL, 0L, { 0, 0 } };
+mtd_info mtd_image = { "image", 0, 0, NULL, 0L, { 0, 0 } };
 mtd_info mtd_uboot = { "u-boot", 0, 0, NULL, 0L, { 0, 0 } };

 #define ROOTFS_END_OFFSET  0x0076
@@ -281,6 +287,8 @@
mtd = &mtd_rootfs;
} else if (!strcmp(string1, 
mtd_uboot.name)) {
mtd = &mtd_uboot;
+   } else if (!strcmp(string1, 
mtd_image.name)) {
+   mtd = &mtd_image;
}

if (!mtd) {
@@ -404,20 +412,24 @@

// add files
if (!exitcode) {
-   for (i = 1; i <= 3; i++) {
+   for (i = 1; i <= 4; i++) {
addsize = 0;
padsize = 0;

switch (i) {
case 1:
+   mtd = &mtd_image;
+   padsize = ROOTFS_MIN_OFFSET - 
mtd->filesize;
+   break;
+   case 2:
mtd = &mtd_kernel;
break;
-   case 2:
+   case 3:
mtd = &mtd_rootfs;
addsize = mtd->filesize;
padsize = ROOTFS_MIN_OFFSET - 
mtd_kernel.size - mtd->filesize;
break;
-   case 3:
+   case 4:
mtd = &mtd_uboot;
addsize = mtd->filesize;
break;
@@ -723,7 +735,6 @@

int i;
mtd_info *mtd;
-   int mandatory;
int noupdate;
int sizecheck;
int magiccheck;
@@ -934,28 +945,30 @@
if ((!exitcode) && (par_filename)) {
lprintf(DEBUG, "checking mtd data...\n");

-   for (i = 1; i <= 3; i++) {
- 

[OpenWrt-Devel] [PATCH] new package python-eeml

2011-12-04 Thread Roberto Riggio


A python package for generating eeml documents. In particular can be 
used to send sensor data to pachube (https://pachube.com/).


Signed-off-by: Roberto Riggio 

--

Index: lang/python-eeml/patches/101-cross.patch
===
--- lang/python-eeml/patches/101-cross.patch(revision 0)
+++ lang/python-eeml/patches/101-cross.patch(revision 0)
@@ -0,0 +1,12 @@
+--- a/setup.py
 b/setup.py
+@@ -1,5 +1,6 @@
+-from setuptools import setup
+-from setuptools import find_packages
++#!/usr/bin/env python
++
++from distutils.core import setup
+
+ setup(name="Python EEML",
+   version="0.1",
+
Index: lang/python-eeml/Makefile
===
--- lang/python-eeml/Makefile   (revision 0)
+++ lang/python-eeml/Makefile   (revision 0)
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2008-2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=python-eeml
+PKG_VERSION:=20111202
+PKG_RELEASE:=1
+PKG_REV:=9f0173e56a0b2a0ae7d3a2c76eb5428381912ac6
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=git://github.com/petervizi/python-eeml.git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_SOURCE_PROTO:=git
+
+PKG_BUILD_DEPENDS:=python
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-eeml
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=python-eeml
+  URL:=http://petervizi.github.com/python-eeml/
+  DEPENDS:=+python +distribute
+endef
+
+define Package/python-eeml/description
+  A python package for generating eeml documents.
+endef
+
+define Build/Compile
+   $(call Build/Compile/PyMod,., \
+   install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
+   )
+endef
+
+define Package/python-eeml/install
+   $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+   $(CP) \
+   $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+   $(1)$(PYTHON_PKG_DIR)/
+endef
+
+$(eval $(call BuildPackage,python-eeml))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] new package python-eeml

2011-12-04 Thread dingo
On Sun, 2011-12-04 at 21:12 +0100, Roberto Riggio wrote:
> A python package for generating eeml documents. In particular can be 
> used to send sensor data to pachube (https://pachube.com/).
> 
> Signed-off-by: Roberto Riggio 
> 

Comitted r29426 /packages/lang/python-eeml/

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


Re: [OpenWrt-Devel] [PATCH] php5: add mod-zip

2011-12-04 Thread dingo
On Fri, 2011-12-02 at 18:50 +0100, Cezary Jackiewicz wrote:
> [PATCH] php5: add mod-zip
> 
> Signed-off-by: Cezary Jackiewicz 
> 

Committed revision 29427

> ---
> 
> Index: feeds/packages/lang/php5/Makefile
> ===
> --- feeds/packages/lang/php5/Makefile (wersja 29397)
> +++ feeds/packages/lang/php5/Makefile (kopia robocza)
> @@ -9,7 +9,7 @@
>  
>  PKG_NAME:=php
>  PKG_VERSION:=5.3.8
> -PKG_RELEASE:=6
> +PKG_RELEASE:=7
>  
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
>  PKG_SOURCE_URL:=http://www.php.net/distributions/
> @@ -35,7 +35,7 @@
>   pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql \
>   session simplexml soap sockets sqlite sqlite3 sysvmsg sysvsem sysvshm \
>   tokenizer \
> - xml xmlreader xmlwriter \
> + xml xmlreader xmlwriter zip \
>  
>  PKG_CONFIG_DEPENDS:= \
>   CONFIG_PACKAGE_php5-cgi CONFIG_PACKAGE_php5-cli \
> @@ -411,6 +411,12 @@
>CONFIGURE_ARGS+= --disable-xmlwriter
>  endif
>  
> +ifneq ($(CONFIG_PACKAGE_php5-mod-zip),)
> +  CONFIGURE_ARGS+= --enable-zip=shared
> +else
> +  CONFIGURE_ARGS+= --disable-zip
> +endif
> +
>  ifneq ($(SDK)$(CONFIG_PHP5_FILTER),)
>CONFIGURE_ARGS+= --enable-filter
>  else
> @@ -534,3 +540,4 @@
>  $(eval $(call BuildModule,xml,XML,+PHP5_LIBXML:libxml2 
> +!PHP5_LIBXML:libexpat))
>  $(eval $(call BuildModule,xmlreader,XMLReader,+@PHP5_LIBXML 
> +PACKAGE_php5-mod-xmlreader:libxml2 +PACKAGE_php5-mod-xmlreader:libiconv))
>  $(eval $(call BuildModule,xmlwriter,XMLWriter,+@PHP5_LIBXML 
> +PACKAGE_php5-mod-xmlwriter:libxml2 +PACKAGE_php5-mod-xmlwriter:libiconv))
> +$(eval $(call BuildModule,zip,ZIP,+PACKAGE_php5-mod-zip:zip))
> ___
> 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


Re: [OpenWrt-Devel] [PATCH] sslh: Bump to v1.10

2011-12-04 Thread dingo
On Thu, 2011-12-01 at 01:50 +, Jonathan McCrohan wrote:
> Signed-off by: Jonathan McCrohan 

Committed revision 29428

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


Re: [OpenWrt-Devel] [PATCH] sslh: Bump to v1.10

2011-12-04 Thread dingo
On Thu, 2011-12-01 at 02:07 +, Jonathan McCrohan wrote:
> Git decided not to remove a now empty file in that last patch.
> This patch removes that file.
> 

Committed revision 29429

> 
> Signed-off by: Jonathan McCrohan 
> 
> diff --git a/net/sslh/patches/002-no_strip.patch 
> b/net/sslh/patches/002-no_strip.patch
> deleted file mode 100644
> index 5ca74ee..000
> --- a/net/sslh/patches/002-no_strip.patch
> +++ /dev/null
> @@ -1,10 +0,0 @@
>  a/Makefile
> -+++ b/Makefile
> -@@ -31,7 +31,6 @@
> - 
> - sslh-fork: $(OBJS) sslh-fork.o Makefile common.h
> - $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-fork sslh-fork.o $(OBJS) 
> $(LIBS)
> --strip sslh-fork
> - 
> - sslh-select: $(OBJS) sslh-select.o Makefile common.h 
> - $(CC) $(CFLAGS) -D'VERSION=$(VERSION)' -o sslh-select sslh-select.o 
> $(OBJS) $(LIBS)


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


[OpenWrt-Devel] Iw info hardware detection

2011-12-04 Thread Hanno Schupp
Hi,

I see with great interest Jow's extension of iwinfo to detect hardware more 
accurately. 
It covers many ubiquiti models but not the Picostation models. I have a few 
different models plus a couple of engenius routers and othe atheros b/g kit and 
could find out the relevant vendor and hardware codes, if some one could give 
me line of c code that logs the relevant I'd ( vendor Id, sub-id, hardware Id, 
and sub-Id) to logread or just echoes the values when iwinfo is run. I know 
Php, JavaScript and shell programming but am helpless with c. A line of code 
would be appreciated 

Kind Regards

Hanno Schupp
Connect Consulting Services


Chillifire is a trademark owned by CCS

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


Re: [OpenWrt-Devel] Iw info hardware detection

2011-12-04 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey Hanno,

for starters you could just compile and install "iwinfo", then run it 
on your board like this: 

  iwinfo ath0 info  or  iwinfo wlan0 info

It should output data similar to this:

- -- 8< --
root@uplink:~# iwinfo wlan1 i
wlan1 ESSID: "xmff-wds"
  Access Point: C4:3D:C7:90:AA:DC
  Mode: Master  Channel: 149 (5.745 GHz)
  Tx-Power: 24 dBm  Link Quality: 29/70
  Signal: -81 dBm  Noise: -95 dBm
  Bit Rate: 60.0 MBit/s
  Encryption: WPA2 PSK (CCMP)
  Type: nl80211  HW Mode(s): 802.11an
  Hardware: 168C:0029 168C:A094 [Atheros AR9220]
  TX power offset: none
  Frequency offset: none
  Supports VAPs: yes
- -- >8 --

The four hex digits after "Hardware:" are the VendorID, DeviceID, 
Subsystem VendorID and Subsystem DeviceID.

Once you found those you can add a line to iwinfo_lib.c, see
https://dev.openwrt.org/browser/trunk/package/iwinfo/src/iwinfo_lib.c#L310 .

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

iEYEARECAAYFAk7cDB0ACgkQdputYINPTPNp/QCfc/YWQiGzH/NaMk+ge3sTdfhD
cNcAoJzVDcbCoN71DUUheY4zRVxtiTVx
=05mw
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ar71xx: Reclaim unused space in WNDR3700 image

2011-12-04 Thread Jonathan McCrohan
Hi Mark,

On 29/11/11 18:51, Dave Taht wrote:
> On Tue, Nov 29, 2011 at 7:44 PM, Mark Mentovai  wrote:
>> Jonathan Bennett wrote:
>>> This patch seems like a really good idea for the ar71xx family. What
>>> sorts of problems are preventing this from being implemented? As small
>>> as it sounds, an extra 192k would be really useful on quite a few
>>> routers.
>>
>> I don't know of any actual problems with the patch. When I originally
>> proposed the patch on this list, Dave Taht was concerned that it might
>> not leave enough headroom to field-update the kernel with a larger one
>> (https://lists.openwrt.org/pipermail/openwrt-devel/2011-August/012026.html),
> 
> 
> I withdraw my objections.

I see this patch has been committed as r29406.

Would you mind having another look at this patch as a priority, as it
causes images larger than 8MB to FTBFS.

While this obviously is not a problem for the WNDR3700, it is a problem
for the WNDR3700v2 and WNDR3800, both of which have 16MB of flash.

Attached is a build log.

Thanks,
Jon
/home/user/bin/openwrt/trunk/staging_dir/host/bin/lzma e 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700 
-lc1 -lp2 -pb2 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.bin.lzma

LZMA 4.65 : Igor Pavlov : Public domain : 2009-02-03
mkimage -A mips -O linux -T kernel -a 0x8006 -C lzma -e 0x8006 -n 'MIPS 
OpenWrt Linux-2.6.39.4' -d 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.bin.lzma
 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.uImage
Image Name:   MIPS OpenWrt Linux-2.6.39.4
Created:  Mon Dec  5 00:17:03 2011
Image Type:   MIPS Linux Kernel Image (lzma compressed)
Data Size:879870 Bytes = 859.25 kB = 0.84 MB
Load Address: 8006
Entry Point:  8006
rm -rf /home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/wndr3700
mkdir -p 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/wndr3700/image
/home/user/bin/openwrt/trunk/staging_dir/host/bin/wndr3700 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.uImage
 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/wndr3700/image/uImage
 3700
/home/user/bin/openwrt/trunk/staging_dir/host/bin/mksquashfs-lzma 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/wndr3700 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.uImage.squashfs.tmp
 -nopad -noappend -root-owned -be
Creating big endian 3.0 filesystem on 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.uImage.squashfs.tmp,
 block size 65536.

Big endian filesystem, data block size 65536, compressed data, compressed 
metadata, compressed fragments
Filesystem size 859.53 Kbytes (0.84 Mbytes)
99.99% of uncompressed filesystem size (859.61 Kbytes)
Inode table size 67 bytes (0.07 Kbytes)
45.89% of uncompressed inode table size (146 bytes)
Directory table size 37 bytes (0.04 Kbytes)
90.24% of uncompressed directory table size (41 bytes)
Number of duplicate files found 0
Number of inodes 3
Number of files 1
Number of fragments 0
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 2
Number of uids 1
root (0)
Number of gids 0
rm -rf /home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/wndr3700
mkimage -A mips -O linux -T filesystem -C none -a 0xbf07 -e 0xbf07 -n 
'MIPS OpenWrt Linux-2.6.39.4' -d 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.uImage.squashfs.tmp
 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.uImage.squashfs.tmp2
Image Name:   MIPS OpenWrt Linux-2.6.39.4
Created:  Mon Dec  5 00:17:03 2011
Image Type:   MIPS Linux Filesystem Image (uncompressed)
Data Size:880161 Bytes = 859.53 kB = 0.84 MB
Load Address: bf07
Entry Point:  bf07
/home/user/bin/openwrt/trunk/staging_dir/host/bin/wndr3700 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.uImage.squashfs.tmp2
 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.uImage.squashfs
 3700
rm -f 
/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.uImage.squashfs.tmp*
if [ `stat -c%s 
'/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.uImage.squashfs'`
 -gt `cat 
'/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/wndr3700_kernel_maxsize'`
 ]; then echo 
"/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/vmlinux-wndr3700.uImage.squashfs
 is too big" >& 2; false; fi
if [ `stat -c%s 
'/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/root.jffs2-64k'` 
-gt `cat 
'/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/wndr3700_rootfs_maxsize'`
 ]; then echo 
"/home/user/bin/openwrt/trunk/build_dir/linux-ar71xx_generic/root.jffs2-64k is 
too big" >& 2; false; fi
/ho

Re: [OpenWrt-Devel] [PATCH] ramips: enhance routine for getting MAC address from flash

2011-12-04 Thread Nerijus Baliunas
On Fri, 2 Dec 2011 15:51:44 +0200 Roman Yeryomin  wrote:

> > I have a problem that all MAC addresses are 00:11:22:33:44:55 except wlan0,
> > which is correct. Should this patch help me? I added "nbg-419n" to the case 
> > line:
> >        case $(ramips_board_name) in
> >        bc2 | nbg-419n | nw718)
> >                extract_and_set_mac "factory" 4 "02:00:00:00:00:00"
> >
> > but still all MACs are 00:11:22:33:44:55.
> 
> if you will look at my or Alexander's patch you'll see that the mac
> can potentially be anywhere.
> For example on belkin board it's here -> "u-boot" 262148.
> So you just have to find the right place.

I found that it is in "factory" partition at offset 40, like hw550-3g, so I 
modified the
patch as follows (added "| nbg-419n" after "hw550-3g"):

case $(ramips_board_name) in
bc2 | nw718)
-   nw718_set_mac
+   extract_and_set_mac "factory" 4 "02:00:00:00:00:00"
;;
+   hw550-3g | nbg-419n)
+   extract_and_set_mac "factory" 40 "00:00:00:00:00:00"
+   ;;
esac
 }

But MACs are still 00:11:22:33:44:55. What did I miss? 

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


Re: [OpenWrt-Devel] [PATCH] ar71xx: Reclaim unused space in WNDR3700 image

2011-12-04 Thread Mark Mentovai
Jonathan McCrohan wrote:
> Would you mind having another look at this patch as a priority, as it
> causes images larger than 8MB to FTBFS.
>
> While this obviously is not a problem for the WNDR3700, it is a problem
> for the WNDR3700v2 and WNDR3800, both of which have 16MB of flash.
>
> Attached is a build log.

Of course. It's failing while attempting to build a WNDR3700 (v1)
image, because there's no way to produce an image for WNDR3700 this
large. It'd never fit in its flash. I believe it's correct to produce
an error in this case. What you'd evidently like to do is produce
WNDR3700v2 and WNDR3800 images, but not WNDR3700 (v1). The build
system doesn't currently allow for this, because it produces the three
images simultaneously. What you can do is locally remove this line
from target/linux/ar71xx/image/Makefile:

$(call 
Image/Build/Template/$(fs_64k)/$(1),Netgear,wndr3700,$(wndr3700_cmdline),$(wndr3700_mtdlayout),3700,WNDR3700,""
NA,)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ar71xx: Reclaim unused space in WNDR3700 image

2011-12-04 Thread Dave Taht
On Mon, Dec 5, 2011 at 5:15 AM, Mark Mentovai  wrote:
> Jonathan McCrohan wrote:
>> Would you mind having another look at this patch as a priority, as it
>> causes images larger than 8MB to FTBFS.
>>
>> While this obviously is not a problem for the WNDR3700, it is a problem
>> for the WNDR3700v2 and WNDR3800, both of which have 16MB of flash.
>>
>> Attached is a build log.
>
> Of course. It's failing while attempting to build a WNDR3700 (v1)
> image, because there's no way to produce an image for WNDR3700 this
> large. It'd never fit in its flash. I believe it's correct to produce
> an error in this case. What you'd evidently like to do is produce
> WNDR3700v2 and WNDR3800 images, but not WNDR3700 (v1). The build
> system doesn't currently allow for this, because it produces the three
> images simultaneously. What you can do is locally remove this line
> from target/linux/ar71xx/image/Makefile:

Would there be a way to set, globally, something that would disable
building images for sub 8MB flash units in the ar71xx series? That
way I could build for more than the wndr3700v2 and 3800 series (
the wzr, for example).

>
>        $(call 
> Image/Build/Template/$(fs_64k)/$(1),Netgear,wndr3700,$(wndr3700_cmdline),$(wndr3700_mtdlayout),3700,WNDR3700,""
> NA,)
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



-- 
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
FR Tel: 0638645374
http://www.bufferbloat.net
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ar71xx: support for kernel 3.1

2011-12-04 Thread Dave Taht
I applied these patch series, and either I goofed (possible), or subsequent
updates to the various trees since the time it came out and the time
I started trying it, broke it again.

It fails on linux 3.0.9, 3.1.3, 3.1.4 with errors applying stuff to various
mtd partitions. A typical error (3.0.9)

Applying patch platform/416-mtd_api_tl_mr3x20.patch
patching file arch/mips/ar71xx/mach-tl-mr3x20.c
Hunk #1 FAILED at 34.
Hunk #2 FAILED at 61.
2 out of 2 hunks FAILED -- rejects in file arch/mips/ar71xx/mach-tl-mr3x20.c
Patch platform/416-mtd_api_tl_mr3x20.patch does not apply (enforce with -f)
make[4]: *** 
[/home/cero1/src/cerowrt/build_dir/linux-ar71xx_generic/linux-3.0.9/.quilt_checked]
Error 1
make[4]: Leaving directory `/home/cero1/src/cerowrt/target/linux/ar71xx'
make[3]: *** [compile] Error 2
make[3]: Leaving directory `/home/cero1/src/cerowrt/target/linux'
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory `/home/cero1/src/cerowrt'
make[1]: *** 
[/home/cero1/src/cerowrt/staging_dir/target-mips_r2_uClibc-0.9.32/stamp/.target_compile]
Error 2
make[1]: Leaving directory `/home/cero1/src/cerowrt'
make: *** [world] Error 2




On Sun, Nov 27, 2011 at 7:36 PM, Dave Taht  wrote:
> On Sun, Nov 27, 2011 at 6:17 PM, Outback Dingo  wrote:
>> On Sun, Nov 27, 2011 at 11:52 AM, Otto Solares Cabrera  
>> wrote:
>>> On Sat, Nov 26, 2011 at 10:37:33PM -0500, Outback Dingo wrote:
 On Sat, Nov 26, 2011 at 10:13 PM, Hartmut Knaack  wrote:
 > This patch brings support for kernel version 3.1 to the ar71xx platform. 
 > It is based on Otto Estuardo Solares Cabreras linux-3.0 patches, with 
 > some changes to keep up with recent filename changes in the kernel. 
 > Minimum kernel version seems to be 3.1.1, otherwise one of the generic 
 > patches will fail. Successfully tested with kernel 3.1.2 on a WR1043ND. 
 > Kernel version in the Makefile still needs to be adjusted manually.

 ill get onto testing these also
>>>
>>> It works for me on the wrt160nl with Linux-3.1.3. Thx Hartmut!
>>
>> Also working on WNDR3700v2 and a variety of Ubiquiti gear nice
>> Thanks both of you.
>
> My thanks as well, although I haven't had time to do a build yet. IF
> anyone is interested in
> byte queue limits, the patches I was attempting to backport to 3.1
> before taking off for the holiday,
> including a modified ag71xx driver, are at:
>
> http://huchra.bufferbloat.net/~cero1/bql/
>
> Regettably they didn't quite compile before I left for holiday, and
> I'm going to have to rebase cerowrt and rebuild, (I'm still grateful!)
> and I figure (hope!) one of you folk will beat me to getting BQL working
> before I get  back to the office tuesday.
>
> A plug:
>
> Byte queue limits hold great promise for beating bufferbloat, and getting
> tc's shapers and schedulers to work properly again, at least
> on ethernet.
>
> Byte Queue limits, by holding down the amount of outstanding data that
> the device driver
> has in it, all the QoS and shaping tools that we know and love finally
> get a chance to work again. You can retain high hw tx queue rings - so, as
> an example, you could have a 6k byte queue limit and 4 large packets
> in the buffer,
> or 93 ack packets in the buffer - and this let you manage the bandwidth via
> tools higher in the stack, as either take about the same amount of
> time to transmit,
> without compromising line level performance...
>
> The current situation is: we often have hw tx rings of 64 or higher,
> which translates out to
> 96k in flight, meaning that (as already demonstrated) with this patch working,
> you can improve network responsiveness by a factor of at least ten, perhaps as
> much as 100. (TCP's response to buffering is quadratic, not linear,
> but there are other
> variables, so... factor 10 sounds good, doesn't it?)
>
> From Tom Herbert's announcement (there was much feedback on netdev, I
> would expect
> another revision to come by)
>
>
> Changes from last version:
>  - Rebase to 3.2
>  - Added CONFIG_BQL and CONFIG_DQL
>  - Added some cache alignment in struct dql, to split read only, writeable
>   elements, and split those elements written on transmit from those
>   written at transmit completion (suggested by Eric).
>  - Split out adding xps_queue_release as its own patch.
>  - Some minor performance changes, use likely and unlikely for some
>   conditionals.
>  - Cleaned up some "show" functions for bql (pointed out by Ben).
>  - Change netdev_tx_completed_queue to do check xoff, check
>   availability, and then check xoff again.  This to prevent potential
>   race conditions with netdev_sent_queue (as Ben pointed out).
>  - Did some more testing trying to evaluate overhead of BQL in the
>   transmit path.  I see about 1-3% degradation in CPU utilization
>   and maximum pps when BQL is enabled.  Any ideas to beat this
>   down as much as possible would be appreciated!
>  - Added high versus low priority traffic test to results below.
>
> 
>
> Th