Re: [OpenWrt-Devel] [PATCH v2] include/kernel.mk - better search for ARCH

2015-11-02 Thread Alexey Brodkin
Hi Felix,

On Thu, 2015-07-30 at 14:12 +0300, Alexey Brodkin wrote:
> If "findstring" is used without leading and trailing spaces unexpected matches
> may happen. For example consider ARC=arc then "findstring $(ARCH)" will
> report a false match with "aarch64".
> 
> But "findstring $ARCH " (note trailing space) will correctly skip
> matches for both "aarch64" and "aarch64_be".
> 
> This patch is built-tested against NetGear WNDR3800.
> 
> Signed-off-by: Alexey Brodkin 
> Cc: Felix Fietkau 
> Cc: Jo-Philipp Wich 
> ---
> 
> In v2 removed unncecessary space before findstring.
> 
>  include/kernel.mk | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/kernel.mk b/include/kernel.mk
> index 7a0a170..6a613fe 100644
> --- a/include/kernel.mk
> +++ b/include/kernel.mk
> @@ -62,15 +62,15 @@ endif
>  
>  ifneq (,$(findstring uml,$(BOARD)))
>LINUX_KARCH=um
> -else ifneq (,$(findstring $(ARCH), aarch64 aarch64_be))
> +else ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be ))
>LINUX_KARCH := arm64
> -else ifneq (,$(findstring $(ARCH), armeb))
> +else ifneq (,$(findstring $(ARCH) , armeb ))
>LINUX_KARCH := arm
> -else ifneq (,$(findstring $(ARCH), mipsel mips64 mips64el))
> +else ifneq (,$(findstring $(ARCH) , mipsel mips64 mips64el ))
>LINUX_KARCH := mips
> -else ifneq (,$(findstring $(ARCH), sh2 sh3 sh4))
> +else ifneq (,$(findstring $(ARCH) , sh2 sh3 sh4 ))
>LINUX_KARCH := sh
> -else ifneq (,$(findstring $(ARCH), i386 x86_64))
> +else ifneq (,$(findstring $(ARCH) , i386 x86_64 ))
>LINUX_KARCH := x86
>  else
>LINUX_KARCH := $(ARCH)

I'm wondering if there're any comments on this one.
Otherwise please consider applying.

This patch is a prerequisite for ARC port submission I'm going to send out
shortly.

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


[OpenWrt-Devel] [PATCH 0/2 v2] OpenWRT port for Designware ARC cores

2015-11-02 Thread Alexey Brodkin
This series introduces support of DesignWare ARC cores in OpenWRT.
In particular it adds support of 2 boards (nSIM and ARc SDP) based on
ARC770D SoC.

Alexey Brodkin (2):
  toolchain: add support of ARC architecture
  linux: add support of Synopsys ARC770-based boards

 include/kernel.mk  |   2 +
 include/site/arc   |  30 +++
 include/target.mk  |   4 +
 target/Config.in   |   9 +
 target/linux/arc770/Makefile   |  26 +++
 target/linux/arc770/base-files.mk  |   3 +
 target/linux/arc770/base-files/etc/config/network  |  18 ++
 target/linux/arc770/base-files/etc/inittab |   4 +
 .../arc770/base-files/etc/uci-defaults/02_network  |  22 ++
 target/linux/arc770/base-files/lib/arc.sh  |  73 ++
 .../base-files/lib/preinit/01_preinit_arc.sh   |  10 +
 target/linux/arc770/config-4.3 | 142 
 target/linux/arc770/dts/axc001.dtsi| 100 
 target/linux/arc770/dts/axs101.dts |  21 ++
 target/linux/arc770/dts/axs10x_mb.dtsi | 224 ++
 target/linux/arc770/dts/nsim_700.dts   |  70 ++
 target/linux/arc770/dts/skeleton.dtsi  |  37 +++
 target/linux/arc770/generic/profiles/00-default.mk |  16 ++
 target/linux/arc770/generic/profiles/01-minimal.mk |  15 ++
 target/linux/arc770/generic/profiles/02-axs101.mk  |  17 ++
 .../linux/arc770/generic/profiles/03-nsim_700.mk   |  16 ++
 target/linux/arc770/generic/target.mk  |   8 +
 target/linux/arc770/image/Makefile |  42 
 ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch |  36 +++
 .../0002-openwrt-arc-add-OWRTDTB-section.patch |  91 
 toolchain/Config.in|  10 +-
 toolchain/binutils/Config.in   |  23 +-
 toolchain/binutils/Config.version  |  17 ++
 toolchain/binutils/Makefile|  29 ++-
 toolchain/gcc/Config.in|   9 +
 toolchain/gcc/Config.version   |   9 +-
 toolchain/gcc/common.mk|  31 ++-
 .../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.8/arc   |  11 +
 55 files changed, 1932 insertions(+), 33 deletions(-)
 create mode 100644 include/site/arc
 create mode 100644 target/linux/arc770/Makefile
 create mode 100644 target/linux/arc770/base-files.mk
 create mode 100644 target/linux/arc770/base-files/etc/config/network
 create mode 100644 target/linux/arc770/base-files/etc/inittab
 create mode 100644 target/linux/arc770/base-files/etc/uci-defaults/02_network
 create mode 100644 target/linux/arc770/base-files/lib/arc.sh
 create mode 100644 target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh
 create mode 100644 target/linux/arc770/config-4.3
 create mode 100644 target/linux/arc770/dts/axc001.dtsi
 create mode 100644 target/linux/arc770/dts/axs101.dts
 create mode 100644 target/linux/arc770/dts/axs10x_mb.dtsi
 create mode 100644 target/linux/arc770/dts/nsim_700.dts
 create mode 100644 target/linux/arc770/dts/skeleton.dtsi
 create mode 100644 target/linux/arc770/generic/profiles/00-default.mk
 create mode 100644 target/linux/arc770/generic/profiles/01-minimal.mk
 create mode 100644 target/linux/arc770/generic/profiles/02-axs101.mk
 create mode 100644 target/linux/arc770/generic/profiles/03-nsim_700.mk
 create mode 100644 target/linux/arc770/generic/target.mk
 create mode 100644 target/linux/arc770/image/Makefile
 create mode 

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

2015-11-02 Thread Felix Fietkau
On 2015-11-02 19:05, 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/539068/ which bumps uClibc-ng version
>  from 1.0.6 to 1.0.8
>  [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 
This patch will have to be rebased, since I just made some changes to
get rid of the old uClibc version. I also removed version configuration,
and the version suffix of the config directory.

- Felix
___
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 v2] toolchain: add support of ARC architecture

2015-11-02 Thread Alexey Brodkin
Hi Felix,

