Re: [OpenWrt-Devel] bcm53xx: Netgear R7000 problems

2014-05-12 Thread Rafał Miłecki
On 12 May 2014 21:50, Andre Valentin  wrote:
> The problems I have is that I do not know how to get the flash working. It
> seems it is available via bcma, but not initialized.

Write a driver. There isn't any available yet.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] fstools: support ubifs overlay

2014-05-12 Thread Daniel Golle
Signed-off-by: Daniel Golle 

diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 826f77d..e052552 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -1,14 +1,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fstools
-PKG_VERSION:=2014-04-17
+PKG_VERSION:=2014-05-13
 
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://nbd.name/fstools.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=fe222812cc12d37647fbb8667851eb005ea95331
+PKG_SOURCE_VERSION:=a9e8236cde8c9b4784e4c91b23a2ba006e727f6a
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 CMAKE_INSTALL:=1
 
-- 
1.9.2



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


[OpenWrt-Devel] [PATCH 2/3] ubi-utils: bump to version 1.5.1 for ubiblock support

2014-05-12 Thread Daniel Golle
Signed-off-by: Daniel Golle 

diff --git a/package/utils/ubi-utils/Makefile b/package/utils/ubi-utils/Makefile
index d009139..fd41da0 100644
--- a/package/utils/ubi-utils/Makefile
+++ b/package/utils/ubi-utils/Makefile
@@ -8,9 +8,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mtd-utils
-PKG_REV:=ab8c6fb93ce9db0f09401c4b819b0b277dc00340
-PKG_VERSION:=1.5.0
-PKG_RELEASE:=2
+PKG_REV:=7d2839b8dede3ae368780364b4a07473d2303219
+PKG_VERSION:=1.5.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
@@ -33,6 +33,7 @@ include $(INCLUDE_DIR)/package.mk
 FILES:= \
ubiattach \
ubicrc32 \
+   ubiblock \
ubidetach \
ubiformat \
ubimkvol \
diff --git a/package/utils/ubi-utils/patches/130-lzma_jffs2.patch 
b/package/utils/ubi-utils/patches/130-lzma_jffs2.patch
index a40199e..c788f25 100644
--- a/package/utils/ubi-utils/patches/130-lzma_jffs2.patch
+++ b/package/utils/ubi-utils/patches/130-lzma_jffs2.patch
@@ -2,10 +2,10 @@
 +++ b/Makefile
 @@ -3,7 +3,7 @@
  
- VERSION = 1.5.0
+ VERSION = 1.5.1
  
--CPPFLAGS += -D_GNU_SOURCE -I./include -I$(BUILDDIR)/include 
-I./ubi-utils/include $(ZLIBCPPFLAGS) $(LZOCPPFLAGS)
-+CPPFLAGS += -D_GNU_SOURCE -I./include -I$(BUILDDIR)/include 
-I./ubi-utils/include $(ZLIBCPPFLAGS) $(LZOCPPFLAGS) -I./include/linux/lzma
+-CPPFLAGS += -D_GNU_SOURCE -I./include -I$(BUILDDIR)/include 
-I./ubi-utils/include $(ZLIBCPPFLAGS) $(LZOCPPFLAGS) $(UUIDCPPFLAGS)
++CPPFLAGS += -D_GNU_SOURCE -I./include -I$(BUILDDIR)/include 
-I./ubi-utils/include $(ZLIBCPPFLAGS) $(LZOCPPFLAGS) $(UUIDCPPFLAGS) 
-I./include/linux/lzma
  
  ifeq ($(WITHOUT_XATTR), 1)
CPPFLAGS += -DWITHOUT_XATTR
@@ -5011,7 +5011,7 @@
 +}
 --- a/mkfs.jffs2.c
 +++ b/mkfs.jffs2.c
-@@ -1658,11 +1658,11 @@ int main(int argc, char **argv)
+@@ -1659,11 +1659,11 @@ int main(int argc, char **argv)
  }
  erase_block_size *= units;
  
-- 
1.9.2



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


[OpenWrt-Devel] [PATCH 1/3] kernel-3.14: backport UBI block support

2014-05-12 Thread Daniel Golle
Signed-off-by: Daniel Golle 

 create mode 100644 
target/linux/generic/patches-3.14/490-UBI-R-O-block-driver-on-top-of-UBI-volumes.patch
 create mode 100644 
target/linux/generic/patches-3.14/491-UBI-block-do-not-use-term-attach.patch
 create mode 100644 
target/linux/generic/patches-3.14/492-UBI-block-Mark-init-only-symbol-as-__initdata.patch
 create mode 100644 
target/linux/generic/patches-3.14/493-UBI-block-Use-u64-for-the-64-bit-dividend.patch
 create mode 100644 
target/linux/generic/patches-3.14/494-UBI-rename-block-device-ioctls.patch
 create mode 100644 
target/linux/generic/patches-3.14/495-UBI-block-Remove-__initdata-from-ubiblock_param_ops.patch
 create mode 100644 
target/linux/generic/patches-3.14/496-UBI-avoid-workqueue-format-string-leak.patch
 create mode 100644 
target/linux/generic/patches-3.14/497-UBI-make-UBI_IOCVOLCRBLK-take-a-parameter-for-future.patch

diff --git 
a/target/linux/generic/patches-3.14/490-UBI-R-O-block-driver-on-top-of-UBI-volumes.patch
 
b/target/linux/generic/patches-3.14/490-UBI-R-O-block-driver-on-top-of-UBI-volumes.patch
new file mode 100644
index 000..50e9e2f
--- /dev/null
+++ 
b/target/linux/generic/patches-3.14/490-UBI-R-O-block-driver-on-top-of-UBI-volumes.patch
@@ -0,0 +1,847 @@
+From 9d54c8a33eec78289b1b3f6e10874719c27ce0a7 Mon Sep 17 00:00:00 2001
+From: Ezequiel Garcia 
+Date: Tue, 25 Feb 2014 13:25:22 -0300
+Subject: [PATCH] UBI: R/O block driver on top of UBI volumes
+
+This commit introduces read-only block device emulation on top of UBI volumes.
+
+Given UBI takes care of wear leveling and bad block management it's possible
+to add a thin layer to enable block device access to UBI volumes.
+This allows to use a block-oriented filesystem on a flash device.
+
+The UBI block devices are meant to be used in conjunction with any
+regular, block-oriented file system (e.g. ext4), although it's primarily
+targeted at read-only file systems, such as squashfs.
+
+Block devices are created upon user request through new ioctls:
+UBI_IOCVOLATTBLK to attach and UBI_IOCVOLDETBLK to detach.
+Also, a new UBI module parameter is added 'ubi.block'. This parameter is
+needed in order to attach a block device on boot-up time, allowing to
+mount the rootfs on a ubiblock device.
+For instance, you could have these kernel parameters:
+
+  ubi.mtd=5 ubi.block=0,0 root=/dev/ubiblock0_0
+
+Or, if you compile ubi as a module:
+
+  $ modprobe ubi mtd=/dev/mtd5 block=/dev/ubi0_0
+
+Artem: amend commentaries and massage the patch a little bit.
+
+Signed-off-by: Ezequiel Garcia 
+Signed-off-by: Artem Bityutskiy 
+---
+ drivers/mtd/ubi/Kconfig |  15 +
+ drivers/mtd/ubi/Makefile|   1 +
+ drivers/mtd/ubi/block.c | 646 
+ drivers/mtd/ubi/build.c |  11 +
+ drivers/mtd/ubi/cdev.c  |  20 ++
+ drivers/mtd/ubi/ubi.h   |  14 +
+ include/uapi/mtd/ubi-user.h |  11 +
+ 7 files changed, 718 insertions(+)
+ create mode 100644 drivers/mtd/ubi/block.c
+
+diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
+index 36663af..783fb18 100644
+--- a/drivers/mtd/ubi/Kconfig
 b/drivers/mtd/ubi/Kconfig
+@@ -87,4 +87,19 @@ config MTD_UBI_GLUEBI
+  work on top of UBI. Do not enable this unless you use legacy
+  software.
+ 
++config MTD_UBI_BLOCK
++  bool "Read-only block devices on top of UBI volumes"
++  default n
++  help
++ This option enables read-only UBI block devices support. UBI block
++ devices will be layered on top of UBI volumes, which means that the
++ UBI driver will transparently handle things like bad eraseblocks and
++ bit-flips. You can put any block-oriented file system on top of UBI
++ volumes in read-only mode (e.g., ext4), but it is probably most
++ practical for read-only file systems, like squashfs.
++
++ When selected, this feature will be built in the UBI driver.
++
++ If in doubt, say "N".
++
+ endif # MTD_UBI
+diff --git a/drivers/mtd/ubi/Makefile b/drivers/mtd/ubi/Makefile
+index b46b0c97..4e3c3d7 100644
+--- a/drivers/mtd/ubi/Makefile
 b/drivers/mtd/ubi/Makefile
+@@ -3,5 +3,6 @@ obj-$(CONFIG_MTD_UBI) += ubi.o
+ ubi-y += vtbl.o vmt.o upd.o build.o cdev.o kapi.o eba.o io.o wl.o attach.o
+ ubi-y += misc.o debug.o
+ ubi-$(CONFIG_MTD_UBI_FASTMAP) += fastmap.o
++ubi-$(CONFIG_MTD_UBI_BLOCK) += block.o
+ 
+ obj-$(CONFIG_MTD_UBI_GLUEBI) += gluebi.o
+diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c
+new file mode 100644
+index 000..cea7d1c
+--- /dev/null
 b/drivers/mtd/ubi/block.c
+@@ -0,0 +1,646 @@
++/*
++ * Copyright (c) 2014 Ezequiel Garcia
++ * Copyright (c) 2011 Free Electrons
++ *
++ * Driver parameter handling strongly based on drivers/mtd/ubi/build.c
++ *   Copyright (c) International Business Machines Corp., 2006
++ *   Copyright (c) Nokia Corporation, 2007
++ *   Authors: Artem Bityutskiy, Frank Haverkamp
++ *
++ * This program is free software; you can redistribute it and/or mo

[OpenWrt-Devel] [PATCH 0/3] squashfs on ubiblock and ubifs overlay support

2014-05-12 Thread Daniel
ubiblock now allows squashfs inside an ubi volume in a sane way.
backport ubiblock support from 3.15.
bump ubi-utils for ubiblock support and add ubifs overlay support to fstools.

Daniel Golle (3):
  kernel-3.14: backport UBI block support
  ubi-utils: bump to version 1.5.1 for ubiblock support
  fstools: support ubifs overlay

 package/system/fstools/Makefile|   4 +-
 package/utils/ubi-utils/Makefile   |   7 +-
 .../utils/ubi-utils/patches/130-lzma_jffs2.patch   |   8 +-
 ...BI-R-O-block-driver-on-top-of-UBI-volumes.patch | 847 +
 .../491-UBI-block-do-not-use-term-attach.patch | 194 +
 ...block-Mark-init-only-symbol-as-__initdata.patch |  42 +
 ...UBI-block-Use-u64-for-the-64-bit-dividend.patch |  33 +
 .../494-UBI-rename-block-device-ioctls.patch   |  92 +++
 ...Remove-__initdata-from-ubiblock_param_ops.patch |  35 +
 ...96-UBI-avoid-workqueue-format-string-leak.patch |  30 +
 ...I_IOCVOLCRBLK-take-a-parameter-for-future.patch |  63 ++
 11 files changed, 1346 insertions(+), 9 deletions(-)
 create mode 100644 
target/linux/generic/patches-3.14/490-UBI-R-O-block-driver-on-top-of-UBI-volumes.patch
 create mode 100644 
target/linux/generic/patches-3.14/491-UBI-block-do-not-use-term-attach.patch
 create mode 100644 
target/linux/generic/patches-3.14/492-UBI-block-Mark-init-only-symbol-as-__initdata.patch
 create mode 100644 
target/linux/generic/patches-3.14/493-UBI-block-Use-u64-for-the-64-bit-dividend.patch
 create mode 100644 
target/linux/generic/patches-3.14/494-UBI-rename-block-device-ioctls.patch
 create mode 100644 
target/linux/generic/patches-3.14/495-UBI-block-Remove-__initdata-from-ubiblock_param_ops.patch
 create mode 100644 
target/linux/generic/patches-3.14/496-UBI-avoid-workqueue-format-string-leak.patch
 create mode 100644 
target/linux/generic/patches-3.14/497-UBI-make-UBI_IOCVOLCRBLK-take-a-parameter-for-future.patch

-- 
1.9.2



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


[OpenWrt-Devel] [PATCH] dnsmasq: update to 2.70

2014-05-12 Thread Erik Rigtorp
100-fix-dhcp-no-address-warning.patch maybe fixed upstream
110-fix-incorrect-length-memset.patch fixed upstream
---
 package/network/services/dnsmasq/Makefile  |  8 ++--
 .../patches/100-fix-dhcp-no-address-warning.patch  | 51 --
 .../patches/110-fix-incorrect-length-memset.patch  | 13 --
 3 files changed, 4 insertions(+), 68 deletions(-)
 delete mode 100644
package/network/services/dnsmasq/patches/100-fix-dhcp-no-address-warning.patch
 delete mode 100644
package/network/services/dnsmasq/patches/110-fix-incorrect-length-memset.patch

diff --git a/package/network/services/dnsmasq/Makefile
b/package/network/services/dnsmasq/Makefile
index 0673465..aa8e720 100644
--- a/package/network/services/dnsmasq/Makefile
+++ b/package/network/services/dnsmasq/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2013 OpenWrt.org
+# Copyright (C) 2006-2014 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk

 PKG_NAME:=dnsmasq
-PKG_VERSION:=2.66
-PKG_RELEASE:=5
+PKG_VERSION:=2.70
+PKG_RELEASE:=1

 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
-PKG_MD5SUM:=c5eb8fb88847a5e9bf18db67c74efd47
+PKG_MD5SUM:=d6afbf46cd80bb0b7f6ed1404733ed4f

 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=COPYING
diff --git 
a/package/network/services/dnsmasq/patches/100-fix-dhcp-no-address-warning.patch
b/package/network/services/dnsmasq/patches/100-fix-dhcp-no-address-warning.patch
deleted file mode 100644
index 474f62f..000
--- 
a/package/network/services/dnsmasq/patches/100-fix-dhcp-no-address-warning.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Index: dnsmasq-2.66/src/dhcp.c
-===
 dnsmasq-2.66.orig/src/dhcp.c 2013-04-17 14:52:49.0 +0200
-+++ dnsmasq-2.66/src/dhcp.c 2013-04-24 08:24:20.393711625 +0200
-@@ -140,7 +140,7 @@
-   struct iovec iov;
-   ssize_t sz;
-   int iface_index = 0, unicast_dest = 0, is_inform = 0;
--  struct in_addr iface_addr;
-+  struct in_addr iface_addr, *addrp = NULL;
-   struct iface_param parm;
- #ifdef HAVE_LINUX_NETWORK
-   struct arpreq arp_req;
-@@ -252,11 +252,9 @@
-
-   ifr.ifr_addr.sa_family = AF_INET;
-   if (ioctl(daemon->dhcpfd, SIOCGIFADDR, &ifr) != -1 )
--iface_addr = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr;
--  else
- {
--  my_syslog(MS_DHCP | LOG_WARNING, _("DHCP packet received on %s
which has no address"), ifr.ifr_name);
--  return;
-+  addrp = &iface_addr;
-+  iface_addr = ((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr;
- }
-
-   for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next)
-@@ -270,7 +268,7 @@
-   parm.current = NULL;
-   parm.ind = iface_index;
-
--  if (!iface_check(AF_INET, (struct all_addr *)&iface_addr,
ifr.ifr_name, NULL))
-+  if (!iface_check(AF_INET, (struct all_addr *)addrp, ifr.ifr_name, NULL))
- {
-   /* If we failed to match the primary address of the interface,
see if we've got a --listen-address
- for a secondary */
-@@ -289,7 +287,13 @@
- there is more than one address on the interface in the same subnet */
-   complete_context(match.addr, iface_index, match.netmask,
match.broadcast, &parm);
- }
--
-+
-+  if (!addrp)
-+{
-+  my_syslog(MS_DHCP | LOG_WARNING, _("DHCP packet received on %s
which has no address"), ifr.ifr_name);
-+  return;
-+}
-+
-   if (!iface_enumerate(AF_INET, &parm, complete_context))
- return;
-
diff --git 
a/package/network/services/dnsmasq/patches/110-fix-incorrect-length-memset.patch
b/package/network/services/dnsmasq/patches/110-fix-incorrect-length-memset.patch
deleted file mode 100644
index 4d6159a..000
--- 
a/package/network/services/dnsmasq/patches/110-fix-incorrect-length-memset.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: dnsmasq-2.66/src/ipset.c
-===
 dnsmasq-2.66.orig/src/ipset.c 2013-04-17 14:52:49.0 +0200
-+++ dnsmasq-2.66/src/ipset.c 2013-04-24 08:25:05.905712707 +0200
-@@ -110,7 +110,7 @@
-   return -1;
- }
-
--  memset(buffer, 0, sizeof(buffer));
-+  memset(buffer, 0, BUFF_SZ);
-
-   nlh = (struct nlmsghdr *)buffer;
-   nlh->nlmsg_len = NL_ALIGN(sizeof(struct nlmsghdr));
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] bcm53xx: Netgear R7000 problems

2014-05-12 Thread Andre Valentin

Hello!

I saw that there is support for the Netgear R6250 in openwrt. So I thought 
maybe the R7000 is not so far from being support. It's not ;-)
After I modified the R6250 config in openwrt to allow the initramfs image to be flashed. First problem I then saw is that the image loads fine, but on serial I get only rubbish. But the luck was on my 
side, the device responded to ping and allowed me a login.


This is the CFE boot log:

CFE for Foxconn Router R7000 version: v1.0.21
Build Date: Wed Aug  7 19:11:17 CST 2013
Init Arena
Init Devs.
Boot up from NAND flash...
Bootcode Boot partition size = 524288(0x8)
DDR Clock: 800 MHz
Info: DDR frequency set from clkfreq=1000,*800*
et0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 6.37.15.1 (r407936)
CPU type 0x0: 1000MHz
Tot mem: 262144 KBytes

Device eth0:  hwaddr C4-04-15-5B-C4-66, ipaddr 192.168.1.1, mask 255.255.255.0
gateway not set, nameserver not set
Loader:raw Filesys:tftp Dev:eth0 File:192.168.1.2:vmlinuz Options:(null)
Loading: TFTP error 1: File not found
Failed.
Could not load 192.168.1.2:vmlinuz: Network protocol error
Checking crc...Loader:raw Filesys:raw Dev:nflash0.os File: Options:(null)
Loading: ... 2113986 bytes read
Entry at 0x8000
Closing network.
Starting program at 0x8000

And now the dmesg:

[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 3.10.36 (avalentin@varus) (gcc version 4.8.3 
(OpenWrt/Linaro GCC 4.8-2014.01 r40555) ) #24 SMP Mon May 12 21:30:34 CEST 2014
[0.00] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c53c7d
[0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing 
instruction cache
[0.00] Machine: BCM5301X, model: Netgear R6250 V1 (BCM4708)
[0.00] Memory policy: ECC disabled, Data cache writealloc
[0.00] On node 0 totalpages: 32768
[0.00] free_area_init_node: node 0, pgdat c060d240, node_mem_map 
c064b000
[0.00]   Normal zone: 256 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 32768 pages, LIFO batch:7
[0.00] PERCPU: Embedded 7 pages/cpu @c074f000 s6784 r8192 d13696 u32768
[0.00] pcpu-alloc: s6784 r8192 d13696 u32768 alloc=8*4096
[0.00] pcpu-alloc: [0] 0 [0] 1
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 32512
[0.00] Kernel command line: console=ttyS0,115200
[0.00] PID hash table entries: 512 (order: -1, 2048 bytes)
[0.00] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[0.00] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[0.00] Memory: 128MB = 128MB total
[0.00] Memory: 123416k/123416k available, 7656k reserved, 0K highmem
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xfff0 - 0xfffe   ( 896 kB)
[0.00] vmalloc : 0xc880 - 0xff00   ( 872 MB)
[0.00] lowmem  : 0xc000 - 0xc800   ( 128 MB)
[0.00] modules : 0xbf00 - 0xc000   (  16 MB)
[0.00]   .text : 0xc0008000 - 0xc02d6db4   (2876 kB)
[0.00]   .init : 0xc02d7000 - 0xc0606a80   (3263 kB)
[0.00]   .data : 0xc0608000 - 0xc061ee88   (  92 kB)
[0.00].bss : 0xc061ee88 - 0xc064ac54   ( 176 kB)
[0.00] Hierarchical RCU implementation.
[0.00]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[0.00] NR_IRQS:16 nr_irqs:16 16
[0.00] sched_clock: 32 bits at 400MHz, resolution 2ns, wraps every 
10737ms
[0.000227] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[0.090046] pid_max: default: 32768 minimum: 301
[0.090201] Mount-cache hash table entries: 512
[0.091418] CPU: Testing write buffer coherency: ok
[0.091709] CPU0: thread -1, cpu 0, socket 0, mpidr 8000
[0.091780] Setting up static identity map for 0xc0010ef0 - 0xc0010f24
[0.092829] CPU1: failed to boot: -38
[0.092865] Brought up 1 CPUs
[0.092877] SMP: Total of 1 processors activated (1594.16 BogoMIPS).
[0.092884] CPU: All CPU(s) started in SVC mode.
[0.101230] NET: Registered protocol family 16
[0.101667] DMA: preallocated 256 KiB pool for atomic coherent allocations
[0.102704] L310 cache controller enabled
[0.102724] l2x0: 16 ways, CACHE_ID 0x41c8, AUX_CTRL 0x0a13, Cache 
size: 262144 B
[0.111556] bio: create slab  at 0
[0.113982] Switching to clocksource arm_global_timer
[0.116878] NET: Registered protocol family 2
[0.117442] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[0.117479] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[0.117505] TCP: Hash tables configured (established 1024 bind 1024)
[0.117572] TCP: reno registered
[0.117595] UDP hash table entries: 256 (order: 1, 8192 bytes)
[0.117638] UDP-Lite hash table entries: 256 (ord

Re: [OpenWrt-Devel] [PATCH 16/30][ WRT1900AC ] mamba mvebu: sysupgrade support for mamba + dual boot

2014-05-12 Thread Karl P



On 05/10/2014 07:57 PM, Daniel Golle wrote:

Hi!

On 05/10/2014 06:45 PM, Marek Lindner wrote:

On Saturday 10 May 2014 16:38:42 Karl P wrote:

On 05/10/2014 10:53 AM, Marek Lindner wrote:

On Friday 09 May 2014 14:11:32 Karl Palsson wrote:

I understand how it works in general, John was nacking the support as it
duplicated existing functionality.  I was asking more about this existing
functionality within openwrt for supporting dual firmware images.  I
wasn't
aware of any existing functionality for this.


Check target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh. All OpenMesh
boards provide exactly this kind of upgrade behavior.


Which of course begs the question why it's buried in openmesh support code
:)


Feel free to 'liberate' the code any way you see fit. I would not know how to
abstract this code in a meaningful way, so it could be re-used elsewhere but I
am certainly willing to review your patches on that matter.

I also implemented this for the ALL0258N in r28700, later added the necessary
abstraction to at least support all the similar Allnet devices within the same
script. When I saw the OM2P support was merged, I wasn't that happy to see a 90%
copy of an already ugly vendor-specific hack occupying flash-space on *all*
ar71xx-based devices... (ugly because the uImage header already got a checksum,
and if already start hacking on the bootloader, they could have implemented FIT
or alike)

Anyway, we are far from having decent U-Boot source coverage on ar71xx to
replace the affected bootloaders, so we'll have to deal with it. It should be
possible to further generalize the two existing scripts into one.
I'd be happy to provide assistance and code review in that matter. However, I do
not have time to work on this, nor casual access to testing devices which might
end up bricked and need recovery via serial...



So,

John Crispin, for the nack on the original patch, which of these two 
alternatives are the "existing functionality" that is meant to be used, and how?


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


[OpenWrt-Devel] [PATCH] ramips: add missing profile for DIR-615-D

2014-05-12 Thread Daniel
Signed-off-by: Daniel Golle 
---
 target/linux/ramips/rt305x/profiles/dlink.mk | 13 +
 1 file changed, 13 insertions(+)

diff --git a/target/linux/ramips/rt305x/profiles/dlink.mk 
b/target/linux/ramips/rt305x/profiles/dlink.mk
index 5c5ea8f..63208e8 100644
--- a/target/linux/ramips/rt305x/profiles/dlink.mk
+++ b/target/linux/ramips/rt305x/profiles/dlink.mk
@@ -18,6 +18,19 @@ endef
 
 $(eval $(call Profile,DIR615H1))
 
+define Profile/DIR-615-D
+   NAME:=Dlink DIR-615 D
+PACKAGES:=\
+-kmod-usb-core -kmod-usb-rt305x-dwc_otg \
+-kmod-ledtrig-usbdev
+endef
+
+define Profile/DIR-615-D/Description
+   Package set for Dlink DIR-615 D board
+endef
+
+$(eval $(call Profile,DIR-615-D))
+
 define Profile/DCS930
NAME:=Dlink DCS-930
 PACKAGES:=kmod-video-core kmod-video-uvc \
-- 
1.9.2



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


[OpenWrt-Devel] [PATCH] [ramips] fix not set lan/wan mac address

2014-05-12 Thread michael lee
The first switch case is default case. Then it will only
match default case. cause not update the lan/wan mac address.
And in the default switch case the param lan_mac is empty.
it will case error message 'arithmetic syntax error' when
call macaddr_add function.

Signed-off-by: michael lee 
---
 target/linux/ramips/base-files/etc/uci-defaults/02_network | 4 
 1 file changed, 4 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index b66d176..550e81f 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -172,10 +172,6 @@ ramips_setup_macs()
local wan_mac=""
 
case $board in
-   *)
-   wan_mac=$(macaddr_add "$lan_mac" 1)
-   ;;
-
br-6475nd)
lan_mac=$(mtd_get_mac_binary devdata 13)
wan_mac=$(mtd_get_mac_binary devdata 7)
-- 
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] [ramips] add seama image can be upgrade by sysupgrade

2014-05-12 Thread michael lee
generate sysupgrade image by combine two images.
one is kernel image with seama header.
another is root fs image.

Signed-off-by: michael lee 
---
 target/linux/ramips/image/Makefile | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile
index 19932f6..f64b7fa 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -162,7 +162,8 @@ BuildFirmware/Edimax/initramfs=$(call 
BuildFirmware/OF/initramfs,$(1),$(2),$(3))
 
 # build Seama header images
 define BuildFirmware/Seama/squashfs
-   $(call BuildFirmware/OF,$(1),$(2),$(3),$(5))
+   $(call MkImageLzmaDtb,$(2),$(3),$(5))
+   $(eval output_name=$(IMG_PREFIX)-$(2)-$(1)-sysupgrade.bin)
cat $(KDIR)/vmlinux-$(2).bin.lzma $(KDIR)/root.$(1) > 
$(KDIR)/img_$(2).$(1).tmp
if [ `stat -c%s "$(KDIR)/img_$(2).$(1).tmp"` -gt (($(5) - 64)) ]; 
then \
echo "Warning: $(KDIR)/img_$(2).$(1).tmp is too big" >&2; \
@@ -179,6 +180,14 @@ define BuildFirmware/Seama/squashfs
-s $(call imgname,$(1),$(2))-factory.bin \
-m "signature=$(4)" \
-i $(KDIR)/vmlinux-$(2).tmp.seama; \
+   dd if=$(KDIR)/vmlinux-$(2).bin.lzma.padded bs=1 count=`expr 
\`stat -c%s $(KDIR)/vmlinux-$(2).bin.lzma.padded\` - 64` 
of=$(KDIR)/vmlinux-$(2)-sysupgrade.tmp; \
+   $(STAGING_DIR_HOST)/bin/seama \
+   -i $(KDIR)/vmlinux-$(2)-sysupgrade.tmp \
+   -m "dev=/dev/mtdblock/2" -m "type=firmware"; \
+   ( \
+   dd if=$(KDIR)/vmlinux-$(2)-sysupgrade.tmp.seama; \
+   dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
+   ) > $(BIN_DIR)/$(output_name); \
fi
 endef
 BuildFirmware/Seama/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3))
-- 
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] [netifd] Add vlan 802.1q/802.1ad support as netifd devices

2014-05-12 Thread Gioacchino Mazzurco
This patch add support for vlan 802.1q and 802.1ad as netifd devices now user 
can create and configure vlan interfaces in this way too (the old way for 
802.1q remain untouched)

 config device 'test'
option type '8021ad'
option name 'test'
option ifname '@lan'
option vid '1000'

config interface 'testif'
option ifname 'test'
option proto 'none'
option auto '1'

If patch get mangled in email sending you can take a look at it here 
http://madrid.guifi.net/~gioacchino/add-vlanad.patch

Signed-off-by: Gioacchino Mazzurco 

diff --git a/.gitignore b/.gitignore
index fe96dbe..3f9151f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,5 @@ CMakeCache.txt
 CMakeFiles
 *.cmake
 install_manifest.txt
-
+CMakeLists.txt.user
+netifd.kdev4
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 65da3cf..00a768a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,7 @@ SET(SOURCES
interface.c interface-ip.c interface-event.c
iprule.c proto.c proto-static.c proto-shell.c
config.c device.c bridge.c vlan.c alias.c
-   macvlan.c ubus.c wireless.c)
+   macvlan.c ubus.c vlanad.c wireless.c)
 
 
 find_library(json NAMES json-c json)
diff --git a/config.c b/config.c
index 1d04efd..80a16f4 100644
--- a/config.c
+++ b/config.c
@@ -1,6 +1,7 @@
 /*
  * netifd - network interface daemon
  * Copyright (C) 2012 Felix Fietkau 
+ * Copyright (C) 2014 Gioacchino Mazzurco 
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2
@@ -167,12 +168,16 @@ config_init_devices(void)
 
type = uci_lookup_option_string(uci_ctx, s, "type");
if (type) {
-   if (!strcmp(type, "bridge"))
+   if (!strcmp(type, "8021ad"))
+   devtype = &vlanad_device_type;
+   else if (!strcmp(type, "8021q"))
+   devtype = &vlanad_device_type;
+   else if (!strcmp(type, "bridge"))
devtype = &bridge_device_type;
-   else if (!strcmp(type, "tunnel"))
-   devtype = &tunnel_device_type;
else if (!strcmp(type, "macvlan"))
devtype = &macvlan_device_type;
+   else if (!strcmp(type, "tunnel"))
+   devtype = &tunnel_device_type;
}
 
if (!devtype)
diff --git a/device.h b/device.h
index 6fceaa1..0ea90f4 100644
--- a/device.h
+++ b/device.h
@@ -1,6 +1,7 @@
 /*
  * netifd - network interface daemon
  * Copyright (C) 2012 Felix Fietkau 
+ * Copyright (C) 2014 Gioacchino Mazzurco 
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2
@@ -161,6 +162,7 @@ extern const struct device_type simple_device_type;
 extern const struct device_type bridge_device_type;
 extern const struct device_type tunnel_device_type;
 extern const struct device_type macvlan_device_type;
+extern const struct device_type vlanad_device_type;
 
 void device_lock(void);
 void device_unlock(void);
diff --git a/system-dummy.c b/system-dummy.c
index deb53ff..c0ec2b4 100644
--- a/system-dummy.c
+++ b/system-dummy.c
@@ -1,6 +1,7 @@
 /*
  * netifd - network interface daemon
  * Copyright (C) 2012 Felix Fietkau 
+ * Copyright (C) 2014 Gioacchino Mazzurco 
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2
@@ -254,3 +255,13 @@ int system_macvlan_del(struct device *macvlan)
 {
return 0;
 }
+
+int system_vlanad_add(struct device *vlanad, struct device *dev, struct 
vlanad_config *cfg)
+{
+   return 0;
+}
+
+int system_vlanad_del(struct device *vlanad)
+{
+   return 0;
+}
diff --git a/system-linux.c b/system-linux.c
index 7a194ca..1bb042a 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2012 Felix Fietkau 
  * Copyright (C) 2013 Jo-Philipp Wich 
  * Copyright (C) 2013 Steven Barth 
+ * Copyright (C) 2014 Gioacchino Mazzurco 
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2
@@ -36,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifndef RTN_FAILED_POLICY
 #define RTN_FAILED_POLICY 12
@@ -802,6 +804,79 @@ int system_vlan_del(struct device *dev)
return system_vlan(dev, -1);
 }
 
+int system_vlanad_add(struct device *vlanad, struct device *dev, struct 
vlanad_config *cfg)
+{
+   struct nl_msg *msg;
+   struct nlattr *linkinfo, *data;
+   struct ifinfomsg iim = { .ifi_family = AF_INET };
+   int ifindex = system_if_resolve(dev);
+   int rv;
+
+   if (ifindex == 0)
+   return -ENOENT;
+
+   msg = nlms

Re: [OpenWrt-Devel] help with netifd 802.1ad development

2014-05-12 Thread Gioacchino Mazzurco
On Monday 12 May 2014 07:46:31 Steven Barth wrote:
> Hi Gioacchino,
> 
> it seems the kernel expects a big-endian value as vlan protocol, so you
> should probably try wrapping cfg->proto in htons when passing it to
> nla_put_u16.

It worked like a charm :)
Many thanks!
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel