Re: [OpenWrt-Devel] [PATCH 2/2] netifd: Don't call set_state for external device in device_claim

2015-09-02 Thread Felix Fietkau
On 2015-09-01 15:53, Hans Dedecker wrote:
> 
> 
> On Tue, Sep 1, 2015 at 2:49 PM, Felix Fietkau  > wrote:
> 
> On 2015-09-01 14:43, Hans Dedecker wrote:
> > The function set_state disable is not called for external devices
> in device_release
> > which means for external vlan/macvlan devices they won't be deleted.
> > As a result of this the set_state enable call for external devices
> by device_claim fails
> > as vlan/macvlan devices cannot be created since the device already
> exists in the kernel.
> > Therefore move the external device check from device_set_state to
> device_claim so
> > external vlan/macvlan devices are not created again and can also
> be external.
> Why/how do vlan/macvlan devices become external?
> 
> This use case is driven by an external application which is adding a
> vlan device to the bridge.
> Initially the vlan device is created as an internal device but not added
> to the bridge; later added by an external application via ubus to the
> bridge. In this scenario we hit the issue when doing network reload the
> vlan device is not anymore an active member of the bridge as vlan
> set_state enable was called which failed.
> This is a bit similar to a wireless device which has uci device config;
> initially it's considered as an internal device by netifd when loading
> the config but becomes an external device when the wireless logic adds
> it to the bridge.
The main point of dev->external is to declare that a device is fully
managed externally, and netifd is not supposed to bring it up or down.
Maybe a better fix would be to allow devices to be added dynamically
without forcing dev->external on them (or just prevent that flag from
being added for vlan devices).

- 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] linux: add support of Synopsys ARC boards

2015-09-02 Thread Jonas Gorski
On Thu, Aug 27, 2015 at 1:03 PM, Alexey Brodkin
 wrote:
> This patch introduces support of new boards with ARC cores.
>
>  [1] Synopsys SDP board
>  This is a new-generation development board from Synopsys that
>  consists of base-board and CPU tile-board (which might have a real
>  ASIC or FPGA with CPU image).
>  It sports a lot of DesignWare peripherals like GMAC, USB, SPI, I2C
>  etc and is intended to be used for early development of ARC-based
>  products.
>
>  [2] nSIM
>  This is a virtual board implemented in Synopsys proprietary
>  software simulator (even though available for free for open source
>  community). This board has only serial port as a peripheral and so
>  it is meant to be used for runtime testing which is especially
>  useful during bring-up of new tools and platforms.
>  What's also important ARC cores are very configurable so there're
>  many variations of options like cache sizes, their line lengths,
>  additional hardware blocks like multipliers, dividers etc. And this
>  board could be used to make sure built software still runs on
>  different HW configurations.
>
> Note there's a prerequisite http://patchwork.ozlabs.org/patch/502081/
>
> Cc: Felix Fietkau 
> Cc: Jo-Philipp Wich 
> Signed-off-by: Alexey Brodkin 
> ---
>  include/kernel.mk  |   2 +
>  target/Config.in   |   9 +
>  target/linux/arc/Makefile  |  28 +
>  target/linux/arc/axs10x/README |  19 +
>  .../linux/arc/axs10x/base-files/etc/config/network |  18 +
>  target/linux/arc/axs10x/base-files/etc/inittab |   5 +
>  target/linux/arc/axs10x/config-4.1 | 127 +++
>  target/linux/arc/axs10x/target.mk  |   8 +
>  target/linux/arc/image/Makefile|  12 +
>  target/linux/arc/nsim/README   |  19 +
>  target/linux/arc/nsim/base-files/etc/inittab   |   5 +
>  target/linux/arc/nsim/config-4.1   |  88 ++
>  target/linux/arc/nsim/target.mk|   9 +
>  ...Add-support-for-AXS101-SDP-software-devel.patch | 911 
> +
>  ...Tweak-DDR-port-aperture-mappings-for-perf.patch |  65 ++
>  ...ARC-axs101-Add-missing-__init-annotations.patch |  71 ++
>  .../0004-ARC-RIP-broken-64bit-RTSC.patch   | 186 +
>  ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch |  36 +
>  .../0006-ARC-axs101-support-early-8250-uart.patch  |  67 ++
>  19 files changed, 1685 insertions(+)
>  create mode 100644 target/linux/arc/Makefile
>  create mode 100644 target/linux/arc/axs10x/README
>  create mode 100644 target/linux/arc/axs10x/base-files/etc/config/network
>  create mode 100644 target/linux/arc/axs10x/base-files/etc/inittab
>  create mode 100644 target/linux/arc/axs10x/config-4.1
>  create mode 100644 target/linux/arc/axs10x/target.mk
>  create mode 100644 target/linux/arc/image/Makefile
>  create mode 100644 target/linux/arc/nsim/README
>  create mode 100644 target/linux/arc/nsim/base-files/etc/inittab
>  create mode 100644 target/linux/arc/nsim/config-4.1
>  create mode 100644 target/linux/arc/nsim/target.mk
>  create mode 100644 
> target/linux/arc/patches-4.1/0001-ARC-axs101-Add-support-for-AXS101-SDP-software-devel.patch
>  create mode 100644 
> target/linux/arc/patches-4.1/0002-ARC-axs101-Tweak-DDR-port-aperture-mappings-for-perf.patch
>  create mode 100644 
> target/linux/arc/patches-4.1/0003-ARC-axs101-Add-missing-__init-annotations.patch
>  create mode 100644 
> target/linux/arc/patches-4.1/0004-ARC-RIP-broken-64bit-RTSC.patch
>  create mode 100644 
> target/linux/arc/patches-4.1/0005-openwrt-arc-remove-dependency-on-DEVTMPFS.patch
>  create mode 100644 
> target/linux/arc/patches-4.1/0006-ARC-axs101-support-early-8250-uart.patch
>
> diff --git a/include/kernel.mk b/include/kernel.mk
> index 6a613fe..878a366 100644
> --- a/include/kernel.mk
> +++ b/include/kernel.mk
> @@ -64,6 +64,8 @@ ifneq (,$(findstring uml,$(BOARD)))
>LINUX_KARCH=um
>  else ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be ))
>LINUX_KARCH := arm64
> +else ifneq (,$(findstring $(ARCH) , arceb ))
> +  LINUX_KARCH := arc
>  else ifneq (,$(findstring $(ARCH) , armeb ))
>LINUX_KARCH := arm
>  else ifneq (,$(findstring $(ARCH) , mipsel mips64 mips64el ))
> diff --git a/target/Config.in b/target/Config.in
> index baae8d6..571b06e 100644
> --- a/target/Config.in
> +++ b/target/Config.in
> @@ -100,6 +100,13 @@ config aarch64_be
> select BIG_ENDIAN
> bool
>
> +config arc
> +   bool
> +
> +config arceb
> +   select BIG_ENDIAN
> +   bool
> +
>  config arm
> bool
>
> @@ -179,6 +186,8 @@ config ARCH
> string
> default "aarch64"   if aarch64
> default "aarch64_be" if aarch64_be
> +   default "arc"   if arc
> +   

Re: [OpenWrt-Devel] [PATCH 1/3] toolchain: add support of ARC architecture

2015-09-02 Thread Jonas Gorski
Hi,

On Thu, Aug 27, 2015 at 1:03 PM, Alexey Brodkin
 wrote:
> This includes binutils, gcc, gdb and uClibc-ng.
>
> Latest release of ARC gcc (as of today it is "arc-2015.06")
> is based on upstream gcc 4.8.4.
>
> Sources are available on GitHub, see:
> https://github.com/foss-for-synopsys-dwc-arc-processors/gcc
>
> Latest release of ARC binutils (as of today it is "arc-2015.06")
> is based on upstream binutils 2.23.
>
> Sources are available on GitHub, see:
> https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06
>
> Latest release of ARC GDB (as of today this is "arc-2015.06-gdb")
> is based on upstream gdb 7.9.1.
>
> Sources are available on GitHub, see:
> https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06-gdb
>
> Note that for binutils and gdb that come from unified git repository
> (which is the case for upstream binutils/gdb today) we need to disable
> building of gdb in binutils and binutils in gdb hence in binutils:
> -->8--
> --disable-sim
> --disable-gdb
> -->8--
>
> and in gdb:
> -->8--
> --disable-binutils
> --disable-ld
> --disable-gas
> -->8--
>
> Also in gdb we disable sim because if the following breakage while
> building with it:
> >8
> /usr/bin/env bash ./../common/genmloop.sh -shell /usr/bin/env bash \
> -mono -fast -pbb -switch sem5-switch.c \
> -cpu a5f -infile ./mloop5.in \
> -outfile-suffix 5
> unknown option: bash
> Makefile:699: recipe for target 'stamp-5mloop' failed
> make[7]: *** [stamp-5mloop] Error 1
> >8
>
> Prerequisites are:
>  [1] http://patchwork.ozlabs.org/patch/510985 which adds uClibc-ng support.
>  [2] http://patchwork.ozlabs.org/patch/502022 which updates config.guess
>  and config.sub
>
> Cc: Felix Fietkau 
> Cc: John Crispin 
> Signed-off-by: Alexey Brodkin 
> ---
>  include/site/arc   |  30 +++
>  include/target.mk  |   4 +
>  toolchain/Config.in|   9 +-
>  toolchain/binutils/Config.in   |  12 +-
>  toolchain/binutils/Makefile|  27 ++-
>  toolchain/gcc/Config.in|   5 +
>  toolchain/gcc/Config.version   |   9 +-
>  toolchain/gcc/common.mk|  34 ++-
>  .../001-revert_register_mode_search.patch  |  65 ++
>  .../patches/arc-2015.06/002-weak_data_fix.patch|  42 
>  .../arc-2015.06/003-universal_initializer.patch|  94 
>  .../patches/arc-2015.06/004-case_insensitive.patch |  14 ++
>  .../patches/arc-2015.06/010-documentation.patch|  23 ++
>  .../patches/arc-2015.06/020-no-plt-backport.patch  |  28 +++
>  .../gcc/patches/arc-2015.06/100-uclibc-conf.patch  |  33 +++
>  .../210-disable_libsanitizer_off_t_check.patch |  11 +
>  .../arc-2015.06/800-arc-disablelibgmon.patch   |  18 ++
>  .../gcc/patches/arc-2015.06/820-libgcc_pic.patch   |  36 +++
>  .../arc-2015.06/850-use_shared_libgcc.patch|  47 
>  .../patches/arc-2015.06/851-libgcc_no_compat.patch |  12 +
>  .../gcc/patches/arc-2015.06/860-use_eh_frame.patch |  42 
>  .../patches/arc-2015.06/870-ppc_no_crtsavres.patch |  11 +
>  .../patches/arc-2015.06/880-no_java_section.patch  |  11 +
>  .../gcc/patches/arc-2015.06/910-mbsd_multi.patch   | 253 
> +
>  .../arc-2015.06/920-specs_nonfatal_getenv.patch|  14 ++
>  .../arc-2015.06/940-no-clobber-stamp-bits.patch|  11 +
>  toolchain/gdb/Makefile |  19 +-
>  toolchain/uClibc/Config.in |   2 +
>  toolchain/uClibc/Config.version|   3 +-
>  toolchain/uClibc/common.mk |   1 +
>  toolchain/uClibc/config-ng-1.0.6/arc   |  12 +
>  31 files changed, 904 insertions(+), 28 deletions(-)
>  create mode 100644 include/site/arc
>  create mode 100644 
> toolchain/gcc/patches/arc-2015.06/001-revert_register_mode_search.patch
>  create mode 100644 toolchain/gcc/patches/arc-2015.06/002-weak_data_fix.patch
>  create mode 100644 
> toolchain/gcc/patches/arc-2015.06/003-universal_initializer.patch
>  create mode 100644 
> toolchain/gcc/patches/arc-2015.06/004-case_insensitive.patch
>  create mode 100644 toolchain/gcc/patches/arc-2015.06/010-documentation.patch
>  create mode 100644 
> toolchain/gcc/patches/arc-2015.06/020-no-plt-backport.patch
>  create mode 100644 toolchain/gcc/patches/arc-2015.06/100-uclibc-conf.patch
>  create mode 100644 
> toolchain/gcc/patches/arc-2015.06/210-disable_libsanitizer_off_t_check.patch
>  create mode 100644 
> toolchain/gcc/patches/arc-2015.06/800-arc-disablelibgmon.patch
>  create mode 100644 toolchain/gcc/patches/arc-2015.06/820-libgcc_pic.patch
>  create mode 100644 
> 

Re: [OpenWrt-Devel] [PATCH] kernel: bridge, multicast-to-unicast: fix echoes on STA

2015-09-02 Thread Steven Barth

Am 02.09.2015 um 05:17 schrieb Linus Lüssing:
> Currently, multicast packets from an STA are sent to any according
> multicast listener directly through the bridge multicast-to-unicast
> feature. Unfortunately, so far this includes the originating STA, too,
> resulting in multicast packets being echo'ed back to the originating STA
> if it itself is a multicast listener for that group.
Thanks Linus,

I can confirm the patch fixes the issue.
Unless Felix has any objections I will push it in the coming days.


Cheers,

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


Re: [OpenWrt-Devel] [PATCH 1/2] netifd : Apply device settings when existing device becomes external

2015-09-02 Thread Felix Fietkau
On 2015-09-01 14:43, Hans Dedecker wrote:
> Make sure device settings are applied when existing device becomes external
> 
> Signed-off-by: Hans Dedecker 
Next time, please use a subject like:
[PATCH netifd 1/2] device: apply device settings when existing device becomes 
external
Since the patch is applied to netifd git, it does not make sense to
have commit messages start with "netifd: "
I'm fixing this up locally before pushing the change.

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


Re: [OpenWrt-Devel] [PATCH] generic: Fix per interface nf_call_iptables setting

2015-09-02 Thread Sven Eckelmann
On Wednesday 02 September 2015 19:47:43 Sven Eckelmann wrote:
[...]
> | kernel  | br-nf-* global | nf-call* iface | download | upload   |
> |-|||--|--|
> | default | 0  | -  |  209 |  268 |
> | brfilter-global | 0  | -  |  185 |  243 |
> | brfilter-local  | 0  | -  |  187 |  243 |
> | brfilter-local  | 0  | br-lan |  157 |  226 |
> | brfilter-local  | 0  | br-lan br-wlan |  139 |  161 |
> | brfilter-global | 1  | -  |  136 |  162 |
>
> Download/upload results in Mibit/s

Here is also a diagram for people which don't like tables with numbers.

Kind regards,
Sven

signature.asc
Description: This is a digitally signed message part.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] netifd: Don't call set_state for external device in device_claim

2015-09-02 Thread Felix Fietkau
On 2015-09-02 13:27, Hans Dedecker wrote:
> 
> 
> On Wed, Sep 2, 2015 at 10:31 AM, Felix Fietkau  > wrote:
> 
> On 2015-09-01 15:53, Hans Dedecker wrote:
> >
> >
> > On Tue, Sep 1, 2015 at 2:49 PM, Felix Fietkau  
> > >> wrote:
> >
> > On 2015-09-01 14:43, Hans Dedecker wrote:
> > > The function set_state disable is not called for external
> devices
> > in device_release
> > > which means for external vlan/macvlan devices they won't be
> deleted.
> > > As a result of this the set_state enable call for external
> devices
> > by device_claim fails
> > > as vlan/macvlan devices cannot be created since the device
> already
> > exists in the kernel.
> > > Therefore move the external device check from
> device_set_state to
> > device_claim so
> > > external vlan/macvlan devices are not created again and can also
> > be external.
> > Why/how do vlan/macvlan devices become external?
> >
> > This use case is driven by an external application which is adding a
> > vlan device to the bridge.
> > Initially the vlan device is created as an internal device but not
> added
> > to the bridge; later added by an external application via ubus to the
> > bridge. In this scenario we hit the issue when doing network
> reload the
> > vlan device is not anymore an active member of the bridge as vlan
> > set_state enable was called which failed.
> > This is a bit similar to a wireless device which has uci device
> config;
> > initially it's considered as an internal device by netifd when loading
> > the config but becomes an external device when the wireless logic adds
> > it to the bridge.
> The main point of dev->external is to declare that a device is fully
> managed externally, and netifd is not supposed to bring it up or down.
> Maybe a better fix would be to allow devices to be added dynamically
> without forcing dev->external on them (or just prevent that flag from
> being added for vlan devices).
> 
> Devices can be added dynamically without being forced external via the
> function interface_handle_link; so that is covered. 
> Regarding the external flag being set for vlan devices; would it be
> acceptable the external flag can only be set  for simple devices in
> device_get ? This is the only place where non simple devices can be set
> external.
> My intention with this patch was also to line up the external flag check
> when the state is altered; in device_release the external flag is
> checked although the same check is done in set_device_state (which would
> eventually be called by the set_state callback function). So I thought
> to add the same external flag check in device_claim to line up both
> functions.
Okay, seems I didn't look at the context closely enough. I think this
patch makes sense after all, and I will apply it.

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


Re: [OpenWrt-Devel] Ubus request through AJAX issue

2015-09-02 Thread Lazar Demin
Ah i didn't realize that the AJAX call adds a "ubus_rpc_session":"" to the ubus call!
I changed how my arguments are handled and now everything works.

Thanks for the pointer!

On Wed, Sep 2, 2015 at 6:00 AM, Jo-Philipp Wich  wrote:

> Hi,
>
> the number 2 corresponds to "UBUS_STATUS_INVALID_ARGUMENT" so your AJAX
> call is submitting invalid data.
>
> ~ 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] [PATCH] generic: Fix per interface nf_call_iptables setting

2015-09-02 Thread Sven Eckelmann
commit r30917 ("kernel: bypass all netfilter hooks if the sysctls for that
functionality have been disabled - eliminates the overhead of enabling
CONFIG_BRIDGE_NETFILTER in the kernel config") introduced an optimization
which should reduce/eliminate the overhead for traffic send over bridges on
kernels compiled with CONFIG_BRIDGE_NETFILTER=y. But this optimization
breaks the nf_call_iptables per bridge setting which is more fine grained
than the global sysctl net.bridge.bridge-nf-call-iptables setting.

A test reflecting a real world setup was created to identify if this really
eliminates the overhead and if per-bridge nf_call_iptables could be used in
some setups to increase the throughput. A Qualcomm Atheros QCA9558 based
system with one ethernet and an ath9k wifi 3x3 in HT40 mode was used.
Cables from the AP to the wifi station were used to reduce interference
problems during the tests.

The wlan interface was put in one bridge interface called br-wlan. This
bridge usually contains some more wlan interfaces. The eth0 was put in a
second bridge called br-lan. This usually contains some other privileged
wlan or mesh interfaces. Routing was added between br-lan and br-wlan.

Three kernels were tested:

 * (default) OpenWrt kernel for this device
 * (brfilter-global) OpenWrt kernel with CONFIG_BRIDGE_NETFILTER=y
 * (brfilter-local)  OpenWrt kernel with CONFIG_BRIDGE_NETFILTER=y and
without 644-bridge_optimize_netfilter_hooks.patch

The changes to the the netfilter settings of the bridge were done via:

 * (brfilter-global) /sbin/sysctl -w net.bridge.bridge-nf-call-iptables=1
 * (brfilter-lobal) echo 1 > /sys/class/net/br-lan/bridge/nf_call_iptables
   and/or echo 1 > /sys/class/net/br-wan/bridge/nf_call_iptables

A station connected to the wlan0 (AP) interface was used to send traffic to
a PC connected via ethernet. iperf with 3 concurrent transmissions was used
to generate the traffic.

| kernel  | br-nf-* global | nf-call* iface | download | upload   |
|-|||--|--|
| default | 0  | -  |  209 |  268 |
| brfilter-global | 0  | -  |  185 |  243 |
| brfilter-local  | 0  | -  |  187 |  243 |
| brfilter-local  | 0  | br-lan |  157 |  226 |
| brfilter-local  | 0  | br-lan br-wlan |  139 |  161 |
| brfilter-global | 1  | -  |  136 |  162 |

Download/upload results in Mibit/s

It can be seen that the patch doesn't eliminate the overhead. It can also
be seen that the throughput of brfilter-global and brfilter-local with
disabled filtering is the roughly the same. Also the throughput for
brfilter-global and brfilter-local for enabled filtering on all bridges is
roughly the same.

But also the brfilter-local throughput is higher when only br-lan requires
the filtering. This setting would not be possible with
644-bridge_optimize_netfilter_hooks.patch applied and thus can only be
compared with brfilter-global and filtering enabled for all interfacese

Signed-off-by: Sven Eckelmann 
---
 .../644-bridge_optimize_netfilter_hooks.patch  | 172 -
 .../644-bridge_optimize_netfilter_hooks.patch  | 172 -
 .../644-bridge_optimize_netfilter_hooks.patch  | 172 -
 3 files changed, 516 deletions(-)
 delete mode 100644 
target/linux/generic/patches-3.18/644-bridge_optimize_netfilter_hooks.patch
 delete mode 100644 
target/linux/generic/patches-4.0/644-bridge_optimize_netfilter_hooks.patch
 delete mode 100644 
target/linux/generic/patches-4.1/644-bridge_optimize_netfilter_hooks.patch

diff --git 
a/target/linux/generic/patches-3.18/644-bridge_optimize_netfilter_hooks.patch 
b/target/linux/generic/patches-3.18/644-bridge_optimize_netfilter_hooks.patch
deleted file mode 100644
index 4df94ca..000
--- 
a/target/linux/generic/patches-3.18/644-bridge_optimize_netfilter_hooks.patch
+++ /dev/null
@@ -1,172 +0,0 @@
 a/net/bridge/br_forward.c
-+++ b/net/bridge/br_forward.c
-@@ -53,7 +53,7 @@ EXPORT_SYMBOL_GPL(br_dev_queue_push_xmit
- 
- int br_forward_finish(struct sk_buff *skb)
- {
--  return NF_HOOK(NFPROTO_BRIDGE, NF_BR_POST_ROUTING, skb, NULL, skb->dev,
-+  return BR_HOOK(NFPROTO_BRIDGE, NF_BR_POST_ROUTING, skb, NULL, skb->dev,
-  br_dev_queue_push_xmit);
- 
- }
-@@ -77,7 +77,7 @@ static void __br_deliver(const struct ne
-   return;
-   }
- 
--  NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev,
-+  BR_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev,
-   br_forward_finish);
- }
- 
-@@ -98,7 +98,7 @@ static void __br_forward(const struct ne
-   skb->dev = to->dev;
-   skb_forward_csum(skb);
- 
--  NF_HOOK(NFPROTO_BRIDGE, NF_BR_FORWARD, skb, indev, skb->dev,
-+  BR_HOOK(NFPROTO_BRIDGE, 

Re: [OpenWrt-Devel] [PATCH] ramips: enable external amplifier for Xiaomi MiWiFi Mini

2015-09-02 Thread 郭传鈜
Hi!
   I remember that there is no external PA on Miwifi Mini so this
patch may be useless :-(  BTW There is no external PA and external LNA
support in current rt2x00 driver.

2015-09-01 0:11 GMT+08:00 D. Andrei Măceș :
> Attempt to boost the 2.4 GHz signal, currently very low.
>
> Signed-off-by: D. Andrei Măceș 
> ---
>  target/linux/ramips/dts/MIWIFI-MINI.dts | 5 +
>  1 file changed, 5 insertions(+)
>
> diff --git a/target/linux/ramips/dts/MIWIFI-MINI.dts 
> b/target/linux/ramips/dts/MIWIFI-MINI.dts
> index fa9846c..dad99c3 100644
> --- a/target/linux/ramips/dts/MIWIFI-MINI.dts
> +++ b/target/linux/ramips/dts/MIWIFI-MINI.dts
> @@ -113,6 +113,11 @@
> ralink,group = "i2c", "rgmii1";
> ralink,function = "gpio";
> };
> +
> +   pa {
> +   ralink,group = "pa";
> +   ralink,function = "pa";
> +   };
> };
> };
>
> --
> 2.1.4
> ___
> 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] ramips: enable external amplifier for Xiaomi MiWiFi Mini

2015-09-02 Thread D . Andrei Măceș
On Wed, Sep 2, 2015 at 7:49 PM 郭传鈜  wrote:

> Hi!
>I remember that there is no external PA on Miwifi Mini so this
> patch may be useless :-(


Thanks, are you completely certain about this information? I've been
testing with this change for a few days now, and the signal levels are much
better (roughly +15 in SNR). Also, someone on this ticket
 has a similar experience.
Finally, I've stumbled upon this change in @rssnsj's GitHub as well (this
commit

).

BTW There is no external PA and external LNA
> support in current rt2x00 driver.
>

I may not be reading things correctly, but I see lots of code to support PA
and LNA in rt2x00 (e.g., rt2800lib.c). Do you mean that our RT5390 is
lacking this support? Either way, wouldn't enabling it on the board (if
present) improve things regardless?


> 2015-09-01 0:11 GMT+08:00 D. Andrei Măceș :
> > Attempt to boost the 2.4 GHz signal, currently very low.
> >
> > Signed-off-by: D. Andrei Măceș 
> > ---
> >  target/linux/ramips/dts/MIWIFI-MINI.dts | 5 +
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/target/linux/ramips/dts/MIWIFI-MINI.dts
> b/target/linux/ramips/dts/MIWIFI-MINI.dts
> > index fa9846c..dad99c3 100644
> > --- a/target/linux/ramips/dts/MIWIFI-MINI.dts
> > +++ b/target/linux/ramips/dts/MIWIFI-MINI.dts
> > @@ -113,6 +113,11 @@
> > ralink,group = "i2c", "rgmii1";
> > ralink,function = "gpio";
> > };
> > +
> > +   pa {
> > +   ralink,group = "pa";
> > +   ralink,function = "pa";
> > +   };
> > };
> > };
> >
> > --
> > 2.1.4
> > ___
> > 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/2] [package] netifd: multicast flag control

2015-09-02 Thread Podolak, Nicholas
From: Nick Podolak 

This patch set allows for interfaces defined in UCI to enable and disable 
multicast support on their underlying device.  This has particular use on GRE 
tunnels which previously did NOT enable multicast by default.  Since GRE is 
commonly used to create router to router links that support multicast for use 
by routing protocols (e.g. OSPF, EIGRP, etc), or specifically for multicast 
applications, this modification seemed necessary.

This first patch adds the multicast capability to all interfaces/devices.

Signed-off-by: Nick Podolak 

Index: netifd-2015-06-08/device.c
===
--- netifd-2015-06-08.orig/device.c
+++ netifd-2015-06-08/device.c
@@ -39,6 +39,7 @@ static const struct blobmsg_policy dev_a
[DEV_ATTR_ENABLED] = { .name = "enabled", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_IPV6] = { .name = "ipv6", .type = BLOBMSG_TYPE_BOOL },
[DEV_ATTR_PROMISC] = { .name = "promisc", .type = BLOBMSG_TYPE_BOOL },
+   [DEV_ATTR_MULTICAST] = { .name = "multicast", .type = 
+BLOBMSG_TYPE_BOOL },
[DEV_ATTR_RPFILTER] = { .name = "rpfilter", .type = BLOBMSG_TYPE_STRING 
},
[DEV_ATTR_ACCEPTLOCAL] = { .name = "acceptlocal", .type = 
BLOBMSG_TYPE_BOOL },
[DEV_ATTR_IGMPVERSION] = { .name = "igmpversion", .type = 
BLOBMSG_TYPE_INT32 }, @@ -161,6 +162,7 @@ device_merge_settings(struct device 
*dev
sizeof(n->macaddr));
n->ipv6 = s->flags & DEV_OPT_IPV6 ? s->ipv6 : os->ipv6;
n->promisc = s->flags & DEV_OPT_PROMISC ? s->promisc : os->promisc;
+   n->multicast = s->flags & DEV_OPT_MULTICAST ? s->multicast : 
+os->multicast;
n->rpfilter = s->flags & DEV_OPT_RPFILTER ? s->rpfilter : os->rpfilter;
n->acceptlocal = s->flags & DEV_OPT_ACCEPTLOCAL ? s->acceptlocal : 
os->acceptlocal;
n->igmpversion = s->flags & DEV_OPT_IGMPVERSION ? s->igmpversion : 
os->igmpversion; @@ -212,6 +214,11 @@ device_init_settings(struct device *dev,
s->flags |= DEV_OPT_PROMISC;
}
 
+   if ((cur = tb[DEV_ATTR_MULTICAST])) {
+   s->multicast = blobmsg_get_bool(cur);
+   s->flags |= DEV_OPT_MULTICAST;
+   }
+
if ((cur = tb[DEV_ATTR_RPFILTER])) {
if (system_resolve_rpfilter(blobmsg_data(cur), >rpfilter))
s->flags |= DEV_OPT_RPFILTER;
@@ -851,6 +858,8 @@ device_dump_status(struct blob_buf *b, s
blobmsg_add_u8(b, "ipv6", st.ipv6);
if (st.flags & DEV_OPT_PROMISC)
blobmsg_add_u8(b, "promisc", st.promisc);
+   if (st.flags & DEV_OPT_MULTICAST)
+   blobmsg_add_u8(b, "multicast", st.multicast);
if (st.flags & DEV_OPT_RPFILTER)
blobmsg_add_u32(b, "rpfilter", st.rpfilter);
if (st.flags & DEV_OPT_ACCEPTLOCAL)
Index: netifd-2015-06-08/system-linux.c
===
--- netifd-2015-06-08.orig/system-linux.c
+++ netifd-2015-06-08/system-linux.c
@@ -1039,6 +1039,11 @@ system_if_get_settings(struct device *de
s->flags |= DEV_OPT_PROMISC;
}
 
+   if (ioctl(sock_ioctl, SIOCGIFFLAGS, ) == 0) {
+   s->multicast = ifr.ifr_flags & IFF_MULTICAST;
+   s->flags |= DEV_OPT_MULTICAST;
+   }
+
if (!system_get_rpfilter(dev, buf, sizeof(buf))) {
s->rpfilter = strtoul(buf, NULL, 0);
s->flags |= DEV_OPT_RPFILTER;
@@ -1132,6 +1137,11 @@ system_if_apply_settings(struct device *
!s->promisc ? IFF_PROMISC : 0) < 0)
s->flags &= ~DEV_OPT_PROMISC;
}
+   if (s->flags & DEV_OPT_MULTICAST & apply_mask) {
+   if (system_if_flags(dev->ifname, s->multicast ? IFF_MULTICAST : 
0,
+   !s->multicast ? IFF_MULTICAST : 0) < 0)
+   s->flags &= ~DEV_OPT_MULTICAST;
+   }
if (s->flags & DEV_OPT_RPFILTER & apply_mask) {
char buf[2];
 
Index: netifd-2015-06-08/device.h
===
--- netifd-2015-06-08.orig/device.h
+++ netifd-2015-06-08/device.h
@@ -33,6 +33,7 @@ enum {
DEV_ATTR_ENABLED,
DEV_ATTR_IPV6,
DEV_ATTR_PROMISC,
+   DEV_ATTR_MULTICAST,
DEV_ATTR_RPFILTER,
DEV_ATTR_ACCEPTLOCAL,
DEV_ATTR_IGMPVERSION,
@@ -80,6 +81,7 @@ enum {
DEV_OPT_NEIGHREACHABLETIME  = (1 << 9),
DEV_OPT_RPS = (1 << 10),
DEV_OPT_XPS = (1 << 11),
+   DEV_OPT_MULTICAST   = (1 << 12),
 };
 
 /* events broadcasted to all users of a device */ @@ -127,6 +129,7 @@ struct 
device_settings {
uint8_t macaddr[6];
bool ipv6;
bool 

Re: [OpenWrt-Devel] [PATCH 1/3] toolchain: add support of ARC architecture

2015-09-02 Thread Alexey Brodkin
Hi Jonas,

On Wed, 2015-09-02 at 10:08 +0200, Jonas Gorski wrote:
> Hi,
> 
> On Thu, Aug 27, 2015 at 1:03 PM, Alexey Brodkin
>  wrote:
> > This includes binutils, gcc, gdb and uClibc-ng.
> > 
> > Latest release of ARC gcc (as of today it is "arc-2015.06")
> > is based on upstream gcc 4.8.4.
> > 
> > Sources are available on GitHub, see:
> > https://github.com/foss-for-synopsys-dwc-arc-processors/gcc
> > 
> > Latest release of ARC binutils (as of today it is "arc-2015.06")
> > is based on upstream binutils 2.23.
> > 
> > Sources are available on GitHub, see:
> > https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06
> > 
> > Latest release of ARC GDB (as of today this is "arc-2015.06-gdb")
> > is based on upstream gdb 7.9.1.
> > 
> > Sources are available on GitHub, see:
> > https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06-gdb
> > 

[snip]

> > diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in
> > index 8d91223..0f670f1 100644
> > --- a/toolchain/binutils/Config.in
> > +++ b/toolchain/binutils/Config.in
> > @@ -2,13 +2,19 @@
> > 
> >  choice
> > prompt "Binutils Version" if TOOLCHAINOPTS
> > -   default BINUTILS_VERSION_LINARO
> > +   default BINUTILS_VERSION_ARC if arc
> > +   default BINUTILS_VERSION_LINARO if !arc
> > help
> >   Select the version of binutils you wish to use.
> > 
> > config BINUTILS_VERSION_LINARO
> > +   depends on !arc
> > bool "Linaro binutils 2.24"
> > 
> > +   config BINUTILS_VERSION_ARC
> > +   depends on arc
> > +   bool "ARC binutils 2015.06"
> > +
> >  endchoice
> > 
> >  config EXTRA_BINUTILS_CONFIG_OPTIONS
> > @@ -21,5 +27,5 @@ config EXTRA_BINUTILS_CONFIG_OPTIONS
> >  config BINUTILS_VERSION
> > string
> > prompt "Binutils Version" if (TOOLCHAINOPTS && NULL)
> > -   default "linaro"  if BINUTILS_VERSION_LINARO
> > -   default "linaro"
> > +   default "linaro"  if BINUTILS_VERSION_LINARO || 
> > (!TOOLCHAINOPTS && !arc)
> > +   default "arc" if BINUTILS_VERSION_ARC || 
> > (!TOOLCHAINOPTS && arc)
> 
> One of BINUTILS_VERSION_ARC and BINUTILS_VERSION_LINARO will always be
> set regardless of TOOLCHAINOPTS being set, so you can drop the || ( )
> part.

Well that's not entirely correct.
If TOOLCHAIN is not set then BINUTILS_VERSION_xxx won't be set as well.
In other words following construction will lead to missing BINUTILS_VERSION
in .config:
>8
default "linaro"  if BINUTILS_VERSION_LINARO || (!TOOLCHAINOPTS && !arc)
default "arc" if BINUTILS_VERSION_ARC || (!TOOLCHAINOPTS && arc)
>8

Following construction will work:
>8
default "linaro"  if !arc
default "arc" if arc
>8

But then this thing "prompt "Binutils Version" if TOOLCHAINOPTS" makes no sense
because we force set ARC binutils for ARC and Linaro binutils for anything else.

Well even now that prompt is useless because it doesn't allow to choose anything
except Linaro :)


> > diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
> > index 0276512..d420802 100644
> > --- a/toolchain/binutils/Makefile
> > +++ b/toolchain/binutils/Makefile
> > @@ -10,11 +10,20 @@ PKG_NAME:=binutils
> >  PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION))
> >  BIN_VERSION:=$(PKG_VERSION)
> > 
> > -PKG_SOURCE_URL:=https://releases.linaro.org/14.09/components/toolchain/binutils-linaro/
> > -PKG_REV:=2.24.0-2014.09
> > -PKG_SOURCE:=$(PKG_NAME)-linaro-$(PKG_REV).tar.xz
> > -PKG_MD5SUM:=8f9b2b2e049d59b1b86ce9657802a353
> > -BINUTILS_DIR:=$(PKG_NAME)-linaro-$(PKG_REV)
> > +ifeq ($(findstring arc, $(CONFIG_BINUTILS_VERSION)),arc)
> 
> Any reason why ifeq($(CONFIG_BINUTILS_VERSION),arc) directly doesn't work?

Well it's possible to do that this way but it requires quotes word we're 
comparing to.
So following string will work:
>8
ifeq ($(CONFIG_BINUTILS_VERSION),"arc")
>8

That's because version we set in Config in is quoted as well.

Still if we do search of "arc" substring it will work even if we change binutils
version string to match gcc's pattern like "arc-2015.06" etc.
So I wanted to implement a sort of universal approach.

If you think that explanation above makes not much sense I will
rework it.

> >  config GCC_VERSION_4_8_LINARO
> > -   default y if (!TOOLCHAINOPTS && !TARGET_octeon)
> > +   default y if (!TOOLCHAINOPTS && !(TARGET_octeon || arc))
> > bool
> > 
> >  config GCC_VERSION_4_9_LINARO
> > bool
> > 
> > +config GCC_VERSION_4_8_ARC
> > +   default y if (!TOOLCHAINOPTS && 

Re: [OpenWrt-Devel] [PATCH 2/2] [package] gre: multicast flag control

2015-09-02 Thread Podolak, Nicholas
From: Nick Podolak 

This patch adds the ability for the gre.sh netifd script to deliver the 
multicast flag config variable from UCI to the netifd process.
This patch won't do much without the first from the group.

Signed-off-by: Nick Podolak 

diff --git a/package/network/config/gre/files/gre.sh 
b/package/network/config/gre/files/gre.sh
index 4483a08..5c7982e 100755
--- a/package/network/config/gre/files/gre.sh
+++ b/package/network/config/gre/files/gre.sh
@@ -13,10 +13,11 @@ gre_generic_setup() {
local local="$3"
local remote="$4"
local link="$5"
-   local mtu ttl tos zone ikey okey icsum ocsum iseqno oseqno
-   json_get_vars mtu ttl tos zone ikey okey icsum ocsum iseqno oseqno
+   local mtu ttl tos zone ikey okey icsum ocsum iseqno oseqno multicast
+   json_get_vars mtu ttl tos zone ikey okey icsum ocsum iseqno oseqno 
multicast
 
[ -z "$zone" ] && zone="wan"
+   [ -z "$multicast" ] && multicast="1"
 
proto_init_update "$link" 1
 
@@ -30,6 +31,7 @@ gre_generic_setup() {
json_add_string remote "$remote"
[ -n "$tunlink" ] && json_add_string link "$tunlink"
json_add_string info 
"${ikey:-0},${okey:-0},${icsum:-0},${ocsum:-0},${iseqno:-0},${oseqno:-0}"
+   [ -n "$multicast" ] && json_add_boolean multicast "$multicast"
proto_close_tunnel
 
proto_add_data
@@ -203,6 +205,7 @@ gre_generic_init_config() {
proto_config_add_boolean "ocsum"
proto_config_add_boolean "iseqno"
proto_config_add_boolean "oseqno"
+   proto_config_add_boolean "multicast"
 }
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCHv2] dnsmasq: support hostid ipv6 address suffix option

2015-09-02 Thread Kevin Darbyshire-Bryant
Add support for hostid dhcp config entry to dnsmasq. This allows
specification of dhcpv6 hostid suffix and works in the same way as
odhcpd.

Entries in auto generated dnsmasq.conf should conform to:

dhcp-host=mm:mm:mm:mm:mm:mm,IPv4addr,[::V6su:ffix],hostname

example based on sample config/dhcp entry:

config host
option name 'Kermit'
option mac 'E0:3F:49:A1:D4:AA'
option ip '192.168.235.4'
option hostid '4'

dhcp-host=E0:3F:49:A1:D4:AA,192.168.235.4,[::0:4],Kermit

Signed-off-by: Kevin Darbyshire-Bryant 
---
 .../network/services/dnsmasq/files/dnsmasq.init| 27 +-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
b/package/network/services/dnsmasq/files/dnsmasq.init
index ab64e88..85bc0b3 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -23,6 +23,25 @@ xappend() {
echo "${value#--}" >> $CONFIGFILE
 }
 
+hex_to_hostid() {
+local var="$1"
+local hex="${2#0x}" # strip optional "0x" prefix
+
+if [ -n "${hex//[0-9a-fA-F]/}" ]; then
+# is invalid hex literal
+return 1
+fi
+
+# convert into host id
+export "$var=$(
+printf "%0x:%0x"  \
+$(((0x$hex >> 16) % 65536)) \
+$(( 0x$hex% 256))
+)"
+
+return 0
+}
+
 dhcp_calc() {
local ip="$1"
local res=0
@@ -329,10 +348,16 @@ dhcp_host_add() {
 
config_get tag "$cfg" tag
 
+   config_get hostid "$cfg" hostid
+
+   if [ -n "$hostid" ]; then
+   hex_to_hostid hostid "$hostid"
+   fi
+
config_get_bool broadcast "$cfg" broadcast 0
[ "$broadcast" = "0" ] && broadcast=
 
-   xappend 
"--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip}${name:+,$name}"
+   xappend 
"--dhcp-host=$macs${networkid:+,net:$networkid}${broadcast:+,set:needs-broadcast}${tag:+,set:$tag}${ip:+,$ip${hostid:+,[::$hostid]}}${name:+,$name}"
 }
 
 dhcp_tag_add() {
-- 
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] [PATCH 2/2] netifd: Don't call set_state for external device in device_claim

2015-09-02 Thread Hans Dedecker
On Wed, Sep 2, 2015 at 10:31 AM, Felix Fietkau  wrote:

> On 2015-09-01 15:53, Hans Dedecker wrote:
> >
> >
> > On Tue, Sep 1, 2015 at 2:49 PM, Felix Fietkau  > > wrote:
> >
> > On 2015-09-01 14:43, Hans Dedecker wrote:
> > > The function set_state disable is not called for external devices
> > in device_release
> > > which means for external vlan/macvlan devices they won't be
> deleted.
> > > As a result of this the set_state enable call for external devices
> > by device_claim fails
> > > as vlan/macvlan devices cannot be created since the device already
> > exists in the kernel.
> > > Therefore move the external device check from device_set_state to
> > device_claim so
> > > external vlan/macvlan devices are not created again and can also
> > be external.
> > Why/how do vlan/macvlan devices become external?
> >
> > This use case is driven by an external application which is adding a
> > vlan device to the bridge.
> > Initially the vlan device is created as an internal device but not added
> > to the bridge; later added by an external application via ubus to the
> > bridge. In this scenario we hit the issue when doing network reload the
> > vlan device is not anymore an active member of the bridge as vlan
> > set_state enable was called which failed.
> > This is a bit similar to a wireless device which has uci device config;
> > initially it's considered as an internal device by netifd when loading
> > the config but becomes an external device when the wireless logic adds
> > it to the bridge.
> The main point of dev->external is to declare that a device is fully
> managed externally, and netifd is not supposed to bring it up or down.
> Maybe a better fix would be to allow devices to be added dynamically
> without forcing dev->external on them (or just prevent that flag from
> being added for vlan devices).
>
Devices can be added dynamically without being forced external via the
function interface_handle_link; so that is covered.
Regarding the external flag being set for vlan devices; would it be
acceptable the external flag can only be set  for simple devices in
device_get ? This is the only place where non simple devices can be set
external.
My intention with this patch was also to line up the external flag check
when the state is altered; in device_release the external flag is checked
although the same check is done in set_device_state (which would eventually
be called by the set_state callback function). So I thought to add the same
external flag check in device_claim to line up both functions.

Hans

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


[OpenWrt-Devel] [PATCH 6/9] ar71xx: PowerCloud CR3000 OpenWrt configuration

2015-09-02 Thread Daniel Dickinson
OpenWRt configuration part of support for the PowerCloud
Systems CR3000.  The CR3000 is a 802.11n 2.4 GHz wireless router with
8MB flash, 64MB RAM, a four port gigabit ethernet switch, and a fast
ethernet wan port that was sold by PowerCloud Systems as
hardware for the Skydog cloud-managed router service.

Signed-off-by: Daniel Dickinson 
---
 package/boot/uboot-envtools/files/ar71xx   | 1 +
 target/linux/ar71xx/base-files/etc/diag.sh | 3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds| 9 +
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 6 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh   | 3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 3 ++-
 6 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/package/boot/uboot-envtools/files/ar71xx 
b/package/boot/uboot-envtools/files/ar71xx
index e6f73b1..20a83b0 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -18,6 +18,7 @@ all0258n | \
 cap324 | \
 cap4200ag | \
 carambola2 | \
+cr3000 | \
 eap300v2 | \
 hornet-ub | \
 hornet-ub-x2 | \
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index cd17bd3..3330eea 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -62,6 +62,9 @@ get_status_led() {
cpe510)
status_led="tp-link:green:link4"
;;
+   cr3000)
+   status_led="pcs:amber:power"
+   ;;
db120)
status_led="db120:green:status"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 52c2635..640fd2b 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -112,6 +112,15 @@ cpe510)
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" 
"76" "100" "-75" "13"
;;
 
+cr3000)
+   ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1"
+   ucidef_set_led_switch "lan1" "LAN1" "pcs:blue:lan1" "switch0" "0x04"
+   ucidef_set_led_switch "lan2" "LAN2" "pcs:blue:lan2" "switch0" "0x08"
+   ucidef_set_led_switch "lan3" "LAN3" "pcs:blue:lan3" "switch0" "0x10"
+   ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02"
+   ucidef_set_led_wlan "wlan" "WLAN" "pcs:blue:wlan" "phy0tpt"
+   ;;
+
 db120)
ucidef_set_led_usbdev "usb" "USB" "db120:green:usb" "1-1"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 0704088..7b081db 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -271,6 +271,12 @@ wzr-hp-g300nh)
ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
;;
 
+cr3000)
+   ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"
+   ;;
+
 dgl-5500-a1 |\
 dir-825-c1)
local mac
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 859840c..281d73c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -399,6 +399,9 @@ ar71xx_board_detect() {
name="cpe510"
tplink_pharos_board_detect
;;
+   *CR3000)
+   name="cr3000"
+   ;;
*"DB120 reference board")
name="db120"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index dbc4e39..feb091f 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -168,7 +168,8 @@ platform_check_image() {
all0315n | \
all0258n | \
cap324 | \
-   cap4200ag)
+   cap4200ag | \
+   cr3000)
platform_check_image_allnet "$1" && return 0
return 1
;;
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/9] ar71xx: PowerCloud CAP324 kernel support

2015-09-02 Thread Daniel Dickinson
Kernel part of support for PowerCloud CAP324 Cloud AP.
The CAP324 Cloud AP was a device sold by PowerCloud Systems as hardware for
the CloudCommand service for 'cloud' based managment of large numbers
access points.

The CAP324 is a dual-band 802.11n wireless access point with 16MB flash
and 128MB RAM and single gigabit ethernet port.  It can be powered via PoE
or a wall wart.

Signed-off-by: Daniel Dickinson 
---
 target/linux/ar71xx/config-4.1 |   1 +
 target/linux/ar71xx/mikrotik/config-default|   1 +
 target/linux/ar71xx/nand/config-default|   1 +
 ...-MIPS-ath79-add-powercloud-cap324-support.patch | 175 +
 4 files changed, 178 insertions(+)
 create mode 100644 
target/linux/ar71xx/patches-4.1/815-MIPS-ath79-add-powercloud-cap324-support.patch

diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 21c4601..f921916 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -48,6 +48,7 @@ CONFIG_ATH79_MACH_ARCHER_C7=y
 CONFIG_ATH79_MACH_AW_NR580=y
 CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
 CONFIG_ATH79_MACH_BSB=y
+CONFIG_ATH79_MACH_CAP324=y
 CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
 CONFIG_ATH79_MACH_CPE510=y
diff --git a/target/linux/ar71xx/mikrotik/config-default 
b/target/linux/ar71xx/mikrotik/config-default
index de91e4b..c46529c 100644
--- a/target/linux/ar71xx/mikrotik/config-default
+++ b/target/linux/ar71xx/mikrotik/config-default
@@ -15,6 +15,7 @@
 # CONFIG_ATH79_MACH_ARCHER_C7 is not set
 # CONFIG_ATH79_MACH_AW_NR580 is not set
 # CONFIG_ATH79_MACH_BHU_BXU2000N2_A is not set
+# CONFIG_ATH79_MACH_CAP324 is not set
 # CONFIG_ATH79_MACH_CAP4200AG is not set
 # CONFIG_ATH79_MACH_CARAMBOLA2 is not set
 # CONFIG_ATH79_MACH_CPE510 is not set
diff --git a/target/linux/ar71xx/nand/config-default 
b/target/linux/ar71xx/nand/config-default
index 50b6dbe..0407da0 100644
--- a/target/linux/ar71xx/nand/config-default
+++ b/target/linux/ar71xx/nand/config-default
@@ -13,6 +13,7 @@
 # CONFIG_ATH79_MACH_AP96 is not set
 # CONFIG_ATH79_MACH_ARCHER_C7 is not set
 # CONFIG_ATH79_MACH_AW_NR580 is not set
+# CONFIG_ATH79_MACH_CAP324 is not set
 # CONFIG_ATH79_MACH_CAP4200AG is not set
 # CONFIG_ATH79_MACH_CARAMBOLA2 is not set
 # CONFIG_ATH79_MACH_DB120 is not set
diff --git 
a/target/linux/ar71xx/patches-4.1/815-MIPS-ath79-add-powercloud-cap324-support.patch
 
b/target/linux/ar71xx/patches-4.1/815-MIPS-ath79-add-powercloud-cap324-support.patch
new file mode 100644
index 000..2653d24
--- /dev/null
+++ 
b/target/linux/ar71xx/patches-4.1/815-MIPS-ath79-add-powercloud-cap324-support.patch
@@ -0,0 +1,175 @@
+--- a/arch/mips/ath79/Kconfig
 b/arch/mips/ath79/Kconfig
+@@ -866,6 +866,16 @@ config ATH79_MACH_MZK_W300NH
+   select ATH79_DEV_M25P80
+   select ATH79_DEV_WMAC
+ 
++config ATH79_MACH_CAP324
++  bool "PowerCloud Systems CAP324 board support"
++  select SOC_AR934X
++  select ATH79_DEV_AP9X_PCI if PCI
++  select ATH79_DEV_ETH
++  select ATH79_DEV_GPIO_BUTTONS
++  select ATH79_DEV_LEDS_GPIO
++  select ATH79_DEV_M25P80
++  select ATH79_DEV_WMAC
++
+ config ATH79_MACH_RW2458N
+   bool "Redwave RW2458N board support"
+   select SOC_AR724X
+--- a/arch/mips/ath79/Makefile
 b/arch/mips/ath79/Makefile
+@@ -57,6 +57,7 @@ obj-$(CONFIG_ATH79_MACH_ARCHER_C7)   += ma
+ obj-$(CONFIG_ATH79_MACH_AW_NR580) += mach-aw-nr580.o
+ obj-$(CONFIG_ATH79_MACH_BHU_BXU2000N2_A)+= mach-bhu-bxu2000n2-a.o
+ obj-$(CONFIG_ATH79_MACH_BSB)  += mach-bsb.o
++obj-$(CONFIG_ATH79_MACH_CAP324)   += mach-cap324.o
+ obj-$(CONFIG_ATH79_MACH_CAP4200AG)+= mach-cap4200ag.o
+ obj-$(CONFIG_ATH79_MACH_CPE510)   += mach-cpe510.o
+ obj-$(CONFIG_ATH79_MACH_DB120)+= mach-db120.o
+--- /dev/null
 b/arch/mips/ath79/mach-cap324.c
+@@ -0,0 +1,133 @@
++/*
++ *  PowerCloud Systems CAP324 board support
++ *
++ *  Copyright (C) 2012 Gabor Juhos 
++ *  Copyright (C) 2012-2013 PowerCloud Systems
++ *  Copyright (C) 2015 Daniel Dickinson
++ *
++ *  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.
++ */
++
++#include 
++#include 
++#include 
++#include 
++
++#include 
++
++#include "common.h"
++#include "dev-ap9x-pci.h"
++#include "dev-eth.h"
++#include "dev-gpio-buttons.h"
++#include "dev-leds-gpio.h"
++#include "dev-m25p80.h"
++#include "dev-spi.h"
++#include "dev-usb.h"
++#include "dev-wmac.h"
++#include "machtypes.h"
++
++#define CAP324_GPIO_LED_POWER_GREEN   12
++#define CAP324_GPIO_LED_POWER_AMBER   13
++#define CAP324_GPIO_LED_LAN_GREEN 14
++#define CAP324_GPIO_LED_LAN_AMBER 15
++#define CAP324_GPIO_LED_WLAN_GREEN18
++#define CAP324_GPIO_LED_WLAN_AMBER19
++
++#define CAP324_GPIO_BTN_RESET 17
++
++#define 

[OpenWrt-Devel] [PATCH 2/9] ar71xx: PowerCloud CAP324 image generation

2015-09-02 Thread Daniel Dickinson
Image generation (and mtd partition) part of support for
PowerCloud CAP324 Cloud AP. The CAP324 Cloud AP is a device sold by
PowerCloud Systems who's stock firmware (CloudCommand) provides
'cloud' based managment of large numbers of access points.

The CAP324 is a dual-band 802.11n wireless access point with 16MB flash
and 128MB RAM and single gigabit ethernet port.  It can be powered via
PoE or a wall wart.

Signed-off-by: Daniel Dickinson 
---
 target/linux/ar71xx/generic/profiles/pcs.mk | 44 +
 target/linux/ar71xx/image/Makefile  |  4 +++
 2 files changed, 48 insertions(+)

diff --git a/target/linux/ar71xx/generic/profiles/pcs.mk 
b/target/linux/ar71xx/generic/profiles/pcs.mk
index 1399ef4..b56d131 100644
--- a/target/linux/ar71xx/generic/profiles/pcs.mk
+++ b/target/linux/ar71xx/generic/profiles/pcs.mk
@@ -27,3 +27,47 @@ define Profile/DLRTDEV01/Description
 endef
 
 $(eval $(call Profile,DLRTDEV01))
+
+define Profile/CAP324
+   NAME:=PowerCloud CAP324 Cloud AP
+   PACKAGES:=uboot-envtools
+endef
+
+define Profile/CAP324/Description
+   Package set optimized for the PowerCloud Systems CAP324 Cloud AP
+
+   The CAP324 Cloud AP is a device sold by PowerCloud Systems 
+   who's stock firmware (CloudCommand) provides 'cloud' based
+   managment of large numbers of access points.
+
+   The CAP324 is a dual-band 802.11n wireless access point with 16MB
+   flash and 128MB RAM and single gigabit ethernet port.  It can be 
+   powered via PoE or a wall wart.
+endef
+
+$(eval $(call Profile,CAP324))
+
+define Profile/CAP324NOCLOUD
+   NAME:=PowerCloud CAP324 Without Cloud
+   PACKAGES:=uboot-envtools
+endef
+
+define Profile/CAP324NOCLOUD/Description
+   Package set optimized for the PowerCloud Systems CAP324 Without Cloud
+
+   The CAP324 Cloud AP is a device sold by PowerCloud Systems 
+   who's stock firmware (CloudCommand) provides 'cloud' based
+   managment of large numbers of access points.
+
+   The CAP324 is a dual-band 802.11n wireless access point with 16MB
+   flash and 128MB RAM and single gigabit ethernet port.  It can be 
+   powered via PoE or a wall wart.
+
+   WARNING: Will remove certificates used by cloud firmware
+   After flashing this firmware you will not be able to
+   return the device to cloud operation.
+The advantage is reclaiming flash used for the certificates.
+endef
+
+$(eval $(call Profile,CAP324NOCLOUD))
+
diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 8f609de..15bb6a3 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1198,6 +1198,8 @@ 
cameo_ap121_mtdlayout_8M=mtdparts=spi0.0:64k(u-boot)ro,64k(art)ro,64k(mac)ro,64k
 
cameo_ap123_mtdlayout_4M=mtdparts=spi0.0:64k(u-boot)ro,64k(nvram)ro,3712k(firmware),192k(lang)ro,64k(art)ro
 
cameo_db120_mtdlayout=mtdparts=spi0.0:64k(uboot)ro,64k(nvram)ro,15936k(firmware),192k(lang)ro,64k(mac)ro,64k(art)ro
 
cameo_db120_mtdlayout_8M=mtdparts=spi0.0:64k(uboot)ro,64k(nvram)ro,7872k(firmware),128k(lang)ro,64k(art)ro
+cap324_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env)ro,1536k(kernel),13760k(rootfs),640k(certs),64k(nvram),64k(art),15296k@0x5(firmware)
+cap324nocloud_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env)ro,1536k(kernel),14464k(rootfs),64k(art),16000k@0x5(firmware)
 
cap4200ag_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),320k(custom)ro,1536k(kernel),12096k(rootfs),2048k(failsafe),64k(art),13632k@0xa(firmware)
 
cpe510_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(pation-table)ro,64k(product-info)ro,1536k(kernel),6144k(rootfs),192k(config)ro,64k(ART)ro,7680k@0x4(firmware)
 
eap300v2_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),320k(custom),13632k(firmware),2048k(failsafe),64k(art)ro
@@ -2075,6 +2077,8 @@ $(eval $(call 
SingleProfile,AthLzma,64k,AP143_8M,ap143-8M,AP143,ttyS0,115200,$$(
 $(eval $(call 
SingleProfile,AthLzma,64k,AP143_16M,ap143-16M,AP143,ttyS0,115200,$$(ap143_mtdlayout_16M),RKuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,AP147_010,ap147-010,AP147-010,ttyS0,115200,$$(ap147_mtdlayout),RKuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,BXU2000N2,bxu2000n-2-a1,BXU2000n-2-A1,ttyS0,115200,$$(bxu2000n2_mtdlayout),RKuImage))
+$(eval $(call 
SingleProfile,AthLzma,64k,CAP324,cap324,CAP324,ttyS0,115200,$$(cap324_mtdlayout),KRuImage))
+$(eval $(call 
SingleProfile,AthLzma,64k,CAP324NOCLOUD,cap324nocloud,CAP324,ttyS0,115200,$$(cap324nocloud_mtdlayout),KRuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,CAP4200AG,cap4200ag,CAP4200AG,ttyS0,115200,$$(cap4200ag_mtdlayout),KRuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,DB120,db120,DB120,ttyS0,115200,$$(db120_mtdlayout),RKuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,DRAGINO2,dragino2,DRAGINO2,ttyATH0,115200,$$(dragino2_mtdlayout),KRuImage,65536))

[OpenWrt-Devel] [PATCH 4/9] ar71xx: PowerCloud CR3000 kernel support

2015-09-02 Thread Daniel Dickinson
Kernel part of support package for PowerCloud CR3000.  The CR3000 is
a 802.11n 2.4 GHz wireless router with 8MB flash, 64MB RAM,
a four port gigabit ethernet switch, and a fast ethernet wan port which
was sold by PowerCloud Systems as hardware for the Skydog
cloud-managed router service.

Signed-off-by: Daniel Dickinson 
---
 target/linux/ar71xx/config-4.1 |   1 +
 target/linux/ar71xx/mikrotik/config-default|   1 +
 target/linux/ar71xx/nand/config-default|   1 +
 ...-MIPS-ath79-add-powercloud-cr3000-support.patch | 201 +
 4 files changed, 204 insertions(+)
 create mode 100644 
target/linux/ar71xx/patches-4.1/816-MIPS-ath79-add-powercloud-cr3000-support.patch

diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index f921916..ed1957e 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -52,6 +52,7 @@ CONFIG_ATH79_MACH_CAP324=y
 CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
 CONFIG_ATH79_MACH_CPE510=y
+CONFIG_ATH79_MACH_CR3000=y
 CONFIG_ATH79_MACH_DB120=y
 CONFIG_ATH79_MACH_DGL_5500_A1=y
 CONFIG_ATH79_MACH_DHP_1565_A1=y
diff --git a/target/linux/ar71xx/mikrotik/config-default 
b/target/linux/ar71xx/mikrotik/config-default
index c46529c..d541c0f 100644
--- a/target/linux/ar71xx/mikrotik/config-default
+++ b/target/linux/ar71xx/mikrotik/config-default
@@ -19,6 +19,7 @@
 # CONFIG_ATH79_MACH_CAP4200AG is not set
 # CONFIG_ATH79_MACH_CARAMBOLA2 is not set
 # CONFIG_ATH79_MACH_CPE510 is not set
+# CONFIG_ATH79_MACH_CR3000 is not set
 # CONFIG_ATH79_MACH_DB120 is not set
 # CONFIG_ATH79_MACH_DGL_5500_A1 is not set
 # CONFIG_ATH79_MACH_DHP_1565_A1 is not set
diff --git a/target/linux/ar71xx/nand/config-default 
b/target/linux/ar71xx/nand/config-default
index 0407da0..e875c76 100644
--- a/target/linux/ar71xx/nand/config-default
+++ b/target/linux/ar71xx/nand/config-default
@@ -16,6 +16,7 @@
 # CONFIG_ATH79_MACH_CAP324 is not set
 # CONFIG_ATH79_MACH_CAP4200AG is not set
 # CONFIG_ATH79_MACH_CARAMBOLA2 is not set
+# CONFIG_ATH79_MACH_CR3000 is not set
 # CONFIG_ATH79_MACH_DB120 is not set
 # CONFIG_ATH79_MACH_DIR_505_A1 is not set
 # CONFIG_ATH79_MACH_DIR_600_A1 is not set
diff --git 
a/target/linux/ar71xx/patches-4.1/816-MIPS-ath79-add-powercloud-cr3000-support.patch
 
b/target/linux/ar71xx/patches-4.1/816-MIPS-ath79-add-powercloud-cr3000-support.patch
new file mode 100644
index 000..96ff873
--- /dev/null
+++ 
b/target/linux/ar71xx/patches-4.1/816-MIPS-ath79-add-powercloud-cr3000-support.patch
@@ -0,0 +1,201 @@
+--- a/arch/mips/ath79/Kconfig
 b/arch/mips/ath79/Kconfig
+@@ -876,6 +876,16 @@ config ATH79_MACH_CAP324
+   select ATH79_DEV_M25P80
+   select ATH79_DEV_WMAC
+ 
++config ATH79_MACH_CR3000
++  bool "PowerCloud Systems CR3000 board support"
++  select SOC_AR934X
++  select ATH79_DEV_AP9X_PCI if PCI
++  select ATH79_DEV_ETH
++  select ATH79_DEV_GPIO_BUTTONS
++  select ATH79_DEV_LEDS_GPIO
++  select ATH79_DEV_M25P80
++  select ATH79_DEV_WMAC
++
+ config ATH79_MACH_RW2458N
+   bool "Redwave RW2458N board support"
+   select SOC_AR724X
+--- a/arch/mips/ath79/Makefile
 b/arch/mips/ath79/Makefile
+@@ -60,6 +60,7 @@ obj-$(CONFIG_ATH79_MACH_BSB) += mach-bs
+ obj-$(CONFIG_ATH79_MACH_CAP324)   += mach-cap324.o
+ obj-$(CONFIG_ATH79_MACH_CAP4200AG)+= mach-cap4200ag.o
+ obj-$(CONFIG_ATH79_MACH_CPE510)   += mach-cpe510.o
++obj-$(CONFIG_ATH79_MACH_CR3000)   += mach-cr3000.o
+ obj-$(CONFIG_ATH79_MACH_DB120)+= mach-db120.o
+ obj-$(CONFIG_ATH79_MACH_DLAN_PRO_500_WP)  += mach-dlan-pro-500-wp.o
+ obj-$(CONFIG_ATH79_MACH_DLAN_PRO_1200_AC) += mach-dlan-pro-1200-ac.o
+--- /dev/null
 b/arch/mips/ath79/mach-cr3000.c
+@@ -0,0 +1,159 @@
++/*
++ * PowerCloud Systems CR3000 support
++ *
++ * Copyright (c) 2011 Qualcomm Atheros
++ * Copyright (c) 2011-2012 Gabor Juhos 
++ * Copyright (c) 2012-2013 PowerCloud Systems
++ * Copyright (c) 2015 Daniel Dickinson 
++ *
++ * Permission to use, copy, modify, and/or distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ *
++ */
++
++#include 
++#include 
++#include 
++#include 
++#include 
++#include 
++
++#include 

[OpenWrt-Devel] [PATCH 5/9] ar71xx: PowerCloud CR3000 image generation

2015-09-02 Thread Daniel Dickinson
Image generation (and mtd partition)  part of support for the PowerCloud
Systems CR3000.  The CR3000 is a 802.11n 2.4 GHz wireless router with
8MB flash, 64MB RAM, a four port gigabit ethernet switch, and a fast
ethernet wan port that was sold by PowerCloud Systems as hardware for
the Skydog cloud-managed router service.

Signed-off-by: Daniel Dickinson 
---
 target/linux/ar71xx/generic/profiles/pcs.mk | 37 +
 target/linux/ar71xx/image/Makefile  |  4 
 2 files changed, 41 insertions(+)

diff --git a/target/linux/ar71xx/generic/profiles/pcs.mk 
b/target/linux/ar71xx/generic/profiles/pcs.mk
index b56d131..ec712aa 100644
--- a/target/linux/ar71xx/generic/profiles/pcs.mk
+++ b/target/linux/ar71xx/generic/profiles/pcs.mk
@@ -71,3 +71,40 @@ endef
 
 $(eval $(call Profile,CAP324NOCLOUD))
 
+define Profile/CR3000
+   NAME:=PowerCloud CR3000 Cloud Router
+   PACKAGES:=uboot-envtools
+endef
+
+define Profile/CR3000/Description
+   Package set optimized for the PowerCloud Systems CR3000 Cloud Router
+
+   The CR3000 is a 802.11n 2.4 GHz wireless router with
+   8MB flash, 64MB RAM, a four port gigabit ethernet switch,
+   and a faster ethernet wan port that was sold by PowerCloud
+   Systems as hardware for the Skydog cloud-managed router service.
+endef
+
+$(eval $(call Profile,CR3000))
+
+define Profile/CR3000NOCLOUD
+   NAME:=PowerCloud CR3000 Without Cloud
+   PACKAGES:=uboot-envtools
+endef
+
+define Profile/CR3000NOCLOUD/Description
+   Package set optimized for the PowerCloud Systems CR3000 Without Cloud
+
+   The CR3000 is a 802.11n 2.4 GHz wireless router with
+   8MB flash, 64MB RAM, a four port gigabit ethernet switch,
+   and a faster ethernet wan port that was sold by PowerCloud
+   Systems as hardware for the Skydog cloud-managed router service.
+
+   WARNING: Will remove certificates used by cloud firmware
+   After flashing this firmware you will not be able to
+   return the device to cloud operation.
+The advantage is reclaiming flash used for the certificates.
+endef
+
+$(eval $(call Profile,CR3000NOCLOUD))
+
diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 15bb6a3..5e1b432 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1202,6 +1202,8 @@ 
cap324_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env)ro,1536k(kernel),13
 
cap324nocloud_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env)ro,1536k(kernel),14464k(rootfs),64k(art),16000k@0x5(firmware)
 
cap4200ag_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),320k(custom)ro,1536k(kernel),12096k(rootfs),2048k(failsafe),64k(art),13632k@0xa(firmware)
 
cpe510_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(pation-table)ro,64k(product-info)ro,1536k(kernel),6144k(rootfs),192k(config)ro,64k(ART)ro,7680k@0x4(firmware)
+cr3000_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),5696k(rootfs),640k(certs),64k(nvram),64k(art)ro,7104k@0x5(firmware)
+cr3000nocloud_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),6400k(rootfs),64k(art)ro,7808k@0x5(firmware)
 
eap300v2_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),320k(custom),13632k(firmware),2048k(failsafe),64k(art)ro
 
db120_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x5(firmware)
 
dgl_5500_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,15296k(firmware),192k(lang)ro,512k(my-dlink)ro,64k(mac)ro,64k(art)ro
@@ -2080,6 +2082,8 @@ $(eval $(call 
SingleProfile,AthLzma,64k,BXU2000N2,bxu2000n-2-a1,BXU2000n-2-A1,tt
 $(eval $(call 
SingleProfile,AthLzma,64k,CAP324,cap324,CAP324,ttyS0,115200,$$(cap324_mtdlayout),KRuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,CAP324NOCLOUD,cap324nocloud,CAP324,ttyS0,115200,$$(cap324nocloud_mtdlayout),KRuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,CAP4200AG,cap4200ag,CAP4200AG,ttyS0,115200,$$(cap4200ag_mtdlayout),KRuImage))
+$(eval $(call 
SingleProfile,AthLzma,64k,CR3000,cr3000,CR3000,ttyS0,115200,$$(cr3000_mtdlayout),KRuImage))
+$(eval $(call 
SingleProfile,AthLzma,64k,CR3000NOCLOUD,cr3000nocloud,CR3000,ttyS0,115200,$$(cr3000nocloud_mtdlayout),KRuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,DB120,db120,DB120,ttyS0,115200,$$(db120_mtdlayout),RKuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,DRAGINO2,dragino2,DRAGINO2,ttyATH0,115200,$$(dragino2_mtdlayout),KRuImage,65536))
 $(eval $(call 
SingleProfile,AthLzma,64k,EWDORINAP,ew-dorin,EW-DORIN,ttyATH0,115200,$$(ew-dorin_mtdlayout_4M),KRuImage,65536))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/9] Support for three PowerCloud Systems devices

2015-09-02 Thread Daniel Dickinson
The following patch series adds support for three PowerCloud devices.
The patches have been reworked from the previous bunged up iteration
and have been tested on the actual devices which are currently in use.

There is, however, one question on the CR3000 which I had to redo
from scratch (and it's been quite some time since I did board support
stuff) and that is whether to get gigibit speeds on the LAN switch
there is some setting that is needed (currently the switch detects as
gigabit however link speed only detects as 100Mbit, but I'm not sure
if the issue is hardware or board support definition).

Regards,

Daniel

Daniel Dickinson (9):
  ar71xx: PowerCloud CAP324 kernel support
  ar71xx: PowerCloud CAP324 image generation
  ar71xx: PowerCloud CAP324 OpenWrt configuration
  ar71xx: PowerCloud CR3000 kernel support
  ar71xx: PowerCloud CR3000 image generation
  ar71xx: PowerCloud CR3000 OpenWrt configuration
  ar71xx: PowerCloud CR5000 kernel support
  ar71xx: PowerCloud CR5000 image generation
  ar71xx: PowerCloud CR5000 openwrt configuration

 package/boot/uboot-envtools/files/ar71xx   |   3 +
 target/linux/ar71xx/base-files/etc/diag.sh |   9 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds |  20 ++
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   8 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   9 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   5 +-
 target/linux/ar71xx/config-4.1 |   3 +
 target/linux/ar71xx/generic/profiles/pcs.mk| 118 +++
 target/linux/ar71xx/image/Makefile |  12 ++
 target/linux/ar71xx/mikrotik/config-default|   3 +
 target/linux/ar71xx/nand/config-default|   3 +
 ...-MIPS-ath79-add-powercloud-cap324-support.patch | 175 
 ...-MIPS-ath79-add-powercloud-cr3000-support.patch | 201 +++
 ...-MIPS-ath79-add-powercloud-cr5000-support.patch | 219 +
 14 files changed, 787 insertions(+), 1 deletion(-)
 create mode 100644 
target/linux/ar71xx/patches-4.1/815-MIPS-ath79-add-powercloud-cap324-support.patch
 create mode 100644 
target/linux/ar71xx/patches-4.1/816-MIPS-ath79-add-powercloud-cr3000-support.patch
 create mode 100644 
target/linux/ar71xx/patches-4.1/817-MIPS-ath79-add-powercloud-cr5000-support.patch
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/9] ar71xx: PowerCloud CAP324 OpenWrt configuration

2015-09-02 Thread Daniel Dickinson
Openwrt configuration part of support for PowerCloud CAP324
Cloud AP.  The CAP324 Cloud AP is a device sold by PowerCloud Systems
who's stock firmware (CloudCommand) provides 'cloud' based managment
of large numbers access points.

The CAP324 is a dual-band 802.11n wireless access point with 16MB flash
and 128MB RAM and single gigabit ethernet port.  It can be powered via PoE
or a wall wart.

Signed-off-by: Daniel Dickinson 
---
 package/boot/uboot-envtools/files/ar71xx   | 1 +
 target/linux/ar71xx/base-files/etc/diag.sh | 3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds| 6 ++
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   | 3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 +
 6 files changed, 15 insertions(+)

diff --git a/package/boot/uboot-envtools/files/ar71xx 
b/package/boot/uboot-envtools/files/ar71xx
index 8fb559e..e6f73b1 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -15,6 +15,7 @@ board=$(ar71xx_board_name)
 
 case "$board" in
 all0258n | \
+cap324 | \
 cap4200ag | \
 carambola2 | \
 eap300v2 | \
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 36de775..cd17bd3 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -53,6 +53,9 @@ get_status_led() {
bxu2000n-2-a1)
status_led="bhu:green:status"
;;
+   cap324)
+   status_led="pcs:green:power"
+   ;;
cap4200ag)
status_led="senao:green:pwr"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index e7f7a4c..52c2635 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -84,6 +84,12 @@ bxu2000n-2-a1)
ucidef_set_led_wlan "wlan" "WLAN" "bhu:green:wlan" "phy0tpt"
;;
 
+cap324)
+   ucidef_set_led_netdev "lan" "LAN" "pcs:green:lan" "eth0"
+   ucidef_set_led_wlan "wlan_amber" "WLAN_AMBER" "pcs:amber:wlan" "phy0tpt"
+   ucidef_set_led_wlan "wlan_green" "WLAN_GREEN" "pcs:green:wlan" "phy1tpt"
+   ;;
+
 cap4200ag)
ucidef_set_led_default "lan_green" "LAN_GREEN" "senao:green:lan" "1"
ucidef_set_led_wlan "wlan_amber" "WLAN_AMBER" "senao:amber:wlan" 
"phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 686fce9..0704088 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -333,6 +333,7 @@ dlan-pro-1200-ac)
 all0305 |\
 aw-nr580 |\
 bullet-m |\
+cap324 |\
 cap4200ag |\
 eap300v2 |\
 eap7660d |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index e1f345e..859840c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -389,6 +389,9 @@ ar71xx_board_detect() {
*AW-NR580)
name="aw-nr580"
;;
+   *CAP324)
+   name="cap324"
+   ;;
*CAP4200AG)
name="cap4200ag"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index c1962e4..dbc4e39 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -167,6 +167,7 @@ platform_check_image() {
case "$board" in
all0315n | \
all0258n | \
+   cap324 | \
cap4200ag)
platform_check_image_allnet "$1" && return 0
return 1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 9/9] ar71xx: PowerCloud CR5000 openwrt configuration

2015-09-02 Thread Daniel Dickinson
OpenWrt configuration part of support for the PowerCloud Systems
CR5000.  The CR5000 is a dual-band 802.11n wireless router with
8MB flash, 64MB RAM, (unused on stock firmware) USB 2.0 port and
five port gigabit ethernet switch.  The CR5000 was sold as
hardware for the Skydog cloud-managed router service.

Signed-off-by: Daniel Dickinson 
---
 package/boot/uboot-envtools/files/ar71xx   | 1 +
 target/linux/ar71xx/base-files/etc/diag.sh | 3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds| 5 +
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   | 3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 3 ++-
 6 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/package/boot/uboot-envtools/files/ar71xx 
b/package/boot/uboot-envtools/files/ar71xx
index 20a83b0..5331d18 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -19,6 +19,7 @@ cap324 | \
 cap4200ag | \
 carambola2 | \
 cr3000 | \
+cr5000 | \
 eap300v2 | \
 hornet-ub | \
 hornet-ub-x2 | \
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 3330eea..fad4c56 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -65,6 +65,9 @@ get_status_led() {
cr3000)
status_led="pcs:amber:power"
;;
+   cr5000)
+   status_led="pcs:amber:power"
+   ;;
db120)
status_led="db120:green:status"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 640fd2b..7b61015 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -121,6 +121,11 @@ cr3000)
ucidef_set_led_wlan "wlan" "WLAN" "pcs:blue:wlan" "phy0tpt"
;;
 
+cr5000)
+   ucidef_set_led_wlan "wlan" "WLAN" "pcs:blue:wlan" "phy0tpt"
+   ucidef_set_led_usbdev "usb" "USB" "pcs:white:wps" "1-1"
+   ;;
+
 db120)
ucidef_set_led_usbdev "usb" "USB" "db120:green:usb" "1-1"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 7b081db..71e9ec5 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -31,6 +31,7 @@ wlr8100)
ucidef_add_switch_vlan "switch0" "2" "0t 1"
;;
 
+cr5000 |\
 esr1750 |\
 epg5000)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 281d73c..75cc642 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -402,6 +402,9 @@ ar71xx_board_detect() {
*CR3000)
name="cr3000"
;;
+   *CR5000)
+   name="cr5000"
+   ;;
*"DB120 reference board")
name="db120"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index feb091f..9be1745 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -169,7 +169,8 @@ platform_check_image() {
all0258n | \
cap324 | \
cap4200ag | \
-   cr3000)
+   cr3000 |\
+   cr5000)
platform_check_image_allnet "$1" && return 0
return 1
;;
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 7/9] ar71xx: PowerCloud CR5000 kernel support

2015-09-02 Thread Daniel Dickinson
Kernel part of support for the PowerCloud Systems CR5000.  The
CR5000 is a dual-band 802.11n wireless router with 8MB flash,
64 MB RAM, (unused in stock firmware) USB 2.0 port, and five
port gigabit ethernet switch.  The CR5000 was sold as hardware for
the Skydog cloud-managed router service.

Signed-off-by: Daniel Dickinson 
---
 target/linux/ar71xx/config-4.1 |   1 +
 target/linux/ar71xx/mikrotik/config-default|   1 +
 target/linux/ar71xx/nand/config-default|   1 +
 ...-MIPS-ath79-add-powercloud-cr5000-support.patch | 219 +
 4 files changed, 222 insertions(+)
 create mode 100644 
target/linux/ar71xx/patches-4.1/817-MIPS-ath79-add-powercloud-cr5000-support.patch

diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index ed1957e..7260954 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -53,6 +53,7 @@ CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
 CONFIG_ATH79_MACH_CPE510=y
 CONFIG_ATH79_MACH_CR3000=y
+CONFIG_ATH79_MACH_CR5000=y
 CONFIG_ATH79_MACH_DB120=y
 CONFIG_ATH79_MACH_DGL_5500_A1=y
 CONFIG_ATH79_MACH_DHP_1565_A1=y
diff --git a/target/linux/ar71xx/mikrotik/config-default 
b/target/linux/ar71xx/mikrotik/config-default
index d541c0f..88ac6cf 100644
--- a/target/linux/ar71xx/mikrotik/config-default
+++ b/target/linux/ar71xx/mikrotik/config-default
@@ -20,6 +20,7 @@
 # CONFIG_ATH79_MACH_CARAMBOLA2 is not set
 # CONFIG_ATH79_MACH_CPE510 is not set
 # CONFIG_ATH79_MACH_CR3000 is not set
+# CONFIG_ATH79_MACH_CR5000 is not set
 # CONFIG_ATH79_MACH_DB120 is not set
 # CONFIG_ATH79_MACH_DGL_5500_A1 is not set
 # CONFIG_ATH79_MACH_DHP_1565_A1 is not set
diff --git a/target/linux/ar71xx/nand/config-default 
b/target/linux/ar71xx/nand/config-default
index e875c76..314dbeb 100644
--- a/target/linux/ar71xx/nand/config-default
+++ b/target/linux/ar71xx/nand/config-default
@@ -17,6 +17,7 @@
 # CONFIG_ATH79_MACH_CAP4200AG is not set
 # CONFIG_ATH79_MACH_CARAMBOLA2 is not set
 # CONFIG_ATH79_MACH_CR3000 is not set
+# CONFIG_ATH79_MACH_CR5000 is not set
 # CONFIG_ATH79_MACH_DB120 is not set
 # CONFIG_ATH79_MACH_DIR_505_A1 is not set
 # CONFIG_ATH79_MACH_DIR_600_A1 is not set
diff --git 
a/target/linux/ar71xx/patches-4.1/817-MIPS-ath79-add-powercloud-cr5000-support.patch
 
b/target/linux/ar71xx/patches-4.1/817-MIPS-ath79-add-powercloud-cr5000-support.patch
new file mode 100644
index 000..5edd4b3
--- /dev/null
+++ 
b/target/linux/ar71xx/patches-4.1/817-MIPS-ath79-add-powercloud-cr5000-support.patch
@@ -0,0 +1,219 @@
+--- a/arch/mips/ath79/Kconfig
 b/arch/mips/ath79/Kconfig
+@@ -886,6 +886,17 @@ config ATH79_MACH_CR3000
+   select ATH79_DEV_M25P80
+   select ATH79_DEV_WMAC
+ 
++config ATH79_MACH_CR5000
++  bool "PowerCloud Systems CR5000 support"
++  select SOC_AR934X
++  select ATH79_DEV_AP9X_PCI if PCI
++  select ATH79_DEV_ETH
++  select ATH79_DEV_GPIO_BUTTONS
++  select ATH79_DEV_LEDS_GPIO
++  select ATH79_DEV_M25P80
++  select ATH79_DEV_USB
++  select ATH79_DEV_WMAC
++
+ config ATH79_MACH_RW2458N
+   bool "Redwave RW2458N board support"
+   select SOC_AR724X
+--- a/arch/mips/ath79/Makefile
 b/arch/mips/ath79/Makefile
+@@ -61,6 +61,7 @@ obj-$(CONFIG_ATH79_MACH_CAP324)  += mach
+ obj-$(CONFIG_ATH79_MACH_CAP4200AG)+= mach-cap4200ag.o
+ obj-$(CONFIG_ATH79_MACH_CPE510)   += mach-cpe510.o
+ obj-$(CONFIG_ATH79_MACH_CR3000)   += mach-cr3000.o
++obj-$(CONFIG_ATH79_MACH_CR5000)   += mach-cr5000.o
+ obj-$(CONFIG_ATH79_MACH_DB120)+= mach-db120.o
+ obj-$(CONFIG_ATH79_MACH_DLAN_PRO_500_WP)  += mach-dlan-pro-500-wp.o
+ obj-$(CONFIG_ATH79_MACH_DLAN_PRO_1200_AC) += mach-dlan-pro-1200-ac.o
+--- /dev/null
 b/arch/mips/ath79/mach-cr5000.c
+@@ -0,0 +1,176 @@
++/*
++ * PowerCloud CR5000 support
++ *
++ * Copyright (c) 2011 Qualcomm Atheros
++ * Copyright (c) 2011-2012 Gabor Juhos 
++ * Copyright (c) 2012-2013 PowerCloud Systems
++ * Copyright (c) 2015 Daniel Dickinson 
++ *
++ * Permission to use, copy, modify, and/or distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ *
++ */
++
++#include 
++#include 
++#include 
++#include 
++#include 

[OpenWrt-Devel] [PATCH 8/9] ar71xx: PowerCloud CR5000 image generation

2015-09-02 Thread Daniel Dickinson
Image generation (and mtd parititioning) part of support for the
PowerCloud Systems CR5000.  The CR5000 is a dual-band 802.11n
wireless router with 8MB flash, 64MB RAM, (unused on stock firmware)
USB 2.0 port and five port gigabit ethernet switch.  The CR5000
was sold as hardware for the Skydog cloud-managed router service.

Signed-off-by: Daniel Dickinson 
---
 target/linux/ar71xx/generic/profiles/pcs.mk | 37 +
 target/linux/ar71xx/image/Makefile  |  4 
 2 files changed, 41 insertions(+)

diff --git a/target/linux/ar71xx/generic/profiles/pcs.mk 
b/target/linux/ar71xx/generic/profiles/pcs.mk
index ec712aa..e912d9d 100644
--- a/target/linux/ar71xx/generic/profiles/pcs.mk
+++ b/target/linux/ar71xx/generic/profiles/pcs.mk
@@ -108,3 +108,40 @@ endef
 
 $(eval $(call Profile,CR3000NOCLOUD))
 
+define Profile/CR5000
+   NAME:=PowerCloud CR5000 Cloud Router
+   PACKAGES:=uboot-envtools kmod-usb-core kmod-usb2 kmod-usb-ohci 
kmod-ledtrig-usbdev
+endef
+
+define Profile/CR5000/Description
+   Package set optimized for the PowerCloud Systems CR5000 Cloud Router
+
+   The CR5000 is a dual-band 802.11n wireless router with 8MB flash,
+   64MB RAM, (unused on stock firmware) USB 2.0 port and five port
+   gigabit ethernet switch.  The CR5000 was sold as hardware for
+   the Skydog cloud-managed router service.
+endef
+
+$(eval $(call Profile,CR5000))
+
+define Profile/CR5000NOCLOUD
+   NAME:=PowerCloud CR5000 Without Cloud
+   PACKAGES:=uboot-envtools kmod-usb-core kmod-usb2 kmod-usb-ohci 
kmod-ledtrig-usbdev
+endef
+
+define Profile/CR5000NOCLOUD/Description
+   Package set optimized for the PowerCloud Systems CR5000 Without Cloud
+
+   The CR5000 is a dual-band 802.11n wireless router with 8MB flash,
+   64MB RAM, (unused on stock firmware) USB 2.0 port and five port
+   gigabit ethernet switch.  The CR5000 was sold as hardware for
+   the Skydog cloud-managed router service.
+
+   WARNING: Will remove certificates used by cloud firmware
+   After flashing this firmware you will not be able to
+   return the device to cloud operation.
+The advantage is reclaiming flash used for the certificates.
+endef
+
+$(eval $(call Profile,CR5000NOCLOUD))
+
diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 5e1b432..bb21daf 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1204,6 +1204,8 @@ 
cap4200ag_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),320k(custom)ro,
 
cpe510_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(pation-table)ro,64k(product-info)ro,1536k(kernel),6144k(rootfs),192k(config)ro,64k(ART)ro,7680k@0x4(firmware)
 
cr3000_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),5696k(rootfs),640k(certs),64k(nvram),64k(art)ro,7104k@0x5(firmware)
 
cr3000nocloud_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),6400k(rootfs),64k(art)ro,7808k@0x5(firmware)
+cr5000_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),5760k(rootfs),640k(certs),64k(nvram),64k(art)ro,7104k@0x5(firmware)
+cr5000nocloud_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),6400k(rootfs),64k(art)ro,7808k@0x5(firmware)
 
eap300v2_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),320k(custom),13632k(firmware),2048k(failsafe),64k(art)ro
 
db120_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x5(firmware)
 
dgl_5500_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,15296k(firmware),192k(lang)ro,512k(my-dlink)ro,64k(mac)ro,64k(art)ro
@@ -2084,6 +2086,8 @@ $(eval $(call 
SingleProfile,AthLzma,64k,CAP324NOCLOUD,cap324nocloud,CAP324,ttyS0
 $(eval $(call 
SingleProfile,AthLzma,64k,CAP4200AG,cap4200ag,CAP4200AG,ttyS0,115200,$$(cap4200ag_mtdlayout),KRuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,CR3000,cr3000,CR3000,ttyS0,115200,$$(cr3000_mtdlayout),KRuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,CR3000NOCLOUD,cr3000nocloud,CR3000,ttyS0,115200,$$(cr3000nocloud_mtdlayout),KRuImage))
+$(eval $(call 
SingleProfile,AthLzma,64k,CR5000,cr5000,CR5000,ttyS0,115200,$$(cr5000_mtdlayout),KRuImage))
+$(eval $(call 
SingleProfile,AthLzma,64k,CR5000NOCLOUD,cr5000nocloud,CR5000,ttyS0,115200,$$(cr5000nocloud_mtdlayout),KRuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,DB120,db120,DB120,ttyS0,115200,$$(db120_mtdlayout),RKuImage))
 $(eval $(call 
SingleProfile,AthLzma,64k,DRAGINO2,dragino2,DRAGINO2,ttyATH0,115200,$$(dragino2_mtdlayout),KRuImage,65536))
 $(eval $(call 
SingleProfile,AthLzma,64k,EWDORINAP,ew-dorin,EW-DORIN,ttyATH0,115200,$$(ew-dorin_mtdlayout_4M),KRuImage,65536))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [LANTIQ] ARV7519RW22 dts fix

2015-09-02 Thread José Vázquez Fernández
>From a9d8a4d04c5564abb0440a3b67dd21e8645e2c43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20V=C3=A1zquez=20Fern=C3=A1ndez?=
 
Date: Tue, 1 Sep 2015 19:30:26 +0200
Subject: [OpenWrt-Devel] [PATCH] [LANTIQ] ARV7519RW22 dts fix

The ARV7519RW22 has only one flash chip.
This patch fixes a detection issue of the mtd partitions that cause the
kernel not to be able to find rootfs.

Signed off by: 
---
 target/linux/lantiq/dts/ARV7519RW22.dts |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/lantiq/dts/ARV7519RW22.dts
b/target/linux/lantiq/dts/ARV7519RW22.dts
index 6823753..10ce8c9 100644
--- a/target/linux/lantiq/dts/ARV7519RW22.dts
+++ b/target/linux/lantiq/dts/ARV7519RW22.dts
@@ -18,7 +18,7 @@
nor-boot@0 {
compatible = "lantiq,nor";
bank-width = <2>;
-   reg = <0 0x0 0x200>, <1 0x200 
0x200>;
+   reg = <0 0x0 0x200>;
#address-cells = <1>;
#size-cells = <1>;
 
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [LANTIQ] [CC] ARV7519RW22 dts fix

2015-09-02 Thread José Vázquez Fernández
>From d9de074b635e8d9442409922f867d1ed8dd36887 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20V=C3=A1zquez=20Fern=C3=A1ndez?=
 
Date: Wed, 2 Sep 2015 13:40:28 +0200
Subject: [OpenWrt-Devel] [PATCH] [LANTIQ] ARV7519RW22 dts fix

The ARV7519RW22 has only one flash chip.
This patch fixes a detection issue of the mtd partitions that cause the
kernel not to be able to find rootfs.

Signed off by: 
---
 target/linux/lantiq/dts/ARV7519RW22.dts |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/lantiq/dts/ARV7519RW22.dts
b/target/linux/lantiq/dts/ARV7519RW22.dts
index 6823753..10ce8c9 100644
--- a/target/linux/lantiq/dts/ARV7519RW22.dts
+++ b/target/linux/lantiq/dts/ARV7519RW22.dts
@@ -18,7 +18,7 @@
nor-boot@0 {
compatible = "lantiq,nor";
bank-width = <2>;
-   reg = <0 0x0 0x200>, <1 0x200 
0x200>;
+   reg = <0 0x0 0x200>;
#address-cells = <1>;
#size-cells = <1>;
 
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel