Re: [OpenWrt-Devel] [PATCH RFT] kernel: mtdsplit_uimage: debug buf/header sizes

2015-02-12 Thread Rafał Miłecki
On 12 February 2015 at 21:04, John Crispin blo...@openwrt.org wrote:
 [0.564000] Creating 4 MTD partitions on spi32766.0:
 [0.568000] 0x-0x0001 : uboot
 [0.572000] 0x0001-0x0002 : uboot-env
 [0.58] 0x0002-0x0003 : calibration
 [0.584000] 0x0005-0x00ff : firmware
 [0.596000] mtdsplit_uimage: [__mtdsplit_parse_uimage] buf:c0049000
 sizeof(*buf):1
 [0.60] mtdsplit_uimage: [__mtdsplit_parse_uimage] sizeof(*header):64
 [0.608000] mtdsplit_uimage: [read_uimage_header] buf:c0049000
 header_len:1
 [0.616000] mtdsplit_uimage: [uimage_find_edimax] buf:c0049000 len:1
 FW_EDIMAX_OFFSET + sizeof(*header):84
 [0.624000] mtdsplit_uimage: Buffer too small for checking Edimax header
 [0.784000] Dedicated partitioner didn't split firmware partition,
 please fill a bug report!
 [0.788000] 0x00172108-0x00ff : rootfs
 [0.796000] mtd: partition rootfs must either start or end on erase
 block boundary or be smaller than an erase block -- forcing read-only
 [0.808000] mtd: device 4 (rootfs) set to be root filesystem
 [0.812000] 1 squashfs-split partitions found on MTD device rootfs
 [0.82] 0x0034-0x00ff : rootfs_data
 [1.916000] Realtek RTL8366RB ethernet switch driver version 0.2.4
 [1.924000] rtl8366rb rtl8366rb: using GPIO pins 491 (SDA) and 493 (SCK)
 [1.928000] rtl8366rb rtl8366rb: RTL5937 ver. 3 chip found

Thank you! My obvious bug was fixed in
https://dev.openwrt.org/changeset/44424/

Please note that if you still get
 Dedicated partitioner didn't split firmware partition, please fill a bug 
 report!
with 44424, it means that there is something wrong in
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
and we/you should look for a working reference code in
405-mtd-old-firmware-uimage-splitter.patch
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] generate/extract .bin from router?

2015-02-12 Thread Etienne Champetier
Hi all,

Is it possible to extract factory.bin or sysupgrade.bin from an openwrt
router?
ie do a backup of a know working image before update, or to flash a spare

Thanks in advance
Etienne
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH RFT] kernel: mtdsplit_uimage: debug buf/header sizes

2015-02-12 Thread John Crispin
yep, fixes the problem. please push it :)

On 12/02/2015 12:47, Rafał Miłecki wrote:
 ---
 John can you give it a try, please?
 ---
  .../generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c  | 15 
 ++-
  1 file changed, 14 insertions(+), 1 deletion(-)
 
 diff --git 
 a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c 
 b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
 index 2bb5e9a..4abc4be 100644
 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
 +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
 @@ -20,6 +20,8 @@
  
  #include mtdsplit.h
  
 +static int first_try = 1;
 +
  /*
   * uimage_header itself is only 64B, but it may be prepended with another 
 data.
   * Currently the biggest size is for Edimax devices: 20B + 64B
 @@ -60,6 +62,8 @@ read_uimage_header(struct mtd_info *mtd, size_t offset, 
 u_char *buf,
   size_t retlen;
   int ret;
  
 + if (first_try)
 + pr_info([%s] buf:%p header_len:%zu\n, __FUNCTION__, buf, 
 header_len);
   ret = mtd_read(mtd, offset, header_len, retlen, buf);
   if (ret) {
   pr_debug(read error in \%s\\n, mtd-name);
 @@ -106,11 +110,15 @@ static int __mtdsplit_parse_uimage(struct mtd_info 
 *master,
   ret = -ENOMEM;
   goto err_free_parts;
   }
 + if (first_try)
 + pr_info([%s] buf:%p sizeof(*buf):%u\n, __FUNCTION__, buf, 
 sizeof(*buf));
  
   /* find uImage on erase block boundaries */
   for (offset = 0; offset  master-size; offset += master-erasesize) {
   struct uimage_header *header;
  
 + if (first_try)
 + pr_info([%s] sizeof(*header):%u\n, __FUNCTION__, 
 sizeof(*header));
   uimage_size = 0;
  
   ret = read_uimage_header(master, offset, buf, sizeof(*buf));
 @@ -308,8 +316,13 @@ static ssize_t uimage_find_edimax(u_char *buf, size_t 
 len)
  {
   struct uimage_header *header;
  
 + if (first_try)
 + pr_info([%s] buf:%p len:%zu FW_EDIMAX_OFFSET + 
 sizeof(*header):%u\n, __FUNCTION__, buf, len, FW_EDIMAX_OFFSET + 
 sizeof(*header));
 +
   if (len  FW_EDIMAX_OFFSET + sizeof(*header)) {
 - pr_err(Buffer too small for checking Edimax header\n);
 + if (first_try)
 + pr_err(Buffer too small for checking Edimax header\n);
 + first_try = 0;
   return -ENOSPC;
   }
  
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Module option in Makefile?

2015-02-12 Thread Matti Laakso
Hi,

Is there a way to specify in a Makefile for a kernel module that the entry
under /etc/modules.d should be created with a specific option? For example

mymodule option=1

I looked through ModuleAutoLoad in include/kernel.mk, but couldn't figure
out a way...

Matti Laakso
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH RFT] kernel: mtdsplit_uimage: debug buf/header sizes

2015-02-12 Thread John Crispin
[0.564000] Creating 4 MTD partitions on spi32766.0:
[0.568000] 0x-0x0001 : uboot
[0.572000] 0x0001-0x0002 : uboot-env
[0.58] 0x0002-0x0003 : calibration
[0.584000] 0x0005-0x00ff : firmware
[0.596000] mtdsplit_uimage: [__mtdsplit_parse_uimage] buf:c0049000
sizeof(*buf):1
[0.60] mtdsplit_uimage: [__mtdsplit_parse_uimage] sizeof(*header):64
[0.608000] mtdsplit_uimage: [read_uimage_header] buf:c0049000
header_len:1
[0.616000] mtdsplit_uimage: [uimage_find_edimax] buf:c0049000 len:1
FW_EDIMAX_OFFSET + sizeof(*header):84
[0.624000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.784000] Dedicated partitioner didn't split firmware partition,
please fill a bug report!
[0.788000] 0x00172108-0x00ff : rootfs
[0.796000] mtd: partition rootfs must either start or end on erase
block boundary or be smaller than an erase block -- forcing read-only
[0.808000] mtd: device 4 (rootfs) set to be root filesystem
[0.812000] 1 squashfs-split partitions found on MTD device rootfs
[0.82] 0x0034-0x00ff : rootfs_data
[1.916000] Realtek RTL8366RB ethernet switch driver version 0.2.4
[1.924000] rtl8366rb rtl8366rb: using GPIO pins 491 (SDA) and 493 (SCK)
[1.928000] rtl8366rb rtl8366rb: RTL5937 ver. 3 chip found





On 12/02/2015 12:47, Rafał Miłecki wrote:
 ---
 John can you give it a try, please?
 ---
  .../generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c  | 15 
 ++-
  1 file changed, 14 insertions(+), 1 deletion(-)
 
 diff --git 
 a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c 
 b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
 index 2bb5e9a..4abc4be 100644
 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
 +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
 @@ -20,6 +20,8 @@
  
  #include mtdsplit.h
  
 +static int first_try = 1;
 +
  /*
   * uimage_header itself is only 64B, but it may be prepended with another 
 data.
   * Currently the biggest size is for Edimax devices: 20B + 64B
 @@ -60,6 +62,8 @@ read_uimage_header(struct mtd_info *mtd, size_t offset, 
 u_char *buf,
   size_t retlen;
   int ret;
  
 + if (first_try)
 + pr_info([%s] buf:%p header_len:%zu\n, __FUNCTION__, buf, 
 header_len);
   ret = mtd_read(mtd, offset, header_len, retlen, buf);
   if (ret) {
   pr_debug(read error in \%s\\n, mtd-name);
 @@ -106,11 +110,15 @@ static int __mtdsplit_parse_uimage(struct mtd_info 
 *master,
   ret = -ENOMEM;
   goto err_free_parts;
   }
 + if (first_try)
 + pr_info([%s] buf:%p sizeof(*buf):%u\n, __FUNCTION__, buf, 
 sizeof(*buf));
  
   /* find uImage on erase block boundaries */
   for (offset = 0; offset  master-size; offset += master-erasesize) {
   struct uimage_header *header;
  
 + if (first_try)
 + pr_info([%s] sizeof(*header):%u\n, __FUNCTION__, 
 sizeof(*header));
   uimage_size = 0;
  
   ret = read_uimage_header(master, offset, buf, sizeof(*buf));
 @@ -308,8 +316,13 @@ static ssize_t uimage_find_edimax(u_char *buf, size_t 
 len)
  {
   struct uimage_header *header;
  
 + if (first_try)
 + pr_info([%s] buf:%p len:%zu FW_EDIMAX_OFFSET + 
 sizeof(*header):%u\n, __FUNCTION__, buf, len, FW_EDIMAX_OFFSET + 
 sizeof(*header));
 +
   if (len  FW_EDIMAX_OFFSET + sizeof(*header)) {
 - pr_err(Buffer too small for checking Edimax header\n);
 + if (first_try)
 + pr_err(Buffer too small for checking Edimax header\n);
 + first_try = 0;
   return -ENOSPC;
   }
  
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] wiki.openwrt.org uses an invalid security certificate / expired on 12.2.2015 17:18

2015-02-12 Thread Hannu Nyman

Firefox and IE give error on https connection to wiki:

wiki.openwrt.org uses an invalid security certificate.

The certificate is not trusted because no issuer chain was provided.
The certificate is only valid for subsignal.org
The certificate expired on 12.2.2015 17:18. The current time is 12.2.2015 21:53.

(Error code: sec_error_unknown_issuer)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH RFT] kernel: mtdsplit_uimage: debug buf/header sizes

2015-02-12 Thread John Crispin


On 12/02/2015 21:18, Rafał Miłecki wrote:
 On 12 February 2015 at 21:04, John Crispin blo...@openwrt.org wrote:
 [0.564000] Creating 4 MTD partitions on spi32766.0:
 [0.568000] 0x-0x0001 : uboot
 [0.572000] 0x0001-0x0002 : uboot-env
 [0.58] 0x0002-0x0003 : calibration
 [0.584000] 0x0005-0x00ff : firmware
 [0.596000] mtdsplit_uimage: [__mtdsplit_parse_uimage] buf:c0049000
 sizeof(*buf):1
 [0.60] mtdsplit_uimage: [__mtdsplit_parse_uimage] sizeof(*header):64
 [0.608000] mtdsplit_uimage: [read_uimage_header] buf:c0049000
 header_len:1
 [0.616000] mtdsplit_uimage: [uimage_find_edimax] buf:c0049000 len:1
 FW_EDIMAX_OFFSET + sizeof(*header):84
 [0.624000] mtdsplit_uimage: Buffer too small for checking Edimax header
 [0.784000] Dedicated partitioner didn't split firmware partition,
 please fill a bug report!
 [0.788000] 0x00172108-0x00ff : rootfs
 [0.796000] mtd: partition rootfs must either start or end on erase
 block boundary or be smaller than an erase block -- forcing read-only
 [0.808000] mtd: device 4 (rootfs) set to be root filesystem
 [0.812000] 1 squashfs-split partitions found on MTD device rootfs
 [0.82] 0x0034-0x00ff : rootfs_data
 [1.916000] Realtek RTL8366RB ethernet switch driver version 0.2.4
 [1.924000] rtl8366rb rtl8366rb: using GPIO pins 491 (SDA) and 493 (SCK)
 [1.928000] rtl8366rb rtl8366rb: RTL5937 ver. 3 chip found
 
 Thank you! My obvious bug was fixed in
 https://dev.openwrt.org/changeset/44424/
 

they tend to be the hardest to find ;)

 Please note that if you still get
 Dedicated partitioner didn't split firmware partition, please fill a bug 
 report!
 with 44424, it means that there is something wrong in
 target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
 and we/you should look for a working reference code in
 405-mtd-old-firmware-uimage-splitter.patch
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Wireless Router with openwrt, how to use dual band

2015-02-12 Thread Aaron Z
This would require that your server has dual NICs and your laptops can
connect to both 2.4ghz and 5ghz at the same time.

Your device will likely have a configuration for the 2.4 ghz radio and
one for the 5ghz radio. Setup 2 networks/firewall zones (LAN and
LAN2?), then assign the 2.4ghz radio to LAN and the 5ghz radio to
LAN2.
Set your server to have an IP on LAN and one LAN2, then set the group
messages to be sent from the LAN2 IP and the private messages be sent
on the LAN IP.

I am curious, are some of these messages large enough to cause issues
with the network, or why do you want to use both bands like this?

Aaron Z
A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects.
— Robert Heinlein, Time Enough for Love


On Thu, Feb 12, 2015 at 12:41 AM, Robert Clove cloverob...@gmail.com wrote:
 Can u explain in detail..

 On Wed, Feb 11, 2015 at 8:01 PM, Aaron Z aczlan+open...@gmail.com wrote:

 On Wed, Feb 11, 2015 at 9:15 AM, Robert Clove cloverob...@gmail.com
 wrote:
  Hi,
 
  I have few laptops and two routers with dual band (TP-LINK TL-WDR3600
  N600
  WIRELESS DUAL BAND GIGABIT ROUTER) . Ported openwrt on the router .
 
  What i am trying to achieve is if someone want to send msg to a an
  individual then one of the band should be used (eg 2.4GHz) and if
  someone
  want to send message to the group then it should be send through another
  band (eg 2.8GHz or 5 GHz).
 
  How can i do that.?
 
  I have created a mesh network and written a simple client server
  applications through which all laptops communicate.
 I would think that you would want to setup different IP ranges for the
 different bands (ie: 2.4ghz uses 10.0.100.x and 5ghz uses 10.0.101.x)
 and then set your server to communicate on those IP ranges

 Aaron Z
 A human being should be able to change a diaper, plan an invasion,
 butcher a hog, conn a ship, design a building, write a sonnet, balance
 accounts, build a wall, set a bone, comfort the dying, take orders,
 give orders, cooperate, act alone, solve equations, analyze a new
 problem, pitch manure, program a computer, cook a tasty meal, fight
 efficiently, die gallantly. Specialization is for insects.
 — Robert Heinlein, Time Enough for Love


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


[OpenWrt-Devel] [PATCH] ar71xx: ZyXEL NBG6716 add gpio usb power on/off

2015-02-12 Thread Marcin Mikolajczak
ZyXEL NBG6716 add missing GPIO USB power on/off

Signed-off-by: Marcin Mikolajczak gr4ffy at gmail.com
---
Index: target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c
===
--- target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c(revision 44419)
+++ target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c(working copy)
@@ -22,6 +22,7 @@
 
 #include linux/platform_device.h
 #include linux/ar8216_platform.h
+#include linux/gpio.h
 #include linux/mtd/mtd.h
 #include linux/mtd/nand.h
 #include linux/platform/ar934x_nfc.h
@@ -55,6 +56,8 @@
 #define NBG6716_GPIO_BTN_USB2  14
 #define NBG6716_GPIO_BTN_WPS   22
 
+#define NBG6716_GPIO_USB_POWER 16
+
 #define NBG6716_KEYS_POLL_INTERVAL 20  /* msecs */
 #define NBG6716_KEYS_DEBOUNCE_INTERVAL (3 * NBG6716_KEYS_POLL_INTERVAL)
 
@@ -203,6 +206,10 @@
ath79_nfc_set_ecc_mode(AR934X_NFC_ECC_HW);
ath79_register_nfc();
 
+   gpio_request_one(NBG6716_GPIO_USB_POWER,
+   GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+   USB power);
+
ath79_register_usb();
 
nbg6716_get_mac(ethaddr=, tmpmac);
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC] firewall: NAT masquerading race condition

2015-02-12 Thread Hans Dedecker
Hi,

I noticed the selective conntrack flushing in fw3; looking into the
code it only gets active when there's a difference between the cached
IP in the __addr list and the current IP addresses in use.
In this case the selective conntrack flushing is done for the old_addr.
In the error case nf_conntrack displays the following entry :
ipv4 2 icmp 1 9 src=192.168.1.10 dst=192.30.252.131 type=8
code=0 id=8323 packets=6 bytes=504 [UNREPLIED] src=192.30.252.131
dst=192.168.1.10 type=0 code=0 id2

Looking into the netfilter_conntrack_flush patch only the connections
will be flushed which match the passed address; as fw3 is passing an
old cached address when there's a difference the above printed icmp
connection will not be flushed as there's no match or is my assumption
wrong ?

Thx,
Hans

On Wed, Feb 11, 2015 at 8:30 PM, Jo-Philipp Wich j...@openwrt.org wrote:
 Hi,

 theoretically the selective conntrack flushing of fw3 should take care
 of that. Can you investigate why it is not the case for you?

 ~ Jow


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

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


[OpenWrt-Devel] looking for a tl-wdr4900 tester

2015-02-12 Thread John Crispin
Hi,

just bumped the kernel for the tl-wdr4900. i don't actually have the
unit. anyone around that feels like testing the images before i push the
series to trunk ?

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


Re: [OpenWrt-Devel] lantiq v3.18

2015-02-12 Thread John Crispin


On 10/02/2015 10:40, Daniel Gimpelevich wrote:
 Is there a patchset I could try?

try r44421 or newer



 
 On Mon, 2015-02-09 at 12:44 -0800, Daniel Gimpelevich wrote:
 On Mon, 2015-02-09 at 21:27 +0100, John Crispin wrote:
 bootlog please

 On 09/02/2015 21:25, Daniel Gimpelevich wrote:
 On Mon, 2015-02-09 at 19:18 +0100, John Crispin wrote:
 try r44366 or newer please

 SPI flash is not detected, bricking the device.


 [0.00] Linux version 3.18.6 (danielg4@chimera) (gcc version 4.8.3 
 (OpenWrt/Linaro GCC 4.8-2014.04 r43982) ) #3 Mon Feb 9 115
 [0.00] SoC: AR9 rev 1.2
 [0.00] bootconsole [early0] enabled
 [0.00] CPU0 revision is: 0001954c (MIPS 34Kc)
 [0.00] MIPS: machine is DGN3500 - Netgear DGN3500
 [0.00] Determined physical RAM map:
 [0.00]  memory: 0400 @  (usable)
 [0.00] User-defined physical RAM map:
 [0.00]  memory: 0400 @  (usable)
 [0.00] Initrd not found or empty - disabling initrd
 [0.00] Zone ranges:
 [0.00]   Normal   [mem 0x-0x03ff]
 [0.00] Movable zone start for each node
 [0.00] Early memory node ranges
 [0.00]   node   0: [mem 0x-0x03ff]
 [0.00] Initmem setup node 0 [mem 0x-0x03ff]
 [0.00] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 
 bytes.
 [0.00] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 
 bytes
 [0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
 pages: 16256
 [0.00] Kernel command line: root=/dev/mtdblock0 
 ip=192.168.1.1:192.168.1.15eth0:on console=ttyS1,115200 ethaddr=30:46:90
 [0.00] PID hash table entries: 256 (order: -2, 1024 bytes)
 [0.00] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
 [0.00] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
 [0.00] Writing ErrCtl register=5880
 [0.00] Readback ErrCtl register=5880
 [0.00] Memory: 60404K/65536K available (3312K kernel code, 147K 
 rwdata, 664K rodata, 144K init, 194K bss, 5132K reserved)
 [0.00] NR_IRQS:256
 [0.00] CPU Clock: 333MHz
 [0.00] Calibrating delay loop... 221.18 BogoMIPS (lpj=442368)
 [0.036000] pid_max: default: 32768 minimum: 301
 [0.04] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
 [0.044000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 
 bytes)
 [0.052000] pinctrl core: initialized pinctrl subsystem
 [0.056000] NET: Registered protocol family 16
 [0.064000] pinctrl-xway 1e100b10.pinmux: Init done
 [0.068000] dma-xway 1e104100.dma: Init done - hw rev: 6, ports: 5, 
 channels: 20
 [0.076000] PCI host bridge /fpi@1000/pci@E105400 ranges:
 [0.08]  MEM 0x1800..0x19ff
 [0.084000]   IO 0x1ae0..0x1aff
 [0.088000] ath9k,eeprom ath9k_eep: failed to load eeprom address
 [0.10] usbcore: registered new interface driver usbfs
 [0.104000] usbcore: registered new interface driver hub
 [0.108000] usbcore: registered new device driver usb
 [0.112000] PCI host bridge to bus :00
 [0.116000] pci_bus :00: root bus resource [mem 0x1800-0x19ff]
 [0.12] pci_bus :00: root bus resource [io  0x]
 [0.124000] pci_bus :00: No busn resource found for root bus, will 
 use [bus 00-ff]
 [0.128000] pci :00:0e.0: BAR 0: assigned [mem 0x1800-0x1800]
 [0.132000] Switched to clocksource MIPS
 [0.136000] NET: Registered protocol family 2
 [0.144000] TCP established hash table entries: 1024 (order: 0, 4096 
 bytes)
 [0.148000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
 [0.156000] TCP: Hash tables configured (established 1024 bind 1024)
 [0.164000] TCP: reno registered
 [0.164000] UDP hash table entries: 256 (order: 0, 4096 bytes)
 [0.172000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
 [0.18] NET: Registered protocol family 1
 [0.184000] gptu: totally 6 16-bit timers/counters
 [0.188000] gptu: misc_register on minor 63
 [0.192000] gptu: succeeded to request irq 126
 [0.196000] gptu: succeeded to request irq 127
 [0.20] gptu: succeeded to request irq 128
 [0.204000] gptu: succeeded to request irq 129
 [0.212000] gptu: succeeded to request irq 130
 [0.216000] gptu: succeeded to request irq 131
 [0.22] futex hash table entries: 256 (order: -1, 3072 bytes)
 [0.228000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
 [0.236000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) 
 (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
 [0.248000] msgmni has been set to 117
 [0.252000] io scheduler noop registered
 [0.256000] io scheduler deadline registered (default)
 [0.26] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, 
 

Re: [OpenWrt-Devel] looking for a tl-wdr4900 tester

2015-02-12 Thread Philipp Borgers
I can test if you provide me with an image or an *easy* way to compile.

Is there any testing procedure I should follow? Do we have some kind of tests I
don't know of?

Regards
Philipp

On Thu, Feb 12, 2015 at 12:31:07PM +0100, John Crispin wrote:
 Hi,
 
 just bumped the kernel for the tl-wdr4900. i don't actually have the
 unit. anyone around that feels like testing the images before i push the
 series to trunk ?
 
   John
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


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


Re: [OpenWrt-Devel] looking for a tl-wdr4900 tester

2015-02-12 Thread John Crispin
Hi Philipp,

On 12/02/2015 12:41, Philipp Borgers wrote:
 I can test if you provide me with an image or an *easy* way to
 compile.
 
i will mail you an initramfs and a flashable image after i had lunch

 Is there any testing procedure I should follow? Do we have some
 kind of tests I don't know of?

i wish i had. best if you flash the image, see if wifi and ethernet
work, thats the best we can do right now i guess :-)

thanks,
John


 
 Regards Philipp
 
 On Thu, Feb 12, 2015 at 12:31:07PM +0100, John Crispin wrote:
 Hi,
 
 just bumped the kernel for the tl-wdr4900. i don't actually have
 the unit. anyone around that feels like testing the images before
 i push the series to trunk ?
 
 John ___ 
 openwrt-devel mailing list openwrt-devel@lists.openwrt.org 
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
 
 ___ openwrt-devel
 mailing list openwrt-devel@lists.openwrt.org 
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Request for testing mtdsplit_uimage

2015-02-12 Thread John Crispin


On 12/02/2015 08:55, Rafał Miłecki wrote:
 As you could notice I've improved mtdsplit_uimage a bit:
 https://dev.openwrt.org/changeset/44412/
 https://dev.openwrt.org/changeset/44413/
 https://dev.openwrt.org/changeset/44414/
 https://dev.openwrt.org/changeset/44415/
 
 This should add support for Edimax devices, but... could also break something.
 
 Please try it and let me know if anything went wrong for you.
 


Hi,

[0.596000] m25p80 spi32766.0: mx25l12805d (16384 Kbytes)
[0.60] 4 ofpart partitions found on MTD device spi32766.0
[0.604000] Creating 4 MTD partitions on spi32766.0:
[0.612000] 0x-0x0001 : uboot
[0.616000] 0x0001-0x0002 : uboot-env
[0.624000] 0x0002-0x0003 : calibration
[0.628000] 0x0005-0x00ff : firmware
[0.64] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.644000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.652000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.656000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.664000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.672000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.676000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.684000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.692000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.696000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.704000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.712000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.716000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.724000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.732000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.736000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.744000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.752000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.756000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.764000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.772000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.776000] mtdsplit_uimage: Buffer too small for checking Edimax header
[0.784000] mtdsplit_uimage: Buffer too small for checking Edimax header



and about 200 more lines of same error. i can test a patch that fixes
the issue if you send it to me. unit boots successfully after the msg flood.

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


[OpenWrt-Devel] [PATCH RFT] kernel: mtdsplit_uimage: debug buf/header sizes

2015-02-12 Thread Rafał Miłecki
---
John can you give it a try, please?
---
 .../generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c  | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c 
b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
index 2bb5e9a..4abc4be 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
@@ -20,6 +20,8 @@
 
 #include mtdsplit.h
 
+static int first_try = 1;
+
 /*
  * uimage_header itself is only 64B, but it may be prepended with another data.
  * Currently the biggest size is for Edimax devices: 20B + 64B
@@ -60,6 +62,8 @@ read_uimage_header(struct mtd_info *mtd, size_t offset, 
u_char *buf,
size_t retlen;
int ret;
 
+   if (first_try)
+   pr_info([%s] buf:%p header_len:%zu\n, __FUNCTION__, buf, 
header_len);
ret = mtd_read(mtd, offset, header_len, retlen, buf);
if (ret) {
pr_debug(read error in \%s\\n, mtd-name);
@@ -106,11 +110,15 @@ static int __mtdsplit_parse_uimage(struct mtd_info 
*master,
ret = -ENOMEM;
goto err_free_parts;
}
+   if (first_try)
+   pr_info([%s] buf:%p sizeof(*buf):%u\n, __FUNCTION__, buf, 
sizeof(*buf));
 
/* find uImage on erase block boundaries */
for (offset = 0; offset  master-size; offset += master-erasesize) {
struct uimage_header *header;
 
+   if (first_try)
+   pr_info([%s] sizeof(*header):%u\n, __FUNCTION__, 
sizeof(*header));
uimage_size = 0;
 
ret = read_uimage_header(master, offset, buf, sizeof(*buf));
@@ -308,8 +316,13 @@ static ssize_t uimage_find_edimax(u_char *buf, size_t len)
 {
struct uimage_header *header;
 
+   if (first_try)
+   pr_info([%s] buf:%p len:%zu FW_EDIMAX_OFFSET + 
sizeof(*header):%u\n, __FUNCTION__, buf, len, FW_EDIMAX_OFFSET + 
sizeof(*header));
+
if (len  FW_EDIMAX_OFFSET + sizeof(*header)) {
-   pr_err(Buffer too small for checking Edimax header\n);
+   if (first_try)
+   pr_err(Buffer too small for checking Edimax header\n);
+   first_try = 0;
return -ENOSPC;
}
 
-- 
1.8.4.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/5] generic: improve kexec support of MIPS.

2015-02-12 Thread John Crispin
Hi,

found something while merging the patches. see below ...

On 10/02/2015 13:10, Yousong Zhou wrote:
  - Allow --command-line parameters of kexec-tools be parsed and used by
the kernel.
  - For malta machine, mark kernel code and kernel data segments as
System RAM instead of reserved in /proc/iomem, otherwise
kexec-tools will complain that program segments in ELF kernel file
are invalid.
 
 Signed-off-by: Yousong Zhou yszhou4t...@gmail.com

[...]

 diff --git 
 a/target/linux/generic/patches-3.19/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
  
 b/target/linux/generic/patches-3.19/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
 new file mode 100644
 index 000..4457d75
 --- /dev/null
 +++ 
 b/target/linux/generic/patches-3.19/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
 @@ -0,0 +1,39 @@
 +From 79c7301c922f5023f85805a4ba969ce55f51d0ca Mon Sep 17 00:00:00 2001
 +From: Yousong Zhou yszhou4t...@gmail.com
 +Date: Sat, 31 Jan 2015 15:13:12 +0800
 +Subject: [PATCH 330/331] MIPS: Malta: Mark kernel code and kernel data
 + segments as BOOT_MEM_RAM.
 +
 +Kexec-tools requires those segments listed as System RAM in
 +/proc/iomem, otherwise, an error message of Invalid memory segment
 +will be emitted when trying to load the ELF kernel image.
 +
 +Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
 +---
 + arch/mips/mti-malta/malta-memory.c |9 ++---
 + 1 file changed, 2 insertions(+), 7 deletions(-)
 +
 +diff --git a/arch/mips/mti-malta/malta-memory.c 
 b/arch/mips/mti-malta/malta-memory.c
 +index 8fddd2cd..1d562f0 100644
 +--- a/arch/mips/mti-malta/malta-memory.c
  b/arch/mips/mti-malta/malta-memory.c
 +@@ -106,14 +106,9 @@ fw_memblock_t * __init fw_getmdesc(int eva)
 + mdesc[2].base = mdesc[0].base + 0x000fUL;
 + mdesc[2].size = 0x0001;
 + 
 +-mdesc[3].type = fw_dontuse;
 ++mdesc[3].type = fw_free;
 + mdesc[3].base = mdesc[0].base + 0x0010UL;
 +-mdesc[3].size = CPHYSADDR(PFN_ALIGN((unsigned long)_end)) -
 +-0x0010UL;
 +-
 +-mdesc[4].type = fw_free;
 +-mdesc[4].base = mdesc[0].base + CPHYSADDR(PFN_ALIGN(_end));
 +-mdesc[4].size = memsize - CPHYSADDR(mdesc[4].base);
 ++mdesc[3].size = memsize - CPHYSADDR(mdesc[3].base);
 + 

will the CPHYSADDR() call work on 64bit systems ?  64bit userland is
currenty broken and disbaled in openwrt, we should however try to fix
this before we send the patch upstream to ralf

John




 + return mdesc[0];
 + }
 +-- 
 +1.7.10.4
 +
 diff --git 
 a/target/linux/generic/patches-3.19/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
  
 b/target/linux/generic/patches-3.19/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
 new file mode 100644
 index 000..457b0bd
 --- /dev/null
 +++ 
 b/target/linux/generic/patches-3.19/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
 @@ -0,0 +1,308 @@
 +From 734dd58ef3a2161e1aaeb02d47e8b86c74379161 Mon Sep 17 00:00:00 2001
 +From: Yousong Zhou yszhou4t...@gmail.com
 +Date: Sat, 31 Jan 2015 22:26:03 +0800
 +Subject: [PATCH 331/331] MIPS: kexec: Accept command line parameters from
 + userspace.
 +
 +Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
 +---
 + arch/mips/kernel/machine_kexec.c   |  153 
 +++-
 + arch/mips/kernel/machine_kexec.h   |   20 +
 + arch/mips/kernel/relocate_kernel.S |   21 +++--
 + 3 files changed, 167 insertions(+), 27 deletions(-)
 + create mode 100644 arch/mips/kernel/machine_kexec.h
 +
 +diff --git a/arch/mips/kernel/machine_kexec.c 
 b/arch/mips/kernel/machine_kexec.c
 +index 50980bf3..b9c0f75 100644
 +--- a/arch/mips/kernel/machine_kexec.c
  b/arch/mips/kernel/machine_kexec.c
 +@@ -10,45 +10,145 @@
 + #include linux/mm.h
 + #include linux/delay.h
 + 
 ++#include asm/bootinfo.h
 + #include asm/cacheflush.h
 + #include asm/page.h
 +-
 +-extern const unsigned char relocate_new_kernel[];
 +-extern const size_t relocate_new_kernel_size;
 +-
 +-extern unsigned long kexec_start_address;
 +-extern unsigned long kexec_indirection_page;
 ++#include asm/uaccess.h
 ++#include machine_kexec.h
 + 
 + int (*_machine_kexec_prepare)(struct kimage *) = NULL;
 + void (*_machine_kexec_shutdown)(void) = NULL;
 + void (*_machine_crash_shutdown)(struct pt_regs *regs) = NULL;
 ++
 + #ifdef CONFIG_SMP
 + void (*relocated_kexec_smp_wait) (void *);
 + atomic_t kexec_ready_to_reboot = ATOMIC_INIT(0);
 + #endif
 + 
 +-int
 +-machine_kexec_prepare(struct kimage *kimage)
 ++static void machine_kexec_print_args(void)
 + {
 ++unsigned long argc = (int)kexec_args[0];
 ++int i;
 ++
 ++pr_info(kexec_args[0] (argc): %lu\n, argc);
 ++pr_info(kexec_args[1] (argv): %p\n, (void *)kexec_args[1]);
 ++pr_info(kexec_args[2] (env ): %p\n, (void *)kexec_args[2]);
 ++pr_info(kexec_args[3] (desc): %p\n, (void *)kexec_args[3]);
 ++
 ++for (i = 0; i  argc; i++) {
 ++pr_info(kexec_argv[%d] = %p, 

[OpenWrt-Devel] Trunk broken?

2015-02-12 Thread smilebef
Hello Volks,

is there a problem in trunk?


---
make[3]: Entering directory '/openwrt/tools/findutils'
make[3]: Leaving directory '/openwrt/tools/findutils'
make[3]: Entering directory '/openwrt/tools/quilt'
make -C /openwrt/build_dir/host/quilt-0.63 SHELL=bash all
make[4]: Entering directory '/openwrt/build_dir/host/quilt-0.63'
/openwrt/staging_dir/host/bin/msgmerge -o po/fr.po po/fr.po po/quilt.pot
/openwrt/staging_dir/host/bin/msgmerge: error while loading shared libraries: 
libgettextsrc-0.18.2.so: cannot open shared object file: No such file or 
directory
Makefile:149: recipe for target 'po/fr.po' failed
make[4]: *** [po/fr.po] Error 127
make[4]: Leaving directory '/openwrt/build_dir/host/quilt-0.63'
Makefile:39: recipe for target '/openwrt/build_dir/host/quilt-0.63/.built' 
failed
make[3]: *** [/openwrt/build_dir/host/quilt-0.63/.built] Error 2
make[3]: Leaving directory '/openwrt/tools/quilt'
tools/Makefile:126: recipe for target 'tools/quilt/compile' failed
make[2]: *** [tools/quilt/compile] Error 2
make[2]: Leaving directory '/openwrt'
tools/Makefile:125: recipe for target 
'/openwrt/staging_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/stamp/.tools_install_yynyynyyynyyynyynnyyynnyynnn'
 failed
make[1]: *** 
[/openwrt/staging_dir/target-arm_arm1176jzf-s+vfp_uClibc-0.9.33.2_eabi/stamp/.tools_install_yynyynyyynyyynyynnyyynnyynnn]
 Error 2
make[1]: Leaving directory '/openwrt'
/openwrt/include/toplevel.mk:179: recipe for target 'world' failed
make: *** [world] Error 2


pgp7mrXp9Zros.pgp
Description: Digitale Signatur von OpenPGP
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [Cerowrt-devel] [RFC PATCH] packages: Smart Queue Management for AQM Packet Scheduling and Qos from CeroWrt

2015-02-12 Thread Luis E. Garcia
Sebastian , Dave,
Thanks for these instructions.
I just finished a round of 3 months testing this setup on a couple of MyNet
N750 ( AR71xx based ) in several locations.
The feedback from users is very positive and encouraging - Most of them say
that they feel the networks behave a lot snappier than before [ 7.5Mbps Up/
1Mbps Down].

All I had to do was install the 3 packages over BB 14.07 :
ip-full from the OpenWRT BB repository
and luci-app-sqm + sam-scripts from the CeroWRT repository.

Will the later two packages ever make it to the main OpenWRT package list?
or there other packages that on the main OpenWRT distribution that can be
used to provide this functionality? ( the 2 CeroWRT packages above make
really simple to setup ).

Regards,
Luis Garcia

On Thu, Oct 9, 2014 at 2:59 PM, Sebastian Moeller moell...@gmx.de wrote:

 Hi Luis,


 On Oct 9, 2014, at 20:05 , Luis E. Garcia l...@bitamins.net wrote:

  Please excuse my dumb question or just point me to the right
 documentation.
  But is there an easy way to run AQM/Codel on BB 14.07 ?? I'm running BB
 on a MyNETN750 that looks like it meets the HW requirements.

 There probably is, I assume you need to install ip-full from the
 BB repository, and then copy
 http://snapon.lab.bufferbloat.net/~cero2/cerowrt/wndr/3.10.50-1/packages/luci-app-sqm_3-1_all.ipk
 and
 http://snapon.lab.bufferbloat.net/~cero2/cerowrt/wndr/3.10.50-1/packages/sqm-scripts_6-1_all.ipk
 onto your router and try:
 opkg install sqm-scripts_6-1_all.ipk
 and:
 opkg install luci-app-sqm_3-1_all.ipk

 You might need to play with opkg options, but in theory it should work…
 There probably also is a nicer way like adding a stanza similar to:
 src/gz toronto
 http://snapon.lab.bufferbloat.net/~cero2/cerowrt/wndr/3.10.50-1/packages
 to /etc/opkg.conf
 but I do not know the exact incantation of that, maybe hnyman, or Dave
 know the correct answer to this..

 Best Regards
 Sebastian

 
  Regards,
  Luis Garcia
 
  On Thu, Oct 9, 2014 at 12:57 PM, Sebastian Moeller moell...@gmx.de
 wrote:
  Hi Richard,
 
  On Oct 9, 2014, at 18:42 , Richard Smith smithb...@gmail.com wrote:
 
   On 10/06/2014 03:41 PM, Sebastian Moeller wrote:
  
  
   I have spare routers that I can run OpenWRT or CeroWRt on and I'm
   setup to test with netperf, netperf-wrapper on my local network (
   desktop - router - laptop )  it's Gbit so I can easily saturate
   the router.
  
   That sounds great. I think the first test should be to run SQM under
   cerowrt, so you get a feel of how things should look. I typically run
   netperf-wrapper rrul tests (for ipv4 and if available for ipv6)
   through cerowrt with different settings for SQM. A second step then
   is to instal SQM-scripts under openwrt and check whether the same
   settings produce the same results ;)
  
   Ok.  I'll get my spare WNDR3700v2 up running the latest cerowrt.
 Should be in the next few days.  I'm a bit strapped for time right now.
 
  No hurry, I really appreciate your help and there is no time
 pressure (rather the other way around, I do this for a hobby, and real life
 leaves almost no time for  that ;) )
 
  
   So just let me know what you are willing/ready to test and we will
   take it from there okay? (I would already be a happy camper if you
   could just install the current SQM-scripts on openwrt and just send
   me the output of “logread” after installing and activating SQM, as
   well as the output from “tc -d qdisc” before and after enabling SQM,
   and finally the output of running “/etc/init.d/sqm stop ;
   /etc/init.d/sqm start” on the router’s console; that hopefully works
   or at least gives some indication what might be off. If you could
   throw in a quick netperf-wrapper RRUL test through the router I will
   be most delighted ;))
  
   Ok. That sounds like a good starter step.  First question: Where are
 the current SQM scripts located and what's the process for installing
 them?  Are they packages or stuff that I scp over and manually install?
 
  So the repository lives on:
  https://github.com/dtaht/ceropackages-3.10
   I just followed Dave’s advice and used:
  git clone g...@github.com:dtaht/ceropackages-3.3.git
  to get my own version to play around with. Oh, SQM basically is the work
 of Dave (who wrote the scripts doing the actual AQMQOS work) and Toke you
 packaged all this nicely and created the GUI for it (all I ever did was
 shuffling the GUI around a bit). I just started hacking around the files
 from sqm-scripts and luck-app-sqm on my cerowrt (so I could immediately do
 some testing), so I never got around building actual packages (I assume you
 need to be setup to build whole openwrt/cerowrt images and that is outside
 the scope of my recreational coding), But that said if you copy the files
 from ceropackages-3.10/net/sqm-scripts/files to the matching directory on
 your router you should have a working sqm-script. Or just use a cerowrt
 built as SQM is standard and potentially 

Re: [OpenWrt-Devel] [PATCH] brcm2708-gpu-fw: revert to github releases, adapt to bcm2708 target changes and add back InstallDev

2015-02-12 Thread Felix Fietkau
On 2015-02-13 11:21, Álvaro Fernández Rojas wrote:
 Yeah, it would be great, but the real upstream repo is this one: 
 https://github.com/raspberrypi/firmware
 As you can see it has even more crap (and we only use some files of the boot 
 folder)...
I'll open up an issue there.

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


Re: [OpenWrt-Devel] [PATCH 3/3] netifd: Set interface device config when device has old settings

2015-02-12 Thread Felix Fietkau
On 2015-02-13 03:41, Hans Dedecker wrote:
 If interface device settings are removed in UCI they were not removed in the
 device settings; calling device_set_config when device settings are present
 solves this.
 
 Signed-off-by: Hans Dedecker dedec...@gmail.com
 ---
  config.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/config.c b/config.c
 index 34d2f2b..9108ab4 100644
 --- a/config.c
 +++ b/config.c
 @@ -136,7 +136,7 @@ config_parse_interface(struct uci_section *s, bool alias)
   if (blob_len(b.head) == 0)
   return;
  
 - if (iface-device_config)
 + if (iface-device_config || dev-settings.flags)
   device_set_config(dev, dev-type, b.head);
Wouldn't that overwrite device config added via 'config device' sections?

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


Re: [OpenWrt-Devel] [PATCH 3/5] generic: improve kexec support of MIPS.

2015-02-12 Thread Yousong Zhou
On 12 February 2015 at 14:34, John Crispin blo...@openwrt.org wrote:


 Hi,

 after some very basic testing i would suggest that

 On 10/02/2015 13:10, Yousong Zhou wrote:
 create mode 100644 
 target/linux/generic/patches-3.10/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
  create mode 100644 
 target/linux/generic/patches-3.10/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
  create mode 100644 
 target/linux/generic/patches-3.14/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
  create mode 100644 
 target/linux/generic/patches-3.14/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch

 i'll ignore the ones above as we want to move to 3.18+ asap

  create mode 100644 
 target/linux/generic/patches-3.18/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
  create mode 100644 
 target/linux/generic/patches-3.18/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
  create mode 100644 
 target/linux/generic/patches-3.19/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
  create mode 100644 
 target/linux/generic/patches-3.19/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch

 move the 2 mti-mala patche into the malta folder

 is that ok with you ?


Yes, that's better.

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


[OpenWrt-Devel] ATH9K_htc with option chanbw 10/5 Mhz ?

2015-02-12 Thread sp2ong
Hi,

I have use USB WN722n with my openwrt router and VirtualBOX Openwrt. ATH9K
have possibility setup channel width 10/5 Mhz. It will be nice to have
possibility setup 10/5 Mhz channel width use option 'chanbw' too.


Regards

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


Re: [OpenWrt-Devel] lantiq v3.18

2015-02-12 Thread Daniel Gimpelevich
On Thu, 12 Feb 2015 18:38:09 +0100, John Crispin wrote:
 ah i see, not even sure why we attach that info. the mtdsplid should
 automatically set the root=
 
 try removing the root= parameter please and see if it boots properly

That was there to override the root= from the bootloader, otherwise it
would try to use /dev/mtdblock0. This corrects it better and boots:

Signed-off-by: Daniel Gimpelevich dan...@gimpelevich.san-francisco.ca.us
--- a/target/linux/lantiq/dts/DGN3500.dtsi  (revision 44424)
+++ b/target/linux/lantiq/dts/DGN3500.dtsi  (working copy)
@@ -2,7 +2,7 @@
 
 / {
chosen {
-   bootargs-append = root=/dev/mtdblock5 console=ttyLTQ0,115200;
+   bootargs-append = root= console=ttyLTQ0,115200;
};
 
memory@0 {
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [Cerowrt-devel] [RFC PATCH] packages: Smart Queue Management for AQM Packet Scheduling and Qos from CeroWrt

2015-02-12 Thread Luis E. Garcia
That's great news.
Thanks again Dave - I found both SQM packages on the Chaos Calmer files.
I'll run some more test with users.

Regards,
Luis

On Thursday, February 12, 2015, Dave Taht dave.t...@gmail.com wrote:

 sqm-scripts entered the openwrt package repos for chaos calmer quite
 some time back.

 On Thu, Feb 12, 2015 at 6:02 PM, Luis E. Garcia l...@bitamins.net
 javascript:; wrote:
  Sebastian , Dave,
  Thanks for these instructions.
  I just finished a round of 3 months testing this setup on a couple of
 MyNet
  N750 ( AR71xx based ) in several locations.
  The feedback from users is very positive and encouraging - Most of them
 say
  that they feel the networks behave a lot snappier than before [ 7.5Mbps
 Up/
  1Mbps Down].
 
  All I had to do was install the 3 packages over BB 14.07 :
  ip-full from the OpenWRT BB repository
  and luci-app-sqm + sam-scripts from the CeroWRT repository.
 
  Will the later two packages ever make it to the main OpenWRT package
 list?
  or there other packages that on the main OpenWRT distribution that can be
  used to provide this functionality? ( the 2 CeroWRT packages above make
  really simple to setup ).
 
  Regards,
  Luis Garcia
 
  On Thu, Oct 9, 2014 at 2:59 PM, Sebastian Moeller moell...@gmx.de
 javascript:; wrote:
 
  Hi Luis,
 
 
  On Oct 9, 2014, at 20:05 , Luis E. Garcia l...@bitamins.net
 javascript:; wrote:
 
   Please excuse my dumb question or just point me to the right
   documentation.
   But is there an easy way to run AQM/Codel on BB 14.07 ?? I'm running
 BB
   on a MyNETN750 that looks like it meets the HW requirements.
 
  There probably is, I assume you need to install ip-full from the
  BB repository, and then copy
 
 http://snapon.lab.bufferbloat.net/~cero2/cerowrt/wndr/3.10.50-1/packages/luci-app-sqm_3-1_all.ipk
  and
 
 http://snapon.lab.bufferbloat.net/~cero2/cerowrt/wndr/3.10.50-1/packages/sqm-scripts_6-1_all.ipk
  onto your router and try:
  opkg install sqm-scripts_6-1_all.ipk
  and:
  opkg install luci-app-sqm_3-1_all.ipk
 
  You might need to play with opkg options, but in theory it should work…
  There probably also is a nicer way like adding a stanza similar to:
  src/gz toronto
 
 http://snapon.lab.bufferbloat.net/~cero2/cerowrt/wndr/3.10.50-1/packages
  to /etc/opkg.conf
  but I do not know the exact incantation of that, maybe hnyman, or Dave
  know the correct answer to this..
 
  Best Regards
  Sebastian
 
  
   Regards,
   Luis Garcia
  
   On Thu, Oct 9, 2014 at 12:57 PM, Sebastian Moeller moell...@gmx.de
 javascript:;
   wrote:
   Hi Richard,
  
   On Oct 9, 2014, at 18:42 , Richard Smith smithb...@gmail.com
 javascript:; wrote:
  
On 10/06/2014 03:41 PM, Sebastian Moeller wrote:
   
   
I have spare routers that I can run OpenWRT or CeroWRt on and I'm
setup to test with netperf, netperf-wrapper on my local network (
desktop - router - laptop )  it's Gbit so I can easily saturate
the router.
   
That sounds great. I think the first test should be to run SQM
 under
cerowrt, so you get a feel of how things should look. I typically
 run
netperf-wrapper rrul tests (for ipv4 and if available for ipv6)
through cerowrt with different settings for SQM. A second step then
is to instal SQM-scripts under openwrt and check whether the same
settings produce the same results ;)
   
Ok.  I'll get my spare WNDR3700v2 up running the latest cerowrt.
Should be in the next few days.  I'm a bit strapped for time right
 now.
  
   No hurry, I really appreciate your help and there is no time
   pressure (rather the other way around, I do this for a hobby, and
 real life
   leaves almost no time for  that ;) )
  
   
So just let me know what you are willing/ready to test and we will
take it from there okay? (I would already be a happy camper if you
could just install the current SQM-scripts on openwrt and just send
me the output of “logread” after installing and activating SQM, as
well as the output from “tc -d qdisc” before and after enabling
 SQM,
and finally the output of running “/etc/init.d/sqm stop ;
/etc/init.d/sqm start” on the router’s console; that hopefully
 works
or at least gives some indication what might be off. If you could
throw in a quick netperf-wrapper RRUL test through the router I
 will
be most delighted ;))
   
Ok. That sounds like a good starter step.  First question: Where are
the current SQM scripts located and what's the process for
 installing them?
Are they packages or stuff that I scp over and manually install?
  
   So the repository lives on:
   https://github.com/dtaht/ceropackages-3.10
I just followed Dave’s advice and used:
   git clone g...@github.com:dtaht/ceropackages-3.3.git
   to get my own version to play around with. Oh, SQM basically is the
 work
   of Dave (who wrote the scripts doing the actual AQMQOS work) and
 Toke you
   packaged all this nicely and created the 

[OpenWrt-Devel] Ubiquiti Rocket M5 build

2015-02-12 Thread Ken Buska
Is there anyone that is able to help create a build for the Rocket M5 XW
build?

-- 
Thank you,
Ken Buska
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Module option in Makefile?

2015-02-12 Thread John Crispin
Hi Matti,

On 12/02/2015 20:34, Matti Laakso wrote:
 Hi,
 
 Is there a way to specify in a Makefile for a kernel module that the entry
 under /etc/modules.d should be created with a specific option? For example
 
 mymodule option=1


that syntax is already supported by kmodloader


 I looked through ModuleAutoLoad in include/kernel.mk, but couldn't figure
 out a way...
 
yes, missing feature inside the makefiles.
i would suggest adding a 3rd parameter to probe_module and a 4th
parameter to add_module and then extend the echo call inside the 2 for
loops to also print the value to the files in /etc/modules.d/




 Matti Laakso
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/3] netifd: Set interface device config when device has old settings

2015-02-12 Thread Hans Dedecker
On Fri, Feb 13, 2015 at 2:57 AM, Felix Fietkau n...@openwrt.org wrote:
 On 2015-02-13 03:41, Hans Dedecker wrote:
 If interface device settings are removed in UCI they were not removed in the
 device settings; calling device_set_config when device settings are present
 solves this.

 Signed-off-by: Hans Dedecker dedec...@gmail.com
 ---
  config.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/config.c b/config.c
 index 34d2f2b..9108ab4 100644
 --- a/config.c
 +++ b/config.c
 @@ -136,7 +136,7 @@ config_parse_interface(struct uci_section *s, bool alias)
   if (blob_len(b.head) == 0)
   return;

 - if (iface-device_config)
 + if (iface-device_config || dev-settings.flags)
   device_set_config(dev, dev-type, b.head);
 Wouldn't that overwrite device config added via 'config device' sections?

 - Felix
Hi Felix,

Function config_parse_interface checks default_config for a given
device; if set to false the interface device config logic is skipped.
As default_config is set to false in function config_init_devices when
parsing the config device sections;
an overwrite of the device config section data is avoided in this case.

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


Re: [OpenWrt-Devel] looking for a tl-wdr4900 tester

2015-02-12 Thread Sami Olmari
I can do basic testing too, if wanted to :)

Sami Olmari
On Feb 12, 2015 1:50 PM, John Crispin blo...@openwrt.org wrote:

 Hi Philipp,

 On 12/02/2015 12:41, Philipp Borgers wrote:
  I can test if you provide me with an image or an *easy* way to
  compile.
 
 i will mail you an initramfs and a flashable image after i had lunch

  Is there any testing procedure I should follow? Do we have some
  kind of tests I don't know of?

 i wish i had. best if you flash the image, see if wifi and ethernet
 work, thats the best we can do right now i guess :-)

 thanks,
 John


 
  Regards Philipp
 
  On Thu, Feb 12, 2015 at 12:31:07PM +0100, John Crispin wrote:
  Hi,
 
  just bumped the kernel for the tl-wdr4900. i don't actually have
  the unit. anyone around that feels like testing the images before
  i push the series to trunk ?
 
  John ___
  openwrt-devel mailing list openwrt-devel@lists.openwrt.org
  https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
 
  ___ openwrt-devel
  mailing list openwrt-devel@lists.openwrt.org
  https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

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


Re: [OpenWrt-Devel] [PATCH 1/4] kernel: enable AES-NI for x86

2015-02-12 Thread Stijn Tintel
On 11-02-15 15:09, Ulrich Weber wrote:
 Signed-off-by: Ulrich Weber u...@ocedo.com
 ---
  package/kernel/linux/modules/crypto.mk | 13 ++---
  1 file changed, 10 insertions(+), 3 deletions(-)

 diff --git a/package/kernel/linux/modules/crypto.mk 
 b/package/kernel/linux/modules/crypto.mk
 index 4df2d73..7fea3bf 100644
 --- a/package/kernel/linux/modules/crypto.mk
 +++ b/package/kernel/linux/modules/crypto.mk
 @@ -256,15 +256,22 @@ $(eval $(call KernelPackage,crypto-hw-omap))
  
  define KernelPackage/crypto-aes
TITLE:=AES cipher CryptoAPI module
 -  KCONFIG:=CONFIG_CRYPTO_AES CONFIG_CRYPTO_AES_586
 +  KCONFIG:=CONFIG_CRYPTO_AES CONFIG_CRYPTO_AES_586 CONFIG_CRYPTO_AES_NI_INTEL
FILES:=$(LINUX_DIR)/crypto/aes_generic.ko
AUTOLOAD:=$(call AutoLoad,09,aes_generic)
$(call AddDepends/crypto)
  endef
  
  define KernelPackage/crypto-aes/x86
 -  FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.ko
 -  AUTOLOAD:=$(call AutoLoad,09,aes-i586)
 +  FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-i586.ko \
 + $(LINUX_DIR)/arch/x86/crypto/aesni-intel.ko \
 + $(LINUX_DIR)/arch/x86/crypto/ablk_helper.ko \
 + $(LINUX_DIR)/arch/x86/crypto/glue_helper.ko \
 + $(LINUX_DIR)/crypto/cryptd.ko \
 + $(LINUX_DIR)/crypto/gf128mul.ko \
 + $(LINUX_DIR)/crypto/xts.ko \
gf128mul and xts are already packaged. Use DEPENDS instead.
Konsole output
 + $(LINUX_DIR)/crypto/lrw.ko
 +  AUTOLOAD:=$(call AutoLoad,09,cryptd ablk_helper gf128mul xts lrw 
 aes_generic aes-i586 aesni-intel)
  endef
Remove them here as well.

Kind regards,
Stijn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/4] kernel: enable AES-NI for x86_64

2015-02-12 Thread Stijn Tintel
On 11-02-15 15:09, Ulrich Weber wrote:
 Signed-off-by: Ulrich Weber u...@ocedo.com
 ---
  package/kernel/linux/modules/crypto.mk | 12 
  1 file changed, 12 insertions(+)

 diff --git a/package/kernel/linux/modules/crypto.mk 
 b/package/kernel/linux/modules/crypto.mk
 index 7fea3bf..3d76ef3 100644
 --- a/package/kernel/linux/modules/crypto.mk
 +++ b/package/kernel/linux/modules/crypto.mk
 @@ -274,6 +274,18 @@ define KernelPackage/crypto-aes/x86
AUTOLOAD:=$(call AutoLoad,09,cryptd ablk_helper gf128mul xts lrw 
 aes_generic aes-i586 aesni-intel)
  endef
  
 +define KernelPackage/crypto-aes/x86_64
 +  FILES+=$(LINUX_DIR)/arch/x86/crypto/aes-x86_64.ko \
 + $(LINUX_DIR)/arch/x86/crypto/aesni-intel.ko \
 + $(LINUX_DIR)/arch/x86/crypto/ablk_helper.ko \
 + $(LINUX_DIR)/arch/x86/crypto/glue_helper.ko \
 + $(LINUX_DIR)/crypto/cryptd.ko \
 + $(LINUX_DIR)/crypto/gf128mul.ko \
 + $(LINUX_DIR)/crypto/xts.ko \
gf128mul, xts - DEPENDS.
 + $(LINUX_DIR)/crypto/lrw.ko
 +  AUTOLOAD:=$(call AutoLoad,09,cryptd ablk_helper gf128mul xts lrw 
 aes_generic aes-x86_64 aesni-intel)

Kind regards,
Stijn
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/5] brcm2708-gpu-fw: simplify target dependencies

2015-02-12 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
 package/kernel/brcm2708-gpu-fw/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index 3fe2a7f..b393630 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -23,9 +23,9 @@ include $(INCLUDE_DIR)/package.mk
 define Package/brcm2708-gpu-fw
   SECTION:=boot
   CATEGORY:=Boot Loaders
-  DEPENDS:=@(TARGET_brcm2708_bcm2708||TARGET_brcm2708_bcm2709)
+  DEPENDS:=@TARGET_brcm2708
   TITLE:=brcm2708-gpu-fw
-  DEFAULT:=y if (TARGET_brcm2708_bcm2708||TARGET_brcm2708_bcm2709)
+  DEFAULT:=y if TARGET_brcm2708
 endef
 
 define Package/brcm2708-gpu-fw/description
@@ -41,4 +41,3 @@ define Build/InstallDev
 endef
 
 $(eval $(call BuildPackage,brcm2708-gpu-fw))
-
-- 
1.8.3.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/5] brcm2708: fix spidev

2015-02-12 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
 .../patches-3.18/1000-BCM2708-fix-SPIDEV.patch | 36 ++
 1 file changed, 36 insertions(+)
 create mode 100644 
target/linux/brcm2708/patches-3.18/1000-BCM2708-fix-SPIDEV.patch

diff --git a/target/linux/brcm2708/patches-3.18/1000-BCM2708-fix-SPIDEV.patch 
b/target/linux/brcm2708/patches-3.18/1000-BCM2708-fix-SPIDEV.patch
new file mode 100644
index 000..fa7c21e
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.18/1000-BCM2708-fix-SPIDEV.patch
@@ -0,0 +1,36 @@
+--- a/arch/arm/mach-bcm2708/bcm2708.c
 b/arch/arm/mach-bcm2708/bcm2708.c
+@@ -559,7 +559,6 @@ static struct platform_device bcm2708_sp
+ 
+ #ifdef CONFIG_BCM2708_SPIDEV
+ static struct spi_board_info bcm2708_spi_devices[] = {
+-#ifdef CONFIG_SPI_SPIDEV
+   {
+   .modalias = spidev,
+   .max_speed_hz = 50,
+@@ -573,7 +572,6 @@ static struct spi_board_info bcm2708_spi
+   .chip_select = 1,
+   .mode = SPI_MODE_0,
+   }
+-#endif
+ };
+ #endif
+ 
+--- a/arch/arm/mach-bcm2709/bcm2709.c
 b/arch/arm/mach-bcm2709/bcm2709.c
+@@ -581,7 +581,6 @@ static struct platform_device bcm2708_sp
+ 
+ #ifdef CONFIG_BCM2708_SPIDEV
+ static struct spi_board_info bcm2708_spi_devices[] = {
+-#ifdef CONFIG_SPI_SPIDEV
+   {
+   .modalias = spidev,
+   .max_speed_hz = 50,
+@@ -595,7 +594,6 @@ static struct spi_board_info bcm2708_spi
+   .chip_select = 1,
+   .mode = SPI_MODE_0,
+   }
+-#endif
+ };
+ #endif
+ 
-- 
1.8.3.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] netifd: Set interface device config when device has old settings

2015-02-12 Thread Hans Dedecker
If interface device settings are removed in UCI they were not removed in the
device settings; calling device_set_config when device settings are present
solves this.

Signed-off-by: Hans Dedecker dedec...@gmail.com
---
 config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config.c b/config.c
index 34d2f2b..9108ab4 100644
--- a/config.c
+++ b/config.c
@@ -136,7 +136,7 @@ config_parse_interface(struct uci_section *s, bool alias)
if (blob_len(b.head) == 0)
return;
 
-   if (iface-device_config)
+   if (iface-device_config || dev-settings.flags)
device_set_config(dev, dev-type, b.head);
return;
 error_free_config:
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] netifd: Fix possible hotplug race conditions

2015-02-12 Thread Hans Dedecker
Don't drop ifup/ifdown events in case an interface event is cached
as it leads to possible race conditions (eg firewall not being
reloaded as ifup is dropped) when multiple interface events are fired
in a short timeframe (eg multiple PPP link flaps).
Always overwrite the cached interface event except for the
interface update event so the hotplug scripts are launched
with the last known status.

Signed-off-by: Hans Dedecker dedec...@gmail.com
---
 interface-event.c | 19 ---
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/interface-event.c b/interface-event.c
index 24af8f5..cfbc15c 100644
--- a/interface-event.c
+++ b/interface-event.c
@@ -120,22 +120,11 @@ interface_queue_event(struct interface *iface, enum 
interface_event ev)
if (current == iface) {
/* an event for iface is being processed */
if (!list_empty(iface-hotplug_list)) {
-   /* an additional event for iface is pending */
-   if ((ev != current_ev || ev == IFEV_UPDATE) 
-   !(iface-hotplug_ev == IFEV_UP  ev == IFEV_UPDATE)) {
-   /* if incoming event is different from the one
-* being handled or if it is an update,
-* overwrite pending event, but never
-* overwrite an ifup with an ifupdate */
+   /* an additional event for iface is pending   */
+   /* overwrite pending event if it differs from */
+   /* an update  */
+   if (ev != IFEV_UPDATE)
iface-hotplug_ev = ev;
-   }
-   else if (ev == current_ev  ev != IFEV_UPDATE) {
-   /* if incoming event is not an ifupdate
-* and is the same as the one that is
-* being handled, remove it from the
-* pending list */
-   list_del_init(iface-hotplug_list);
-   }
}
else {
/* no additional event for iface is pending */
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] netifd: Keep reference to a config copy in device type specific reload handler as the original config pointer might go stale

2015-02-12 Thread Hans Dedecker
Fixes random observed crashes in blobmsg_parse when device type specific
config data is parsed.

Signed-off-by: Hans Dedecker dedec...@gmail.com
---
 bridge.c  | 3 +++
 macvlan.c | 3 +++
 vlandev.c | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/bridge.c b/bridge.c
index f8478ad..7076fd7 100644
--- a/bridge.c
+++ b/bridge.c
@@ -491,6 +491,7 @@ bridge_free(struct device *dev)
 
bst = container_of(dev, struct bridge_state, dev);
vlist_flush_all(bst-members);
+   free(bst-config_data);
free(bst);
 }
 
@@ -594,6 +595,7 @@ bridge_reload(struct device *dev, struct blob_attr *attr)
BUILD_BUG_ON(sizeof(diff)  __DEV_ATTR_MAX / 8);
 
bst = container_of(dev, struct bridge_state, dev);
+   attr = blob_memdup(attr);
 
blobmsg_parse(device_attr_list.params, __DEV_ATTR_MAX, tb_dev,
blob_data(attr), blob_len(attr));
@@ -627,6 +629,7 @@ bridge_reload(struct device *dev, struct blob_attr *attr)
bridge_config_init(dev);
}
 
+   free(bst-config_data);
bst-config_data = attr;
return ret;
 }
diff --git a/macvlan.c b/macvlan.c
index 019a7ff..051fe05 100644
--- a/macvlan.c
+++ b/macvlan.c
@@ -140,6 +140,7 @@ macvlan_free(struct device *dev)
 
mvdev = container_of(dev, struct macvlan_device, dev);
device_remove_user(mvdev-parent);
+   free(mvdev-config_data);
free(mvdev);
 }
 
@@ -197,6 +198,7 @@ macvlan_reload(struct device *dev, struct blob_attr *attr)
struct macvlan_device *mvdev;
 
mvdev = container_of(dev, struct macvlan_device, dev);
+   attr = blob_memdup(attr);
 
blobmsg_parse(device_attr_list.params, __DEV_ATTR_MAX, tb_dev,
blob_data(attr), blob_len(attr));
@@ -226,6 +228,7 @@ macvlan_reload(struct device *dev, struct blob_attr *attr)
macvlan_config_init(dev);
}
 
+   free(mvdev-config_data);
mvdev-config_data = attr;
return ret;
 }
diff --git a/vlandev.c b/vlandev.c
index 7b2038e..884e6ef 100644
--- a/vlandev.c
+++ b/vlandev.c
@@ -131,6 +131,7 @@ vlandev_free(struct device *dev)
 
mvdev = container_of(dev, struct vlandev_device, dev);
device_remove_user(mvdev-parent);
+   free(mvdev-config_data);
free(mvdev);
 }
 
@@ -185,6 +186,7 @@ vlandev_reload(struct device *dev, struct blob_attr *attr)
struct vlandev_device *mvdev;
 
mvdev = container_of(dev, struct vlandev_device, dev);
+   attr = blob_memdup(attr);
 
blobmsg_parse(device_attr_list.params, __DEV_ATTR_MAX, tb_dev,
blob_data(attr), blob_len(attr));
@@ -214,6 +216,7 @@ vlandev_reload(struct device *dev, struct blob_attr *attr)
vlandev_config_init(dev);
}
 
+   free(mvdev-config_data);
mvdev-config_data = attr;
return ret;
 }
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq v3.18

2015-02-12 Thread Daniel Gimpelevich
On Thu, Feb 12, 2015 at 3:19 AM, John Crispin blo...@openwrt.org wrote:



 On 10/02/2015 10:40, Daniel Gimpelevich wrote:
  Is there a patchset I could try?

 try r44421 or newer


 Tried initramfs, bootlog attached.
[0.00] Linux version 3.18.6 (danielg4@chimera) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r43982) ) #2 Thu Feb 12 08:19:32 PST 2015
[0.00] SoC: AR9 rev 1.2
[0.00] bootconsole [early0] enabled
[0.00] CPU0 revision is: 0001954c (MIPS 34Kc)
[0.00] MIPS: machine is DGN3500 - Netgear DGN3500
[0.00] Determined physical RAM map:
[0.00]  memory: 0400 @  (usable)
[0.00] User-defined physical RAM map:
[0.00]  memory: 0400 @  (usable)
[0.00] Initrd not found or empty - disabling initrd
[0.00] Zone ranges:
[0.00]   Normal   [mem 0x-0x03ff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x03ff]
[0.00] Initmem setup node 0 [mem 0x-0x03ff]
[0.00] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[0.00] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[0.00] Kernel command line: root=/dev/ram rw ip=192.168.1.1:192.168.1.15eth0:on console=ttyS1,115200 ethaddr=30:46:9a:31:0c:99 phym=64M mem=64M panic=1 root=/dev/mtdblock5 console=ttyLTQ0,115200
[0.00] PID hash table entries: 256 (order: -2, 1024 bytes)
[0.00] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[0.00] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[0.00] Writing ErrCtl register=1bc2
[0.00] Readback ErrCtl register=1bc2
[0.00] Memory: 56244K/65536K available (3319K kernel code, 150K rwdata, 672K rodata, 4288K init, 194K bss, 9292K reserved)
[0.00] NR_IRQS:256
[0.00] CPU Clock: 333MHz
[0.00] Calibrating delay loop... 221.18 BogoMIPS (lpj=442368)
[0.04] pid_max: default: 32768 minimum: 301
[0.044000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.048000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.056000] pinctrl core: initialized pinctrl subsystem
[0.064000] NET: Registered protocol family 16
[0.072000] pinctrl-xway 1e100b10.pinmux: Init done
[0.076000] dma-xway 1e104100.dma: Init done - hw rev: 6, ports: 5, channels: 20
[0.084000] PCI host bridge /fpi@1000/pci@E105400 ranges:
[0.088000]  MEM 0x1800..0x19ff
[0.092000]   IO 0x1ae0..0x1aff
[0.096000] ath9k,eeprom ath9k_eep: failed to load eeprom address
[0.108000] usbcore: registered new interface driver usbfs
[0.112000] usbcore: registered new interface driver hub
[0.116000] usbcore: registered new device driver usb
[0.12] PCI host bridge to bus :00
[0.124000] pci_bus :00: root bus resource [mem 0x1800-0x19ff]
[0.128000] pci_bus :00: root bus resource [io  0x]
[0.132000] pci_bus :00: No busn resource found for root bus, will use [bus 00-ff]
[0.136000] pci :00:0e.0: BAR 0: assigned [mem 0x1800-0x1800]
[0.14] Switched to clocksource MIPS
[0.144000] NET: Registered protocol family 2
[0.152000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[0.156000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[0.164000] TCP: Hash tables configured (established 1024 bind 1024)
[0.172000] TCP: reno registered
[0.172000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[0.18] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[0.188000] NET: Registered protocol family 1
[   10.284000] gptu: totally 6 16-bit timers/counters
[   10.288000] gptu: misc_register on minor 63
[   10.292000] gptu: succeeded to request irq 126
[   10.30] gptu: succeeded to request irq 127
[   10.304000] gptu: succeeded to request irq 128
[   10.308000] gptu: succeeded to request irq 129
[   10.312000] gptu: succeeded to request irq 130
[   10.316000] gptu: succeeded to request irq 131
[   10.324000] futex hash table entries: 256 (order: -1, 3072 bytes)
[   10.332000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[   10.336000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[   10.348000] msgmni has been set to 109
[   10.352000] io scheduler noop registered
[   10.356000] io scheduler deadline registered (default)
[   10.36] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc
[   10.372000] console [ttyLTQ0] enabled
[   10.372000] console [ttyLTQ0] enabled
[   10.38] bootconsole [early0] disabled
[   10.38] bootconsole [early0] disabled
[   10.40] 

Re: [OpenWrt-Devel] lantiq v3.18

2015-02-12 Thread Daniel Gimpelevich
On Thu, Feb 12, 2015 at 8:54 AM, Daniel Gimpelevich 
dan...@gimpelevich.san-francisco.ca.us wrote:

 On Thu, Feb 12, 2015 at 3:19 AM, John Crispin blo...@openwrt.org wrote:



 On 10/02/2015 10:40, Daniel Gimpelevich wrote:
  Is there a patchset I could try?

 try r44421 or newer


  Tried initramfs, bootlog attached.


With this image, booting from SPI flash still fails, because there is no
longer a kernel partition, so the rootfs is now /dev/mtdblock4, while the
DTS file still specifies /dev/mtdblock5.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq v3.18

2015-02-12 Thread John Crispin


On 12/02/2015 18:30, Daniel Gimpelevich wrote:
 On Thu, Feb 12, 2015 at 8:54 AM, Daniel Gimpelevich
 dan...@gimpelevich.san-francisco.ca.us
 mailto:dan...@gimpelevich.san-francisco.ca.us wrote:
 
 On Thu, Feb 12, 2015 at 3:19 AM, John Crispin blo...@openwrt.org
 mailto:blo...@openwrt.org wrote:
 
 
 
 On 10/02/2015 10:40, Daniel Gimpelevich wrote:
  Is there a patchset I could try?
 
 try r44421 or newer
 
 
  Tried initramfs, bootlog attached.
 
 
 With this image, booting from SPI flash still fails, because there is no
 longer a kernel partition, so the rootfs is now /dev/mtdblock4, while
 the DTS file still specifies /dev/mtdblock5.

and why does that cause booting to fail ?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq v3.18

2015-02-12 Thread Daniel Gimpelevich
On Thu, Feb 12, 2015 at 9:33 AM, John Crispin blo...@openwrt.org wrote:



 On 12/02/2015 18:30, Daniel Gimpelevich wrote:
  On Thu, Feb 12, 2015 at 8:54 AM, Daniel Gimpelevich
  dan...@gimpelevich.san-francisco.ca.us
  mailto:dan...@gimpelevich.san-francisco.ca.us wrote:
 
  On Thu, Feb 12, 2015 at 3:19 AM, John Crispin blo...@openwrt.org
  mailto:blo...@openwrt.org wrote:
 
 
 
  On 10/02/2015 10:40, Daniel Gimpelevich wrote:
   Is there a patchset I could try?
 
  try r44421 or newer
 
 
   Tried initramfs, bootlog attached.
 
 
  With this image, booting from SPI flash still fails, because there is no
  longer a kernel partition, so the rootfs is now /dev/mtdblock4, while
  the DTS file still specifies /dev/mtdblock5.

 and why does that cause booting to fail ?


If the kernel cannot find the rootfs, it cannot boot.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq v3.18

2015-02-12 Thread John Crispin


On 12/02/2015 18:33, John Crispin wrote:
 
 
 On 12/02/2015 18:30, Daniel Gimpelevich wrote:
 On Thu, Feb 12, 2015 at 8:54 AM, Daniel Gimpelevich 
 dan...@gimpelevich.san-francisco.ca.us 
 mailto:dan...@gimpelevich.san-francisco.ca.us wrote:
 
 On Thu, Feb 12, 2015 at 3:19 AM, John Crispin
 blo...@openwrt.org mailto:blo...@openwrt.org wrote:
 
 
 
 On 10/02/2015 10:40, Daniel Gimpelevich wrote:
 Is there a patchset I could try?
 
 try r44421 or newer
 
 
 Tried initramfs, bootlog attached.
 
 
 With this image, booting from SPI flash still fails, because
 there is no longer a kernel partition, so the rootfs is now
 /dev/mtdblock4, while the DTS file still specifies
 /dev/mtdblock5.
 
 and why does that cause booting to fail ?

ah i see, not even sure why we attach that info. the mtdsplid should
automatically set the root=

try removing the root= parameter please and see if it boots properly






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