On Mon, 2015-11-02 at 19:15 +0100, Felix Fietkau wrote:
> On 2015-11-02 19:05, 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/539068/ which bumps uClibc-ng version
> >  from 1.0.6 to 1.0.8
> >  [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 
> This patch will have to be rebased, since I just made some changes to
> get rid of the old uClibc version. I also removed version configuration,
> and the version suffix of the config directory.

Thanks for letting me know.
I'll do this shortly.

In the meantime would be good if people comments on this v2 series so I may do 
required
changes in v3 as well.

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


[OpenWrt-Devel] [PATCH 1/2 v2] toolchain: add support of ARC architecture

2015-11-02 Thread Alexey Brodkin
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/539068/ which bumps uClibc-ng version
 from 1.0.6 to 1.0.8
 [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 
---

Changes compared to v1:
 * Binutils Kconfig description is now similar to Gcc and uClibc.
   This allows selection of different versions of binutils.

 * CONFIG_BINUTILS_VERSION_2_23_ARC is used for deciding if we need to
   obtain ARC's binutils.

 * Rebased on current master

 include/site/arc   |  30 +++
 include/target.mk  |   4 +
 toolchain/Config.in|  10 +-
 toolchain/binutils/Config.in   |  23 +-
 toolchain/binutils/Config.version  |  17 ++
 toolchain/binutils/Makefile|  29 ++-
 toolchain/gcc/Config.in|   9 +
 toolchain/gcc/Config.version   |   9 +-
 toolchain/gcc/common.mk|  31 ++-
 .../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.8/arc   |  11 +
 32 files changed, 930 insertions(+), 33 deletions(-)
 create mode 100644 include/site/arc
 create mode 100644 toolchain/binutils/Config.version
 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 

Re: [OpenWrt-Devel] [PATCH] update config.guess & config.sub

2015-11-02 Thread Alexey Brodkin
Hi Felix,

On Thu, 2015-07-30 at 11:43 +0300, Alexey Brodkin wrote:
> These are from today's master branch of:
> http://git.savannah.gnu.org/gitweb/?p=config.git;a=tree
> 
> In particular it adds support for ARC architecture plus some more
> improvements and fixes.
> 
> This patch is built-tested against NetGear WNDR3800.
> 
> Signed-off-by: Alexey Brodkin 
> Cc: Florian Fainelli 
> Cc: Imre Kaloz 
> ---
>  scripts/config.guess | 378 
> +++
>  scripts/config.sub   | 150 
>  2 files changed, 238 insertions(+), 290 deletions(-)

I'm wondering if there're any comments on this one.
Otherwise please consider applying.

This patch is a prerequisite for ARC port submission I'm going to send out
shortly.

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


[OpenWrt-Devel] [PATCH 2/2 v2] linux: add support of Synopsys ARC770-based boards

2015-11-02 Thread Alexey Brodkin
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/

Prerequisites are:
 [1] http://patchwork.ozlabs.org/patch/502081/ which allows proper
 selection of ARC architecture for building Linux kernel.

Cc: Felix Fietkau 
Cc: Jo-Philipp Wich 
Signed-off-by: Alexey Brodkin 
---

Changes compared to v1:
 * Switched to SoC-centered design. Now instead of common ARC700
   support we claim support of boards based on ARC770D.
   This allows to use the same one build of kernel binary for both
   boards.

 * Implemented run-time scripts that parse Device Tree compatible
   tag and according to it do configuration of serial port and network.

 * Implemented ability to patch in built Linux kernel external .dtb

 * Linux kernel switched from 4.1 to 4.3

 * Rebased on current master

 include/kernel.mk  |   2 +
 target/Config.in   |   9 +
 target/linux/arc770/Makefile   |  26 +++
 target/linux/arc770/base-files.mk  |   3 +
 target/linux/arc770/base-files/etc/config/network  |  18 ++
 target/linux/arc770/base-files/etc/inittab |   4 +
 .../arc770/base-files/etc/uci-defaults/02_network  |  22 ++
 target/linux/arc770/base-files/lib/arc.sh  |  73 +++
 .../base-files/lib/preinit/01_preinit_arc.sh   |  10 +
 target/linux/arc770/config-4.3 | 142 +
 target/linux/arc770/dts/axc001.dtsi| 100 +
 target/linux/arc770/dts/axs101.dts |  21 ++
 target/linux/arc770/dts/axs10x_mb.dtsi | 224 +
 target/linux/arc770/dts/nsim_700.dts   |  70 +++
 target/linux/arc770/dts/skeleton.dtsi  |  37 
 target/linux/arc770/generic/profiles/00-default.mk |  16 ++
 target/linux/arc770/generic/profiles/01-minimal.mk |  15 ++
 target/linux/arc770/generic/profiles/02-axs101.mk  |  17 ++
 .../linux/arc770/generic/profiles/03-nsim_700.mk   |  16 ++
 target/linux/arc770/generic/target.mk  |   8 +
 target/linux/arc770/image/Makefile |  42 
 ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch |  36 
 .../0002-openwrt-arc-add-OWRTDTB-section.patch |  91 +
 23 files changed, 1002 insertions(+)
 create mode 100644 target/linux/arc770/Makefile
 create mode 100644 target/linux/arc770/base-files.mk
 create mode 100644 target/linux/arc770/base-files/etc/config/network
 create mode 100644 target/linux/arc770/base-files/etc/inittab
 create mode 100644 target/linux/arc770/base-files/etc/uci-defaults/02_network
 create mode 100644 target/linux/arc770/base-files/lib/arc.sh
 create mode 100644 target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh
 create mode 100644 target/linux/arc770/config-4.3
 create mode 100644 target/linux/arc770/dts/axc001.dtsi
 create mode 100644 target/linux/arc770/dts/axs101.dts
 create mode 100644 target/linux/arc770/dts/axs10x_mb.dtsi
 create mode 100644 target/linux/arc770/dts/nsim_700.dts
 create mode 100644 target/linux/arc770/dts/skeleton.dtsi
 create mode 100644 target/linux/arc770/generic/profiles/00-default.mk
 create mode 100644 target/linux/arc770/generic/profiles/01-minimal.mk
 create mode 100644 target/linux/arc770/generic/profiles/02-axs101.mk
 create mode 100644 target/linux/arc770/generic/profiles/03-nsim_700.mk
 create mode 100644 target/linux/arc770/generic/target.mk
 create mode 100644 target/linux/arc770/image/Makefile
 create mode 100644 
target/linux/arc770/patches-4.3/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch
 create mode 100644 
target/linux/arc770/patches-4.3/0002-openwrt-arc-add-OWRTDTB-section.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 

Re: [OpenWrt-Devel] [PATCH 2/2 v3] linux: add support of Synopsys ARC770-based boards

2015-11-02 Thread Felix Fietkau
On 2015-11-03 00:27, 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.
> 
> Cc: Felix Fietkau 
> Cc: Jo-Philipp Wich 
> Signed-off-by: Alexey Brodkin 
> ---
> 
> Changes compared to v2:
>  * Fixed copyright dates
>  * Cleaned-up init scripts
> 
> Changes compared to v1:
>  * Switched to SoC-centered design. Now instead of common ARC700
>support we claim support of boards based on ARC770D.
>This allows to use the same one build of kernel binary for both
>boards.
> 
>  * Implemented run-time scripts that parse Device Tree compatible
>tag and according to it do configuration of serial port and network.
> 
>  * Implemented ability to patch in built Linux kernel external .dtb
> 
>  * Linux kernel switched from 4.1 to 4.3
> 
>  * Rebased on current master
> 
>  include/kernel.mk  |   2 +
>  target/Config.in   |   9 +
>  target/linux/arc770/Makefile   |  26 +++
>  target/linux/arc770/base-files/etc/inittab |   4 +
>  .../arc770/base-files/etc/uci-defaults/02_network  |  23 +++
>  target/linux/arc770/base-files/lib/arc.sh  |  76 +++
>  .../base-files/lib/preinit/01_preinit_arc.sh   |  10 +
>  target/linux/arc770/config-4.3 | 142 +
>  target/linux/arc770/dts/axc001.dtsi| 100 +
>  target/linux/arc770/dts/axs101.dts |  21 ++
>  target/linux/arc770/dts/axs10x_mb.dtsi | 224 
> +
>  target/linux/arc770/dts/nsim_700.dts   |  70 +++
>  target/linux/arc770/dts/skeleton.dtsi  |  37 
>  target/linux/arc770/generic/profiles/00-default.mk |  16 ++
>  target/linux/arc770/generic/profiles/01-minimal.mk |  15 ++
>  target/linux/arc770/generic/profiles/02-axs101.mk  |  17 ++
>  .../linux/arc770/generic/profiles/03-nsim_700.mk   |  16 ++
>  target/linux/arc770/generic/target.mk  |   8 +
>  target/linux/arc770/image/Makefile |  42 
>  ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch |  36 
>  .../0002-openwrt-arc-add-OWRTDTB-section.patch |  91 +
>  21 files changed, 985 insertions(+)
>  create mode 100644 target/linux/arc770/Makefile
>  create mode 100644 target/linux/arc770/base-files/etc/inittab
>  create mode 100644 target/linux/arc770/base-files/etc/uci-defaults/02_network
>  create mode 100644 target/linux/arc770/base-files/lib/arc.sh
>  create mode 100644 
> target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh
>  create mode 100644 target/linux/arc770/config-4.3
>  create mode 100644 target/linux/arc770/dts/axc001.dtsi
>  create mode 100644 target/linux/arc770/dts/axs101.dts
>  create mode 100644 target/linux/arc770/dts/axs10x_mb.dtsi
>  create mode 100644 target/linux/arc770/dts/nsim_700.dts
>  create mode 100644 target/linux/arc770/dts/skeleton.dtsi
>  create mode 100644 target/linux/arc770/generic/profiles/00-default.mk
>  create mode 100644 target/linux/arc770/generic/profiles/01-minimal.mk
>  create mode 100644 target/linux/arc770/generic/profiles/02-axs101.mk
>  create mode 100644 target/linux/arc770/generic/profiles/03-nsim_700.mk
>  create mode 100644 target/linux/arc770/generic/target.mk
>  create mode 100644 target/linux/arc770/image/Makefile
>  create mode 100644 
> target/linux/arc770/patches-4.3/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch
>  create mode 100644 
> target/linux/arc770/patches-4.3/0002-openwrt-arc-add-OWRTDTB-section.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 

[OpenWrt-Devel] [PATCH 2/2] ar71xx: Add support for ZyXEL NBG6616.

2015-11-02 Thread Benjamin Berg
Signed-off-by: Benjamin Berg 
---
 target/linux/ar71xx/base-files/etc/diag.sh |   5 +-
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |   2 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds |  17 ++-
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-nbg6716.c| 141 ++---
 target/linux/ar71xx/generic/profiles/zyxel.mk  |  12 ++
 target/linux/ar71xx/image/Makefile |  34 +
 .../700-MIPS-ath79-openwrt-machines.patch  |   5 +-
 10 files changed, 195 insertions(+), 26 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 1375f38..2f489d8 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -173,8 +173,11 @@ get_status_led() {
nbg460n_550n_550nh)
status_led="nbg460n:green:power"
;;
+   nbg6616)
+   status_led="nbg6616:green:power"
+   ;;
nbg6716)
-   status_led="zyxel:white:power"
+   status_led="nbg6716:white:power"
;;
om2p | \
om2pv2 | \
diff --git 
a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index f53c853..74c3417 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -84,8 +84,10 @@ case "$FIRMWARE" in
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth1/address) -2)
;;
+   nbg6616 | \
nbg6716)
ath10kcal_extract "RFdata" 20480 2116
+   ath10kcal_patch_mac $(macaddr_add $(cat 
/sys/class/net/eth1/address) -2)
;;
rb-911g-5hpacd)
ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 
20480 2116
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 abed456..b269181 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -306,12 +306,19 @@ nbg460n_550n_550nh)
ucidef_set_led_wlan "wlan" "WLAN" "nbg460n:green:wlan" "phy0tpt"
;;
 
+nbg6616)
+   ucidef_set_led_wlan "wlan" "WLAN" "nbg6616:green:wifi2g" "phy1tpt"
+   ucidef_set_led_wlan "wlan5" "WLAN5" "nbg6616:green:wifi5g" "phy0tpt"
+   ucidef_set_led_usbdev "usb1" "USB1" "nbg6616:green:usb1" "1-1"
+   ucidef_set_led_usbdev "usb2" "USB2" "nbg6616:green:usb2" "2-1"
+   ;;
+
 nbg6716)
-   ucidef_set_led_netdev "wan" "WAN" "zyxel:white:internet" "eth1"
-   ucidef_set_led_wlan "wlan" "WLAN" "zyxel:white:wifi2g" "phy1tpt"
-   ucidef_set_led_wlan "wlan5" "WLAN5" "zyxel:white:wifi5g" "phy0tpt"
-   ucidef_set_led_usbdev "usb1" "USB1" "zyxel:white:usb1" "2-1"
-   ucidef_set_led_usbdev "usb2" "USB2" "zyxel:white:usb2" "1-1"
+   ucidef_set_led_netdev "wan" "WAN" "nbg6716:white:internet" "eth1"
+   ucidef_set_led_wlan "wlan" "WLAN" "nbg6716:white:wifi2g" "phy1tpt"
+   ucidef_set_led_wlan "wlan5" "WLAN5" "nbg6716:white:wifi5g" "phy0tpt"
+   ucidef_set_led_usbdev "usb1" "USB1" "nbg6716:white:usb1" "1-1"
+   ucidef_set_led_usbdev "usb2" "USB2" "nbg6716:white:usb2" "2-1"
;;
 
 om2p | \
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 f6ac891..5e93835 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -134,6 +134,7 @@ nbg460n_550n_550nh)
ucidef_add_switch_vlan "switch0" "0" "0 1 2 3 5"
;;
 
+nbg6616 |\
 nbg6716)
ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
ucidef_add_switch "switch0" "1" "1"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 5f02e4e..2fdc538 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -565,6 +565,9 @@ ar71xx_board_detect() {
*"NBG460N/550N/550NH")
name="nbg460n_550n_550nh"
;;
+   *"Zyxel NBG6616")
+   name="nbg6616"
+   ;;
*"Zyxel NBG6716")
name="nbg6716"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index a464fee..ae498b9 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ 

Re: [OpenWrt-Devel] [PATCH 1/2] include/image.mk: Introduce option to wrap kernel into JFFS2

2015-11-02 Thread Felix Fietkau
On 2015-11-02 20:33, Benjamin Berg wrote:
> Some devices like the NBG6616 and NBG6617 expect the kernel to be
> in a JFFS2 partition. This macro allows wrapping the kernel so that
> a normal squashfs+jffs partition can be used for the rest of the
> firmware.
Does that board run u-boot? If it does, you may want to use the padjffs2
utility to force it to stop scanning after the end of the filesystem image.

In case the boot loader scans the whole filesystem, this will also
prevent it from parsing data from OpenWrt's jffs2 overlay.

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


[OpenWrt-Devel] [PATCH] tools/mpc: update to 1.0.3

2015-11-02 Thread Hannu Nyman
Update mpc version to 1.0.3.
Change download location to @GNU.

Signed-off-by: Hannu Nyman 
---
 tools/mpc/Makefile | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/mpc/Makefile b/tools/mpc/Makefile
index 27b6fbe..f0bf8f4 100644
--- a/tools/mpc/Makefile
+++ b/tools/mpc/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009-2014 OpenWrt.org
+# Copyright (C) 2009-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,11 +7,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpc
-PKG_VERSION:=1.0.2
+PKG_VERSION:=1.0.3
 
-PKG_SOURCE_URL:=http://www.multiprecision.org/mpc/download/
+PKG_SOURCE_URL:=@GNU/mpc/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=68fadff3358fb3e7976c7a398a0af4c3
+PKG_MD5SUM:=d6a1d5f8ddea3abd2cc3e98f58352d26
 
 HOST_BUILD_PARALLEL:=1
 
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] include/image.mk: Introduce option to wrap kernel into JFFS2

2015-11-02 Thread Benjamin Berg
Some devices like the NBG6616 and NBG6617 expect the kernel to be
in a JFFS2 partition. This macro allows wrapping the kernel so that
a normal squashfs+jffs partition can be used for the rest of the
firmware.

Signed-off-by: Benjamin Berg 
---
 include/image.mk | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/include/image.mk b/include/image.mk
index 43980bc..8a23800 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -347,6 +347,21 @@ define Build/gzip
@mv $@.new $@
 endef
 
+define Build/jffs2
+   mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(1))
+   cp $@ $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$(1)
+
+   $(STAGING_DIR_HOST)/bin/mkfs.jffs2 --pad=$$(($(subst k,* 1024,$(subst 
m, * 1024k,$(KERNEL_SIZE) \
+   $(if $(CONFIG_BIG_ENDIAN),--big-endian,--little-endian) \
+   --squash-uids -v -e $(patsubst %k,%KiB,$(BLOCKSIZE)) \
+   -o $@.new \
+   -d $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 \
+   2>&1 1>/dev/null | awk '/^.+/'
+
+   @rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/
+   @mv $@.new $@
+endef
+
 define Build/kernel-bin
rm -f $@
cp $^ $@
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] ZyXEL NBG6616 and jffs2 kernel partition support

2015-11-02 Thread Benjamin Berg
Hi,

wasn't aware of the ongoing work to build the images in parallel, so here
another respin of the patch.

There is now a patch which first adds support to build a JFFS2 partition
just for the kernel. The second patch is the same as before modified to
use the new parallel image build system.

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


[OpenWrt-Devel] [PATCH] toolsbison: update to 3.0.4

2015-11-02 Thread Hannu Nyman
Update bison to 3.0.4.
Refresh patches.
Drop the unnecessary PKG_CAT definition.

Signed-off-by: Hannu Nyman 
---

Bison changelog:
http://git.savannah.gnu.org/cgit/bison.git/tree/NEWS?id=c4e686a1abd817b4d4da5bdd5b3a5540566fd4a0


 tools/bison/Makefile   | 7 +++
 tools/bison/patches/100-fix-gets-removal.patch | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/tools/bison/Makefile b/tools/bison/Makefile
index 2565121..b8ad32c 100644
--- a/tools/bison/Makefile
+++ b/tools/bison/Makefile
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2008-2013 OpenWrt.org
+# Copyright (C) 2008-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,12 +7,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bison
-PKG_VERSION:=3.0.2
+PKG_VERSION:=3.0.4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_MD5SUM:=146be9ff9fbd27497f0bf2286a5a2082
-PKG_CAT:=xzcat
+PKG_MD5SUM:=c342201de104cc9ce0a21e0ad10d4021
 
 HOST_BUILD_PARALLEL:=1
 
diff --git a/tools/bison/patches/100-fix-gets-removal.patch 
b/tools/bison/patches/100-fix-gets-removal.patch
index b9c878a..20b18cf 100644
--- a/tools/bison/patches/100-fix-gets-removal.patch
+++ b/tools/bison/patches/100-fix-gets-removal.patch
@@ -1,6 +1,6 @@
 --- a/lib/stdio.in.h
 +++ b/lib/stdio.in.h
-@@ -714,13 +714,6 @@
+@@ -719,13 +719,6 @@
  # endif
  #endif
  
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] tools/mpfr: update to 3.1.3

2015-11-02 Thread Hannu Nyman
Update mpfr to version 3.1.3.
Refresh patches.

Signed-off-by: Hannu Nyman 
---

 tools/mpfr/Makefile   |  6 +++---
 tools/mpfr/patches/001-only_src.patch | 10 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tools/mpfr/Makefile b/tools/mpfr/Makefile
index 6f0ab6e..16624a7 100644
--- a/tools/mpfr/Makefile
+++ b/tools/mpfr/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009-2013 OpenWrt.org
+# Copyright (C) 2009-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mpfr
-PKG_VERSION:=3.1.2
+PKG_VERSION:=3.1.3
 
 PKG_SOURCE_URL:=http://www.mpfr.org/mpfr-$(PKG_VERSION) \
@GNU/mpfr
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_MD5SUM:=ee2c3ac63bf0c2359bf08fc3ee094c19
+PKG_MD5SUM:=5fdfa3cfa5c86514ee4a241a1affa138
 
 HOST_BUILD_PARALLEL:=1
 HOST_FIXUP:=autoreconf
diff --git a/tools/mpfr/patches/001-only_src.patch 
b/tools/mpfr/patches/001-only_src.patch
index 51a75b4..4a07cb9 100644
--- a/tools/mpfr/patches/001-only_src.patch
+++ b/tools/mpfr/patches/001-only_src.patch
@@ -1,7 +1,7 @@
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -12,7 +12,7 @@
- AUTOMAKE_OPTIONS = gnu
+@@ -18,7 +18,7 @@
+ # old Automake version.
  ACLOCAL_AMFLAGS = -I m4
  
 -SUBDIRS = doc src tests tune
@@ -11,9 +11,9 @@
examples/ReadMe examples/divworst.c examples/rndo-add.c examples/sample.c \
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -295,7 +295,7 @@ top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- AUTOMAKE_OPTIONS = gnu
+@@ -377,7 +377,7 @@ top_builddir = @top_builddir@
+ # libtoolize and in case some developer needs to switch back to an
+ # old Automake version.
  ACLOCAL_AMFLAGS = -I m4
 -SUBDIRS = doc src tests tune
 +SUBDIRS = src
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] update config.guess & config.sub

2015-11-02 Thread Florian Fainelli
On 02/11/15 11:01, Kathy Giori wrote:
> On Mon, Nov 2, 2015 at 9:40 AM, Alexey Brodkin
>  wrote:
>> Hi Felix,
>>
>> On Thu, 2015-07-30 at 11:43 +0300, Alexey Brodkin wrote:
>>> These are from today's master branch of:
>>> http://git.savannah.gnu.org/gitweb/?p=config.git;a=tree
>>>
>>> In particular it adds support for ARC architecture plus some more
>>> improvements and fixes.
>>>
>>> This patch is built-tested against NetGear WNDR3800.
>>>
>>> Signed-off-by: Alexey Brodkin 
>>> Cc: Florian Fainelli 
>>> Cc: Imre Kaloz 
>>> ---
>>>  scripts/config.guess | 378 
>>> +++
>>>  scripts/config.sub   | 150 
>>>  2 files changed, 238 insertions(+), 290 deletions(-)
>>
>> I'm wondering if there're any comments on this one.
>> Otherwise please consider applying.
>>
>> This patch is a prerequisite for ARC port submission I'm going to send out
>> shortly.
> 
> Alexey,
> 
> Is there a particular reason that this architecture must be submitted
> to OpenWrt under the terms GPL v3+? I would prefer that OpenWrt stick
> to GPL v2 in order to maintain better compatibility with the Linux
> kernel (kernel.org). The kernel is primarily GPL v2 licensed (or
> something FreeBSD-like which is more, not less, permissive). The
> OpenWrt distro has only a few GPL v3 package exceptions, such as
> samba.

This is a quick jump to invalid conclusions, the changes that Alexey is
submitting are to files under scripts/* which are only used during the
build process in this case, and there are no GPLv3 components being
included in the firmware image per-se.

These specific files are used by autotools and friends to detect the
architecture/machine we cross-compile for, and as such as a prerequisite
for supporting an ARC toolchain.

As such, the changes are completely fine, and have no bearing to the
resulting firmware image.

> 
> The OpenWrt core team are doing a good job building a better
> industry-community relationship for OpenWrt, which I think can be a
> win-win for overall project improvement (brings in more developer
> resources, much like kernel development depends on industry
> developers). Introducing more GPL v3 packages makes it problematic for
> certain industry partners to be able to fully collaborate.

Although I do share the same feeling, I think the justification is way
off, GPLv3 does not prevent anybody from contributing, it may just hurt
your distribution model, which is something entirely different.
--
Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] update config.guess & config.sub

2015-11-02 Thread Kathy Giori
On Mon, Nov 2, 2015 at 9:40 AM, Alexey Brodkin
 wrote:
> Hi Felix,
>
> On Thu, 2015-07-30 at 11:43 +0300, Alexey Brodkin wrote:
>> These are from today's master branch of:
>> http://git.savannah.gnu.org/gitweb/?p=config.git;a=tree
>>
>> In particular it adds support for ARC architecture plus some more
>> improvements and fixes.
>>
>> This patch is built-tested against NetGear WNDR3800.
>>
>> Signed-off-by: Alexey Brodkin 
>> Cc: Florian Fainelli 
>> Cc: Imre Kaloz 
>> ---
>>  scripts/config.guess | 378 
>> +++
>>  scripts/config.sub   | 150 
>>  2 files changed, 238 insertions(+), 290 deletions(-)
>
> I'm wondering if there're any comments on this one.
> Otherwise please consider applying.
>
> This patch is a prerequisite for ARC port submission I'm going to send out
> shortly.

Alexey,

Is there a particular reason that this architecture must be submitted
to OpenWrt under the terms GPL v3+? I would prefer that OpenWrt stick
to GPL v2 in order to maintain better compatibility with the Linux
kernel (kernel.org). The kernel is primarily GPL v2 licensed (or
something FreeBSD-like which is more, not less, permissive). The
OpenWrt distro has only a few GPL v3 package exceptions, such as
samba.

The OpenWrt core team are doing a good job building a better
industry-community relationship for OpenWrt, which I think can be a
win-win for overall project improvement (brings in more developer
resources, much like kernel development depends on industry
developers). Introducing more GPL v3 packages makes it problematic for
certain industry partners to be able to fully collaborate.

kathy
___
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 v3] toolchain: add support of ARC architecture

2015-11-02 Thread Felix Fietkau
On 2015-11-03 00:27, 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
> 
> Cc: Felix Fietkau 
> Cc: John Crispin 
> Signed-off-by: Alexey Brodkin 
> --- a/toolchain/binutils/Makefile
> +++ b/toolchain/binutils/Makefile
]> @@ -17,13 +24,15 @@ ifeq ($(findstring linaro,
$(CONFIG_BINUTILS_VERSION)),linaro)
>PKG_MD5SUM:=8f9b2b2e049d59b1b86ce9657802a353
>BINUTILS_DIR:=$(PKG_NAME)-linaro-$(PKG_REV)
>HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(BINUTILS_DIR)
> -else
> -  PKG_SOURCE_URL:=@GNU/binutils/
> -  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
> +endif
>  
> -  ifeq ($(PKG_VERSION),2.25.1)
> -PKG_MD5SUM:=ac493a78de4fee895961d025b7905be4
> -  endif
> +ifneq ($(CONFIG_BINUTILS_VERSION_2_23_ARC),)
> + 
> PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2015.06/
> + PKG_REV:=2015.06
> + PKG_SOURCE:=$(PKG_NAME)-arc-$(PKG_REV).tar.gz
> + PKG_MD5SUM:=961a3564de857238c255c381f8e4360b
> + BINUTILS_DIR:=$(PKG_NAME)-gdb-arc-$(PKG_REV)
> + HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(BINUTILS_DIR)
>  endif
This part is broken, it needs to be indented with spaces instead of tabs.

> diff --git a/toolchain/uClibc/Config.version b/toolchain/uClibc/Config.version
> index 7804da4..23270dd 100644
> --- a/toolchain/uClibc/Config.version
> +++ b/toolchain/uClibc/Config.version
> @@ -4,6 +4,7 @@ config UCLIBC_VERSION
>   default "1.0.8"
>  
>  config UCLIBC_VERSION_NG
> + default y if !TOOLCHAINOPTS && USE_UCLIBC && arc
>   bool
>   depends on USE_UCLIBC
>   default y
Please drop this change, it is unnecessary.

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


Re: [OpenWrt-Devel] [PATCH] Wallys DR-344 support

2015-11-02 Thread John Crispin
Hi,

On 29/10/2015 12:55, Philippe DUCHEIN wrote:
> This patch is for Wallys DR344 support under OpenWRT
> need ar8035-a patch for gigabit ethernet : [OpenWrt-Devel] [PATCH] Atheros 
> AR8035-A support
> 

i cannot see the phy patch in the patchwork list. also this patch should
have a prefix of ar71xx: in the subject.

please fix and resend both patches together

John


> Signed-off-by: Philippe DUCHEIN 
> 
> —
> 
> diff -Nru a/target/linux/ar71xx/base-files/etc/diag.sh 
> b/target/linux/ar71xx/base-files/etc/diag.sh
> --- a/target/linux/ar71xx/base-files/etc/diag.sh  2015-10-27 
> 18:57:41.368735097 +0100
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh  2015-10-29 
> 12:05:58.995324966 +0100
> @@ -92,6 +92,9 @@
>   dlan-pro-1200-ac)
>   status_led="devolo:status:wlan"
>   ;;
> + dr344)
> + status_led="dr344:green:status"
> + ;;
>   dragino2)
>   status_led="dragino2:red:system"
>   ;;
> diff -Nru a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
> b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network  
> 2015-10-27 18:57:41.363735040 +0100
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network  
> 2015-10-29 12:05:58.995324966 +0100
> @@ -17,6 +17,7 @@
>  case "$board" in
>  all0315n |\
>  all0258n |\
> +dr344 |\
>  ja76pf2|\
>  rocket-m-ti |\
>  ubnt-unifi-outdoor)
> diff -Nru a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh2015-10-27 
> 18:57:41.341734786 +0100
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh2015-10-29 
> 12:05:58.996324978 +0100
> @@ -456,6 +456,9 @@
>   *"dLAN pro 1200+ WiFi ac")
>   name="dlan-pro-1200-ac"
>   ;;
> + *DR344)
> + name="dr344"
> + ;;
>   *"Dragino v2")
>   name="dragino2"
>   ;;
> diff -Nru a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh  2015-10-27 
> 18:57:41.329734649 +0100
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh  2015-10-29 
> 12:06:23.597611781 +0100
> @@ -183,6 +183,7 @@
>   ap96 | \
>   bxu2000n-2-a1 | \
>   db120 | \
> + dr344 | \
>   f9k1115v2 |\
>   hornet-ub | \
>   mr12 | \
> diff -Nru a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
> --- a/target/linux/ar71xx/config-4.1  2015-10-27 18:57:41.379735223 +0100
> +++ b/target/linux/ar71xx/config-4.1  2015-10-29 12:05:58.996324978 +0100
> @@ -64,6 +64,7 @@
>  CONFIG_ATH79_MACH_DIR_825_C1=y
>  CONFIG_ATH79_MACH_DLAN_PRO_1200_AC=y
>  CONFIG_ATH79_MACH_DLAN_PRO_500_WP=y
> +CONFIG_ATH79_MACH_DR344=y
>  CONFIG_ATH79_MACH_DRAGINO2=y
>  CONFIG_ATH79_MACH_EAP300V2=y
>  CONFIG_ATH79_MACH_EAP7660D=y
> diff -Nru a/target/linux/ar71xx/files/arch/mips/ath79/mach-dr344.c 
> b/target/linux/ar71xx/files/arch/mips/ath79/mach-dr344.c
> --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dr344.c  1970-01-01 
> 01:00:00.0 +0100
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dr344.c  2015-10-29 
> 12:05:58.996324978 +0100
> @@ -0,0 +1,160 @@
> +/*
> + * Wallys DR344 board support
> + *
> + * Copyright (c) 2011 Qualcomm Atheros
> + * Copyright (c) 2011-2012 Gabor Juhos 
> + * Copyright (c) 2015 Philippe DUCHEIN 
> + *
> + * 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 "common.h"
> +#include "pci.h"
> +#include "dev-ap9x-pci.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-eth.h"
> +#include "dev-usb.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +#include "dev-spi.h"
> +#include "dev-wmac.h"
> +#include "machtypes.h"
> +
> +#define DR344_GPIO_LED_SIG1  15
> +#define DR344_GPIO_LED_SIG2  20
> +#define DR344_GPIO_LED_SIG3  21
> +#define DR344_GPIO_LED_SIG4  22
> +#define DR344_GPIO_EXTERNAL_LNA0 18
> +#define 

[OpenWrt-Devel] [PATCH] uclibc-ng: bump version from 1.0.6 to 1.0.8

2015-11-02 Thread Alexey Brodkin
2 new architectures were added in between 1.0.6 and 1.0.8 in uClibc-ng,
these are:
 * lm32
 * or1k

Even thought both are not yet supported in OpenWRT it's important to
disable them both in default config file otherwise user prompt will
appear during uClibc configuration asking to select desired
architecture.

Signed-off-by: Alexey Brodkin 
Cc: Waldemar Brodkorb 
Cc: Mathieu Olivari 
Cc: Felix Fietkau 
Cc: John Crispin 
---
 toolchain/uClibc/Config.version | 2 +-
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/arm   | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/armeb | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/common| 2 ++
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/debug | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/i386  | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/i686  | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/m68k  | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips  | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64| 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64.32 | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64.64 | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64.n32| 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64el  | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64el.32   | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64el.64   | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64el.n32  | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mipsel| 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mipsel.cobalt | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/powerpc   | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/powerpc.e500  | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/sparc | 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/sparc.leon| 0
 toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/x86_64| 0
 24 files changed, 3 insertions(+), 1 deletion(-)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/arm (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/armeb (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/common (99%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/debug (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/i386 (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/i686 (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/m68k (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64 (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64.32 (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64.64 (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64.n32 (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64el (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64el.32 (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64el.64 (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mips64el.n32 
(100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mipsel (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/mipsel.cobalt 
(100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/powerpc (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/powerpc.e500 
(100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/sparc (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/sparc.leon (100%)
 rename toolchain/uClibc/{config-ng-1.0.6 => config-ng-1.0.8}/x86_64 (100%)

diff --git a/toolchain/uClibc/Config.version b/toolchain/uClibc/Config.version
index b6aa471..7210626 100644
--- a/toolchain/uClibc/Config.version
+++ b/toolchain/uClibc/Config.version
@@ -2,7 +2,7 @@ config UCLIBC_VERSION
string
depends on USE_UCLIBC
default "0.9.33.2"   if UCLIBC_VERSION_0_9_33
-   default "1.0.6"  if UCLIBC_VERSION_NG
+   default "1.0.8"  if UCLIBC_VERSION_NG
default "0.9.33.2"
 
 config UCLIBC_VERSION_0_9_33
diff --git a/toolchain/uClibc/config-ng-1.0.6/arm 
b/toolchain/uClibc/config-ng-1.0.8/arm
similarity index 100%
rename from toolchain/uClibc/config-ng-1.0.6/arm
rename to toolchain/uClibc/config-ng-1.0.8/arm
diff --git a/toolchain/uClibc/config-ng-1.0.6/armeb 
b/toolchain/uClibc/config-ng-1.0.8/armeb
similarity index 100%
rename from toolchain/uClibc/config-ng-1.0.6/armeb
rename 

[OpenWrt-Devel] [PATCH netifd] device: Don't process link events anymore in device user specific callback handlers

2015-11-02 Thread Hans Dedecker
Set link_state for all device types via the device_set_link API as all devices 
are registered
in the device tree list making it possible to always get the device via 
device_get.
The decice link state parameter will now actually reflect the corresponding 
kernel device
carrier state in all cases.
Before this change a vlan/macvlan device could still have link_state enabled if 
an interface
was brought down; this was the case when the parent vlan/macvlan device was 
still enabled as
the netlink link_state event would be dropped for vlan/macvlan devices due to 
keep_link_state
in the function cb_rtnl_event.

Signed-off-by: Hans Dedecker 
---
 device.h   | 2 --
 macvlan.c  | 8 
 system-linux.c | 2 +-
 vlan.c | 6 --
 vlandev.c  | 8 
 5 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/device.h b/device.h
index 37814c8..4ff335d 100644
--- a/device.h
+++ b/device.h
@@ -58,8 +58,6 @@ struct device_type {
struct list_head list;
const char *name;
 
-   bool keep_link_status;
-
const struct uci_blob_param_list *config_params;
 
struct device *(*create)(const char *name, struct blob_attr *attr);
diff --git a/macvlan.c b/macvlan.c
index 051fe05..a0f11ae 100644
--- a/macvlan.c
+++ b/macvlan.c
@@ -72,12 +72,6 @@ macvlan_base_cb(struct device_user *dev, enum device_event 
ev)
case DEV_EVENT_REMOVE:
device_set_present(>dev, false);
break;
-   case DEV_EVENT_LINK_UP:
-   device_set_link(>dev, true);
-   break;
-   case DEV_EVENT_LINK_DOWN:
-   device_set_link(>dev, false);
-   break;
default:
return;
}
@@ -261,8 +255,6 @@ macvlan_create(const char *name, struct blob_attr *attr)
 const struct device_type macvlan_device_type = {
.name = "MAC VLAN",
.config_params = _attr_list,
-   .keep_link_status = true,
-
.create = macvlan_create,
.config_init = macvlan_config_init,
.reload = macvlan_reload,
diff --git a/system-linux.c b/system-linux.c
index f51c078..38f43fe 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -424,7 +424,7 @@ static int cb_rtnl_event(struct nl_msg *msg, void *arg)
goto out;
 
struct device *dev = device_get(nla_data(nla[IFLA_IFNAME]), false);
-   if (!dev || dev->type->keep_link_status)
+   if (!dev)
goto out;
 
if (!system_get_dev_sysctl("/sys/class/net/%s/carrier", dev->ifname, 
buf, sizeof(buf)))
diff --git a/vlan.c b/vlan.c
index 3d0a4cf..8e7141f 100644
--- a/vlan.c
+++ b/vlan.c
@@ -79,11 +79,6 @@ static void vlan_dev_cb(struct device_user *dep, enum 
device_event ev)
case DEV_EVENT_REMOVE:
device_set_present(>dev, new_state);
break;
-   case DEV_EVENT_LINK_UP:
-   new_state = true;
-   case DEV_EVENT_LINK_DOWN:
-   device_set_link(>dev, new_state);
-   break;
case DEV_EVENT_UPDATE_IFNAME:
vlan_dev_set_name(vldev, dep->dev);
device_broadcast_event(>dev, ev);
@@ -102,7 +97,6 @@ static struct device *get_vlan_device(struct device *dev, 
int id, bool create)
static const struct device_type vlan_type = {
.name = "VLAN",
.config_params = _attr_list,
-   .keep_link_status = true,
.free = free_vlan_if,
};
struct vlan_device *vldev;
diff --git a/vlandev.c b/vlandev.c
index 884e6ef..b93527c 100644
--- a/vlandev.c
+++ b/vlandev.c
@@ -63,12 +63,6 @@ vlandev_base_cb(struct device_user *dev, enum device_event 
ev)
case DEV_EVENT_REMOVE:
device_set_present(>dev, false);
break;
-   case DEV_EVENT_LINK_UP:
-   device_set_link(>dev, true);
-   break;
-   case DEV_EVENT_LINK_DOWN:
-   device_set_link(>dev, false);
-   break;
default:
return;
}
@@ -249,8 +243,6 @@ vlandev_create(const char *name, struct blob_attr *attr)
 const struct device_type vlandev_device_type = {
.name = "VLANDEV",
.config_params = _attr_list,
-   .keep_link_status = true,
-
.create = vlandev_create,
.config_init = vlandev_config_init,
.reload = vlandev_reload,
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2 ubus] libubus: Fix reverse order processing of pending ubus notifications messages

2015-11-02 Thread Hans Dedecker
Append ubus notification messages to the tail of the pending list
so they're processed in the order as they're put onto the pending list

Signed-off-by: Xinxing Hu 
Signed-off-by: Hans Dedecker 
---
 libubus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libubus.c b/libubus.c
index ccaa069..e1e68d0 100644
--- a/libubus.c
+++ b/libubus.c
@@ -81,7 +81,7 @@ ubus_queue_msg(struct ubus_context *ctx, struct 
ubus_msghdr_buf *buf)
pending->hdr.data = data;
memcpy(>hdr.hdr, >hdr, sizeof(buf->hdr));
memcpy(data, buf->data, blob_raw_len(buf->data));
-   list_add(>list, >pending);
+   list_add_tail(>list, >pending);
if (ctx->sock.registered)
uloop_timeout_set(>pending_timer, 1);
 }
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2 ubus] lua: Fix stack imbalance in ubus_event_handler

2015-11-02 Thread Hans Dedecker
The value from getglobal wasn't being removed from the stack,
resulting in an ever growing stack in the ubus event handler.

Signed-off-by: Karl Vogel 
Signed-off-by: Hans Dedecker 
---
 lua/ubus.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lua/ubus.c b/lua/ubus.c
index a48fb7d..2903e7b 100644
--- a/lua/ubus.c
+++ b/lua/ubus.c
@@ -597,10 +597,13 @@ ubus_event_handler(struct ubus_context *ctx, struct 
ubus_event_handler *ev,
 
lua_getglobal(state, "__ubus_cb_event");
lua_rawgeti(state, -1, listener->r);
+   lua_remove(state, -2);
 
if (lua_isfunction(state, -1)) {
ubus_lua_parse_blob_array(state, blob_data(msg), blob_len(msg), 
true);
lua_call(state, 1, 0);
+   } else {
+   lua_pop(state, 1);
}
 }
 
-- 
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 1/2] include/image.mk: Introduce option to wrap kernel into JFFS2

2015-11-02 Thread Benjamin Berg
On Mo, 2015-11-02 at 20:49 +0100, Felix Fietkau wrote:
> On 2015-11-02 20:33, Benjamin Berg wrote:
> > Some devices like the NBG6616 and NBG6617 expect the kernel to be
> > in a JFFS2 partition. This macro allows wrapping the kernel so that
> > a normal squashfs+jffs partition can be used for the rest of the
> > firmware.
> Does that board run u-boot? If it does, you may want to use the padjffs2
> utility to force it to stop scanning after the end of the filesystem image.
> 
> In case the boot loader scans the whole filesystem, this will also
> prevent it from parsing data from OpenWrt's jffs2 overlay.

Sounds good. I was simply looking at the ZyXELNAND target, which does
not do that currently. Only realized now that mkubntkernelimage is
pretty much identical and does the padding already.

So, the new plan would be to merge mkubntkernelimage with what I stared
with the jffs2 definition. That way both models can use the same
definition and the ubnt-uap-pro KERNEL line changes from
  KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | mkubntkernelimage
to
  KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 kernel0

Benjamin


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


[OpenWrt-Devel] [PATCH 2/2 v3] linux: add support of Synopsys ARC770-based boards

2015-11-02 Thread Alexey Brodkin
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.

Cc: Felix Fietkau 
Cc: Jo-Philipp Wich 
Signed-off-by: Alexey Brodkin 
---

Changes compared to v2:
 * Fixed copyright dates
 * Cleaned-up init scripts

Changes compared to v1:
 * Switched to SoC-centered design. Now instead of common ARC700
   support we claim support of boards based on ARC770D.
   This allows to use the same one build of kernel binary for both
   boards.

 * Implemented run-time scripts that parse Device Tree compatible
   tag and according to it do configuration of serial port and network.

 * Implemented ability to patch in built Linux kernel external .dtb

 * Linux kernel switched from 4.1 to 4.3

 * Rebased on current master

 include/kernel.mk  |   2 +
 target/Config.in   |   9 +
 target/linux/arc770/Makefile   |  26 +++
 target/linux/arc770/base-files/etc/inittab |   4 +
 .../arc770/base-files/etc/uci-defaults/02_network  |  23 +++
 target/linux/arc770/base-files/lib/arc.sh  |  76 +++
 .../base-files/lib/preinit/01_preinit_arc.sh   |  10 +
 target/linux/arc770/config-4.3 | 142 +
 target/linux/arc770/dts/axc001.dtsi| 100 +
 target/linux/arc770/dts/axs101.dts |  21 ++
 target/linux/arc770/dts/axs10x_mb.dtsi | 224 +
 target/linux/arc770/dts/nsim_700.dts   |  70 +++
 target/linux/arc770/dts/skeleton.dtsi  |  37 
 target/linux/arc770/generic/profiles/00-default.mk |  16 ++
 target/linux/arc770/generic/profiles/01-minimal.mk |  15 ++
 target/linux/arc770/generic/profiles/02-axs101.mk  |  17 ++
 .../linux/arc770/generic/profiles/03-nsim_700.mk   |  16 ++
 target/linux/arc770/generic/target.mk  |   8 +
 target/linux/arc770/image/Makefile |  42 
 ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch |  36 
 .../0002-openwrt-arc-add-OWRTDTB-section.patch |  91 +
 21 files changed, 985 insertions(+)
 create mode 100644 target/linux/arc770/Makefile
 create mode 100644 target/linux/arc770/base-files/etc/inittab
 create mode 100644 target/linux/arc770/base-files/etc/uci-defaults/02_network
 create mode 100644 target/linux/arc770/base-files/lib/arc.sh
 create mode 100644 target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh
 create mode 100644 target/linux/arc770/config-4.3
 create mode 100644 target/linux/arc770/dts/axc001.dtsi
 create mode 100644 target/linux/arc770/dts/axs101.dts
 create mode 100644 target/linux/arc770/dts/axs10x_mb.dtsi
 create mode 100644 target/linux/arc770/dts/nsim_700.dts
 create mode 100644 target/linux/arc770/dts/skeleton.dtsi
 create mode 100644 target/linux/arc770/generic/profiles/00-default.mk
 create mode 100644 target/linux/arc770/generic/profiles/01-minimal.mk
 create mode 100644 target/linux/arc770/generic/profiles/02-axs101.mk
 create mode 100644 target/linux/arc770/generic/profiles/03-nsim_700.mk
 create mode 100644 target/linux/arc770/generic/target.mk
 create mode 100644 target/linux/arc770/image/Makefile
 create mode 100644 
target/linux/arc770/patches-4.3/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch
 create mode 100644 
target/linux/arc770/patches-4.3/0002-openwrt-arc-add-OWRTDTB-section.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 

[OpenWrt-Devel] [PATCH 1/2 v3] toolchain: add support of ARC architecture

2015-11-02 Thread Alexey Brodkin
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

Cc: Felix Fietkau 
Cc: John Crispin 
Signed-off-by: Alexey Brodkin 
---

Changes compared to v2:
 * Rebased on top of the current master.
   In particular that commit touches uClibc files:
   
http://git.openwrt.org/?p=openwrt.git;a=commit;h=b70a36d1d969f5aa9ad081c9a395633793582a5a

Changes compared to v1:
 * Binutils Kconfig description is now similar to Gcc and uClibc.
   This allows selection of different versions of binutils.

 * CONFIG_BINUTILS_VERSION_2_23_ARC is used for deciding if we need to
   obtain ARC's binutils.

 * Rebased on current master

 include/site/arc   |  30 +++
 include/target.mk  |   4 +
 toolchain/Config.in|   9 +-
 toolchain/binutils/Config.in   |  23 +-
 toolchain/binutils/Config.version  |  17 ++
 toolchain/binutils/Makefile|  29 ++-
 toolchain/gcc/Config.in|   9 +
 toolchain/gcc/Config.version   |   9 +-
 toolchain/gcc/common.mk|  31 ++-
 .../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.version|   1 +
 toolchain/uClibc/common.mk |   1 +
 toolchain/uClibc/config/arc|  11 +
 31 files changed, 927 insertions(+), 31 deletions(-)
 create mode 100644 include/site/arc
 create mode 100644 toolchain/binutils/Config.version
 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 

[OpenWrt-Devel] [PATCH 0/2 v3] OpenWRT port for Designware ARC cores

2015-11-02 Thread Alexey Brodkin
This series introduces support of DesignWare ARC cores in OpenWRT.
In particular it adds support of 2 boards (nSIM and ARc SDP) based on
ARC770D SoC.

This is the same as v2 but rebased on top of the current master.
In particular that commit touches uClibc files:
http://git.openwrt.org/?p=openwrt.git;a=commit;h=b70a36d1d969f5aa9ad081c9a395633793582a5a

Alexey Brodkin (2):
  toolchain: add support of ARC architecture
  linux: add support of Synopsys ARC770-based boards

 include/kernel.mk  |   2 +
 include/site/arc   |  30 +++
 include/target.mk  |   4 +
 target/Config.in   |   9 +
 target/linux/arc770/Makefile   |  26 +++
 target/linux/arc770/base-files/etc/inittab |   4 +
 .../arc770/base-files/etc/uci-defaults/02_network  |  23 ++
 target/linux/arc770/base-files/lib/arc.sh  |  76 +++
 .../base-files/lib/preinit/01_preinit_arc.sh   |  10 +
 target/linux/arc770/config-4.3 | 142 
 target/linux/arc770/dts/axc001.dtsi| 100 
 target/linux/arc770/dts/axs101.dts |  21 ++
 target/linux/arc770/dts/axs10x_mb.dtsi | 224 ++
 target/linux/arc770/dts/nsim_700.dts   |  70 ++
 target/linux/arc770/dts/skeleton.dtsi  |  37 +++
 target/linux/arc770/generic/profiles/00-default.mk |  16 ++
 target/linux/arc770/generic/profiles/01-minimal.mk |  15 ++
 target/linux/arc770/generic/profiles/02-axs101.mk  |  17 ++
 .../linux/arc770/generic/profiles/03-nsim_700.mk   |  16 ++
 target/linux/arc770/generic/target.mk  |   8 +
 target/linux/arc770/image/Makefile |  42 
 ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch |  36 +++
 .../0002-openwrt-arc-add-OWRTDTB-section.patch |  91 
 toolchain/Config.in|   9 +-
 toolchain/binutils/Config.in   |  23 +-
 toolchain/binutils/Config.version  |  17 ++
 toolchain/binutils/Makefile|  29 ++-
 toolchain/gcc/Config.in|   9 +
 toolchain/gcc/Config.version   |   9 +-
 toolchain/gcc/common.mk|  31 ++-
 .../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.version|   1 +
 toolchain/uClibc/common.mk |   1 +
 toolchain/uClibc/config/arc|  11 +
 52 files changed, 1912 insertions(+), 31 deletions(-)
 create mode 100644 include/site/arc
 create mode 100644 target/linux/arc770/Makefile
 create mode 100644 target/linux/arc770/base-files/etc/inittab
 create mode 100644 target/linux/arc770/base-files/etc/uci-defaults/02_network
 create mode 100644 target/linux/arc770/base-files/lib/arc.sh
 create mode 100644 target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh
 create mode 100644 target/linux/arc770/config-4.3
 create mode 100644 target/linux/arc770/dts/axc001.dtsi
 create mode 100644 target/linux/arc770/dts/axs101.dts
 create mode 100644 target/linux/arc770/dts/axs10x_mb.dtsi
 create mode 100644 target/linux/arc770/dts/nsim_700.dts
 create mode 100644 target/linux/arc770/dts/skeleton.dtsi
 create mode 100644 target/linux/arc770/generic/profiles/00-default.mk
 create mode 100644 target/linux/arc770/generic/profiles/01-minimal.mk
 create mode 100644 target/linux/arc770/generic/profiles/02-axs101.mk
 create mode 100644 target/linux/arc770/generic/profiles/03-nsim_700.mk
 create mode 100644 target/linux/arc770/generic/target.mk
 create mode 100644 target/linux/arc770/image/Makefile
 create mode 100644 
target/linux/arc770/patches-4.3/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch
 create 

[OpenWrt-Devel] [PATCH] hostapd: add default value to eapol_version (#20641)

2015-11-02 Thread Hannu Nyman
r46861 introduced a new option eapol_version to hostapd, but did not
provide a default value. When the option value is evaluated,
the non-existing value causes errors to the systen log:
"netifd: radio0: sh: out of range"

Add a no-op default value 0 for eapol_version. Only values 1 or 2 are
actually passed on, so 0 will not change the default action in hostapd.

Signed-off-by: Hannu Nyman 
---

References:
https://dev.openwrt.org/changeset/46861/
https://dev.openwrt.org/ticket/20641

Error message:
Mon Nov  2 12:34:14 2015 daemon.notice netifd: radio0 (6249): sh: out of range
Mon Nov  2 12:34:14 2015 daemon.notice netifd: radio1 (6259): sh: out of range
Mon Nov  2 12:34:14 2015 daemon.notice netifd: radio0 (6249): Configuration 
file: /var/run/hostapd-phy0.conf

Comparison causing the error:
 [ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" ] &&
   append bss_conf "eapol_version=$eapol_version" "$N"


 package/network/services/hostapd/files/netifd.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index bdfcbb2..9b40a23 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -194,6 +194,7 @@ hostapd_set_bss_options() {
set_default hidden 0
set_default wmm 1
set_default uapsd 1
+   set_default eapol_version 0
 
append bss_conf "ctrl_interface=/var/run/hostapd"
if [ "$isolate" -gt 0 ]; then
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel