[OpenWrt-Devel] [PATCH] [packages] curl: update to 7.35.0, fixes CVE-2014-0015

2014-02-02 Thread Russell Senior

Spotted this on my twitter feed, so i guess it is good for something.

http://curl.haxx.se/docs/adv_20140129.html

Signed-off-by: Russell Senior russ...@personaltelco.net
---
 libs/curl/Makefile  | 8 
 libs/curl/patches/100-check_long_long.patch | 2 +-
 libs/curl/patches/200-no_docs_tests.patch   | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/libs/curl/Makefile b/libs/curl/Makefile
index d435ccd..4ec9fb4 100644
--- a/libs/curl/Makefile
+++ b/libs/curl/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2013 OpenWrt.org
+# Copyright (C) 2007-2014 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=curl
-PKG_VERSION:=7.33.0
-PKG_RELEASE:=4
+PKG_VERSION:=7.35.0
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
@@ -18,7 +18,7 @@ PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
ftp://ftp.planetmirror.com/pub/curl/ \
http://www.mirrormonster.com/curl/download/ \
http://curl.mirrors.cyberservers.net/download/
-PKG_MD5SUM:=57409d6bf0bd97053b8378dbe0cadcef
+PKG_MD5SUM:=c18fbdd031adb0529ae09fce399f2d10
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
diff --git a/libs/curl/patches/100-check_long_long.patch 
b/libs/curl/patches/100-check_long_long.patch
index f9088d8..863a66a 100644
--- a/libs/curl/patches/100-check_long_long.patch
+++ b/libs/curl/patches/100-check_long_long.patch
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -2889,6 +2889,7 @@
+@@ -2898,6 +2898,7 @@ CURL_VERIFY_RUNTIMELIBS
  
  AC_CHECK_SIZEOF(size_t)
  AC_CHECK_SIZEOF(long)
diff --git a/libs/curl/patches/200-no_docs_tests.patch 
b/libs/curl/patches/200-no_docs_tests.patch
index 43fd812..2287215 100644
--- a/libs/curl/patches/200-no_docs_tests.patch
+++ b/libs/curl/patches/200-no_docs_tests.patch
@@ -11,7 +11,7 @@
  pkgconfig_DATA = libcurl.pc
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -494,7 +494,7 @@ EXTRA_DIST = CHANGES COPYING maketgz Mak
+@@ -506,7 +506,7 @@ EXTRA_DIST = CHANGES COPYING maketgz Mak
  CLEANFILES = $(VC6LIBDSP) $(VC8LIBPRJ)
  bin_SCRIPTS = curl-config
  SUBDIRS = lib src include
@@ -19,4 +19,4 @@
 +DIST_SUBDIRS = $(SUBDIRS) packages
  pkgconfigdir = $(libdir)/pkgconfig
  pkgconfig_DATA = libcurl.pc
- CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c   \
+ VSOURCES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c vtls/qssl.c  
\
-- 
1.8.1.2



-- 
Russell Senior, President
russ...@personaltelco.net
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv4] wifi: Introduce 802.11ac support

2014-02-02 Thread Matti Laakso
Looks good on my end, although I do get

Sun Feb  2 13:36:49 2014 daemon.notice netifd: radio0 (1935): command failed: 
Operation not supported (-122)
Sun Feb  2 13:36:49 2014 daemon.notice netifd: radio0 (1935): WARNING: Variable 
'basic_rate' does not exist or is not an array/object
Sun Feb  2 13:36:49 2014 daemon.notice netifd: radio1 (1951): WARNING: Variable 
'vht_capab' does not exist or is not an array/object
Sun Feb  2 13:36:49 2014 daemon.notice netifd: radio1 (1951): WARNING: Variable 
'basic_rate' does not exist or is not an array/object

in the log. Radio0 is 802.11ac-capable, radio1 802.11n. Everything works
fine, though.

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


[OpenWrt-Devel] [PATCH] lantiq: fix PCI problems on ARV4510PW

2014-02-02 Thread Matti Laakso
Some ARV4510PW units seem to have unstable PCI due to missing pull-up
resistors. This patch makes sure that the GPIO lines are driven properly.

Signed-off-by: Matti Laakso malaa...@elisanet.fi
---

Index: trunk/target/linux/lantiq/dts/ARV4510PW.dts
===
--- trunk/target/linux/lantiq/dts/ARV4510PW.dts (revision 39356)
+++ trunk/target/linux/lantiq/dts/ARV4510PW.dts (working copy)
@@ -56,11 +56,13 @@
ebu {
lantiq,groups = ebu a23;
lantiq,function = ebu;
+   lantiq,open-drain = 0;
lantiq,output = 1;
};
stp {
lantiq,groups = stp;
lantiq,function = stp;
+   lantiq,open-drain = 0;
lantiq,output = 1;
};
exin {
@@ -76,11 +78,13 @@
pci_out {
lantiq,groups = gnt1, gnt2;
lantiq,function = pci;
+   lantiq,open-drain = 0;
+   lantiq,pull = 0;
lantiq,output = 1;
};
pci_rst {
lantiq,pins = io21;
-   lantiq,open-drain;
+   lantiq,open-drain = 0;
lantiq,output = 1;
};
buttons {
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] WNR2000v3 Magic Numbers

2014-02-02 Thread Aaron Z
On Saturday, February 1, 2014 11:13:25 PM Find Herzfeld 
f...@seattlemesh.net wrote:
 Did you flash it with the Web GUI? I've managed it fine with a serial
 cable booting into tftp mode or whatever it's called, but the
 default netgear Web interface rejects it.
Thinking on how I did it, what version of the stock firmware is on these 
devices that you are working with?
I used the web GUI. As I recall, I tried installing OpenWrt on whatever stock 
firmware was on there, but none of the files would work, all where rejected.
I updated the stock firmware to the latest version (from the Netgear site), 
then tried openwrt-ar71xx-generic-wnr2000v3-squashfs-factory-NA.img but it 
was rejected. I then tried 
openwrt-ar71xx-generic-wnr2000v3-squashfs-factory.img which worked.

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


Re: [OpenWrt-Devel] [PATCHv4] wifi: Introduce 802.11ac support

2014-02-02 Thread Felix Fietkau
On 2014-01-31 17:58, Sven Eckelmann wrote:
 From: Matti Laakso malaa...@elisanet.fi
 
 This patch introduces 802.11ac support to base-files, mac80211 and hostapd. 
 The
 split of VHT160 in two 80 MHz bands is not yet supported, since it requires an
 additional user supplied parameter for the channel of the second band.
 
 Signed-off-by: Matti Laakso malaa...@elisanet.fi
 Signed-off-by: Simon Wunderlich si...@open-mesh.com
 [s...@open-mesh.com: Rebased patch, merged htmode and vhtmode,
 removed special hwmode, fixed hostapd integration]
 Signed-off-by: Sven Eckelmann s...@open-mesh.com
 ---
 v4: Use autoconfig for HT40-/+ when VHT is activated as reported by Matti 
 Laakso
 
  .../mac80211/files/lib/netifd/wireless/mac80211.sh | 67 
 +-
  package/kernel/mac80211/files/lib/wifi/mac80211.sh | 41 -
  .../services/hostapd/files/hostapd-full.config |  3 +
  .../services/hostapd/files/hostapd-mini.config |  3 +
  4 files changed, 112 insertions(+), 2 deletions(-)
 
 diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh 
 b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
 index 1896fe0..bb5298d 100644
 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
 +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
 @@ -23,6 +23,7 @@ drv_mac80211_init_device_config() {
   config_add_int rxantenna txantenna antenna_gain txpower
   config_add_boolean noscan
   config_add_array ht_capab
 + config_add_array vht_capab
  }
  
  drv_mac80211_init_iface_config() {
 @@ -55,12 +56,76 @@ mac80211_hostapd_setup_base() {
   append base_cfg ieee80211n=1 $N
  
   ht_capab=
 - [ -n $htmode ]  ht_capab=[$htmode]
 + case $htmode in
 + HT20|HT40-|HT40+) ht_capab=[$htmode];;
 + VHT40|VHT80|VHT160)
 + case $channel in
 + 
 36|44|52|60|100|108|116|124|132|140|149|157) ht_capab=[HT40+];;
 + 
 40|48|56|64|104|112|120|128|136|144|153|161) ht_capab=[HT40-];;
 + esac
 + ;;
 + 
 + esac
   for cap in $ht_capab_list; do
   ht_capab=$ht_capab[$cap]
   done
  
   [ -n $ht_capab ]  append base_cfg ht_capab=$ht_capab $N
 +
 + # 802.11ac
 + enable_ac=0
 + json_get_values vht_capab_list vht_capab
 + idx=$channel
 + case $htmode in
 + VHT40)
 + case $channel in
 + 36|40) idx=38;;
 + 44|48) idx=42;;
 + 52|56) idx=54;;
 + 60|64) idx=58;;
 + 100|104) idx=102;;
 + 108|112) idx=110;;
 + 116|120) idx=118;;
 + 124|128) idx=126;;
 + 132|136) idx=134;;
 + 140|144) idx=142;;
 + 149|153) idx=151;;
 + 157|161) idx=159;;
 + esac
 + enable_ac=1
 + append base_cfg vht_oper_chwidth=0 $N
 + append base_cfg 
 vht_oper_centr_freq_seg0_idx=$idx $N
 + ;;
 + VHT80)
 + case $channel in
 + 36|40|44|48) idx=42;;
 + 52|56|60|64) idx=58;;
 + 100|104|108|112) idx=106;;
 + 116|120|124|128) idx=122;;
 + 132|136|140|144) idx=138;;
 + 149|153|157|161) idx=155;;
 + esac
 + enable_ac=1
 + append base_cfg vht_oper_chwidth=1 $N
 + append base_cfg 
 vht_oper_centr_freq_seg0_idx=$idx $N
 + ;;
 + VHT160)
 + case $channel in
 + 36|40|44|48|52|56|60|64) idx=50;;
 + 100|104|108|112|116|120|124|128) 
 idx=114;;
 + esac
 + enable_ac=1
 + append base_cfg vht_oper_chwidth=2 $N
 + append base_cfg 
 vht_oper_centr_freq_seg0_idx=$idx $N
 + ;;
 + esac
 + if [ $enable_ac != 0 ]; then
 + append base_cfg ieee80211ac=1 

Re: [OpenWrt-Devel] [PATCHv4] wifi: Introduce 802.11ac support

2014-02-02 Thread Felix Fietkau
On 2014-02-02 14:09, Felix Fietkau wrote:
 On 2014-01-31 17:58, Sven Eckelmann wrote:
 From: Matti Laakso malaa...@elisanet.fi
 
 This patch introduces 802.11ac support to base-files, mac80211 and hostapd. 
 The
 split of VHT160 in two 80 MHz bands is not yet supported, since it requires 
 an
 additional user supplied parameter for the channel of the second band.
 
 Signed-off-by: Matti Laakso malaa...@elisanet.fi
 Signed-off-by: Simon Wunderlich si...@open-mesh.com
 [s...@open-mesh.com: Rebased patch, merged htmode and vhtmode,
 removed special hwmode, fixed hostapd integration]
 Signed-off-by: Sven Eckelmann s...@open-mesh.com
 ---
 v4: Use autoconfig for HT40-/+ when VHT is activated as reported by Matti 
 Laakso
 
  .../mac80211/files/lib/netifd/wireless/mac80211.sh | 67 
 +-
  package/kernel/mac80211/files/lib/wifi/mac80211.sh | 41 -
  .../services/hostapd/files/hostapd-full.config |  3 +
  .../services/hostapd/files/hostapd-mini.config |  3 +
  4 files changed, 112 insertions(+), 2 deletions(-)
 
 diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh 
 b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
 index 1896fe0..bb5298d 100644
 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
 +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
 @@ -23,6 +23,7 @@ drv_mac80211_init_device_config() {
  config_add_int rxantenna txantenna antenna_gain txpower
  config_add_boolean noscan
  config_add_array ht_capab
 +config_add_array vht_capab
  }
  
  drv_mac80211_init_iface_config() {
 @@ -55,12 +56,76 @@ mac80211_hostapd_setup_base() {
  append base_cfg ieee80211n=1 $N
  
  ht_capab=
 -[ -n $htmode ]  ht_capab=[$htmode]
 +case $htmode in
 +HT20|HT40-|HT40+) ht_capab=[$htmode];;
 +VHT40|VHT80|VHT160)
 +case $channel in
 +
 36|44|52|60|100|108|116|124|132|140|149|157) ht_capab=[HT40+];;
 +
 40|48|56|64|104|112|120|128|136|144|153|161) ht_capab=[HT40-];;
 +esac
 +;;
 +
 +esac
  for cap in $ht_capab_list; do
  ht_capab=$ht_capab[$cap]
  done
  
  [ -n $ht_capab ]  append base_cfg ht_capab=$ht_capab $N
 +
 +# 802.11ac
 +enable_ac=0
 +json_get_values vht_capab_list vht_capab
 +idx=$channel
 +case $htmode in
 +VHT40)
 +case $channel in
 +36|40) idx=38;;
 +44|48) idx=42;;
 +52|56) idx=54;;
 +60|64) idx=58;;
 +100|104) idx=102;;
 +108|112) idx=110;;
 +116|120) idx=118;;
 +124|128) idx=126;;
 +132|136) idx=134;;
 +140|144) idx=142;;
 +149|153) idx=151;;
 +157|161) idx=159;;
 +esac
 +enable_ac=1
 +append base_cfg vht_oper_chwidth=0 $N
 +append base_cfg 
 vht_oper_centr_freq_seg0_idx=$idx $N
 +;;
 +VHT80)
 +case $channel in
 +36|40|44|48) idx=42;;
 +52|56|60|64) idx=58;;
 +100|104|108|112) idx=106;;
 +116|120|124|128) idx=122;;
 +132|136|140|144) idx=138;;
 +149|153|157|161) idx=155;;
 +esac
 +enable_ac=1
 +append base_cfg vht_oper_chwidth=1 $N
 +append base_cfg 
 vht_oper_centr_freq_seg0_idx=$idx $N
 +;;
 +VHT160)
 +case $channel in
 +36|40|44|48|52|56|60|64) idx=50;;
 +100|104|108|112|116|120|124|128) 
 idx=114;;
 +esac
 +enable_ac=1
 +append base_cfg vht_oper_chwidth=2 $N
 +append base_cfg 
 vht_oper_centr_freq_seg0_idx=$idx $N
 +;;
 +esac
 +if [ $enable_ac != 0 ]; then
 +append base_cfg ieee80211ac=1 $N
 +

[OpenWrt-Devel] [PATCH] lantiq: fix mtd_split for brnboot firmware images

2014-02-02 Thread Daniel
The existing code only tries to split a parition with name rootfs
while actually looking for kernel+rootfs, where usually firmware is
used as a partition name. This doesn't make sense, as even if there
was a partition 'rootfs' given by mtdparts or via device-tree, this
code would lead to another partition called 'rootfs' being created
which would not be properly distinguished in the current user-space
code.

While potentially we could use CONFIG_MTD_SPLIT_FIRMWARE_NAME to make
that configurable, the lack of users of brnboot and the fact that we
can freely decide the partition name made me simply change the
hard-coded string constant from rootfs to firmware.

(I'm going to add support for ARV7506PW which run brnboot and needs
this change)

---
 target/linux/lantiq/patches-3.10/0100-mtd-split.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/lantiq/patches-3.10/0100-mtd-split.patch 
b/target/linux/lantiq/patches-3.10/0100-mtd-split.patch
index 1911b44..c2ce9c1 100644
--- a/target/linux/lantiq/patches-3.10/0100-mtd-split.patch
+++ b/target/linux/lantiq/patches-3.10/0100-mtd-split.patch
@@ -34,7 +34,7 @@
 +  size_t len;
 +  int ret;
 +
-+  if (strcmp(name, rootfs) != 0)
++  if (strcmp(name, firmware) != 0)
 +  return;
 +  while (part_size  end) {
 +  long size_min = part_size - 0x400 - 12 - offset;
-- 
1.8.5.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [REGRESSION] netifd: IPv6 RA on-link route disappearing

2014-02-02 Thread Steven Barth
Hello Gui,

thanks for your report. I just updated odhcp6c to generate the routes
and addresses in netifd in a better way. The old method seemed to have
some races that could lead to the behaviour you have seen. Could you
please retest with the new odhcp6c and see if that works better for you?


Cheers,

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


[OpenWrt-Devel] [PATCH] bcm63xx: decrease bcm6348 SPI FIFO size

2014-02-02 Thread dani
Decrease the SPI FIFO size in BMC6348 boards to avoid random reads/writes.

The parameter BCM63XX_SPI_MAX_PREPEND is causing the SPI driver exceeds the 
hardware capabilities when reading transfer lengths over 58 bytes. Decreasing 
the SPI fifo size exactly  the BCM63XX_SPI_MAX_PREPEND lenght solves the 
problem.

I noticed it when I connected an external SPI flash memory to my old livebox1, 
the flash memory was correctly recognized as another mtd device with its 
partition, and everything seemed to be going well. When using dd, with block 
sizes =58 all reads went fine, but over 58 all the reads were totally random. 
I know the SPI driver is far from being perfect, but I think It's a good idea 
to fix this if someone decides to use the BCM6348 SPI interface in his board.

With this patch the random reads never happens, when you exceed the limit it 
returns the error
unable to do transfers larger than FIFO size (%i  %i)
As done before the patch. It seems the driver still needs further work.


Signed-off-by: Daniel Gonzalez dgcb...@gmail.com

Index: 
target/linux/brcm63xx/patches-3.10/351-bcm6348-decrease_fifo_size_to_fix_random_reads.patch
===
--- 
target/linux/brcm63xx/patches-3.10/351-bcm6348-decrease_fifo_size_to_fix_random_reads.patch
 (revision 0)
+++ 
target/linux/brcm63xx/patches-3.10/351-bcm6348-decrease_fifo_size_to_fix_random_reads.patch
 (working copy)
@@ -0,0 +1,20 @@
+--- a/arch/mips/bcm63xx/dev-spi.c
 b/arch/mips/bcm63xx/dev-spi.c
+@@ -18,6 +18,8 @@
+ #include bcm63xx_dev_spi.h
+ #include bcm63xx_regs.h
+ 
++#define BCM63XX_SPI_MAX_PREPEND   15
++
+ /*
+  * register offsets
+  */
+@@ -79,7 +81,7 @@
+ 
+   if (BCMCPU_IS_6338() || BCMCPU_IS_6348()) {
+   spi_resources[0].end += BCM_6348_RSET_SPI_SIZE - 1;
+-  spi_pdata.fifo_size = SPI_6348_MSG_DATA_SIZE;
++  spi_pdata.fifo_size = SPI_6348_MSG_DATA_SIZE - 
BCM63XX_SPI_MAX_PREPEND;
+   spi_pdata.msg_type_shift = SPI_6348_MSG_TYPE_SHIFT;
+   spi_pdata.msg_ctl_width = SPI_6348_MSG_CTL_WIDTH;
+   }
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC/RFT] netifd: Initial OpenVSwitch support

2014-02-02 Thread Roberto Riggio
Hi,

I'm testing your patch with this configuration in /etc/config/network

config device
option name 'ovs'
option type 'ovs'
list ifname 'eth0'

config interface
option ifname 'ovs'
option proto 'dhcp'

However at boot the router enters in an infinite loop:

IPV6: addrconf eth0 link becomes ready
8021q adding vlan 0 to hw filter on device eth0
IPV6: addrconf eth0 link is not ready

R.

On 29/11/13 16:24, Helmut Schaa wrote:
 Add a new device type ovs to define openvswitch (pseudo-) bridges.
 For setting up oppenvswitch bridges the ovs-vsctl utility is used
 within system-ovs.* and might be replaced with plain JSON-RPC in the
 future.
 
 Signed-off-by: Helmut Schaa helmut.sc...@googlemail.com
 ---
 
 This is a first RFC of openvswitch integration in netifd based on
 netifd trunk. In parts its quite similar to the bridge code but due
 to pseudo bridge support there's not much code to share.
 
 I'd appreciate any testing beside my own :D
 
 I don't really like calling the ovs-vsctl utility (see system-ovs.c)
 but using JSON-RPC would add much more code  complexity and there is
 no easy-to-use library yet that we could utilize. In the long term
 all these forks should be replaced by proper IPC but for now it seems
 good enough.
 
 As next step I'd add another device-type ovs-port or similar to allow
 definition of internal ovs ports and more complex port configurations
 (for example adding eth0 as trunk port for vlan 1,2 and 3).
 
 Thoughts?
 
 Thanks,
 Helmut
 
  CMakeLists.txt |   2 +-
  config.c   |   2 +
  config/network |  15 ++
  device.h   |   1 +
  ovs.c  | 664 
 +
  system-linux.c |   6 +-
  system-ovs.c   | 115 ++
  system-ovs.h   |  31 +++
  system.h   |   2 +
  9 files changed, 836 insertions(+), 2 deletions(-)
  create mode 100644 ovs.c
  create mode 100644 system-ovs.c
  create mode 100644 system-ovs.h
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
 index 65da3cf..e4190a0 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 wireless.c ovs.c system-ovs.c)
  
  
  find_library(json NAMES json-c json)
 diff --git a/config.c b/config.c
 index bb0cd05..132817d 100644
 --- a/config.c
 +++ b/config.c
 @@ -169,6 +169,8 @@ config_init_devices(void)
   devtype = tunnel_device_type;
   else if (!strcmp(type, macvlan))
   devtype = macvlan_device_type;
 + else if (!strcmp(type, ovs))
 + devtype = ovs_device_type;
   }
  
   if (!devtype)
 diff --git a/config/network b/config/network
 index b2985d3..aee4851 100644
 --- a/config/network
 +++ b/config/network
 @@ -72,3 +72,18 @@ config route
   option gateway  192.168.5.2
   option interface wan
  
 +# Basic OpenVSwitch
 +config device
 +option type  ovs
 +option name  br-ovs
 +option ifnameeth0
 +option ovs_empty 1
 +
 +# Pseudo bridge on top of br-ovs (vlan 1000)
 +config device
 +option type ovs
 +option name br-ovs1000
 +option ovs_tag 1000
 +option ovs_base br-ovs
 +option ifname eth1
 +
 diff --git a/device.h b/device.h
 index dbcaf77..24299a1 100644
 --- a/device.h
 +++ b/device.h
 @@ -153,6 +153,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 ovs_device_type;
  
  void device_lock(void);
  void device_unlock(void);
 diff --git a/ovs.c b/ovs.c
 new file mode 100644
 index 000..29db26c
 --- /dev/null
 +++ b/ovs.c
 @@ -0,0 +1,664 @@
 +/*
 + * netifd - network interface daemon
 + * Copyright (C) 2013 Helmut Schaa helmut.sc...@googlemail.com
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License version 2
 + * as published by the Free Software Foundation
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + */
 +#include string.h
 +#include stdlib.h
 +#include stdio.h
 +#include assert.h
 +#include errno.h
 +
 +#include netifd.h
 +#include device.h
 +#include interface.h
 +#include system-ovs.h
 +
 +enum {
 + OVS_ATTR_IFNAME,
 + OVS_ATTR_BASE,
 + OVS_ATTR_TAG,
 + OVS_ATTR_EMPTY,
 + __OVS_ATTR_MAX
 +};
 +
 +static const struct blobmsg_policy 

[OpenWrt-Devel] [PATCH v2 4/5] mvebu: add support for the Armada XP GP board (DB-MV784MP-GP)

2014-02-02 Thread Seif Mazareeb
This Armada XP GP board from Marvell comes with:

* 2GB DDR3 DIMM
* 1GB NAND flash (8-bit interface)
* 16MB NOR flash (16-bot interrface)
* 16MB SPI flash
* SDIO module
* 3 PCIe
* 1 SATA link
* 2 USB EHCI
* 1 internal SSD
* 4 Ethernet Gigabit
* 1 RS232 port over USB

Signed-off-by: Seif Mazareeb seif.mazar...@gmail.com
---
 target/linux/mvebu/base-files/lib/mvebu.sh |3 +++
 target/linux/mvebu/image/Makefile  |2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/target/linux/mvebu/base-files/lib/mvebu.sh 
b/target/linux/mvebu/base-files/lib/mvebu.sh
index 727b6b5..5bc35ef 100644
--- a/target/linux/mvebu/base-files/lib/mvebu.sh
+++ b/target/linux/mvebu/base-files/lib/mvebu.sh
@@ -28,6 +28,9 @@ mvebu_board_detect() {
*PlatHome OpenBlocks AX3-4 board)
name=openblocks-ax3-4
;;
+   *Marvell Armada XP GP Board)
+   name=armada-xp-gp
+   ;;
esac
 
[ -z $name ]  name=unknown
diff --git a/target/linux/mvebu/image/Makefile 
b/target/linux/mvebu/image/Makefile
index 1e4a791..e89530a 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 TARGET_DTBS := armada-xp-db armada-370-db armada-xp-openblocks-ax3-4 
armada-370-mirabox \
-   armada-370-rd
+   armada-370-rd armada-xp-gp
 
 LOADADDR:=0x8000
 
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 5/5] mvebu: update kernel config

2014-02-02 Thread Seif Mazareeb
Enabling the NAND controller on the mvebu target.

Signed-off-by: Seif Mazareeb seif.mazar...@gmail.com
---
 target/linux/mvebu/config-3.10 |4 
 1 file changed, 4 insertions(+)

diff --git a/target/linux/mvebu/config-3.10 b/target/linux/mvebu/config-3.10
index a8cc779..38acc17 100644
--- a/target/linux/mvebu/config-3.10
+++ b/target/linux/mvebu/config-3.10
@@ -168,8 +168,12 @@ CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MSDOS_FS=y
 CONFIG_MTD_CFI_STAA=y
 CONFIG_MTD_M25P80=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_NAND_PXA3xx=y
 CONFIG_MTD_OF_PARTS=y
 CONFIG_MTD_PHYSMAP_OF=y
+# CONFIG_MTD_SM_COMMON is not set
 CONFIG_MULTI_IRQ_HANDLER=y
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_MVEBU_CLK_CORE=y
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel