From jonas.gorski at gmail.com  Sun Dec  1 08:55:11 2019
From: jonas.gorski at gmail.com (Jonas Gorski)
Date: Sun, 1 Dec 2019 14:55:11 +0100
Subject: [OpenWrt-Devel] [PATCH] firewall: Fix Wformat-nonliteral warning
In-Reply-To: <20191129210634.4066-1-rosenp@gmail.com>
References: <20191129210634.4066-1-rosenp@gmail.com>
Message-ID: <CAOiHx=n7UFajKV6oZWY0x=r+za3TNPr00nLHiBSjhavdXsXk-A@mail.gmail.com>

Hi,

On Fri, 29 Nov 2019 at 22:06, Rosen Penev <rosenp at gmail.com> wrote:
>
> Allows GCC to check the formats by switching to a define, which is a
> constant expression.
>
> Fixes:
>
> warning: format not a string literal, argument types not checked
> [-Wformat-nonliteral]
>   207 |  snprintf(buf, sizeof(buf), tmpl, include->path);
>
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
>  includes.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/includes.c b/includes.c
> index 23b2244..1e759fb 100644
> --- a/includes.c
> +++ b/includes.c
> @@ -188,11 +188,11 @@ run_include(struct fw3_include *include)
>  {
>         int rv;
>         struct stat s;
> -       const char *tmpl =
> -               "config() { "
> -                       "echo \"You cannot use UCI in firewall includes!\" >&2; "
> -                       "exit 1; "
> -               "}; . %s";
> +       #define tmpl \
> +               "config() { " \
> +                       "echo \"You cannot use UCI in firewall includes!\" >&2; " \
> +                       "exit 1; " \
> +               "}; . %s"

defines are global, so they should be at top of the file, use caps for
the name, and have a less generic name than "templ" (or "format").
Same comment for the other patches doing the same thing.


Regards
Jonas

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From foss at volatilesystems.org  Sun Dec  1 09:33:16 2019
From: foss at volatilesystems.org (Stijn Segers)
Date: Sun,  1 Dec 2019 15:33:16 +0100
Subject: [OpenWrt-Devel] [PATCH] amd64-microcode: update to 20191021
Message-ID: <20191201143316.7641-1-foss@volatilesystems.org>

* New microcode update packages from AMD upstream (20191021):
    + New Microcodes:
      sig 0x00830f10, patch id 0x08301025, 2019-07-11
    + Updated Microcodes:
      sig 0x00800f12, patch id 0x08001250, 2019-04-16
      sig 0x00800f82, patch id 0x0800820d, 2019-04-16

* New microcode update packages from AMD upstream (20181128)
    + New Microcodes:
      sig 0x00800f82, patch id 0x0800820b, 2018-06-20

This patch incorporates both the 20181128 and 20191021 updates.
Changelog copied from the debian package changelogs.

Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 package/firmware/amd64-microcode/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/firmware/amd64-microcode/Makefile b/package/firmware/amd64-microcode/Makefile
index 4fd3d04610..9d562c1b59 100644
--- a/package/firmware/amd64-microcode/Makefile
+++ b/package/firmware/amd64-microcode/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=amd64-microcode
-PKG_VERSION:=20180524
+PKG_VERSION:=20191021
 PKG_RELEASE:=1
 
 PKG_SOURCE:=amd64-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/a/amd64-microcode/
-PKG_HASH:=7c389c357c242e7161f6872bf4e12011a71e4c0683f06fb1bcfad650a78bf0a9
+PKG_HASH:=3c289cf6f8a761e1232de17f47bb4e05a9d2739ad8e6ccb643f71ddc08ba61f2
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE)
 
 PKG_LICENSE_FILE:=LICENSE.amd-ucode
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From noreply at github.com  Sun Dec  1 13:49:39 2019
From: noreply at github.com (Stephen Walker)
Date: Sun, 01 Dec 2019 10:49:39 -0800
Subject: [OpenWrt-Devel] [sdwalker/sdwalker.github.io] 83c714: This week's
 update
Message-ID: <sdwalker/sdwalker.github.io/push/refs/heads/master/8d0624-83c714@github.com>

  Branch: refs/heads/master
  Home:   https://github.com/sdwalker/sdwalker.github.io
  Commit: 83c714fdf2ed7ade8b565e526c47bb89fdbd051b
      https://github.com/sdwalker/sdwalker.github.io/commit/83c714fdf2ed7ade8b565e526c47bb89fdbd051b
  Author: Stephen Walker <stephendwalker+github at gmail.com>
  Date:   2019-12-01 (Sun, 01 Dec 2019)

  Changed paths:
    M uscan/index-18.06.html
    M uscan/index-19.07.html
    M uscan/index.html

  Log Message:
  -----------
  This week's update



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Sun Dec  1 16:06:12 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Mon, 2 Dec 2019 00:06:12 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?0ODk6O7x7+Xq8uDq6+gsIPDg8fHq4Of7LCDv?=
	=?cp1251?b?7uLl8fLoIOgg7/zl8fsgliDi5fH8IOfu6+7y7ukg9O7t5CDiIO7k?=
	=?cp1251?b?7e7pIPPt6Org6/zt7ukg6u7r6+Xq9ujoIOgg4iDu8uvo9+3u7CDq?=
	=?cp1251?b?4Pfl8fLi5S4gMDVfMDhfMjAxOSAwMl8xMCAxOTk1MDg=?=
Message-ID: <mailman.14843.1575234498.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ??????????????, ????????, ??????? ? ????? ? ???? ??????? ???? ? ????? ?????????? ????????? ? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Mon, 2 Dec 2019 00:06:12 +0300
Size: 29529
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191202/b6b1cfd3/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From f.fainelli at gmail.com  Sun Dec  1 16:26:09 2019
From: f.fainelli at gmail.com (Florian Fainelli)
Date: Sun, 1 Dec 2019 13:26:09 -0800
Subject: [OpenWrt-Devel] [PATCH v2] gemini: Bring up DSA switches
In-Reply-To: <CACRpkdbErhbNkQMK8haf=ZdSoLO55ke2FxErDJeknRKGVB6S0A@mail.gmail.com>
References: <20191127150503.GA61235@meh.true.cz>
 <CACRpkdbErhbNkQMK8haf=ZdSoLO55ke2FxErDJeknRKGVB6S0A@mail.gmail.com>
Message-ID: <2d00043f-3b17-3be2-98b0-e7c8c2215b94@gmail.com>



On 11/27/2019 7:27 AM, Linus Walleij wrote:
> On Wed, Nov 27, 2019 at 4:05 PM Petr ?tetiar <ynezz at true.cz> wrote:
> 
>> what's the state of this? It's not clear from the discussion, thanks.
> 
> Sadly I'm as confused as you are. I'm scratching my head about
> what to do. I suspect the problem will only get bigger as more
> DSA switches appear in the Linux kernel.

It seems to me that we are still missing something critical for users
which is converting a switch configuration syntax, such as:

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 5t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 5t'

into an appropriate succession of iproute2 calls (possibly with a VLAN
aware bridge).

Is anyone working on bridging that gap at this point?
-- 
Florian

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ansuelsmth at gmail.com  Sun Dec  1 16:36:15 2019
From: ansuelsmth at gmail.com (Ansuel Smith)
Date: Sun, 1 Dec 2019 22:36:15 +0100
Subject: [OpenWrt-Devel] [PATCH v2] gemini: Bring up DSA switches
In-Reply-To: <2d00043f-3b17-3be2-98b0-e7c8c2215b94@gmail.com>
References: <20191127150503.GA61235@meh.true.cz>
 <CACRpkdbErhbNkQMK8haf=ZdSoLO55ke2FxErDJeknRKGVB6S0A@mail.gmail.com>
 <2d00043f-3b17-3be2-98b0-e7c8c2215b94@gmail.com>
Message-ID: <CA+_ehUxznewv_aN0Raozt1WLByUv2WtMAbs44xGdXkfY16v9cg@mail.gmail.com>

AFAIK nobody is working on this. I think we should really start work
on this as we are start talking about kernel 5.4 where mvebu or ipq
platform have mature dsa driver

Il giorno dom 1 dic 2019 alle ore 22:26 Florian Fainelli
<f.fainelli at gmail.com> ha scritto:
>
>
>
> On 11/27/2019 7:27 AM, Linus Walleij wrote:
> > On Wed, Nov 27, 2019 at 4:05 PM Petr ?tetiar <ynezz at true.cz> wrote:
> >
> >> what's the state of this? It's not clear from the discussion, thanks.
> >
> > Sadly I'm as confused as you are. I'm scratching my head about
> > what to do. I suspect the problem will only get bigger as more
> > DSA switches appear in the Linux kernel.
>
> It seems to me that we are still missing something critical for users
> which is converting a switch configuration syntax, such as:
>
> config switch
>         option name 'switch0'
>         option reset '1'
>         option enable_vlan '1'
>
> config switch_vlan
>         option device 'switch0'
>         option vlan '1'
>         option ports '1 2 3 4 5t'
>
> config switch_vlan
>         option device 'switch0'
>         option vlan '2'
>         option ports '0 5t'
>
> into an appropriate succession of iproute2 calls (possibly with a VLAN
> aware bridge).
>
> Is anyone working on bridging that gap at this point?
> --
> Florian
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From rosenp at gmail.com  Sun Dec  1 21:08:40 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 1 Dec 2019 18:08:40 -0800
Subject: [OpenWrt-Devel] [PATCH] firewall: Fix Wformat-nonliteral warning
In-Reply-To: <CAOiHx=n7UFajKV6oZWY0x=r+za3TNPr00nLHiBSjhavdXsXk-A@mail.gmail.com>
References: <20191129210634.4066-1-rosenp@gmail.com>
 <CAOiHx=n7UFajKV6oZWY0x=r+za3TNPr00nLHiBSjhavdXsXk-A@mail.gmail.com>
Message-ID: <756A17B2-9B28-4911-9FE1-E79F659F87FD@gmail.com>


> On Dec 1, 2019, at 5:55 AM, Jonas Gorski <jonas.gorski at gmail.com> wrote:
> 
> Hi,
> 
>> On Fri, 29 Nov 2019 at 22:06, Rosen Penev <rosenp at gmail.com> wrote:
>> 
>> Allows GCC to check the formats by switching to a define, which is a
>> constant expression.
>> 
>> Fixes:
>> 
>> warning: format not a string literal, argument types not checked
>> [-Wformat-nonliteral]
>>  207 |  snprintf(buf, sizeof(buf), tmpl, include->path);
>> 
>> Signed-off-by: Rosen Penev <rosenp at gmail.com>
>> ---
>> includes.c | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>> 
>> diff --git a/includes.c b/includes.c
>> index 23b2244..1e759fb 100644
>> --- a/includes.c
>> +++ b/includes.c
>> @@ -188,11 +188,11 @@ run_include(struct fw3_include *include)
>> {
>>        int rv;
>>        struct stat s;
>> -       const char *tmpl =
>> -               "config() { "
>> -                       "echo \"You cannot use UCI in firewall includes!\" >&2; "
>> -                       "exit 1; "
>> -               "}; . %s";
>> +       #define tmpl \
>> +               "config() { " \
>> +                       "echo \"You cannot use UCI in firewall includes!\" >&2; " \
>> +                       "exit 1; " \
>> +               "}; . %s"
> 
> defines are global
Unfortunately 
> , so they should be at top of the file, use caps for
> the name, and have a less generic name than "templ" (or "format").
> Same comment for the other patches doing the same thing.
I?ll see about doing that.
> 
> 
> Regards
> Jonas

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From henrique at nic.br  Mon Dec  2 06:23:40 2019
From: henrique at nic.br (Henrique de Moraes Holschuh)
Date: Mon, 2 Dec 2019 08:23:40 -0300
Subject: [OpenWrt-Devel] [PATCH] amd64-microcode: update to 20191021
In-Reply-To: <20191201143316.7641-1-foss@volatilesystems.org>
References: <20191201143316.7641-1-foss@volatilesystems.org>
Message-ID: <087739b6-da98-2fdd-c1f6-12be8b9d0bd5@nic.br>

This one regresses some AMD processors in some (all?) motherboards.  It 
has been reported to Ubuntu by several users.

It is fine for master, maybe, but I would not let it into a stable 
OpenWRT release right now.

(spoken using my Debian Developer hat, as the Debian maintainer for 
amd64-microcode).


Em 01/12/2019 11:33, Stijn Segers escreveu:
> * New microcode update packages from AMD upstream (20191021):
>      + New Microcodes:
>        sig 0x00830f10, patch id 0x08301025, 2019-07-11
>      + Updated Microcodes:
>        sig 0x00800f12, patch id 0x08001250, 2019-04-16
>        sig 0x00800f82, patch id 0x0800820d, 2019-04-16
> 
> * New microcode update packages from AMD upstream (20181128)
>      + New Microcodes:
>        sig 0x00800f82, patch id 0x0800820b, 2018-06-20
> 
> This patch incorporates both the 20181128 and 20191021 updates.
> Changelog copied from the debian package changelogs.
> 
> Signed-off-by: Stijn Segers <foss at volatilesystems.org>
> ---
>   package/firmware/amd64-microcode/Makefile | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/firmware/amd64-microcode/Makefile b/package/firmware/amd64-microcode/Makefile
> index 4fd3d04610..9d562c1b59 100644
> --- a/package/firmware/amd64-microcode/Makefile
> +++ b/package/firmware/amd64-microcode/Makefile
> @@ -8,12 +8,12 @@
>   include $(TOPDIR)/rules.mk
>   
>   PKG_NAME:=amd64-microcode
> -PKG_VERSION:=20180524
> +PKG_VERSION:=20191021
>   PKG_RELEASE:=1
>   
>   PKG_SOURCE:=amd64-microcode_3.$(PKG_VERSION).$(PKG_RELEASE).tar.xz
>   PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/a/amd64-microcode/
> -PKG_HASH:=7c389c357c242e7161f6872bf4e12011a71e4c0683f06fb1bcfad650a78bf0a9
> +PKG_HASH:=3c289cf6f8a761e1232de17f47bb4e05a9d2739ad8e6ccb643f71ddc08ba61f2
>   PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.$(PKG_VERSION).$(PKG_RELEASE)
>   
>   PKG_LICENSE_FILE:=LICENSE.amd-ucode
> 

-- 
Henrique de Moraes Holschuh
Analista de Projetos
Centro de Estudos e Pesquisas em Tecnologias de Redes e Opera??es 
(Ceptro.br)
+55 11 5509-3537 R.:4023
INOC 22548*625
www.nic.br

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Mon Dec  2 09:12:05 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Mon, 2 Dec 2019 15:12:05 +0100
Subject: [OpenWrt-Devel] [PATCH] amd64-microcode: update to 20191021
In-Reply-To: <087739b6-da98-2fdd-c1f6-12be8b9d0bd5@nic.br>
References: <20191201143316.7641-1-foss@volatilesystems.org>
 <087739b6-da98-2fdd-c1f6-12be8b9d0bd5@nic.br>
Message-ID: <20191202141205.GK61235@meh.true.cz>

Henrique de Moraes Holschuh <henrique at nic.br> [2019-12-02 08:23:40]:

Hi,

> This one regresses some AMD processors in some (all?) motherboards.  It has
> been reported to Ubuntu by several users.

for reference[1]:

 amd64-microcode (3.20191021.1+really3.20180524.1~ubuntu0.16.04.2) xenial-security; urgency=medium

   * Revert to 3.20180524.1 version of microcode because of regressions on
     certain hardware. (LP: #1853614[2])


From stijn at linux-ipv6.be  Mon Dec  2 09:45:11 2019
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Mon, 2 Dec 2019 16:45:11 +0200
Subject: [OpenWrt-Devel] [PATCH] amd64-microcode: update to 20191021
In-Reply-To: <20191202141205.GK61235@meh.true.cz>
References: <20191201143316.7641-1-foss@volatilesystems.org>
 <087739b6-da98-2fdd-c1f6-12be8b9d0bd5@nic.br>
 <20191202141205.GK61235@meh.true.cz>
Message-ID: <d908963a-fc38-c82e-1818-b295f676a33d@linux-ipv6.be>

On 2/12/2019 16:12, Petr ?tetiar wrote:
>  I've added this patch into my staging tree[4] with some warning and
> will merge it unless someone NAK it in the next 14 days.

NAK!

Pushing commits that are known to result in systems no longer booting is
simply not acceptable, imo. Not everybody reads git log, so it's easily
overlooked.


Stijn


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Mon Dec  2 10:30:46 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Mon, 2 Dec 2019 16:30:46 +0100
Subject: [OpenWrt-Devel] [PATCH] amd64-microcode: update to 20191021
In-Reply-To: <d908963a-fc38-c82e-1818-b295f676a33d@linux-ipv6.be>
References: <20191201143316.7641-1-foss@volatilesystems.org>
 <087739b6-da98-2fdd-c1f6-12be8b9d0bd5@nic.br>
 <20191202141205.GK61235@meh.true.cz>
 <d908963a-fc38-c82e-1818-b295f676a33d@linux-ipv6.be>
Message-ID: <20191202153046.GB8181@meh.true.cz>

Stijn Tintel <stijn at linux-ipv6.be> [2019-12-02 16:45:11]:

> NAK!

ACK, I've Rejected the patch in the Patchwork and removed it from my staging
tree.

> Pushing commits that are known to result in systems no longer booting is
> simply not acceptable, imo.

This patch was for master, development branch so for me its almost same as
testing/unstable in Debian where they still have this microcode update.

> Not everybody reads git log, so it's easily overlooked.

I hope, that nobody is blindly backporting commits into stable branches :-)
Ideally it should be fixes only, right?

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Mon Dec  2 15:35:13 2019
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Mon, 2 Dec 2019 21:35:13 +0100
Subject: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik
 RB952Ui-5ac2nD?
In-Reply-To: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
References: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
Message-ID: <93b23192-32e3-deef-de30-0d9ea10599b8@universe-factory.net>

On 11/29/19 3:40 AM, Joe Ayers wrote:
> Attempting to use the hAP ac lite model RB952Ui-5ac2nD with the 5GHz
> radio0 802.11ac seems to be unstable and consume available memory.
> This is only enabling radio0 with no other changes and bringing wifi
> up/down to reproduce.   Am I doing something silly, or should I submit
> a bug?

Sounds like the issue that this PR tried to work around:

https://github.com/openwrt/openwrt/pull/1077

Kind regards,
Matthias


> 
> root at OpenWrt:/tmp# cat /etc/openwrt_release
> DISTRIB_ID='OpenWrt'
> DISTRIB_RELEASE='19.07-SNAPSHOT'
> DISTRIB_REVISION='r10752-1859391e9e'
> DISTRIB_TARGET='ar71xx/mikrotik'
> DISTRIB_ARCH='mips_24kc'
> DISTRIB_DESCRIPTION='OpenWrt 19.07-SNAPSHOT r10752-1859391e9e'
> DISTRIB_TAINTS='no-all'
> root at OpenWrt:/tmp# free
>               total        used        free      shared  buff/cache   available
> Mem:          59264       14104       33232        7804       11928       23352
> Swap:             0           0           0
> root at OpenWrt:/tmp# wifi up
> 'radio1' is disabled
> 'radio1' is disabled
> root at OpenWrt:/tmp# free
>               total        used        free      shared  buff/cache   available
> Mem:          59264       19556       24204        7804       15504       16156
> Swap:             0           0           0
> root at OpenWrt:/tmp# date; free
> Tue Nov 26 23:32:37 UTC 2019
>               total        used        free      shared  buff/cache   available
> Mem:          59264       29768       13984        7804       15512        5944
> Swap:             0           0           0
> root at OpenWrt:/tmp# date; free
> Tue Nov 26 23:32:55 UTC 2019
>               total        used        free      shared  buff/cache   available
> Mem:          59264       33384       10368        7804       15512        2328
> Swap:             0           0           0
> root at OpenWrt:/tmp# date; free
> Tue Nov 26 23:33:14 UTC 2019
>               total        used        free      shared  buff/cache   available
> Mem:          59264       37424       10452        7804       11388         304
> Swap:             0           0           0
> root at OpenWrt:/tmp# wifi down
> -ash: can't fork: Out of memory
> root at OpenWrt:/tmp# wifi down
> -ash: can't fork: Out of memory
> root at OpenWrt:/tmp# wifi down
> /sbin/wifi: line 188: can't fork: Out of memory
> Failed to parse message data
> 'radio1' is disabled
> root at OpenWrt:/tmp# wifi down
> Segmentation fault
> Failed to parse message data
> 'radio1' is disabled
> root at OpenWrt:/tmp# free
>               total        used        free      shared  buff/cache   available
> Mem:          59264       39436        8508        7804       11320           0
> Swap:             0           0           0
> root at OpenWrt:/tmp# wifi down
> 'radio1' is disabled
> root at OpenWrt:/tmp# date; free
> Tue Nov 26 23:34:08 UTC 2019
>               total        used        free      shared  buff/cache   available
> Mem:          59264       13716       33932        7804       11616       23892
> Swap:             0           0           0
> root at OpenWrt:/tmp#
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191202/98d5007e/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From stijn at linux-ipv6.be  Mon Dec  2 18:26:29 2019
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Tue,  3 Dec 2019 01:26:29 +0200
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti LiteBeam AC
 Gen2
Message-ID: <20191202232629.952385-1-stijn@linux-ipv6.be>

Hardware:
* SoC: Atheros AR9342-BL1A
* RAM: 64MB DDR2 (Winbond W9751G6KB-25)
* Flash: 16MB SPI NOR (Macronix MX25L12835FZ2I-10G)
* Ethernet: 1x 10/100/1000 Mbps (Atheros AR8035-A) with 24V PoE support
* Wifi 2.4GHz: Atheros AR9340 v2
* WiFi 5GHz: Ubiquiti U-AME-G1-BR4A (rebranded QCA988X v2)
* LEDs: 1x Power, 1x Ethernet
* Buttons: 1x Reset
* UART: 1x TTL 115200n8, 3.3V RX TX GND, 3.3V pin closest to RJ45 port

The LEDs do not seem to be connected to any GPIO, so there is currently
no way to control them.

Installation via U-Boot, TFTP and serial console:
* Configure your TFTP server with IP 192.168.1.254
* Connect serial console and power up the device
* Hit any key to stop autoboot
* tftpboot 0x81000000 openwrt-ath79-generic-ubnt_litebeam-ac-gen2-initramfs-kernel.bin
* bootm 0x81000000
* copy openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin
  to /tmp
* sysupgrade /tmp/openwrt-ath79-generic-ubnt_litebeam-ac-gen2-squashfs-sysupgrade.bin

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---

Notes:
    Instructions can be found to install OpenWrt via AirOS at [0]. Unfortunately
    they require an AirOS image, which can only be downloaded by accepting
    the EULA. As I do not want to accept this EULA, I have not been able to
    test these instructions and did not include them in the commit message.
    
    Also available in my staging tree at [1]
    
    [0] https://github.com/openwrt/openwrt/pull/689#issuecomment-493658317
    [1] https://git.openwrt.org/?p=openwrt/staging/stintel.git;a=shortlog;h=refs/heads/lbe-5ac-gen2

 .../dts/ar9342_ubnt_litebeam-ac-gen2.dts      | 39 +++++++++++++++++++
 .../generic/base-files/etc/board.d/02_network |  1 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata  |  1 +
 target/linux/ath79/image/generic-ubnt.mk      |  9 +++++
 4 files changed, 50 insertions(+)
 create mode 100644 target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts

diff --git a/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts b/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts
new file mode 100644
index 0000000000..d7eacf44d0
--- /dev/null
+++ b/target/linux/ath79/dts/ar9342_ubnt_litebeam-ac-gen2.dts
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "ar9342_ubnt_wa.dtsi"
+
+/ {
+	compatible = "ubnt,litebeam-ac-gen2", "ubnt,wa", "qca,ar9342";
+	model = "Ubiquiti LiteBeam AC Gen2";
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy-mask = <4>;
+	phy4: ethernet-phy at 4 {
+		reg = <4>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	/* default for ar934x, except for 1000M and 10M */
+	pll-data = <0x02000000 0x00000101 0x00001313>;
+
+	mtd-mac-address = <&art 0x0>;
+
+	phy-mode = "rgmii-id";
+	phy-handle = <&phy4>;
+
+	gmac-config {
+		device = <&gmac>;
+		rxd-delay = <3>;
+		rxdv-delay = <3>;
+	};
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index e811f85f0e..c194def53d 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -40,6 +40,7 @@ ath79_setup_interfaces()
 	ubnt,bullet-m|\
 	ubnt,bullet-m-xw|\
 	ubnt,lap-120|\
+	ubnt,litebeam-ac-gen2|\
 	ubnt,nanobeam-ac|\
 	ubnt,nanostation-ac-loco|\
 	ubnt,rocket-m|\
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 062caf6ad5..55c6b74e74 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -17,6 +17,7 @@ case "$FIRMWARE" in
 	ubnt,unifiac-mesh|\
 	ubnt,unifiac-mesh-pro|\
 	ubnt,lap-120|\
+	ubnt,litebeam-ac-gen2|\
 	ubnt,nanobeam-ac|\
 	ubnt,nanostation-ac|\
 	ubnt,nanostation-ac-loco|\
diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk
index 19dbe2eb8b..7f59b6e841 100644
--- a/target/linux/ath79/image/generic-ubnt.mk
+++ b/target/linux/ath79/image/generic-ubnt.mk
@@ -128,6 +128,15 @@ define Device/ubnt_lap-120
 endef
 TARGET_DEVICES += ubnt_lap-120
 
+define Device/ubnt_litebeam-ac-gen2
+  $(Device/ubnt-wa)
+  DEVICE_TITLE := Ubiquiti LiteBeam AC Gen2
+  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  IMAGE_SIZE := 15744k
+  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
+endef
+TARGET_DEVICES += ubnt_litebeam-ac-gen2
+
 define Device/ubnt_nanobeam-ac
   $(Device/ubnt-wa)
   DEVICE_MODEL := NanoBeam AC
-- 
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Mon Dec  2 18:39:22 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Tue, 3 Dec 2019 00:39:22 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <20191202232629.952385-1-stijn@linux-ipv6.be>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
Message-ID: <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>

Hi Stijn,

does the device have a MAC address label or imprint on the box?

[...]

> +define Device/ubnt_litebeam-ac-gen2
> +  $(Device/ubnt-wa)
> +  DEVICE_TITLE := Ubiquiti LiteBeam AC Gen2

DEVICE_TITLE has been replaced by DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT. In your case, I'd choose:

DEVICE_MODEL := LiteBeam AC
DEVICE_VARIANT := Gen2

DEVICE_VENDOR is inherited from Device/ubnt.

> +  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
> +  IMAGE_SIZE := 15744k

IMAGE_SIZE can be dropped here, it is inherited from Device/ubnt-wa.

> +  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split

Can we reuse the IMAGE/factory.bin from Device/ubnt here? The only thing missing compared to your line is append-metadata ...

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191203/a8033bb4/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hauke at hauke-m.de  Mon Dec  2 18:49:02 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Tue, 3 Dec 2019 00:49:02 +0100
Subject: [OpenWrt-Devel] OpenWrt 19.07.0 second release candidate
Message-ID: <7d0b17c2-b975-0084-eccb-dbe52e96358f@hauke-m.de>

Hi,

The OpenWrt community is proud to announce the second release candidate
of the upcoming OpenWrt 19.07 stable version series. It incorporates 126
commits since the previous release candidate 19.07.0-rc1.

With this release, the OpenWrt project brings all supported targets back
to a single common kernel version and further refines and broadens
existing device support. It also provides initial support for the new
ath79 target, the future device tree based successor of the popular
ar71xx target. For 19.07, both targets are still built, but it is
recommended to switch to the ath79 target whenever possible: future
releases of OpenWrt will drop support for the ar71xx target. Please read
the known issues below before upgrading.

---

Changes in this release candidate since the previous 19.07.0-rc1 release
candidate are:

 * Linux kernel updated to versions 4.14.156 (from 4.14.151 in
   v19.07.0-rc1)
 * GCC update to version 7.5.0 (from 7.4.0 in v19.07.0-rc1)
 * Hostapd update to version 2.9
 * Device support bugfixes for many devices
 * Security fixes for curl, e2fsprogs, expat, wolfssl, intel-microcode
 * Sysupgrade bugfix for an issue that could cause sysupgrade to
   silently fail to upgrade on ar71xx devices
 * Added support for the following devices: YunCore XD4200 and A782,
   TP-Link Archer C60 v1/v2, ALFA Network Quad-E4G and R36M-E4G,
   AVM FRITZ!Repeater 1200
 * Disable image generation for several devices due to insufficient
   flash space for the default set of packages. Images can still be
   built with the help of the ImageBuilder or SDK with a more minimal
   set of packages

When upgrading from 19.07.0-rc1, if you are affected by the sysupgrade
bug on ar71xx, you need to manually edit /lib/upgrade/stage2 and add
/usr/share/libubox/jshn.sh to list of files in the install_file line
(around line 51). This amounts to manually applying this patch:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=d5f509861e606ff680ebc551bcd4253a6545ac8f

For a detailed list of changes since the OpenWrt 19.07.0-rc1 release,
see https://openwrt.org/releases/19.07/changelog-19.07.0-rc2

---

Known issues:

 * Sysupgrade from ar71xx to ath79 and vice versa is not officially
   supported, a full manual reinstall is recommended to switch targets
   for devices supported by both ar71xx and ath79
 * Images for some device became too big to support a persistent
   overlay, causing such models to lose configuration after a reboot. If
   you experience this problem, please report the affected device in the
   forum and consider downgrading to OpenWrt 18.06 or using the Image
   Builder to pack a smaller custom image
 * Some optional GUI packages crash with an error about missing
   "cbi.lua", install the luci-compat package to fix these
 * Possible Wi-Fi issues with ath10k-based boards. If you encounter such
   an issue, please file a bug report against openwrt-19.07.

---

Highlights in OpenWrt 19.07

Highlights of this release since the previous OpenWrt 18.06 version are:

 * Updated toolchain:
   * musl libc 1.1.24
   * uClibc-ng 1.0.31
   * glibc 2.27
   * gcc 7.5.0
   * binutils 2.31.1
 * Updated Linux kernel
   * 4.14.156 for all targets
   * Flow offloading bugfixes
 * Network userland:
   * hostapd 2.9, dnsmasq 2.80, dropbear 2019.78
   * Fixes in network and wireless configuration handling
   * Bugfixes in DHCPv6 client and server
   * WPA3 configuration support
     * Install wpad-openssl or wpad-wolfssl for WPA3 support
 * System userland:
   * busybox 1.30.1
   * Sysupgrade support for backup and upgrade capability checks
   * Contains urngd, non-physical true random number generator daemon
     based on timing jitter
   * Bugfixes in the process manager, system message bus, embedded web
     server and the configuration management library
 * Platform and Driver Support
   * Dropped adm5120, adm8668, ar7, au1000, ixp4xx, mcs814x, omap24xx,
     ppc40x, ppc44x and xburst target
   * New ath79 target that will replace the popular ar71xx target
   * Updates and new device support across all targets
 * Web interface:
   * Client side rendering of views for improved performance
   * Security fixes

---

For latest information about the 19.07 series, refer to the wiki at:
https://openwrt.org/releases/19.07/

To download the v19.07.0-rc2 images, navigate to:
https://downloads.openwrt.org/releases/19.07.0-rc2/

---

As always, a big thank you goes to all our active package maintainers,
testers, documenters, and supporters.

Have fun!

The OpenWrt Community

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191203/6eb97a66/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From stijn at linux-ipv6.be  Mon Dec  2 18:58:03 2019
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Tue, 3 Dec 2019 01:58:03 +0200
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
Message-ID: <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>

On 3/12/2019 01:39, mail at adrianschmutzler.de wrote:
> Hi Stijn,
>
> does the device have a MAC address label or imprint on the box?
It does.
>
> [...]
>
>> +define Device/ubnt_litebeam-ac-gen2
>> +  $(Device/ubnt-wa)
>> +  DEVICE_TITLE := Ubiquiti LiteBeam AC Gen2
> DEVICE_TITLE has been replaced by DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT. In your case, I'd choose:
>
> DEVICE_MODEL := LiteBeam AC
> DEVICE_VARIANT := Gen2
>
> DEVICE_VENDOR is inherited from Device/ubnt.
Updated in my staging tree.
>
>> +  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
>> +  IMAGE_SIZE := 15744k
> IMAGE_SIZE can be dropped here, it is inherited from Device/ubnt-wa.
Updated in my staging tree.
>
>> +  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
> Can we reuse the IMAGE/factory.bin from Device/ubnt here? The only thing missing compared to your line is append-metadata ...

I used the same as with other ubnt-wa devices. I'm not really up to date
on this metadata thing. Do we normally not include it in factory images?

Thanks,
Stijn



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Mon Dec  2 19:05:26 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Tue, 3 Dec 2019 01:05:26 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
Message-ID: <000801d5a96d$5e3d4220$1ab7c660$@adrianschmutzler.de>

> -----Original Message-----
> From: Stijn Tintel [mailto:stijn at linux-ipv6.be]
> Sent: Dienstag, 3. Dezember 2019 00:58
> To: mail at adrianschmutzler.de; openwrt-devel at lists.openwrt.org
> Cc: pozega.tomislav at gmail.com
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
> LiteBeam AC Gen2
> 
> On 3/12/2019 01:39, mail at adrianschmutzler.de wrote:
> > Hi Stijn,
> >
> > does the device have a MAC address label or imprint on the box?
> It does.

Which one is it? (eth0, 2.4 GHz, 5 GHz) 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191203/3db93e41/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From stijn at linux-ipv6.be  Mon Dec  2 19:15:30 2019
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Tue, 3 Dec 2019 02:15:30 +0200
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <000801d5a96d$5e3d4220$1ab7c660$@adrianschmutzler.de>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <000801d5a96d$5e3d4220$1ab7c660$@adrianschmutzler.de>
Message-ID: <6e48f0b6-794b-5d28-708f-f6d26204e33c@linux-ipv6.be>

On 3/12/2019 02:05, mail at adrianschmutzler.de wrote:
>> -----Original Message-----
>> From: Stijn Tintel [mailto:stijn at linux-ipv6.be]
>> Sent: Dienstag, 3. Dezember 2019 00:58
>> To: mail at adrianschmutzler.de; openwrt-devel at lists.openwrt.org
>> Cc: pozega.tomislav at gmail.com
>> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
>> LiteBeam AC Gen2
>>
>> On 3/12/2019 01:39, mail at adrianschmutzler.de wrote:
>>> Hi Stijn,
>>>
>>> does the device have a MAC address label or imprint on the box?
>> It does.
> Which one is it? (eth0, 2.4 GHz, 5 GHz) 

5 GHz. Does this need to be added somewhere? It's the MAC address of the
wireless chip on the PCIe bus. As this is not defined in DTS, I don't
know how to reference it (to set label-mac-device)?

Stijn



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec  2 19:54:47 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon,  2 Dec 2019 16:54:47 -0800
Subject: [OpenWrt-Devel] [PATCH] uci: Fix Wformat-nonliteral warning
Message-ID: <20191203005447.4607-1-rosenp@gmail.com>

A const char * variable is being passed as a format string. Unfortunately,
this is not correct.

A constant expression needs to be passed so that GCC can determine the
types of the format properly.

Also fixed a different warning that needs a printf attribute.

Fixes:

error: format not a string literal, argument types not checked
[-Werror=format-nonliteral]
  176 |    error_info);
      |    ^~~~~~~~~~
error: format not a string literal, argument types not checked
[-Werror=format-nonliteral]
  185 |    error_info);

cli.c:196:19: error: format string is not a string literal
[-Werror=format-nonliteral]
           vfprintf(stderr, fmt, ap);

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 v3: Moved define to top of file.
 v2: Fixed extra warning from clang 10.
 cli.c    |  1 +
 libuci.c | 15 ++++++++-------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/cli.c b/cli.c
index 8970f4f..6ba97ea 100644
--- a/cli.c
+++ b/cli.c
@@ -185,6 +185,7 @@ static void cli_perror(void)
 	uci_perror(ctx, appname);
 }
 
+__attribute__((format(printf, 1, 2)))
 static void cli_error(const char *fmt, ...)
 {
 	va_list ap;
diff --git a/libuci.c b/libuci.c
index a9e70e8..0f0211a 100644
--- a/libuci.c
+++ b/libuci.c
@@ -40,6 +40,12 @@ static const char *uci_errstr[] = {
 #include "uci_internal.h"
 #include "list.c"
 
+#define errstr \
+	"%s%s" /* prefix */ \
+	"%s%s" /* function */ \
+	"%s" /* error */ \
+	"%s" /* details */
+
 __private const char *uci_confdir = UCI_CONFDIR;
 __private const char *uci_savedir = UCI_SAVEDIR;
 
@@ -142,11 +148,6 @@ uci_get_errorstr(struct uci_context *ctx, char **dest, const char *prefix)
 {
 	static char error_info[128];
 	int err;
-	const char *format =
-		"%s%s" /* prefix */
-		"%s%s" /* function */
-		"%s" /* error */
-		"%s"; /* details */
 
 	error_info[0] = 0;
 
@@ -169,7 +170,7 @@ uci_get_errorstr(struct uci_context *ctx, char **dest, const char *prefix)
 		break;
 	}
 	if (dest) {
-		err = asprintf(dest, format,
+		err = asprintf(dest, errstr,
 			(prefix ? prefix : ""), (prefix ? ": " : ""),
 			(ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func ? ": " : ""),
 			uci_errstr[err],
@@ -178,7 +179,7 @@ uci_get_errorstr(struct uci_context *ctx, char **dest, const char *prefix)
 			*dest = NULL;
 	} else {
 		strcat(error_info, "\n");
-		fprintf(stderr, format,
+		fprintf(stderr, errstr,
 			(prefix ? prefix : ""), (prefix ? ": " : ""),
 			(ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func ? ": " : ""),
 			uci_errstr[err],
-- 
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dedeckeh at gmail.com  Tue Dec  3 02:50:39 2019
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Tue, 3 Dec 2019 08:50:39 +0100
Subject: [OpenWrt-Devel] [PATCH netifd] interface: warn if ip6hint is
 truncated
In-Reply-To: <6a20ec46-f61a-a1df-5530-54031c299c97@kleine-koenig.org>
References: <20191120181131.2622-1-uwe@kleine-koenig.org>
 <CAJLcKsGef==YdFG8mSjQS=KD9zXwwpuEuJfAhxNTqHadKLOy0w@mail.gmail.com>
 <6a20ec46-f61a-a1df-5530-54031c299c97@kleine-koenig.org>
Message-ID: <CAJLcKsHhA3_qaWN2bHv8tAJCg5Ymdj6rfRLN5Gb89AqDzn6hYA@mail.gmail.com>

Hi,

On Fri, Nov 29, 2019 at 9:29 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
>
> On 11/29/19 8:50 PM, Hans Dedecker wrote:
> > On Wed, Nov 20, 2019 at 7:11 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
> >>
> >> When for example a /60 is assigned to a network the last 4 bits of the
> >> ip6hint are unused. Emit a warning if any of these unused bits is set as
> >> it indicates that someone didn't understand how the hint is used. (As I
> >> did earlier today resulting in spending some time understanding the
> >> code.)
> > Patch applied with some minor tweaks
> > (https://git.openwrt.org/?p=project/netifd.git;a=commit;h=e45b1408284c05984b38a910a1f0a07d6c761397);
>
> The updated warning message is fine.
>
> > I added your SoB as this was missing in the patch
>
> I wonder what the significance of the SoB is given that a) it's not
> documented (at least in the netifd sources) and b) it seems to be ok to
> "fake" someone else's SoB and c) there are several commits in the newer
> history of netifd that don't have a SoB of either Author or Committer
> (or both).
For details why a SoB is required; see
https://openwrt.org/submitting-patches#sign_your_work.
If there're any commits in the netifd repo which don't have a SoB this
must rather stay an exception than becoming a general rule.

Hans
>
> Best regards
> Uwe
>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From pozega.tomislav at gmail.com  Tue Dec  3 05:45:48 2019
From: pozega.tomislav at gmail.com (Tom Psyborg)
Date: Tue, 3 Dec 2019 11:45:48 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <6e48f0b6-794b-5d28-708f-f6d26204e33c@linux-ipv6.be>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <000801d5a96d$5e3d4220$1ab7c660$@adrianschmutzler.de>
 <6e48f0b6-794b-5d28-708f-f6d26204e33c@linux-ipv6.be>
Message-ID: <CAKR_QVJyV_0=fF0f-0ySxSDUuh6hEa6jGdhAYZUw5izpLBe-sQ@mail.gmail.com>

i just checked mac addresses in the first image i built for this
device (r10011) and they are correct:

eth 18:E8:29:_device_specific
wlan5g 18:E8:29:_device_specific
wlan2g 1A:E8:29:_device_specific

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Tue Dec  3 06:51:27 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 3 Dec 2019 12:51:27 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <6e48f0b6-794b-5d28-708f-f6d26204e33c@linux-ipv6.be>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <000801d5a96d$5e3d4220$1ab7c660$@adrianschmutzler.de>
 <6e48f0b6-794b-5d28-708f-f6d26204e33c@linux-ipv6.be>
Message-ID: <00bc01d5a9cf$ff1c5930$fd550b90$@adrianschmutzler.de>

> -----Original Message-----
> From: Stijn Tintel [mailto:stijn at linux-ipv6.be]
> Sent: Dienstag, 3. Dezember 2019 01:16
> To: mail at adrianschmutzler.de; openwrt-devel at lists.openwrt.org
> Cc: pozega.tomislav at gmail.com
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti LiteBeam
> AC Gen2
> 
> On 3/12/2019 02:05, mail at adrianschmutzler.de wrote:
> >> -----Original Message-----
> >> From: Stijn Tintel [mailto:stijn at linux-ipv6.be]
> >> Sent: Dienstag, 3. Dezember 2019 00:58
> >> To: mail at adrianschmutzler.de; openwrt-devel at lists.openwrt.org
> >> Cc: pozega.tomislav at gmail.com
> >> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
> >> LiteBeam AC Gen2
> >>
> >> On 3/12/2019 01:39, mail at adrianschmutzler.de wrote:
> >>> Hi Stijn,
> >>>
> >>> does the device have a MAC address label or imprint on the box?
> >> It does.
> > Which one is it? (eth0, 2.4 GHz, 5 GHz)
> 
> 5 GHz. Does this need to be added somewhere? It's the MAC address of the
> wireless chip on the PCIe bus. As this is not defined in DTS, I don't
> know how to reference it (to set label-mac-device)?
> 
> Stijn
> 

I've recently made an effort to include the label MAC address into OpenWrt, so that's why I try to advertise this here :-)

If not available via DTS, you can specify label_mac in the MAC address section of 02_network, e.g.
https://github.com/openwrt/openwrt/blob/master/target/linux/ath79/generic/base-files/etc/board.d/02_network#L296

So, for your case it looks like you would have to add

ubnt,litebeam-ac-gen2)
	label_mac=$(mtd_get_mac_binary art 0x5006)
	;;

inside ath79_setup_macs() there.

I've tried to provide a short overview about the label MAC address here:
https://openwrt.org/docs/guide-developer/mac.address#label_mac_address

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191203/7fdc7916/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at adrianschmutzler.de  Tue Dec  3 06:54:59 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 3 Dec 2019 12:54:59 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
Message-ID: <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>

> >> +  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
> > Can we reuse the IMAGE/factory.bin from Device/ubnt here? The only thing
> missing compared to your line is append-metadata ...
> 
> I used the same as with other ubnt-wa devices. I'm not really up to date
> on this metadata thing. Do we normally not include it in factory images?

I overlooked the definition for other ubnt-wa devices.

I'm also not sure whether we need the append-metadata, thus I wouldn't deviate from the other ubnt-wa devices.

So, either keep your version or move IMAGE/factory.bin definition from the ubnt-wa devices to parent Device/ubnt-wa as it's the same for all ubnt-wa devices.

Best

Adrian

> 
> Thanks,
> Stijn
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191203/d528c52e/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From stijn at linux-ipv6.be  Tue Dec  3 07:03:16 2019
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Tue, 3 Dec 2019 14:03:16 +0200
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
Message-ID: <2e4672f9-0fe3-b8cf-7322-df64cd552ff5@linux-ipv6.be>

On 3/12/2019 13:54, Adrian Schmutzler wrote:
>>>> +  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
>>> Can we reuse the IMAGE/factory.bin from Device/ubnt here? The only thing
>> missing compared to your line is append-metadata ...
>>
>> I used the same as with other ubnt-wa devices. I'm not really up to date
>> on this metadata thing. Do we normally not include it in factory images?
> I overlooked the definition for other ubnt-wa devices.
>
> I'm also not sure whether we need the append-metadata, thus I wouldn't deviate from the other ubnt-wa devices.
>
> So, either keep your version or move IMAGE/factory.bin definition from the ubnt-wa devices to parent Device/ubnt-wa as it's the same for all ubnt-wa devices.

I've addressed this and added the MAC label in my staging tree:
https://git.openwrt.org/?p=openwrt/staging/stintel.git;a=shortlog;h=refs/heads/lbe-5ac-gen2

Thanks for your review and guidance!
Stijn



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ynezz at true.cz  Tue Dec  3 07:09:30 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Tue, 3 Dec 2019 13:09:30 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
Message-ID: <20191203120930.GC8181@meh.true.cz>

Hi,

> > I used the same as with other ubnt-wa devices. I'm not really up to date
> > on this metadata thing. Do we normally not include it in factory images?

Indeed, but you've added following extra line to your device:

 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split

Which means, that you're constructing factory image from sysupgrade image, and
sysupgrade images have this metadata included. I would just drop this line.

> I'm also not sure whether we need the append-metadata, thus I wouldn't
> deviate from the other ubnt-wa devices.

I'm sure, that there is no need for this deviation from other ubnt-wa devices.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Tue Dec  3 07:17:04 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 3 Dec 2019 13:17:04 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <20191203120930.GC8181@meh.true.cz>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
 <20191203120930.GC8181@meh.true.cz>
Message-ID: <010701d5a9d3$92f3c320$b8db4960$@adrianschmutzler.de>

Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On
> Behalf Of Petr ?tetiar
> Sent: Dienstag, 3. Dezember 2019 13:10
> To: Adrian Schmutzler <mail at adrianschmutzler.de>
> Cc: 'Stijn Tintel' <stijn at linux-ipv6.be>; openwrt-devel at lists.openwrt.org;
> pozega.tomislav at gmail.com
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti LiteBeam
> AC Gen2
> 
> Hi,
> 
> > > I used the same as with other ubnt-wa devices. I'm not really up to date
> > > on this metadata thing. Do we normally not include it in factory images?
> 
> Indeed, but you've added following extra line to your device:
> 
>  IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
> 
> Which means, that you're constructing factory image from sysupgrade image, and
> sysupgrade images have this metadata included. I would just drop this line.
> 
> > I'm also not sure whether we need the append-metadata, thus I wouldn't
> > deviate from the other ubnt-wa devices.
> 
> I'm sure, that there is no need for this deviation from other ubnt-wa devices.

Other ubnt-wa do this, too, they just do not define it in parent node:

https://github.com/openwrt/openwrt/blob/master/target/linux/ath79/image/generic-ubnt.mk#L127
and below that.

So, the question is whether it would make sense to remove the line for all the other ubnt-wa devices, too, then.

Best

Adrian


> 
> -- ynezz
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191203/dcf2109c/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Tue Dec  3 07:26:03 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Tue, 3 Dec 2019 13:26:03 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <2e4672f9-0fe3-b8cf-7322-df64cd552ff5@linux-ipv6.be>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
 <2e4672f9-0fe3-b8cf-7322-df64cd552ff5@linux-ipv6.be>
Message-ID: <20191203122602.GD8181@meh.true.cz>

Stijn Tintel <stijn at linux-ipv6.be> [2019-12-03 14:03:16]:

> I've addressed this and added the MAC label in my staging tree:
> https://git.openwrt.org/?p=openwrt/staging/stintel.git;a=shortlog;h=refs/heads/lbe-5ac-gen2

Note, that this commit:

 ath79: move IMAGE/factory.bin to Device/ubnt-wa

should be probably:

 ath79: remove wrong IMAGE/factory.bin from ubnt-wa devices

      (and use default and correct one from ubnt)

because following:

 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split

is in essence:

  define Device/Default
   IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
          append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
  endef

  + | mkubntimage-split
  = append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) | mkubntimage-split

where ubnt has following:

  define Device/ubnt
    IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
          append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkubntimage-split
  endef

  = append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs |                  | check-size $$$$(IMAGE_SIZE) | mkubntimage-split

                                                                          ^------ append-metadata missing

so using IMAGE/factory.bin from ubnt (default) is probably the correct way,
because having OpenWrt specific metadata in the factory images doesn't make
any sense.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ynezz at true.cz  Tue Dec  3 07:31:44 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Tue, 3 Dec 2019 13:31:44 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <010701d5a9d3$92f3c320$b8db4960$@adrianschmutzler.de>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
 <20191203120930.GC8181@meh.true.cz>
 <010701d5a9d3$92f3c320$b8db4960$@adrianschmutzler.de>
Message-ID: <20191203123144.GE8181@meh.true.cz>

Adrian Schmutzler <mail at adrianschmutzler.de> [2019-12-03 13:17:04]:

> Other ubnt-wa do this, too, they just do not define it in parent node:

Ok, I've checked only the parent node.

> So, the question is whether it would make sense to remove the line for all the other ubnt-wa devices, too, then.

I would remove it, it doesn't make sense and is misleading.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Tue Dec  3 07:33:03 2019
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Tue, 3 Dec 2019 14:33:03 +0200
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <20191203123144.GE8181@meh.true.cz>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
 <20191203120930.GC8181@meh.true.cz>
 <010701d5a9d3$92f3c320$b8db4960$@adrianschmutzler.de>
 <20191203123144.GE8181@meh.true.cz>
Message-ID: <12d89195-b1b7-5f9e-52a8-5411ad142733@linux-ipv6.be>

On 3/12/2019 14:31, Petr ?tetiar wrote:
> Adrian Schmutzler <mail at adrianschmutzler.de> [2019-12-03 13:17:04]:
>
>> Other ubnt-wa do this, too, they just do not define it in parent node:
> Ok, I've checked only the parent node.
>
>> So, the question is whether it would make sense to remove the line for all the other ubnt-wa devices, too, then.
> I would remove it, it doesn't make sense and is misleading.
>
> -- ynezz

Updated my staging tree again:
https://git.openwrt.org/?p=openwrt/staging/stintel.git;a=shortlog;h=refs/heads/lbe-5ac-gen2

Thanks,
Stijn


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at adrianschmutzler.de  Tue Dec  3 07:39:48 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 3 Dec 2019 13:39:48 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <12d89195-b1b7-5f9e-52a8-5411ad142733@linux-ipv6.be>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
 <20191203120930.GC8181@meh.true.cz>
 <010701d5a9d3$92f3c320$b8db4960$@adrianschmutzler.de>
 <20191203123144.GE8181@meh.true.cz>
 <12d89195-b1b7-5f9e-52a8-5411ad142733@linux-ipv6.be>
Message-ID: <012e01d5a9d6$c03434c0$409c9e40$@adrianschmutzler.de>

LGTM. (Haven't checked the network setup.) :-)

Adrian

> -----Original Message-----
> From: Stijn Tintel [mailto:stijn at linux-ipv6.be]
> Sent: Dienstag, 3. Dezember 2019 13:33
> To: Petr ?tetiar <ynezz at true.cz>; Adrian Schmutzler
> <mail at adrianschmutzler.de>
> Cc: openwrt-devel at lists.openwrt.org; pozega.tomislav at gmail.com
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti LiteBeam
> AC Gen2
> 
> On 3/12/2019 14:31, Petr ?tetiar wrote:
> > Adrian Schmutzler <mail at adrianschmutzler.de> [2019-12-03 13:17:04]:
> >
> >> Other ubnt-wa do this, too, they just do not define it in parent node:
> > Ok, I've checked only the parent node.
> >
> >> So, the question is whether it would make sense to remove the line for all the
> other ubnt-wa devices, too, then.
> > I would remove it, it doesn't make sense and is misleading.
> >
> > -- ynezz
> 
> Updated my staging tree again:
> https://git.openwrt.org/?p=openwrt/staging/stintel.git;a=shortlog;h=refs/heads
> /lbe-5ac-gen2
> 
> Thanks,
> Stijn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191203/c5807ed2/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jonas.gorski at gmail.com  Tue Dec  3 08:27:10 2019
From: jonas.gorski at gmail.com (Jonas Gorski)
Date: Tue, 3 Dec 2019 14:27:10 +0100
Subject: [OpenWrt-Devel] [PATCH] uci: Fix Wformat-nonliteral warning
In-Reply-To: <20191203005447.4607-1-rosenp@gmail.com>
References: <20191203005447.4607-1-rosenp@gmail.com>
Message-ID: <CAOiHx=ndf-K0qOO535AQ=Xath3qzAp38qoqRsKuX_y3tn-oU5Q@mail.gmail.com>

On Tue, 3 Dec 2019 at 01:54, Rosen Penev <rosenp at gmail.com> wrote:
>
> A const char * variable is being passed as a format string. Unfortunately,
> this is not correct.
>
> A constant expression needs to be passed so that GCC can determine the
> types of the format properly.
>
> Also fixed a different warning that needs a printf attribute.
>
> Fixes:
>
> error: format not a string literal, argument types not checked
> [-Werror=format-nonliteral]
>   176 |    error_info);
>       |    ^~~~~~~~~~
> error: format not a string literal, argument types not checked
> [-Werror=format-nonliteral]
>   185 |    error_info);
>
> cli.c:196:19: error: format string is not a string literal
> [-Werror=format-nonliteral]
>            vfprintf(stderr, fmt, ap);
>
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
>  v3: Moved define to top of file.
>  v2: Fixed extra warning from clang 10.
>  cli.c    |  1 +
>  libuci.c | 15 ++++++++-------
>  2 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/cli.c b/cli.c
> index 8970f4f..6ba97ea 100644
> --- a/cli.c
> +++ b/cli.c
> @@ -185,6 +185,7 @@ static void cli_perror(void)
>         uci_perror(ctx, appname);
>  }
>
> +__attribute__((format(printf, 1, 2)))
>  static void cli_error(const char *fmt, ...)
>  {
>         va_list ap;
> diff --git a/libuci.c b/libuci.c
> index a9e70e8..0f0211a 100644
> --- a/libuci.c
> +++ b/libuci.c
> @@ -40,6 +40,12 @@ static const char *uci_errstr[] = {
>  #include "uci_internal.h"
>  #include "list.c"
>
> +#define errstr \

As mentioned in my previous email, please use all caps for #defines.
And maybe give it a more descriptive less generic name. E.g.
UCI_ERR_FORMAT, as it is a format string, and should be uci
"namespaced" (as much as you can namespace stuff in C).


Regards
Jonas

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Tue Dec  3 09:28:16 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Tue, 3 Dec 2019 17:28:16 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?0e7i5fLx6ujlIOzz6/zy9Ojr/Oz7IC0g4e7r?=
	=?cp1251?b?/Pjg/yDq7uvr5er26P8g4iDu8uvo9+3u7CDq4Pfl8fLi5S4gMDVf?=
	=?cp1251?q?08=5F2019_02=5F10_199508?=
Message-ID: <mailman.15399.1575383417.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ????????? ??????????? - ??????? ????????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Tue, 3 Dec 2019 17:28:16 +0300
Size: 57782
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191203/fe8a23e2/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Tue Dec  3 09:34:34 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Tue, 3 Dec 2019 15:34:34 +0100
Subject: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik
 RB952Ui-5ac2nD?
In-Reply-To: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
References: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
Message-ID: <20191203143434.GF8181@meh.true.cz>

Joe Ayers <joe at ayerscasa.com> [2019-11-28 18:40:23]:

Hi,

I'm not able to reproduce it on TP-Link Archer C7 v5.

> Attempting to use the hAP ac lite model RB952Ui-5ac2nD with the 5GHz
> radio0 802.11ac seems to be unstable and consume available memory.
> This is only enabling radio0 with no other changes and bringing wifi
> up/down to reproduce.   Am I doing something silly, or should I submit
> a bug?

uptime > /tmp/wifi.log && \
cat /etc/openwrt_release >> /tmp/wifi.log && \
uci set wireless.radio0.disabled=0 && \
uci commit wireless && \
wifi up && \
echo "up: $(free | grep Mem:)" >> /tmp/wifi.log && \
sleep 120 && \
wifi down && sleep 1 && \
echo "dn: $(free | grep Mem:)" >> /tmp/wifi.log && \
for i in $(seq 1 10); do \
	wifi up; sleep 15; echo "up: $(free | grep Mem:)" >> /tmp/wifi.log; \
	wifi down; sleep 15; wifi down; sleep 1; wifi down; sleep 1; \
	wifi down; sleep 1; echo "dn: $(free | grep Mem:)" >> /tmp/wifi.log; \
done; cat /tmp/wifi.log

 14:06:05 up 2 min,  load average: 0.24, 0.19, 0.08
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='19.07.0-rc2'
DISTRIB_REVISION='r10775-db8345d8e4'
DISTRIB_TARGET='ath79/generic'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='OpenWrt 19.07.0-rc2 r10775-db8345d8e4'
DISTRIB_TAINTS=''
up: Mem:         124528       15128       99536          76        9864       80684
dn: Mem:         124528       14860       99076          84       10592       80596
up: Mem:         124528       22592       91340          84       10596       72872
dn: Mem:         124528       14884       99048          84       10596       80580
up: Mem:         124528       22848       91084          84       10596       72616
dn: Mem:         124528       14884       99048          84       10596       80576
up: Mem:         124528       22848       91084          84       10596       72612
dn: Mem:         124528       14884       99048          84       10596       80576
up: Mem:         124528       22848       91084          84       10596       72612
dn: Mem:         124528       14884       99048          84       10596       80576
up: Mem:         124528       22940       90992          84       10596       72520
dn: Mem:         124528       14916       99016          84       10596       80544
up: Mem:         124528       22808       91124          84       10596       72652
dn: Mem:         124528       14868       99064          84       10596       80592
up: Mem:         124528       22900       91032          84       10596       72560
dn: Mem:         124528       14876       99056          84       10596       80584
up: Mem:         124528       22676       91256          84       10596       72784
dn: Mem:         124528       14904       99028          84       10596       80556
up: Mem:         124528       22712       91220          84       10596       72748
dn: Mem:         124528       14936       98996          84       10596       80524
up: Mem:         124528       22708       91224          84       10596       72752
dn: Mem:         124528       14936       98996          84       10596       80524

 15:53:35 up 1 min,  load average: 1.35, 0.41, 0.14
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='19.07.0-rc2'
DISTRIB_REVISION='r10775-db8345d8e4'
DISTRIB_TARGET='ar71xx/generic'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='OpenWrt 19.07.0-rc2 r10775-db8345d8e4'
DISTRIB_TAINTS=''
up: Mem:         124624       14068      100680         120        9876       81760
dn: Mem:         124624       14368       99524         140       10732       80996
up: Mem:         124624       22072       91816         140       10736       73296
dn: Mem:         124624       14360       99528         140       10736       81004
up: Mem:         124624       22072       91816         140       10736       73292
dn: Mem:         124624       14360       99528         140       10736       81004
up: Mem:         124624       22068       91820         140       10736       73296
dn: Mem:         124624       14360       99528         140       10736       81004
up: Mem:         124624       22196       91692         140       10736       73168
dn: Mem:         124624       14360       99528         140       10736       81004
up: Mem:         124624       22356       91532         140       10736       73008
dn: Mem:         124624       14392       99496         140       10736       80972
up: Mem:         124624       22164       91724         140       10736       73200
dn: Mem:         124624       14344       99544         140       10736       81020
up: Mem:         124624       22956       90932         140       10736       72408
dn: Mem:         124624       14352       99536         140       10736       81012
up: Mem:         124624       22924       90964         140       10736       72440
dn: Mem:         124624       14352       99536         140       10736       81012
up: Mem:         124624       22444       91444         140       10736       72920
dn: Mem:         124624       14384       99504         140       10736       80980
up: Mem:         124624       22188       91700         140       10736       73176
dn: Mem:         124624       14352       99536         140       10736       81012

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From uwe at kleine-koenig.org  Tue Dec  3 09:59:18 2019
From: uwe at kleine-koenig.org (=?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?=)
Date: Tue, 3 Dec 2019 15:59:18 +0100
Subject: [OpenWrt-Devel] The meaning of Signed-off-by for netifd [Was: Re:
 [PATCH netifd] interface: warn if ip6hint is truncated]
In-Reply-To: <CAJLcKsHhA3_qaWN2bHv8tAJCg5Ymdj6rfRLN5Gb89AqDzn6hYA@mail.gmail.com>
References: <20191120181131.2622-1-uwe@kleine-koenig.org>
 <CAJLcKsGef==YdFG8mSjQS=KD9zXwwpuEuJfAhxNTqHadKLOy0w@mail.gmail.com>
 <6a20ec46-f61a-a1df-5530-54031c299c97@kleine-koenig.org>
 <CAJLcKsHhA3_qaWN2bHv8tAJCg5Ymdj6rfRLN5Gb89AqDzn6hYA@mail.gmail.com>
Message-ID: <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>

Hello Hans,

On 12/3/19 8:50 AM, Hans Dedecker wrote:
> On Fri, Nov 29, 2019 at 9:29 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
>>
>> On 11/29/19 8:50 PM, Hans Dedecker wrote:
>>> On Wed, Nov 20, 2019 at 7:11 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
>>>>
>>>> When for example a /60 is assigned to a network the last 4 bits of the
>>>> ip6hint are unused. Emit a warning if any of these unused bits is set as
>>>> it indicates that someone didn't understand how the hint is used. (As I
>>>> did earlier today resulting in spending some time understanding the
>>>> code.)
>>> Patch applied with some minor tweaks
>>> (https://git.openwrt.org/?p=project/netifd.git;a=commit;h=e45b1408284c05984b38a910a1f0a07d6c761397);
>>
>> The updated warning message is fine.
>>
>>> I added your SoB as this was missing in the patch
>>
>> I wonder what the significance of the SoB is given that a) it's not
>> documented (at least in the netifd sources) and b) it seems to be ok to
>> "fake" someone else's SoB and c) there are several commits in the newer
>> history of netifd that don't have a SoB of either Author or Committer
>> (or both).
> For details why a SoB is required; see
> https://openwrt.org/submitting-patches#sign_your_work.
> If there're any commits in the netifd repo which don't have a SoB this
> must rather stay an exception than becoming a general rule.

ok, so you claim my SoB means that *I* confirmed that my change is
compatible to the netifd's license. I didn't do that though.

Even if it was me who added that line I doubt is has any relevance for
netifd because nothing in the netifd sources explains what an SoB means.
And the link you sent applies only to patches for openwrt, not netifd.
(Also if this is the only place for openwrt where the significance of an
SoB is described I wonder if this is relevant given that from the POV of
openwrt.git the wiki is an external resource that can be modified by
anyone. What if someone removes item (d) from the wiki or introduces an
(e)?)

Don't get me wrong, my patch is compatible to netifd's license. But if
you want that netifd's license situation stays reasonably safe and
clean, it IMHO cannot be that you add a SoB for someone else, and give
that SoB a meaning that isn't documented for your project and assumes
things about that someone else that you cannot know for sure. So if you
require a formalism, please formalize it properly. (Of course INAL, but
that's my understanding of how open source licensing works.)

Best regards
Uwe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191203/29ae43c9/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From sebastian_ml at gmx.net  Tue Dec  3 10:25:47 2019
From: sebastian_ml at gmx.net (Sebastian Kemper)
Date: Tue, 3 Dec 2019 16:25:47 +0100
Subject: [OpenWrt-Devel] The meaning of Signed-off-by for netifd [Was:
 Re: [PATCH netifd] interface: warn if ip6hint is truncated]
In-Reply-To: <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>
References: <20191120181131.2622-1-uwe@kleine-koenig.org>
 <CAJLcKsGef==YdFG8mSjQS=KD9zXwwpuEuJfAhxNTqHadKLOy0w@mail.gmail.com>
 <6a20ec46-f61a-a1df-5530-54031c299c97@kleine-koenig.org>
 <CAJLcKsHhA3_qaWN2bHv8tAJCg5Ymdj6rfRLN5Gb89AqDzn6hYA@mail.gmail.com>
 <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>
Message-ID: <20191203152546.GA2930@darth.lan>

On Tue, Dec 03, 2019 at 03:59:18PM +0100, Uwe Kleine-K?nig wrote:

<snip>

>
> ok, so you claim my SoB means that *I* confirmed that my change is
> compatible to the netifd's license. I didn't do that though.
>
> Even if it was me who added that line I doubt is has any relevance for
> netifd because nothing in the netifd sources explains what an SoB means.
> And the link you sent applies only to patches for openwrt, not netifd.
> (Also if this is the only place for openwrt where the significance of an
> SoB is described I wonder if this is relevant given that from the POV of
> openwrt.git the wiki is an external resource that can be modified by
> anyone. What if someone removes item (d) from the wiki or introduces an
> (e)?)

Hi Uwe,

The OpenWrt "Submitting patches" article links to
https://www.kernel.org/doc/html/latest/process/submitting-patches.html.
There the sign-off (and the reasons for it) is explained a bit more. So
it seems OpenWrt is just following kernel.org's example. Which is fine
in my opinion.

Regarding somebody adding the sign-off _for_ you I share your opinion.
It has to be _your_ sign-off, so if a third party adds it for you this
is not correct.

I didn't really think about this before reading your mail. So thanks for
highlighting this.

Regards,
Seb

> Don't get me wrong, my patch is compatible to netifd's license. But if
> you want that netifd's license situation stays reasonably safe and
> clean, it IMHO cannot be that you add a SoB for someone else, and give
> that SoB a meaning that isn't documented for your project and assumes
> things about that someone else that you cannot know for sure. So if you
> require a formalism, please formalize it properly. (Of course INAL, but
> that's my understanding of how open source licensing works.)
>
> Best regards
> Uwe

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dedeckeh at gmail.com  Tue Dec  3 10:28:52 2019
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Tue, 3 Dec 2019 16:28:52 +0100
Subject: [OpenWrt-Devel] The meaning of Signed-off-by for netifd [Was:
 Re: [PATCH netifd] interface: warn if ip6hint is truncated]
In-Reply-To: <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>
References: <20191120181131.2622-1-uwe@kleine-koenig.org>
 <CAJLcKsGef==YdFG8mSjQS=KD9zXwwpuEuJfAhxNTqHadKLOy0w@mail.gmail.com>
 <6a20ec46-f61a-a1df-5530-54031c299c97@kleine-koenig.org>
 <CAJLcKsHhA3_qaWN2bHv8tAJCg5Ymdj6rfRLN5Gb89AqDzn6hYA@mail.gmail.com>
 <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>
Message-ID: <CAJLcKsH1EY3SRK3ByXBn8Exjb8bhSoJu94=7gK_-B6YHx1hvGg@mail.gmail.com>

On Tue, Dec 3, 2019 at 3:59 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
>
> Hello Hans,
>
> On 12/3/19 8:50 AM, Hans Dedecker wrote:
> > On Fri, Nov 29, 2019 at 9:29 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
> >>
> >> On 11/29/19 8:50 PM, Hans Dedecker wrote:
> >>> On Wed, Nov 20, 2019 at 7:11 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
> >>>>
> >>>> When for example a /60 is assigned to a network the last 4 bits of the
> >>>> ip6hint are unused. Emit a warning if any of these unused bits is set as
> >>>> it indicates that someone didn't understand how the hint is used. (As I
> >>>> did earlier today resulting in spending some time understanding the
> >>>> code.)
> >>> Patch applied with some minor tweaks
> >>> (https://git.openwrt.org/?p=project/netifd.git;a=commit;h=e45b1408284c05984b38a910a1f0a07d6c761397);
> >>
> >> The updated warning message is fine.
> >>
> >>> I added your SoB as this was missing in the patch
> >>
> >> I wonder what the significance of the SoB is given that a) it's not
> >> documented (at least in the netifd sources) and b) it seems to be ok to
> >> "fake" someone else's SoB and c) there are several commits in the newer
> >> history of netifd that don't have a SoB of either Author or Committer
> >> (or both).
> > For details why a SoB is required; see
> > https://openwrt.org/submitting-patches#sign_your_work.
> > If there're any commits in the netifd repo which don't have a SoB this
> > must rather stay an exception than becoming a general rule.
>
> ok, so you claim my SoB means that *I* confirmed that my change is
> compatible to the netifd's license. I didn't do that though.
>
> Even if it was me who added that line I doubt is has any relevance for
> netifd because nothing in the netifd sources explains what an SoB means.
> And the link you sent applies only to patches for openwrt, not netifd.
> (Also if this is the only place for openwrt where the significance of an
> SoB is described I wonder if this is relevant given that from the POV of
> openwrt.git the wiki is an external resource that can be modified by
> anyone. What if someone removes item (d) from the wiki or introduces an
> (e)?)
>
> Don't get me wrong, my patch is compatible to netifd's license. But if
> you want that netifd's license situation stays reasonably safe and
> clean, it IMHO cannot be that you add a SoB for someone else, and give
> that SoB a meaning that isn't documented for your project and assumes
> things about that someone else that you cannot know for sure. So if you
> require a formalism, please formalize it properly. (Of course INAL, but
> that's my understanding of how open source licensing works.)
I won't waste further my time and energy on this ...
I acted in good faith and next time if I find a patch from you without
SoB I will just simply reject it to avoid contra productive
discussions
Patches delivered for all projects (netifd/libubox/ubus/...)
maintained by OpenWrt must have a SoB in line what is described on the
Wiki; this does not solely apply to the OpenWrt repo

This closes the discussion for me

Hans
>
> Best regards
> Uwe
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jonas.gorski at gmail.com  Tue Dec  3 10:36:51 2019
From: jonas.gorski at gmail.com (Jonas Gorski)
Date: Tue, 3 Dec 2019 16:36:51 +0100
Subject: [OpenWrt-Devel] The meaning of Signed-off-by for netifd [Was:
 Re: [PATCH netifd] interface: warn if ip6hint is truncated]
In-Reply-To: <CAJLcKsH1EY3SRK3ByXBn8Exjb8bhSoJu94=7gK_-B6YHx1hvGg@mail.gmail.com>
References: <20191120181131.2622-1-uwe@kleine-koenig.org>
 <CAJLcKsGef==YdFG8mSjQS=KD9zXwwpuEuJfAhxNTqHadKLOy0w@mail.gmail.com>
 <6a20ec46-f61a-a1df-5530-54031c299c97@kleine-koenig.org>
 <CAJLcKsHhA3_qaWN2bHv8tAJCg5Ymdj6rfRLN5Gb89AqDzn6hYA@mail.gmail.com>
 <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>
 <CAJLcKsH1EY3SRK3ByXBn8Exjb8bhSoJu94=7gK_-B6YHx1hvGg@mail.gmail.com>
Message-ID: <CAOiHx=m2X_oNkArn246h5uwwFn3T+RA7n0Gzf8iYOt=J4eC5MA@mail.gmail.com>

Hi,

On Tue, 3 Dec 2019 at 16:29, Hans Dedecker <dedeckeh at gmail.com> wrote:
>
> On Tue, Dec 3, 2019 at 3:59 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
> >
> > Hello Hans,
> >
> > On 12/3/19 8:50 AM, Hans Dedecker wrote:
> > > On Fri, Nov 29, 2019 at 9:29 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
> > >>
> > >> On 11/29/19 8:50 PM, Hans Dedecker wrote:
> > >>> On Wed, Nov 20, 2019 at 7:11 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
> > >>>>
> > >>>> When for example a /60 is assigned to a network the last 4 bits of the
> > >>>> ip6hint are unused. Emit a warning if any of these unused bits is set as
> > >>>> it indicates that someone didn't understand how the hint is used. (As I
> > >>>> did earlier today resulting in spending some time understanding the
> > >>>> code.)
> > >>> Patch applied with some minor tweaks
> > >>> (https://git.openwrt.org/?p=project/netifd.git;a=commit;h=e45b1408284c05984b38a910a1f0a07d6c761397);
> > >>
> > >> The updated warning message is fine.
> > >>
> > >>> I added your SoB as this was missing in the patch
> > >>
> > >> I wonder what the significance of the SoB is given that a) it's not
> > >> documented (at least in the netifd sources) and b) it seems to be ok to
> > >> "fake" someone else's SoB and c) there are several commits in the newer
> > >> history of netifd that don't have a SoB of either Author or Committer
> > >> (or both).
> > > For details why a SoB is required; see
> > > https://openwrt.org/submitting-patches#sign_your_work.
> > > If there're any commits in the netifd repo which don't have a SoB this
> > > must rather stay an exception than becoming a general rule.
> >
> > ok, so you claim my SoB means that *I* confirmed that my change is
> > compatible to the netifd's license. I didn't do that though.
> >
> > Even if it was me who added that line I doubt is has any relevance for
> > netifd because nothing in the netifd sources explains what an SoB means.
> > And the link you sent applies only to patches for openwrt, not netifd.
> > (Also if this is the only place for openwrt where the significance of an
> > SoB is described I wonder if this is relevant given that from the POV of
> > openwrt.git the wiki is an external resource that can be modified by
> > anyone. What if someone removes item (d) from the wiki or introduces an
> > (e)?)
> >
> > Don't get me wrong, my patch is compatible to netifd's license. But if
> > you want that netifd's license situation stays reasonably safe and
> > clean, it IMHO cannot be that you add a SoB for someone else, and give
> > that SoB a meaning that isn't documented for your project and assumes
> > things about that someone else that you cannot know for sure. So if you
> > require a formalism, please formalize it properly. (Of course INAL, but
> > that's my understanding of how open source licensing works.)
> I won't waste further my time and energy on this ...
> I acted in good faith and next time if I find a patch from you without
> SoB I will just simply reject it to avoid contra productive
> discussions

I have to agree with everyone, so please don't add SoBs for *anyone*
except yourself. This is basically similar to forging a signature
(just without the direct legal consequences of that).

> Patches delivered for all projects (netifd/libubox/ubus/...)
> maintained by OpenWrt must have a SoB in line what is described on the
> Wiki; this does not solely apply to the OpenWrt repo

Indeed, so patches without one, or a broken one need to be fixed by
the submitter/author. This cannot be fixed up by the maintainer
(except maybe with an explicit permission of the author).

Regards
Jonas

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From bobafetthotmail at gmail.com  Tue Dec  3 14:39:11 2019
From: bobafetthotmail at gmail.com (Alberto Bursi)
Date: Tue, 3 Dec 2019 20:39:11 +0100
Subject: [OpenWrt-Devel] The meaning of Signed-off-by for netifd [Was:
 Re: [PATCH netifd] interface: warn if ip6hint is truncated]
In-Reply-To: <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>
References: <20191120181131.2622-1-uwe@kleine-koenig.org>
 <CAJLcKsGef==YdFG8mSjQS=KD9zXwwpuEuJfAhxNTqHadKLOy0w@mail.gmail.com>
 <6a20ec46-f61a-a1df-5530-54031c299c97@kleine-koenig.org>
 <CAJLcKsHhA3_qaWN2bHv8tAJCg5Ymdj6rfRLN5Gb89AqDzn6hYA@mail.gmail.com>
 <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>
Message-ID: <8030b4b1-5de5-db3d-c3b3-57a303fcfa2a@gmail.com>



On 03/12/19 15:59, Uwe Kleine-K?nig wrote:
> Hello Hans,
> 
> On 12/3/19 8:50 AM, Hans Dedecker wrote:
>> On Fri, Nov 29, 2019 at 9:29 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
>>>
>>> On 11/29/19 8:50 PM, Hans Dedecker wrote:
>>>> On Wed, Nov 20, 2019 at 7:11 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
>>>>>
>>>>> When for example a /60 is assigned to a network the last 4 bits of the
>>>>> ip6hint are unused. Emit a warning if any of these unused bits is set as
>>>>> it indicates that someone didn't understand how the hint is used. (As I
>>>>> did earlier today resulting in spending some time understanding the
>>>>> code.)
>>>> Patch applied with some minor tweaks
>>>> (https://git.openwrt.org/?p=project/netifd.git;a=commit;h=e45b1408284c05984b38a910a1f0a07d6c761397);
>>>
>>> The updated warning message is fine.
>>>
>>>> I added your SoB as this was missing in the patch
>>>
>>> I wonder what the significance of the SoB is given that a) it's not
>>> documented (at least in the netifd sources) and b) it seems to be ok to
>>> "fake" someone else's SoB and c) there are several commits in the newer
>>> history of netifd that don't have a SoB of either Author or Committer
>>> (or both).
>> For details why a SoB is required; see
>> https://openwrt.org/submitting-patches#sign_your_work.
>> If there're any commits in the netifd repo which don't have a SoB this
>> must rather stay an exception than becoming a general rule.
> 
> ok, so you claim my SoB means that *I* confirmed that my change is
> compatible to the netifd's license. I didn't do that though.
> 
> Even if it was me who added that line I doubt is has any relevance for
> netifd because nothing in the netifd sources explains what an SoB means.
> And the link you sent applies only to patches for openwrt, not netifd.
> (Also if this is the only place for openwrt where the significance of an
> SoB is described I wonder if this is relevant given that from the POV of
> openwrt.git the wiki is an external resource that can be modified by
> anyone. What if someone removes item (d) from the wiki or introduces an
> (e)?)

The wiki is not a third party project, the stuff written in the 
submission rules was decided by or written by core OpenWrt developers.

Any change to wiki pages is reviewed and if it is wrong it is reverted 
by me or tmomas (wiki admins).

That said, I thought netifd is a daemon created by OpenWrt project so 
the submission rules should still apply.

-Alberto

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From uwe at kleine-koenig.org  Tue Dec  3 14:56:46 2019
From: uwe at kleine-koenig.org (=?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?=)
Date: Tue, 3 Dec 2019 20:56:46 +0100
Subject: [OpenWrt-Devel] The meaning of Signed-off-by for netifd [Was:
 Re: [PATCH netifd] interface: warn if ip6hint is truncated]
In-Reply-To: <CAJLcKsH1EY3SRK3ByXBn8Exjb8bhSoJu94=7gK_-B6YHx1hvGg@mail.gmail.com>
References: <20191120181131.2622-1-uwe@kleine-koenig.org>
 <CAJLcKsGef==YdFG8mSjQS=KD9zXwwpuEuJfAhxNTqHadKLOy0w@mail.gmail.com>
 <6a20ec46-f61a-a1df-5530-54031c299c97@kleine-koenig.org>
 <CAJLcKsHhA3_qaWN2bHv8tAJCg5Ymdj6rfRLN5Gb89AqDzn6hYA@mail.gmail.com>
 <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>
 <CAJLcKsH1EY3SRK3ByXBn8Exjb8bhSoJu94=7gK_-B6YHx1hvGg@mail.gmail.com>
Message-ID: <1d820be9-1d5d-364d-f270-5ebce820c5ba@kleine-koenig.org>

On 12/3/19 4:28 PM, Hans Dedecker wrote:
> On Tue, Dec 3, 2019 at 3:59 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
>>
>> Hello Hans,
>>
>> On 12/3/19 8:50 AM, Hans Dedecker wrote:
>>> On Fri, Nov 29, 2019 at 9:29 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
>>>>
>>>> On 11/29/19 8:50 PM, Hans Dedecker wrote:
>>>>> On Wed, Nov 20, 2019 at 7:11 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
>>>>>>
>>>>>> When for example a /60 is assigned to a network the last 4 bits of the
>>>>>> ip6hint are unused. Emit a warning if any of these unused bits is set as
>>>>>> it indicates that someone didn't understand how the hint is used. (As I
>>>>>> did earlier today resulting in spending some time understanding the
>>>>>> code.)
>>>>> Patch applied with some minor tweaks
>>>>> (https://git.openwrt.org/?p=project/netifd.git;a=commit;h=e45b1408284c05984b38a910a1f0a07d6c761397);
>>>>
>>>> The updated warning message is fine.
>>>>
>>>>> I added your SoB as this was missing in the patch
>>>>
>>>> I wonder what the significance of the SoB is given that a) it's not
>>>> documented (at least in the netifd sources) and b) it seems to be ok to
>>>> "fake" someone else's SoB and c) there are several commits in the newer
>>>> history of netifd that don't have a SoB of either Author or Committer
>>>> (or both).
>>> For details why a SoB is required; see
>>> https://openwrt.org/submitting-patches#sign_your_work.
>>> If there're any commits in the netifd repo which don't have a SoB this
>>> must rather stay an exception than becoming a general rule.
>>
>> ok, so you claim my SoB means that *I* confirmed that my change is
>> compatible to the netifd's license. I didn't do that though.
>>
>> Even if it was me who added that line I doubt is has any relevance for
>> netifd because nothing in the netifd sources explains what an SoB means.
>> And the link you sent applies only to patches for openwrt, not netifd.
>> (Also if this is the only place for openwrt where the significance of an
>> SoB is described I wonder if this is relevant given that from the POV of
>> openwrt.git the wiki is an external resource that can be modified by
>> anyone. What if someone removes item (d) from the wiki or introduces an
>> (e)?)
>>
>> Don't get me wrong, my patch is compatible to netifd's license. But if
>> you want that netifd's license situation stays reasonably safe and
>> clean, it IMHO cannot be that you add a SoB for someone else, and give
>> that SoB a meaning that isn't documented for your project and assumes
>> things about that someone else that you cannot know for sure. So if you
>> require a formalism, please formalize it properly. (Of course INAL, but
>> that's my understanding of how open source licensing works.)
> I won't waste further my time and energy on this ...
> I acted in good faith and next time if I find a patch from you without
> SoB I will just simply reject it to avoid contra productive
> discussions

I would have expected that the discussion is in your interest because
not being strict with licenses is something that really hurts when it
goes wrong. My intention is not to drain your energy but to highlight
the necessity[1] to be stricter with license stuff than the way my patch
was handled.

> Patches delivered for all projects (netifd/libubox/ubus/...)
> maintained by OpenWrt must have a SoB in line what is described on the
> Wiki; this does not solely apply to the OpenWrt repo
> 
> This closes the discussion for me

Fine for me, I won't press the matter any further. I wish you that this
problem won't backfire.

Bye
Uwe

[1] well, or at least what I consider to be necessary

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191203/dce2fbb9/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Tue Dec  3 15:30:15 2019
From: daniel at makrotopia.org (Daniel Golle)
Date: Tue, 3 Dec 2019 21:30:15 +0100
Subject: [OpenWrt-Devel] The meaning of Signed-off-by for netifd [Was:
 Re: [PATCH netifd] interface: warn if ip6hint is truncated]
In-Reply-To: <1d820be9-1d5d-364d-f270-5ebce820c5ba@kleine-koenig.org>
References: <20191120181131.2622-1-uwe@kleine-koenig.org>
 <CAJLcKsGef==YdFG8mSjQS=KD9zXwwpuEuJfAhxNTqHadKLOy0w@mail.gmail.com>
 <6a20ec46-f61a-a1df-5530-54031c299c97@kleine-koenig.org>
 <CAJLcKsHhA3_qaWN2bHv8tAJCg5Ymdj6rfRLN5Gb89AqDzn6hYA@mail.gmail.com>
 <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>
 <CAJLcKsH1EY3SRK3ByXBn8Exjb8bhSoJu94=7gK_-B6YHx1hvGg@mail.gmail.com>
 <1d820be9-1d5d-364d-f270-5ebce820c5ba@kleine-koenig.org>
Message-ID: <20191203203015.GH1281@makrotopia.org>

On Tue, Dec 03, 2019 at 08:56:46PM +0100, Uwe Kleine-K?nig wrote:
> On 12/3/19 4:28 PM, Hans Dedecker wrote:
> > On Tue, Dec 3, 2019 at 3:59 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
> >>
> >> Hello Hans,
> >>
> >> On 12/3/19 8:50 AM, Hans Dedecker wrote:
> >>> On Fri, Nov 29, 2019 at 9:29 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
> >>>>
> >>>> On 11/29/19 8:50 PM, Hans Dedecker wrote:
> >>>>> On Wed, Nov 20, 2019 at 7:11 PM Uwe Kleine-K?nig <uwe at kleine-koenig.org> wrote:
> >>>>>>
> >>>>>> When for example a /60 is assigned to a network the last 4 bits of the
> >>>>>> ip6hint are unused. Emit a warning if any of these unused bits is set as
> >>>>>> it indicates that someone didn't understand how the hint is used. (As I
> >>>>>> did earlier today resulting in spending some time understanding the
> >>>>>> code.)
> >>>>> Patch applied with some minor tweaks
> >>>>> (https://git.openwrt.org/?p=project/netifd.git;a=commit;h=e45b1408284c05984b38a910a1f0a07d6c761397);
> >>>>
> >>>> The updated warning message is fine.
> >>>>
> >>>>> I added your SoB as this was missing in the patch
> >>>>
> >>>> I wonder what the significance of the SoB is given that a) it's not
> >>>> documented (at least in the netifd sources) and b) it seems to be ok to
> >>>> "fake" someone else's SoB and c) there are several commits in the newer
> >>>> history of netifd that don't have a SoB of either Author or Committer
> >>>> (or both).
> >>> For details why a SoB is required; see
> >>> https://openwrt.org/submitting-patches#sign_your_work.
> >>> If there're any commits in the netifd repo which don't have a SoB this
> >>> must rather stay an exception than becoming a general rule.
> >>
> >> ok, so you claim my SoB means that *I* confirmed that my change is
> >> compatible to the netifd's license. I didn't do that though.
> >>
> >> Even if it was me who added that line I doubt is has any relevance for
> >> netifd because nothing in the netifd sources explains what an SoB means.
> >> And the link you sent applies only to patches for openwrt, not netifd.
> >> (Also if this is the only place for openwrt where the significance of an
> >> SoB is described I wonder if this is relevant given that from the POV of
> >> openwrt.git the wiki is an external resource that can be modified by
> >> anyone. What if someone removes item (d) from the wiki or introduces an
> >> (e)?)
> >>
> >> Don't get me wrong, my patch is compatible to netifd's license. But if
> >> you want that netifd's license situation stays reasonably safe and
> >> clean, it IMHO cannot be that you add a SoB for someone else, and give
> >> that SoB a meaning that isn't documented for your project and assumes
> >> things about that someone else that you cannot know for sure. So if you
> >> require a formalism, please formalize it properly. (Of course INAL, but
> >> that's my understanding of how open source licensing works.)
> > I won't waste further my time and energy on this ...
> > I acted in good faith and next time if I find a patch from you without
> > SoB I will just simply reject it to avoid contra productive
> > discussions

Yes, and please do so as well for anyone else who doesn't add SoB
herself.

> 
> I would have expected that the discussion is in your interest because
> not being strict with licenses is something that really hurts when it
> goes wrong. My intention is not to drain your energy but to highlight
> the necessity[1] to be stricter with license stuff than the way my patch
> was handled.

I definitely agree, adding SoB on behalf of someone else should not
happen and I haven't seen it happening before this occasion.

> 
> > Patches delivered for all projects (netifd/libubox/ubus/...)
> > maintained by OpenWrt must have a SoB in line what is described on the
> > Wiki; this does not solely apply to the OpenWrt repo
> > 
> > This closes the discussion for me
> 
> Fine for me, I won't press the matter any further. I wish you that this
> problem won't backfire.

I hope as well...

> 
> Bye
> Uwe
> 
> [1] well, or at least what I consider to be necessary
> 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From moritzwarning at web.de  Tue Dec  3 16:02:32 2019
From: moritzwarning at web.de (Moritz Warning)
Date: Tue,  3 Dec 2019 22:02:32 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix inverted reset led for ravpower
 wd03
Message-ID: <20191203210232.29432-1-moritzwarning@web.de>

Signed-off-by: Moritz Warning <moritzwarning at web.de>
---
 target/linux/ramips/dts/mt7620n_ravpower_wd03.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
index 7dcff46917..bcc1e2c27b 100644
--- a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
+++ b/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
@@ -32,7 +32,7 @@

 		reset {
 			label = "reset";
-			gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
+			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_RESTART>;
 		};
 	};
--
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ynezz at true.cz  Tue Dec  3 16:12:59 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Tue, 3 Dec 2019 22:12:59 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix inverted reset led for
 ravpower wd03
In-Reply-To: <20191203210232.29432-1-moritzwarning@web.de>
References: <20191203210232.29432-1-moritzwarning@web.de>
Message-ID: <20191203211259.GA31638@meh.true.cz>

Moritz Warning <moritzwarning at web.de> [2019-12-03 22:02:32]:

Missing commit description, led -> button in the commit subject.

> Signed-off-by: Moritz Warning <moritzwarning at web.de>
> ---
>  target/linux/ramips/dts/mt7620n_ravpower_wd03.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
> index 7dcff46917..bcc1e2c27b 100644
> --- a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
> +++ b/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
> @@ -32,7 +32,7 @@
> 
>  		reset {
>  			label = "reset";
> -			gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
> +			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
>  			linux,code = <KEY_RESTART>;
>  		};
>  	};
> --
> 2.23.0

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ldir at darbyshire-bryant.me.uk  Tue Dec  3 16:41:57 2019
From: ldir at darbyshire-bryant.me.uk (Kevin Darbyshire-Bryant)
Date: Tue,  3 Dec 2019 21:41:57 +0000
Subject: [OpenWrt-Devel] Merged: kernel: act_ctinfo: update backport
In-Reply-To: <20191126084537.30505-1-ldir@darbyshire-bryant.me.uk>
References: <20191126084537.30505-1-ldir@darbyshire-bryant.me.uk>
Message-ID: <20191203214157.48529-1-ldir@darbyshire-bryant.me.uk>

Merged into my staging tree.
Thank you!


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From louise.davila at dataexcelbiz.com  Tue Dec  3 17:22:36 2019
From: louise.davila at dataexcelbiz.com (Louise Davila)
Date: Wed, 4 Dec 2019 03:52:36 +0530
Subject: [OpenWrt-Devel] Contact List of Urologists
Message-ID: <!&!AAAAAAAAAAAYAAAAAAAAAM47CqPN9MVNk3I8auAjAXDCgAAAEAAAAOEs53yauCdLtE19isFcRrABAAAAAA==@dataexcelbiz.com>

 

 

Hi,

 

I wanted to check if you'd be interested in procuring records of Urologists?

 

If  you are interested let me know your target geography so, that I can
revert with counts and pricing.

 

Awaiting for your quick response.

 

Best Regards,

Louise Davila

Sr. Marketing Manager

 

If you do not wish to receive future emails from us, please reply as
'REMOVE'

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191204/b490b228/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From moritzwarning at web.de  Tue Dec  3 17:33:13 2019
From: moritzwarning at web.de (Moritz Warning)
Date: Tue,  3 Dec 2019 23:33:13 +0100
Subject: [OpenWrt-Devel] [PATCH v2] ramips: fix inverted reset led for
 ravpower wd03
Message-ID: <20191203223313.11820-1-moritzwarning@web.de>

Signed-off-by: Moritz Warning <moritzwarning at web.de>
---
 target/linux/ramips/dts/mt7620n_ravpower_wd03.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
index 7dcff46917..bcc1e2c27b 100644
--- a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
+++ b/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
@@ -32,7 +32,7 @@

 		reset {
 			label = "reset";
-			gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
+			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_RESTART>;
 		};
 	};
--
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From moritzwarning at web.de  Tue Dec  3 17:36:13 2019
From: moritzwarning at web.de (Moritz Warning)
Date: Tue,  3 Dec 2019 23:36:13 +0100
Subject: [OpenWrt-Devel] [PATCH v3] ramips: fix inverted reset button for
 Ravpower WD03
Message-ID: <20191203223613.12661-1-moritzwarning@web.de>

The button events "pressed" and "released" were switched. Tested with v18.06.4.

Signed-off-by: Moritz Warning <moritzwarning at web.de>
---
 target/linux/ramips/dts/mt7620n_ravpower_wd03.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
index 7dcff46917..bcc1e2c27b 100644
--- a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
+++ b/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
@@ -32,7 +32,7 @@

 		reset {
 			label = "reset";
-			gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
+			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_RESTART>;
 		};
 	};
--
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Tue Dec  3 17:37:43 2019
From: daniel at makrotopia.org (Daniel Golle)
Date: Tue, 3 Dec 2019 23:37:43 +0100
Subject: [OpenWrt-Devel] [PATCH v2] ramips: fix inverted reset led for
 ravpower wd03
In-Reply-To: <20191203223313.11820-1-moritzwarning@web.de>
References: <20191203223313.11820-1-moritzwarning@web.de>
Message-ID: <20191203223743.GK1281@makrotopia.org>

Still, now commit description and title mentions 'led' though this
is a key and not an LED.

On Tue, Dec 03, 2019 at 11:33:13PM +0100, Moritz Warning wrote:
> Signed-off-by: Moritz Warning <moritzwarning at web.de>
> ---
>  target/linux/ramips/dts/mt7620n_ravpower_wd03.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts b/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
> index 7dcff46917..bcc1e2c27b 100644
> --- a/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
> +++ b/target/linux/ramips/dts/mt7620n_ravpower_wd03.dts
> @@ -32,7 +32,7 @@
> 
>  		reset {
>  			label = "reset";
> -			gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
> +			gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
>  			linux,code = <KEY_RESTART>;
>  		};
>  	};
> --
> 2.23.0
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Wed Dec  4 03:18:23 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Wed, 4 Dec 2019 11:18:23 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?MTAwIMvz9/jo9SD06Ov87O7iIOzo8O7i7uPu?=
	=?cp1251?b?IOro7eXs4PLu4/Dg9OAg4iDu8uvo9+3u7CDq4Pfl8fLi5S4gMDVf?=
	=?cp1251?q?08=5F2019_02=5F10_199508?=
Message-ID: <mailman.15533.1575447617.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: 100 ?????? ??????? ???????? ????????????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Wed, 4 Dec 2019 11:18:23 +0300
Size: 59298
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191204/e387587b/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From marcin.zieba at ehlo.red  Wed Dec  4 03:44:26 2019
From: marcin.zieba at ehlo.red (=?UTF-8?Q?Marcin_Zi=c4=99ba?=)
Date: Wed, 4 Dec 2019 09:44:26 +0100
Subject: [OpenWrt-Devel] Security Advisory 2019-11-05-1 - LuCI stored XSS
In-Reply-To: <09cccd72-f969-0324-f78a-a1c416406f50@hauke-m.de>
References: <09cccd72-f969-0324-f78a-a1c416406f50@hauke-m.de>
Message-ID: <2daeff27-c33b-c472-4566-fd414ead0254@ehlo.red>

Hi all,

any news regarding CVE assignment ?

Regards,
Marcin

On 13/11/2019 23:34, Hauke Mehrtens wrote:
> Security Advisory 2019-11-05-1 - LuCI stored XSS
>
>
> DESCRIPTION
>
> A vulnerability has been reported in LuCI which allows injection of
> script code through maliciously crafted wireless network SSIDs.
>
> When joining a wireless network by clicking Network -> Wireless -> Join,
> the subsequent configuration view interprets the SSID of the network
> to join without proper escaping, allowing to execute arbitrary
> JavaScript in the client's web browser through network names which
> contains payload, for example
> AP</h2><svg onclick=alert(0);>
>
> Additionally the network interface overview displays configured wireless
> network SSID without proper escaping.
>
> Since the SSID string is stored in the UCI configuration, the issue
> effectively becomes a stored Stored Cross Site Scripting (XSS)
> vulnerability.
>
>
> REQUIREMENTS
>
> In order to exploit this vulnerability, a user needs to either
> explicitly pick a network with a malicious SSID from the wireless scan
> result list or manually add a wireless network with an SSID containing
> embedded script and browsing to the network interface overview page.
>
> The wireless scan result list is not affected by this issue, so no
> automatic script code execution is possible through it.
>
>
> MITIGATIONS
>
> To fix this issue, update the affected LuCI package using the command
> below. The fix is contained in version `git-19.309.48729-bc17ef673` and
> later.
>
>    `opkg update; opkg upgrade luci-mod-admin-full`
>
> To workaround the problem, avoid joining networks with HTML code in the
> SSID.
>
>
> AFFECTED VERSIONS
>
> To our knowledge, LuCI packages with OpenWrt versions 18.06.0 to 18.06.4
> are affected. OpenWrt 19.07 is not affected by this problem.
> The fixed LuCI packages are integrated in the OpenWrt 18.06.5. Older
> versions of OpenWrt (e.g. OpenWrt 15.05 and LEDE 17.01) are end of life
> and not supported any more.
>
>
> CREDITS
>
> The issue has been reported by Marcin Zieba <marcin.zieba at ehlo.red> on
> 27th October 2019 and independently by Ridwan Maulana <mrm at asdqwe.net>
> on 5th November 2019.
> The issue has been fixed by Jo-Philipp Wich <jo at mein.io>
>
>
> REFERENCES
>
> https://github.com/openwrt/luci/commit/bc17ef673f734ea8e7e696ba5735588da9111dcd


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191204/93511f38/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fe at dev.tdt.de  Wed Dec  4 05:30:47 2019
From: fe at dev.tdt.de (Florian Eckert)
Date: Wed,  4 Dec 2019 11:30:47 +0100
Subject: [OpenWrt-Devel] [PATCH] wireguard: skip peer config if public key
 of the peer is not defined
Message-ID: <20191204103047.17139-1-fe@dev.tdt.de>

If a config section of a peer does not have a public key defined, the
whole interface does not start. The following log is shown

daemon.notice netifd: test (21071): Line unrecognized: `PublicKey='
daemon.notice netifd: test (21071): Configuration parsing erro

The command 'wg show' does only show the interface name.

With this change we skip the peer for this interface and emit a log
message. So the other peers get configured.

Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
 package/network/services/wireguard/files/wireguard.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/network/services/wireguard/files/wireguard.sh b/package/network/services/wireguard/files/wireguard.sh
index 4c811c6ba9..f89be583f7 100644
--- a/package/network/services/wireguard/files/wireguard.sh
+++ b/package/network/services/wireguard/files/wireguard.sh
@@ -42,6 +42,11 @@ proto_wireguard_setup_peer() {
 	config_get endpoint_port "${peer_config}" "endpoint_port"
 	config_get persistent_keepalive "${peer_config}" "persistent_keepalive"
 
+	if [ -z "$public_key" ]; then
+		echo "Skipping peer config $peer_config public key not defined"
+		return 0
+	fi
+
 	echo "[Peer]" >> "${wg_cfg}"
 	echo "PublicKey=${public_key}" >> "${wg_cfg}"
 	if [ "${preshared_key}" ]; then
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fe at dev.tdt.de  Wed Dec  4 08:04:50 2019
From: fe at dev.tdt.de (Florian Eckert)
Date: Wed,  4 Dec 2019 14:04:50 +0100
Subject: [OpenWrt-Devel] [PATCH] wireguard: fix interface remove on lonely
 peers
Message-ID: <20191204130450.14177-1-fe@dev.tdt.de>

Redmine-patch-id: 4230
If we delete the main wireguard interface, then the related are not
delete. They remain in the network configuration.

With this commit wo get called on a network config change, and check if
each wireguard peer has an interface. If this is not the case delete
alle peers that do not have a related wireguard interface.

Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
This was discussed on the irc with Kevin Darbyshire-Bryant alias ldir
on the irc that this is a bug and should be get fixed.

 package/network/services/wireguard/Makefile   |  2 ++
 .../services/wireguard/files/wireguard.init   | 31 +++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 package/network/services/wireguard/files/wireguard.init

diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile
index ea34b7550b..d78fcfface 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -93,6 +93,8 @@ define Package/wireguard-tools/install
 	$(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
 	$(INSTALL_DIR) $(1)/lib/netifd/proto/
 	$(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
+	$(INSTALL_DIR) $(1)/etc/init.d/
+	$(INSTALL_BIN) ./files/wireguard.init $(1)/etc/init.d/wireguard
 endef
 
 define KernelPackage/wireguard
diff --git a/package/network/services/wireguard/files/wireguard.init b/package/network/services/wireguard/files/wireguard.init
new file mode 100644
index 0000000000..781d0839bc
--- /dev/null
+++ b/package/network/services/wireguard/files/wireguard.init
@@ -0,0 +1,31 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+USE_PROCD=1
+
+service_triggers() {
+	procd_add_reload_trigger "network"
+}
+
+reload_service() {
+	# delete old peers of related wireguard interface
+	wireguard_check_peers
+}
+
+wireguard_check_peers() {
+	local iface peer
+
+	# get all wireguard peers
+	for peer in $(uci show network | grep =wireguard_); do
+		# extract peer section type
+		peer="${peer##*=}"
+		# extract interface name
+		iface="${peer#*_}"
+
+		# delete peer if iface is not present anymore
+		if ! uci -q show "network.${iface}" 1>/dev/null 2>/dev/null; then
+			uci -q delete "network.@${peer}[-1]"
+			uci commit network
+		fi
+	done
+}
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From pozega.tomislav at gmail.com  Wed Dec  4 08:37:12 2019
From: pozega.tomislav at gmail.com (Tom Psyborg)
Date: Wed, 4 Dec 2019 14:37:12 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <012e01d5a9d6$c03434c0$409c9e40$@adrianschmutzler.de>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
 <20191203120930.GC8181@meh.true.cz>
 <010701d5a9d3$92f3c320$b8db4960$@adrianschmutzler.de>
 <20191203123144.GE8181@meh.true.cz>
 <12d89195-b1b7-5f9e-52a8-5411ad142733@linux-ipv6.be>
 <012e01d5a9d6$c03434c0$409c9e40$@adrianschmutzler.de>
Message-ID: <CAKR_QVJJGjHrwj=vE_UkAi4YkKQYLarJgT250jCJ2zTQTxfRsA@mail.gmail.com>

Current changes from Stijn's branch look fine, I've applied them to
the master clone from Dec 2nd, built and flashed; mac addresses are
correct, ethernet is working as well as both wifi interfaces.

On 03/12/2019, Adrian Schmutzler <mail at adrianschmutzler.de> wrote:
> LGTM. (Haven't checked the network setup.) :-)
>
> Adrian
>
>> -----Original Message-----
>> From: Stijn Tintel [mailto:stijn at linux-ipv6.be]
>> Sent: Dienstag, 3. Dezember 2019 13:33
>> To: Petr ?tetiar <ynezz at true.cz>; Adrian Schmutzler
>> <mail at adrianschmutzler.de>
>> Cc: openwrt-devel at lists.openwrt.org; pozega.tomislav at gmail.com
>> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
>> LiteBeam
>> AC Gen2
>>
>> On 3/12/2019 14:31, Petr ?tetiar wrote:
>> > Adrian Schmutzler <mail at adrianschmutzler.de> [2019-12-03 13:17:04]:
>> >
>> >> Other ubnt-wa do this, too, they just do not define it in parent node:
>> > Ok, I've checked only the parent node.
>> >
>> >> So, the question is whether it would make sense to remove the line for
>> >> all the
>> other ubnt-wa devices, too, then.
>> > I would remove it, it doesn't make sense and is misleading.
>> >
>> > -- ynezz
>>
>> Updated my staging tree again:
>> https://git.openwrt.org/?p=openwrt/staging/stintel.git;a=shortlog;h=refs/heads
>> /lbe-5ac-gen2
>>
>> Thanks,
>> Stijn
>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From stijn at linux-ipv6.be  Wed Dec  4 08:55:56 2019
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Wed, 4 Dec 2019 15:55:56 +0200
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <CAKR_QVJJGjHrwj=vE_UkAi4YkKQYLarJgT250jCJ2zTQTxfRsA@mail.gmail.com>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
 <20191203120930.GC8181@meh.true.cz>
 <010701d5a9d3$92f3c320$b8db4960$@adrianschmutzler.de>
 <20191203123144.GE8181@meh.true.cz>
 <12d89195-b1b7-5f9e-52a8-5411ad142733@linux-ipv6.be>
 <012e01d5a9d6$c03434c0$409c9e40$@adrianschmutzler.de>
 <CAKR_QVJJGjHrwj=vE_UkAi4YkKQYLarJgT250jCJ2zTQTxfRsA@mail.gmail.com>
Message-ID: <9fe127a2-7707-c352-c669-11570377f496@linux-ipv6.be>

On 4/12/2019 15:37, Tom Psyborg wrote:
> Current changes from Stijn's branch look fine, I've applied them to
> the master clone from Dec 2nd, built and flashed; mac addresses are
> correct, ethernet is working as well as both wifi interfaces.
>
Can I get some [Ack|Review|Test]ed-by from you guys?

Thanks
Stijn


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From robert.clark at starexpolists.com  Wed Dec  4 09:01:21 2019
From: robert.clark at starexpolists.com (Robert Clark)
Date: Wed, 4 Dec 2019 09:01:21 -0500
Subject: [OpenWrt-Devel] Consumer Electronics Show - CES - 2020 Business
 Emails
Message-ID: <!&!AAAAAAAAAAAYAAAAAAAAANfBhiMXAwpEt74h+2IYpRjCgAAAGAAAAAAAAADXwYYjFwMKRLe+IftiGKUYhDjvAQEAAAAA@starexpolists.com>

Hi,

 

I am just doing follow up to check if you are interested in acquiring the
Attendees list "Consumer Electronics Show - CES - 2020?"

 

List Include Details Like: 

Company Name, Contact Name, First Name, Middle Name, Last Name, Job Title,
Website, Address, Phone Number, Fax Number, SIC Codes and Most importantly
verified Email Address.

 

Please let me know your interest to send you the number of Attendees and
cost.

 

Awaiting your reply

 

Regards,

Robert Clark,

Marketing Executive

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191204/8afedde2/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From linus.luessing at c0d3.blue  Wed Dec  4 13:14:30 2019
From: linus.luessing at c0d3.blue (=?UTF-8?q?Linus=20L=C3=BCssing?=)
Date: Wed,  4 Dec 2019 19:14:30 +0100
Subject: [OpenWrt-Devel] [PATCH v2] imx6: Adding Ka-Ro electronics TX6U-8033
 Module on MB7 baseboard support
Message-ID: <20191204181430.4675-1-linus.luessing@c0d3.blue>

From: Linus L?ssing <ll at simonwunderlich.de>

This adds support for the Ka-Ro MB7 board with a TX6U-8033 module.

Specification, according to Linux DTS commit:

    TX6U-8033:
    Processor    Freescale i.MX 6 Dual Lite, 800MHz
    RAM          1GiB DDR3 SDRAM
    ROM          4GiB eMMC
    Power supply Single 3.1V to 5.5V
    Size         31mm SO-DIMM
    Temp. Range  industrial grade (-40?C/-25?C to 105?C Tj)

The u-boot shipped by the vendor by default expects the following partition
layout:

MBR/MSDOS, disk-id '0cc66cc0' {
	0cc66cc0-01 => ext2, /vmlinuz
	0cc66cc0-02 => ext4, rootfs
}

TX6DL U-Boot > env print
append_bootargs=rootfstype=ext4
[...]
bootcmd_mmc=setenv autostart no;run bootargs_mmc;ext2load mmc 0 ${kerneladdr} vmlinuz
[...]
rootpart_uuid=0cc66cc0-02
[...]

This is also one of the reasons, why only ext4 rootfs support was added
and tested so far. No squashfs support yet.

Other than that, nothing fancy needs to be added or preserved on the
eMMC.

Cc: Simon Wunderlich <sw at simonwunderlich.de>
Signed-off-by: Linus L?ssing <ll at simonwunderlich.de>
---

Changelog v2:
* removed wildcard board names

 target/linux/imx6/Makefile                    |   2 +-
 .../imx6/base-files/etc/board.d/02_network    |   3 +-
 target/linux/imx6/base-files/lib/imx6.sh      |   4 +
 .../base-files/lib/preinit/79_move_config     |   9 ++
 .../imx6/base-files/lib/upgrade/platform.sh   | 108 +++++++++++++++++-
 target/linux/imx6/image/Makefile              |  34 ++++++
 .../linux/imx6/image/gen_karo_sdcard_img.sh   |  26 +++++
 .../imx6/patches-4.14/100-bootargs.patch      |  13 +++
 tools/Makefile                                |   1 +
 9 files changed, 197 insertions(+), 3 deletions(-)
 create mode 100755 target/linux/imx6/image/gen_karo_sdcard_img.sh

diff --git a/target/linux/imx6/Makefile b/target/linux/imx6/Makefile
index ac4300f7eb..8083a54e16 100644
--- a/target/linux/imx6/Makefile
+++ b/target/linux/imx6/Makefile
@@ -20,6 +20,6 @@ include $(INCLUDE_DIR)/target.mk
 
 KERNELNAME:=zImage dtbs
 
-DEFAULT_PACKAGES += uboot-envtools mkf2fs e2fsprogs blkid
+DEFAULT_PACKAGES += uboot-envtools mkf2fs e2fsprogs blkid partx-utils
 
 $(eval $(call BuildTarget))
diff --git a/target/linux/imx6/base-files/etc/board.d/02_network b/target/linux/imx6/base-files/etc/board.d/02_network
index 6ec667346d..c662be72b7 100755
--- a/target/linux/imx6/base-files/etc/board.d/02_network
+++ b/target/linux/imx6/base-files/etc/board.d/02_network
@@ -21,7 +21,8 @@ cubox-i |\
 *gw552x)
 	ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
 	;;
-*wandboard)
+*wandboard |\
+tx6u-8033)
 	ucidef_set_interface_wan 'eth0'
 	;;
 esac
diff --git a/target/linux/imx6/base-files/lib/imx6.sh b/target/linux/imx6/base-files/lib/imx6.sh
index 68caaff15f..c4b87d1c21 100755
--- a/target/linux/imx6/base-files/lib/imx6.sh
+++ b/target/linux/imx6/base-files/lib/imx6.sh
@@ -99,6 +99,10 @@ imx6_board_detect() {
 		name="wandboard"
 		;;
 
+	"Ka-Ro electronics TX6U-8033 Module on MB7 baseboard")
+		name="tx6u-8033"
+		;;
+
 	*)
 		name="generic"
 		;;
diff --git a/target/linux/imx6/base-files/lib/preinit/79_move_config b/target/linux/imx6/base-files/lib/preinit/79_move_config
index bdf397c4fc..de7196c7a1 100644
--- a/target/linux/imx6/base-files/lib/preinit/79_move_config
+++ b/target/linux/imx6/base-files/lib/preinit/79_move_config
@@ -15,6 +15,15 @@ move_config() {
 			umount /boot
 		fi
 		;;
+	tx6u-8033)
+		local bootpart=/dev/mmcblk2p1
+
+		if [ -b $bootpart ]; then
+			mkdir -p /boot
+			mount -t ext2 -o rw,noatime $bootpart /boot
+			[ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
+		fi
+		;;
 	esac
 }
 
diff --git a/target/linux/imx6/base-files/lib/upgrade/platform.sh b/target/linux/imx6/base-files/lib/upgrade/platform.sh
index a090cc080b..9c9bed96fe 100755
--- a/target/linux/imx6/base-files/lib/upgrade/platform.sh
+++ b/target/linux/imx6/base-files/lib/upgrade/platform.sh
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2015 OpenWrt.org
+# Copyright (C) 2010-2019 OpenWrt.org
 #
 
 . /lib/imx6.sh
@@ -30,6 +30,102 @@ apalis_do_upgrade() {
 	umount /boot
 }
 
+# (mostly) copied from brcm2708 platform.sh (which was copied from x86?)
+tx6u_8033_check_image() {
+	local diskdev partdev diff
+
+	[ "$#" -gt 1 ] && return 1
+
+	export_bootdevice && export_partdevice diskdev 0 || {
+		echo "Unable to determine upgrade device"
+		return 1
+	}
+
+	get_partitions "/dev/$diskdev" bootdisk
+
+	#extract the boot sector from the image
+	get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b 2>/dev/null
+
+	get_partitions /tmp/image.bs image
+
+	#compare tables
+	diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
+
+	rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image
+
+	if [ -n "$diff" ]; then
+		echo "Partition layout has changed. Full image will be written."
+		ask_bool 0 "Abort" && exit 1
+		return 0
+	fi
+
+	return 0;
+}
+
+# (mostly) copied from brcm2708 platform.sh (which was copied from x86?)
+tx6u_8033_do_upgrade() {
+	local diskdev partdev diff
+
+	export_bootdevice && export_partdevice diskdev 0 || {
+		echo "Unable to determine upgrade device"
+		return 1
+	}
+
+	sync
+
+	if [ "$SAVE_PARTITIONS" = "1" ]; then
+		get_partitions "/dev/$diskdev" bootdisk
+
+		#extract the boot sector from the image
+		get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b
+
+		get_partitions /tmp/image.bs image
+
+		#compare tables
+		diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
+	else
+		diff=1
+	fi
+
+	if [ -n "$diff" ]; then
+		get_image "$@" | dd of="/dev/$diskdev" bs=2M conv=fsync
+
+		# Separate removal and addtion is necessary; otherwise, partition 1
+		# will be missing if it overlaps with the old partition 2
+		partx -d - "/dev/$diskdev"
+		partx -a - "/dev/$diskdev"
+
+		return 0
+	fi
+
+	#iterate over each partition from the image and write it to the boot disk
+	while read part start size; do
+		if export_partdevice partdev $part; then
+			echo "Writing image to /dev/$partdev..."
+			get_image "$@" | dd of="/dev/$partdev" ibs="512" obs=1M skip="$start" count="$size" conv=fsync
+		else
+			echo "Unable to find partition $part device, skipped."
+	fi
+	done < /tmp/partmap.image
+
+	#copy partition uuid
+	echo "Writing new UUID to /dev/$diskdev..."
+	get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
+}
+
+# (mostly) copied from brcm2708 platform.sh (which was copied from x86?)
+tx6u_8033_copy_config() {
+	local partdev
+
+	if export_partdevice partdev 1; then
+		mkdir -p /boot
+		[ -f /boot/vmlinuz.img ] || mount -t ext4 -o rw,noatime "/dev/$partdev" /boot
+		cp -af "$UPGRADE_BACKUP" "/boot/$BACKUP_FILE"
+		sync
+		unmount /boot
+	fi
+}
+
 platform_check_image() {
 	local board=$(board_name)
 
@@ -41,6 +137,10 @@ platform_check_image() {
 		nand_do_platform_check $board $1
 		return $?;
 		;;
+	tx6u-8033)
+		tx6u_8033_check_image "$1"
+		return $?;
+		;;
 	esac
 
 	echo "Sysupgrade is not yet supported on $board."
@@ -57,6 +157,9 @@ platform_do_upgrade() {
 	*gw5*)
 		nand_do_upgrade "$1"
 		;;
+	tx6u-8033)
+		tx6u_8033_do_upgrade "$1"
+		;;
 	esac
 }
 
@@ -67,6 +170,9 @@ platform_copy_config() {
 	apalis*)
 		apalis_copy_config
 		;;
+	tx6u-8033)
+		tx6u_8033_copy_config
+		;;
 	esac
 }
 
diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile
index d1e9e9034e..34fb4a2690 100644
--- a/target/linux/imx6/image/Makefile
+++ b/target/linux/imx6/image/Makefile
@@ -113,6 +113,24 @@ define Build/apalis-emmc
 	$(Build/imx6-combined-image-clean)
 endef
 
+define Build/karo-boot-img
+	$(RM) -rf $@.bootdir
+	mkdir $@.bootdir
+
+	$(CP) $(IMAGE_KERNEL) $@.bootdir/$(KERNEL_IMG)
+
+	genext2fs --block-size $(BLOCKSIZE:%k=%Ki) --size-in-blocks $$((1024 * 1024 * $(CONFIG_TARGET_KERNEL_PARTSIZE) / ($(subst k,* 1024,$(BLOCKSIZE))))) --root $@.bootdir $@.boot
+
+	# convert it to revision 1 - needed for u-boot ext2load
+	$(STAGING_DIR_HOST)/bin/tune2fs -O filetype $@.boot
+	$(STAGING_DIR_HOST)/bin/e2fsck -pDf $@.boot > /dev/null
+endef
+
+define Build/karo-sdcard-img
+	./gen_karo_sdcard_img.sh $@ $@.boot $(IMAGE_ROOTFS) $(CONFIG_TARGET_KERNEL_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
+endef
+
+
 #################################################
 # Devices
 #################################################
@@ -232,4 +250,20 @@ define Device/apalis
 endef
 TARGET_DEVICES += apalis
 
+define Device/tx6u-8033
+  DEVICE_TITLE := Ka-Ro electronics TX6U-8033 Module on MB7 baseboard
+  DEVICE_DTS := imx6dl-tx6u-8033
+  FILESYSTEMS := ext4
+  BLOCKSIZE := 4k
+  KERNEL_SUFFIX := -zImage
+  KERNEL_NAME := zImage
+  KERNEL := kernel-bin
+  KERNEL_IMG := vmlinuz
+  IMAGES := factory.img.gz sysupgrade.img.gz
+  IMAGE_SIZE := 3776m
+  IMAGE/sysupgrade.img.gz := karo-boot-img | karo-sdcard-img | check-size $$$$(IMAGE_SIZE) | gzip | append-metadata
+  IMAGE/factory.img.gz := karo-boot-img | karo-sdcard-img | check-size $$$$(IMAGE_SIZE) | gzip
+endef
+TARGET_DEVICES += tx6u-8033
+
 $(eval $(call BuildImage))
diff --git a/target/linux/imx6/image/gen_karo_sdcard_img.sh b/target/linux/imx6/image/gen_karo_sdcard_img.sh
new file mode 100755
index 0000000000..362ce5838b
--- /dev/null
+++ b/target/linux/imx6/image/gen_karo_sdcard_img.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+set -x
+[ $# -eq 5 ] || {
+    echo "SYNTAX: $0 <file> <bootfs image> <rootfs image> <bootfs size> <rootfs size>"
+    exit 1
+}
+
+OUTPUT="$1"
+BOOTFS="$2"
+ROOTFS="$3"
+BOOTFSSIZE="$4"
+ROOTFSSIZE="$5"
+
+head=4
+sect=63
+
+set `ptgen -o $OUTPUT -h $head -s $sect -l 4096 -t 83 -S 0x0cc66cc0 -p ${BOOTFSSIZE}M -t 83 -p ${ROOTFSSIZE}M`
+
+BOOTOFFSET="$(($1 / 512))"
+BOOTSIZE="$(($2 / 512))"
+ROOTFSOFFSET="$(($3 / 512))"
+ROOTFSSIZE="$(($4 / 512))"
+
+dd bs=512 if="$BOOTFS" of="$OUTPUT" seek="$BOOTOFFSET" conv=notrunc
+dd bs=512 if="$ROOTFS" of="$OUTPUT" seek="$ROOTFSOFFSET" conv=notrunc
diff --git a/target/linux/imx6/patches-4.14/100-bootargs.patch b/target/linux/imx6/patches-4.14/100-bootargs.patch
index 0954391203..6c025e15db 100644
--- a/target/linux/imx6/patches-4.14/100-bootargs.patch
+++ b/target/linux/imx6/patches-4.14/100-bootargs.patch
@@ -1,3 +1,16 @@
+--- a/arch/arm/boot/dts/imx6dl-tx6u-8033.dts
++++ b/arch/arm/boot/dts/imx6dl-tx6u-8033.dts
+@@ -51,6 +51,10 @@
+ 		display = &display;
+ 	};
+ 
++	chosen {
++		bootargs = "console=ttymxc0,115200";
++	};
++
+ 	backlight: backlight {
+ 		compatible = "pwm-backlight";
+ 		pwms = <&pwm2 0 500000 PWM_POLARITY_INVERTED>;
 --- a/arch/arm/boot/dts/imx6dl-wandboard.dts
 +++ b/arch/arm/boot/dts/imx6dl-wandboard.dts
 @@ -19,4 +19,8 @@
diff --git a/tools/Makefile b/tools/Makefile
index 2f57d25525..034e54c5d9 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -39,6 +39,7 @@ tools-$(BUILD_ISL) += isl
 tools-$(CONFIG_USE_SPARSE) += sparse
 tools-$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini) += genext2fs
 tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs
+tools-$(CONFIG_TARGET_imx6) += genext2fs
 
 # builddir dependencies
 $(curdir)/bison/compile := $(curdir)/flex/compile
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From tomek_n at o2.pl  Wed Dec  4 13:52:32 2019
From: tomek_n at o2.pl (Tomasz Maciej Nowak)
Date: Wed, 4 Dec 2019 19:52:32 +0100
Subject: [OpenWrt-Devel] [PATCH v2] imx6: Adding Ka-Ro electronics
 TX6U-8033 Module on MB7 baseboard support
In-Reply-To: <20191204181430.4675-1-linus.luessing@c0d3.blue>
References: <20191204181430.4675-1-linus.luessing@c0d3.blue>
Message-ID: <d7dfd705-e311-4f63-b116-1b09dcb3e13b@o2.pl>

Hi,
small nit at the end.

W dniu 04.12.2019 o?19:14, Linus L?ssing pisze:
> From: Linus L?ssing <ll at simonwunderlich.de>
> 
> This adds support for the Ka-Ro MB7 board with a TX6U-8033 module.
> 
> Specification, according to Linux DTS commit:
> 
>     TX6U-8033:
>     Processor    Freescale i.MX 6 Dual Lite, 800MHz
>     RAM          1GiB DDR3 SDRAM
>     ROM          4GiB eMMC
>     Power supply Single 3.1V to 5.5V
>     Size         31mm SO-DIMM
>     Temp. Range  industrial grade (-40?C/-25?C to 105?C Tj)
> 
> The u-boot shipped by the vendor by default expects the following partition
> layout:
> 
> MBR/MSDOS, disk-id '0cc66cc0' {
> 	0cc66cc0-01 => ext2, /vmlinuz
> 	0cc66cc0-02 => ext4, rootfs
> }
> 
> TX6DL U-Boot > env print
> append_bootargs=rootfstype=ext4
> [...]
> bootcmd_mmc=setenv autostart no;run bootargs_mmc;ext2load mmc 0 ${kerneladdr} vmlinuz
> [...]
> rootpart_uuid=0cc66cc0-02
> [...]
> 
> This is also one of the reasons, why only ext4 rootfs support was added
> and tested so far. No squashfs support yet.
> 
> Other than that, nothing fancy needs to be added or preserved on the
> eMMC.
> 
> Cc: Simon Wunderlich <sw at simonwunderlich.de>
> Signed-off-by: Linus L?ssing <ll at simonwunderlich.de>
> ---
> 
> Changelog v2:
> * removed wildcard board names
> 
>  target/linux/imx6/Makefile                    |   2 +-
>  .../imx6/base-files/etc/board.d/02_network    |   3 +-
>  target/linux/imx6/base-files/lib/imx6.sh      |   4 +
>  .../base-files/lib/preinit/79_move_config     |   9 ++
>  .../imx6/base-files/lib/upgrade/platform.sh   | 108 +++++++++++++++++-
>  target/linux/imx6/image/Makefile              |  34 ++++++
>  .../linux/imx6/image/gen_karo_sdcard_img.sh   |  26 +++++
>  .../imx6/patches-4.14/100-bootargs.patch      |  13 +++
>  tools/Makefile                                |   1 +
>  9 files changed, 197 insertions(+), 3 deletions(-)
>  create mode 100755 target/linux/imx6/image/gen_karo_sdcard_img.sh
> 
> diff --git a/target/linux/imx6/Makefile b/target/linux/imx6/Makefile
> index ac4300f7eb..8083a54e16 100644
> --- a/target/linux/imx6/Makefile
> +++ b/target/linux/imx6/Makefile
> @@ -20,6 +20,6 @@ include $(INCLUDE_DIR)/target.mk
>  
>  KERNELNAME:=zImage dtbs
>  
> -DEFAULT_PACKAGES += uboot-envtools mkf2fs e2fsprogs blkid
> +DEFAULT_PACKAGES += uboot-envtools mkf2fs e2fsprogs blkid partx-utils
>  
>  $(eval $(call BuildTarget))
> diff --git a/target/linux/imx6/base-files/etc/board.d/02_network b/target/linux/imx6/base-files/etc/board.d/02_network
> index 6ec667346d..c662be72b7 100755
> --- a/target/linux/imx6/base-files/etc/board.d/02_network
> +++ b/target/linux/imx6/base-files/etc/board.d/02_network
> @@ -21,7 +21,8 @@ cubox-i |\
>  *gw552x)
>  	ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
>  	;;
> -*wandboard)
> +*wandboard |\
> +tx6u-8033)
>  	ucidef_set_interface_wan 'eth0'
>  	;;
>  esac
> diff --git a/target/linux/imx6/base-files/lib/imx6.sh b/target/linux/imx6/base-files/lib/imx6.sh
> index 68caaff15f..c4b87d1c21 100755
> --- a/target/linux/imx6/base-files/lib/imx6.sh
> +++ b/target/linux/imx6/base-files/lib/imx6.sh
> @@ -99,6 +99,10 @@ imx6_board_detect() {
>  		name="wandboard"
>  		;;
>  
> +	"Ka-Ro electronics TX6U-8033 Module on MB7 baseboard")
> +		name="tx6u-8033"
> +		;;
> +
>  	*)
>  		name="generic"
>  		;;
> diff --git a/target/linux/imx6/base-files/lib/preinit/79_move_config b/target/linux/imx6/base-files/lib/preinit/79_move_config
> index bdf397c4fc..de7196c7a1 100644
> --- a/target/linux/imx6/base-files/lib/preinit/79_move_config
> +++ b/target/linux/imx6/base-files/lib/preinit/79_move_config
> @@ -15,6 +15,15 @@ move_config() {
>  			umount /boot
>  		fi
>  		;;
> +	tx6u-8033)
> +		local bootpart=/dev/mmcblk2p1
> +
> +		if [ -b $bootpart ]; then
> +			mkdir -p /boot
> +			mount -t ext2 -o rw,noatime $bootpart /boot
> +			[ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
> +		fi
> +		;;
>  	esac
>  }
>  
> diff --git a/target/linux/imx6/base-files/lib/upgrade/platform.sh b/target/linux/imx6/base-files/lib/upgrade/platform.sh
> index a090cc080b..9c9bed96fe 100755
> --- a/target/linux/imx6/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/imx6/base-files/lib/upgrade/platform.sh
> @@ -1,5 +1,5 @@
>  #
> -# Copyright (C) 2010-2015 OpenWrt.org
> +# Copyright (C) 2010-2019 OpenWrt.org
>  #
>  
>  . /lib/imx6.sh
> @@ -30,6 +30,102 @@ apalis_do_upgrade() {
>  	umount /boot
>  }
>  
> +# (mostly) copied from brcm2708 platform.sh (which was copied from x86?)
> +tx6u_8033_check_image() {
> +	local diskdev partdev diff
> +
> +	[ "$#" -gt 1 ] && return 1
> +
> +	export_bootdevice && export_partdevice diskdev 0 || {
> +		echo "Unable to determine upgrade device"
> +		return 1
> +	}
> +
> +	get_partitions "/dev/$diskdev" bootdisk
> +
> +	#extract the boot sector from the image
> +	get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b 2>/dev/null
> +
> +	get_partitions /tmp/image.bs image
> +
> +	#compare tables
> +	diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
> +
> +	rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image
> +
> +	if [ -n "$diff" ]; then
> +		echo "Partition layout has changed. Full image will be written."
> +		ask_bool 0 "Abort" && exit 1
> +		return 0
> +	fi
> +
> +	return 0;
> +}
> +
> +# (mostly) copied from brcm2708 platform.sh (which was copied from x86?)
> +tx6u_8033_do_upgrade() {
> +	local diskdev partdev diff
> +
> +	export_bootdevice && export_partdevice diskdev 0 || {
> +		echo "Unable to determine upgrade device"
> +		return 1
> +	}
> +
> +	sync
> +
> +	if [ "$SAVE_PARTITIONS" = "1" ]; then
> +		get_partitions "/dev/$diskdev" bootdisk
> +
> +		#extract the boot sector from the image
> +		get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b
> +
> +		get_partitions /tmp/image.bs image
> +
> +		#compare tables
> +		diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
> +	else
> +		diff=1
> +	fi
> +
> +	if [ -n "$diff" ]; then
> +		get_image "$@" | dd of="/dev/$diskdev" bs=2M conv=fsync
> +
> +		# Separate removal and addtion is necessary; otherwise, partition 1
> +		# will be missing if it overlaps with the old partition 2
> +		partx -d - "/dev/$diskdev"
> +		partx -a - "/dev/$diskdev"
> +
> +		return 0
> +	fi
> +
> +	#iterate over each partition from the image and write it to the boot disk
> +	while read part start size; do
> +		if export_partdevice partdev $part; then
> +			echo "Writing image to /dev/$partdev..."
> +			get_image "$@" | dd of="/dev/$partdev" ibs="512" obs=1M skip="$start" count="$size" conv=fsync
> +		else
> +			echo "Unable to find partition $part device, skipped."
> +	fi
> +	done < /tmp/partmap.image
> +
> +	#copy partition uuid
> +	echo "Writing new UUID to /dev/$diskdev..."
> +	get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
> +}
> +
> +# (mostly) copied from brcm2708 platform.sh (which was copied from x86?)
> +tx6u_8033_copy_config() {
> +	local partdev
> +
> +	if export_partdevice partdev 1; then
> +		mkdir -p /boot
> +		[ -f /boot/vmlinuz.img ] || mount -t ext4 -o rw,noatime "/dev/$partdev" /boot
> +		cp -af "$UPGRADE_BACKUP" "/boot/$BACKUP_FILE"
> +		sync
> +		unmount /boot
> +	fi
> +}
> +
>  platform_check_image() {
>  	local board=$(board_name)
>  
> @@ -41,6 +137,10 @@ platform_check_image() {
>  		nand_do_platform_check $board $1
>  		return $?;
>  		;;
> +	tx6u-8033)
> +		tx6u_8033_check_image "$1"
> +		return $?;
> +		;;
>  	esac
>  
>  	echo "Sysupgrade is not yet supported on $board."
> @@ -57,6 +157,9 @@ platform_do_upgrade() {
>  	*gw5*)
>  		nand_do_upgrade "$1"
>  		;;
> +	tx6u-8033)
> +		tx6u_8033_do_upgrade "$1"
> +		;;
>  	esac
>  }
>  
> @@ -67,6 +170,9 @@ platform_copy_config() {
>  	apalis*)
>  		apalis_copy_config
>  		;;
> +	tx6u-8033)
> +		tx6u_8033_copy_config
> +		;;
>  	esac
>  }
>  
> diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile
> index d1e9e9034e..34fb4a2690 100644
> --- a/target/linux/imx6/image/Makefile
> +++ b/target/linux/imx6/image/Makefile
> @@ -113,6 +113,24 @@ define Build/apalis-emmc
>  	$(Build/imx6-combined-image-clean)
>  endef
>  
> +define Build/karo-boot-img
> +	$(RM) -rf $@.bootdir
> +	mkdir $@.bootdir
> +
> +	$(CP) $(IMAGE_KERNEL) $@.bootdir/$(KERNEL_IMG)
> +
> +	genext2fs --block-size $(BLOCKSIZE:%k=%Ki) --size-in-blocks $$((1024 * 1024 * $(CONFIG_TARGET_KERNEL_PARTSIZE) / ($(subst k,* 1024,$(BLOCKSIZE))))) --root $@.bootdir $@.boot
> +
> +	# convert it to revision 1 - needed for u-boot ext2load
> +	$(STAGING_DIR_HOST)/bin/tune2fs -O filetype $@.boot
> +	$(STAGING_DIR_HOST)/bin/e2fsck -pDf $@.boot > /dev/null
> +endef
> +
> +define Build/karo-sdcard-img
> +	./gen_karo_sdcard_img.sh $@ $@.boot $(IMAGE_ROOTFS) $(CONFIG_TARGET_KERNEL_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
> +endef
> +
> +
>  #################################################
>  # Devices
>  #################################################
> @@ -232,4 +250,20 @@ define Device/apalis
>  endef
>  TARGET_DEVICES += apalis
>  
> +define Device/tx6u-8033
> +  DEVICE_TITLE := Ka-Ro electronics TX6U-8033 Module on MB7 baseboard
> +  DEVICE_DTS := imx6dl-tx6u-8033
> +  FILESYSTEMS := ext4
> +  BLOCKSIZE := 4k
> +  KERNEL_SUFFIX := -zImage
> +  KERNEL_NAME := zImage
> +  KERNEL := kernel-bin
> +  KERNEL_IMG := vmlinuz
> +  IMAGES := factory.img.gz sysupgrade.img.gz
> +  IMAGE_SIZE := 3776m
> +  IMAGE/sysupgrade.img.gz := karo-boot-img | karo-sdcard-img | check-size $$$$(IMAGE_SIZE) | gzip | append-metadata
> +  IMAGE/factory.img.gz := karo-boot-img | karo-sdcard-img | check-size $$$$(IMAGE_SIZE) | gzip
> +endef
> +TARGET_DEVICES += tx6u-8033
> +
>  $(eval $(call BuildImage))
> diff --git a/target/linux/imx6/image/gen_karo_sdcard_img.sh b/target/linux/imx6/image/gen_karo_sdcard_img.sh
> new file mode 100755
> index 0000000000..362ce5838b
> --- /dev/null
> +++ b/target/linux/imx6/image/gen_karo_sdcard_img.sh
> @@ -0,0 +1,26 @@
> +#!/usr/bin/env bash
> +
> +set -x
> +[ $# -eq 5 ] || {
> +    echo "SYNTAX: $0 <file> <bootfs image> <rootfs image> <bootfs size> <rootfs size>"
> +    exit 1
> +}
> +
> +OUTPUT="$1"
> +BOOTFS="$2"
> +ROOTFS="$3"
> +BOOTFSSIZE="$4"
> +ROOTFSSIZE="$5"
> +
> +head=4
> +sect=63
> +
> +set `ptgen -o $OUTPUT -h $head -s $sect -l 4096 -t 83 -S 0x0cc66cc0 -p ${BOOTFSSIZE}M -t 83 -p ${ROOTFSSIZE}M`
> +
> +BOOTOFFSET="$(($1 / 512))"
> +BOOTSIZE="$(($2 / 512))"
> +ROOTFSOFFSET="$(($3 / 512))"
> +ROOTFSSIZE="$(($4 / 512))"
> +
> +dd bs=512 if="$BOOTFS" of="$OUTPUT" seek="$BOOTOFFSET" conv=notrunc
> +dd bs=512 if="$ROOTFS" of="$OUTPUT" seek="$ROOTFSOFFSET" conv=notrunc
> diff --git a/target/linux/imx6/patches-4.14/100-bootargs.patch b/target/linux/imx6/patches-4.14/100-bootargs.patch
> index 0954391203..6c025e15db 100644
> --- a/target/linux/imx6/patches-4.14/100-bootargs.patch
> +++ b/target/linux/imx6/patches-4.14/100-bootargs.patch
> @@ -1,3 +1,16 @@
> +--- a/arch/arm/boot/dts/imx6dl-tx6u-8033.dts
> ++++ b/arch/arm/boot/dts/imx6dl-tx6u-8033.dts
> +@@ -51,6 +51,10 @@
> + 		display = &display;
> + 	};
> + 
> ++	chosen {
> ++		bootargs = "console=ttymxc0,115200";
> ++	};
> ++
> + 	backlight: backlight {
> + 		compatible = "pwm-backlight";
> + 		pwms = <&pwm2 0 500000 PWM_POLARITY_INVERTED>;
>  --- a/arch/arm/boot/dts/imx6dl-wandboard.dts
>  +++ b/arch/arm/boot/dts/imx6dl-wandboard.dts
>  @@ -19,4 +19,8 @@
> diff --git a/tools/Makefile b/tools/Makefile
> index 2f57d25525..034e54c5d9 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -39,6 +39,7 @@ tools-$(BUILD_ISL) += isl
>  tools-$(CONFIG_USE_SPARSE) += sparse
>  tools-$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini) += genext2fs
>  tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs
> +tools-$(CONFIG_TARGET_imx6) += genext2fs

The target for genext2fs is already specified, merge it with previous definition.

>  
>  # builddir dependencies
>  $(curdir)/bison/compile := $(curdir)/flex/compile
> 

Regards

-- 
TMN

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jo at mein.io  Wed Dec  4 15:13:11 2019
From: jo at mein.io (Jo-Philipp Wich)
Date: Wed, 4 Dec 2019 21:13:11 +0100
Subject: [OpenWrt-Devel] The meaning of Signed-off-by for netifd [Was:
 Re: [PATCH netifd] interface: warn if ip6hint is truncated]
In-Reply-To: <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>
References: <20191120181131.2622-1-uwe@kleine-koenig.org>
 <CAJLcKsGef==YdFG8mSjQS=KD9zXwwpuEuJfAhxNTqHadKLOy0w@mail.gmail.com>
 <6a20ec46-f61a-a1df-5530-54031c299c97@kleine-koenig.org>
 <CAJLcKsHhA3_qaWN2bHv8tAJCg5Ymdj6rfRLN5Gb89AqDzn6hYA@mail.gmail.com>
 <a7a0b354-7ecb-ff39-cca1-070276f8b747@kleine-koenig.org>
Message-ID: <c044cb7d-c2fb-256b-d518-19675c86a837@wwsnet.net>

Hi,

> ok, so you claim my SoB means that *I* confirmed that my change is
> compatible to the netifd's license. I didn't do that though.

as it has been pointed out on this list, adding a S-o-b without consent
should not be done, so I reverted the offending commit.

Kind regards,
Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191204/0efa54f0/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Wed Dec  4 15:35:54 2019
From: daniel at makrotopia.org (Daniel Golle)
Date: Wed, 4 Dec 2019 21:35:54 +0100
Subject: [OpenWrt-Devel] [PATCH v2] imx6: Adding Ka-Ro electronics
 TX6U-8033 Module on MB7 baseboard support
In-Reply-To: <d7dfd705-e311-4f63-b116-1b09dcb3e13b@o2.pl>
References: <20191204181430.4675-1-linus.luessing@c0d3.blue>
 <d7dfd705-e311-4f63-b116-1b09dcb3e13b@o2.pl>
Message-ID: <20191204203554.GO1281@makrotopia.org>

On Wed, Dec 04, 2019 at 07:52:32PM +0100, Tomasz Maciej Nowak wrote:
> Hi,
> small nit at the end.
> 
> W dniu 04.12.2019 o?19:14, Linus L?ssing pisze:
> > From: Linus L?ssing <ll at simonwunderlich.de>
> > 
> > This adds support for the Ka-Ro MB7 board with a TX6U-8033 module.
> > 
> > Specification, according to Linux DTS commit:
> > 
> >     TX6U-8033:
> >     Processor    Freescale i.MX 6 Dual Lite, 800MHz
> >     RAM          1GiB DDR3 SDRAM
> >     ROM          4GiB eMMC
> >     Power supply Single 3.1V to 5.5V
> >     Size         31mm SO-DIMM
> >     Temp. Range  industrial grade (-40?C/-25?C to 105?C Tj)
> > 
> > The u-boot shipped by the vendor by default expects the following partition
> > layout:
> > 
> > MBR/MSDOS, disk-id '0cc66cc0' {
> > 	0cc66cc0-01 => ext2, /vmlinuz
> > 	0cc66cc0-02 => ext4, rootfs
> > }
> > 
> > TX6DL U-Boot > env print
> > append_bootargs=rootfstype=ext4
> > [...]
> > bootcmd_mmc=setenv autostart no;run bootargs_mmc;ext2load mmc 0 ${kerneladdr} vmlinuz
> > [...]
> > rootpart_uuid=0cc66cc0-02
> > [...]
> > 
> > This is also one of the reasons, why only ext4 rootfs support was added
> > and tested so far. No squashfs support yet.

OpenWrt allows to easily ignore or even filter bootloader cmdline, this
is needed on *most* devices out there. Please add squashfs regardless,
as some features of OpenWrt (overlayfs, factory-reset, ...) are only
available when using squashfs (+f2fs in this case) and it should not
be difficult to do so. Also the rootpart_uuid should not be relevant
when using OpenWrt.

Let me know if anything is not clear of if you need help achieving
this.


> > 
> > Other than that, nothing fancy needs to be added or preserved on the
> > eMMC.
> > 
> > Cc: Simon Wunderlich <sw at simonwunderlich.de>
> > Signed-off-by: Linus L?ssing <ll at simonwunderlich.de>
> > ---
> > 
> > Changelog v2:
> > * removed wildcard board names
> > 
> >  target/linux/imx6/Makefile                    |   2 +-
> >  .../imx6/base-files/etc/board.d/02_network    |   3 +-
> >  target/linux/imx6/base-files/lib/imx6.sh      |   4 +
> >  .../base-files/lib/preinit/79_move_config     |   9 ++
> >  .../imx6/base-files/lib/upgrade/platform.sh   | 108 +++++++++++++++++-
> >  target/linux/imx6/image/Makefile              |  34 ++++++
> >  .../linux/imx6/image/gen_karo_sdcard_img.sh   |  26 +++++
> >  .../imx6/patches-4.14/100-bootargs.patch      |  13 +++
> >  tools/Makefile                                |   1 +
> >  9 files changed, 197 insertions(+), 3 deletions(-)
> >  create mode 100755 target/linux/imx6/image/gen_karo_sdcard_img.sh
> > 
> > diff --git a/target/linux/imx6/Makefile b/target/linux/imx6/Makefile
> > index ac4300f7eb..8083a54e16 100644
> > --- a/target/linux/imx6/Makefile
> > +++ b/target/linux/imx6/Makefile
> > @@ -20,6 +20,6 @@ include $(INCLUDE_DIR)/target.mk
> >  
> >  KERNELNAME:=zImage dtbs
> >  
> > -DEFAULT_PACKAGES += uboot-envtools mkf2fs e2fsprogs blkid
> > +DEFAULT_PACKAGES += uboot-envtools mkf2fs e2fsprogs blkid partx-utils
> >  
> >  $(eval $(call BuildTarget))
> > diff --git a/target/linux/imx6/base-files/etc/board.d/02_network b/target/linux/imx6/base-files/etc/board.d/02_network
> > index 6ec667346d..c662be72b7 100755
> > --- a/target/linux/imx6/base-files/etc/board.d/02_network
> > +++ b/target/linux/imx6/base-files/etc/board.d/02_network
> > @@ -21,7 +21,8 @@ cubox-i |\
> >  *gw552x)
> >  	ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
> >  	;;
> > -*wandboard)
> > +*wandboard |\
> > +tx6u-8033)
> >  	ucidef_set_interface_wan 'eth0'
> >  	;;
> >  esac
> > diff --git a/target/linux/imx6/base-files/lib/imx6.sh b/target/linux/imx6/base-files/lib/imx6.sh
> > index 68caaff15f..c4b87d1c21 100755
> > --- a/target/linux/imx6/base-files/lib/imx6.sh
> > +++ b/target/linux/imx6/base-files/lib/imx6.sh
> > @@ -99,6 +99,10 @@ imx6_board_detect() {
> >  		name="wandboard"
> >  		;;
> >  
> > +	"Ka-Ro electronics TX6U-8033 Module on MB7 baseboard")
> > +		name="tx6u-8033"
> > +		;;
> > +
> >  	*)
> >  		name="generic"
> >  		;;
> > diff --git a/target/linux/imx6/base-files/lib/preinit/79_move_config b/target/linux/imx6/base-files/lib/preinit/79_move_config
> > index bdf397c4fc..de7196c7a1 100644
> > --- a/target/linux/imx6/base-files/lib/preinit/79_move_config
> > +++ b/target/linux/imx6/base-files/lib/preinit/79_move_config
> > @@ -15,6 +15,15 @@ move_config() {
> >  			umount /boot
> >  		fi
> >  		;;
> > +	tx6u-8033)
> > +		local bootpart=/dev/mmcblk2p1
> > +
> > +		if [ -b $bootpart ]; then
> > +			mkdir -p /boot
> > +			mount -t ext2 -o rw,noatime $bootpart /boot
> > +			[ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
> > +		fi
> > +		;;
> >  	esac
> >  }
> >  
> > diff --git a/target/linux/imx6/base-files/lib/upgrade/platform.sh b/target/linux/imx6/base-files/lib/upgrade/platform.sh
> > index a090cc080b..9c9bed96fe 100755
> > --- a/target/linux/imx6/base-files/lib/upgrade/platform.sh
> > +++ b/target/linux/imx6/base-files/lib/upgrade/platform.sh
> > @@ -1,5 +1,5 @@
> >  #
> > -# Copyright (C) 2010-2015 OpenWrt.org
> > +# Copyright (C) 2010-2019 OpenWrt.org
> >  #
> >  
> >  . /lib/imx6.sh
> > @@ -30,6 +30,102 @@ apalis_do_upgrade() {
> >  	umount /boot
> >  }
> >  
> > +# (mostly) copied from brcm2708 platform.sh (which was copied from x86?)
> > +tx6u_8033_check_image() {
> > +	local diskdev partdev diff
> > +
> > +	[ "$#" -gt 1 ] && return 1
> > +
> > +	export_bootdevice && export_partdevice diskdev 0 || {
> > +		echo "Unable to determine upgrade device"
> > +		return 1
> > +	}
> > +
> > +	get_partitions "/dev/$diskdev" bootdisk
> > +
> > +	#extract the boot sector from the image
> > +	get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b 2>/dev/null
> > +
> > +	get_partitions /tmp/image.bs image
> > +
> > +	#compare tables
> > +	diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
> > +
> > +	rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image
> > +
> > +	if [ -n "$diff" ]; then
> > +		echo "Partition layout has changed. Full image will be written."
> > +		ask_bool 0 "Abort" && exit 1
> > +		return 0
> > +	fi
> > +
> > +	return 0;
> > +}
> > +
> > +# (mostly) copied from brcm2708 platform.sh (which was copied from x86?)
> > +tx6u_8033_do_upgrade() {
> > +	local diskdev partdev diff
> > +
> > +	export_bootdevice && export_partdevice diskdev 0 || {
> > +		echo "Unable to determine upgrade device"
> > +		return 1
> > +	}
> > +
> > +	sync
> > +
> > +	if [ "$SAVE_PARTITIONS" = "1" ]; then
> > +		get_partitions "/dev/$diskdev" bootdisk
> > +
> > +		#extract the boot sector from the image
> > +		get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b
> > +
> > +		get_partitions /tmp/image.bs image
> > +
> > +		#compare tables
> > +		diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
> > +	else
> > +		diff=1
> > +	fi
> > +
> > +	if [ -n "$diff" ]; then
> > +		get_image "$@" | dd of="/dev/$diskdev" bs=2M conv=fsync
> > +
> > +		# Separate removal and addtion is necessary; otherwise, partition 1
> > +		# will be missing if it overlaps with the old partition 2
> > +		partx -d - "/dev/$diskdev"
> > +		partx -a - "/dev/$diskdev"
> > +
> > +		return 0
> > +	fi
> > +
> > +	#iterate over each partition from the image and write it to the boot disk
> > +	while read part start size; do
> > +		if export_partdevice partdev $part; then
> > +			echo "Writing image to /dev/$partdev..."
> > +			get_image "$@" | dd of="/dev/$partdev" ibs="512" obs=1M skip="$start" count="$size" conv=fsync
> > +		else
> > +			echo "Unable to find partition $part device, skipped."
> > +	fi
> > +	done < /tmp/partmap.image
> > +
> > +	#copy partition uuid
> > +	echo "Writing new UUID to /dev/$diskdev..."
> > +	get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
> > +}
> > +
> > +# (mostly) copied from brcm2708 platform.sh (which was copied from x86?)
> > +tx6u_8033_copy_config() {
> > +	local partdev
> > +
> > +	if export_partdevice partdev 1; then
> > +		mkdir -p /boot
> > +		[ -f /boot/vmlinuz.img ] || mount -t ext4 -o rw,noatime "/dev/$partdev" /boot
> > +		cp -af "$UPGRADE_BACKUP" "/boot/$BACKUP_FILE"
> > +		sync
> > +		unmount /boot
> > +	fi
> > +}
> > +
> >  platform_check_image() {
> >  	local board=$(board_name)
> >  
> > @@ -41,6 +137,10 @@ platform_check_image() {
> >  		nand_do_platform_check $board $1
> >  		return $?;
> >  		;;
> > +	tx6u-8033)
> > +		tx6u_8033_check_image "$1"
> > +		return $?;
> > +		;;
> >  	esac
> >  
> >  	echo "Sysupgrade is not yet supported on $board."
> > @@ -57,6 +157,9 @@ platform_do_upgrade() {
> >  	*gw5*)
> >  		nand_do_upgrade "$1"
> >  		;;
> > +	tx6u-8033)
> > +		tx6u_8033_do_upgrade "$1"
> > +		;;
> >  	esac
> >  }
> >  
> > @@ -67,6 +170,9 @@ platform_copy_config() {
> >  	apalis*)
> >  		apalis_copy_config
> >  		;;
> > +	tx6u-8033)
> > +		tx6u_8033_copy_config
> > +		;;
> >  	esac
> >  }
> >  
> > diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile
> > index d1e9e9034e..34fb4a2690 100644
> > --- a/target/linux/imx6/image/Makefile
> > +++ b/target/linux/imx6/image/Makefile
> > @@ -113,6 +113,24 @@ define Build/apalis-emmc
> >  	$(Build/imx6-combined-image-clean)
> >  endef
> >  
> > +define Build/karo-boot-img
> > +	$(RM) -rf $@.bootdir
> > +	mkdir $@.bootdir
> > +
> > +	$(CP) $(IMAGE_KERNEL) $@.bootdir/$(KERNEL_IMG)
> > +
> > +	genext2fs --block-size $(BLOCKSIZE:%k=%Ki) --size-in-blocks $$((1024 * 1024 * $(CONFIG_TARGET_KERNEL_PARTSIZE) / ($(subst k,* 1024,$(BLOCKSIZE))))) --root $@.bootdir $@.boot
> > +
> > +	# convert it to revision 1 - needed for u-boot ext2load
> > +	$(STAGING_DIR_HOST)/bin/tune2fs -O filetype $@.boot
> > +	$(STAGING_DIR_HOST)/bin/e2fsck -pDf $@.boot > /dev/null
> > +endef
> > +
> > +define Build/karo-sdcard-img
> > +	./gen_karo_sdcard_img.sh $@ $@.boot $(IMAGE_ROOTFS) $(CONFIG_TARGET_KERNEL_PARTSIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
> > +endef
> > +
> > +
> >  #################################################
> >  # Devices
> >  #################################################
> > @@ -232,4 +250,20 @@ define Device/apalis
> >  endef
> >  TARGET_DEVICES += apalis
> >  
> > +define Device/tx6u-8033
> > +  DEVICE_TITLE := Ka-Ro electronics TX6U-8033 Module on MB7 baseboard
> > +  DEVICE_DTS := imx6dl-tx6u-8033
> > +  FILESYSTEMS := ext4
> > +  BLOCKSIZE := 4k
> > +  KERNEL_SUFFIX := -zImage
> > +  KERNEL_NAME := zImage
> > +  KERNEL := kernel-bin
> > +  KERNEL_IMG := vmlinuz
> > +  IMAGES := factory.img.gz sysupgrade.img.gz
> > +  IMAGE_SIZE := 3776m
> > +  IMAGE/sysupgrade.img.gz := karo-boot-img | karo-sdcard-img | check-size $$$$(IMAGE_SIZE) | gzip | append-metadata
> > +  IMAGE/factory.img.gz := karo-boot-img | karo-sdcard-img | check-size $$$$(IMAGE_SIZE) | gzip
> > +endef
> > +TARGET_DEVICES += tx6u-8033
> > +
> >  $(eval $(call BuildImage))
> > diff --git a/target/linux/imx6/image/gen_karo_sdcard_img.sh b/target/linux/imx6/image/gen_karo_sdcard_img.sh

Please do not introduce another gen_*_sdcard_img.sh script.
See x86 for a more modern example of how to use OpenWrt on block
(eMMC and such) devices.

> > new file mode 100755
> > index 0000000000..362ce5838b
> > --- /dev/null
> > +++ b/target/linux/imx6/image/gen_karo_sdcard_img.sh
> > @@ -0,0 +1,26 @@
> > +#!/usr/bin/env bash
> > +
> > +set -x
> > +[ $# -eq 5 ] || {
> > +    echo "SYNTAX: $0 <file> <bootfs image> <rootfs image> <bootfs size> <rootfs size>"
> > +    exit 1
> > +}
> > +
> > +OUTPUT="$1"
> > +BOOTFS="$2"
> > +ROOTFS="$3"
> > +BOOTFSSIZE="$4"
> > +ROOTFSSIZE="$5"
> > +
> > +head=4
> > +sect=63
> > +
> > +set `ptgen -o $OUTPUT -h $head -s $sect -l 4096 -t 83 -S 0x0cc66cc0 -p ${BOOTFSSIZE}M -t 83 -p ${ROOTFSSIZE}M`
> > +
> > +BOOTOFFSET="$(($1 / 512))"
> > +BOOTSIZE="$(($2 / 512))"
> > +ROOTFSOFFSET="$(($3 / 512))"
> > +ROOTFSSIZE="$(($4 / 512))"
> > +
> > +dd bs=512 if="$BOOTFS" of="$OUTPUT" seek="$BOOTOFFSET" conv=notrunc
> > +dd bs=512 if="$ROOTFS" of="$OUTPUT" seek="$ROOTFSOFFSET" conv=notrunc
> > diff --git a/target/linux/imx6/patches-4.14/100-bootargs.patch b/target/linux/imx6/patches-4.14/100-bootargs.patch
> > index 0954391203..6c025e15db 100644
> > --- a/target/linux/imx6/patches-4.14/100-bootargs.patch
> > +++ b/target/linux/imx6/patches-4.14/100-bootargs.patch
> > @@ -1,3 +1,16 @@
> > +--- a/arch/arm/boot/dts/imx6dl-tx6u-8033.dts
> > ++++ b/arch/arm/boot/dts/imx6dl-tx6u-8033.dts
> > +@@ -51,6 +51,10 @@
> > + 		display = &display;
> > + 	};
> > + 
> > ++	chosen {
> > ++		bootargs = "console=ttymxc0,115200";
> > ++	};
> > ++
> > + 	backlight: backlight {
> > + 		compatible = "pwm-backlight";
> > + 		pwms = <&pwm2 0 500000 PWM_POLARITY_INVERTED>;
> >  --- a/arch/arm/boot/dts/imx6dl-wandboard.dts
> >  +++ b/arch/arm/boot/dts/imx6dl-wandboard.dts
> >  @@ -19,4 +19,8 @@
> > diff --git a/tools/Makefile b/tools/Makefile
> > index 2f57d25525..034e54c5d9 100644
> > --- a/tools/Makefile
> > +++ b/tools/Makefile
> > @@ -39,6 +39,7 @@ tools-$(BUILD_ISL) += isl
> >  tools-$(CONFIG_USE_SPARSE) += sparse
> >  tools-$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini) += genext2fs
> >  tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs
> > +tools-$(CONFIG_TARGET_imx6) += genext2fs
> 
> The target for genext2fs is already specified, merge it with previous definition.
> 
> >  
> >  # builddir dependencies
> >  $(curdir)/bison/compile := $(curdir)/flex/compile
> > 
> 
> Regards
> 
> -- 
> TMN
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Wed Dec  4 15:41:28 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Wed, 4 Dec 2019 21:41:28 +0100
Subject: [OpenWrt-Devel] [PATCH] wireguard: skip peer config if public
 key of the peer is not defined
In-Reply-To: <20191204103047.17139-1-fe@dev.tdt.de>
References: <20191204103047.17139-1-fe@dev.tdt.de>
Message-ID: <004601d5aae3$36c1b420$a4451c60$@adrianschmutzler.de>

Hi,

> +	if [ -z "$public_key" ]; then
> +		echo "Skipping peer config $peer_config public key not
> defined"

That's not a sentence. Either add a colon after $peer_config or make it a
real sentence:

"Skipping peer config $peer_config because public key is not defined."

Best

Adrian 


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Wed Dec  4 15:46:58 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Wed, 4 Dec 2019 21:46:58 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
 LiteBeam AC Gen2
In-Reply-To: <9fe127a2-7707-c352-c669-11570377f496@linux-ipv6.be>
References: <20191202232629.952385-1-stijn@linux-ipv6.be>
 <00f701d5a969$b9aa8cc0$2cffa640$@adrianschmutzler.de>
 <075e2d8a-191b-2993-2ee0-ebf432b4c2d6@linux-ipv6.be>
 <00c701d5a9d0$7da69ae0$78f3d0a0$@adrianschmutzler.de>
 <20191203120930.GC8181@meh.true.cz>
 <010701d5a9d3$92f3c320$b8db4960$@adrianschmutzler.de>
 <20191203123144.GE8181@meh.true.cz>
 <12d89195-b1b7-5f9e-52a8-5411ad142733@linux-ipv6.be>
 <012e01d5a9d6$c03434c0$409c9e40$@adrianschmutzler.de>
 <CAKR_QVJJGjHrwj=vE_UkAi4YkKQYLarJgT250jCJ2zTQTxfRsA@mail.gmail.com>
 <9fe127a2-7707-c352-c669-11570377f496@linux-ipv6.be>
Message-ID: <004f01d5aae3$fa4bafe0$eee30fa0$@adrianschmutzler.de>

Acked-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Stijn Tintel
> Sent: Mittwoch, 4. Dezember 2019 14:56
> To: Tom Psyborg <pozega.tomislav at gmail.com>; Adrian Schmutzler
> <mail at adrianschmutzler.de>
> Cc: Petr ?tetiar <ynezz at true.cz>; openwrt-devel at lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: add support for Ubiquiti
> LiteBeam AC Gen2
> 
> On 4/12/2019 15:37, Tom Psyborg wrote:
> > Current changes from Stijn's branch look fine, I've applied them to
> > the master clone from Dec 2nd, built and flashed; mac addresses are
> > correct, ethernet is working as well as both wifi interfaces.
> >
> Can I get some [Ack|Review|Test]ed-by from you guys?
> 
> Thanks
> Stijn
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Wed Dec  4 16:07:00 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Wed, 4 Dec 2019 22:07:00 +0100
Subject: [OpenWrt-Devel] [PATCH] wireguard: fix interface remove on
 lonely peers
In-Reply-To: <20191204130450.14177-1-fe@dev.tdt.de>
References: <20191204130450.14177-1-fe@dev.tdt.de>
Message-ID: <013b01d5aae6$c6027ef0$52077cd0$@adrianschmutzler.de>

Hi,

commit message should be redacted.

Best

Adrian

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Florian Eckert
> Sent: Mittwoch, 4. Dezember 2019 14:05
> To: Eckert.Florian at googlemail.com; Jason at zx2c4.com; ldir at darbyshire-
> bryant.me.uk; daniel.engberg.lists at pyret.net
> Cc: openwrt-devel at lists.openwrt.org; Florian Eckert <fe at dev.tdt.de>
> Subject: [OpenWrt-Devel] [PATCH] wireguard: fix interface remove on lonely
> peers
> 
> Redmine-patch-id: 4230
> If we delete the main wireguard interface, then the related are not
delete.
> They remain in the network configuration.
> 
> With this commit wo get called on a network config change, and check if
each
> wireguard peer has an interface. If this is not the case delete alle peers
that
> do not have a related wireguard interface.
> 
> Signed-off-by: Florian Eckert <fe at dev.tdt.de>
> ---
> This was discussed on the irc with Kevin Darbyshire-Bryant alias ldir on
the irc
> that this is a bug and should be get fixed.
> 
>  package/network/services/wireguard/Makefile   |  2 ++
>  .../services/wireguard/files/wireguard.init   | 31 +++++++++++++++++++
>  2 files changed, 33 insertions(+)
>  create mode 100644
> package/network/services/wireguard/files/wireguard.init
> 
> diff --git a/package/network/services/wireguard/Makefile
> b/package/network/services/wireguard/Makefile
> index ea34b7550b..d78fcfface 100644
> --- a/package/network/services/wireguard/Makefile
> +++ b/package/network/services/wireguard/Makefile
> @@ -93,6 +93,8 @@ define Package/wireguard-tools/install
>  	$(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
>  	$(INSTALL_DIR) $(1)/lib/netifd/proto/
>  	$(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
> +	$(INSTALL_DIR) $(1)/etc/init.d/
> +	$(INSTALL_BIN) ./files/wireguard.init $(1)/etc/init.d/wireguard
>  endef
> 
>  define KernelPackage/wireguard
> diff --git a/package/network/services/wireguard/files/wireguard.init
> b/package/network/services/wireguard/files/wireguard.init
> new file mode 100644
> index 0000000000..781d0839bc
> --- /dev/null
> +++ b/package/network/services/wireguard/files/wireguard.init
> @@ -0,0 +1,31 @@
> +#!/bin/sh /etc/rc.common
> +
> +START=80
> +USE_PROCD=1
> +
> +service_triggers() {
> +	procd_add_reload_trigger "network"
> +}
> +
> +reload_service() {
> +	# delete old peers of related wireguard interface
> +	wireguard_check_peers
> +}
> +
> +wireguard_check_peers() {
> +	local iface peer
> +
> +	# get all wireguard peers
> +	for peer in $(uci show network | grep =wireguard_); do
> +		# extract peer section type
> +		peer="${peer##*=}"
> +		# extract interface name
> +		iface="${peer#*_}"
> +
> +		# delete peer if iface is not present anymore
> +		if ! uci -q show "network.${iface}" 1>/dev/null 2>/dev/null;
> then
> +			uci -q delete "network.@${peer}[-1]"
> +			uci commit network
> +		fi
> +	done
> +}
> --
> 2.20.1
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Thu Dec  5 02:53:35 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Thu, 5 Dec 2019 10:53:35 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?yuDw4O7q5Togz+7vLCDQ7uosINjg7fHu7Swg?=
	=?cp1251?b?0O7s4O3x+ywgxOXy8ero5SwgzeDw7uTt++UsIMfg7+Dk7fvlLCDX?=
	=?cp1251?b?4PHy8/jq6CwgNzAsIDgwLCA5MCwg6CDyLuQuIDA1XzA4XzIwMTkg?=
	=?cp1251?q?02=5F10_199508?=
Message-ID: <mailman.15867.1575532535.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ???????: ???, ???, ??????, ???????, ???????, ????????, ????????, ????????, 70, 80, 90, ? ?.?. 05_08_2019 02_10 199508
Date: Thu, 5 Dec 2019 10:53:35 +0300
Size: 110163
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191205/294bd64a/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fe at dev.tdt.de  Thu Dec  5 05:33:38 2019
From: fe at dev.tdt.de (Florian Eckert)
Date: Thu,  5 Dec 2019 11:33:38 +0100
Subject: [OpenWrt-Devel] [PATCH v2] wireguard: skip peer config if public
 key of the peer is not defined
Message-ID: <20191205103338.28355-1-fe@dev.tdt.de>

If a config section of a peer does not have a public key defined, the
whole interface does not start. The following log is shown

daemon.notice netifd: test (21071): Line unrecognized: `PublicKey='
daemon.notice netifd: test (21071): Configuration parsing erro

The command 'wg show' does only show the interface name.

With this change we skip the peer for this interface and emit a log
message. So the other peers get configured.

Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
v2:
* Update error message to be a sentence

 package/network/services/wireguard/files/wireguard.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/network/services/wireguard/files/wireguard.sh b/package/network/services/wireguard/files/wireguard.sh
index 4c811c6ba9..ccac34e45f 100644
--- a/package/network/services/wireguard/files/wireguard.sh
+++ b/package/network/services/wireguard/files/wireguard.sh
@@ -42,6 +42,11 @@ proto_wireguard_setup_peer() {
 	config_get endpoint_port "${peer_config}" "endpoint_port"
 	config_get persistent_keepalive "${peer_config}" "persistent_keepalive"
 
+	if [ -z "$public_key" ]; then
+		echo "Skipping peer config $peer_config because public key is not defined."
+		return 0
+	fi
+
 	echo "[Peer]" >> "${wg_cfg}"
 	echo "PublicKey=${public_key}" >> "${wg_cfg}"
 	if [ "${preshared_key}" ]; then
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fe at dev.tdt.de  Thu Dec  5 05:58:05 2019
From: fe at dev.tdt.de (Florian Eckert)
Date: Thu,  5 Dec 2019 11:58:05 +0100
Subject: [OpenWrt-Devel] [PATCH v2] wireguard: fix interface remove for
 lonely peers
Message-ID: <20191205105805.29869-1-fe@dev.tdt.de>

When we delete a Wireguard interface, the associated peer sections are
not deleted. They remain in the network configuration.

This commit adds an init script, that triggers when the network
configuration file is changed.

For each change event, each Wireguard peer section is checked to see if
the corresponding wireguard interface section still exists. If this is not
the case, all wireguard peer sections for that interface are deleted.

Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
v2:
* update commit description

 package/network/services/wireguard/Makefile   |  2 ++
 .../services/wireguard/files/wireguard.init   | 31 +++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 package/network/services/wireguard/files/wireguard.init

diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile
index ea34b7550b..d78fcfface 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -93,6 +93,8 @@ define Package/wireguard-tools/install
 	$(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
 	$(INSTALL_DIR) $(1)/lib/netifd/proto/
 	$(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
+	$(INSTALL_DIR) $(1)/etc/init.d/
+	$(INSTALL_BIN) ./files/wireguard.init $(1)/etc/init.d/wireguard
 endef
 
 define KernelPackage/wireguard
diff --git a/package/network/services/wireguard/files/wireguard.init b/package/network/services/wireguard/files/wireguard.init
new file mode 100644
index 0000000000..781d0839bc
--- /dev/null
+++ b/package/network/services/wireguard/files/wireguard.init
@@ -0,0 +1,31 @@
+#!/bin/sh /etc/rc.common
+
+START=80
+USE_PROCD=1
+
+service_triggers() {
+	procd_add_reload_trigger "network"
+}
+
+reload_service() {
+	# delete old peers of related wireguard interface
+	wireguard_check_peers
+}
+
+wireguard_check_peers() {
+	local iface peer
+
+	# get all wireguard peers
+	for peer in $(uci show network | grep =wireguard_); do
+		# extract peer section type
+		peer="${peer##*=}"
+		# extract interface name
+		iface="${peer#*_}"
+
+		# delete peer if iface is not present anymore
+		if ! uci -q show "network.${iface}" 1>/dev/null 2>/dev/null; then
+			uci -q delete "network.@${peer}[-1]"
+			uci commit network
+		fi
+	done
+}
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From Jason at zx2c4.com  Thu Dec  5 05:59:41 2019
From: Jason at zx2c4.com (Jason A. Donenfeld)
Date: Thu,  5 Dec 2019 11:59:41 +0100
Subject: [OpenWrt-Devel] [PATCH] wireguard: bump to 0.0.20191205
Message-ID: <20191205105941.12181-1-Jason@zx2c4.com>

* wg-quick: linux: suppress error when finding unused table

This fixes a spurious warning messages seen with recent versions of iproute2
and kernels.

* wg-quick: linux: ensure postdown hooks execute
* wg-quick: linux: have remove_iptables return true
* wg-quick: linux: iptables-* -w is not widely supported

Adding in iptables had some hiccups. For the record, I'm very unhappy about
having to put any firewalling code into wg-quick(8). We'll of course need to
support nftables too at some point if this continues. I'm investigating with
upstream the possibility of adding a sysctl to patch the issue that iptables
is handling now, so hopefully at somepoint down the line we'll be able to shed
this dependency once again.

* send: use kfree_skb_list
* device: prepare skb_list_walk_safe for upstreaming
* send: avoid touching skb->{next,prev} directly

Suggestions from LKML.

* ipc: make sure userspace communication frees wgdevice

Free things properly on error paths.

Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
---
 package/network/services/wireguard/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile
index ea34b75..7aac556 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=wireguard
 
-PKG_VERSION:=0.0.20191127
+PKG_VERSION:=0.0.20191205
 PKG_RELEASE:=1
 
 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
-PKG_HASH:=7d4e80a6f84564d4826dd05da2b59e8d17645072c0345d0fc0d197be176c3d06
+PKG_HASH:=4de4c0efa35f8eb170c27a0bc8977e5c0634b8e19c03915d03218cc88bb0adbe
 
 PKG_LICENSE:=GPL-2.0 Apache-2.0
 PKG_LICENSE_FILES:=COPYING
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at dd-wrt.com  Thu Dec  5 11:51:58 2019
From: daniel at dd-wrt.com (Daniel Danzberger)
Date: Thu,  5 Dec 2019 17:51:58 +0100
Subject: [OpenWrt-Devel] [PATCH] uclient: Add string error function
Message-ID: <20191205165158.645726-1-daniel@dd-wrt.com>

This add's the uclient_strerror function, which resolves and error code
to a string message.

Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
---
 uclient.c | 20 ++++++++++++++++++++
 uclient.h |  2 ++
 2 files changed, 22 insertions(+)

diff --git a/uclient.c b/uclient.c
index 1137168..9f98cbc 100644
--- a/uclient.c
+++ b/uclient.c
@@ -422,3 +422,23 @@ void __hidden uclient_backend_reset_state(struct uclient *cl)
 	cl->error_code = 0;
 	uloop_timeout_cancel(&cl->timeout);
 }
+
+const char * uclient_strerror(unsigned err)
+{
+	switch (err) {
+	case UCLIENT_ERROR_UNKNOWN:
+		return "unknown error";
+	case UCLIENT_ERROR_CONNECT:
+		return "connect failed";
+	case UCLIENT_ERROR_TIMEDOUT:
+		return "timeout";
+	case UCLIENT_ERROR_SSL_INVALID_CERT:
+		return "ssl invalid cert";
+	case UCLIENT_ERROR_SSL_CN_MISMATCH:
+		return "ssl cn mismatch";
+	case UCLIENT_ERROR_MISSING_SSL_CONTEXT:
+		return "missing ssl context";
+	default:
+		return "invalid error code";
+	}
+}
diff --git a/uclient.h b/uclient.h
index e3695db..4f37364 100644
--- a/uclient.h
+++ b/uclient.h
@@ -36,6 +36,7 @@ enum uclient_error_code {
 	UCLIENT_ERROR_SSL_INVALID_CERT,
 	UCLIENT_ERROR_SSL_CN_MISMATCH,
 	UCLIENT_ERROR_MISSING_SSL_CONTEXT,
+	__UCLIENT_ERROR_MAX
 };
 
 union uclient_addr {
@@ -126,5 +127,6 @@ int uclient_http_redirect(struct uclient *cl);
 int uclient_http_set_ssl_ctx(struct uclient *cl, const struct ustream_ssl_ops *ops,
 			     struct ustream_ssl_ctx *ctx, bool require_validation);
 int uclient_http_set_address_family(struct uclient *cl, int af);
+const char *uclient_strerror(unsigned err);
 
 #endif
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From joe at ayerscasa.com  Thu Dec  5 13:17:22 2019
From: joe at ayerscasa.com (Joe Ayers)
Date: Thu, 5 Dec 2019 10:17:22 -0800
Subject: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik
 RB952Ui-5ac2nD?
In-Reply-To: <20191203143434.GF8181@meh.true.cz>
References: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
 <20191203143434.GF8181@meh.true.cz>
Message-ID: <CAALvt2POG3isiKH+2aHjSGRoh-+HADtamD9O2VLOCKO=73byGw@mail.gmail.com>

> I'm not able to reproduce it on TP-Link Archer C7 v5.
>
> > Attempting to use the hAP ac lite model RB952Ui-5ac2nD with the 5GHz
> > radio0 802.11ac seems to be unstable and consume available memory.
> > This is only enabling radio0 with no other changes and bringing wifi
> > up/down to reproduce.   Am I doing something silly, or should I submit
> > a bug?
>
> uptime > /tmp/wifi.log && \
> cat /etc/openwrt_release >> /tmp/wifi.log && \
> uci set wireless.radio0.disabled=0 && \
> uci commit wireless && \
> wifi up && \
> echo "up: $(free | grep Mem:)" >> /tmp/wifi.log && \
> sleep 120 && \
> wifi down && sleep 1 && \
> echo "dn: $(free | grep Mem:)" >> /tmp/wifi.log && \
> for i in $(seq 1 10); do \
>         wifi up; sleep 15; echo "up: $(free | grep Mem:)" >> /tmp/wifi.log; \
>         wifi down; sleep 15; wifi down; sleep 1; wifi down; sleep 1; \
>         wifi down; sleep 1; echo "dn: $(free | grep Mem:)" >> /tmp/wifi.log; \
> done; cat /tmp/wifi.log
>
>  14:06:05 up 2 min,  load average: 0.24, 0.19, 0.08
> DISTRIB_ID='OpenWrt'
> DISTRIB_RELEASE='19.07.0-rc2'
> DISTRIB_REVISION='r10775-db8345d8e4'
> DISTRIB_TARGET='ath79/generic'
> DISTRIB_ARCH='mips_24kc'
> DISTRIB_DESCRIPTION='OpenWrt 19.07.0-rc2 r10775-db8345d8e4'
> DISTRIB_TAINTS=''
> up: Mem:         124528       15128       99536          76        9864       80684
> dn: Mem:         124528       14860       99076          84       10592       80596
> up: Mem:         124528       22592       91340          84       10596       72872
> dn: Mem:         124528       14884       99048          84       10596       80580
> up: Mem:         124528       22848       91084          84       10596       72616
> dn: Mem:         124528       14884       99048          84       10596       80576
> up: Mem:         124528       22848       91084          84       10596       72612
> dn: Mem:         124528       14884       99048          84       10596       80576
> up: Mem:         124528       22848       91084          84       10596       72612
> dn: Mem:         124528       14884       99048          84       10596       80576
> up: Mem:         124528       22940       90992          84       10596       72520
> dn: Mem:         124528       14916       99016          84       10596       80544
> up: Mem:         124528       22808       91124          84       10596       72652
> dn: Mem:         124528       14868       99064          84       10596       80592
> up: Mem:         124528       22900       91032          84       10596       72560
> dn: Mem:         124528       14876       99056          84       10596       80584
> up: Mem:         124528       22676       91256          84       10596       72784
> dn: Mem:         124528       14904       99028          84       10596       80556
> up: Mem:         124528       22712       91220          84       10596       72748
> dn: Mem:         124528       14936       98996          84       10596       80524
> up: Mem:         124528       22708       91224          84       10596       72752
> dn: Mem:         124528       14936       98996          84       10596       80524
>
>  15:53:35 up 1 min,  load average: 1.35, 0.41, 0.14
> DISTRIB_ID='OpenWrt'
> DISTRIB_RELEASE='19.07.0-rc2'
> DISTRIB_REVISION='r10775-db8345d8e4'
> DISTRIB_TARGET='ar71xx/generic'
> DISTRIB_ARCH='mips_24kc'
> DISTRIB_DESCRIPTION='OpenWrt 19.07.0-rc2 r10775-db8345d8e4'
> DISTRIB_TAINTS=''
> up: Mem:         124624       14068      100680         120        9876       81760
> dn: Mem:         124624       14368       99524         140       10732       80996
> up: Mem:         124624       22072       91816         140       10736       73296
> dn: Mem:         124624       14360       99528         140       10736       81004
> up: Mem:         124624       22072       91816         140       10736       73292
> dn: Mem:         124624       14360       99528         140       10736       81004
> up: Mem:         124624       22068       91820         140       10736       73296
> dn: Mem:         124624       14360       99528         140       10736       81004
> up: Mem:         124624       22196       91692         140       10736       73168
> dn: Mem:         124624       14360       99528         140       10736       81004
> up: Mem:         124624       22356       91532         140       10736       73008
> dn: Mem:         124624       14392       99496         140       10736       80972
> up: Mem:         124624       22164       91724         140       10736       73200
> dn: Mem:         124624       14344       99544         140       10736       81020
> up: Mem:         124624       22956       90932         140       10736       72408
> dn: Mem:         124624       14352       99536         140       10736       81012
> up: Mem:         124624       22924       90964         140       10736       72440
> dn: Mem:         124624       14352       99536         140       10736       81012
> up: Mem:         124624       22444       91444         140       10736       72920
> dn: Mem:         124624       14384       99504         140       10736       80980
> up: Mem:         124624       22188       91700         140       10736       73176
> dn: Mem:         124624       14352       99536         140       10736       81012
>

Possibly the same symptoms don't exist on 128MB RAM devices.   Also,
I'm not seeing a consistent result on the 64MB device I'm testing.

Multiple reports of 64MB RAM devices being mostly unusable:
Ref:   https://github.com/openwrt/openwrt/pull/1077
"The default setup of the OpenWrt snapshots is more or less unusable
on ath10k devices with 64MB RAM (which is a common configuration for
cheap ath79 dual-band devices). How do you suggest we proceed?"

Comparable results between above and my 64MB device.   However, if the
sleep time is extended the consumption is more--but doesn't seem to be
predictable.   In the original post of this thread, free went down
below 8M, consuming almost 30M of RAM.      I suspect this is not the
intended behavior.

 19:54:32 up 33 min,  load average: 0.00, 0.00, 0.00
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='19.07-SNAPSHOT'
DISTRIB_REVISION='r10779-d2d12346e8'
DISTRIB_TARGET='ar71xx/mikrotik'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='OpenWrt 19.07-SNAPSHOT r10779-d2d12346e8'
DISTRIB_TAINTS='no-all'
up: Mem:          59264       14844       35240         108
9180       28124
dn: Mem:          59264       14672       34696         116
9896       27964
up: Mem:          59264       22564       26800         116
9900       20072
dn: Mem:          59264       14720       34644         116
9900       27916
up: Mem:          59264       22500       26864         116
9900       20136
dn: Mem:          59264       14688       34676         116
9900       27948
up: Mem:          59264       21964       27400         116
9900       20672
dn: Mem:          59264       14688       34676         116
9900       27948
up: Mem:          59264       22328       27036         116
9900       20308
dn: Mem:          59264       14688       34676         116
9900       27948
up: Mem:          59264       22444       26920         116
9900       20192
dn: Mem:          59264       14688       34676         116
9900       27948
up: Mem:          59264       22552       26812         116
9900       20084
dn: Mem:          59264       14684       34680         116
9900       27952
up: Mem:          59264       22512       26852         116
9900       20124
dn: Mem:          59264       14680       34684         116
9900       27956
up: Mem:          59264       22480       26884         116
9900       20156
dn: Mem:          59264       14704       34660         116
9900       27932
up: Mem:          59264       22556       26808         116
9900       20080
dn: Mem:          59264       14692       34672         116
9900       27944
up: Mem:          59264       22588       26776         116
9900       20048
dn: Mem:          59264       14704       34660         116
9900       27932

Consuming ~23MB (~35M starting point):

root at OpenWrt:~# wifi up;  for i in $(seq 1 100); do   free | grep Mem
; sleep 20; done
'radio1' is disabled
'radio1' is disabled
Mem:          59264       21568       27784         116        9912       21064
Mem:          59264       23216       26136         116        9912       19420
Mem:          59264       27664       21688         116        9912       14972
Mem:          59264       32112       17240         116        9912       10524
Mem:          59264       32112       17240         116        9912       10524
Mem:          59264       32164       17188         116        9912       10472
Mem:          59264       32208       17144         116        9912       10428
Mem:          59264       32240       17112         116        9912       10396
Mem:          59264       33456       15896         116        9912        9180
Mem:          59264       35144       14208         116        9912        7492
Mem:          59264       36680       12672         116        9912        5956
Mem:          59264       38024       11328         116        9912        4612
Mem:          59264       39276       13796         116        6192        5196
Mem:          59264       40600       12472         116        6192        3872
Mem:          59264       40612       12460         116        6192        3860
Mem:          59264       40408       12664         116        6192        4064
Mem:          59264       40260       12812         116        6192        4212
Mem:          59264       40372       12700         116        6192        4100
Mem:          59264       40664       12408         116        6192        3808
Mem:          59264       40516       12556         116        6192        3956
Mem:          59264       40440       12632         116        6192        4032
Mem:          59264       40580       12492         116        6192        3892
Mem:          59264       40664       12408         116        6192        3808
Mem:          59264       40760       12312         116        6192        3712
...

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at david-bauer.net  Thu Dec  5 13:29:14 2019
From: mail at david-bauer.net (David Bauer)
Date: Thu,  5 Dec 2019 19:29:14 +0100
Subject: [OpenWrt-Devel] [PATCH] hostapd: enable CTRL_IFACE_MIB for
 hostapd-full
Message-ID: <20191205182914.75193-1-mail@david-bauer.net>

This enables the CTRL_IFACE_MIB symbol for wpad-full and hostapd-full.
If it is not enabled, statistic outputs such as "hostapd_cli all_sta"
are empty.

Signed-off-by: David Bauer <mail at david-bauer.net>
---
 package/network/services/hostapd/files/hostapd-basic.config  | 5 +++++
 package/network/services/hostapd/files/hostapd-full.config   | 5 +++++
 package/network/services/hostapd/files/hostapd-mini.config   | 5 +++++
 .../services/hostapd/files/wpa_supplicant-basic.config       | 5 +++++
 .../services/hostapd/files/wpa_supplicant-full.config        | 5 +++++
 .../services/hostapd/files/wpa_supplicant-mini.config        | 5 +++++
 .../network/services/hostapd/files/wpa_supplicant-p2p.config | 5 +++++
 7 files changed, 35 insertions(+)

diff --git a/package/network/services/hostapd/files/hostapd-basic.config b/package/network/services/hostapd/files/hostapd-basic.config
index 461b178433..19ea850f6b 100644
--- a/package/network/services/hostapd/files/hostapd-basic.config
+++ b/package/network/services/hostapd/files/hostapd-basic.config
@@ -394,3 +394,8 @@ CONFIG_TLS=internal
 # Services can connect to the bus and provide methods
 # that can be called by other services or clients.
 CONFIG_UBUS=y
+
+# OpenWrt patch 380-disable-ctrl-iface-mib.patch
+# leads to the MIB only being compiled in if
+# CONFIG_CTRL_IFACE_MIB is enabled.
+#CONFIG_CTRL_IFACE_MIB=y
diff --git a/package/network/services/hostapd/files/hostapd-full.config b/package/network/services/hostapd/files/hostapd-full.config
index 5c9fbed2e4..0ecce423e7 100644
--- a/package/network/services/hostapd/files/hostapd-full.config
+++ b/package/network/services/hostapd/files/hostapd-full.config
@@ -394,3 +394,8 @@ CONFIG_TAXONOMY=y
 # Services can connect to the bus and provide methods
 # that can be called by other services or clients.
 CONFIG_UBUS=y
+
+# OpenWrt patch 380-disable-ctrl-iface-mib.patch
+# leads to the MIB only being compiled in if
+# CONFIG_CTRL_IFACE_MIB is enabled.
+CONFIG_CTRL_IFACE_MIB=y
diff --git a/package/network/services/hostapd/files/hostapd-mini.config b/package/network/services/hostapd/files/hostapd-mini.config
index f31e6467b0..d9511441e6 100644
--- a/package/network/services/hostapd/files/hostapd-mini.config
+++ b/package/network/services/hostapd/files/hostapd-mini.config
@@ -394,3 +394,8 @@ CONFIG_TLS=internal
 # Services can connect to the bus and provide methods
 # that can be called by other services or clients.
 CONFIG_UBUS=y
+
+# OpenWrt patch 380-disable-ctrl-iface-mib.patch
+# leads to the MIB only being compiled in if
+# CONFIG_CTRL_IFACE_MIB is enabled.
+#CONFIG_CTRL_IFACE_MIB=y
diff --git a/package/network/services/hostapd/files/wpa_supplicant-basic.config b/package/network/services/hostapd/files/wpa_supplicant-basic.config
index e2bd1866c4..a9da65deed 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-basic.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-basic.config
@@ -618,3 +618,8 @@ CONFIG_GETRANDOM=y
 # Services can connect to the bus and provide methods
 # that can be called by other services or clients.
 CONFIG_UBUS=y
+
+# OpenWrt patch 380-disable-ctrl-iface-mib.patch
+# leads to the MIB only being compiled in if
+# CONFIG_CTRL_IFACE_MIB is enabled.
+#CONFIG_CTRL_IFACE_MIB=y
diff --git a/package/network/services/hostapd/files/wpa_supplicant-full.config b/package/network/services/hostapd/files/wpa_supplicant-full.config
index e5a6752a8e..982f4d5534 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-full.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-full.config
@@ -618,3 +618,8 @@ CONFIG_IBSS_RSN=y
 # Services can connect to the bus and provide methods
 # that can be called by other services or clients.
 CONFIG_UBUS=y
+
+# OpenWrt patch 380-disable-ctrl-iface-mib.patch
+# leads to the MIB only being compiled in if
+# CONFIG_CTRL_IFACE_MIB is enabled.
+CONFIG_CTRL_IFACE_MIB=y
diff --git a/package/network/services/hostapd/files/wpa_supplicant-mini.config b/package/network/services/hostapd/files/wpa_supplicant-mini.config
index 6af4693c53..850d22febc 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-mini.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-mini.config
@@ -618,3 +618,8 @@ CONFIG_GETRANDOM=y
 # Services can connect to the bus and provide methods
 # that can be called by other services or clients.
 CONFIG_UBUS=y
+
+# OpenWrt patch 380-disable-ctrl-iface-mib.patch
+# leads to the MIB only being compiled in if
+# CONFIG_CTRL_IFACE_MIB is enabled.
+#CONFIG_CTRL_IFACE_MIB=y
diff --git a/package/network/services/hostapd/files/wpa_supplicant-p2p.config b/package/network/services/hostapd/files/wpa_supplicant-p2p.config
index b0ca395a5e..5156048284 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-p2p.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-p2p.config
@@ -618,3 +618,8 @@ CONFIG_IBSS_RSN=y
 # Services can connect to the bus and provide methods
 # that can be called by other services or clients.
 CONFIG_UBUS=y
+
+# OpenWrt patch 380-disable-ctrl-iface-mib.patch
+# leads to the MIB only being compiled in if
+# CONFIG_CTRL_IFACE_MIB is enabled.
+#CONFIG_CTRL_IFACE_MIB=y
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ynezz at true.cz  Thu Dec  5 15:00:36 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Thu, 5 Dec 2019 21:00:36 +0100
Subject: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik
 RB952Ui-5ac2nD?
In-Reply-To: <CAALvt2POG3isiKH+2aHjSGRoh-+HADtamD9O2VLOCKO=73byGw@mail.gmail.com>
References: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
 <20191203143434.GF8181@meh.true.cz>
 <CAALvt2POG3isiKH+2aHjSGRoh-+HADtamD9O2VLOCKO=73byGw@mail.gmail.com>
Message-ID: <20191205200036.GD71465@meh.true.cz>

Joe Ayers <joe at ayerscasa.com> [2019-12-05 10:17:22]:

> Possibly the same symptoms don't exist on 128MB RAM devices. 

Like there is some if condition, which is doing some nasty things on 64M
devices? I admit, that I don't have ath10k-ct source code under my pillow, but
it doesn't make much sense to me.

> Comparable results between above and my 64MB device.   However, if the
> sleep time is extended the consumption is more

Ok, I'll let it run overnight with 120s sleep in between.

> I suspect this is not the intended behavior.

No its not and it's even strange, that I'm not seeing it here if it should
happen in the "default setup". Maybe its because:

1. You're using custom image (I'm using official prebuilt images)
2. You're not providing all the steps needed to reproduce the issue
3. I've way different hardware

Every detail could make huge difference.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Thu Dec  5 18:04:46 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Fri, 6 Dec 2019 02:04:46 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?yuvg8fHo9+Xx6uD/IOzz5/vq4CAtIODz5Oju?=
	=?cp1251?b?6u7r6+Xq9uj/IOIg7vLr6Pft7uwg6uD35fHy4uUuIDA1XzA4XzIw?=
	=?cp1251?q?19_02=5F10_199508?=
Message-ID: <mailman.16049.1575587195.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ???????????? ?????? - ?????????????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Fri, 6 Dec 2019 02:04:46 +0300
Size: 62273
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191206/36b5ade2/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hauke at hauke-m.de  Thu Dec  5 18:23:29 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Fri, 6 Dec 2019 00:23:29 +0100
Subject: [OpenWrt-Devel] OpenWrt 19.07 status
In-Reply-To: <7d4516c2-c9d2-102a-cb33-796497baa611@linux-ipv6.be>
References: <d530eff4-2b67-0bfe-78d0-510185e416b9@hauke-m.de>
 <7d4516c2-c9d2-102a-cb33-796497baa611@linux-ipv6.be>
Message-ID: <547634bd-d618-8cb0-82ff-ae12caf50aab@hauke-m.de>

On 11/26/19 10:44 AM, Stijn Tintel wrote:
> On 26/11/2019 00:34, Hauke Mehrtens wrote:
>> It looks like there is a throughput problem with ath10k-ct on QCA9984,
>> https://bugs.openwrt.org/index.php?do=details&task_id=2593
>> there are multiple reports in the Forum.
>>
>> For me QCA9880 on a BTHH5A with ath10k-ct on 5GHz works in openwrt 19.07
>> The AP can do 180 MBit/s TX and only 40 Mbit/s RX over about 8m with a
>> wall in between with sae-mixed to a Intel iwl8265.
>> It is also very close to 40MBit/s not much changing the lowest I saw in
>> about 30 outputs from iperf3 was 38.8 MBit/s and them highest 41.2 MBit/s
> 
> I am seeing the same low RX with a qca988x AP and an 8265 client. This
> did not happen earlier this year. I first noticed this on September 5th,
> but I don't have known good commit hash. The problem goes away when I
> disable 802.11w. Without 802.11w, I get 300-400Mbps TX and RX. Do you
> have any other clients than the 8265 to test this? Ben suggested this
> might be an issue on the 8265 end, and to use a sniffer to look into
> block-ack setup packets:
> 
> 18|20:29:01< greearb__> sniff the block-ack setup packets, make sure
> client sends them encrypted (ie, if you see them open-auth encoded,
> sender is issue)
> 18|20:30:51< greearb__> you will really want to spend some quality time
> with a sniffer to see if block-acks are working or not, and if BA setup
> frames are properly encrypted
> 
> Unfortunately the device with the 8265 is my only Linux client with 5GHz
> and convenient sniffing support. Some of the Raspberry Pi boards seem to
> support it with nexmon, but that looks overcomplicated. Maybe I could
> try with my DIR860L, but so far I have not been able to do so. If you
> have the equipment for it, maybe you can give it a try?
> 
> Other than that, ath10k-ct is extremely stable on all my APs. Something
> that cannot be said about ath10k. With the right combination of clients,
> it was crashing within 1 day of uptime, while still sending beacons,
> thus clients still trying to associate to the 5GHz network. WiFi
> experience with stock ath10k was simply abysmal, almost downright
> unusable. It was suggested that this was due to the use of 802.11w, but
> disabling 802.11w is not a solution, and in my opinion not even an
> option, especially with WPA3.

The BTHH5A uses the VR9 / VRX200, a Lantiq/Intel MIPS 35Kec BE SoC.

I connected my IPQ4019 to the QCA9880 and have the same results.
IPQ4019 -> QCA9880 ~> 200 MBit/s
QCA9880 -> IPQ4019 ~>  36 MBit/s

I also sniffed the traffic between my iwl8265 and the QCA9880 with the
IPQ4019.

I monitored a iperf3 session where I send 46.6 MBytes in 28 seconds from
the QCA9880 to the iwl8265 with about 40 MBit/s, I captured 44389
packets with the QCA9880 in monitor mode.

19.5% (8651) of the packets are RTS packets send by the QCA9880, 0.1%
(35) of the packets are RTS packets send by other devices.

I do not see the data send by the QCA9880 probably because the iwl8265
is closer.

I haven't seen any differences when deactivating 802.11w or WPA3.

Block Ack are send unencrypted.

The IPQ4019 and the QCA9880 used OpenWrt 19.07-rc2 with ath10k-ct.

Hauke

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191206/f7965228/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Fri Dec  6 02:12:21 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Fri, 6 Dec 2019 10:12:21 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?wPPk6O797fbo6uvu7+Xk6Ogg5Ov/IOTl8uXp?=
	=?cp1251?b?IC0g4uXr6Oru6+Xv7eD/IOru6+vl6vbo/yDiIO7y6+j37e7sIOrg?=
	=?cp1251?b?9+Xx8uLlLiAwNV8wOF8yMDE5IDAyXzEwIDE5OTUwOA==?=
Message-ID: <mailman.16072.1575616455.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ????????????????? ??? ????? - ???????????? ????????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Fri, 6 Dec 2019 10:12:21 +0300
Size: 52178
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191206/baac583b/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From freifunk at adrianschmutzler.de  Fri Dec  6 08:01:49 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Fri,  6 Dec 2019 14:01:49 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: redistribute UBNT variables in
 Ubiquiti image Makefile
Message-ID: <20191206130149.18409-1-freifunk@adrianschmutzler.de>

The variables UBNT_BOARD and UBNT_VERSION are defined in the parent
Device/ubnt definition and then overwritten for most of the derived
platform definitions (e.g. Device/ubnt-wa).

Since this mixed use of inheritance and overwriting can be misleading,
this moves the variables to the platform-based definitions.

While at it, reorder the definitions to have order consistent, too.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/ath79/image/generic-ubnt.mk | 33 +++++++++++++-----------
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk
index e75b9ea770..59c22b8af4 100644
--- a/target/linux/ath79/image/generic-ubnt.mk
+++ b/target/linux/ath79/image/generic-ubnt.mk
@@ -36,8 +36,6 @@ endef
 define Device/ubnt
   DEVICE_VENDOR := Ubiquiti
   DEVICE_PACKAGES := kmod-usb2
-  UBNT_BOARD := XM
-  UBNT_VERSION := 6.0.0
   IMAGES += factory.bin
   IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
 	append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkubntimage-split
@@ -45,53 +43,58 @@ endef
 
 define Device/ubnt-bz
   $(Device/ubnt)
+  ATH_SOC := ar7241
   IMAGE_SIZE := 7448k
-  UBNT_TYPE := BZ
+  UBNT_BOARD := XM
   UBNT_CHIP := ar7240
-  ATH_SOC := ar7241
+  UBNT_TYPE := BZ
+  UBNT_VERSION := 6.0.0
 endef
 
 define Device/ubnt-wa
   $(Device/ubnt)
+  ATH_SOC := ar9342
   IMAGE_SIZE := 15744k
-  UBNT_TYPE := WA
-  UBNT_CHIP := ar934x
   UBNT_BOARD := WA
+  UBNT_CHIP := ar934x
+  UBNT_TYPE := WA
   UBNT_VERSION := 8.5.0
-  ATH_SOC := ar9342
 endef
 
 define Device/ubnt-xm
   $(Device/ubnt)
+  ATH_SOC := ar7241
   DEVICE_VARIANT := XM
   DEVICE_PACKAGES += kmod-usb-ohci
   IMAGE_SIZE := 7448k
-  UBNT_TYPE := XM
+  UBNT_BOARD := XM
   UBNT_CHIP := ar7240
-  ATH_SOC := ar7241
+  UBNT_TYPE := XM
+  UBNT_VERSION := 6.0.0
   KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
 endef
 
 define Device/ubnt-xw
   $(Device/ubnt)
+  ATH_SOC := ar9342
   DEVICE_VARIANT := XW
   IMAGE_SIZE := 7552k
-  UBNT_TYPE := XW
-  UBNT_CHIP := ar934x
   UBNT_BOARD := XM
-  UBNT_VERSION := 6.0.4
+  UBNT_CHIP := ar934x
   UBNT_REVISION := 42.$(UBNT_REVISION)
-  ATH_SOC := ar9342
+  UBNT_TYPE := XW
+  UBNT_VERSION := 6.0.4
 endef
 
 define Device/ubnt_acb-isp
   $(Device/ubnt)
   ATH_SOC := qca9533
-  IMAGE_SIZE := 15744k
   DEVICE_MODEL := airCube ISP
+  IMAGE_SIZE := 15744k
   UBNT_BOARD := ACB-ISP
-  UBNT_TYPE := ACB
   UBNT_CHIP := qca9533
+  UBNT_TYPE := ACB
+  UBNT_VERSION := 6.0.0
   IMAGES := sysupgrade.bin
 endef
 TARGET_DEVICES += ubnt_acb-isp
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at bareminimum.eu  Fri Dec  6 12:05:16 2019
From: freifunk at bareminimum.eu (Johannes Kimmel)
Date: Fri,  6 Dec 2019 18:05:16 +0100
Subject: [OpenWrt-Devel] [PATCH] make_ext4fs: fix build on musl systems
Message-ID: <20191206170516.21798-1-freifunk@bareminimum.eu>

From: Johannes Kimmel <freifunk at mail.bareminimum.eu>

Include sys/sysmacros.h on all systems, except MACOS.

The previous change only included the header on glibc systems:
3af931b0b6545757aaeadb13f9bb9da0296fc172

Signed-off-by: Johannes Kimmel <freifunk at mail.bareminimum.eu>
---
 ext4_utils.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext4_utils.h b/ext4_utils.h
index a5c1ae0..bfc48ed 100644
--- a/ext4_utils.h
+++ b/ext4_utils.h
@@ -28,7 +28,7 @@ extern "C" {
 #define _LARGEFILE64_SOURCE 1
 #include <sys/types.h>
 
-#ifdef __GLIBC__
+#ifndef __APPLE__
 #include <sys/sysmacros.h>
 #endif
 
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From joe at ayerscasa.com  Fri Dec  6 12:44:54 2019
From: joe at ayerscasa.com (Joe Ayers)
Date: Fri, 6 Dec 2019 09:44:54 -0800
Subject: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik
 RB952Ui-5ac2nD?
In-Reply-To: <20191205200036.GD71465@meh.true.cz>
References: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
 <20191203143434.GF8181@meh.true.cz>
 <CAALvt2POG3isiKH+2aHjSGRoh-+HADtamD9O2VLOCKO=73byGw@mail.gmail.com>
 <20191205200036.GD71465@meh.true.cz>
Message-ID: <CAALvt2NygyiyJ3iV82B3DXLr+hWsW_7T=iL=9=7xnyUHxD8UdA@mail.gmail.com>

>
>
> > Possibly the same symptoms don't exist on 128MB RAM devices.
>
> Like there is some if condition, which is doing some nasty things on 64M
> devices? I admit, that I don't have ath10k-ct source code under my pillow, but
> it doesn't make much sense to me.
>
> > Comparable results between above and my 64MB device.   However, if the
> > sleep time is extended the consumption is more
>
> Ok, I'll let it run overnight with 120s sleep in between.
>
> > I suspect this is not the intended behavior.
>
> No its not and it's even strange, that I'm not seeing it here if it should
> happen in the "default setup". Maybe its because:
>
> 1. You're using custom image (I'm using official prebuilt images)
> 2. You're not providing all the steps needed to reproduce the issue
> 3. I've way different hardware
>
> Every detail could make huge difference.
>
> -- ynezz

On the device I am testing, it is both (2GHz) ath9k and (5GHz) ath10k.
  These look to be related patches to this issue:

960-0010-ath10k-limit-htt-rx-ring-size.patch
960-0011-ath10k-limit-pci-buffer-size.patch

In the v19.07.0-rc2 build for the rb-nor-flash-16M-ac ar71xx image,
these patches are applied to backports-4.19.85-1, but don't seem to be
applied to ath10k-ct-2019-09-09-5e8cd86f.    Should ath10k-ct have
these and other patches?    The device's installed packages do include
ath10k-ct (from downloads.openwrt.org installed image).

Joe AE6XE

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From greearb at candelatech.com  Fri Dec  6 13:02:13 2019
From: greearb at candelatech.com (Ben Greear)
Date: Fri, 6 Dec 2019 10:02:13 -0800
Subject: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik
 RB952Ui-5ac2nD?
In-Reply-To: <CAALvt2NygyiyJ3iV82B3DXLr+hWsW_7T=iL=9=7xnyUHxD8UdA@mail.gmail.com>
References: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
 <20191203143434.GF8181@meh.true.cz>
 <CAALvt2POG3isiKH+2aHjSGRoh-+HADtamD9O2VLOCKO=73byGw@mail.gmail.com>
 <20191205200036.GD71465@meh.true.cz>
 <CAALvt2NygyiyJ3iV82B3DXLr+hWsW_7T=iL=9=7xnyUHxD8UdA@mail.gmail.com>
Message-ID: <069ab5b0-f9ea-8700-afc6-3514ea2dba99@candelatech.com>

On 12/6/19 9:44 AM, Joe Ayers wrote:
>>
>>
>>> Possibly the same symptoms don't exist on 128MB RAM devices.
>>
>> Like there is some if condition, which is doing some nasty things on 64M
>> devices? I admit, that I don't have ath10k-ct source code under my pillow, but
>> it doesn't make much sense to me.
>>
>>> Comparable results between above and my 64MB device.   However, if the
>>> sleep time is extended the consumption is more
>>
>> Ok, I'll let it run overnight with 120s sleep in between.
>>
>>> I suspect this is not the intended behavior.
>>
>> No its not and it's even strange, that I'm not seeing it here if it should
>> happen in the "default setup". Maybe its because:
>>
>> 1. You're using custom image (I'm using official prebuilt images)
>> 2. You're not providing all the steps needed to reproduce the issue
>> 3. I've way different hardware
>>
>> Every detail could make huge difference.
>>
>> -- ynezz
> 
> On the device I am testing, it is both (2GHz) ath9k and (5GHz) ath10k.
>    These look to be related patches to this issue:
> 
> 960-0010-ath10k-limit-htt-rx-ring-size.patch
> 960-0011-ath10k-limit-pci-buffer-size.patch
> 
> In the v19.07.0-rc2 build for the rb-nor-flash-16M-ac ar71xx image,
> these patches are applied to backports-4.19.85-1, but don't seem to be
> applied to ath10k-ct-2019-09-09-5e8cd86f.    Should ath10k-ct have
> these and other patches?    The device's installed packages do include
> ath10k-ct (from downloads.openwrt.org installed image).

I think that if you need the patches for upstream ath10k, then you should also apply
the patches to ath10k-ct.

Platforms with more memory probably do not need or benefit from those patches.

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From greearb at candelatech.com  Fri Dec  6 15:37:41 2019
From: greearb at candelatech.com (Ben Greear)
Date: Fri, 6 Dec 2019 12:37:41 -0800
Subject: [OpenWrt-Devel] New ath10k-ct firmware available
Message-ID: <24195555-8a64-8a1e-5b1b-c1d85c5fcdad@candelatech.com>

Please see new file names and checksums below:

988x
19db86003509dedb8ace339c183813ca637d65af24d00666411d1590efe33e13  firmware-2-ct-full-community-22.bin.lede.013
454e67dab545e720369a07be2fee16de008c76db4ab3119e7760bf9f7504c066  firmware-2-ct-full-htt-mgt-community-22.bin.lede.013
/home/greearb/candela_html/downloads
9887
b3c738328427e124701a5735d65cde0f60e4172ae5bc23b00e5b16df7995dbd4  firmware-2-ct-full-community-22.bin.lede.013
4432ccee23133bbaa4a5552e50a1e7e889b257362603e05530e751b67c29b7b5  firmware-2-ct-full-htt-mgt-community-22.bin.lede.013
/home/greearb/candela_html/downloads
9980
6fa74a3fc87cba97dbc4a7213b760f8d997cd9c5f11900d47d387b23764cf20a  firmware-5-ct-full-community-12.bin-lede.013
68e92820c51270eba4f68b24654c4a9408902b2600762b70204f4cb5419bb714  firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
/home/greearb/candela_html/downloads
9984
08aeb883bd2d9258e8f1907cca8a0d2eda1c559a66e228dadffd6798f6877c7d  firmware-5-ct-full-community-12.bin-lede.013
38ed59a2b3c66c10926706a21ae2d3aeaf83e589f19345a8f48d6520522e4fde  firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
/home/greearb/candela_html/downloads
4019
feca75fe89af9a3e998047f85ff3428676f4d574b770d51773bb419d0dd98e5a  firmware-5-ct-full-community-12.bin-lede.013
6a4977689343f43edd934823512f031fd1a026e872004343b9952077f9607cb0  firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
/home/greearb/candela_html/downloads
9888
d6a59c17bfbec1abc8498762d9f00b2449cab352feb8bef8b621771168376dbf  firmware-5-ct-full-community-12.bin-lede.013
fe242c0d56494975d7a1aeb6969d90cc21cb133fba99040d4da7a25fdb90d92c  firmware-5-ct-full-htt-mgt-community-12.bin-lede.013
/home/greearb/candela_html/downloads


The release notes since last time for wave-1:

   *  November 29, 2019:  Fix IBSS merge issue, related to TSF id leakage bug in firmware code.
                          Thanks for Ahmed Zaki @ Mage-Networks for helping to diagnose and test.



The release notes since last time for wave-2:

   *  December 6, 2019:  Fix 160Mhz problem caused by logic that did not take into account the fact that
                         160Mhz has only 1/2 of the NSS of lower bandwidths in the rate table.

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From peter.stadler at student.uibk.ac.at  Sat Dec  7 06:45:47 2019
From: peter.stadler at student.uibk.ac.at (Peter Stadler)
Date: Sat,  7 Dec 2019 12:45:47 +0100
Subject: [OpenWrt-Devel] [PATCH] ubus: make libubus ready for linking into
 C++
Message-ID: <20191207114547.5209-1-peter.stadler@student.uibk.ac.at>

Use extern "C" { ... } if using libubus.h in a C++ project.

Signed-off-by: Peter Stadler <peter.stadler at student.uibk.ac.at>
---
 libubus.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libubus.h b/libubus.h
index dc42ea7..6925514 100644
--- a/libubus.h
+++ b/libubus.h
@@ -14,6 +14,10 @@
 #ifndef __LIBUBUS_H
 #define __LIBUBUS_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <libubox/avl.h>
 #include <libubox/list.h>
 #include <libubox/blobmsg.h>
@@ -414,4 +418,8 @@ static inline int ubus_unregister_event_handler(struct ubus_context *ctx,
     return ubus_remove_object(ctx, &ev->obj);
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
-- 
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wseas-team at wseas.org  Sat Dec  7 07:18:29 2019
From: wseas-team at wseas.org (Anna Papadimitriou)
Date: Sat, 7 Dec 2019 14:18:29 +0200
Subject: [OpenWrt-Devel] "Energy and Environment",
 "Geology and Earth Science" "Advanced Materials"
Message-ID: <20191207121939.0EA0730C810@malta2576.startdedicated.net>

Dear Authors,

We would like to invite you to submit a paper in the following three open
Special Issues:
"Energy and Environment"
"Geology and Earth Science"
"Advanced Materials"
that we organize in the Journal: 
WSEAS Transactions on Environment and Development 

The Review of the Journal is organized by the Editor-in-Chief and many
Associate Editors. The quality of the Journal, the acceptance rates, the review
process can be found on the web.

http://wseas.org/wseas/cms.action?id=4031


Deadline to send your paper to me by email
(wseas.transactions at gmail.com, support at wseas.org)

with the correct Format (Our Format
http://www.wseas.org/cms.action?id=4045) is January 15, 2020


Do not upload your paper via the conference web site (a procedure which
is for regular papers only), but send it to me by email.

Note that this invitation does not imply "a priori" any acceptance of your
paper. It will pass via peer review by the Associate Editor and three reviewers
and can be accepted after minor revision, accepted after major revision or
rejected.

Another important Journal that can host your paper (also after strict peer
review) is the: "International Journal of Environmental Science"
https://www.iaras.org/iaras/journals/ijes

The review process is equally strict in both journals.
Do not send us "conference papers" with small number of pages. They will be
rejected. Do not send us paper in wrong format. Send us well-documented studies
of long papers with the correct WSEAS format. The papers in their entity or in
their some part should not have been published elsewhere and must not be under
review elsewhere. We can check it.
If you want to send me by email an extended version of a conference paper
(published in a WSEAS conference or elsewhere), note that this paper must have
different title, different abstract, different keywords from its short,
conference version and must have 40% additional material.

About our review process: http://wseas.org/main/author-testimonials.html


Best Regards

Dr. Anna Papadimitriou
Dr. Kostas Chiotopoulos
Prof. V. Niola (Editor-in-Chief)
wseas.transactions at gmail.com


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hauke at hauke-m.de  Sat Dec  7 08:19:17 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sat, 7 Dec 2019 14:19:17 +0100
Subject: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik
 RB952Ui-5ac2nD?
In-Reply-To: <069ab5b0-f9ea-8700-afc6-3514ea2dba99@candelatech.com>
References: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
 <20191203143434.GF8181@meh.true.cz>
 <CAALvt2POG3isiKH+2aHjSGRoh-+HADtamD9O2VLOCKO=73byGw@mail.gmail.com>
 <20191205200036.GD71465@meh.true.cz>
 <CAALvt2NygyiyJ3iV82B3DXLr+hWsW_7T=iL=9=7xnyUHxD8UdA@mail.gmail.com>
 <069ab5b0-f9ea-8700-afc6-3514ea2dba99@candelatech.com>
Message-ID: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>

On 12/6/19 7:02 PM, Ben Greear wrote:
> On 12/6/19 9:44 AM, Joe Ayers wrote:
>>>
>>>
>>>> Possibly the same symptoms don't exist on 128MB RAM devices.
>>>
>>> Like there is some if condition, which is doing some nasty things on 64M
>>> devices? I admit, that I don't have ath10k-ct source code under my
>>> pillow, but
>>> it doesn't make much sense to me.
>>>
>>>> Comparable results between above and my 64MB device.?? However, if the
>>>> sleep time is extended the consumption is more
>>>
>>> Ok, I'll let it run overnight with 120s sleep in between.
>>>
>>>> I suspect this is not the intended behavior.
>>>
>>> No its not and it's even strange, that I'm not seeing it here if it
>>> should
>>> happen in the "default setup". Maybe its because:
>>>
>>> 1. You're using custom image (I'm using official prebuilt images)
>>> 2. You're not providing all the steps needed to reproduce the issue
>>> 3. I've way different hardware
>>>
>>> Every detail could make huge difference.
>>>
>>> -- ynezz
>>
>> On the device I am testing, it is both (2GHz) ath9k and (5GHz) ath10k.
>> ?? These look to be related patches to this issue:
>>
>> 960-0010-ath10k-limit-htt-rx-ring-size.patch
>> 960-0011-ath10k-limit-pci-buffer-size.patch
>>
>> In the v19.07.0-rc2 build for the rb-nor-flash-16M-ac ar71xx image,
>> these patches are applied to backports-4.19.85-1, but don't seem to be
>> applied to ath10k-ct-2019-09-09-5e8cd86f.??? Should ath10k-ct have
>> these and other patches???? The device's installed packages do include
>> ath10k-ct (from downloads.openwrt.org installed image).
> 
> I think that if you need the patches for upstream ath10k, then you
> should also apply
> the patches to ath10k-ct.
> 
> Platforms with more memory probably do not need or benefit from those
> patches.
> 
> Thanks,
> Ben
> 
Hi,

I am fine with adding these patches to ath10k-ct if they solve problems.

It would be nice if a description could be added to the patches so I
know what kind of buffers are reduced there.

Will someone send a patch?

Hauke

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191207/7b18ea38/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Sat Dec  7 09:04:06 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sat, 7 Dec 2019 17:04:06 +0300
Subject: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4
In-Reply-To: <20191109135320.25020-1-fercerpav@gmail.com>
References: <20191103113247.9782-1-fercerpav@gmail.com>
 <20191109135320.25020-1-fercerpav@gmail.com>
Message-ID: <20191207140405.GE11070@home.paul.comp>

Hello dear maintainer,

You changed the status of the patch to "Changes requested" but you
haven't expressed your opinion on the topics raised during the
discussion. Please do so that I can make the changes to your liking.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ynezz at true.cz  Sat Dec  7 10:04:13 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Sat, 7 Dec 2019 16:04:13 +0100
Subject: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4
In-Reply-To: <20191207140405.GE11070@home.paul.comp>
References: <20191103113247.9782-1-fercerpav@gmail.com>
 <20191109135320.25020-1-fercerpav@gmail.com>
 <20191207140405.GE11070@home.paul.comp>
Message-ID: <20191207150413.GF71465@meh.true.cz>

Paul Fertser <fercerpav at gmail.com> [2019-12-07 17:04:06]:

Hi,

> You changed the status of the patch to "Changes requested" but you

I've marked it as such, because of that discussion[1], but I admit, that I
didn't read it thoroughly.

1. https://patchwork.ozlabs.org/patch/1192429/

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From joe at ayerscasa.com  Sat Dec  7 10:09:02 2019
From: joe at ayerscasa.com (Joe Ayers)
Date: Sat, 7 Dec 2019 07:09:02 -0800
Subject: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik
 RB952Ui-5ac2nD?
In-Reply-To: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
References: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
 <20191203143434.GF8181@meh.true.cz>
 <CAALvt2POG3isiKH+2aHjSGRoh-+HADtamD9O2VLOCKO=73byGw@mail.gmail.com>
 <20191205200036.GD71465@meh.true.cz>
 <CAALvt2NygyiyJ3iV82B3DXLr+hWsW_7T=iL=9=7xnyUHxD8UdA@mail.gmail.com>
 <069ab5b0-f9ea-8700-afc6-3514ea2dba99@candelatech.com>
 <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
Message-ID: <CAALvt2MkCyqQQBoObB4-cD4xVt=AONfiar6Q5isF=znY1E4BdA@mail.gmail.com>

On Sat, Dec 7, 2019 at 5:19 AM Hauke Mehrtens <hauke at hauke-m.de> wrote:
>
> On 12/6/19 7:02 PM, Ben Greear wrote:
> > On 12/6/19 9:44 AM, Joe Ayers wrote:
> >>>
> >>>
> >>>> Possibly the same symptoms don't exist on 128MB RAM devices.
> >>>
> >>> Like there is some if condition, which is doing some nasty things on 64M
> >>> devices? I admit, that I don't have ath10k-ct source code under my
> >>> pillow, but
> >>> it doesn't make much sense to me.
> >>>
> >>>> Comparable results between above and my 64MB device.   However, if the
> >>>> sleep time is extended the consumption is more
> >>>
> >>> Ok, I'll let it run overnight with 120s sleep in between.
> >>>
> >>>> I suspect this is not the intended behavior.
> >>>
> >>> No its not and it's even strange, that I'm not seeing it here if it
> >>> should
> >>> happen in the "default setup". Maybe its because:
> >>>
> >>> 1. You're using custom image (I'm using official prebuilt images)
> >>> 2. You're not providing all the steps needed to reproduce the issue
> >>> 3. I've way different hardware
> >>>
> >>> Every detail could make huge difference.
> >>>
> >>> -- ynezz
> >>
> >> On the device I am testing, it is both (2GHz) ath9k and (5GHz) ath10k.
> >>    These look to be related patches to this issue:
> >>
> >> 960-0010-ath10k-limit-htt-rx-ring-size.patch
> >> 960-0011-ath10k-limit-pci-buffer-size.patch
> >>
> >> In the v19.07.0-rc2 build for the rb-nor-flash-16M-ac ar71xx image,
> >> these patches are applied to backports-4.19.85-1, but don't seem to be
> >> applied to ath10k-ct-2019-09-09-5e8cd86f.    Should ath10k-ct have
> >> these and other patches?    The device's installed packages do include
> >> ath10k-ct (from downloads.openwrt.org installed image).
> >
> > I think that if you need the patches for upstream ath10k, then you
> > should also apply
> > the patches to ath10k-ct.
> >
> > Platforms with more memory probably do not need or benefit from those
> > patches.
> >
> > Thanks,
> > Ben
> >
> Hi,
>
> I am fine with adding these patches to ath10k-ct if they solve problems.
>
> It would be nice if a description could be added to the patches so I
> know what kind of buffers are reduced there.
>
> Will someone send a patch?
>
> Hauke
>

Are there other patches that should be applied?

package/kernel/mac80211/patches/ath:
080-ath10k_thermal_config.patch
921-ath10k_init_devices_synchronously.patch
930-ath10k_add_tpt_led_trigger.patch
960-0010-ath10k-limit-htt-rx-ring-size.patch
960-0011-ath10k-limit-pci-buffer-size.patch
972-ath10k_fix-crash-due-to-wrong-handling-of-peer_bw_rxnss_override-parameter.patch
973-ath10k_fix-band_center_freq-handling-for-VHT160-in-recent-firmwares.patch
974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
975-ath10k-use-tpt-trigger-by-default.patch
977-ath10k-add-support-for-configuring-management-packet.patch
978-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch
979-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch
980-ath10k-fix-max-antenna-gain-unit.patch
981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch

package/kernel/ath10k-ct/patches:
161-ath10k-add-support-for-configuring-management-packet.patch
162-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch
163-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch
164-ath10k-commit-rates-from-mac80211.patch
201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
202-ath10k-4.16-use-tpt-trigger-by-default.patch
203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dengqf6 at mail2.sysu.edu.cn  Sat Dec  7 11:37:31 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Sun,  8 Dec 2019 00:37:31 +0800
Subject: [OpenWrt-Devel] [PATCH] ath79: fix typos in DTS
Message-ID: <20191207163731.15028-1-dengqf6@mail2.sysu.edu.cn>

echi->ehci
ochi->ohci

Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
---
 target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts | 6 +++---
 target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts      | 6 +++---
 target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi     | 6 +++---
 target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi   | 4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
index 2e00de8887..e87f422051 100644
--- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
+++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
@@ -47,7 +47,7 @@
 		usb {
 			label = "buffalo:green:usb";
 			gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>;
-			trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
+			trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
 			linux,default-trigger = "usbport";
 		};
 
@@ -180,7 +180,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_ochi_port: port at 1 {
+	usb_ohci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
@@ -191,7 +191,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_echi_port: port at 1 {
+	usb_ehci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
index 92de193aba..5e35dddd4b 100644
--- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
+++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
@@ -34,7 +34,7 @@
 		usb {
 			label = "d-link:blue:usb";
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
-			trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
+			trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
 			linux,default-trigger = "usbport";
 		};
 
@@ -123,7 +123,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_ochi_port: port at 1 {
+	usb_ohci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
@@ -134,7 +134,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_echi_port: port at 1 {
+	usb_ehci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
index 08b3c77b39..b6ae167024 100644
--- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
+++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
@@ -32,7 +32,7 @@
 		usb_led {
 			label = "netgear:green:usb";
 			resets = <&rst 12>;
-			trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
+			trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
 			linux,default-trigger = "usbport";
 		};
 	};
@@ -134,7 +134,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_ochi_port: port at 1 {
+	usb_ohci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
@@ -145,7 +145,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_echi_port: port at 1 {
+	usb_ehci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
diff --git a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
index 4f52e3cc40..0ed9970813 100644
--- a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
+++ b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
@@ -86,7 +86,7 @@
 	#address-cells = <1>;
 	#size-cells = <0>;
 
-	usb_ochi_port: port at 1 {
+	usb_ohci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
@@ -97,7 +97,7 @@
 	#address-cells = <1>;
 	#size-cells = <0>;
 
-	usb_echi_port: port at 1 {
+	usb_ehci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
-- 
2.24.0




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sat Dec  7 13:50:41 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sat,  7 Dec 2019 10:50:41 -0800
Subject: [OpenWrt-Devel] [PATCHv4] uci: Fix Wformat-nonliteral warning
Message-ID: <20191207185041.8861-1-rosenp@gmail.com>

A const char * variable is being passed as a format string. Unfortunately,
this is not correct.

A constant expression needs to be passed so that GCC can determine the
types of the format properly.

Also fixed a different warning that needs a printf attribute.

Fixes:

error: format not a string literal, argument types not checked
[-Werror=format-nonliteral]
  176 |    error_info);
      |    ^~~~~~~~~~
error: format not a string literal, argument types not checked
[-Werror=format-nonliteral]
  185 |    error_info);

cli.c:196:19: error: format string is not a string literal
[-Werror=format-nonliteral]
           vfprintf(stderr, fmt, ap);

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 v4: Use a proper named define
 v3: Moved define to top of file.
 v2: Fixed extra warning from clang 10.
 cli.c    |  1 +
 libuci.c | 15 ++++++++-------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/cli.c b/cli.c
index 8970f4f..6ba97ea 100644
--- a/cli.c
+++ b/cli.c
@@ -185,6 +185,7 @@ static void cli_perror(void)
 	uci_perror(ctx, appname);
 }
 
+__attribute__((format(printf, 1, 2)))
 static void cli_error(const char *fmt, ...)
 {
 	va_list ap;
diff --git a/libuci.c b/libuci.c
index a9e70e8..2e46456 100644
--- a/libuci.c
+++ b/libuci.c
@@ -40,6 +40,12 @@ static const char *uci_errstr[] = {
 #include "uci_internal.h"
 #include "list.c"
 
+#define UCI_ERR_FORMAT \
+	"%s%s" /* prefix */ \
+	"%s%s" /* function */ \
+	"%s" /* error */ \
+	"%s" /* details */
+
 __private const char *uci_confdir = UCI_CONFDIR;
 __private const char *uci_savedir = UCI_SAVEDIR;
 
@@ -142,11 +148,6 @@ uci_get_errorstr(struct uci_context *ctx, char **dest, const char *prefix)
 {
 	static char error_info[128];
 	int err;
-	const char *format =
-		"%s%s" /* prefix */
-		"%s%s" /* function */
-		"%s" /* error */
-		"%s"; /* details */
 
 	error_info[0] = 0;
 
@@ -169,7 +170,7 @@ uci_get_errorstr(struct uci_context *ctx, char **dest, const char *prefix)
 		break;
 	}
 	if (dest) {
-		err = asprintf(dest, format,
+		err = asprintf(dest, UCI_ERR_FORMAT,
 			(prefix ? prefix : ""), (prefix ? ": " : ""),
 			(ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func ? ": " : ""),
 			uci_errstr[err],
@@ -178,7 +179,7 @@ uci_get_errorstr(struct uci_context *ctx, char **dest, const char *prefix)
 			*dest = NULL;
 	} else {
 		strcat(error_info, "\n");
-		fprintf(stderr, format,
+		fprintf(stderr, UCI_ERR_FORMAT,
 			(prefix ? prefix : ""), (prefix ? ": " : ""),
 			(ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func ? ": " : ""),
 			uci_errstr[err],
-- 
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Sat Dec  7 15:10:11 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sat, 7 Dec 2019 23:10:11 +0300
Subject: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4
In-Reply-To: <20191207150413.GF71465@meh.true.cz>
References: <20191103113247.9782-1-fercerpav@gmail.com>
 <20191109135320.25020-1-fercerpav@gmail.com>
 <20191207140405.GE11070@home.paul.comp>
 <20191207150413.GF71465@meh.true.cz>
Message-ID: <20191207201011.GF11070@home.paul.comp>

Hi Petr,

On Sat, Dec 07, 2019 at 04:04:13PM +0100, Petr ?tetiar wrote:
> > You changed the status of the patch to "Changes requested" but you
> 
> I've marked it as such, because of that discussion[1], but I admit, that I
> didn't read it thoroughly.

One thing I find a bit annoying about Patchwork is that state changes
are anonymous and so a committer might get an odd feeling when
something like that happens.

Regarding this specific patch, I'd really like to hear the opinion of
a maintainer (it seems like ath79 doesn't have an official maintainer
yet) as there're some issues raised in the discussion for which
there's still no clear answer. I'll be happy to change the patch in
any way that will get it accepted.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mike at meshplusplus.com  Sat Dec  7 15:54:16 2019
From: mike at meshplusplus.com (Michael Jones)
Date: Sat, 7 Dec 2019 14:54:16 -0600
Subject: [OpenWrt-Devel] UBus wire protocol documentation
In-Reply-To: <20191207114547.5209-1-peter.stadler@student.uibk.ac.at>
References: <20191207114547.5209-1-peter.stadler@student.uibk.ac.at>
Message-ID: <CAJQUmm6fVs_j4wpaZAeciuEVhvkWHBs8wbb5MX-kkkX+VQFdNg@mail.gmail.com>

I'm planning to implement a Ubus client using Boost.Asio / C++'s Networking
TS, in C++, complete with a new implementation of the ubus wire protocol
(in C++).

Is there any documentation available about the Ubus wire protocol?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191207/0ffa7de6/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Sat Dec  7 15:58:26 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Sat, 7 Dec 2019 21:58:26 +0100
Subject: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4
In-Reply-To: <20191207201011.GF11070@home.paul.comp>
References: <20191103113247.9782-1-fercerpav@gmail.com>
 <20191109135320.25020-1-fercerpav@gmail.com>
 <20191207140405.GE11070@home.paul.comp>
 <20191207150413.GF71465@meh.true.cz>
 <20191207201011.GF11070@home.paul.comp>
Message-ID: <20191207205826.GG71465@meh.true.cz>

Paul Fertser <fercerpav at gmail.com> [2019-12-07 23:10:11]:

> Regarding this specific patch, I'd really like to hear the opinion of
> a maintainer (it seems like ath79 doesn't have an official maintainer

To me it seems like its maintained by a community, by developers like you,
with the little help of team members like Adrian having necessary commit
rights.

> I'll be happy to change the patch in any way that will get it accepted.

Then just do the requested changes in v3, solved.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Sat Dec  7 16:11:14 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sun, 8 Dec 2019 00:11:14 +0300
Subject: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4
In-Reply-To: <20191207205826.GG71465@meh.true.cz>
References: <20191103113247.9782-1-fercerpav@gmail.com>
 <20191109135320.25020-1-fercerpav@gmail.com>
 <20191207140405.GE11070@home.paul.comp>
 <20191207150413.GF71465@meh.true.cz>
 <20191207201011.GF11070@home.paul.comp>
 <20191207205826.GG71465@meh.true.cz>
Message-ID: <20191207211114.GG11070@home.paul.comp>

On Sat, Dec 07, 2019 at 09:58:26PM +0100, Petr ?tetiar wrote:
> > I'll be happy to change the patch in any way that will get it accepted.
> 
> Then just do the requested changes in v3, solved.

I got an impression Adrian is not sure anymore he's requesting all the
changes we talked about, as I provided some reasonable
counter-arguments and that he is waiting for someone else to chime
in. If you tell me I should just do whatever Adrian says, ok, np. Do I
get it right?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at adrianschmutzler.de  Sat Dec  7 17:11:27 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Sat, 7 Dec 2019 23:11:27 +0100
Subject: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4
In-Reply-To: <20191207211114.GG11070@home.paul.comp>
References: <20191103113247.9782-1-fercerpav@gmail.com>
 <20191109135320.25020-1-fercerpav@gmail.com>
 <20191207140405.GE11070@home.paul.comp> <20191207150413.GF71465@meh.true.cz>
 <20191207201011.GF11070@home.paul.comp> <20191207205826.GG71465@meh.true.cz>
 <20191207211114.GG11070@home.paul.comp>
Message-ID: <003901d5ad4b$46efc9d0$d4cf5d70$@adrianschmutzler.de>

Well, address the issues we have agreed on in a v3.

From my scanning of the open discussion points, the following was unresolved in some way:
1. Name prefix for LED labels
In ar71xx, all devices use "d-link". In ath79, so far two devices use "d-link" and four devices use the device name.
Since d-link looks like a vendor where heavy use of DTSI files is possible, I would use "d-link" as prefix for those.

2. Comments for ethX nodes in DTS files: I would remove the comments. It wouldn't be a big problem if you keep them for v3, though.

3. Partitioning: Remove the commented partitions and provide an extensive explanation in the commit message.

Further discussion may be led based on a v3 patch then.

Best

Adrian

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Paul Fertser
> Sent: Samstag, 7. Dezember 2019 22:11
> To: Petr ?tetiar <ynezz at true.cz>
> Cc: openwrt-devel at lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4
> 
> On Sat, Dec 07, 2019 at 09:58:26PM +0100, Petr ?tetiar wrote:
> > > I'll be happy to change the patch in any way that will get it accepted.
> >
> > Then just do the requested changes in v3, solved.
> 
> I got an impression Adrian is not sure anymore he's requesting all the
> changes we talked about, as I provided some reasonable counter-arguments
> and that he is waiting for someone else to chime in. If you tell me I should
> just do whatever Adrian says, ok, np. Do I get it right?
> 
> --
> Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
> mailto:fercerpav at gmail.com
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191207/5d803dfc/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Sat Dec  7 17:21:07 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sun, 8 Dec 2019 01:21:07 +0300
Subject: [OpenWrt-Devel] [PATCH v2] ath79: add D-Link DIR-615 E4
In-Reply-To: <003901d5ad4b$46efc9d0$d4cf5d70$@adrianschmutzler.de>
References: <20191103113247.9782-1-fercerpav@gmail.com>
 <20191109135320.25020-1-fercerpav@gmail.com>
 <20191207140405.GE11070@home.paul.comp>
 <20191207150413.GF71465@meh.true.cz>
 <20191207201011.GF11070@home.paul.comp>
 <20191207205826.GG71465@meh.true.cz>
 <20191207211114.GG11070@home.paul.comp>
 <003901d5ad4b$46efc9d0$d4cf5d70$@adrianschmutzler.de>
Message-ID: <20191207222107.GH11070@home.paul.comp>

On Sat, Dec 07, 2019 at 11:11:27PM +0100, mail at adrianschmutzler.de wrote:
> Well, address the issues we have agreed on in a v3.

Sure, will do tomorrow, thanks!

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sat Dec  7 17:28:24 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sat,  7 Dec 2019 23:28:24 +0100
Subject: [OpenWrt-Devel] [PATCH 0/2] Reduce redundant names in sunxi target
Message-ID: <20191207222826.47389-1-freifunk@adrianschmutzler.de>

This consolidates the various repetitions of device names
in sunxi image Makefiles, and makes naming more consistent
in general.

This is achieved by calculating SUPPORTED_DEVICES from the
node name (as in ath79/ramips) and build the DTS name based
on that.

With this change, future device support should be easier,
as there are less cases where you just have to write the same
name again.

I've build-tested this for all subtargets, but I would be glad
about one or two device-testers.

Adrian Schmutzler (2):
  sunxi: use vendor_device scheme for device definitions
  sunxi: construct DTS name from device node name and SOC

 package/boot/uboot-sunxi/Makefile      |  68 +++++------
 target/linux/sunxi/image/Makefile      |   6 +-
 target/linux/sunxi/image/cortex-a53.mk |  46 ++++----
 target/linux/sunxi/image/cortex-a7.mk  | 154 +++++++++++--------------
 target/linux/sunxi/image/cortex-a8.mk  |  42 +++----
 5 files changed, 148 insertions(+), 168 deletions(-)

-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sat Dec  7 17:28:25 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sat,  7 Dec 2019 23:28:25 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] sunxi: use vendor_device scheme for
 device definitions
In-Reply-To: <20191207222826.47389-1-freifunk@adrianschmutzler.de>
References: <20191207222826.47389-1-freifunk@adrianschmutzler.de>
Message-ID: <20191207222826.47389-2-freifunk@adrianschmutzler.de>

This changes device definition to resemble the vendor_device scheme
already present for the majority of device compatible strings.

By doing this, we achieve several advantages at once:
- Image names and node names are more consistent with other targets.
- SUPPORTED_DEVICES can be set automatically for all but two cases.
- Image names and node names are in line with DEVICE_TITLEs.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 package/boot/uboot-sunxi/Makefile      |  68 +++++++--------
 target/linux/sunxi/image/Makefile      |   1 +
 target/linux/sunxi/image/cortex-a53.mk |  28 +++----
 target/linux/sunxi/image/cortex-a7.mk  | 110 ++++++++++---------------
 target/linux/sunxi/image/cortex-a8.mk  |  29 +++----
 5 files changed, 103 insertions(+), 133 deletions(-)

diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
index 2c414f8c9e..ce39fe792d 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -28,67 +28,67 @@ endef
 define U-Boot/A10-OLinuXino-Lime
   BUILD_SUBTARGET:=cortexa8
   NAME:=A10 OLinuXino LIME
-  BUILD_DEVICES:=sun4i-a10-olinuxino-lime
+  BUILD_DEVICES:=olimex_a10-olinuxino-lime
 endef
 
 define U-Boot/A13-OLinuXino
   BUILD_SUBTARGET:=cortexa8
   NAME:=A13 OlinuXino
-  BUILD_DEVICES:=sun5i-a13-olinuxino
+  BUILD_DEVICES:=olimex_a13-olinuxino
 endef
 
 define U-Boot/A20-OLinuXino-Lime
   BUILD_SUBTARGET:=cortexa7
   NAME:=A20 OLinuXino LIME
-  BUILD_DEVICES:=sun7i-a20-olinuxino-lime
+  BUILD_DEVICES:=olimex_a20-olinuxino-lime
 endef
 
 define U-Boot/A20-OLinuXino-Lime2
   BUILD_SUBTARGET:=cortexa7
   NAME:=A20 OLinuXino LIME2
-  BUILD_DEVICES:=sun7i-a20-olinuxino-lime2
+  BUILD_DEVICES:=olimex_a20-olinuxino-lime2
 endef
 
 define U-Boot/A20-OLinuXino-Lime2-eMMC
   BUILD_SUBTARGET:=cortexa7
   NAME:=A20 OLinuXino LIME2 eMMC
-  BUILD_DEVICES:=sun7i-a20-olinuxino-lime2-emmc
+  BUILD_DEVICES:=olimex_a20-olinuxino-lime2-emmc
 endef
 
 define U-Boot/A20-OLinuXino_MICRO
   BUILD_SUBTARGET:=cortexa7
   NAME:=A20 OLinuXino MICRO
-  BUILD_DEVICES:=sun7i-a20-olinuxino-micro
+  BUILD_DEVICES:=olimex_a20-olinuxino-micro
 endef
 
 define U-Boot/Bananapi
   BUILD_SUBTARGET:=cortexa7
   NAME:=Bananapi
-  BUILD_DEVICES:=sun7i-a20-bananapi
+  BUILD_DEVICES:=lemaker_bananapi
 endef
 
 define U-Boot/Bananapro
   BUILD_SUBTARGET:=cortexa7
   NAME:=Bananapro
-  BUILD_DEVICES:=sun7i-a20-bananapro
+  BUILD_DEVICES:=lemaker_bananapro
 endef
 
 define U-Boot/Cubieboard
   BUILD_SUBTARGET:=cortexa8
   NAME:=Cubieboard
-  BUILD_DEVICES:=sun4i-a10-cubieboard
+  BUILD_DEVICES:=cubietech_a10-cubieboard
 endef
 
 define U-Boot/Cubieboard2
   BUILD_SUBTARGET:=cortexa7
   NAME:=Cubieboard2
-  BUILD_DEVICES:=sun7i-a20-cubieboard2
+  BUILD_DEVICES:=cubietech_cubieboard2
 endef
 
 define U-Boot/Cubietruck
   BUILD_SUBTARGET:=cortexa7
   NAME:=Cubietruck
-  BUILD_DEVICES:=sun7i-a20-cubietruck
+  BUILD_DEVICES:=cubietech_cubietruck
 endef
 
 define U-Boot/Hummingbird_A31
@@ -99,91 +99,91 @@ endef
 define U-Boot/Marsboard_A10
   BUILD_SUBTARGET:=cortexa8
   NAME:=Marsboard
-  BUILD_DEVICES:=sun4i-a10-marsboard
+  BUILD_DEVICES:=marsboard_a10-marsboard
 endef
 
 define U-Boot/Mele_M9
   BUILD_SUBTARGET:=cortexa7
   NAME:=Mele M9 (A31)
-  BUILD_DEVICES:=sun6i-a31-m9
+  BUILD_DEVICES:=mele_m9
 endef
 
 define U-Boot/OLIMEX_A13_SOM
   BUILD_SUBTARGET:=cortexa8
   NAME:=Olimex A13 SOM
-  BUILD_DEVICES:=sun5i-a13-olimex-som
+  BUILD_DEVICES:=olimex_a13-olimex-som
 endef
 
 define U-Boot/Linksprite_pcDuino
   BUILD_SUBTARGET:=cortexa8
   NAME:=Linksprite pcDuino
-  BUILD_DEVICES:=sun4i-a10-pcduino
+  BUILD_DEVICES:=linksprite_a10-pcduino
 endef
 
 define U-Boot/Linksprite_pcDuino3
   BUILD_SUBTARGET:=cortexa7
   NAME:=Linksprite pcDuino3
-  BUILD_DEVICES:=sun7i-a20-pcduino3
+  BUILD_DEVICES:=linksprite_pcduino3
 endef
 
 define U-Boot/Lamobo_R1
   BUILD_SUBTARGET:=cortexa7
   NAME:=Lamobo R1
-  BUILD_DEVICES:=sun7i-a20-lamobo-r1
+  BUILD_DEVICES:=lamobo_lamobo-r1
 endef
 
 define U-Boot/nanopi_m1_plus
   BUILD_SUBTARGET:=cortexa7
   NAME:=NanoPi M1 Plus (H3)
-  BUILD_DEVICES:=sun8i-h3-nanopi-m1-plus
+  BUILD_DEVICES:=friendlyarm_nanopi-m1-plus
 endef
 
 define U-Boot/nanopi_neo
   BUILD_SUBTARGET:=cortexa7
   NAME:=U-Boot for NanoPi NEO (H3)
-  BUILD_DEVICES:=sun8i-h3-nanopi-neo
+  BUILD_DEVICES:=friendlyarm_nanopi-neo
 endef
 
 define U-Boot/orangepi_r1
   BUILD_SUBTARGET:=cortexa7
   NAME:=Orange Pi R1 (H2+)
-  BUILD_DEVICES:=sun8i-h2-plus-orangepi-r1
+  BUILD_DEVICES:=xunlong_orangepi-r1
 endef
 
 define U-Boot/orangepi_zero
   BUILD_SUBTARGET:=cortexa7
   NAME:=Orange Pi Zero (H2+)
-  BUILD_DEVICES:=sun8i-h2-plus-orangepi-zero
+  BUILD_DEVICES:=xunlong_orangepi-zero
 endef
 
 define U-Boot/orangepi_one
   BUILD_SUBTARGET:=cortexa7
   NAME:=Orange Pi One (H3)
-  BUILD_DEVICES:=sun8i-h3-orangepi-one
+  BUILD_DEVICES:=xunlong_orangepi-one
 endef
 
 define U-Boot/orangepi_pc
   BUILD_SUBTARGET:=cortexa7
   NAME:=Orange Pi PC (H3)
-  BUILD_DEVICES:=sun8i-h3-orangepi-pc
+  BUILD_DEVICES:=xunlong_orangepi-pc
 endef
 
 define U-Boot/orangepi_pc_plus
   BUILD_SUBTARGET:=cortexa7
   NAME:=Orange Pi PC Plus (H3)
-  BUILD_DEVICES:=sun8i-h3-orangepi-pc-plus
+  BUILD_DEVICES:=xunlong_orangepi-pc-plus
 endef
 
 define U-Boot/orangepi_plus
   BUILD_SUBTARGET:=cortexa7
   NAME:=Orange Pi Plus (H3)
-  BUILD_DEVICES:=sun8i-h3-orangepi-plus
+  BUILD_DEVICES:=xunlong_orangepi-plus
 endef
 
 define U-Boot/orangepi_2
   BUILD_SUBTARGET:=cortexa7
   NAME:=Orange Pi 2 (H3)
-  BUILD_DEVICES:=sun8i-h3-orangepi-2
+  BUILD_DEVICES:=xunlong_orangepi-2
 endef
 
 define U-Boot/pangolin
@@ -195,7 +195,7 @@ endef
 define U-Boot/nanopi_neo_plus2
   BUILD_SUBTARGET:=cortexa53
   NAME:=NanoPi NEO Plus2 (H5)
-  BUILD_DEVICES:=sun50i-h5-nanopi-neo-plus2
+  BUILD_DEVICES:=friendlyarm_nanopi-neo-plus2
   DEPENDS:=+PACKAGE_u-boot-nanopi_neo_plus2:arm-trusted-firmware-sunxi
   UENV:=a64
 endef
@@ -203,7 +203,7 @@ endef
 define U-Boot/nanopi_neo2
   BUILD_SUBTARGET:=cortexa53
   NAME:=NanoPi NEO2 (H5)
-  BUILD_DEVICES:=sun50i-h5-nanopi-neo2
+  BUILD_DEVICES:=friendlyarm_nanopi-neo2
   DEPENDS:=+PACKAGE_u-boot-nanopi_neo2:arm-trusted-firmware-sunxi
   UENV:=a64
 endef
@@ -211,7 +211,7 @@ endef
 define U-Boot/pine64_plus
   BUILD_SUBTARGET:=cortexa53
   NAME:=Pine64 Plus A64
-  BUILD_DEVICES:=sun50i-a64-pine64-plus
+  BUILD_DEVICES:=pine64_pine64-plus
   DEPENDS:=+PACKAGE_u-boot-pine64_plus:arm-trusted-firmware-sunxi
   UENV:=a64
 endef
@@ -219,13 +219,13 @@ endef
 define U-Boot/Sinovoip_BPI_M2_Plus
   BUILD_SUBTARGET:=cortexa7
   NAME:=Bananapi M2 Plus
-  BUILD_DEVICES:=sun8i-h3-bananapi-m2-plus
+  BUILD_DEVICES:=sinovoip_bananapi-m2-plus
 endef
 
 define U-Boot/sopine_baseboard
   BUILD_SUBTARGET:=cortexa53
   NAME:=Sopine Baseboard
-  BUILD_DEVICES:=sun50i-a64-sopine-baseboard
+  BUILD_DEVICES:=pine64_sopine-baseboard
   DEPENDS:=+PACKAGE_u-boot-sopine_baseboard:arm-trusted-firmware-sunxi
   UENV:=a64
 endef
@@ -234,7 +234,7 @@ endef
 define U-Boot/orangepi_zero_plus
   BUILD_SUBTARGET:=cortexa53
   NAME:=Xunlong Orange Pi Zero Plus
-  BUILD_DEVICES:=sun50i-h5-orangepi-zero-plus
+  BUILD_DEVICES:=xunlong_orangepi-zero-plus
   DEPENDS:=+PACKAGE_u-boot-orangepi_zero_plus:arm-trusted-firmware-sunxi
   UENV:=a64
 endef
@@ -242,7 +242,7 @@ endef
 define U-Boot/orangepi_pc2
   BUILD_SUBTARGET:=cortexa53
   NAME:=Xunlong Orange Pi PC2
-  BUILD_DEVICES:=sun50i-h5-orangepi-pc2
+  BUILD_DEVICES:=xunlong_orangepi-pc2
   DEPENDS:=+PACKAGE_u-boot-orangepi_pc2:arm-trusted-firmware-sunxi
   UENV:=a64
 endef
@@ -250,7 +250,7 @@ endef
 define U-Boot/Sinovoip_BPI_M2_Ultra
   BUILD_SUBTARGET:=cortexa7
   NAME:=Bananapi M2 Ultra
-  BUILD_DEVICES:=sun8i-r40-bananapi-m2-ultra
+  BUILD_DEVICES:=lemaker_bananapi-m2-ultra
 endef
 
 UBOOT_TARGETS := \
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index 8f95c61906..04e0abee49 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -37,6 +37,7 @@ define Device/Default
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
+  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 endef
 
 include cortex-a7.mk
diff --git a/target/linux/sunxi/image/cortex-a53.mk b/target/linux/sunxi/image/cortex-a53.mk
index 7a67160c33..d6c17d95ff 100644
--- a/target/linux/sunxi/image/cortex-a53.mk
+++ b/target/linux/sunxi/image/cortex-a53.mk
@@ -7,7 +7,7 @@
 #
 ifeq ($(SUBTARGET),cortexa53)
 
-define Device/sun50i-h5-nanopi-neo-plus2
+define Device/friendlyarm_nanopi-neo-plus2
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi NEO Plus2
   SUPPORTED_DEVICES:=nanopi-neo-plus2
@@ -16,9 +16,9 @@ define Device/sun50i-h5-nanopi-neo-plus2
   KERNEL := kernel-bin
 endef
 
-TARGET_DEVICES += sun50i-h5-nanopi-neo-plus2
+TARGET_DEVICES += friendlyarm_nanopi-neo-plus2
 
-define Device/sun50i-h5-nanopi-neo2
+define Device/friendlyarm_nanopi-neo2
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi NEO2
   SUPPORTED_DEVICES:=nanopi-neo2
@@ -27,51 +27,47 @@ define Device/sun50i-h5-nanopi-neo2
   KERNEL := kernel-bin
 endef
 
-TARGET_DEVICES += sun50i-h5-nanopi-neo2
+TARGET_DEVICES += friendlyarm_nanopi-neo2
 
-define Device/sun50i-a64-pine64-plus
+define Device/pine64_pine64-plus
   DEVICE_VENDOR := Pine64
   DEVICE_MODEL := Pine64+
-  SUPPORTED_DEVICES:=pine64,pine64-plus
   SUNXI_DTS:=allwinner/sun50i-a64-pine64-plus
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
 
-TARGET_DEVICES += sun50i-a64-pine64-plus
+TARGET_DEVICES += pine64_pine64-plus
 
-define Device/sun50i-a64-sopine-baseboard
+define Device/pine64_sopine-baseboard
   DEVICE_VENDOR := Pine64
   DEVICE_MODEL := SoPine
-  SUPPORTED_DEVICES:=pine64,sopine-baseboard
   SUNXI_DTS:=allwinner/sun50i-a64-sopine-baseboard
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
 
-TARGET_DEVICES += sun50i-a64-sopine-baseboard
+TARGET_DEVICES += pine64_sopine-baseboard
 
 
-define Device/sun50i-h5-orangepi-zero-plus
+define Device/xunlong_orangepi-zero-plus
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi Zero Plus
-  SUPPORTED_DEVICES:=xunlong,orangepi-zero-plus
   SUNXI_DTS:=allwinner/sun50i-h5-orangepi-zero-plus
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
 
-TARGET_DEVICES += sun50i-h5-orangepi-zero-plus
+TARGET_DEVICES += xunlong_orangepi-zero-plus
 
-define Device/sun50i-h5-orangepi-pc2
+define Device/xunlong_orangepi-pc2
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi PC 2
-  SUPPORTED_DEVICES:=xunlong,orangepi-pc2
   SUNXI_DTS:=allwinner/sun50i-h5-orangepi-pc2
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
 
-TARGET_DEVICES += sun50i-h5-orangepi-pc2
+TARGET_DEVICES += xunlong_orangepi-pc2
 
 endif
diff --git a/target/linux/sunxi/image/cortex-a7.mk b/target/linux/sunxi/image/cortex-a7.mk
index 3375a4542c..32e094efb8 100644
--- a/target/linux/sunxi/image/cortex-a7.mk
+++ b/target/linux/sunxi/image/cortex-a7.mk
@@ -8,245 +8,223 @@
 
 ifeq ($(SUBTARGET),cortexa7)
 
-define Device/sun7i-a20-olinuxino-lime
+define Device/olimex_a20-olinuxino-lime
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-LIME
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi
-  SUPPORTED_DEVICES:=olimex,a20-olinuxino-lime
   SUNXI_DTS:=sun7i-a20-olinuxino-lime
 endef
 
-TARGET_DEVICES += sun7i-a20-olinuxino-lime
+TARGET_DEVICES += olimex_a20-olinuxino-lime
 
 
-define Device/sun7i-a20-olinuxino-lime2
+define Device/olimex_a20-olinuxino-lime2
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-LIME2
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-usb-hid
-  SUPPORTED_DEVICES:=olimex,a20-olinuxino-lime2
   SUNXI_DTS:=sun7i-a20-olinuxino-lime2
 endef
 
-TARGET_DEVICES += sun7i-a20-olinuxino-lime2
+TARGET_DEVICES += olimex_a20-olinuxino-lime2
 
 
-define Device/sun7i-a20-olinuxino-lime2-emmc
+define Device/olimex_a20-olinuxino-lime2-emmc
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-LIME2
   DEVICE_VARIANT := eMMC
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-usb-hid
-  SUPPORTED_DEVICES:=olimex,a20-olinuxino-lime2-emmc
   SUNXI_DTS:=sun7i-a20-olinuxino-lime2-emmc
 endef
 
-TARGET_DEVICES += sun7i-a20-olinuxino-lime2-emmc
+TARGET_DEVICES += olimex_a20-olinuxino-lime2-emmc
 
 
-define Device/sun7i-a20-olinuxino-micro
+define Device/olimex_a20-olinuxino-micro
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-MICRO
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
-  SUPPORTED_DEVICES:=olimex,a20-olinuxino-micro
   SUNXI_DTS:=sun7i-a20-olinuxino-micro
 endef
 
-TARGET_DEVICES += sun7i-a20-olinuxino-micro
+TARGET_DEVICES += olimex_a20-olinuxino-micro
 
 
-define Device/sun7i-a20-bananapi
+define Device/lemaker_bananapi
   DEVICE_VENDOR := LeMaker
   DEVICE_MODEL := Banana Pi
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
-  SUPPORTED_DEVICES:=lemaker,bananapi
   SUNXI_DTS:=sun7i-a20-bananapi
 endef
 
-TARGET_DEVICES += sun7i-a20-bananapi
+TARGET_DEVICES += lemaker_bananapi
 
 
-define Device/sun7i-a20-bananapro
+define Device/lemaker_bananapro
   DEVICE_VENDOR := LeMaker
   DEVICE_MODEL := Banana Pro
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-brcmfmac
-  SUPPORTED_DEVICES:=lemaker,bananapro
   SUNXI_DTS:=sun7i-a20-bananapro
 endef
 
-TARGET_DEVICES += sun7i-a20-bananapro
+TARGET_DEVICES += lemaker_bananapro
 
 
-define Device/sun7i-a20-cubieboard2
+define Device/cubietech_cubieboard2
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubieboard2
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
-  SUPPORTED_DEVICES:=cubietech,cubieboard2
   SUNXI_DTS:=sun7i-a20-cubieboard2
 endef
 
-TARGET_DEVICES += sun7i-a20-cubieboard2
+TARGET_DEVICES += cubietech_cubieboard2
 
 
-define Device/sun7i-a20-cubietruck
+define Device/cubietech_cubietruck
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubietruck
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-brcmfmac
-  SUPPORTED_DEVICES:=cubietech,cubietruck
   SUNXI_DTS:=sun7i-a20-cubietruck
 endef
 
-TARGET_DEVICES += sun7i-a20-cubietruck
+TARGET_DEVICES += cubietech_cubietruck
 
 
-define Device/sun7i-a20-lamobo-r1
+define Device/lamobo_lamobo-r1
   DEVICE_VENDOR := Lamobo
   DEVICE_MODEL := Lamobo R1
   DEVICE_PACKAGES:=kmod-ata-sunxi kmod-rtl8192cu swconfig wpad-basic
-  SUPPORTED_DEVICES:=lamobo,lamobo-r1
   SUNXI_DTS:=sun7i-a20-lamobo-r1
 endef
 
-TARGET_DEVICES += sun7i-a20-lamobo-r1
+TARGET_DEVICES += lamobo_lamobo-r1
 
 
-define Device/sun6i-a31-m9
+define Device/mele_m9
   DEVICE_VENDOR := Mele
   DEVICE_MODEL := M9
   DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
-  SUPPORTED_DEVICES:=mele,m9
   SUNXI_DTS:=sun6i-a31-m9
 endef
 
-TARGET_DEVICES += sun6i-a31-m9
+TARGET_DEVICES += mele_m9
 
 
-define Device/sun8i-h2-plus-orangepi-zero
+define Device/xunlong_orangepi-zero
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi Zero
   DEVICE_PACKAGES:=kmod-rtc-sunxi
-  SUPPORTED_DEVICES:=xunlong,orangepi-zero
   SUNXI_DTS:=sun8i-h2-plus-orangepi-zero
 endef
 
-TARGET_DEVICES += sun8i-h2-plus-orangepi-zero
+TARGET_DEVICES += xunlong_orangepi-zero
 
 
-define Device/sun8i-h2-plus-orangepi-r1
+define Device/xunlong_orangepi-r1
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi R1
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-usb-net kmod-usb-net-rtl8152
-  SUPPORTED_DEVICES:=xunlong,orangepi-r1
   SUNXI_DTS:=sun8i-h2-plus-orangepi-r1
 endef
 
-TARGET_DEVICES += sun8i-h2-plus-orangepi-r1
+TARGET_DEVICES += xunlong_orangepi-r1
 
-define Device/sun8i-h3-bananapi-m2-plus
+define Device/sinovoip_bananapi-m2-plus
   DEVICE_VENDOR := Sinovoip
   DEVICE_MODEL := Banana Pi M2+
   DEVICE_PACKAGES:=kmod-rtc-sunxi \
 	kmod-leds-gpio kmod-ledtrig-heartbeat \
 	kmod-brcmfmac brcmfmac-firmware-43430a0-sdio wpad-basic
-  SUPPORTED_DEVICES:=sinovoip,bananapi-m2-plus
   SUNXI_DTS:=sun8i-h3-bananapi-m2-plus
 endef
 
-TARGET_DEVICES += sun8i-h3-bananapi-m2-plus
+TARGET_DEVICES += sinovoip_bananapi-m2-plus
 
-define Device/sun8i-h3-nanopi-m1-plus
+define Device/friendlyarm_nanopi-m1-plus
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi M1 Plus
   DEVICE_PACKAGES:=kmod-rtc-sunxi \
 	kmod-leds-gpio kmod-ledtrig-heartbeat \
 	kmod-brcmfmac brcmfmac-firmware-43430-sdio wpad-basic
-  SUPPORTED_DEVICES:=friendlyarm,nanopi-m1-plus
   SUNXI_DTS:=sun8i-h3-nanopi-m1-plus
 endef
 
-TARGET_DEVICES += sun8i-h3-nanopi-m1-plus
+TARGET_DEVICES += friendlyarm_nanopi-m1-plus
 
 
-define Device/sun8i-h3-nanopi-neo
+define Device/friendlyarm_nanopi-neo
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi NEO
-  SUPPORTED_DEVICES:=friendlyarm,nanopi-neo
   SUNXI_DTS:=sun8i-h3-nanopi-neo
 endef
 
-TARGET_DEVICES += sun8i-h3-nanopi-neo
+TARGET_DEVICES += friendlyarm_nanopi-neo
 
 
-define Device/sun8i-h3-orangepi-one
+define Device/xunlong_orangepi-one
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi One
   DEVICE_PACKAGES:=kmod-rtc-sunxi
-  SUPPORTED_DEVICES:=xunlong,orangepi-one
   SUNXI_DTS:=sun8i-h3-orangepi-one
 endef
 
-TARGET_DEVICES += sun8i-h3-orangepi-one
+TARGET_DEVICES += xunlong_orangepi-one
 
 
-define Device/sun8i-h3-orangepi-pc
+define Device/xunlong_orangepi-pc
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi PC
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-gpio-button-hotplug
-  SUPPORTED_DEVICES:=xunlong,orangepi-pc
   SUNXI_DTS:=sun8i-h3-orangepi-pc
 endef
 
-TARGET_DEVICES += sun8i-h3-orangepi-pc
+TARGET_DEVICES += xunlong_orangepi-pc
 
 
-define Device/sun8i-h3-orangepi-pc-plus
+define Device/xunlong_orangepi-pc-plus
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi PC Plus
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-gpio-button-hotplug
-  SUPPORTED_DEVICES:=xunlong,orangepi-pc-plus
   SUNXI_DTS:=sun8i-h3-orangepi-pc-plus
 endef
 
-TARGET_DEVICES += sun8i-h3-orangepi-pc-plus
+TARGET_DEVICES += xunlong_orangepi-pc-plus
 
 
-define Device/sun8i-h3-orangepi-plus
+define Device/xunlong_orangepi-plus
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi Plus
   DEVICE_PACKAGES:=kmod-rtc-sunxi
-  SUPPORTED_DEVICES:=xunlong,orangepi-plus
   SUNXI_DTS:=sun8i-h3-orangepi-plus
 endef
 
-TARGET_DEVICES += sun8i-h3-orangepi-plus
+TARGET_DEVICES += xunlong_orangepi-plus
 
-define Device/sun8i-h3-orangepi-2
+define Device/xunlong_orangepi-2
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi 2
   DEVICE_PACKAGES:=kmod-rtc-sunxi
-  SUPPORTED_DEVICES:=xunlong,orangepi-2
   SUNXI_DTS:=sun8i-h3-orangepi-2
 endef
 
-TARGET_DEVICES += sun8i-h3-orangepi-2
+TARGET_DEVICES += xunlong_orangepi-2
 
 
-define Device/sun7i-a20-pcduino3
+define Device/linksprite_pcduino3
   DEVICE_VENDOR := LinkSprite
   DEVICE_MODEL := pcDuino3
   DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-rtl8xxxu rtl8188eu-firmware
-  SUPPORTED_DEVICES:=linksprite,pcduino3
   SUNXI_DTS:=sun7i-a20-pcduino3
 endef
 
-TARGET_DEVICES += sun7i-a20-pcduino3
+TARGET_DEVICES += linksprite_pcduino3
 
-define Device/sun8i-r40-bananapi-m2-ultra
+define Device/lemaker_bananapi-m2-ultra
   DEVICE_VENDOR := LeMaker
   DEVICE_MODEL := Banana Pi M2 Ultra
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
-  SUPPORTED_DEVICES:=lemaker,bananapi-m2-ultra
   SUNXI_DTS:=sun8i-r40-bananapi-m2-ultra
 endef
 
-TARGET_DEVICES += sun8i-r40-bananapi-m2-ultra
+TARGET_DEVICES += lemaker_bananapi-m2-ultra
 
 endif
diff --git a/target/linux/sunxi/image/cortex-a8.mk b/target/linux/sunxi/image/cortex-a8.mk
index 4eeaab99d1..073ed8f2d1 100644
--- a/target/linux/sunxi/image/cortex-a8.mk
+++ b/target/linux/sunxi/image/cortex-a8.mk
@@ -7,18 +7,17 @@
 #
 ifeq ($(SUBTARGET),cortexa8)
 
-define Device/sun4i-a10-olinuxino-lime
+define Device/olimex_a10-olinuxino-lime
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A10-OLinuXino-LIME
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
-  SUPPORTED_DEVICES:=olimex,a10-olinuxino-lime
   SUNXI_DTS:=sun4i-a10-olinuxino-lime
 endef
 
-TARGET_DEVICES += sun4i-a10-olinuxino-lime
+TARGET_DEVICES += olimex_a10-olinuxino-lime
 
 
-define Device/sun5i-a13-olimex-som
+define Device/olimex_a13-olimex-som
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A13-SOM
   DEVICE_PACKAGES:=kmod-rtl8192cu
@@ -26,50 +25,46 @@ define Device/sun5i-a13-olimex-som
   SUNXI_DTS:=sun5i-a13-olinuxino
 endef
 
-TARGET_DEVICES += sun5i-a13-olimex-som
+TARGET_DEVICES += olimex_a13-olimex-som
 
 
-define Device/sun5i-a13-olinuxino
+define Device/olimex_a13-olinuxino
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A13-OLinuXino
   DEVICE_PACKAGES:=kmod-rtl8192cu
-  SUPPORTED_DEVICES:=olimex,a13-olinuxino
   SUNXI_DTS:=sun5i-a13-olinuxino
 endef
 
-TARGET_DEVICES += sun5i-a13-olinuxino
+TARGET_DEVICES += olimex_a13-olinuxino
 
 
-define Device/sun4i-a10-cubieboard
+define Device/cubietech_a10-cubieboard
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubieboard
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
-  SUPPORTED_DEVICES:=cubietech,a10-cubieboard
   SUNXI_DTS:=sun4i-a10-cubieboard
 endef
 
-TARGET_DEVICES += sun4i-a10-cubieboard
+TARGET_DEVICES += cubietech_a10-cubieboard
 
 
-define Device/sun4i-a10-pcduino
+define Device/linksprite_a10-pcduino
   DEVICE_VENDOR := LinkSprite
   DEVICE_MODEL := pcDuino
   DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
-  SUPPORTED_DEVICES:=linksprite,a10-pcduino
   SUNXI_DTS:=sun4i-a10-pcduino
 endef
 
-TARGET_DEVICES += sun4i-a10-pcduino
+TARGET_DEVICES += linksprite_a10-pcduino
 
 
-define Device/sun4i-a10-marsboard
+define Device/marsboard_a10-marsboard
   DEVICE_VENDOR := HAOYU Electronics
   DEVICE_MODEL := MarsBoard A10
   DEVICE_PACKAGES:=mod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi sound-soc-sunxi
-  SUPPORTED_DEVICES:=marsboard,a10-marsboard
   SUNXI_DTS:=sun4i-a10-marsboard
 endef
 
-TARGET_DEVICES += sun4i-a10-marsboard
+TARGET_DEVICES += marsboard_a10-marsboard
 
 endif
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sat Dec  7 17:28:26 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sat,  7 Dec 2019 23:28:26 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] sunxi: construct DTS name from device
 node name and SOC
In-Reply-To: <20191207222826.47389-1-freifunk@adrianschmutzler.de>
References: <20191207222826.47389-1-freifunk@adrianschmutzler.de>
Message-ID: <20191207222826.47389-3-freifunk@adrianschmutzler.de>

The device part in the SUNXI_DTS variable always corresponds to
device node name. This is another redundancy that can be removed
by calculating the DTS name from a newly introduced SUNXI_SOC
variable and the node name.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/sunxi/image/Makefile      |  5 ++-
 target/linux/sunxi/image/cortex-a53.mk | 18 +++++++----
 target/linux/sunxi/image/cortex-a7.mk  | 44 +++++++++++++-------------
 target/linux/sunxi/image/cortex-a8.mk  | 13 ++++----
 4 files changed, 45 insertions(+), 35 deletions(-)

diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index 04e0abee49..929f4c70f9 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -32,12 +32,15 @@ endef
 # why \x00\x00\x00\x00 for zImage-initramfs
 define Device/Default
   PROFILES := Default
-  DEVICE_VARS := SUNXI_DTS SUNXI_UBOOT
+  DEVICE_VARS := SUNXI_SOC SUNXI_DTS SUNXI_DTS_DIR SUNXI_UBOOT
   KERNEL_NAME := zImage
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
   SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
+  SUNXI_SOC :=
+  SUNXI_DTS_DIR :=
+  SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SUNXI_SOC)-$(lastword $(subst _, ,$(1)))
 endef
 
 include cortex-a7.mk
diff --git a/target/linux/sunxi/image/cortex-a53.mk b/target/linux/sunxi/image/cortex-a53.mk
index d6c17d95ff..b0d087b9b1 100644
--- a/target/linux/sunxi/image/cortex-a53.mk
+++ b/target/linux/sunxi/image/cortex-a53.mk
@@ -11,7 +11,8 @@ define Device/friendlyarm_nanopi-neo-plus2
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi NEO Plus2
   SUPPORTED_DEVICES:=nanopi-neo-plus2
-  SUNXI_DTS:=allwinner/sun50i-h5-nanopi-neo-plus2
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-h5
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
@@ -22,7 +23,8 @@ define Device/friendlyarm_nanopi-neo2
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi NEO2
   SUPPORTED_DEVICES:=nanopi-neo2
-  SUNXI_DTS:=allwinner/sun50i-h5-nanopi-neo2
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-h5
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
@@ -32,7 +34,8 @@ TARGET_DEVICES += friendlyarm_nanopi-neo2
 define Device/pine64_pine64-plus
   DEVICE_VENDOR := Pine64
   DEVICE_MODEL := Pine64+
-  SUNXI_DTS:=allwinner/sun50i-a64-pine64-plus
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-a64
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
@@ -42,7 +45,8 @@ TARGET_DEVICES += pine64_pine64-plus
 define Device/pine64_sopine-baseboard
   DEVICE_VENDOR := Pine64
   DEVICE_MODEL := SoPine
-  SUNXI_DTS:=allwinner/sun50i-a64-sopine-baseboard
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-a64
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
@@ -53,7 +57,8 @@ TARGET_DEVICES += pine64_sopine-baseboard
 define Device/xunlong_orangepi-zero-plus
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi Zero Plus
-  SUNXI_DTS:=allwinner/sun50i-h5-orangepi-zero-plus
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-h5
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
@@ -63,7 +68,8 @@ TARGET_DEVICES += xunlong_orangepi-zero-plus
 define Device/xunlong_orangepi-pc2
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi PC 2
-  SUNXI_DTS:=allwinner/sun50i-h5-orangepi-pc2
+  SUNXI_DTS_DIR := allwinner/
+  SUNXI_SOC := sun50i-h5
   KERNEL_NAME := Image
   KERNEL := kernel-bin
 endef
diff --git a/target/linux/sunxi/image/cortex-a7.mk b/target/linux/sunxi/image/cortex-a7.mk
index 32e094efb8..0465c2ba9a 100644
--- a/target/linux/sunxi/image/cortex-a7.mk
+++ b/target/linux/sunxi/image/cortex-a7.mk
@@ -12,7 +12,7 @@ define Device/olimex_a20-olinuxino-lime
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-LIME
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi
-  SUNXI_DTS:=sun7i-a20-olinuxino-lime
+  SUNXI_SOC := sun7i
 endef
 
 TARGET_DEVICES += olimex_a20-olinuxino-lime
@@ -22,7 +22,7 @@ define Device/olimex_a20-olinuxino-lime2
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-LIME2
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-usb-hid
-  SUNXI_DTS:=sun7i-a20-olinuxino-lime2
+  SUNXI_SOC := sun7i
 endef
 
 TARGET_DEVICES += olimex_a20-olinuxino-lime2
@@ -33,7 +33,7 @@ define Device/olimex_a20-olinuxino-lime2-emmc
   DEVICE_MODEL := A20-OLinuXino-LIME2
   DEVICE_VARIANT := eMMC
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-usb-hid
-  SUNXI_DTS:=sun7i-a20-olinuxino-lime2-emmc
+  SUNXI_SOC := sun7i
 endef
 
 TARGET_DEVICES += olimex_a20-olinuxino-lime2-emmc
@@ -43,7 +43,7 @@ define Device/olimex_a20-olinuxino-micro
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-MICRO
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
-  SUNXI_DTS:=sun7i-a20-olinuxino-micro
+  SUNXI_SOC := =sun7i
 endef
 
 TARGET_DEVICES += olimex_a20-olinuxino-micro
@@ -53,7 +53,7 @@ define Device/lemaker_bananapi
   DEVICE_VENDOR := LeMaker
   DEVICE_MODEL := Banana Pi
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
-  SUNXI_DTS:=sun7i-a20-bananapi
+  SUNXI_SOC := sun7i-a20
 endef
 
 TARGET_DEVICES += lemaker_bananapi
@@ -63,7 +63,7 @@ define Device/lemaker_bananapro
   DEVICE_VENDOR := LeMaker
   DEVICE_MODEL := Banana Pro
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-brcmfmac
-  SUNXI_DTS:=sun7i-a20-bananapro
+  SUNXI_SOC := sun7i-a20
 endef
 
 TARGET_DEVICES += lemaker_bananapro
@@ -73,7 +73,7 @@ define Device/cubietech_cubieboard2
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubieboard2
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
-  SUNXI_DTS:=sun7i-a20-cubieboard2
+  SUNXI_SOC := sun7i-a20
 endef
 
 TARGET_DEVICES += cubietech_cubieboard2
@@ -83,7 +83,7 @@ define Device/cubietech_cubietruck
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubietruck
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-brcmfmac
-  SUNXI_DTS:=sun7i-a20-cubietruck
+  SUNXI_SOC := sun7i-a20
 endef
 
 TARGET_DEVICES += cubietech_cubietruck
@@ -93,7 +93,7 @@ define Device/lamobo_lamobo-r1
   DEVICE_VENDOR := Lamobo
   DEVICE_MODEL := Lamobo R1
   DEVICE_PACKAGES:=kmod-ata-sunxi kmod-rtl8192cu swconfig wpad-basic
-  SUNXI_DTS:=sun7i-a20-lamobo-r1
+  SUNXI_SOC := sun7i-a20
 endef
 
 TARGET_DEVICES += lamobo_lamobo-r1
@@ -103,7 +103,7 @@ define Device/mele_m9
   DEVICE_VENDOR := Mele
   DEVICE_MODEL := M9
   DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
-  SUNXI_DTS:=sun6i-a31-m9
+  SUNXI_SOC := sun6i-a31
 endef
 
 TARGET_DEVICES += mele_m9
@@ -113,7 +113,7 @@ define Device/xunlong_orangepi-zero
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi Zero
   DEVICE_PACKAGES:=kmod-rtc-sunxi
-  SUNXI_DTS:=sun8i-h2-plus-orangepi-zero
+  SUNXI_SOC := sun8i-h2-plus
 endef
 
 TARGET_DEVICES += xunlong_orangepi-zero
@@ -123,7 +123,7 @@ define Device/xunlong_orangepi-r1
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi R1
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-usb-net kmod-usb-net-rtl8152
-  SUNXI_DTS:=sun8i-h2-plus-orangepi-r1
+  SUNXI_SOC := sun8i-h2-plus
 endef
 
 TARGET_DEVICES += xunlong_orangepi-r1
@@ -134,7 +134,7 @@ define Device/sinovoip_bananapi-m2-plus
   DEVICE_PACKAGES:=kmod-rtc-sunxi \
 	kmod-leds-gpio kmod-ledtrig-heartbeat \
 	kmod-brcmfmac brcmfmac-firmware-43430a0-sdio wpad-basic
-  SUNXI_DTS:=sun8i-h3-bananapi-m2-plus
+  SUNXI_SOC := sun8i-h3
 endef
 
 TARGET_DEVICES += sinovoip_bananapi-m2-plus
@@ -145,7 +145,7 @@ define Device/friendlyarm_nanopi-m1-plus
   DEVICE_PACKAGES:=kmod-rtc-sunxi \
 	kmod-leds-gpio kmod-ledtrig-heartbeat \
 	kmod-brcmfmac brcmfmac-firmware-43430-sdio wpad-basic
-  SUNXI_DTS:=sun8i-h3-nanopi-m1-plus
+  SUNXI_SOC := sun8i-h3
 endef
 
 TARGET_DEVICES += friendlyarm_nanopi-m1-plus
@@ -154,7 +154,7 @@ TARGET_DEVICES += friendlyarm_nanopi-m1-plus
 define Device/friendlyarm_nanopi-neo
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi NEO
-  SUNXI_DTS:=sun8i-h3-nanopi-neo
+  SUNXI_SOC := sun8i-h3
 endef
 
 TARGET_DEVICES += friendlyarm_nanopi-neo
@@ -164,7 +164,7 @@ define Device/xunlong_orangepi-one
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi One
   DEVICE_PACKAGES:=kmod-rtc-sunxi
-  SUNXI_DTS:=sun8i-h3-orangepi-one
+  SUNXI_SOC := sun8i-h3
 endef
 
 TARGET_DEVICES += xunlong_orangepi-one
@@ -174,7 +174,7 @@ define Device/xunlong_orangepi-pc
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi PC
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-gpio-button-hotplug
-  SUNXI_DTS:=sun8i-h3-orangepi-pc
+  SUNXI_SOC := sun8i-h3
 endef
 
 TARGET_DEVICES += xunlong_orangepi-pc
@@ -184,7 +184,7 @@ define Device/xunlong_orangepi-pc-plus
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi PC Plus
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-gpio-button-hotplug
-  SUNXI_DTS:=sun8i-h3-orangepi-pc-plus
+  SUNXI_SOC := sun8i-h3
 endef
 
 TARGET_DEVICES += xunlong_orangepi-pc-plus
@@ -194,7 +194,7 @@ define Device/xunlong_orangepi-plus
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi Plus
   DEVICE_PACKAGES:=kmod-rtc-sunxi
-  SUNXI_DTS:=sun8i-h3-orangepi-plus
+  SUNXI_SOC := sun8i-h3
 endef
 
 TARGET_DEVICES += xunlong_orangepi-plus
@@ -203,7 +203,7 @@ define Device/xunlong_orangepi-2
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi 2
   DEVICE_PACKAGES:=kmod-rtc-sunxi
-  SUNXI_DTS:=sun8i-h3-orangepi-2
+  SUNXI_SOC := sun8i-h3
 endef
 
 TARGET_DEVICES += xunlong_orangepi-2
@@ -213,7 +213,7 @@ define Device/linksprite_pcduino3
   DEVICE_VENDOR := LinkSprite
   DEVICE_MODEL := pcDuino3
   DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-rtl8xxxu rtl8188eu-firmware
-  SUNXI_DTS:=sun7i-a20-pcduino3
+  SUNXI_SOC := sun7i-a20
 endef
 
 TARGET_DEVICES += linksprite_pcduino3
@@ -222,7 +222,7 @@ define Device/lemaker_bananapi-m2-ultra
   DEVICE_VENDOR := LeMaker
   DEVICE_MODEL := Banana Pi M2 Ultra
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
-  SUNXI_DTS:=sun8i-r40-bananapi-m2-ultra
+  SUNXI_SOC := sun8i-r40
 endef
 
 TARGET_DEVICES += lemaker_bananapi-m2-ultra
diff --git a/target/linux/sunxi/image/cortex-a8.mk b/target/linux/sunxi/image/cortex-a8.mk
index 073ed8f2d1..d6b5a46a22 100644
--- a/target/linux/sunxi/image/cortex-a8.mk
+++ b/target/linux/sunxi/image/cortex-a8.mk
@@ -11,7 +11,7 @@ define Device/olimex_a10-olinuxino-lime
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A10-OLinuXino-LIME
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
-  SUNXI_DTS:=sun4i-a10-olinuxino-lime
+  SUNXI_SOC := sun4i
 endef
 
 TARGET_DEVICES += olimex_a10-olinuxino-lime
@@ -22,7 +22,8 @@ define Device/olimex_a13-olimex-som
   DEVICE_MODEL := A13-SOM
   DEVICE_PACKAGES:=kmod-rtl8192cu
   SUPPORTED_DEVICES:=olimex,a13-olinuxino
-  SUNXI_DTS:=sun5i-a13-olinuxino
+  SUNXI_SOC := sun5i-a13
+  SUNXI_DTS := sun5i-a13-olinuxino
 endef
 
 TARGET_DEVICES += olimex_a13-olimex-som
@@ -32,7 +33,7 @@ define Device/olimex_a13-olinuxino
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A13-OLinuXino
   DEVICE_PACKAGES:=kmod-rtl8192cu
-  SUNXI_DTS:=sun5i-a13-olinuxino
+  SUNXI_SOC := sun5i
 endef
 
 TARGET_DEVICES += olimex_a13-olinuxino
@@ -42,7 +43,7 @@ define Device/cubietech_a10-cubieboard
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubieboard
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
-  SUNXI_DTS:=sun4i-a10-cubieboard
+  SUNXI_SOC := sun4i
 endef
 
 TARGET_DEVICES += cubietech_a10-cubieboard
@@ -52,7 +53,7 @@ define Device/linksprite_a10-pcduino
   DEVICE_VENDOR := LinkSprite
   DEVICE_MODEL := pcDuino
   DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
-  SUNXI_DTS:=sun4i-a10-pcduino
+  SUNXI_SOC := sun4i
 endef
 
 TARGET_DEVICES += linksprite_a10-pcduino
@@ -62,7 +63,7 @@ define Device/marsboard_a10-marsboard
   DEVICE_VENDOR := HAOYU Electronics
   DEVICE_MODEL := MarsBoard A10
   DEVICE_PACKAGES:=mod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi sound-soc-sunxi
-  SUNXI_DTS:=sun4i-a10-marsboard
+  SUNXI_SOC := sun4i
 endef
 
 TARGET_DEVICES += marsboard_a10-marsboard
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Sat Dec  7 17:36:10 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Sat, 7 Dec 2019 23:36:10 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] sunxi: construct DTS name from
 device node name and SOC
In-Reply-To: <20191207222826.47389-3-freifunk@adrianschmutzler.de>
References: <20191207222826.47389-1-freifunk@adrianschmutzler.de>
 <20191207222826.47389-3-freifunk@adrianschmutzler.de>
Message-ID: <009101d5ad4e$b9620200$2c260600$@adrianschmutzler.de>

> -  SUNXI_DTS:=sun7i-a20-olinuxino-micro
> +  SUNXI_SOC := =sun7i

The extra "=" has already been removed during my build tests (just forgot to commit it). If someone tests on this device, please remove it manually.

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191207/fe5b1f7c/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From freifunk at adrianschmutzler.de  Sat Dec  7 17:41:29 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sat,  7 Dec 2019 23:41:29 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: remove unused DTS from DEVICE_VARS
Message-ID: <20191207224129.47882-1-freifunk@adrianschmutzler.de>

The DTS variable has been removed in 402138d12dca ("ramips: Derive
DTS name from device name in Makefile"), but the DEVICE_VARS entry
has been overlooked.

Remove it now since we are not using this variable.

This must _not_ be backported to 19.07, where the variable is still
in use.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/ramips/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 16748b8260..d700e69440 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-DEVICE_VARS += DTS IMAGE_SIZE NETGEAR_BOARD_ID NETGEAR_HW_ID
+DEVICE_VARS += IMAGE_SIZE NETGEAR_BOARD_ID NETGEAR_HW_ID
 DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
 DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
 DEVICE_VARS += SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ynezz at true.cz  Sat Dec  7 17:52:53 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Sat,  7 Dec 2019 23:52:53 +0100
Subject: [OpenWrt-Devel] [PATCH uci 1/5] cli: fix format string clang-10
 warning
Message-ID: <20191207225257.14135-1-ynezz@true.cz>

From: Rosen Penev <rosenp at gmail.com>

Fixes:

 cli.c:196:19: error: format string is not a string literal [-Werror=format-nonliteral]

Signed-off-by: Rosen Penev <rosenp at gmail.com>
[split into separate commit]
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 cli.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cli.c b/cli.c
index 8970f4f0b8ce..6ba97ea07424 100644
--- a/cli.c
+++ b/cli.c
@@ -185,6 +185,7 @@ static void cli_perror(void)
 	uci_perror(ctx, appname);
 }
 
+__attribute__((format(printf, 1, 2)))
 static void cli_error(const char *fmt, ...)
 {
 	va_list ap;

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Sat Dec  7 17:52:54 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Sat,  7 Dec 2019 23:52:54 +0100
Subject: [OpenWrt-Devel] [PATCH uci 2/5] lua: add missing forward declaration
In-Reply-To: <20191207225257.14135-1-ynezz@true.cz>
References: <20191207225257.14135-1-ynezz@true.cz>
Message-ID: <20191207225257.14135-2-ynezz@true.cz>

Fixes following warning reported by clang-10:

  lua/uci.c:1050:1: error: no previous declaration for ?luaopen_uci? [-Werror=missing-declarations]

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 lua/uci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lua/uci.c b/lua/uci.c
index ecfb2998d749..196a25bcf08a 100644
--- a/lua/uci.c
+++ b/lua/uci.c
@@ -36,6 +36,8 @@
 
 #if !defined LUA_VERSION_NUM || LUA_VERSION_NUM==501
 
+int luaopen_uci(lua_State *L);
+
 /*
  * ** Adapted from Lua 5.2.0
  * */

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Sat Dec  7 17:52:55 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Sat,  7 Dec 2019 23:52:55 +0100
Subject: [OpenWrt-Devel] [PATCH uci 3/5] tests: cram: Lua: add test case for
 uci_get_errorstr
In-Reply-To: <20191207225257.14135-1-ynezz@true.cz>
References: <20191207225257.14135-1-ynezz@true.cz>
Message-ID: <20191207225257.14135-3-ynezz@true.cz>

In order to extend test coverage and help testing refactoring.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 tests/cram/config/broken | 1 +
 tests/cram/lua/basic.lua | 2 ++
 tests/cram/test_ucilua.t | 1 +
 3 files changed, 4 insertions(+)
 create mode 100644 tests/cram/config/broken

diff --git a/tests/cram/config/broken b/tests/cram/config/broken
new file mode 100644
index 000000000000..d2ecc0158e68
--- /dev/null
+++ b/tests/cram/config/broken
@@ -0,0 +1 @@
+config alias' 'a'
diff --git a/tests/cram/lua/basic.lua b/tests/cram/lua/basic.lua
index ceb706f6973e..f0052644c00e 100644
--- a/tests/cram/lua/basic.lua
+++ b/tests/cram/lua/basic.lua
@@ -42,3 +42,5 @@ local t = c:get("network", "lan", "dns")
 A(#t == 2)
 A(t[1] == "ns1.king.banik.cz")
 A(t[2] == "ns2.openwrt.org")
+
+print(c:get_all("broken"))
diff --git a/tests/cram/test_ucilua.t b/tests/cram/test_ucilua.t
index 1544e23c1bf4..cfe1f2e0e360 100644
--- a/tests/cram/test_ucilua.t
+++ b/tests/cram/test_ucilua.t
@@ -56,3 +56,4 @@ run basic Lua tests:
   proto: dhcp
   .anonymous: false
   aliases: c d
+  nil\tuci: Parse error (EOF with unterminated ') at line 1, byte 18 (esc)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Sat Dec  7 17:52:56 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Sat,  7 Dec 2019 23:52:56 +0100
Subject: [OpenWrt-Devel] [PATCH uci 4/5] libuci: refactor uci_get_errorstr
In-Reply-To: <20191207225257.14135-1-ynezz@true.cz>
References: <20191207225257.14135-1-ynezz@true.cz>
Message-ID: <20191207225257.14135-4-ynezz@true.cz>

* replace strange error_info[0]=0 with complete zeroing of the buffer
* make the function body shorter and more clear, decrease indentation
  levels
* fix format string warnings:

   libuci.c:172:24: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
   libuci.c:181:19: error: format string is not a string literal [-Werror,-Wformat-nonliteral]

Reported-by: Rosen Penev <rosenp at gmail.com>
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 libuci.c | 51 +++++++++++++++++++--------------------------------
 1 file changed, 19 insertions(+), 32 deletions(-)

diff --git a/libuci.c b/libuci.c
index a9e70e883ee3..140edf2adbb0 100644
--- a/libuci.c
+++ b/libuci.c
@@ -140,50 +140,37 @@ uci_perror(struct uci_context *ctx, const char *str)
 void
 uci_get_errorstr(struct uci_context *ctx, char **dest, const char *prefix)
 {
-	static char error_info[128];
+	static char error_info[128] = { 0 };
 	int err;
-	const char *format =
-		"%s%s" /* prefix */
-		"%s%s" /* function */
-		"%s" /* error */
-		"%s"; /* details */
-
-	error_info[0] = 0;
-
-	if (!ctx)
-		err = UCI_ERR_INVAL;
-	else
-		err = ctx->err;
 
+	err = ctx ? ctx->err : UCI_ERR_INVAL;
 	if ((err < 0) || (err >= UCI_ERR_LAST))
 		err = UCI_ERR_UNKNOWN;
 
-	switch (err) {
-	case UCI_ERR_PARSE:
-		if (ctx->pctx) {
-			snprintf(error_info, sizeof(error_info) - 1, " (%s) at line %d, byte %d", (ctx->pctx->reason ? ctx->pctx->reason : "unknown"), ctx->pctx->line, ctx->pctx->byte);
-			break;
-		}
-		break;
-	default:
-		break;
+	if (ctx && ctx->pctx && (err == UCI_ERR_PARSE)) {
+		snprintf(error_info, sizeof(error_info) - 1, " (%s) at line %d, byte %d",
+			 (ctx->pctx->reason ? ctx->pctx->reason : "unknown"),
+			 ctx->pctx->line, ctx->pctx->byte);
 	}
-	if (dest) {
-		err = asprintf(dest, format,
-			(prefix ? prefix : ""), (prefix ? ": " : ""),
-			(ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func ? ": " : ""),
-			uci_errstr[err],
-			error_info);
-		if (err < 0)
-			*dest = NULL;
-	} else {
+
+	if (!dest) {
 		strcat(error_info, "\n");
-		fprintf(stderr, format,
+		fprintf(stderr, "%s%s%s%s%s%s",
 			(prefix ? prefix : ""), (prefix ? ": " : ""),
 			(ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func ? ": " : ""),
 			uci_errstr[err],
 			error_info);
+		return;
 	}
+
+	err = asprintf(dest, "%s%s%s%s%s%s",
+		(prefix ? prefix : ""), (prefix ? ": " : ""),
+		(ctx && ctx->func ? ctx->func : ""), (ctx && ctx->func ? ": " : ""),
+		uci_errstr[err],
+		error_info);
+
+	if (err < 0)
+		*dest = NULL;
 }
 
 int uci_list_configs(struct uci_context *ctx, char ***list)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Sat Dec  7 17:52:57 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Sat,  7 Dec 2019 23:52:57 +0100
Subject: [OpenWrt-Devel] [PATCH uci 5/5] cmake: add more hardening compiler
 flags
In-Reply-To: <20191207225257.14135-1-ynezz@true.cz>
References: <20191207225257.14135-1-ynezz@true.cz>
Message-ID: <20191207225257.14135-5-ynezz@true.cz>

In order to spot possible issues with direct impact on security during
QA on CI (GCC version 6 and higher).

Ref: https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 CMakeLists.txt | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92adf4a47121..da4ac68c0139 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,8 +3,15 @@ cmake_minimum_required(VERSION 2.6)
 PROJECT(uci C)
 
 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
-ADD_DEFINITIONS(-Os -Wall -Werror -Wextra --std=gnu99 -g3 -I. -DUCI_PREFIX="${CMAKE_INSTALL_PREFIX}")
-ADD_DEFINITIONS(-Wno-unused-parameter)
+
+ADD_DEFINITIONS(-Wall -Werror)
+IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)
+	ADD_DEFINITIONS(-Wextra -Werror=implicit-function-declaration)
+	ADD_DEFINITIONS(-Wformat -Werror=format-security -Werror=format-nonliteral)
+ENDIF()
+ADD_DEFINITIONS(-Os -std=gnu99 -g3 -Wmissing-declarations -Wno-unused-parameter)
+ADD_DEFINITIONS(-DUCI_PREFIX="${CMAKE_INSTALL_PREFIX}")
+
 
 OPTION(UCI_DEBUG "debugging support" OFF)
 OPTION(UCI_DEBUG_TYPECAST "typecast debugging support" OFF)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at adrianschmutzler.de  Sat Dec  7 18:38:08 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Sun, 8 Dec 2019 00:38:08 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: fix typos in DTS
In-Reply-To: <20191207163731.15028-1-dengqf6@mail2.sysu.edu.cn>
References: <20191207163731.15028-1-dengqf6@mail2.sysu.edu.cn>
Message-ID: <00ae01d5ad57$62db0ae0$289120a0$@adrianschmutzler.de>

Hi,

please rephrase the "commit message" to be a sentence (or two ...).

Just send the text as reply to this e-mail, I will add it when merging the patch. (So I do not need to add my SOB)

Best

Adrian

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of DENG Qingfang
> Sent: Samstag, 7. Dezember 2019 17:38
> To: openwrt-devel at lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH] ath79: fix typos in DTS
> 
> echi->ehci
> ochi->ohci
> 
> Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
> ---
>  target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts | 6 +++---
>  target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts      | 6 +++---
>  target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi     | 6 +++---
>  target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi   | 4 ++--
>  4 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
> b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
> index 2e00de8887..e87f422051 100644
> --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
> +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
> @@ -47,7 +47,7 @@
>  		usb {
>  			label = "buffalo:green:usb";
>  			gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>;
> -			trigger-sources = <&usb_ochi_port>,
> <&usb_echi_port>;
> +			trigger-sources = <&usb_ohci_port>,
> <&usb_ehci_port>;
>  			linux,default-trigger = "usbport";
>  		};
> 
> @@ -180,7 +180,7 @@
>  	#size-cells = <0>;
>  	status = "okay";
> 
> -	usb_ochi_port: port at 1 {
> +	usb_ohci_port: port at 1 {
>  		reg = <1>;
>  		#trigger-source-cells = <0>;
>  	};
> @@ -191,7 +191,7 @@
>  	#size-cells = <0>;
>  	status = "okay";
> 
> -	usb_echi_port: port at 1 {
> +	usb_ehci_port: port at 1 {
>  		reg = <1>;
>  		#trigger-source-cells = <0>;
>  	};
> diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
> b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
> index 92de193aba..5e35dddd4b 100644
> --- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
> +++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
> @@ -34,7 +34,7 @@
>  		usb {
>  			label = "d-link:blue:usb";
>  			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
> -			trigger-sources = <&usb_ochi_port>,
> <&usb_echi_port>;
> +			trigger-sources = <&usb_ohci_port>,
> <&usb_ehci_port>;
>  			linux,default-trigger = "usbport";
>  		};
> 
> @@ -123,7 +123,7 @@
>  	#size-cells = <0>;
>  	status = "okay";
> 
> -	usb_ochi_port: port at 1 {
> +	usb_ohci_port: port at 1 {
>  		reg = <1>;
>  		#trigger-source-cells = <0>;
>  	};
> @@ -134,7 +134,7 @@
>  	#size-cells = <0>;
>  	status = "okay";
> 
> -	usb_echi_port: port at 1 {
> +	usb_ehci_port: port at 1 {
>  		reg = <1>;
>  		#trigger-source-cells = <0>;
>  	};
> diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
> b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
> index 08b3c77b39..b6ae167024 100644
> --- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
> +++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
> @@ -32,7 +32,7 @@
>  		usb_led {
>  			label = "netgear:green:usb";
>  			resets = <&rst 12>;
> -			trigger-sources = <&usb_ochi_port>,
> <&usb_echi_port>;
> +			trigger-sources = <&usb_ohci_port>,
> <&usb_ehci_port>;
>  			linux,default-trigger = "usbport";
>  		};
>  	};
> @@ -134,7 +134,7 @@
>  	#size-cells = <0>;
>  	status = "okay";
> 
> -	usb_ochi_port: port at 1 {
> +	usb_ohci_port: port at 1 {
>  		reg = <1>;
>  		#trigger-source-cells = <0>;
>  	};
> @@ -145,7 +145,7 @@
>  	#size-cells = <0>;
>  	status = "okay";
> 
> -	usb_echi_port: port at 1 {
> +	usb_ehci_port: port at 1 {
>  		reg = <1>;
>  		#trigger-source-cells = <0>;
>  	};
> diff --git a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
> b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
> index 4f52e3cc40..0ed9970813 100644
> --- a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
> +++ b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
> @@ -86,7 +86,7 @@
>  	#address-cells = <1>;
>  	#size-cells = <0>;
> 
> -	usb_ochi_port: port at 1 {
> +	usb_ohci_port: port at 1 {
>  		reg = <1>;
>  		#trigger-source-cells = <0>;
>  	};
> @@ -97,7 +97,7 @@
>  	#address-cells = <1>;
>  	#size-cells = <0>;
> 
> -	usb_echi_port: port at 1 {
> +	usb_ehci_port: port at 1 {
>  		reg = <1>;
>  		#trigger-source-cells = <0>;
>  	};
> --
> 2.24.0
> 
> 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191208/3bf25a50/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From lech.perczak at gmail.com  Sat Dec  7 19:54:19 2019
From: lech.perczak at gmail.com (Lech Perczak)
Date: Sun, 8 Dec 2019 01:54:19 +0100
Subject: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik
 RB952Ui-5ac2nD?
In-Reply-To: <CAALvt2NygyiyJ3iV82B3DXLr+hWsW_7T=iL=9=7xnyUHxD8UdA@mail.gmail.com>
References: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
 <20191203143434.GF8181@meh.true.cz>
 <CAALvt2POG3isiKH+2aHjSGRoh-+HADtamD9O2VLOCKO=73byGw@mail.gmail.com>
 <20191205200036.GD71465@meh.true.cz>
 <CAALvt2NygyiyJ3iV82B3DXLr+hWsW_7T=iL=9=7xnyUHxD8UdA@mail.gmail.com>
Message-ID: <816257d6-01de-b064-88b2-38e2d9a3eca1@gmail.com>

W dniu 2019-12-06 o?18:44, Joe Ayers pisze:
>>
>>> Possibly the same symptoms don't exist on 128MB RAM devices.
>> Like there is some if condition, which is doing some nasty things on 64M
>> devices? I admit, that I don't have ath10k-ct source code under my pillow, but
>> it doesn't make much sense to me.
>>
>>> Comparable results between above and my 64MB device.   However, if the
>>> sleep time is extended the consumption is more
>> Ok, I'll let it run overnight with 120s sleep in between.
>>
>>> I suspect this is not the intended behavior.
>> No its not and it's even strange, that I'm not seeing it here if it should
>> happen in the "default setup". Maybe its because:
>>
>> 1. You're using custom image (I'm using official prebuilt images)
>> 2. You're not providing all the steps needed to reproduce the issue
>> 3. I've way different hardware
>>
>> Every detail could make huge difference.
>>
>> -- ynezz
> On the device I am testing, it is both (2GHz) ath9k and (5GHz) ath10k.
>    These look to be related patches to this issue:
>
> 960-0010-ath10k-limit-htt-rx-ring-size.patch
> 960-0011-ath10k-limit-pci-buffer-size.patch
>
> In the v19.07.0-rc2 build for the rb-nor-flash-16M-ac ar71xx image,
> these patches are applied to backports-4.19.85-1, but don't seem to be
> applied to ath10k-ct-2019-09-09-5e8cd86f.    Should ath10k-ct have
> these and other patches?    The device's installed packages do include
> ath10k-ct (from downloads.openwrt.org installed image).
>
> Joe AE6XE
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> .

I can only add that I got the same behaviour with my TL-WR902AC just 
ported to ath79 on master (based on 
f19e471f3206d0b5885490e52972085d2da2a10b). In about 20 minutes system 
was unusable - I couldn't fully copy a 4MB sysupgrade image to /tmp.
Branch used to build the image is here: 
https://github.com/Leo-PL/openwrt/commits/tl-wr902ac-v1_ath79

I can offer my help with testing the fixes, as it seems to me that it's 
not the first time I observe this issue, only now I got a device 
affected by it.

With kind regards,
Lech


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From peter.stadler at student.uibk.ac.at  Sun Dec  8 08:33:55 2019
From: peter.stadler at student.uibk.ac.at (Peter Stadler)
Date: Sun, 8 Dec 2019 14:33:55 +0100
Subject: [OpenWrt-Devel] UBus wire protocol documentation
In-Reply-To: <CAJQUmm6fVs_j4wpaZAeciuEVhvkWHBs8wbb5MX-kkkX+VQFdNg@mail.gmail.com>
References: <20191207114547.5209-1-peter.stadler@student.uibk.ac.at>
 <CAJQUmm6fVs_j4wpaZAeciuEVhvkWHBs8wbb5MX-kkkX+VQFdNg@mail.gmail.com>
Message-ID: <eb0ce9ef-c822-49ae-f533-1c87e63ec53c@student.uibk.ac.at>

I know only the somehow generic wiki pages of OpenWrt and looked mostly 
at the sources:

https://git.openwrt.org/?p=project/ubus.git;a=blob;f=libubus.h

https://git.openwrt.org/?p=project/libubox.git;a=blob;f=blobmsg_json.c

There is also an example for a client in the tree. Currently I have a 
working approach,

but I am not sure I am doing it right.


The following program is a small example that extracts all local IPs 
from the data that the

cli would report for:

 ????????? ubus call network.interface.lan status

The first functions are quite generic, the callback does the custom work.

(If it helps, you can use it as the included libs allow it,

I consider my parts as public domain: CC0)


g++ -Os -Wall -Werror -Wextra --std=c++17 -g3 -lubus -lubox

DEPENDS:=+libubus +libubox +libstdcpp

// ----------------------------------------- main.cpp 
-------------------------------------------------

// ubus_traverse(...) walks the msg tree and processes values for 
matching keys:
//??? msg = message that ubus sent to a callback function set up by 
ubus_invoke.
//??? process = function to which values are send if all the following 
keys match.
// ?? key, ... keys = match the keys of the msg tree in the given order; 
we are at
//? ? ? ? the end if there is only one key left, do nothing if there is 
none.
//? ? (works if the number of keys is known at compile time, else use 
valist ...)

void ubus_traverse(const blob_attr * msg, function<void(const void * 
val)> process)
{}

template<class T, class ... Types>

void ubus_traverse(const blob_attr * msg, function<void(const void * 
val)> process,

 ?????????????????? T key, Types ... keys)
{
 ??? size_t len;
 ??? blob_attr * pos;
 ??? blobmsg_for_each_attr(pos, msg, len) {
 ??????? const char * name = blobmsg_name(pos);
 ??????? if (strcmp(name, key) != 0) { continue; }
 ??????? switch (blob_id(pos)) {
 ??????????? case BLOBMSG_TYPE_TABLE: [[fallthrough]]
 ??????????? case BLOBMSG_TYPE_ARRAY: ubus_traverse(pos, process, keys...);
 ??????????? break;
 ??????????? default: if (sizeof...(keys)==0) { 
process(blobmsg_data(pos)); }
 ??????? }
 ??? }
}


static int ubus_call(const char * path, const char * method,
 ???????????????????? ubus_data_handler_t callback)
{
 ??? ubus_context * ctx = ubus_connect(NULL);
 ??? if (ctx==NULL) { return -1; }
 ??? uint32_t id;
 ??? int ret = ubus_lookup_id(ctx, path, &id);
 ??? if (ret==0) {
 ??????? static blob_buf req;
 ??????? blob_buf_init(&req, 0);
 ??????? int timeout = 200;
 ??????? ret = ubus_invoke(ctx, id, method, req.head, callback, NULL, 
timeout);
 ??? }
 ??? if (ctx) { ubus_free(ctx); }
 ??? return ret;
}


void ip_callback(ubus_request * req, int type, blob_attr * msg)
{
 ??? if (!msg) { return; }
 ??? string ips = "";
 ??? auto add_ip = [&ips] (const void * val) -> void
 ??? {
 ??????? ips += (char *)val;
 ??????? ips += " ";
 ??? };
 ??? ubus_traverse(msg, add_ip, "ipv4-address", "", "address");
 ??? ubus_traverse(msg, add_ip, "ipv6-address", "", "address");
 ??? cout<<"IPs: "<<ips<<endl;
}


int main(int argc, char * argv[]) {
 ??? ubus_call("network.interface.lan", "status", ip_callback);
 ??? return 0;
}


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mike at flyn.org  Sun Dec  8 09:53:29 2019
From: mike at flyn.org (W. Michael Petullo)
Date: Sun, 8 Dec 2019 09:53:29 -0500
Subject: [OpenWrt-Devel] Large images
Message-ID: <20191208145329.GA1466438@imp.flyn.org>

If there a good reason for the following during the build process?

dd if=[...]/build_dir/target-x86_64_musl/linux-x86_64/root.squashfs of=[...]/build_dir/target-x86_64_musl/linux-x86_64/root.squashfs.new bs=4294967296 conv=sync

The use of bs=n where n is very large will exhaust the memory on the
build host. Shouldn't we use something like bs=m count=o, where m * o = n?

-- 
Mike

:wq

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec  8 10:32:49 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun,  8 Dec 2019 16:32:49 +0100
Subject: [OpenWrt-Devel] [PATCH 0/6] ramips: use flash location for wan_mac
 in 02_network
Message-ID: <20191208153255.27655-1-freifunk@adrianschmutzler.de>

This uses the flash locations instead of eth0 MAC address to
alculate MAC address increments for WAN is 02_network.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.
As a side effect, changes to ethernet MAC address setup won't
indirectly affect wan_mac anymore.

This should both help people trying to improve MAC setup further
in the future and make obvious to device supporters that setting
MAC address is more than just having eth0 +1.

Adrian Schmutzler (6):
  ramips: remove wan_mac setup for evaluation boards
  ramips: mt7620: use flash location for wan_mac in 02_network
  ramips: mt7621: use flash location for wan_mac in 02_network
  ramips: mt76x8: use flash location for wan_mac in 02_network
  ramips: rt288x: use flash location for wan_mac in 02_network
  ramips: rt305x: use flash location for wan_mac in 02_network

 .../dts/mt7628an_zyxel_keenetic-extra-ii.dts  |   2 +-
 .../ramips/dts/rt3050_dlink_dir-300-b1.dts    |   2 +-
 .../ramips/dts/rt5350_7links_px-4885-4m.dts   |   2 +-
 .../ramips/dts/rt5350_7links_px-4885-8m.dts   |   2 +-
 .../ramips/dts/rt5350_7links_px-4885.dtsi     |   4 +-
 .../mt7620/base-files/etc/board.d/02_network  |  32 +++---
 .../mt7621/base-files/etc/board.d/02_network  |  43 +++++---
 .../mt76x8/base-files/etc/board.d/02_network  |  47 ++++----
 .../rt288x/base-files/etc/board.d/02_network  |   9 +-
 .../rt305x/base-files/etc/board.d/02_network  | 100 ++++++++++--------
 10 files changed, 136 insertions(+), 107 deletions(-)

-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec  8 10:32:50 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun,  8 Dec 2019 16:32:50 +0100
Subject: [OpenWrt-Devel] [PATCH 1/6] ramips: remove wan_mac setup for
 evaluation boards
In-Reply-To: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
References: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
Message-ID: <20191208153255.27655-2-freifunk@adrianschmutzler.de>

The evaluation boards do not set up a MAC address for eth0
in the first place, so it does not make sense to calculate a WAN
address from the random MAC used there.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/ramips/mt7620/base-files/etc/board.d/02_network | 4 ----
 target/linux/ramips/mt7621/base-files/etc/board.d/02_network | 1 -
 target/linux/ramips/mt76x8/base-files/etc/board.d/02_network | 1 -
 3 files changed, 6 deletions(-)

diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
index ef241ff801..900bbc5550 100755
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
@@ -238,10 +238,6 @@ ramips_setup_macs()
 	phicomm,psg1218b|\
 	planex,db-wrt01|\
 	planex,mzk-750dhp|\
-	ralink,mt7620a-evb|\
-	ralink,mt7620a-mt7530-evb|\
-	ralink,mt7620a-mt7610e-evb|\
-	ralink,mt7620a-v22sg-evb|\
 	sanlinking,d240|\
 	tplink,archer-c2-v1|\
 	tplink,archer-c20-v1|\
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index bb6e41e06f..a39dfb40f3 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -154,7 +154,6 @@ ramips_setup_macs()
 	firefly,firewrt|\
 	gehua,ghl-r-001|\
 	mediatek,ap-mt7621a-v60|\
-	mediatek,mt7621-eval-board|\
 	mikrotik,rb750gr3|\
 	mikrotik,rbm33g|\
 	mqmaker,witi|\
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
index 87ce447612..f76af66f27 100755
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
@@ -137,7 +137,6 @@ ramips_setup_macs()
 		label_mac=$(mtd_get_mac_binary factory 0x8)
 		;;
 	duzun,dm06|\
-	mediatek,mt7628an-eval-board|\
 	netgear,r6120|\
 	rakwireless,rak633|\
 	tplink,archer-c20-v4|\
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec  8 10:32:51 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun,  8 Dec 2019 16:32:51 +0100
Subject: [OpenWrt-Devel] [PATCH 2/6] ramips: mt7620: use flash location for
 wan_mac in 02_network
In-Reply-To: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
References: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
Message-ID: <20191208153255.27655-3-freifunk@adrianschmutzler.de>

This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../mt7620/base-files/etc/board.d/02_network  | 28 +++++++++++--------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
index 900bbc5550..20846ef202 100755
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
@@ -222,28 +222,19 @@ ramips_setup_macs()
 
 	case $board in
 	aigale,ai-br100|\
-	alfa-network,ac1200rm|\
 	asus,rt-ac51u|\
 	asus,rt-n12p|\
 	asus,rt-n14u|\
 	bdcom,wap2100-sk|\
-	dlink,dir-810l|\
 	edimax,ew-7478apc|\
 	fon,fon2601|\
 	head-weblink,hdrm200|\
 	nexx,wt3020-4m|\
 	nexx,wt3020-8m|\
 	phicomm,psg1208|\
-	phicomm,psg1218a|\
-	phicomm,psg1218b|\
 	planex,db-wrt01|\
 	planex,mzk-750dhp|\
 	sanlinking,d240|\
-	tplink,archer-c2-v1|\
-	tplink,archer-c20-v1|\
-	tplink,archer-c20i|\
-	tplink,archer-c50-v1|\
-	tplink,archer-mr200|\
 	vonets,var11n-300|\
 	wrtnode,wrtnode|\
 	youku,yk1|\
@@ -254,7 +245,13 @@ ramips_setup_macs()
 	zbtlink,zbt-we826-32m|\
 	zbtlink,zbt-we826-e|\
 	zbtlink,zbt-wr8305rt)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1)
+		;;
+	alfa-network,ac1200rm|\
+	dlink,dir-810l|\
+	phicomm,psg1218a|\
+	phicomm,psg1218b)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x28)" 1)
 		;;
 	alfa-network,r36m-e4g|\
 	zbtlink,zbt-we1026-h-32m)
@@ -280,7 +277,7 @@ ramips_setup_macs()
 		wan_mac=$(mtd_get_mac_ascii u-boot-env WAN_MAC_ADDR)
 		;;
 	edimax,br-6478ac-v2)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 2)
 		;;
 	engenius,esr600)
 		lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
@@ -289,7 +286,7 @@ ramips_setup_macs()
 	glinet,gl-mt300a|\
 	glinet,gl-mt300n|\
 	glinet,gl-mt750)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4000)" 1)
 		label_mac=$(mtd_get_mac_binary factory 0x4)
 		;;
 	hiwifi,hc5661|\
@@ -313,6 +310,13 @@ ramips_setup_macs()
 	linksys,e1700)
 		wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR)
 		;;
+	tplink,archer-c2-v1|\
+	tplink,archer-c20-v1|\
+	tplink,archer-c20i|\
+	tplink,archer-c50-v1|\
+	tplink,archer-mr200)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary rom 0xf100)" 1)
+		;;
 	zbtlink,zbt-we1026-5g-16m)
 		label_mac=$(mtd_get_mac_binary factory 0x4)
 		;;
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec  8 10:32:52 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun,  8 Dec 2019 16:32:52 +0100
Subject: [OpenWrt-Devel] [PATCH 3/6] ramips: mt7621: use flash location for
 wan_mac in 02_network
In-Reply-To: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
References: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
Message-ID: <20191208153255.27655-4-freifunk@adrianschmutzler.de>

This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../mt7621/base-files/etc/board.d/02_network  | 42 ++++++++++++-------
 1 file changed, 26 insertions(+), 16 deletions(-)

diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index a39dfb40f3..2173e4d13b 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -147,30 +147,21 @@ ramips_setup_macs()
 	local label_mac=""
 
 	case $board in
-	adslr,g7|\
+	adslr,g7)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xe00c)" 1)
+		;;
 	afoundry,ew1200|\
 	asiarf,ap7621-001|\
 	asiarf,ap7621-nv1|\
 	firefly,firewrt|\
 	gehua,ghl-r-001|\
-	mediatek,ap-mt7621a-v60|\
-	mikrotik,rb750gr3|\
-	mikrotik,rbm33g|\
 	mqmaker,witi|\
-	mtc,wr1201|\
-	netgear,r6220|\
-	netgear,wndr3700-v5|\
-	storylink,sap-g3200u3|\
-	telco-electronics,x1|\
 	totolink,a7000r|\
-	ubiquiti,edgerouterx|\
-	ubiquiti,edgerouterx-sfp|\
 	unielec,u7621-06-16m|\
 	unielec,u7621-06-64m|\
-	xiaoyu,xy-c5|\
 	xzwifi,creativebox-v1|\
 	zbtlink,zbt-wg2626)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xe000)" 1)
 		;;
 	alfa-network,quad-e4g|\
 	asus,rt-ac57u|\
@@ -215,17 +206,36 @@ ramips_setup_macs()
 		wan_mac=$(macaddr_add "$lan_mac" 1)
 		;;
 	iodata,wn-ax1167gr|\
-	iodata,wn-gx300gr)
+	iodata,wn-gx300gr|\
+	mtc,wr1201|\
+	netgear,r6220|\
+	netgear,wndr3700-v5|\
+	xiaoyu,xy-c5)
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1)
 		;;
 	iodata,wnpr2600g)
 		wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
 		label_mac=$wan_mac
 		;;
+	mediatek,ap-mt7621a-v60)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x5)" 1)
+		;;
+	mikrotik,rb750gr3|\
+	mikrotik,rbm33g)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary hard_config 0x10)" 2)
+		;;
 	netgear,r6260|\
 	netgear,r6350|\
 	netgear,r6850)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 2)
+		;;
+	storylink,sap-g3200u3|\
+	telco-electronics,x1)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xe006)" 1)
+		;;
+	ubiquiti,edgerouterx|\
+	ubiquiti,edgerouterx-sfp)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x22)" 1)
 		;;
 	wevo,11acnas|\
 	wevo,w2914ns-v2)
@@ -249,7 +259,7 @@ ramips_setup_macs()
 		;;
 	zbtlink,zbt-wg3526-16m|\
 	zbtlink,zbt-wg3526-32m)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xe000)" 1)
 		label_mac=$(mtd_get_mac_binary factory 0x4)
 		;;
 	esac
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec  8 10:32:53 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun,  8 Dec 2019 16:32:53 +0100
Subject: [OpenWrt-Devel] [PATCH 4/6] ramips: mt76x8: use flash location for
 wan_mac in 02_network
In-Reply-To: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
References: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
Message-ID: <20191208153255.27655-5-freifunk@adrianschmutzler.de>

This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

While at it, change the partition label for zyxel,keenetic-extra-ii
to factory to be consistent with node label and all the other devices.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../dts/mt7628an_zyxel_keenetic-extra-ii.dts  |  2 +-
 .../mt76x8/base-files/etc/board.d/02_network  | 46 +++++++++++--------
 2 files changed, 29 insertions(+), 19 deletions(-)

diff --git a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts
index 8b069d4370..f4d678e38e 100644
--- a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts
+++ b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts
@@ -107,7 +107,7 @@
 			};
 
 			factory: partition at 40000 {
-				label = "rf-eeprom";
+				label = "factory";
 				reg = <0x40000 0x10000>;
 				read-only;
 			};
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
index f76af66f27..aeaf296984 100755
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
@@ -138,27 +138,10 @@ ramips_setup_macs()
 		;;
 	duzun,dm06|\
 	netgear,r6120|\
-	rakwireless,rak633|\
-	tplink,archer-c20-v4|\
-	tplink,archer-c50-v3|\
-	tplink,archer-c50-v4|\
-	tplink,tl-mr3420-v5|\
-	tplink,tl-wr840n-v4|\
-	tplink,tl-wr840n-v5|\
-	tplink,tl-wr841n-v13|\
-	tplink,tl-wr841n-v14|\
-	tplink,tl-wr842n-v5|\
-	unielec,u7628-01-16m|\
-	wavlink,wl-wn570ha1|\
-	wavlink,wl-wn575a3|\
-	wiznet,wizfi630s|\
 	wrtnode,wrtnode2p|\
 	wrtnode,wrtnode2r|\
-	xiaomi,mir4a-100m|\
-	xiaomi,miwifi-nano|\
-	zbtlink,zbt-we1226|\
 	zyxel,keenetic-extra-ii)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1)
 		;;
 	hilink,hlk-7628n)
 		lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
@@ -185,14 +168,41 @@ ramips_setup_macs()
 	mercury,mac1200r-v2)
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory_info 0xd)" 1)
 		;;
+	rakwireless,rak633|\
+	unielec,u7628-01-16m|\
+	wavlink,wl-wn575a3|\
+	wiznet,wizfi630s|\
+	xiaomi,miwifi-nano)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x28)" 1)
+		;;
 	skylab,skw92a|\
 	totolink,lr1200)
 		wan_mac=$(mtd_get_mac_binary factory 0x2e)
 		;;
+	tplink,archer-c20-v4|\
+	tplink,archer-c50-v3|\
+	tplink,tl-mr3420-v5|\
+	tplink,tl-wr840n-v4|\
+	tplink,tl-wr840n-v5|\
+	tplink,tl-wr841n-v13|\
+	tplink,tl-wr841n-v14|\
+	tplink,tl-wr842n-v5)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xf100)" 1)
+		;;
+	tplink,archer-c50-v4)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary rom 0xf100)" 1)
+		;;
 	vocore,vocore2|\
 	vocore,vocore2-lite)
 		label_mac=$(mtd_get_mac_binary factory 0x8)
 		;;
+	wavlink,wl-wn570ha1|\
+	zbtlink,zbt-we1226)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x2e)" 1)
+		;;
+	xiaomi,mir4a-100m)
+		wan_mac=$(mtd_get_mac_binary factory 0x4)
+		;;
 	esac
 
 	[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec  8 10:32:54 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun,  8 Dec 2019 16:32:54 +0100
Subject: [OpenWrt-Devel] [PATCH 5/6] ramips: rt288x: use flash location for
 wan_mac in 02_network
In-Reply-To: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
References: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
Message-ID: <20191208153255.27655-6-freifunk@adrianschmutzler.de>

This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

This removes the wan_mac setup for ralink,v11st-fe as this device
does not set up a MAC address for ethernet in the first place.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../ramips/rt288x/base-files/etc/board.d/02_network      | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/target/linux/ramips/rt288x/base-files/etc/board.d/02_network b/target/linux/ramips/rt288x/base-files/etc/board.d/02_network
index b9588f4aad..0cc0e0b28b 100755
--- a/target/linux/ramips/rt288x/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/rt288x/base-files/etc/board.d/02_network
@@ -42,13 +42,14 @@ ramips_setup_macs()
 	local label_mac=""
 
 	case $board in
-	airlink101,ar670w|\
+	airlink101,ar670w)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x2004)" 1)
+		;;
 	airlink101,ar725w|\
 	asus,rt-n15|\
 	belkin,f5d8235-v1|\
-	buffalo,wzr-agl300nh|\
-	ralink,v11st-fe)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+	buffalo,wzr-agl300nh)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1)
 		;;
 	esac
 
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec  8 10:32:55 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun,  8 Dec 2019 16:32:55 +0100
Subject: [OpenWrt-Devel] [PATCH 6/6] ramips: rt305x: use flash location for
 wan_mac in 02_network
In-Reply-To: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
References: <20191208153255.27655-1-freifunk@adrianschmutzler.de>
Message-ID: <20191208153255.27655-7-freifunk@adrianschmutzler.de>

This uses the flash locations instead of eth0 MAC address to
calculate MAC address increments for WAN.

The change will make the MAC address setup of a particular device
more obvious and removes the dependency of 02_network on the eth0
initialization.

This removes the wan_mac setup for the following devices as they
do not set up a MAC address for ethernet in the first place:
- asiarf,awapn2403
- belkin,f7c027
- dlink,dir-615-d
- mofinetwork,mofi3500-3gn
- prolink,pwh2004
- ralink,v22rw-2x2
- unbranded,wr512-3gn-4m
- unbranded,wr512-3gn-8m

While at it, make some DT node labels consistent with the label
property.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../ramips/dts/rt3050_dlink_dir-300-b1.dts    |   2 +-
 .../ramips/dts/rt5350_7links_px-4885-4m.dts   |   2 +-
 .../ramips/dts/rt5350_7links_px-4885-8m.dts   |   2 +-
 .../ramips/dts/rt5350_7links_px-4885.dtsi     |   4 +-
 .../rt305x/base-files/etc/board.d/02_network  | 100 ++++++++++--------
 5 files changed, 60 insertions(+), 50 deletions(-)

diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts
index 8bc77e422d..030796f286 100644
--- a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts
+++ b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts
@@ -39,7 +39,7 @@
 				read-only;
 			};
 
-			factory: partition at 40000 {
+			partition at 40000 {
 				label = "devconf";
 				reg = <0x40000 0x10000>;
 				read-only;
diff --git a/target/linux/ramips/dts/rt5350_7links_px-4885-4m.dts b/target/linux/ramips/dts/rt5350_7links_px-4885-4m.dts
index 66e2c1924c..914ceb0c53 100644
--- a/target/linux/ramips/dts/rt5350_7links_px-4885-4m.dts
+++ b/target/linux/ramips/dts/rt5350_7links_px-4885-4m.dts
@@ -32,7 +32,7 @@
 				read-only;
 			};
 
-			factory: partition at 40000 {
+			devconf: partition at 40000 {
 				label = "devconf";
 				reg = <0x40000 0x10000>;
 				read-only;
diff --git a/target/linux/ramips/dts/rt5350_7links_px-4885-8m.dts b/target/linux/ramips/dts/rt5350_7links_px-4885-8m.dts
index f3d9926702..c9826166b4 100644
--- a/target/linux/ramips/dts/rt5350_7links_px-4885-8m.dts
+++ b/target/linux/ramips/dts/rt5350_7links_px-4885-8m.dts
@@ -32,7 +32,7 @@
 				read-only;
 			};
 
-			factory: partition at 40000 {
+			devconf: partition at 40000 {
 				label = "devconf";
 				reg = <0x40000 0x10000>;
 				read-only;
diff --git a/target/linux/ramips/dts/rt5350_7links_px-4885.dtsi b/target/linux/ramips/dts/rt5350_7links_px-4885.dtsi
index 032a89cd1a..cdd3033bed 100644
--- a/target/linux/ramips/dts/rt5350_7links_px-4885.dtsi
+++ b/target/linux/ramips/dts/rt5350_7links_px-4885.dtsi
@@ -51,7 +51,7 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	mtd-mac-address = <&devconf 0x28>;
 };
 
 &esw {
@@ -59,5 +59,5 @@
 };
 
 &wmac {
-	ralink,mtd-eeprom = <&factory 0>;
+	ralink,mtd-eeprom = <&devconf 0>;
 };
diff --git a/target/linux/ramips/rt305x/base-files/etc/board.d/02_network b/target/linux/ramips/rt305x/base-files/etc/board.d/02_network
index de71dd6202..5efcd53955 100755
--- a/target/linux/ramips/rt305x/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/rt305x/base-files/etc/board.d/02_network
@@ -167,34 +167,38 @@ ramips_setup_macs()
 
 	case $board in
 	7links,px-4885-4m|\
-	7links,px-4885-8m|\
+	7links,px-4885-8m)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary devconf 0x28)" 1)
+		;;
+	8devices,carambola|\
+	alfa-network,w502u|\
+	arcwireless,freestation5|\
+	netgear,wnce2001)
+		wan_mac=$(mtd_get_mac_binary factory 0x2e)
+		;;
 	accton,wr6202|\
-	airlive,air3gii|\
-	argus,atp-52b|\
-	asiarf,awapn2403|\
 	asiarf,awm002-evb-4m|\
 	asiarf,awm002-evb-8m|\
-	asus,rt-g32-b1|\
-	asus,rt-n10-plus|\
 	asus,rt-n13u|\
-	asus,wl-330n3g|\
 	aztech,hw550-3g|\
-	belkin,f5d8235-v2|\
-	belkin,f7c027|\
-	dlink,dap-1350|\
-	dlink,dir-300-b1|\
-	dlink,dir-600-b1|\
-	dlink,dir-610-a1|\
+	fon,fonera-20n|\
+	huawei,hg255d|\
+	omnima,miniembwifi|\
+	planex,mzk-wdpr|\
+	poray,ip2202|\
+	teltonika,rut5xx|\
+	unbranded,xdx-rn502j|\
+	zyxel,keenetic|\
+	zyxel,nbg-419n|\
+	zyxel,nbg-419n-v2)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x28)" 1)
+		;;
+	airlive,air3gii|\
+	argus,atp-52b|\
+	asus,wl-330n3g|\
 	dlink,dir-620-d1|\
-	dlink,dwr-512-b|\
 	edimax,3g-6200n|\
 	edimax,3g-6200nl|\
-	fon,fonera-20n|\
-	huawei,hg255d|\
-	jcg,jhr-n805r|\
-	jcg,jhr-n825r|\
-	jcg,jhr-n926r|\
-	mofinetwork,mofi3500-3gn|\
 	netcore,nw718|\
 	nexx,wt1520-4m|\
 	nexx,wt1520-8m|\
@@ -203,30 +207,17 @@ ramips_setup_macs()
 	olimex,rt5350f-olinuxino|\
 	olimex,rt5350f-olinuxino-evb|\
 	omnima,miniembplug|\
-	omnima,miniembwifi|\
 	planex,mzk-w300nh2|\
-	planex,mzk-wdpr|\
-	poray,ip2202|\
-	prolink,pwh2004|\
-	ralink,v22rw-2x2|\
 	sitecom,wl-351|\
-	teltonika,rut5xx|\
-	trendnet,tew-714tru|\
-	unbranded,wr512-3gn-4m|\
-	unbranded,wr512-3gn-8m|\
-	unbranded,xdx-rn502j|\
-	upvel,ur-326n4g|\
-	upvel,ur-336un|\
-	zyxel,keenetic|\
-	zyxel,nbg-419n|\
-	zyxel,nbg-419n-v2)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+	trendnet,tew-714tru)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1)
 		;;
-	8devices,carambola|\
-	alfa-network,w502u|\
-	arcwireless,freestation5|\
-	netgear,wnce2001)
-		wan_mac=$(mtd_get_mac_binary factory 0x2e)
+	asus,rt-g32-b1|\
+	asus,rt-n10-plus)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary devconf 0x4)" 1)
+		;;
+	belkin,f5d8235-v2)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary uboot 0x40004)" 1)
 		;;
 	dlink,dir-300-b7|\
 	dlink,dir-320-b1|\
@@ -242,27 +233,46 @@ ramips_setup_macs()
 		lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
 		wan_mac=$(macaddr_add "$lan_mac" 1)
 		;;
+	dlink,dap-1350)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary devdata 0x2e)" 1)
+		;;
+	dlink,dir-300-b1|\
+	dlink,dir-600-b1|\
+	dlink,dir-610-a1)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary devdata 0x4004)" 1)
+		;;
 	dlink,dir-615-d)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
 		label_mac=$(mtd_get_mac_binary devdata 0x4004)
 		;;
 	dlink,dir-615-h1)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x28)" 1)
 		label_mac=$(mtd_get_mac_binary factory 0x4)
 		;;
+	dlink,dwr-512-b)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary config 0xe07e)" 1)
+		;;
+	jcg,jhr-n805r|\
+	jcg,jhr-n825r|\
+	jcg,jhr-n926r)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x2e)" 1)
+		;;
 	poray,m3|\
 	poray,m4-4m|\
 	poray,m4-8m|\
 	poray,x5|\
 	poray,x8)
-		lan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" -2)
+		lan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" -2)
 		;;
 	sparklan,wcr-150gn|\
 	wiznet,wizfi630a)
 		wan_mac=$(mtd_get_mac_binary factory 0x28)
 		;;
 	tenda,w306r-v2)
-		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 5)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x28)" 5)
+		;;
+	upvel,ur-326n4g|\
+	upvel,ur-336un)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4004)" 1)
 		;;
 	esac
 
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec  8 10:34:54 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun,  8 Dec 2019 16:34:54 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] ramips: add label MAC address for
 TP-Link Archer C20i
Message-ID: <20191208153455.27804-1-freifunk@adrianschmutzler.de>

Current OpenWrt MAC setup:
eth0             &rom 0xf100    :48
eth0.2           eth0+1         :49
wlan0 (5 GHz)    &radio 0x8004  different OUI
wlan1 (2.4 GHz)  &radio 0x4     same OUI as wlan0

Label MAC address corresponds to eth0 (&ethernet).

No additional addresses found in hexdump of rom/radio.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
index e085162531..5ee6d67192 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
@@ -9,6 +9,10 @@
 	compatible = "tplink,archer-c20i", "ralink,mt7620a-soc";
 	model = "TP-Link Archer C20i";
 
+	aliases {
+		label-mac-device = &ethernet;
+	};
+
 	chosen {
 		bootargs = "console=ttyS0,115200";
 	};
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec  8 10:34:55 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun,  8 Dec 2019 16:34:55 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] ramips: create common DTSI for TP-Link
 Archer C20i/C20 v1/C50 v1
In-Reply-To: <20191208153455.27804-1-freifunk@adrianschmutzler.de>
References: <20191208153455.27804-1-freifunk@adrianschmutzler.de>
Message-ID: <20191208153455.27804-2-freifunk@adrianschmutzler.de>

The TP-Link Archer C20i/C20 v1/C50 v1 seem to be almost the same,
so creating a common DTSI will reduce duplicate code.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../dts/mt7620a_tplink_archer-c20-v1.dts      | 126 +-----------------
 .../ramips/dts/mt7620a_tplink_archer-c20i.dts | 119 +----------------
 .../dts/mt7620a_tplink_archer-c50-v1.dts      | 126 +-----------------
 .../ramips/dts/mt7620a_tplink_archer.dtsi     | 124 +++++++++++++++++
 4 files changed, 137 insertions(+), 358 deletions(-)
 create mode 100644 target/linux/ramips/dts/mt7620a_tplink_archer.dtsi

diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
index bc47f52d23..23719c3f35 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
@@ -1,9 +1,6 @@
 /dts-v1/;
 
-#include "mt7620a.dtsi"
-
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/gpio/gpio.h>
+#include "mt7620a_tplink_archer.dtsi"
 
 / {
 	compatible = "tplink,archer-c20-v1", "ralink,mt7620a-soc";
@@ -16,10 +13,6 @@
 		led-upgrade = &led_power;
 	};
 
-	chosen {
-		bootargs = "console=ttyS0,115200";
-	};
-
 	leds {
 		compatible = "gpio-leds";
 
@@ -66,86 +59,6 @@
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 	};
-
-	keys {
-		compatible = "gpio-keys";
-
-		reset {
-			label = "reset";
-			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RESTART>;
-		};
-
-		rfkill {
-			label = "rfkill";
-			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RFKILL>;
-		};
-	};
-};
-
-&gpio1 {
-	status = "okay";
-};
-
-&gpio2 {
-	status = "okay";
-};
-
-&gpio3 {
-	status = "okay";
-};
-
-&spi0 {
-	status = "okay";
-
-	m25p80 at 0 {
-		compatible = "jedec,spi-nor";
-		reg = <0>;
-		spi-max-frequency = <10000000>;
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition at 0 {
-				label = "u-boot";
-				reg = <0x0 0x20000>;
-				read-only;
-			};
-
-			partition at 20000 {
-				compatible = "tplink,firmware";
-				label = "firmware";
-				reg = <0x20000 0x7a0000>;
-			};
-
-			partition at 7c0000 {
-				label = "config";
-				reg = <0x7c0000 0x10000>;
-				read-only;
-			};
-
-			rom: partition at 7d0000 {
-				label = "rom";
-				reg = <0x7d0000 0x10000>;
-				read-only;
-			};
-
-			partition at 7e0000 {
-				label = "romfile";
-				reg = <0x7e0000 0x10000>;
-				read-only;
-			};
-
-			radio: partition at 7f0000 {
-				label = "radio";
-				reg = <0x7f0000 0x10000>;
-				read-only;
-			};
-		};
-	};
 };
 
 &pinctrl {
@@ -157,42 +70,15 @@
 	};
 };
 
-&ethernet {
-		pinctrl-names = "default";
-		mtd-mac-address = <&rom 0xf100>;
-		mediatek,portmap = "wllll";
-	};
-
-&ehci {
-	status = "okay";
-};
-
-&ohci {
-	status = "okay";
-};
-
-&gsw {
-	mediatek,port4 = "ephy";
-};
-
 &wmac {
-	ralink,mtd-eeprom = <&radio 0>;
-	mtd-mac-address = <&rom 0xf100>;
-	mtd-mac-address-increment = <(-2)>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pa_pins>;
-};
 
-&pcie {
-	status = "okay";
+	mtd-mac-address = <&rom 0xf100>;
+	mtd-mac-address-increment = <(-2)>;
 };
 
-&pcie0 {
-	mt76 at 0,0 {
-		reg = <0x0000 0 0 0 0>;
-		mediatek,mtd-eeprom = <&radio 0x8000>;
-		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&rom 0xf100>;
-		mtd-mac-address-increment = <(-1)>;
-	};
+&wifi {
+	mtd-mac-address = <&rom 0xf100>;
+	mtd-mac-address-increment = <(-1)>;
 };
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
index 5ee6d67192..975e0af661 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
@@ -1,9 +1,6 @@
 /dts-v1/;
 
-#include "mt7620a.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "mt7620a_tplink_archer.dtsi"
 
 / {
 	compatible = "tplink,archer-c20i", "ralink,mt7620a-soc";
@@ -13,10 +10,6 @@
 		label-mac-device = &ethernet;
 	};
 
-	chosen {
-		bootargs = "console=ttyS0,115200";
-	};
-
 	leds {
 		compatible = "gpio-leds";
 
@@ -47,82 +40,6 @@
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 		};
 	};
-
-	keys {
-		compatible = "gpio-keys";
-
-		rfkill {
-			label = "rfkill";
-			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RFKILL>;
-		};
-
-		reset_wps {
-			label = "reset_wps";
-			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RESTART>;
-		};
-	};
-};
-
-&gpio1 {
-	status = "okay";
-};
-
-&gpio2 {
-	status = "okay";
-};
-
-&gpio3 {
-	status = "okay";
-};
-
-&spi0 {
-	status = "okay";
-
-	m25p80 at 0 {
-		compatible = "jedec,spi-nor";
-		reg = <0>;
-		spi-max-frequency = <10000000>;
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition at 0 {
-				label = "u-boot";
-				reg = <0x0 0x20000>;
-				read-only;
-			};
-
-			partition at 20000 {
-				compatible = "tplink,firmware";
-				label = "firmware";
-				reg = <0x20000 0x7a0000>;
-			};
-
-			partition at 7c0000 {
-				label = "config";
-				reg = <0x7c0000 0x10000>;
-			};
-
-			rom: partition at 7d0000 {
-				label = "rom";
-				reg = <0x7d0000 0x10000>;
-			};
-
-			partition at 7e0000 {
-				label = "romfile";
-				reg = <0x7e0000 0x10000>;
-			};
-
-			radio: partition at 7f0000 {
-				label = "radio";
-				reg = <0x7f0000 0x10000>;
-			};
-		};
-	};
 };
 
 &pinctrl {
@@ -133,37 +50,3 @@
 		};
 	};
 };
-
-&ethernet {
-		pinctrl-names = "default";
-		mtd-mac-address = <&rom 0xf100>;
-		mediatek,portmap = "wllll";
-	};
-
-&ehci {
-	status = "okay";
-};
-
-&ohci {
-	status = "okay";
-};
-
-&gsw {
-	mediatek,port4 = "ephy";
-};
-
-&wmac {
-	ralink,mtd-eeprom = <&radio 0x0>;
-};
-
-&pcie {
-	status = "okay";
-};
-
-&pcie0 {
-	mt76 at 0,0 {
-		reg = <0x0000 0 0 0 0>;
-		mediatek,mtd-eeprom = <&radio 0x8000>;
-		ieee80211-freq-limit = <5000000 6000000>;
-	};
-};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
index e53e98e32b..77885853ef 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
@@ -1,9 +1,6 @@
 /dts-v1/;
 
-#include "mt7620a.dtsi"
-
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/gpio/gpio.h>
+#include "mt7620a_tplink_archer.dtsi"
 
 / {
 	compatible = "tplink,archer-c50-v1", "ralink,mt7620a-soc";
@@ -16,10 +13,6 @@
 		led-upgrade = &led_power;
 	};
 
-	chosen {
-		bootargs = "console=ttyS0,115200";
-	};
-
 	leds {
 		compatible = "gpio-leds";
 
@@ -66,86 +59,6 @@
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 	};
-
-	keys {
-		compatible = "gpio-keys";
-
-		reset {
-			label = "reset";
-			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RESTART>;
-		};
-
-		rfkill {
-			label = "rfkill";
-			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RFKILL>;
-		};
-	};
-};
-
-&gpio1 {
-	status = "okay";
-};
-
-&gpio2 {
-	status = "okay";
-};
-
-&gpio3 {
-	status = "okay";
-};
-
-&spi0 {
-	status = "okay";
-
-	m25p80 at 0 {
-		compatible = "jedec,spi-nor";
-		reg = <0>;
-		spi-max-frequency = <10000000>;
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition at 0 {
-				label = "u-boot";
-				reg = <0x0 0x20000>;
-				read-only;
-			};
-
-			partition at 20000 {
-				compatible = "tplink,firmware";
-				label = "firmware";
-				reg = <0x20000 0x7a0000>;
-			};
-
-			partition at 7c0000 {
-				label = "config";
-				reg = <0x7c0000 0x10000>;
-				read-only;
-			};
-
-			rom: partition at 7d0000 {
-				label = "rom";
-				reg = <0x7d0000 0x10000>;
-				read-only;
-			};
-
-			partition at 7e0000 {
-				label = "romfile";
-				reg = <0x7e0000 0x10000>;
-				read-only;
-			};
-
-			radio: partition at 7f0000 {
-				label = "radio";
-				reg = <0x7f0000 0x10000>;
-				read-only;
-			};
-		};
-	};
 };
 
 &pinctrl {
@@ -157,42 +70,15 @@
 	};
 };
 
-&ethernet {
-		pinctrl-names = "default";
-		mtd-mac-address = <&rom 0xf100>;
-		mediatek,portmap = "wllll";
-	};
-
-&ehci {
-	status = "okay";
-};
-
-&ohci {
-	status = "okay";
-};
-
-&gsw {
-	mediatek,port4 = "ephy";
-};
-
 &wmac {
-	ralink,mtd-eeprom = <&radio 0x0>;
-	mtd-mac-address = <&rom 0xf100>;
-	mtd-mac-address-increment = <(-2)>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pa_pins>;
-};
 
-&pcie {
-	status = "okay";
+	mtd-mac-address = <&rom 0xf100>;
+	mtd-mac-address-increment = <(-2)>;
 };
 
-&pcie0 {
-	mt76 at 0,0 {
-		reg = <0x0000 0 0 0 0>;
-		mediatek,mtd-eeprom = <&radio 0x8000>;
-		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&rom 0xf100>;
-		mtd-mac-address-increment = <(-1)>;
-	};
+&wifi {
+	mtd-mac-address = <&rom 0xf100>;
+	mtd-mac-address-increment = <(-1)>;
 };
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
new file mode 100644
index 0000000000..dd213ad219
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
@@ -0,0 +1,124 @@
+#include "mt7620a.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	chosen {
+		bootargs = "console=ttyS0,115200";
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		rfkill {
+			label = "rfkill";
+			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RFKILL>;
+		};
+	};
+};
+
+&gpio1 {
+	status = "okay";
+};
+
+&gpio2 {
+	status = "okay";
+};
+
+&gpio3 {
+	status = "okay";
+};
+
+&spi0 {
+	status = "okay";
+
+	m25p80 at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <10000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x20000>;
+				read-only;
+			};
+
+			partition at 20000 {
+				compatible = "tplink,firmware";
+				label = "firmware";
+				reg = <0x20000 0x7a0000>;
+			};
+
+			partition at 7c0000 {
+				label = "config";
+				reg = <0x7c0000 0x10000>;
+				read-only;
+			};
+
+			rom: partition at 7d0000 {
+				label = "rom";
+				reg = <0x7d0000 0x10000>;
+				read-only;
+			};
+
+			partition at 7e0000 {
+				label = "romfile";
+				reg = <0x7e0000 0x10000>;
+				read-only;
+			};
+
+			radio: partition at 7f0000 {
+				label = "radio";
+				reg = <0x7f0000 0x10000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&ethernet {
+	pinctrl-names = "default";
+	mtd-mac-address = <&rom 0xf100>;
+	mediatek,portmap = "wllll";
+};
+
+&ehci {
+	status = "okay";
+};
+
+&ohci {
+	status = "okay";
+};
+
+&gsw {
+	mediatek,port4 = "ephy";
+};
+
+&wmac {
+	ralink,mtd-eeprom = <&radio 0x0>;
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie0 {
+	wifi: mt76 at 0,0 {
+		reg = <0x0000 0 0 0 0>;
+		mediatek,mtd-eeprom = <&radio 0x8000>;
+		ieee80211-freq-limit = <5000000 6000000>;
+	};
+};
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at dd-wrt.com  Sun Dec  8 11:14:18 2019
From: daniel at dd-wrt.com (Daniel Danzberger)
Date: Sun,  8 Dec 2019 17:14:18 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] ustream-ssl: mbedtls: fix net_sockets.h
 include warning
Message-ID: <20191208161419.124991-1-daniel@dd-wrt.com>

Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
---
 ustream-mbedtls.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ustream-mbedtls.h b/ustream-mbedtls.h
index 70bd4ea..0e5988a 100644
--- a/ustream-mbedtls.h
+++ b/ustream-mbedtls.h
@@ -19,7 +19,7 @@
 #ifndef __USTREAM_POLARSSL_H
 #define __USTREAM_POLARSSL_H
 
-#include <mbedtls/net.h>
+#include <mbedtls/net_sockets.h>
 #include <mbedtls/ssl.h>
 #include <mbedtls/certs.h>
 #include <mbedtls/x509.h>
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at dd-wrt.com  Sun Dec  8 11:14:19 2019
From: daniel at dd-wrt.com (Daniel Danzberger)
Date: Sun,  8 Dec 2019 17:14:19 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] ustream-ssl: mbedtls: fix ssl client
 verification
In-Reply-To: <20191208161419.124991-1-daniel@dd-wrt.com>
References: <20191208161419.124991-1-daniel@dd-wrt.com>
Message-ID: <20191208161419.124991-2-daniel@dd-wrt.com>

Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
---
 ustream-mbedtls.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/ustream-mbedtls.c b/ustream-mbedtls.c
index 85bbb1c..74c27a5 100644
--- a/ustream-mbedtls.c
+++ b/ustream-mbedtls.c
@@ -182,16 +182,9 @@ static void ustream_ssl_update_own_cert(struct ustream_ssl_ctx *ctx)
 	if (!ctx->cert.version)
 		return;
 
-	if (!ctx->server) {
-		mbedtls_ssl_conf_ca_chain(&ctx->conf, &ctx->cert, NULL);
-		return;
-	}
-
 	if (!ctx->key.pk_info)
 		return;
 
-	if (ctx->cert.next)
-		mbedtls_ssl_conf_ca_chain(&ctx->conf, ctx->cert.next, NULL);
 	mbedtls_ssl_conf_own_cert(&ctx->conf, &ctx->cert, &ctx->key);
 }
 
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Sun Dec  8 14:13:11 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Sun, 8 Dec 2019 22:13:11 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?y/P3+OjlIO/x6PXu6+7j6Pfl8ero5SDy8OXt?=
	=?cp1251?b?6O3j6CDoIOzl5Ojy4Pbo6CDiIO7k7e7pIOru6+vl6vbo6C4gMDVf?=
	=?cp1251?q?08=5F2019_02=5F10_199508?=
Message-ID: <mailman.16465.1575832593.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ?????? ??????????????? ???????? ? ????????? ? ????? ?????????. 05_08_2019 02_10 199508
Date: Sun, 8 Dec 2019 22:13:11 +0300
Size: 58500
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191208/42819438/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Sun Dec  8 14:14:44 2019
From: daniel at makrotopia.org (Daniel Golle)
Date: Sun, 8 Dec 2019 20:14:44 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] ustream-ssl: mbedtls: fix ssl
 client verification
In-Reply-To: <20191208161419.124991-2-daniel@dd-wrt.com>
References: <20191208161419.124991-1-daniel@dd-wrt.com>
 <20191208161419.124991-2-daniel@dd-wrt.com>
Message-ID: <20191208191444.GC33463@makrotopia.org>

Hi Daniel,

On Sun, Dec 08, 2019 at 05:14:19PM +0100, Daniel Danzberger wrote:
> Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
> ---
>  ustream-mbedtls.c | 7 -------
>  1 file changed, 7 deletions(-)

Please provide a more elaborate commit description as it is not obvious
why those lines need to be removed.

> 
> diff --git a/ustream-mbedtls.c b/ustream-mbedtls.c
> index 85bbb1c..74c27a5 100644
> --- a/ustream-mbedtls.c
> +++ b/ustream-mbedtls.c
> @@ -182,16 +182,9 @@ static void ustream_ssl_update_own_cert(struct ustream_ssl_ctx *ctx)
>  	if (!ctx->cert.version)
>  		return;
>  
> -	if (!ctx->server) {
> -		mbedtls_ssl_conf_ca_chain(&ctx->conf, &ctx->cert, NULL);
> -		return;
> -	}
> -
>  	if (!ctx->key.pk_info)
>  		return;
>  
> -	if (ctx->cert.next)
> -		mbedtls_ssl_conf_ca_chain(&ctx->conf, ctx->cert.next, NULL);
>  	mbedtls_ssl_conf_own_cert(&ctx->conf, &ctx->cert, &ctx->key);
>  }
>  
> -- 
> 2.24.0
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From noreply at github.com  Sun Dec  8 14:41:24 2019
From: noreply at github.com (Stephen Walker)
Date: Sun, 08 Dec 2019 11:41:24 -0800
Subject: [OpenWrt-Devel] [sdwalker/sdwalker.github.io] d4b099: This week's
 update
Message-ID: <sdwalker/sdwalker.github.io/push/refs/heads/master/83c714-d4b099@github.com>

  Branch: refs/heads/master
  Home:   https://github.com/sdwalker/sdwalker.github.io
  Commit: d4b09966b2363f0d81c2c79dee32482b79cbc05b
      https://github.com/sdwalker/sdwalker.github.io/commit/d4b09966b2363f0d81c2c79dee32482b79cbc05b
  Author: Stephen Walker <stephendwalker+github at gmail.com>
  Date:   2019-12-08 (Sun, 08 Dec 2019)

  Changed paths:
    M uscan/index-18.06.html
    M uscan/index-19.07.html
    M uscan/index.html

  Log Message:
  -----------
  This week's update



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at dd-wrt.com  Sun Dec  8 15:14:08 2019
From: daniel at dd-wrt.com (Daniel Danzberger)
Date: Sun,  8 Dec 2019 21:14:08 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] ustream-ssl: mbedtls: fix ssl client
 verification
Message-ID: <20191208201408.130971-1-daniel@dd-wrt.com>

The ustream_ssl_update_own_cert() function should, like the name suggests, only
update the local ssl peer's own certificate and not the any of the CA's.

By overwriting the CA's certifcates when setting the own certificate, the code
broke SSL client verification.

This bug was only triggerd when:
 ustream_ssl_context_set_crt_file()
was called after
 ustream_ssl_context_add_ca_crt_file()

Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
---
 ustream-mbedtls.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/ustream-mbedtls.c b/ustream-mbedtls.c
index 85bbb1c..74c27a5 100644
--- a/ustream-mbedtls.c
+++ b/ustream-mbedtls.c
@@ -182,16 +182,9 @@ static void ustream_ssl_update_own_cert(struct ustream_ssl_ctx *ctx)
 	if (!ctx->cert.version)
 		return;
 
-	if (!ctx->server) {
-		mbedtls_ssl_conf_ca_chain(&ctx->conf, &ctx->cert, NULL);
-		return;
-	}
-
 	if (!ctx->key.pk_info)
 		return;
 
-	if (ctx->cert.next)
-		mbedtls_ssl_conf_ca_chain(&ctx->conf, ctx->cert.next, NULL);
 	mbedtls_ssl_conf_own_cert(&ctx->conf, &ctx->cert, &ctx->key);
 }
 
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dengqf6 at mail2.sysu.edu.cn  Mon Dec  9 00:31:32 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Mon,  9 Dec 2019 13:31:32 +0800
Subject: [OpenWrt-Devel] [PATCH] ath79: fix typos in DTS
In-Reply-To: <00ae01d5ad572db0ae089120a0adrianschmutzler.de>
References: <00ae01d5ad572db0ae089120a0adrianschmutzler.de>
Message-ID: <20191209053132.18727-1-dengqf6@mail2.sysu.edu.cn>

Replace "usb_ochi" with "usb_ohci", and "usb_echi" with "usb_ehci"



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From joe at ayerscasa.com  Mon Dec  9 00:42:48 2019
From: joe at ayerscasa.com (Joe Ayers)
Date: Sun, 8 Dec 2019 21:42:48 -0800
Subject: [OpenWrt-Devel] ath10k memory leak on 19.07 branch and mikrotik
 RB952Ui-5ac2nD?
In-Reply-To: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
References: <CAALvt2MKiCHmZb5neZqjawnr-R1VAHpTK+LQafPrUj=i_UJ05w@mail.gmail.com>
 <20191203143434.GF8181@meh.true.cz>
 <CAALvt2POG3isiKH+2aHjSGRoh-+HADtamD9O2VLOCKO=73byGw@mail.gmail.com>
 <20191205200036.GD71465@meh.true.cz>
 <CAALvt2NygyiyJ3iV82B3DXLr+hWsW_7T=iL=9=7xnyUHxD8UdA@mail.gmail.com>
 <069ab5b0-f9ea-8700-afc6-3514ea2dba99@candelatech.com>
 <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
Message-ID: <CAALvt2M2r6q2xHX+t9-wa3yOFJ2WNdnSaU6gAjymQQwEy-85jA@mail.gmail.com>

On Sat, Dec 7, 2019 at 5:19 AM Hauke Mehrtens <hauke at hauke-m.de> wrote:
>
> On 12/6/19 7:02 PM, Ben Greear wrote:
> > On 12/6/19 9:44 AM, Joe Ayers wrote:
> >>>
> >>>
> >>>> Possibly the same symptoms don't exist on 128MB RAM devices.
> >>>
> >>> Like there is some if condition, which is doing some nasty things on 64M
> >>> devices? I admit, that I don't have ath10k-ct source code under my
> >>> pillow, but
> >>> it doesn't make much sense to me.
> >>>
> >>>> Comparable results between above and my 64MB device.   However, if the
> >>>> sleep time is extended the consumption is more
> >>>
> >>> Ok, I'll let it run overnight with 120s sleep in between.
> >>>
> >>>> I suspect this is not the intended behavior.
> >>>
> >>> No its not and it's even strange, that I'm not seeing it here if it
> >>> should
> >>> happen in the "default setup". Maybe its because:
> >>>
> >>> 1. You're using custom image (I'm using official prebuilt images)
> >>> 2. You're not providing all the steps needed to reproduce the issue
> >>> 3. I've way different hardware
> >>>
> >>> Every detail could make huge difference.
> >>>
> >>> -- ynezz
> >>
> >> On the device I am testing, it is both (2GHz) ath9k and (5GHz) ath10k.
> >>    These look to be related patches to this issue:
> >>
> >> 960-0010-ath10k-limit-htt-rx-ring-size.patch
> >> 960-0011-ath10k-limit-pci-buffer-size.patch
> >>
> >> In the v19.07.0-rc2 build for the rb-nor-flash-16M-ac ar71xx image,
> >> these patches are applied to backports-4.19.85-1, but don't seem to be
> >> applied to ath10k-ct-2019-09-09-5e8cd86f.    Should ath10k-ct have
> >> these and other patches?    The device's installed packages do include
> >> ath10k-ct (from downloads.openwrt.org installed image).
> >
> > I think that if you need the patches for upstream ath10k, then you
> > should also apply
> > the patches to ath10k-ct.
> >
> > Platforms with more memory probably do not need or benefit from those
> > patches.
> >
> > Thanks,
> > Ben
> >
> Hi,
>
> I am fine with adding these patches to ath10k-ct if they solve problems.
>
> It would be nice if a description could be added to the patches so I
> know what kind of buffers are reduced there.
>
> Will someone send a patch?
>
> Hauke
>

I'm currently testing with the following patches with openwrt-19.07 on
RB952Ui-5ac2nD (hAP ac lite).   Sorry, I know enough to be dangerous
to  provide a description.    I am seeing ~15M of RAM consumed, but
have not seen OOM kick in yet, like before.  These patches are an
improvement so far -- usable 64M device.

Joe

Index: openwrt/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch
===================================================================
--- /dev/null
+++ openwrt/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch
@@ -0,0 +1,11 @@
+--- a/ath10k-4.19/htt.h
++++ b/ath10k-4.19/htt.h
+@@ -238,7 +238,7 @@ enum htt_rx_ring_flags {
+ };
+
+ #define HTT_RX_RING_SIZE_MIN 128
+-#define HTT_RX_RING_SIZE_MAX 2048
++#define HTT_RX_RING_SIZE_MAX 512
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
Index: openwrt/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
===================================================================
--- /dev/null
+++ openwrt/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
@@ -0,0 +1,38 @@
+--- a/ath10k-4.19/pci.c
++++ b/ath10k-4.19/pci.c
+@@ -142,7 +142,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 512,
++              .dest_nentries = 128,
+               .recv_cb = ath10k_pci_htt_htc_rx_cb,
+       },
+
+@@ -151,7 +151,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 128,
++              .dest_nentries = 64,
+               .recv_cb = ath10k_pci_htc_rx_cb,
+       },
+
+@@ -178,7 +178,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 512,
+-              .dest_nentries = 512,
++              .dest_nentries = 128,
+               .recv_cb = ath10k_pci_htt_rx_cb,
+       },
+
+@@ -203,7 +203,7 @@ static struct ce_attr host_ce_config_wla
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+-              .dest_nentries = 128,
++              .dest_nentries = 96,
+               .recv_cb = ath10k_pci_pktlog_rx_cb,
+       },
+

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From thomas.petazzoni at bootlin.com  Mon Dec  9 11:02:28 2019
From: thomas.petazzoni at bootlin.com (Thomas Petazzoni)
Date: Mon, 9 Dec 2019 17:02:28 +0100
Subject: [OpenWrt-Devel] [PATCH 4/7] include/image.mk: implement SELinux
 squashfs image generation
In-Reply-To: <20191128230126.GF3366@makrotopia.org>
References: <20191122095541.688125-1-thomas.petazzoni@bootlin.com>
 <20191122095541.688125-5-thomas.petazzoni@bootlin.com>
 <20191128230126.GF3366@makrotopia.org>
Message-ID: <20191209170228.575f0413@windsurf>

Hello Daniel,

On Fri, 29 Nov 2019 00:01:26 +0100
Daniel Golle <daniel at makrotopia.org> wrote:

> I thought about introducing fakeroot in a similar way before, but for
> different purposes such as having setuid binaries or files owned by
> users other than root contained in the rootfs.

Right, that would indeed allow that. Buildroot uses fakeroot in a
consistent way to build all filesystem images, which allows us to
create files with arbitrary permissions/owernship.

> +1 for your work to enable SELinux in OpenWrt, I'll try to find time
> for some testing that.

Thanks!

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From vargagab at gmail.com  Mon Dec  9 17:03:58 2019
From: vargagab at gmail.com (vargagab at gmail.com)
Date: Mon,  9 Dec 2019 23:03:58 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix switch port numbering for
 RT-AC65P/RT-AC85P
Message-ID: <20191209220358.103352-1-vargagab@gmail.com>

From: Gabor Varga <vargagab at gmail.com>

The switch LAN port numbers are in reversed order with original config.
With this patch they are fixed.

Signed-off-by: Gabor Varga <vargagab at gmail.com>
---
 .../linux/ramips/mt7621/base-files/etc/board.d/02_network  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index 420780a101..42cdb4d57f 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -37,6 +37,11 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6 at eth0"
 		;;
+	asus,rt-ac65p|\
+	asus,rt-ac85p)
+		ucidef_add_switch "switch0" \
+			"1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "0:wan" "6 at eth0"
+		;;
 	alfa-network,quad-e4g|\
 	netgear,r6220|\
 	netgear,r6260|\
@@ -64,8 +69,6 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6 at eth0"
 		;;
-	asus,rt-ac65p|\
-	asus,rt-ac85p|\
 	dlink,dir-860l-b1|\
 	elecom,wrc-1167ghbk2-s|\
 	elecom,wrc-1900gst|\
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hauke at hauke-m.de  Mon Dec  9 18:17:58 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Tue, 10 Dec 2019 00:17:58 +0100
Subject: [OpenWrt-Devel] OpenWrt 19.07 status
In-Reply-To: <547634bd-d618-8cb0-82ff-ae12caf50aab@hauke-m.de>
References: <d530eff4-2b67-0bfe-78d0-510185e416b9@hauke-m.de>
 <7d4516c2-c9d2-102a-cb33-796497baa611@linux-ipv6.be>
 <547634bd-d618-8cb0-82ff-ae12caf50aab@hauke-m.de>
Message-ID: <6f03513e-ade2-b85e-0a0c-4a337197c472@hauke-m.de>

On 12/6/19 12:23 AM, Hauke Mehrtens wrote:
> On 11/26/19 10:44 AM, Stijn Tintel wrote:
>> On 26/11/2019 00:34, Hauke Mehrtens wrote:
>>> It looks like there is a throughput problem with ath10k-ct on QCA9984,
>>> https://bugs.openwrt.org/index.php?do=details&task_id=2593
>>> there are multiple reports in the Forum.
>>>
>>> For me QCA9880 on a BTHH5A with ath10k-ct on 5GHz works in openwrt 19.07
>>> The AP can do 180 MBit/s TX and only 40 Mbit/s RX over about 8m with a
>>> wall in between with sae-mixed to a Intel iwl8265.
>>> It is also very close to 40MBit/s not much changing the lowest I saw in
>>> about 30 outputs from iperf3 was 38.8 MBit/s and them highest 41.2 MBit/s
>>
>> I am seeing the same low RX with a qca988x AP and an 8265 client. This
>> did not happen earlier this year. I first noticed this on September 5th,
>> but I don't have known good commit hash. The problem goes away when I
>> disable 802.11w. Without 802.11w, I get 300-400Mbps TX and RX. Do you
>> have any other clients than the 8265 to test this? Ben suggested this
>> might be an issue on the 8265 end, and to use a sniffer to look into
>> block-ack setup packets:
>>
>> 18|20:29:01< greearb__> sniff the block-ack setup packets, make sure
>> client sends them encrypted (ie, if you see them open-auth encoded,
>> sender is issue)
>> 18|20:30:51< greearb__> you will really want to spend some quality time
>> with a sniffer to see if block-acks are working or not, and if BA setup
>> frames are properly encrypted
>>
>> Unfortunately the device with the 8265 is my only Linux client with 5GHz
>> and convenient sniffing support. Some of the Raspberry Pi boards seem to
>> support it with nexmon, but that looks overcomplicated. Maybe I could
>> try with my DIR860L, but so far I have not been able to do so. If you
>> have the equipment for it, maybe you can give it a try?
>>
>> Other than that, ath10k-ct is extremely stable on all my APs. Something
>> that cannot be said about ath10k. With the right combination of clients,
>> it was crashing within 1 day of uptime, while still sending beacons,
>> thus clients still trying to associate to the 5GHz network. WiFi
>> experience with stock ath10k was simply abysmal, almost downright
>> unusable. It was suggested that this was due to the use of 802.11w, but
>> disabling 802.11w is not a solution, and in my opinion not even an
>> option, especially with WPA3.
> 
> The BTHH5A uses the VR9 / VRX200, a Lantiq/Intel MIPS 35Kec BE SoC.
> 
> I connected my IPQ4019 to the QCA9880 and have the same results.
> IPQ4019 -> QCA9880 ~> 200 MBit/s
> QCA9880 -> IPQ4019 ~>  36 MBit/s
> 
> I also sniffed the traffic between my iwl8265 and the QCA9880 with the
> IPQ4019.
> 
> I monitored a iperf3 session where I send 46.6 MBytes in 28 seconds from
> the QCA9880 to the iwl8265 with about 40 MBit/s, I captured 44389
> packets with the QCA9880 in monitor mode.
> 
> 19.5% (8651) of the packets are RTS packets send by the QCA9880, 0.1%
> (35) of the packets are RTS packets send by other devices.
> 
> I do not see the data send by the QCA9880 probably because the iwl8265
> is closer.
> 
> I haven't seen any differences when deactivating 802.11w or WPA3.
> 
> Block Ack are send unencrypted.
> 
> The IPQ4019 and the QCA9880 used OpenWrt 19.07-rc2 with ath10k-ct.

I did some more tests and see the same behavior with OpenWrt 18.06 and
also with ath10k without ct and a similar behavior with Lede 17.01
(~50MBit/s). I used iperf running on the device, when I run it on an
external device and do forwarding, it is faster, but still not good.
The DMA handling in the lantiq Ethernet driver is not good and should
probably be improved, there were some patches on the mailing list some
time ago, but they needed some more cleanups.

From my side I do not see this as a regression and will not block the
19.07 release with this.

Hauke

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191210/7d4aeadc/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Tue Dec 10 05:52:02 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Tue, 10 Dec 2019 13:52:02 +0300
Subject: [OpenWrt-Devel] [PATCH v3] ath79: add D-Link DIR-615 E4
In-Reply-To: <003901d5ad4b$46efc9d0$d4cf5d70$@adrianschmutzler.de>
References: <003901d5ad4b$46efc9d0$d4cf5d70$@adrianschmutzler.de>
Message-ID: <20191210105202.28628-1-fercerpav@gmail.com>

Specifications:

- FCC ID: KA2IR615E3
- SoC: MIPS32 24K 400 MHz Atheros AR7240
- RAM: 32 MiB DDR SDRAM ESMT M13S2561616A-5T
- Flash: 4 MiB NOR SPI Macronix MX25L3208E
- Wireless: AR9287 2.4 GHz 802.11n 2T2R, 2x RP-SMA connectors
- Ethernet: 5x 100BASE-TX Fast Ethernet
- LEDs: 9x GPIO, 1x ath9k
- Buttons: 2x tactile switches
- UART: 3.3 V, 115200 8n1
- USB: simple hardware modification required, 1x USB 1.1 Full Speed


Partitioning notes:

Vendor firmware (based on CameoAP99) defines two additional partitions:
"mac" @0x3b0000, size 0x10000 and "lp" @0x3c0000, size 0x30000.

The "mac" partition stores LAN MAC address and hardware board name.
However, the vendor firmware uses addresses from "nvram" partition, and
the board name is used only for informational purposes in the Web
interface (included in the pages' header), not affecting the firmware
image check.

The "lp" partition is supposed to contain a "language pack" (which can
be used to add an additional language support to the Web interface) and
is flashed separately, using the vendor firmware upgrade page.

Since these partitions are absolutely useless for OpenWrt and
overwriting them doesn't prevent downgrading to obsolete vendor
firmware, this patch appends the valueable space to "firmware".


Installation instructions:

- Upgrade from OpenWrt ar71xx with "sysupgrade -f -n"
or
- Upload as a firmware update via the vendor Web-interface
or
- Connect UART and use "loady" to upload and run OpenWrt initramfs
  image, then sysupgrade from it (TFTP client doesn't work)
or
- Before powering up hold "reset" button and keep it pressed for about
  15 seconds after, then access fail safe Web server on 192.168.0.1 (the
  old uIP TCP/IP protocol stack is not compatible with modern Linux, the
  kernel, so you'll need to use some other OS to do this). Can be
  performed without a Web-browser too:
    curl http://192.168.0.1/cgi/index \
      -F Send=@openwrt-ath79-tiny-dlink_dir-615-e4-squashfs-factory.bin

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
Changes for v3:

    - Add specifications and installation instructions to commit message
    - Remove useless comments from DTS, other minor changes
    - Change LEDs back to using "d-link" name
    - Move ath9k LED to a dedicated section

Changes for v2:

    - Remove "rev." from board name
    - Use a single DTS file; whoever has hardware to port this to the other
      similar devices can easily unsplit it later
    - Fix label_mac handling (as it's not available in DT)
    - Rename gpio_leds to leds DTS section
    - Use boardname for LEDs and merge the setup code with buffalo,whr-g301n
    - Use 33 MHz for SPI clock (max frequency for READ command acconding to the
      chip datasheet)
    - Make "firmware" partition 0x3b0000 (3776 kiB) long, covering "mac" and "lp"

 .../ath79/dts/ar7240_dlink_dir-615-e4.dts     | 170 ++++++++++++++++++
 target/linux/ath79/image/tiny.mk              |  16 ++
 .../ath79/tiny/base-files/etc/board.d/01_leds |   7 +
 .../tiny/base-files/etc/board.d/02_network    |   6 +
 .../etc/hotplug.d/firmware/10-ath9k-eeprom    |   4 +
 5 files changed, 203 insertions(+)
 create mode 100644 target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts

diff --git a/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts b/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts
new file mode 100644
index 0000000000..537a99b8db
--- /dev/null
+++ b/target/linux/ath79/dts/ar7240_dlink_dir-615-e4.dts
@@ -0,0 +1,170 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "ar7240.dtsi"
+
+/ {
+	model = "D-Link DIR-615 E4";
+	compatible = "dlink,dir-615-e4", "qca,ar7240";
+
+	aliases {
+		led-boot = &led_power_amber;
+		led-failsafe = &led_power_amber;
+		led-running = &led_power_green;
+		led-upgrade = &led_power_amber;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+
+		wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&switch_led_pins>;
+
+		led_power_green: power_green {
+			label = "d-link:green:power";
+			gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+		};
+
+		led_power_amber: power_amber {
+			label = "d-link:amber:power";
+			gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+		};
+
+		wps {
+			label = "d-link:blue:wps";
+			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+		};
+
+		lan1 {
+			label = "d-link:green:lan1";
+			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+		};
+
+		lan2 {
+			label = "d-link:green:lan2";
+			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+		};
+
+		lan3 {
+			label = "d-link:green:lan3";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+		};
+
+		lan4 {
+			label = "d-link:green:lan4";
+			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+		};
+
+		wan_amber {
+			label = "d-link:amber:wan";
+			gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+		};
+
+		wan_green {
+			label = "d-link:green:wan";
+			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	ath9k-leds {
+		compatible = "gpio-leds";
+
+		wlan {
+			label = "d-link:green:wlan";
+			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
+		};
+	};
+};
+
+&spi {
+	status = "okay";
+
+	num-cs = <1>;
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <33000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				reg = <0x0 0x30000>;
+				label = "u-boot";
+				read-only;
+			};
+
+			partition at 30000 {
+				reg = <0x30000 0x10000>;
+				label = "nvram";
+				read-only;
+			};
+
+			partition at 40000 {
+				compatible = "denx,uimage";
+				reg = <0x40000 0x3b0000>;
+				label = "firmware";
+			};
+
+			partition at 3f0000 {
+				reg = <0x3f0000 0x10000>;
+				label = "art";
+				read-only;
+			};
+		};
+	};
+};
+
+&eth0 {
+	status = "okay";
+};
+
+&eth1 {
+	status = "okay";
+};
+
+&pcie {
+	status = "okay";
+
+	ath9k: wifi at 0,0 {
+		compatible = "pci168c,002b";
+		reg = <0x0000 0 0 0 0>;
+		qca,no-eeprom;
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+};
+
+&pinmux {
+	switch_led_pins: pinmux_switch_led_pins {
+		pinctrl-single,bits = <0x0 0x0 0xf8>;
+	};
+};
+
+&uart {
+	status = "okay";
+};
diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk
index 8f867575af..5f6adeac86 100644
--- a/target/linux/ath79/image/tiny.mk
+++ b/target/linux/ath79/image/tiny.mk
@@ -13,6 +13,22 @@ define Device/buffalo_whr-g301n
 endef
 TARGET_DEVICES += buffalo_whr-g301n
 
+define Device/dlink_dir-615-e4
+  ATH_SOC := ar7240
+  DEVICE_VENDOR := D-Link
+  DEVICE_MODEL := DIR-615
+  DEVICE_VARIANT := E4
+  IMAGE_SIZE := 3776k
+  FACTORY_IMAGE_SIZE := 3456k
+  IMAGES += factory.bin
+  IMAGE/default := append-kernel | append-rootfs | pad-rootfs
+  IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory.bin := $$(IMAGE/default) | check-size $$$$(FACTORY_IMAGE_SIZE) | \
+    pad-to $$$$(FACTORY_IMAGE_SIZE) | append-string "AP99-AR7240-RT-091105-05"
+  SUPPORTED_DEVICES += dir-615-e4
+endef
+TARGET_DEVICES += dlink_dir-615-e4
+
 define Device/pqi_air-pen
   ATH_SOC := ar9330
   DEVICE_VENDOR := PQI
diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds
index 03f135f0b0..199ad94bec 100755
--- a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds
@@ -15,6 +15,13 @@ buffalo,whr-g301n)
 	ucidef_set_led_switch "lan3" "LAN3" "$boardname:green:lan3" "switch0" "0x08"
 	ucidef_set_led_switch "lan4" "LAN4" "$boardname:green:lan4" "switch0" "0x10"
 	;;
+dlink,dir-615-e4)
+	ucidef_set_led_netdev "wan" "WAN" "d-link:green:wan" "eth0"
+	ucidef_set_led_switch "lan1" "LAN1" "d-link:green:lan1" "switch0" "0x02"
+	ucidef_set_led_switch "lan2" "LAN2" "d-link:green:lan2" "switch0" "0x04"
+	ucidef_set_led_switch "lan3" "LAN3" "d-link:green:lan3" "switch0" "0x08"
+	ucidef_set_led_switch "lan4" "LAN4" "d-link:green:lan4" "switch0" "0x10"
+	;;
 netgear,wnr1000-v2|\
 netgear,wnr2000-v3)
 	ucidef_set_led_netdev "wan-amber" "WAN (amber)" "netgear:amber:wan" "eth0"
diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/02_network b/target/linux/ath79/tiny/base-files/etc/board.d/02_network
index b2616456e4..b325c7cf8b 100755
--- a/target/linux/ath79/tiny/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/tiny/base-files/etc/board.d/02_network
@@ -13,6 +13,7 @@ ath79_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0 at eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
 		;;
+	dlink,dir-615-e4|\
 	netgear,wnr1000-v2|\
 	netgear,wnr2000-v3|\
 	netgear,wnr612-v2|\
@@ -75,6 +76,11 @@ ath79_setup_macs()
 	local board="$1"
 
 	case "$board" in
+	dlink,dir-615-e4)
+		lan_mac=$(mtd_get_mac_ascii "nvram" "lan_mac")
+		wan_mac=$(mtd_get_mac_ascii "nvram" "wan_mac")
+		label_mac=$wan_mac
+		;;
 	tplink,tl-wr941-v2|\
 	tplink,tl-wr941n-v7-cn)
 		base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
diff --git a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 3da95cc161..5952a40195 100644
--- a/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/tiny/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -14,6 +14,10 @@ case "$FIRMWARE" in
 	tplink,tl-wr941-v4)
 		caldata_extract "art" 0x1000 0xeb8
 		;;
+	dlink,dir-615-e4)
+		caldata_extract "art" 0x1000 0x1000
+		ath9k_patch_mac_crc $(mtd_get_mac_ascii "nvram" "lan_mac") 0x10c
+		;;
 	netgear,wnr1000-v2|\
 	netgear,wnr2000-v3|\
 	netgear,wnr612-v2|\
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Tue Dec 10 06:39:10 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 10 Dec 2019 12:39:10 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix switch port numbering for
 RT-AC65P/RT-AC85P
In-Reply-To: <20191209220358.103352-1-vargagab@gmail.com>
References: <20191209220358.103352-1-vargagab@gmail.com>
Message-ID: <011b01d5af4e$70ff5830$52fe0890$@adrianschmutzler.de>

Hi,

have you verified this for both devices (rt-ac65p and rt-ac85p)?

I've added Birger Koblitz to recipients (RT-AC85P author).

Best

Adrian

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On
> Behalf Of vargagab at gmail.com
> Sent: Montag, 9. Dezember 2019 23:04
> To: openwrt-devel at lists.openwrt.org
> Cc: ynezz at true.cz; gch981213 at gmail.com; Gabor Varga <vargagab at gmail.com>
> Subject: [OpenWrt-Devel] [PATCH] ramips: fix switch port numbering for RT-
> AC65P/RT-AC85P
> 
> From: Gabor Varga <vargagab at gmail.com>
> 
> The switch LAN port numbers are in reversed order with original config.
> With this patch they are fixed.
> 
> Signed-off-by: Gabor Varga <vargagab at gmail.com>
> ---
>  .../linux/ramips/mt7621/base-files/etc/board.d/02_network  | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> index 420780a101..42cdb4d57f 100755
> --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> @@ -37,6 +37,11 @@ ramips_setup_interfaces()
>  		ucidef_add_switch "switch0" \
>  			"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6 at eth0"
>  		;;
> +	asus,rt-ac65p|\
> +	asus,rt-ac85p)
> +		ucidef_add_switch "switch0" \
> +			"1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "0:wan" "6 at eth0"
> +		;;
>  	alfa-network,quad-e4g|\
>  	netgear,r6220|\
>  	netgear,r6260|\
> @@ -64,8 +69,6 @@ ramips_setup_interfaces()
>  		ucidef_add_switch "switch0" \
>  			"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6 at eth0"
>  		;;
> -	asus,rt-ac65p|\
> -	asus,rt-ac85p|\
>  	dlink,dir-860l-b1|\
>  	elecom,wrc-1167ghbk2-s|\
>  	elecom,wrc-1900gst|\
> --
> 2.24.0
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191210/36800e3e/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From dengqf6 at mail2.sysu.edu.cn  Tue Dec 10 07:52:49 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Tue, 10 Dec 2019 20:52:49 +0800
Subject: [OpenWrt-Devel] [PATCH V2] ath79: fix typos in DTS
Message-ID: <20191210125249.27265-1-dengqf6@mail2.sysu.edu.cn>

Replace "usb_ochi" with "usb_ohci", and "usb_echi" with "usb_ehci"

Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
---
 target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts | 6 +++---
 target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts      | 6 +++---
 target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi     | 6 +++---
 target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi   | 4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
index 2e00de8887..e87f422051 100644
--- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
+++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts
@@ -47,7 +47,7 @@
 		usb {
 			label = "buffalo:green:usb";
 			gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>;
-			trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
+			trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
 			linux,default-trigger = "usbport";
 		};
 
@@ -180,7 +180,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_ochi_port: port at 1 {
+	usb_ohci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
@@ -191,7 +191,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_echi_port: port at 1 {
+	usb_ehci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
index 92de193aba..5e35dddd4b 100644
--- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
+++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts
@@ -34,7 +34,7 @@
 		usb {
 			label = "d-link:blue:usb";
 			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
-			trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
+			trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
 			linux,default-trigger = "usbport";
 		};
 
@@ -123,7 +123,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_ochi_port: port at 1 {
+	usb_ohci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
@@ -134,7 +134,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_echi_port: port at 1 {
+	usb_ehci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
index f29137352f..ab4f37da11 100644
--- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
+++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi
@@ -31,7 +31,7 @@
 		usb_led {
 			label = "netgear:green:usb";
 			resets = <&rst 12>;
-			trigger-sources = <&usb_ochi_port>, <&usb_echi_port>;
+			trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>;
 			linux,default-trigger = "usbport";
 		};
 	};
@@ -133,7 +133,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_ochi_port: port at 1 {
+	usb_ohci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
@@ -144,7 +144,7 @@
 	#size-cells = <0>;
 	status = "okay";
 
-	usb_echi_port: port at 1 {
+	usb_ehci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
diff --git a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
index 35f3442b29..fc5d8335b5 100644
--- a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
+++ b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi
@@ -85,7 +85,7 @@
 	#address-cells = <1>;
 	#size-cells = <0>;
 
-	usb_ochi_port: port at 1 {
+	usb_ohci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
@@ -96,7 +96,7 @@
 	#address-cells = <1>;
 	#size-cells = <0>;
 
-	usb_echi_port: port at 1 {
+	usb_ehci_port: port at 1 {
 		reg = <1>;
 		#trigger-source-cells = <0>;
 	};
-- 
2.24.0




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From vargagab at gmail.com  Tue Dec 10 08:16:55 2019
From: vargagab at gmail.com (=?UTF-8?B?R8OhYm9yIFZhcmdh?=)
Date: Tue, 10 Dec 2019 14:16:55 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix switch port numbering for
 RT-AC65P/RT-AC85P
In-Reply-To: <011b01d5af4e$70ff5830$52fe0890$@adrianschmutzler.de>
References: <20191209220358.103352-1-vargagab@gmail.com>
 <011b01d5af4e$70ff5830$52fe0890$@adrianschmutzler.de>
Message-ID: <CADQ6-wvyOuFE1aD_MVD38QkQbsRmst5OEBGVFapQcsMt+nfkwg@mail.gmail.com>

Dear Adrian,

of course no, I have only Asus RT-AC65P router. As I see, the two devices
are identical, but hopefully Birger can confirm (or not) this. When the
port numbering are different on two devices, than I send a new patch.

Thanks,

Gabor Varga

Adrian Schmutzler <mail at adrianschmutzler.de> ezt ?rta (id?pont: 2019. dec.
10., K, 12:39):

> Hi,
>
> have you verified this for both devices (rt-ac65p and rt-ac85p)?
>
> I've added Birger Koblitz to recipients (RT-AC85P author).
>
> Best
>
> Adrian
>
> > -----Original Message-----
> > From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On
> > Behalf Of vargagab at gmail.com
> > Sent: Montag, 9. Dezember 2019 23:04
> > To: openwrt-devel at lists.openwrt.org
> > Cc: ynezz at true.cz; gch981213 at gmail.com; Gabor Varga <vargagab at gmail.com>
> > Subject: [OpenWrt-Devel] [PATCH] ramips: fix switch port numbering for
> RT-
> > AC65P/RT-AC85P
> >
> > From: Gabor Varga <vargagab at gmail.com>
> >
> > The switch LAN port numbers are in reversed order with original config.
> > With this patch they are fixed.
> >
> > Signed-off-by: Gabor Varga <vargagab at gmail.com>
> > ---
> >  .../linux/ramips/mt7621/base-files/etc/board.d/02_network  | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> > b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> > index 420780a101..42cdb4d57f 100755
> > --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> > +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> > @@ -37,6 +37,11 @@ ramips_setup_interfaces()
> >               ucidef_add_switch "switch0" \
> >                       "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6 at eth0"
> >               ;;
> > +     asus,rt-ac65p|\
> > +     asus,rt-ac85p)
> > +             ucidef_add_switch "switch0" \
> > +                     "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "0:wan"
> "6 at eth0"
> > +             ;;
> >       alfa-network,quad-e4g|\
> >       netgear,r6220|\
> >       netgear,r6260|\
> > @@ -64,8 +69,6 @@ ramips_setup_interfaces()
> >               ucidef_add_switch "switch0" \
> >                       "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6 at eth0"
> >               ;;
> > -     asus,rt-ac65p|\
> > -     asus,rt-ac85p|\
> >       dlink,dir-860l-b1|\
> >       elecom,wrc-1167ghbk2-s|\
> >       elecom,wrc-1900gst|\
> > --
> > 2.24.0
> >
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191210/a6e4b37b/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From dengqf6 at mail2.sysu.edu.cn  Tue Dec 10 08:21:34 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Tue, 10 Dec 2019 21:21:34 +0800
Subject: [OpenWrt-Devel] [PATCH] ramips: add support for JCG JHR-AC876M
Message-ID: <20191210132134.28943-1-dengqf6@mail2.sysu.edu.cn>

JCG JHR-AC876M is an AC2600M router

Hardware specs:
  SoC: MT7621AT
  2.4GHz: MT7615N 4x4 @ PCIe0
  5GHz: MT7615N 4x4 @ PCIe1
  Flash: Winbond W25Q128JVSQ 16MiB
  RAM: Nanya NT5CB128M16 256MiB
  USB 2.0 and 3.0 ports
  6 LEDs, 3 of which are connected to SoC GPIO
  Reset and WPS buttons

Flash instructions:
Stock to OpenWrt:
  Upload factory.bin in stock firmware's upgrade page,
  do not preserve settings

OpenWrt to stock:
  Push and hold the reset button for 5s while power cycling to
  enter recovery mode;
  Visit 192.168.1.1 and upload stock firmware

Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
---
 .../ramips/dts/mt7621_jcg_jhr-ac876m.dts      | 147 ++++++++++++++++++
 target/linux/ramips/image/mt7621.mk           |  13 ++
 .../mt7621/base-files/etc/board.d/02_network  |   4 +
 3 files changed, 164 insertions(+)
 create mode 100644 target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts

diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
new file mode 100644
index 0000000000..7aa644b124
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
@@ -0,0 +1,147 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "jcg,jhr-ac876m", "mediatek,mt7621-soc";
+	model = "JCG JHR-AC876M";
+
+	aliases {
+		led-boot = &led_wps;
+		led-failsafe = &led_wps;
+		led-running = &led_wps;
+		led-upgrade = &led_wps;
+		label-mac-device = &wifi2g;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,57600";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		usb3 {
+			label = "jhr-ac876m:blue:usb3";
+			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&xhci_ehci_port1>;
+			linux,default-trigger = "usbport";
+		};
+
+		usb2 {
+			label = "jhr-ac876m:blue:usb2";
+			gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ehci_port2>;
+			linux,default-trigger = "usbport";
+		};
+
+		led_wps: wps {
+			label = "jhr-ac876m:blue:wps";
+			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <80000000>;
+		m25p,fast-read;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x30000>;
+				read-only;
+			};
+
+			partition at 30000 {
+				label = "u-boot-env";
+				reg = <0x30000 0x10000>;
+				read-only;
+			};
+
+			factory: partition at 40000 {
+				label = "factory";
+				reg = <0x40000 0x10000>;
+				read-only;
+			};
+
+			partition at 50000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x50000 0xfb0000>;
+			};
+		};
+	};
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie0 {
+	wifi2g: wifi at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x0>;
+		ieee80211-freq-limit = <2400000 2500000>;
+
+		led {
+			led-active-low;
+		};
+	};
+};
+
+&pcie1 {
+	wifi at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x8000>;
+		ieee80211-freq-limit = <5000000 6000000>;
+
+		led {
+			led-active-low;
+		};
+	};
+};
+
+&ethernet {
+	mtd-mac-address = <&factory 0xe000>;
+};
+
+&pinctrl {
+	state_default: pinctrl0 {
+		gpio {
+			ralink,group = "i2c", "uart3", "jtag", "wdt";
+			ralink,function = "gpio";
+		};
+	};
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index d663aa29da..cbbda06822 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -361,6 +361,19 @@ define Device/iodata_wnpr2600g
 endef
 TARGET_DEVICES += iodata_wnpr2600g
 
+define Device/jcg_jhr-ac876m
+  MTK_SOC := mt7621
+  IMAGE_SIZE := 16064k
+  IMAGES += factory.bin
+  IMAGE/factory.bin := \
+        $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 89.1
+  JCG_MAXSIZE := 16449536
+  DEVICE_VENDOR := JCG
+  DEVICE_MODEL := JHR-AC876M
+  DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
+endef
+TARGET_DEVICES += jcg_jhr-ac876m
+
 define Device/lenovo_newifi-d1
   MTK_SOC := mt7621
   IMAGE_SIZE := 32448k
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index bb6e41e06f..904e82e09a 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -14,6 +14,7 @@ ramips_setup_interfaces()
 	d-team,pbr-m1|\
 	firefly,firewrt|\
 	hiwifi,hc5962|\
+	jcg,jhr-ac876m|\
 	mediatek,ap-mt7621a-v60|\
 	mediatek,mt7621-eval-board|\
 	mqmaker,witi|\
@@ -223,6 +224,9 @@ ramips_setup_macs()
 		wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
 		label_mac=$wan_mac
 		;;
+	jcg,jhr-ac876m)
+		wan_mac=$(mtd_get_mac_binary factory 0x4)
+		;;
 	netgear,r6260|\
 	netgear,r6350|\
 	netgear,r6850)
-- 
2.24.0




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at birger-koblitz.de  Tue Dec 10 08:25:00 2019
From: mail at birger-koblitz.de (Birger Koblitz)
Date: Tue, 10 Dec 2019 14:25:00 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix switch port numbering for
 RT-AC65P/RT-AC85P
In-Reply-To: <CADQ6-wvyOuFE1aD_MVD38QkQbsRmst5OEBGVFapQcsMt+nfkwg@mail.gmail.com>
References: <20191209220358.103352-1-vargagab@gmail.com>
 <011b01d5af4e$70ff5830$52fe0890$@adrianschmutzler.de>
 <CADQ6-wvyOuFE1aD_MVD38QkQbsRmst5OEBGVFapQcsMt+nfkwg@mail.gmail.com>
Message-ID: <77A5BB04-DBA2-493A-BB2C-C65A57E72620@birger-koblitz.de>

Dear all,

I'll check this this evening. Maybe I got the numbers backwards. The router's leds are labelled in the sequence 4 to 1 while the ports are numbered 1-4 at the back...

Birger 


On 10 December 2019 14:16:55 CET, "G?bor Varga" <vargagab at gmail.com> wrote:
>Dear Adrian,
>
>of course no, I have only Asus RT-AC65P router. As I see, the two
>devices
>are identical, but hopefully Birger can confirm (or not) this. When the
>port numbering are different on two devices, than I send a new patch.
>
>Thanks,
>
>Gabor Varga
>
>Adrian Schmutzler <mail at adrianschmutzler.de> ezt ?rta (id?pont: 2019.
>dec.
>10., K, 12:39):
>
>> Hi,
>>
>> have you verified this for both devices (rt-ac65p and rt-ac85p)?
>>
>> I've added Birger Koblitz to recipients (RT-AC85P author).
>>
>> Best
>>
>> Adrian
>>
>> > -----Original Message-----
>> > From: openwrt-devel
>[mailto:openwrt-devel-bounces at lists.openwrt.org] On
>> > Behalf Of vargagab at gmail.com
>> > Sent: Montag, 9. Dezember 2019 23:04
>> > To: openwrt-devel at lists.openwrt.org
>> > Cc: ynezz at true.cz; gch981213 at gmail.com; Gabor Varga
><vargagab at gmail.com>
>> > Subject: [OpenWrt-Devel] [PATCH] ramips: fix switch port numbering
>for
>> RT-
>> > AC65P/RT-AC85P
>> >
>> > From: Gabor Varga <vargagab at gmail.com>
>> >
>> > The switch LAN port numbers are in reversed order with original
>config.
>> > With this patch they are fixed.
>> >
>> > Signed-off-by: Gabor Varga <vargagab at gmail.com>
>> > ---
>> >  .../linux/ramips/mt7621/base-files/etc/board.d/02_network  | 7
>+++++--
>> >  1 file changed, 5 insertions(+), 2 deletions(-)
>> >
>> > diff --git
>a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>> > b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>> > index 420780a101..42cdb4d57f 100755
>> > --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>> > +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>> > @@ -37,6 +37,11 @@ ramips_setup_interfaces()
>> >               ucidef_add_switch "switch0" \
>> >                       "0:lan" "1:lan" "2:lan" "3:lan" "4:wan"
>"6 at eth0"
>> >               ;;
>> > +     asus,rt-ac65p|\
>> > +     asus,rt-ac85p)
>> > +             ucidef_add_switch "switch0" \
>> > +                     "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4"
>"0:wan"
>> "6 at eth0"
>> > +             ;;
>> >       alfa-network,quad-e4g|\
>> >       netgear,r6220|\
>> >       netgear,r6260|\
>> > @@ -64,8 +69,6 @@ ramips_setup_interfaces()
>> >               ucidef_add_switch "switch0" \
>> >                       "1:lan" "2:lan" "3:lan" "4:lan" "0:wan"
>"6 at eth0"
>> >               ;;
>> > -     asus,rt-ac65p|\
>> > -     asus,rt-ac85p|\
>> >       dlink,dir-860l-b1|\
>> >       elecom,wrc-1167ghbk2-s|\
>> >       elecom,wrc-1900gst|\
>> > --
>> > 2.24.0
>> >
>> >
>> > _______________________________________________
>> > openwrt-devel mailing list
>> > openwrt-devel at lists.openwrt.org
>> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191210/b342c7c2/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From tomek_n at o2.pl  Tue Dec 10 08:38:59 2019
From: tomek_n at o2.pl (Tomasz Maciej Nowak)
Date: Tue, 10 Dec 2019 14:38:59 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] sunxi: construct DTS name from
 device node name and SOC
In-Reply-To: <20191207222826.47389-3-freifunk@adrianschmutzler.de>
References: <20191207222826.47389-1-freifunk@adrianschmutzler.de>
 <20191207222826.47389-3-freifunk@adrianschmutzler.de>
Message-ID: <c548878d-5a73-6530-168b-f42057b124c3@o2.pl>

Hi Adrian.

W dniu 07.12.2019 o?23:28, Adrian Schmutzler pisze:
> The device part in the SUNXI_DTS variable always corresponds to
> device node name. This is another redundancy that can be removed
> by calculating the DTS name from a newly introduced SUNXI_SOC
> variable and the node name.
> 
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> ---
>  target/linux/sunxi/image/Makefile      |  5 ++-
>  target/linux/sunxi/image/cortex-a53.mk | 18 +++++++----
>  target/linux/sunxi/image/cortex-a7.mk  | 44 +++++++++++++-------------
>  target/linux/sunxi/image/cortex-a8.mk  | 13 ++++----
>  4 files changed, 45 insertions(+), 35 deletions(-)
> 
> diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
> index 04e0abee49..929f4c70f9 100644
> --- a/target/linux/sunxi/image/Makefile
> +++ b/target/linux/sunxi/image/Makefile
> @@ -32,12 +32,15 @@ endef
>  # why \x00\x00\x00\x00 for zImage-initramfs
>  define Device/Default
>    PROFILES := Default
> -  DEVICE_VARS := SUNXI_DTS SUNXI_UBOOT
> +  DEVICE_VARS := SUNXI_SOC SUNXI_DTS SUNXI_DTS_DIR SUNXI_UBOOT

Instead of adding new target speciffic variables, wouldn't using already
specified ones be better? We have DEVICE_DTS and DEVICE_DTS_DIR. Also the
SUNXI_SOC feels bit redundant since it needs to be specified for each device
and it could be replaced with DEVICE_DTS := sun50i-h5-$(1) or simply full dts name.

>    KERNEL_NAME := zImage
>    KERNEL := kernel-bin | uImage none
>    IMAGES := sdcard.img.gz
>    IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
>    SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
> +  SUNXI_SOC :=
> +  SUNXI_DTS_DIR :=
> +  SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SUNXI_SOC)-$(lastword $(subst _, ,$(1)))
>  endef
>  
>  include cortex-a7.mk
> diff --git a/target/linux/sunxi/image/cortex-a53.mk b/target/linux/sunxi/image/cortex-a53.mk
> index d6c17d95ff..b0d087b9b1 100644
> --- a/target/linux/sunxi/image/cortex-a53.mk
> +++ b/target/linux/sunxi/image/cortex-a53.mk
> @@ -11,7 +11,8 @@ define Device/friendlyarm_nanopi-neo-plus2
>    DEVICE_VENDOR := FriendlyARM
>    DEVICE_MODEL := NanoPi NEO Plus2
>    SUPPORTED_DEVICES:=nanopi-neo-plus2
> -  SUNXI_DTS:=allwinner/sun50i-h5-nanopi-neo-plus2
> +  SUNXI_DTS_DIR := allwinner/
> +  SUNXI_SOC := sun50i-h5
>    KERNEL_NAME := Image
>    KERNEL := kernel-bin
>  endef
> @@ -22,7 +23,8 @@ define Device/friendlyarm_nanopi-neo2
>    DEVICE_VENDOR := FriendlyARM
>    DEVICE_MODEL := NanoPi NEO2
>    SUPPORTED_DEVICES:=nanopi-neo2
> -  SUNXI_DTS:=allwinner/sun50i-h5-nanopi-neo2
> +  SUNXI_DTS_DIR := allwinner/
> +  SUNXI_SOC := sun50i-h5
>    KERNEL_NAME := Image
>    KERNEL := kernel-bin
>  endef
> @@ -32,7 +34,8 @@ TARGET_DEVICES += friendlyarm_nanopi-neo2
>  define Device/pine64_pine64-plus
>    DEVICE_VENDOR := Pine64
>    DEVICE_MODEL := Pine64+
> -  SUNXI_DTS:=allwinner/sun50i-a64-pine64-plus
> +  SUNXI_DTS_DIR := allwinner/
> +  SUNXI_SOC := sun50i-a64
>    KERNEL_NAME := Image
>    KERNEL := kernel-bin
>  endef
> @@ -42,7 +45,8 @@ TARGET_DEVICES += pine64_pine64-plus
>  define Device/pine64_sopine-baseboard
>    DEVICE_VENDOR := Pine64
>    DEVICE_MODEL := SoPine
> -  SUNXI_DTS:=allwinner/sun50i-a64-sopine-baseboard
> +  SUNXI_DTS_DIR := allwinner/
> +  SUNXI_SOC := sun50i-a64
>    KERNEL_NAME := Image
>    KERNEL := kernel-bin
>  endef
> @@ -53,7 +57,8 @@ TARGET_DEVICES += pine64_sopine-baseboard
>  define Device/xunlong_orangepi-zero-plus
>    DEVICE_VENDOR := Xunlong
>    DEVICE_MODEL := Orange Pi Zero Plus
> -  SUNXI_DTS:=allwinner/sun50i-h5-orangepi-zero-plus
> +  SUNXI_DTS_DIR := allwinner/
> +  SUNXI_SOC := sun50i-h5
>    KERNEL_NAME := Image
>    KERNEL := kernel-bin
>  endef
> @@ -63,7 +68,8 @@ TARGET_DEVICES += xunlong_orangepi-zero-plus
>  define Device/xunlong_orangepi-pc2
>    DEVICE_VENDOR := Xunlong
>    DEVICE_MODEL := Orange Pi PC 2
> -  SUNXI_DTS:=allwinner/sun50i-h5-orangepi-pc2
> +  SUNXI_DTS_DIR := allwinner/
> +  SUNXI_SOC := sun50i-h5
>    KERNEL_NAME := Image
>    KERNEL := kernel-bin
>  endef
> diff --git a/target/linux/sunxi/image/cortex-a7.mk b/target/linux/sunxi/image/cortex-a7.mk
> index 32e094efb8..0465c2ba9a 100644
> --- a/target/linux/sunxi/image/cortex-a7.mk
> +++ b/target/linux/sunxi/image/cortex-a7.mk
> @@ -12,7 +12,7 @@ define Device/olimex_a20-olinuxino-lime
>    DEVICE_VENDOR := Olimex
>    DEVICE_MODEL := A20-OLinuXino-LIME
>    DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi
> -  SUNXI_DTS:=sun7i-a20-olinuxino-lime
> +  SUNXI_SOC := sun7i
>  endef
>  
>  TARGET_DEVICES += olimex_a20-olinuxino-lime
> @@ -22,7 +22,7 @@ define Device/olimex_a20-olinuxino-lime2
>    DEVICE_VENDOR := Olimex
>    DEVICE_MODEL := A20-OLinuXino-LIME2
>    DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-usb-hid
> -  SUNXI_DTS:=sun7i-a20-olinuxino-lime2
> +  SUNXI_SOC := sun7i
>  endef
>  
>  TARGET_DEVICES += olimex_a20-olinuxino-lime2
> @@ -33,7 +33,7 @@ define Device/olimex_a20-olinuxino-lime2-emmc
>    DEVICE_MODEL := A20-OLinuXino-LIME2
>    DEVICE_VARIANT := eMMC
>    DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-usb-hid
> -  SUNXI_DTS:=sun7i-a20-olinuxino-lime2-emmc
> +  SUNXI_SOC := sun7i
>  endef
>  
>  TARGET_DEVICES += olimex_a20-olinuxino-lime2-emmc
> @@ -43,7 +43,7 @@ define Device/olimex_a20-olinuxino-micro
>    DEVICE_VENDOR := Olimex
>    DEVICE_MODEL := A20-OLinuXino-MICRO
>    DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
> -  SUNXI_DTS:=sun7i-a20-olinuxino-micro
> +  SUNXI_SOC := =sun7i
>  endef
>  
>  TARGET_DEVICES += olimex_a20-olinuxino-micro
> @@ -53,7 +53,7 @@ define Device/lemaker_bananapi
>    DEVICE_VENDOR := LeMaker
>    DEVICE_MODEL := Banana Pi
>    DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
> -  SUNXI_DTS:=sun7i-a20-bananapi
> +  SUNXI_SOC := sun7i-a20
>  endef
>  
>  TARGET_DEVICES += lemaker_bananapi
> @@ -63,7 +63,7 @@ define Device/lemaker_bananapro
>    DEVICE_VENDOR := LeMaker
>    DEVICE_MODEL := Banana Pro
>    DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-brcmfmac
> -  SUNXI_DTS:=sun7i-a20-bananapro
> +  SUNXI_SOC := sun7i-a20
>  endef
>  
>  TARGET_DEVICES += lemaker_bananapro
> @@ -73,7 +73,7 @@ define Device/cubietech_cubieboard2
>    DEVICE_VENDOR := Cubietech
>    DEVICE_MODEL := Cubieboard2
>    DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
> -  SUNXI_DTS:=sun7i-a20-cubieboard2
> +  SUNXI_SOC := sun7i-a20
>  endef
>  
>  TARGET_DEVICES += cubietech_cubieboard2
> @@ -83,7 +83,7 @@ define Device/cubietech_cubietruck
>    DEVICE_VENDOR := Cubietech
>    DEVICE_MODEL := Cubietruck
>    DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-rtc-sunxi kmod-brcmfmac
> -  SUNXI_DTS:=sun7i-a20-cubietruck
> +  SUNXI_SOC := sun7i-a20
>  endef
>  
>  TARGET_DEVICES += cubietech_cubietruck
> @@ -93,7 +93,7 @@ define Device/lamobo_lamobo-r1
>    DEVICE_VENDOR := Lamobo
>    DEVICE_MODEL := Lamobo R1
>    DEVICE_PACKAGES:=kmod-ata-sunxi kmod-rtl8192cu swconfig wpad-basic
> -  SUNXI_DTS:=sun7i-a20-lamobo-r1
> +  SUNXI_SOC := sun7i-a20
>  endef
>  
>  TARGET_DEVICES += lamobo_lamobo-r1
> @@ -103,7 +103,7 @@ define Device/mele_m9
>    DEVICE_VENDOR := Mele
>    DEVICE_MODEL := M9
>    DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
> -  SUNXI_DTS:=sun6i-a31-m9
> +  SUNXI_SOC := sun6i-a31
>  endef
>  
>  TARGET_DEVICES += mele_m9
> @@ -113,7 +113,7 @@ define Device/xunlong_orangepi-zero
>    DEVICE_VENDOR := Xunlong
>    DEVICE_MODEL := Orange Pi Zero
>    DEVICE_PACKAGES:=kmod-rtc-sunxi
> -  SUNXI_DTS:=sun8i-h2-plus-orangepi-zero
> +  SUNXI_SOC := sun8i-h2-plus
>  endef
>  
>  TARGET_DEVICES += xunlong_orangepi-zero
> @@ -123,7 +123,7 @@ define Device/xunlong_orangepi-r1
>    DEVICE_VENDOR := Xunlong
>    DEVICE_MODEL := Orange Pi R1
>    DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-usb-net kmod-usb-net-rtl8152
> -  SUNXI_DTS:=sun8i-h2-plus-orangepi-r1
> +  SUNXI_SOC := sun8i-h2-plus
>  endef
>  
>  TARGET_DEVICES += xunlong_orangepi-r1
> @@ -134,7 +134,7 @@ define Device/sinovoip_bananapi-m2-plus
>    DEVICE_PACKAGES:=kmod-rtc-sunxi \
>  	kmod-leds-gpio kmod-ledtrig-heartbeat \
>  	kmod-brcmfmac brcmfmac-firmware-43430a0-sdio wpad-basic
> -  SUNXI_DTS:=sun8i-h3-bananapi-m2-plus
> +  SUNXI_SOC := sun8i-h3
>  endef
>  
>  TARGET_DEVICES += sinovoip_bananapi-m2-plus
> @@ -145,7 +145,7 @@ define Device/friendlyarm_nanopi-m1-plus
>    DEVICE_PACKAGES:=kmod-rtc-sunxi \
>  	kmod-leds-gpio kmod-ledtrig-heartbeat \
>  	kmod-brcmfmac brcmfmac-firmware-43430-sdio wpad-basic
> -  SUNXI_DTS:=sun8i-h3-nanopi-m1-plus
> +  SUNXI_SOC := sun8i-h3
>  endef
>  
>  TARGET_DEVICES += friendlyarm_nanopi-m1-plus
> @@ -154,7 +154,7 @@ TARGET_DEVICES += friendlyarm_nanopi-m1-plus
>  define Device/friendlyarm_nanopi-neo
>    DEVICE_VENDOR := FriendlyARM
>    DEVICE_MODEL := NanoPi NEO
> -  SUNXI_DTS:=sun8i-h3-nanopi-neo
> +  SUNXI_SOC := sun8i-h3
>  endef
>  
>  TARGET_DEVICES += friendlyarm_nanopi-neo
> @@ -164,7 +164,7 @@ define Device/xunlong_orangepi-one
>    DEVICE_VENDOR := Xunlong
>    DEVICE_MODEL := Orange Pi One
>    DEVICE_PACKAGES:=kmod-rtc-sunxi
> -  SUNXI_DTS:=sun8i-h3-orangepi-one
> +  SUNXI_SOC := sun8i-h3
>  endef
>  
>  TARGET_DEVICES += xunlong_orangepi-one
> @@ -174,7 +174,7 @@ define Device/xunlong_orangepi-pc
>    DEVICE_VENDOR := Xunlong
>    DEVICE_MODEL := Orange Pi PC
>    DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-gpio-button-hotplug
> -  SUNXI_DTS:=sun8i-h3-orangepi-pc
> +  SUNXI_SOC := sun8i-h3
>  endef
>  
>  TARGET_DEVICES += xunlong_orangepi-pc
> @@ -184,7 +184,7 @@ define Device/xunlong_orangepi-pc-plus
>    DEVICE_VENDOR := Xunlong
>    DEVICE_MODEL := Orange Pi PC Plus
>    DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-gpio-button-hotplug
> -  SUNXI_DTS:=sun8i-h3-orangepi-pc-plus
> +  SUNXI_SOC := sun8i-h3
>  endef
>  
>  TARGET_DEVICES += xunlong_orangepi-pc-plus
> @@ -194,7 +194,7 @@ define Device/xunlong_orangepi-plus
>    DEVICE_VENDOR := Xunlong
>    DEVICE_MODEL := Orange Pi Plus
>    DEVICE_PACKAGES:=kmod-rtc-sunxi
> -  SUNXI_DTS:=sun8i-h3-orangepi-plus
> +  SUNXI_SOC := sun8i-h3
>  endef
>  
>  TARGET_DEVICES += xunlong_orangepi-plus
> @@ -203,7 +203,7 @@ define Device/xunlong_orangepi-2
>    DEVICE_VENDOR := Xunlong
>    DEVICE_MODEL := Orange Pi 2
>    DEVICE_PACKAGES:=kmod-rtc-sunxi
> -  SUNXI_DTS:=sun8i-h3-orangepi-2
> +  SUNXI_SOC := sun8i-h3
>  endef
>  
>  TARGET_DEVICES += xunlong_orangepi-2
> @@ -213,7 +213,7 @@ define Device/linksprite_pcduino3
>    DEVICE_VENDOR := LinkSprite
>    DEVICE_MODEL := pcDuino3
>    DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi kmod-rtl8xxxu rtl8188eu-firmware
> -  SUNXI_DTS:=sun7i-a20-pcduino3
> +  SUNXI_SOC := sun7i-a20
>  endef
>  
>  TARGET_DEVICES += linksprite_pcduino3
> @@ -222,7 +222,7 @@ define Device/lemaker_bananapi-m2-ultra
>    DEVICE_VENDOR := LeMaker
>    DEVICE_MODEL := Banana Pi M2 Ultra
>    DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-core kmod-ata-sunxi
> -  SUNXI_DTS:=sun8i-r40-bananapi-m2-ultra
> +  SUNXI_SOC := sun8i-r40
>  endef
>  
>  TARGET_DEVICES += lemaker_bananapi-m2-ultra
> diff --git a/target/linux/sunxi/image/cortex-a8.mk b/target/linux/sunxi/image/cortex-a8.mk
> index 073ed8f2d1..d6b5a46a22 100644
> --- a/target/linux/sunxi/image/cortex-a8.mk
> +++ b/target/linux/sunxi/image/cortex-a8.mk
> @@ -11,7 +11,7 @@ define Device/olimex_a10-olinuxino-lime
>    DEVICE_VENDOR := Olimex
>    DEVICE_MODEL := A10-OLinuXino-LIME
>    DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
> -  SUNXI_DTS:=sun4i-a10-olinuxino-lime
> +  SUNXI_SOC := sun4i
>  endef
>  
>  TARGET_DEVICES += olimex_a10-olinuxino-lime
> @@ -22,7 +22,8 @@ define Device/olimex_a13-olimex-som
>    DEVICE_MODEL := A13-SOM
>    DEVICE_PACKAGES:=kmod-rtl8192cu
>    SUPPORTED_DEVICES:=olimex,a13-olinuxino
> -  SUNXI_DTS:=sun5i-a13-olinuxino
> +  SUNXI_SOC := sun5i-a13
> +  SUNXI_DTS := sun5i-a13-olinuxino
>  endef
>  
>  TARGET_DEVICES += olimex_a13-olimex-som
> @@ -32,7 +33,7 @@ define Device/olimex_a13-olinuxino
>    DEVICE_VENDOR := Olimex
>    DEVICE_MODEL := A13-OLinuXino
>    DEVICE_PACKAGES:=kmod-rtl8192cu
> -  SUNXI_DTS:=sun5i-a13-olinuxino
> +  SUNXI_SOC := sun5i
>  endef
>  
>  TARGET_DEVICES += olimex_a13-olinuxino
> @@ -42,7 +43,7 @@ define Device/cubietech_a10-cubieboard
>    DEVICE_VENDOR := Cubietech
>    DEVICE_MODEL := Cubieboard
>    DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
> -  SUNXI_DTS:=sun4i-a10-cubieboard
> +  SUNXI_SOC := sun4i
>  endef
>  
>  TARGET_DEVICES += cubietech_a10-cubieboard
> @@ -52,7 +53,7 @@ define Device/linksprite_a10-pcduino
>    DEVICE_VENDOR := LinkSprite
>    DEVICE_MODEL := pcDuino
>    DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
> -  SUNXI_DTS:=sun4i-a10-pcduino
> +  SUNXI_SOC := sun4i
>  endef
>  
>  TARGET_DEVICES += linksprite_a10-pcduino
> @@ -62,7 +63,7 @@ define Device/marsboard_a10-marsboard
>    DEVICE_VENDOR := HAOYU Electronics
>    DEVICE_MODEL := MarsBoard A10
>    DEVICE_PACKAGES:=mod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi sound-soc-sunxi
> -  SUNXI_DTS:=sun4i-a10-marsboard
> +  SUNXI_SOC := sun4i
>  endef
>  
>  TARGET_DEVICES += marsboard_a10-marsboard
> 

Regards

-- 
TMN

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Tue Dec 10 09:24:20 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Tue, 10 Dec 2019 17:24:20 +0300
Subject: [OpenWrt-Devel] [RFC][PATCH] base-files: send informational UDP
 message each second waiting
Message-ID: <20191210142420.30748-1-fercerpav@gmail.com>

The preinit network initialisation and failsafe informational message
are inherently racy as the interface takes some time to become
functional after "ip link set $pi_ifname up" command.

Consider this timing:

[   12.002713] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   12.008819] IPv6: ADDRCONF(NETDEV_UP): eth1.1: link is not ready
[   12.118877] random: procd: uninitialized urandom read (4 bytes read)
[   13.068614] eth1: link up (1000Mbps/Full duplex)
[   13.073309] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   13.080445] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.1: link becomes ready

Since the UDP message was sent prior to link becoming ready, it was
never seen on the wire.

The default failsafe timeout is set to 2 seconds, so with this patch
there are two attempts to send the message, one spent in vain, and the
other visible in tcpdump on an attached host. Of course, in cases when
the interface is brought up faster it leads to two messages, however it
should be harmless. This patch (almost) doesn't affect normal boot time
while still allowing to enter failsafe reliably with a single button
press, matching the official "generic failsafe" documentation.

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
 package/base-files/files/lib/preinit/30_failsafe_wait | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/base-files/files/lib/preinit/30_failsafe_wait b/package/base-files/files/lib/preinit/30_failsafe_wait
index dd9c7e2b59..85dca398fa 100644
--- a/package/base-files/files/lib/preinit/30_failsafe_wait
+++ b/package/base-files/files/lib/preinit/30_failsafe_wait
@@ -31,6 +31,8 @@ fs_wait_for_key () {
 	lock $keypress_wait
 	{
 		while [ $timer -gt 0 ]; do
+			pi_failsafe_net_message=true \
+				preinit_net_echo "Please press button now to enter failsafe"
 			echo "$timer" >$keypress_sec
 			timer=$(($timer - 1))
 			sleep 1
@@ -88,9 +90,6 @@ failsafe_wait() {
 	}
 	grep -q 'failsafe=' /proc/cmdline && FAILSAFE=true && export FAILSAFE
 	if [ "$FAILSAFE" != "true" ]; then
-		pi_failsafe_net_message=true
-		preinit_net_echo "Please press button now to enter failsafe"
-		pi_failsafe_net_message=false
 		fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true
 		[ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "`cat /tmp/failsafe_button`" was pressed -"
 		[ "$FAILSAFE" = "true" ] && export FAILSAFE && touch /tmp/failsafe
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ynezz at true.cz  Tue Dec 10 09:42:13 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Tue, 10 Dec 2019 15:42:13 +0100
Subject: [OpenWrt-Devel] [RFC][PATCH] base-files: send informational UDP
 message each second waiting
In-Reply-To: <20191210142420.30748-1-fercerpav@gmail.com>
References: <20191210142420.30748-1-fercerpav@gmail.com>
Message-ID: <20191210144213.GH71465@meh.true.cz>

Paul Fertser <fercerpav at gmail.com> [2019-12-10 17:24:20]:

Hi,

> in cases when the interface is brought up faster it leads to two messages

in cases when the interface is brought up slower it leads to no message.

To me it just seems like a workaround to fix your use case, not a proper fix.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at birger-koblitz.de  Tue Dec 10 13:00:21 2019
From: mail at birger-koblitz.de (Birger Koblitz)
Date: Tue, 10 Dec 2019 19:00:21 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix switch port numbering for
 RT-AC65P/RT-AC85P
In-Reply-To: <77A5BB04-DBA2-493A-BB2C-C65A57E72620@birger-koblitz.de>
References: <20191209220358.103352-1-vargagab@gmail.com>
 <011b01d5af4e$70ff5830$52fe0890$@adrianschmutzler.de>
 <CADQ6-wvyOuFE1aD_MVD38QkQbsRmst5OEBGVFapQcsMt+nfkwg@mail.gmail.com>
 <77A5BB04-DBA2-493A-BB2C-C65A57E72620@birger-koblitz.de>
Message-ID: <D957C65B-9B7F-42C3-8F7D-4911BD7EA675@birger-koblitz.de>

Dear all, 

I acknowledge this patch on the RT-AC85P. For me in the setup without the patch, port numbers above the LEDs are correctly linked to respective physical port numbers, but the naming under Luci is incorrect, e.g. LAN1 corresponds to physical port 4.

Birger 

On 10 December 2019 14:25:00 CET, Birger Koblitz <mail at birger-koblitz.de> wrote:
>Dear all,
>
>I'll check this this evening. Maybe I got the numbers backwards. The
>router's leds are labelled in the sequence 4 to 1 while the ports are
>numbered 1-4 at the back...
>
>Birger 
>
>
>On 10 December 2019 14:16:55 CET, "G?bor Varga" <vargagab at gmail.com>
>wrote:
>>Dear Adrian,
>>
>>of course no, I have only Asus RT-AC65P router. As I see, the two
>>devices
>>are identical, but hopefully Birger can confirm (or not) this. When
>the
>>port numbering are different on two devices, than I send a new patch.
>>
>>Thanks,
>>
>>Gabor Varga
>>
>>Adrian Schmutzler <mail at adrianschmutzler.de> ezt ?rta (id?pont: 2019.
>>dec.
>>10., K, 12:39):
>>
>>> Hi,
>>>
>>> have you verified this for both devices (rt-ac65p and rt-ac85p)?
>>>
>>> I've added Birger Koblitz to recipients (RT-AC85P author).
>>>
>>> Best
>>>
>>> Adrian
>>>
>>> > -----Original Message-----
>>> > From: openwrt-devel
>>[mailto:openwrt-devel-bounces at lists.openwrt.org] On
>>> > Behalf Of vargagab at gmail.com
>>> > Sent: Montag, 9. Dezember 2019 23:04
>>> > To: openwrt-devel at lists.openwrt.org
>>> > Cc: ynezz at true.cz; gch981213 at gmail.com; Gabor Varga
>><vargagab at gmail.com>
>>> > Subject: [OpenWrt-Devel] [PATCH] ramips: fix switch port numbering
>>for
>>> RT-
>>> > AC65P/RT-AC85P
>>> >
>>> > From: Gabor Varga <vargagab at gmail.com>
>>> >
>>> > The switch LAN port numbers are in reversed order with original
>>config.
>>> > With this patch they are fixed.
>>> >
>>> > Signed-off-by: Gabor Varga <vargagab at gmail.com>
>>> > ---
>>> >  .../linux/ramips/mt7621/base-files/etc/board.d/02_network  | 7
>>+++++--
>>> >  1 file changed, 5 insertions(+), 2 deletions(-)
>>> >
>>> > diff --git
>>a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>>> > b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>>> > index 420780a101..42cdb4d57f 100755
>>> > --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>>> > +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
>>> > @@ -37,6 +37,11 @@ ramips_setup_interfaces()
>>> >               ucidef_add_switch "switch0" \
>>> >                       "0:lan" "1:lan" "2:lan" "3:lan" "4:wan"
>>"6 at eth0"
>>> >               ;;
>>> > +     asus,rt-ac65p|\
>>> > +     asus,rt-ac85p)
>>> > +             ucidef_add_switch "switch0" \
>>> > +                     "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4"
>>"0:wan"
>>> "6 at eth0"
>>> > +             ;;
>>> >       alfa-network,quad-e4g|\
>>> >       netgear,r6220|\
>>> >       netgear,r6260|\
>>> > @@ -64,8 +69,6 @@ ramips_setup_interfaces()
>>> >               ucidef_add_switch "switch0" \
>>> >                       "1:lan" "2:lan" "3:lan" "4:lan" "0:wan"
>>"6 at eth0"
>>> >               ;;
>>> > -     asus,rt-ac65p|\
>>> > -     asus,rt-ac85p|\
>>> >       dlink,dir-860l-b1|\
>>> >       elecom,wrc-1167ghbk2-s|\
>>> >       elecom,wrc-1900gst|\
>>> > --
>>> > 2.24.0
>>> >
>>> >
>>> > _______________________________________________
>>> > openwrt-devel mailing list
>>> > openwrt-devel at lists.openwrt.org
>>> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>>> _______________________________________________
>>> openwrt-devel mailing list
>>> openwrt-devel at lists.openwrt.org
>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191210/d6ae031d/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From johnwickcyber at gmail.com  Wed Dec 11 01:17:24 2019
From: johnwickcyber at gmail.com (John Wick)
Date: Wed, 11 Dec 2019 11:47:24 +0530
Subject: [OpenWrt-Devel] Requesting a custom firmware for a router
Message-ID: <CANtF88fWk+3eyOyE+HGdFrEYCTrJeZQ47b0bhyRmyCs7rHWrxQ@mail.gmail.com>

Kind request to upload the custom firmware for router model TP-LINK
TD-W8951ND v5.0 if possible
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191211/c50ddcb0/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From rqgxfc at vip.163.com  Wed Dec 11 01:44:45 2019
From: rqgxfc at vip.163.com (rqgxfc)
Date: Wed, 11 Dec 2019 14:44:45 +0800 (CST)
Subject: [OpenWrt-Devel] Inquery
Message-ID: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>



Hello Sir ?

We are  a trading company named Shaanxi Hao Zi Guan Materials Co.,Ltd  . Now we are very interested in your products , we will plan to  sell your products in the Chinese market . If you are interested in cooperation, please send us a catalog and pricelist .w 
Looking forward to receiving your reply . 

Best regards,
Catherina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191211/bdaffac5/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From bobafetthotmail at gmail.com  Wed Dec 11 03:23:45 2019
From: bobafetthotmail at gmail.com (Alberto Bursi)
Date: Wed, 11 Dec 2019 09:23:45 +0100
Subject: [OpenWrt-Devel] Requesting a custom firmware for a router
In-Reply-To: <CANtF88fWk+3eyOyE+HGdFrEYCTrJeZQ47b0bhyRmyCs7rHWrxQ@mail.gmail.com>
References: <CANtF88fWk+3eyOyE+HGdFrEYCTrJeZQ47b0bhyRmyCs7rHWrxQ@mail.gmail.com>
Message-ID: <76d5fe58-93fc-8e8d-fe8a-2d69c5e8d8df@gmail.com>


On 11/12/19 07:17, John Wick wrote:
> Kind request to upload the custom firmware for router model TP-LINK 
> TD-W8951ND v5.0 if possible
>
>

OpenWrt for that device is impossible. Device is using unsupported CPU 
(Ralink RT63365E) has 8MB RAM (which is less than half of the minimum 
required) and 2MB flash storage (also less than half minimum required).

See here for someone that opened that device and posted specifications 
and info (in russian)?http://monitor.espec.ws/section5/topic269462.html

-Alberto


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From russell at personaltelco.net  Wed Dec 11 05:10:04 2019
From: russell at personaltelco.net (Russell Senior)
Date: Wed, 11 Dec 2019 02:10:04 -0800
Subject: [OpenWrt-Devel] [PATCH] mac80211: switch to upstream owl-loader
 driver
In-Reply-To: <2725101.T8L288SS5r@debian64>
References: <20191117014442.1427795-1-chunkeey@gmail.com>
 <32e80bbe-3365-c1ef-0358-ac0a4e60fd6c@hauke-m.de>
 <2725101.T8L288SS5r@debian64>
Message-ID: <CAHP3WfOOHbn6tMoSTvYsfJ9CRYGrPYtLcnjXKjqEPAPWUQ6nww@mail.gmail.com>

This commit broke wifi on the Buffalo WZR600DHP.  See:
https://bugs.openwrt.org/index.php?do=details&task_id=2668

On Fri, Nov 22, 2019 at 12:00 PM Christian Lamparter <chunkeey at gmail.com>
wrote:

> On Monday, 18 November 2019 00:34:01 CET Hauke Mehrtens wrote:
> > > +--- a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
> > > ++++ b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
> > > +@@ -84,6 +84,10 @@
> > > +                   val = swahb32(val);
> > > +           }
> > > +
> > > ++#ifdef CONFIG_LANTIQ
> > > ++          val = swab32(val);
> > > ++#endif
> >
> > Lantiq is big endian, are there other big endian system which do not
> > need this byte swap?
>
> From what I vaguely remember (I know that Mathias explained it to me
> once.),
> that special hack was necessary due to Lantiq's pci(e?)-host silicon doing
> byteswaps just for 32-bit writes. The only other system that uses the
> owl-loader
> is ath79/ar71xx. This is a big-endian MIPS as well that didn't need the
> swap.
>
> (That said, I don't remember what was the reason for going with
> __raw_writel
> rather than "iowrite32" though. At least ath9k is using it for the pci
> access
> just fine everywhere.)
>
> Anyone fancy checking out lantiq and ath79 devices with a AR92XX without
> the
> swap above and the __raw_writel replaced by iowrite32?
>
> > > ++
> > > +           __raw_writel(val, mem + reg);
> > > +           usleep_range(100, 120);
> > > +   }
>
> Regards,
> Christian
>
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191211/02068383/attachment.htm>

From pozega.tomislav at gmail.com  Wed Dec 11 05:24:21 2019
From: pozega.tomislav at gmail.com (Tom Psyborg)
Date: Wed, 11 Dec 2019 11:24:21 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
Message-ID: <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>

suck it

On 11/12/2019, rqgxfc <rqgxfc at vip.163.com> wrote:
>
>
> Hello Sir ?
>
> We are  a trading company named Shaanxi Hao Zi Guan Materials Co.,Ltd  . Now
> we are very interested in your products , we will plan to  sell your
> products in the Chinese market . If you are interested in cooperation,
> please send us a catalog and pricelist .w
> Looking forward to receiving your reply .
>
> Best regards,
> Catherina

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at adrianschmutzler.de  Wed Dec 11 05:42:22 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Wed, 11 Dec 2019 11:42:22 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] sunxi: construct DTS name from
 device node name and SOC
In-Reply-To: <c548878d-5a73-6530-168b-f42057b124c3@o2.pl>
References: <20191207222826.47389-1-freifunk@adrianschmutzler.de>
 <20191207222826.47389-3-freifunk@adrianschmutzler.de>
 <c548878d-5a73-6530-168b-f42057b124c3@o2.pl>
Message-ID: <008b01d5b00f$ac39ba00$04ad2e00$@adrianschmutzler.de>

Hi,

> -----Original Message-----
> From: Tomasz Maciej Nowak [mailto:tomek_n at o2.pl]
> Sent: Dienstag, 10. Dezember 2019 14:39
> To: Adrian Schmutzler <freifunk at adrianschmutzler.de>; openwrt-
> devel at lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH 2/2] sunxi: construct DTS name from
> device node name and SOC
> 
> Hi Adrian.
> 
> W dniu 07.12.2019 o?23:28, Adrian Schmutzler pisze:
> > The device part in the SUNXI_DTS variable always corresponds to
> > device node name. This is another redundancy that can be removed
> > by calculating the DTS name from a newly introduced SUNXI_SOC
> > variable and the node name.
> >
> > Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> > ---
> >  target/linux/sunxi/image/Makefile      |  5 ++-
> >  target/linux/sunxi/image/cortex-a53.mk | 18 +++++++----
> >  target/linux/sunxi/image/cortex-a7.mk  | 44 +++++++++++++-------------
> >  target/linux/sunxi/image/cortex-a8.mk  | 13 ++++----
> >  4 files changed, 45 insertions(+), 35 deletions(-)
> >
> > diff --git a/target/linux/sunxi/image/Makefile
> b/target/linux/sunxi/image/Makefile
> > index 04e0abee49..929f4c70f9 100644
> > --- a/target/linux/sunxi/image/Makefile
> > +++ b/target/linux/sunxi/image/Makefile
> > @@ -32,12 +32,15 @@ endef
> >  # why \x00\x00\x00\x00 for zImage-initramfs
> >  define Device/Default
> >    PROFILES := Default
> > -  DEVICE_VARS := SUNXI_DTS SUNXI_UBOOT
> > +  DEVICE_VARS := SUNXI_SOC SUNXI_DTS SUNXI_DTS_DIR SUNXI_UBOOT
> 
> Instead of adding new target speciffic variables, wouldn't using already
> specified ones be better? We have DEVICE_DTS and DEVICE_DTS_DIR. Also the

Based on
https://github.com/openwrt/openwrt/commit/7a8d3432c739c6ff038295176e8b6324e92fc116
I had the impression that DEVICE_DTS and DEVICE_DTS_DIR are reserved keywords for a particular mechanism to append DTB.

Thus, and since the target has been using "custom" SUNXI_DTS variable so far, I decided to stick to that pattern.

> SUNXI_SOC feels bit redundant since it needs to be specified for each device
> and it could be replaced with DEVICE_DTS := sun50i-h5-$(1) or simply full dts
> name.

No, because I need to cut down the device name, so it would be
DEVICE_DTS := sun50i-h5-$(lastword $(subst _, ,$(1)))
which I would not like to repeat over and over.

I admit that changing the DTS variable is the weakest part in my patchset. However, I think introducing the SUNXI_SOC and SUNXI_DTS_DIR will make the target more organized. Despite, by this it becomes more consistent with other targets where this has been reorganized recently (i.e. ath79 and ramips, where we use ATH_SOC and MTK_SOC to do the very same).
At least I personally think that this is better that repeating the very same name again in the DTS definition.

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191211/213d745f/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Wed Dec 11 06:03:53 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Wed, 11 Dec 2019 14:03:53 +0300
Subject: [OpenWrt-Devel] [RFC][PATCH] base-files: send informational UDP
 message each second waiting
In-Reply-To: <20191210144213.GH71465@meh.true.cz>
References: <20191210142420.30748-1-fercerpav@gmail.com>
 <20191210144213.GH71465@meh.true.cz>
Message-ID: <20191211110352.GL11070@home.paul.comp>

Hi,

On Tue, Dec 10, 2019 at 03:42:13PM +0100, Petr ?tetiar wrote:
> Paul Fertser <fercerpav at gmail.com> [2019-12-10 17:24:20]:
> > in cases when the interface is brought up faster it leads to two messages
> 
> in cases when the interface is brought up slower it leads to no message.
> 
> To me it just seems like a workaround to fix your use case, not a proper fix.

You're right, I mentioned "inherently racy" in the commit message
exactly because of that.

Waiting for LOWER_UP there without a timeout is not a solution because
in the normal bootup case there might be nothing attached to the LAN
so the boot will be effectively halted forever. Waiting with a timeout
poses a question of what that timeout should be set to; and if that's
reasonable to extend current 2 seconds with any significant amount.

Current documentation says a message should be sent. Current code
works for some devices and fails for other devices. My patch improves
the situation without adding any code complexity (indeed, it's even
removing one line) or wasting boot time.

Do you have any other possible solution in mind?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Wed Dec 11 06:10:12 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Wed, 11 Dec 2019 14:10:12 +0300
Subject: [OpenWrt-Devel] [PATCH] ath79: add D-Link DIR-615 rev. E4
In-Reply-To: <a30b30c9-d8e2-bd70-cec3-9aaced800a84@gmail.com>
References: <20191103113247.9782-1-fercerpav@gmail.com>
 <002b01d594f1$ebb56320$c3202960$@gmx.de>
 <20191107051927.GT1190@home.paul.comp>
 <20191108075039.GU1190@home.paul.comp>
 <a30b30c9-d8e2-bd70-cec3-9aaced800a84@gmail.com>
Message-ID: <20191211111012.GA10759@home.paul.comp>

Hello Lars,

On Fri, Nov 08, 2019 at 03:12:02PM +0700, Lars Melin wrote:
> On 11/8/2019 14:50, Paul Fertser wrote:
> >  From working with uIP before on an embedded target I know that it
> > doesn't support delayed ACKs in any form, for any packet it sends it
> > waits for an ACK before sending the next, and I would guess that for
> > any packet it receives it's better to wait for its ACK before sending
> > the next (as I see plenty of duplicated ACKs from this backup server
> > all confirming just the first packet received, and then long wait
> > before retransmission). The problem is in the number of packets sent,
> > not the size (so changing MTU/MSS doesn't help much).
> > 
> > I haven't been able to find a way to trick it into behaving, sorry.
> > 
> 
> Don't complicate simple things, all D-Link routers have a recovery web page
> and you access it with your browser, not with curl.

You quoted my message and it doesn't contradict "having a recovery web
page" idea. However, it clearly says that I can't meaningfully use it
_anyhow_, neither with curl nor with my browser. Please reread the
quote and you'll see it is not simple. Do you want me to send you a
PCAP file as a proof?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ynezz at true.cz  Wed Dec 11 06:47:22 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Wed, 11 Dec 2019 12:47:22 +0100
Subject: [OpenWrt-Devel] [RFC][PATCH] base-files: send informational UDP
 message each second waiting
In-Reply-To: <20191211110352.GL11070@home.paul.comp>
References: <20191210142420.30748-1-fercerpav@gmail.com>
 <20191210144213.GH71465@meh.true.cz>
 <20191211110352.GL11070@home.paul.comp>
Message-ID: <20191211114722.GA11343@meh.true.cz>

Paul Fertser <fercerpav at gmail.com> [2019-12-11 14:03:53]:

> Waiting with a timeout poses a question of what that timeout should be set
> to; and if that's reasonable to extend current 2 seconds with any
> significant amount.

As you've witnessed this default value doesn't work well in some cases.

> Current documentation says a message should be sent.

So now, this would need to be rephrased from current 0 or 1, to 0 to N, where
N depends on config settings (timeout value).

> Do you have any other possible solution in mind?

(nope, just thinking aloud)

If the fixed value doesn't work for all use cases, then its not fixed variable
anymore and should be variable, thus config option, probably finetuned per
target/device.

Question is, if it's worth the hassle for a feature which is targeted more
towards the expert users.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Wed Dec 11 06:56:59 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Wed, 11 Dec 2019 14:56:59 +0300
Subject: [OpenWrt-Devel] [RFC][PATCH] base-files: send informational UDP
 message each second waiting
In-Reply-To: <20191211114722.GA11343@meh.true.cz>
References: <20191210142420.30748-1-fercerpav@gmail.com>
 <20191210144213.GH71465@meh.true.cz>
 <20191211110352.GL11070@home.paul.comp>
 <20191211114722.GA11343@meh.true.cz>
Message-ID: <20191211115659.GM11070@home.paul.comp>

On Wed, Dec 11, 2019 at 12:47:22PM +0100, Petr ?tetiar wrote:
> Paul Fertser <fercerpav at gmail.com> [2019-12-11 14:03:53]:
> > Waiting with a timeout poses a question of what that timeout should be set
> > to; and if that's reasonable to extend current 2 seconds with any
> > significant amount.
> 
> As you've witnessed this default value doesn't work well in some cases.

The problem I faced was because the message is sent only once _before_
timeout starts ticking, so no matter what it's set to, the message
wouldn't be there.

> > Current documentation says a message should be sent.
> 
> So now, this would need to be rephrased from current 0 or 1, to 0 to N, where
> N depends on config settings (timeout value).

Documentation [0] says "Wait (with a packet sniffer) for a special
broadcast packet and press a button". So I think with this patch
documentation changes are not strictly necessary, it still works the
same way, you wait for the packet and press a button.

> > Do you have any other possible solution in mind?
> 
> (nope, just thinking aloud)
> 
> If the fixed value doesn't work for all use cases, then its not fixed variable
> anymore and should be variable, thus config option, probably finetuned per
> target/device.

Currently all devices wait for 2 seconds during normal bootup no
matter what. Without my patch any value for that timeout wouldn't help
with the UDP message.

[0] https://openwrt.org/docs/guide-user/troubleshooting/failsafe_and_factory_reset

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jo at mein.io  Wed Dec 11 06:57:50 2019
From: jo at mein.io (Jo-Philipp Wich)
Date: Wed, 11 Dec 2019 12:57:50 +0100
Subject: [OpenWrt-Devel] [RFC][PATCH] base-files: send informational UDP
 message each second waiting
In-Reply-To: <20191211114722.GA11343@meh.true.cz>
References: <20191210142420.30748-1-fercerpav@gmail.com>
 <20191210144213.GH71465@meh.true.cz> <20191211110352.GL11070@home.paul.comp>
 <20191211114722.GA11343@meh.true.cz>
Message-ID: <fac99d76-8929-e68d-0eb8-7e5a525f1988@mein.io>

Hi,

> Question is, if it's worth the hassle for a feature which is targeted more
> towards the expert users.

from my pov - it is not worth overengineering this feature. The proposed
patch is more than adequate. It increases the probability of the message
getting delivered without additional code complexity.

~ Jo

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at aparcar.org  Wed Dec 11 07:15:47 2019
From: mail at aparcar.org (Paul Spooren)
Date: Wed, 11 Dec 2019 02:15:47 -1000
Subject: [OpenWrt-Devel] [PATCH v4] This separates the options for signature
 creation and verification
Message-ID: <20191211121547.430267-1-mail@aparcar.org>

* SIGNED_PACKAGES create Packages.sig
* SIGNED_IMAGES add ucert signature to created images
* CHECK_SIGNATURE add verification capabilities to images
* INSTALL_LOCAL_KEY add local key-build to /etc/opkg/keys

Right now the buildbot.git contains some hacks to create images that
have signature verification capabilities while not storing private keys
on buildbot slaves. This commit allows to disable these steps for the
buildbots and only perform signing on the master.

Signed-off-by: Paul Spooren <mail at aparcar.org>
---
v4: replace ifdef with ifneq - Makefile magic
-ifdef CONFIG_SIGNED_PACKAGES
+ifneq ($(CONFIG_SIGNED_PACKAGES),)

 config/Config-build.in      | 12 ++++++++++--
 include/image-commands.mk   | 13 ++++++++-----
 package/base-files/Makefile | 20 +++++++++++---------
 3 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/config/Config-build.in b/config/Config-build.in
index 872e5c12ab..af5de42ac6 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -37,13 +37,21 @@ menu "Global build settings"
 		  - Enabling per-device rootfs support
 		  ...
 
+	config INSTALL_LOCAL_KEY
+		bool "Install local usign key into image"
+		default y if !BUILDBOT
+
 	config SIGNED_PACKAGES
 		bool "Cryptographically signed package lists"
-		default y
+		default y if !BUILDBOT
+
+	config SIGNED_IMAGES
+		bool "Cryptographically signed firmware images"
+		default y if !BUILDBOT
 
 	config SIGNATURE_CHECK
 		bool "Enable signature checking in opkg"
-		default SIGNED_PACKAGES
+		default y
 
 	comment "General build options"
 
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 5dfd6a2c2f..3d10b18bc8 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -373,11 +373,14 @@ metadata_json = \
 
 define Build/append-metadata
 	$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json,$(SUPPORTED_DEVICES)) | fwtool -I - $@)
-	[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \
-		cp "$(BUILD_KEY).ucert" "$@.ucert" ;\
-		usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\
-		ucert -A -c "$@.ucert" -x "$@.sig" ;\
-		fwtool -S "$@.ucert" "$@" ;\
+	[ -z "$(SIGNED_IMAGES)" \
+		-o ! -s "$(BUILD_KEY)" \
+		-o ! -s "$(BUILD_KEY).ucert" \
+		-o ! -s "$@" ] || { \
+			cp "$(BUILD_KEY).ucert" "$@.ucert" ;\
+			usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\
+			ucert -A -c "$@.ucert" -x "$@.sig" ;\
+			fwtool -S "$@.ucert" "$@" ;\
 	}
 endef
 
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index cf5166772d..e95a155124 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -37,7 +37,7 @@ endif
 define Package/base-files
   SECTION:=base
   CATEGORY:=Base system
-  DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:openwrt-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool
+  DEPENDS:=+netifd +libc +procd +jsonfilter +SIGNATURE_CHECK:usign +SIGNATURE_CHECK:openwrt-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool
   TITLE:=Base filesystem for OpenWrt
   URL:=http://openwrt.org/
   VERSION:=$(PKG_RELEASE)-$(REVISION)
@@ -107,7 +107,7 @@ define Build/Compile/Default
 endef
 Build/Compile = $(Build/Compile/Default)
 
-ifdef CONFIG_SIGNED_PACKAGES
+ifneq ($(CONFIG_SIGNED_PACKAGES),)
   define Build/Configure
 	[ -s $(BUILD_KEY) -a -s $(BUILD_KEY).pub ] || \
 		$(STAGING_DIR_HOST)/bin/usign -G -s $(BUILD_KEY) -p $(BUILD_KEY).pub -c "Local build key"
@@ -116,12 +116,6 @@ ifdef CONFIG_SIGNED_PACKAGES
 		$(STAGING_DIR_HOST)/bin/ucert -I -c $(BUILD_KEY).ucert -p $(BUILD_KEY).pub -s $(BUILD_KEY)
 
   endef
-
-  define Package/base-files/install-key
-	mkdir -p $(1)/etc/opkg/keys
-	$(CP) $(BUILD_KEY).pub $(1)/etc/opkg/keys/`$(STAGING_DIR_HOST)/bin/usign -F -p $(BUILD_KEY).pub`
-
-  endef
 endif
 
 ifeq ($(CONFIG_NAND_SUPPORT),)
@@ -130,9 +124,17 @@ ifeq ($(CONFIG_NAND_SUPPORT),)
   endef
 endif
 
+ifneq ($(CONFIG_INSTALL_LOCAL_KEY),)
+  define Package/base-files/install-local-key
+	mkdir -p $(1)/etc/opkg/keys
+	$(CP) $(BUILD_KEY).pub $(1)/etc/opkg/keys/`$(STAGING_DIR_HOST)/bin/usign \
+		-F -p $(BUILD_KEY).pub`
+  endef
+endif
+
 define Package/base-files/install
 	$(CP) ./files/* $(1)/
-	$(Package/base-files/install-key)
+	$(Package/base-files/install-local-key)
 	$(Package/base-files/nand-support)
 	if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \
 		$(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Wed Dec 11 09:22:09 2019
From: daniel at makrotopia.org (Daniel Golle)
Date: Wed, 11 Dec 2019 15:22:09 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
 <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
Message-ID: <20191211142209.GC1371@makrotopia.org>

Hi Tomislav,

On Wed, Dec 11, 2019 at 11:24:21AM +0100, Tom Psyborg wrote:
> suck it

As a community, we decided to give our self a set of minimal rules[1].
And even though it is in the last position, rule #12 "Be nice to each
other." is meant just as serious as all the other rules.

So here, not for the first time, you are using language which has the
only purpose to hurt other people (for which reason ever, it doesn't
matter). This is therefore a very clear violation to the above
mentioned rule. You statement "suck it" (guess what) is also an obvious
and disgusting example of a masculist culture which hurts our community
as a whole and I strongly believe we should not tolerate that.

And yes this was a spam mail. And it's even needless to say that
replying to a spam email in which ever way will always make it worse.
But that's not the point here and I will not engage in any discussion
on that matter.

Please learn to behave or leave us alone.

[1]: https://openwrt.org/rules


> 
> On 11/12/2019, rqgxfc <rqgxfc at vip.163.com> wrote:
> >
> >
> > Hello Sir ?
> >
> > We are  a trading company named Shaanxi Hao Zi Guan Materials Co.,Ltd  . Now
> > we are very interested in your products , we will plan to  sell your
> > products in the Chinese market . If you are interested in cooperation,
> > please send us a catalog and pricelist .w
> > Looking forward to receiving your reply .
> >
> > Best regards,
> > Catherina
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From john at phrozen.org  Wed Dec 11 09:33:38 2019
From: john at phrozen.org (John Crispin)
Date: Wed, 11 Dec 2019 15:33:38 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <20191211142209.GC1371@makrotopia.org>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
 <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
 <20191211142209.GC1371@makrotopia.org>
Message-ID: <72795206-d999-c459-4fa6-ae09df4e92f7@phrozen.org>

On 11/12/2019 15:22, Daniel Golle wrote:
> As a community, we decided to give our self a set of minimal rules[1].
> And even though it is in the last position, rule #12 "Be nice to each
> other." is meant just as serious as all the other rules.
> 
> So here, not for the first time, you are using language which has the
> only purpose to hurt other people (for which reason ever, it doesn't
> matter). This is therefore a very clear violation to the above
> mentioned rule. You statement "suck it" (guess what) is also an obvious
> and disgusting example of a masculist culture which hurts our community
> as a whole and I strongly believe we should not tolerate that.
> 
> And yes this was a spam mail. And it's even needless to say that
> replying to a spam email in which ever way will always make it worse.
> But that's not the point here and I will not engage in any discussion
> on that matter.
> 
> Please learn to behave or leave us alone.
> 
> [1]:https://openwrt.org/rules

+1

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Wed Dec 11 09:44:59 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Wed, 11 Dec 2019 17:44:59 +0300
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build variant
 for small RAM devices
In-Reply-To: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
Message-ID: <20191211144459.13235-1-fercerpav@gmail.com>

According to many bugreports [0][1][2] the default ath10k-ct kernel
module is unusable on devices with just 64 MiB RAM or with 128 MiB and
dual ath10k cards. The target boards boot but eventually oom-killer
starts to interfere with normal operation, so the current state is
effectively broken.

Since the two patches in question might have a performance impact (and
possibly some other unexpected side-effects) a dedicated build variant
is added so that users of the low RAM devices can still benefit from all
the ath10k-ct advantages.

[0] http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020573.html
[1] https://github.com/openwrt/openwrt/pull/1077
[2] https://bugs.openwrt.org/index.php?do=details&task_id=2664

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
 package/kernel/ath10k-ct/Makefile             | 30 +++++++-
 ...0-0010-ath10k-limit-htt-rx-ring-size.patch | 22 ++++++
 ...60-0011-ath10k-limit-pci-buffer-size.patch | 76 +++++++++++++++++++
 3 files changed, 127 insertions(+), 1 deletion(-)
 create mode 100644 package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch
 create mode 100644 package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch

diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index dbf75fe174..d5726a1c88 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -35,6 +35,7 @@ define KernelPackage/ath10k-ct
 	$(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
   AUTOLOAD:=$(call AutoProbe,ath10k_pci)
   PROVIDES:=kmod-ath10k
+  VARIANT:=regular
 endef
 
 define KernelPackage/ath10k-ct/config
@@ -42,7 +43,17 @@ define KernelPackage/ath10k-ct/config
        config ATH10K-CT_LEDS
                bool "Enable LED support"
                default y
-               depends on PACKAGE_kmod-ath10k-ct
+               depends on PACKAGE_kmod-ath10k-ct || PACKAGE_kmod-ath10k-ct-smallbuffers
+endef
+
+define KernelPackage/ath10k-ct-smallbuffers
+$(call KernelPackage/ath10k-ct)
+  TITLE+= (small buffers to work on low-RAM devices)
+  VARIANT:=smallbuffers
+endef
+
+define KernelPackage/ath10k-ct-smallbuffers/config
+$(call KernelPackage/ath10k-ct/config)
 endef
 
 NOSTDINC_FLAGS = \
@@ -90,6 +101,22 @@ ifeq ($(CONFIG_ATH10K-CT_LEDS),y)
   NOSTDINC_FLAGS += -DCONFIG_ATH10K_LEDS
 endif
 
+define Build/Patch
+	$(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches)
+	$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR),)
+ifeq ($(BUILD_VARIANT),smallbuffers)
+	$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)-smallbuffers,patches-smallbuffers)
+endif
+	$(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
+endef
+
+define Quilt/Refresh/Package
+	$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR),)
+ifeq ($(BUILD_VARIANT),smallbuffers)
+	$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)-smallbuffers,patches-smallbuffers)
+endif
+endef
+
 define Build/Configure
 	cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
 endef
@@ -107,3 +134,4 @@ define Build/Compile
 endef
 
 $(eval $(call KernelPackage,ath10k-ct))
+$(eval $(call KernelPackage,ath10k-ct-smallbuffers))
diff --git a/package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch b/package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch
new file mode 100644
index 0000000000..f73b02e5ef
--- /dev/null
+++ b/package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch
@@ -0,0 +1,22 @@
+--- a/ath10k-4.19/htt.h
++++ b/ath10k-4.19/htt.h
+@@ -226,7 +226,7 @@ enum htt_rx_ring_flags {
+ };
+ 
+ #define HTT_RX_RING_SIZE_MIN 128
+-#define HTT_RX_RING_SIZE_MAX 2048
++#define HTT_RX_RING_SIZE_MAX 512
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
+--- a/ath10k-5.2/htt.h
++++ b/ath10k-5.2/htt.h
+@@ -226,7 +226,7 @@ enum htt_rx_ring_flags {
+ };
+ 
+ #define HTT_RX_RING_SIZE_MIN 128
+-#define HTT_RX_RING_SIZE_MAX 2048
++#define HTT_RX_RING_SIZE_MAX 512
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
diff --git a/package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch b/package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch
new file mode 100644
index 0000000000..27c0032bfb
--- /dev/null
+++ b/package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch
@@ -0,0 +1,76 @@
+--- a/ath10k-4.19/pci.c
++++ b/ath10k-4.19/pci.c
+@@ -131,7 +131,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 512,
++		.dest_nentries = 128,
+ 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
+ 	},
+ 
+@@ -140,7 +140,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 128,
++		.dest_nentries = 64,
+ 		.recv_cb = ath10k_pci_htc_rx_cb,
+ 	},
+ 
+@@ -167,7 +167,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 512,
+-		.dest_nentries = 512,
++		.dest_nentries = 128,
+ 		.recv_cb = ath10k_pci_htt_rx_cb,
+ 	},
+ 
+@@ -192,7 +192,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 128,
++		.dest_nentries = 96,
+ 		.recv_cb = ath10k_pci_pktlog_rx_cb,
+ 	},
+ 
+--- a/ath10k-5.2/pci.c
++++ b/ath10k-5.2/pci.c
+@@ -131,7 +131,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 512,
++		.dest_nentries = 128,
+ 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
+ 	},
+ 
+@@ -140,7 +140,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 128,
++		.dest_nentries = 64,
+ 		.recv_cb = ath10k_pci_htc_rx_cb,
+ 	},
+ 
+@@ -167,7 +167,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 512,
+-		.dest_nentries = 512,
++		.dest_nentries = 128,
+ 		.recv_cb = ath10k_pci_htt_rx_cb,
+ 	},
+ 
+@@ -192,7 +192,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 128,
++		.dest_nentries = 96,
+ 		.recv_cb = ath10k_pci_pktlog_rx_cb,
+ 	},
+ 
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Wed Dec 11 09:54:58 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Wed, 11 Dec 2019 17:54:58 +0300
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <20191211144459.13235-1-fercerpav@gmail.com>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <20191211144459.13235-1-fercerpav@gmail.com>
Message-ID: <20191211145458.GN11070@home.paul.comp>

On Wed, Dec 11, 2019 at 05:44:59PM +0300, Paul Fertser wrote:
> +define Build/Patch
> +	$(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches)
> +	$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR),)
> +ifeq ($(BUILD_VARIANT),smallbuffers)
> +	$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)-smallbuffers,patches-smallbuffers)
> +endif
> +	$(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
> +endef

This is not correctly creating the patches-smallbuffers directory,
I'll fix it for v2 along with other review points (if this approach is
considered worthy at all).

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From pepe2k at gmail.com  Wed Dec 11 10:25:08 2019
From: pepe2k at gmail.com (Piotr Dymacz)
Date: Wed, 11 Dec 2019 16:25:08 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <20191211142209.GC1371@makrotopia.org>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
 <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
 <20191211142209.GC1371@makrotopia.org>
Message-ID: <bb246fdf-6cba-23e1-ae47-0df3ac5ca3fd@gmail.com>

On 11.12.2019 15:22, Daniel Golle wrote:

> As a community, we decided to give our self a set of minimal rules[1].
> And even though it is in the last position, rule #12 "Be nice to each
> other." is meant just as serious as all the other rules.
> 
> So here, not for the first time, you are using language which has the
> only purpose to hurt other people (for which reason ever, it doesn't
> matter). This is therefore a very clear violation to the above
> mentioned rule. You statement "suck it" (guess what) is also an obvious
> and disgusting example of a masculist culture which hurts our community
> as a whole and I strongly believe we should not tolerate that.
> 
> And yes this was a spam mail. And it's even needless to say that
> replying to a spam email in which ever way will always make it worse.
> But that's not the point here and I will not engage in any discussion
> on that matter.
> 
> Please learn to behave or leave us alone.
> 
> [1]: https://openwrt.org/rules

+1

-- 
Cheers,
Piotr

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ynezz at true.cz  Wed Dec 11 11:12:52 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Wed, 11 Dec 2019 17:12:52 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <20191211142209.GC1371@makrotopia.org>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
 <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
 <20191211142209.GC1371@makrotopia.org>
Message-ID: <20191211161252.GC11343@meh.true.cz>

> Please learn to behave or leave us alone.

+2

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From wrt_burner at mail.com  Wed Dec 11 11:37:26 2019
From: wrt_burner at mail.com (WRT Burner)
Date: Wed, 11 Dec 2019 17:37:26 +0100
Subject: [OpenWrt-Devel] Inquery
Message-ID: <trinity-108cc2ee-b593-4dec-a1d9-77c447ee9eed-1576082246699@3c-app-mailcom-lxa07>

On 11/12/2019 15:22, Daniel Golle wrote:
> And it's even needless to say that
> replying to a spam email in which ever way will always make it worse.

+1. There is no constructive value in replying to spam. Let's keep openwrt-devel
nice and clean.

On 11/12/2019 15:22, Daniel Golle wrote:
> You statement "suck it" (guess what) is also an obvious
> and disgusting example of a masculist culture which hurts our community
> as a whole and I strongly believe we should not tolerate that.

-1. This is a software development mailing list, not tumblr.com.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From jonas.gorski at gmail.com  Wed Dec 11 11:40:43 2019
From: jonas.gorski at gmail.com (Jonas Gorski)
Date: Wed, 11 Dec 2019 17:40:43 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <20191211142209.GC1371@makrotopia.org>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
 <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
 <20191211142209.GC1371@makrotopia.org>
Message-ID: <CAOiHx=n2+mC-K1xiLHrso-Co1rUxMZR6ay9LvMr091=ONs2qzQ@mail.gmail.com>

On Wed, 11 Dec 2019 at 15:22, Daniel Golle <daniel at makrotopia.org> wrote:
> As a community, we decided to give our self a set of minimal rules[1].
> And even though it is in the last position, rule #12 "Be nice to each
> other." is meant just as serious as all the other rules.
>
> So here, not for the first time, you are using language which has the
> only purpose to hurt other people (for which reason ever, it doesn't
> matter). This is therefore a very clear violation to the above
> mentioned rule. You statement "suck it" (guess what) is also an obvious
> and disgusting example of a masculist culture which hurts our community
> as a whole and I strongly believe we should not tolerate that.
>
> And yes this was a spam mail. And it's even needless to say that
> replying to a spam email in which ever way will always make it worse.
> But that's not the point here and I will not engage in any discussion
> on that matter.
>
> Please learn to behave or leave us alone.

+1

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dedeckeh at gmail.com  Wed Dec 11 12:52:40 2019
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Wed, 11 Dec 2019 18:52:40 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <20191211142209.GC1371@makrotopia.org>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
 <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
 <20191211142209.GC1371@makrotopia.org>
Message-ID: <CAJLcKsFZVMBq_5zgHe_OEXH73Mp403CnPB+NUFLmMqX_RKpBkA@mail.gmail.com>

On Wed, Dec 11, 2019 at 3:22 PM Daniel Golle <daniel at makrotopia.org> wrote:
>
> Hi Tomislav,
>
> On Wed, Dec 11, 2019 at 11:24:21AM +0100, Tom Psyborg wrote:
> > suck it
>
> As a community, we decided to give our self a set of minimal rules[1].
> And even though it is in the last position, rule #12 "Be nice to each
> other." is meant just as serious as all the other rules.
>
> So here, not for the first time, you are using language which has the
> only purpose to hurt other people (for which reason ever, it doesn't
> matter). This is therefore a very clear violation to the above
> mentioned rule. You statement "suck it" (guess what) is also an obvious
> and disgusting example of a masculist culture which hurts our community
> as a whole and I strongly believe we should not tolerate that.
>
> And yes this was a spam mail. And it's even needless to say that
> replying to a spam email in which ever way will always make it worse.
> But that's not the point here and I will not engage in any discussion
> on that matter.
>
> Please learn to behave or leave us alone.
>
> [1]: https://openwrt.org/rules

+1


>
>
> >
> > On 11/12/2019, rqgxfc <rqgxfc at vip.163.com> wrote:
> > >
> > >
> > > Hello Sir ?
> > >
> > > We are  a trading company named Shaanxi Hao Zi Guan Materials Co.,Ltd  . Now
> > > we are very interested in your products , we will plan to  sell your
> > > products in the Chinese market . If you are interested in cooperation,
> > > please send us a catalog and pricelist .w
> > > Looking forward to receiving your reply .
> > >
> > > Best regards,
> > > Catherina
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Wed Dec 11 12:54:32 2019
From: daniel at makrotopia.org (Daniel Golle)
Date: Wed, 11 Dec 2019 19:54:32 +0200
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <trinity-108cc2ee-b593-4dec-a1d9-77c447ee9eed-1576082246699@3c-app-mailcom-lxa07>
References: <trinity-108cc2ee-b593-4dec-a1d9-77c447ee9eed-1576082246699@3c-app-mailcom-lxa07>
Message-ID: <20191211175432.GI1371@makrotopia.org>

On Wed, Dec 11, 2019 at 05:37:26PM +0100, WRT Burner wrote:
> On 11/12/2019 15:22, Daniel Golle wrote:
> > And it's even needless to say that
> > replying to a spam email in which ever way will always make it worse.
> 
> +1. There is no constructive value in replying to spam. Let's keep openwrt-devel
> nice and clean.
> 
> On 11/12/2019 15:22, Daniel Golle wrote:
> > You statement "suck it" (guess what) is also an obvious
> > and disgusting example of a masculist culture which hurts our community
> > as a whole and I strongly believe we should not tolerate that.
> 
> -1. This is a software development mailing list, not tumblr.com.

'-1'? So I get right, you are saying it's ok to be insulting other
people because this mailing list is about software development?
If that's really what you wanted to say, I'm glad that's only a single
individual opinion coming from an email address which has never
actually been used on this mailing list.
And btw, this is your first 'contribution', and it's not even about
software development...

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From greearb at candelatech.com  Wed Dec 11 13:06:26 2019
From: greearb at candelatech.com (Ben Greear)
Date: Wed, 11 Dec 2019 10:06:26 -0800
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <20191211144459.13235-1-fercerpav@gmail.com>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <20191211144459.13235-1-fercerpav@gmail.com>
Message-ID: <d938b7ab-80b0-c78a-5a84-435243dff86d@candelatech.com>

On 12/11/19 6:44 AM, Paul Fertser wrote:
> According to many bugreports [0][1][2] the default ath10k-ct kernel
> module is unusable on devices with just 64 MiB RAM or with 128 MiB and
> dual ath10k cards. The target boards boot but eventually oom-killer
> starts to interfere with normal operation, so the current state is
> effectively broken.
> 
> Since the two patches in question might have a performance impact (and
> possibly some other unexpected side-effects) a dedicated build variant
> is added so that users of the low RAM devices can still benefit from all
> the ath10k-ct advantages.
> 
> [0] http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020573.html
> [1] https://github.com/openwrt/openwrt/pull/1077
> [2] https://bugs.openwrt.org/index.php?do=details&task_id=2664

I am fine with this approach.

And also if you want to just have the makefile pass a -DBUILD_ATH10K_SMALL or something
like that and #ifdef code in the ath10k-ct driver, then I'd apply that patch to ath10k-ct
so that you don't need the patches.

Thanks,
Ben

> 
> Signed-off-by: Paul Fertser <fercerpav at gmail.com>
> ---
>   package/kernel/ath10k-ct/Makefile             | 30 +++++++-
>   ...0-0010-ath10k-limit-htt-rx-ring-size.patch | 22 ++++++
>   ...60-0011-ath10k-limit-pci-buffer-size.patch | 76 +++++++++++++++++++
>   3 files changed, 127 insertions(+), 1 deletion(-)
>   create mode 100644 package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch
>   create mode 100644 package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch
> 
> diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
> index dbf75fe174..d5726a1c88 100644
> --- a/package/kernel/ath10k-ct/Makefile
> +++ b/package/kernel/ath10k-ct/Makefile
> @@ -35,6 +35,7 @@ define KernelPackage/ath10k-ct
>   	$(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
>     AUTOLOAD:=$(call AutoProbe,ath10k_pci)
>     PROVIDES:=kmod-ath10k
> +  VARIANT:=regular
>   endef
>   
>   define KernelPackage/ath10k-ct/config
> @@ -42,7 +43,17 @@ define KernelPackage/ath10k-ct/config
>          config ATH10K-CT_LEDS
>                  bool "Enable LED support"
>                  default y
> -               depends on PACKAGE_kmod-ath10k-ct
> +               depends on PACKAGE_kmod-ath10k-ct || PACKAGE_kmod-ath10k-ct-smallbuffers
> +endef
> +
> +define KernelPackage/ath10k-ct-smallbuffers
> +$(call KernelPackage/ath10k-ct)
> +  TITLE+= (small buffers to work on low-RAM devices)
> +  VARIANT:=smallbuffers
> +endef
> +
> +define KernelPackage/ath10k-ct-smallbuffers/config
> +$(call KernelPackage/ath10k-ct/config)
>   endef
>   
>   NOSTDINC_FLAGS = \
> @@ -90,6 +101,22 @@ ifeq ($(CONFIG_ATH10K-CT_LEDS),y)
>     NOSTDINC_FLAGS += -DCONFIG_ATH10K_LEDS
>   endif
>   
> +define Build/Patch
> +	$(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches)
> +	$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR),)
> +ifeq ($(BUILD_VARIANT),smallbuffers)
> +	$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)-smallbuffers,patches-smallbuffers)
> +endif
> +	$(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
> +endef
> +
> +define Quilt/Refresh/Package
> +	$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR),)
> +ifeq ($(BUILD_VARIANT),smallbuffers)
> +	$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)-smallbuffers,patches-smallbuffers)
> +endif
> +endef
> +
>   define Build/Configure
>   	cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
>   endef
> @@ -107,3 +134,4 @@ define Build/Compile
>   endef
>   
>   $(eval $(call KernelPackage,ath10k-ct))
> +$(eval $(call KernelPackage,ath10k-ct-smallbuffers))
> diff --git a/package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch b/package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch
> new file mode 100644
> index 0000000000..f73b02e5ef
> --- /dev/null
> +++ b/package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch
> @@ -0,0 +1,22 @@
> +--- a/ath10k-4.19/htt.h
> ++++ b/ath10k-4.19/htt.h
> +@@ -226,7 +226,7 @@ enum htt_rx_ring_flags {
> + };
> +
> + #define HTT_RX_RING_SIZE_MIN 128
> +-#define HTT_RX_RING_SIZE_MAX 2048
> ++#define HTT_RX_RING_SIZE_MAX 512
> + #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
> + #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
> + #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
> +--- a/ath10k-5.2/htt.h
> ++++ b/ath10k-5.2/htt.h
> +@@ -226,7 +226,7 @@ enum htt_rx_ring_flags {
> + };
> +
> + #define HTT_RX_RING_SIZE_MIN 128
> +-#define HTT_RX_RING_SIZE_MAX 2048
> ++#define HTT_RX_RING_SIZE_MAX 512
> + #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
> + #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
> + #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
> diff --git a/package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch b/package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch
> new file mode 100644
> index 0000000000..27c0032bfb
> --- /dev/null
> +++ b/package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch
> @@ -0,0 +1,76 @@
> +--- a/ath10k-4.19/pci.c
> ++++ b/ath10k-4.19/pci.c
> +@@ -131,7 +131,7 @@ static struct ce_attr host_ce_config_wla
> + 		.flags = CE_ATTR_FLAGS,
> + 		.src_nentries = 0,
> + 		.src_sz_max = 2048,
> +-		.dest_nentries = 512,
> ++		.dest_nentries = 128,
> + 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
> + 	},
> +
> +@@ -140,7 +140,7 @@ static struct ce_attr host_ce_config_wla
> + 		.flags = CE_ATTR_FLAGS,
> + 		.src_nentries = 0,
> + 		.src_sz_max = 2048,
> +-		.dest_nentries = 128,
> ++		.dest_nentries = 64,
> + 		.recv_cb = ath10k_pci_htc_rx_cb,
> + 	},
> +
> +@@ -167,7 +167,7 @@ static struct ce_attr host_ce_config_wla
> + 		.flags = CE_ATTR_FLAGS,
> + 		.src_nentries = 0,
> + 		.src_sz_max = 512,
> +-		.dest_nentries = 512,
> ++		.dest_nentries = 128,
> + 		.recv_cb = ath10k_pci_htt_rx_cb,
> + 	},
> +
> +@@ -192,7 +192,7 @@ static struct ce_attr host_ce_config_wla
> + 		.flags = CE_ATTR_FLAGS,
> + 		.src_nentries = 0,
> + 		.src_sz_max = 2048,
> +-		.dest_nentries = 128,
> ++		.dest_nentries = 96,
> + 		.recv_cb = ath10k_pci_pktlog_rx_cb,
> + 	},
> +
> +--- a/ath10k-5.2/pci.c
> ++++ b/ath10k-5.2/pci.c
> +@@ -131,7 +131,7 @@ static struct ce_attr host_ce_config_wla
> + 		.flags = CE_ATTR_FLAGS,
> + 		.src_nentries = 0,
> + 		.src_sz_max = 2048,
> +-		.dest_nentries = 512,
> ++		.dest_nentries = 128,
> + 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
> + 	},
> +
> +@@ -140,7 +140,7 @@ static struct ce_attr host_ce_config_wla
> + 		.flags = CE_ATTR_FLAGS,
> + 		.src_nentries = 0,
> + 		.src_sz_max = 2048,
> +-		.dest_nentries = 128,
> ++		.dest_nentries = 64,
> + 		.recv_cb = ath10k_pci_htc_rx_cb,
> + 	},
> +
> +@@ -167,7 +167,7 @@ static struct ce_attr host_ce_config_wla
> + 		.flags = CE_ATTR_FLAGS,
> + 		.src_nentries = 0,
> + 		.src_sz_max = 512,
> +-		.dest_nentries = 512,
> ++		.dest_nentries = 128,
> + 		.recv_cb = ath10k_pci_htt_rx_cb,
> + 	},
> +
> +@@ -192,7 +192,7 @@ static struct ce_attr host_ce_config_wla
> + 		.flags = CE_ATTR_FLAGS,
> + 		.src_nentries = 0,
> + 		.src_sz_max = 2048,
> +-		.dest_nentries = 128,
> ++		.dest_nentries = 96,
> + 		.recv_cb = ath10k_pci_pktlog_rx_cb,
> + 	},
> +
> 


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Wed Dec 11 14:16:52 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Wed, 11 Dec 2019 22:16:52 +0300
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <d938b7ab-80b0-c78a-5a84-435243dff86d@candelatech.com>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <20191211144459.13235-1-fercerpav@gmail.com>
 <d938b7ab-80b0-c78a-5a84-435243dff86d@candelatech.com>
Message-ID: <20191211191652.GU11070@home.paul.comp>

Hey Ben,

On Wed, Dec 11, 2019 at 10:06:26AM -0800, Ben Greear wrote:
> On 12/11/19 6:44 AM, Paul Fertser wrote:
> > According to many bugreports [0][1][2] the default ath10k-ct kernel
...
> And also if you want to just have the makefile pass a -DBUILD_ATH10K_SMALL or something
> like that and #ifdef code in the ath10k-ct driver, then I'd apply that patch to ath10k-ct
> so that you don't need the patches.

I am offering my patch to the OpenWrt maintainers as kind of a
stop-gap measure to get ath10k-ct working for the release (or in any
way they think is appropriate). Another approach they can choose is to
select the upstream ath10k for those devices. Otherwise some
previously supported boards will require manual intervention to get
WiFi working after an upgrade.

Regarding your fwcfg idea, I am not sure it will work as it seems the
PCI initialisation is happening before fwcfg is parsed and applied.

Adding a Kconfig option is another possibility.

But what do you think about an additional module parameter, wouldn't
it be the cleanest solution in the long run?

BTW, according to the git logs the patches were initially added by
Christian Lamparter, so I hope he can clarify the situation a
bit. Probably there were some performance tests executed back than to
measure the impact.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From greearb at candelatech.com  Wed Dec 11 14:24:19 2019
From: greearb at candelatech.com (Ben Greear)
Date: Wed, 11 Dec 2019 11:24:19 -0800
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <20191211191652.GU11070@home.paul.comp>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <20191211144459.13235-1-fercerpav@gmail.com>
 <d938b7ab-80b0-c78a-5a84-435243dff86d@candelatech.com>
 <20191211191652.GU11070@home.paul.comp>
Message-ID: <b3d4239d-0565-0cce-11e3-2bf5bdf7f001@candelatech.com>

On 12/11/19 11:16 AM, Paul Fertser wrote:
> Hey Ben,
> 
> On Wed, Dec 11, 2019 at 10:06:26AM -0800, Ben Greear wrote:
>> On 12/11/19 6:44 AM, Paul Fertser wrote:
>>> According to many bugreports [0][1][2] the default ath10k-ct kernel
> ...
>> And also if you want to just have the makefile pass a -DBUILD_ATH10K_SMALL or something
>> like that and #ifdef code in the ath10k-ct driver, then I'd apply that patch to ath10k-ct
>> so that you don't need the patches.
> 
> I am offering my patch to the OpenWrt maintainers as kind of a
> stop-gap measure to get ath10k-ct working for the release (or in any
> way they think is appropriate). Another approach they can choose is to
> select the upstream ath10k for those devices. Otherwise some
> previously supported boards will require manual intervention to get
> WiFi working after an upgrade.
> 
> Regarding your fwcfg idea, I am not sure it will work as it seems the
> PCI initialisation is happening before fwcfg is parsed and applied.
> 
> Adding a Kconfig option is another possibility.
> 
> But what do you think about an additional module parameter, wouldn't
> it be the cleanest solution in the long run?

If fwcfg will not work, and maybe it just will not due to the reasons you
suggest, then I'm fine with adding a module parameter to ath10k-ct.

You may want to conditionally compile the default value of that module parameter
so that on the small platforms the user does not actually have to set the module
param if they want the default (small) values?

Thanks,
Ben

> 
> BTW, according to the git logs the patches were initially added by
> Christian Lamparter, so I hope he can clarify the situation a
> bit. Probably there were some performance tests executed back than to
> measure the impact.
> 


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From bobafetthotmail at gmail.com  Wed Dec 11 14:32:41 2019
From: bobafetthotmail at gmail.com (Alberto Bursi)
Date: Wed, 11 Dec 2019 20:32:41 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <20191211175432.GI1371@makrotopia.org>
References: <trinity-108cc2ee-b593-4dec-a1d9-77c447ee9eed-1576082246699@3c-app-mailcom-lxa07>
 <20191211175432.GI1371@makrotopia.org>
Message-ID: <911d8b6a-df86-5a3f-906d-c6bb1c1d7e43@gmail.com>



On 11/12/19 18:54, Daniel Golle wrote:
> On Wed, Dec 11, 2019 at 05:37:26PM +0100, WRT Burner wrote:
>> On 11/12/2019 15:22, Daniel Golle wrote:
>>> And it's even needless to say that
>>> replying to a spam email in which ever way will always make it worse.
>>
>> +1. There is no constructive value in replying to spam. Let's keep openwrt-devel
>> nice and clean.
>>
>> On 11/12/2019 15:22, Daniel Golle wrote:
>>> You statement "suck it" (guess what) is also an obvious
>>> and disgusting example of a masculist culture which hurts our community
>>> as a whole and I strongly believe we should not tolerate that.
>>
>> -1. This is a software development mailing list, not tumblr.com.
> 
> '-1'? So I get right, you are saying it's ok to be insulting other
> people because this mailing list is about software development?
> If that's really what you wanted to say, I'm glad that's only a single
> individual opinion coming from an email address which has never
> actually been used on this mailing list.
> And btw, this is your first 'contribution', and it's not even about
> software development...
> 

He is just disappointed at your pointing out the "masculinist culture" 
in a place where he expected more maturity.

Yours is mostly SJW-speak and I'm also not fond of it, I'll explain why.
It is a double-edged blade.
In this case your definition is technically correct, we all know what 
"suck it" implies.
But this highly polarizing approach to life and people can (and does, 
especially in its dens like tumblr.com as mentioned) slippery slope into 
full blown hate and reverse oppression, which is equally bad.

I'm not impressed by your reaction here, first thing you do is a blatant 
strawman logical fallacy and then proceed to attack him on his personal 
values as a person without even asking to clarify his position first.
He just posted a single short sentence, for heaven's sake.

This is EXACTLY an example of slippery slope into blind hate rage as I 
said above, and exactly why this kind of polarizing categorizations and 
statements should be avoided at all costs in a serious and sane environment.

We should really not jump at each other's throats on a moment's notice 
like that, especially not in a software development mailing list.

-Alberto

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From geekysagarjain at gmail.com  Wed Dec 11 14:43:32 2019
From: geekysagarjain at gmail.com (sagar jain)
Date: Thu, 12 Dec 2019 01:13:32 +0530
Subject: [OpenWrt-Devel] (no subject)
Message-ID: <5df146e2.1c69fb81.5cb4d.808e@mx.google.com>

Can i sell OpenWRT based router ?

Sent from Mail for Windows 10

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191212/71581850/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From roger.pueyo at guifi.net  Wed Dec 11 14:47:51 2019
From: roger.pueyo at guifi.net (Roger Pueyo Centelles | Guifi.net)
Date: Wed, 11 Dec 2019 20:47:51 +0100
Subject: [OpenWrt-Devel] (no subject)
In-Reply-To: <5df146e2.1c69fb81.5cb4d.808e@mx.google.com>
References: <5df146e2.1c69fb81.5cb4d.808e@mx.google.com>
Message-ID: <36b96546-0b2b-7492-70b7-904bdb3c85e6@guifi.net>

Hi,

Have you checked https://openwrt.org/trademark ?

Cheers!

El 11/12/19 a les 20:43, sagar jain ha escrit:
>
> Can i sell OpenWRT based router ?
>
> ?
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
> ?
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191211/63f88067/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From pozega.tomislav at gmail.com  Wed Dec 11 16:03:19 2019
From: pozega.tomislav at gmail.com (Tom Psyborg)
Date: Wed, 11 Dec 2019 22:03:19 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <20191211142209.GC1371@makrotopia.org>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
 <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
 <20191211142209.GC1371@makrotopia.org>
Message-ID: <CAKR_QVJuZEZZN+WzNWUnGDsiSMrBrD0Q8NWYTsZuQ9OpnCnxkA@mail.gmail.com>

On 11/12/2019, Daniel Golle <daniel at makrotopia.org> wrote:
> Hi Tomislav,
>
> On Wed, Dec 11, 2019 at 11:24:21AM +0100, Tom Psyborg wrote:
>> suck it
>
> As a community, we decided to give our self a set of minimal rules[1].
> And even though it is in the last position, rule #12 "Be nice to each
> other." is meant just as serious as all the other rules.
>
> So here, not for the first time, you are using language which has the
> only purpose to hurt other people (for which reason ever, it doesn't
> matter). This is therefore a very clear violation to the above
> mentioned rule. You statement "suck it" (guess what) is also an obvious
> and disgusting example of a masculist culture which hurts our community
> as a whole and I strongly believe we should not tolerate that.
>
> And yes this was a spam mail. And it's even needless to say that
> replying to a spam email in which ever way will always make it worse.
> But that's not the point here and I will not engage in any discussion
> on that matter.
>
> Please learn to behave or leave us alone.
>

i take "us" for a couple of you hire chinese or create dupe account to
spam with your nonsense. otherwise your +1 replies indeed do make it
worse

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Wed Dec 11 16:17:34 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Wed, 11 Dec 2019 13:17:34 -0800
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <911d8b6a-df86-5a3f-906d-c6bb1c1d7e43@gmail.com>
References: <trinity-108cc2ee-b593-4dec-a1d9-77c447ee9eed-1576082246699@3c-app-mailcom-lxa07>
 <20191211175432.GI1371@makrotopia.org>
 <911d8b6a-df86-5a3f-906d-c6bb1c1d7e43@gmail.com>
Message-ID: <CAKxU2N8VhkB-kf6UWFQBg0+9VCAxUJ=S5AE0X_iYv-VeKwM+KA@mail.gmail.com>

On Wed, Dec 11, 2019 at 11:32 AM Alberto Bursi
<bobafetthotmail at gmail.com> wrote:
>
>
>
> On 11/12/19 18:54, Daniel Golle wrote:
> > On Wed, Dec 11, 2019 at 05:37:26PM +0100, WRT Burner wrote:
> >> On 11/12/2019 15:22, Daniel Golle wrote:
> >>> And it's even needless to say that
> >>> replying to a spam email in which ever way will always make it worse.
> >>
> >> +1. There is no constructive value in replying to spam. Let's keep openwrt-devel
> >> nice and clean.
> >>
> >> On 11/12/2019 15:22, Daniel Golle wrote:
> >>> You statement "suck it" (guess what) is also an obvious
> >>> and disgusting example of a masculist culture which hurts our community
> >>> as a whole and I strongly believe we should not tolerate that.
> >>
> >> -1. This is a software development mailing list, not tumblr.com.
> >
> > '-1'? So I get right, you are saying it's ok to be insulting other
> > people because this mailing list is about software development?
> > If that's really what you wanted to say, I'm glad that's only a single
> > individual opinion coming from an email address which has never
> > actually been used on this mailing list.
> > And btw, this is your first 'contribution', and it's not even about
> > software development...
> >
>
> He is just disappointed at your pointing out the "masculinist culture"
> in a place where he expected more maturity.
>
> Yours is mostly SJW-speak and I'm also not fond of it, I'll explain why.
> It is a double-edged blade.
> In this case your definition is technically correct, we all know what
> "suck it" implies.
> But this highly polarizing approach to life and people can (and does,
> especially in its dens like tumblr.com as mentioned) slippery slope into
> full blown hate and reverse oppression, which is equally bad.
>
> I'm not impressed by your reaction here, first thing you do is a blatant
> strawman logical fallacy and then proceed to attack him on his personal
> values as a person without even asking to clarify his position first.
> He just posted a single short sentence, for heaven's sake.
>
> This is EXACTLY an example of slippery slope into blind hate rage as I
> said above, and exactly why this kind of polarizing categorizations and
> statements should be avoided at all costs in a serious and sane environment.
>
> We should really not jump at each other's throats on a moment's notice
> like that, especially not in a software development mailing list.
+1

Unnecessary drama is not needed.
>
> -Alberto
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Wed Dec 11 16:38:33 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Wed, 11 Dec 2019 22:38:33 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <20191211142209.GC1371@makrotopia.org>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
 <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
 <20191211142209.GC1371@makrotopia.org>
Message-ID: <007d01d5b06b$57191af0$054b50d0$@adrianschmutzler.de>

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Daniel Golle
> Sent: Mittwoch, 11. Dezember 2019 15:22
> To: Tom Psyborg <pozega.tomislav at gmail.com>
> Cc: openwrt-devel at lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] Inquery
> 
> Hi Tomislav,
> 
> On Wed, Dec 11, 2019 at 11:24:21AM +0100, Tom Psyborg wrote:
> > suck it
> 
> As a community, we decided to give our self a set of minimal rules[1].
> And even though it is in the last position, rule #12 "Be nice to each other." is
> meant just as serious as all the other rules.
> 
> So here, not for the first time, you are using language which has the only
> purpose to hurt other people (for which reason ever, it doesn't matter). This
> is therefore a very clear violation to the above mentioned rule. You
> statement "suck it" (guess what) is also an obvious and disgusting example of
> a masculist culture which hurts our community as a whole and I strongly
> believe we should not tolerate that.
> 
> And yes this was a spam mail. And it's even needless to say that replying to a
> spam email in which ever way will always make it worse.
> But that's not the point here and I will not engage in any discussion on that
> matter.
> 
> Please learn to behave or leave us alone.

+1

The latest reply from Tom forced me to also express my consent with what Daniel wrote here.
I indeed think his reaction is very appropriate, keeping it to the matter of fact where the recent history of Tom's "contributions" might have tempted other people to react less sensibly.

Adrian

> 
> [1]: https://openwrt.org/rules
> 
> 
> >
> > On 11/12/2019, rqgxfc <rqgxfc at vip.163.com> wrote:
> > >
> > >
> > > Hello Sir ?
> > >
> > > We are  a trading company named Shaanxi Hao Zi Guan Materials Co.,Ltd
> .
> > > Now
> > > we are very interested in your products , we will plan to  sell your
> > > products in the Chinese market . If you are interested in
> > > cooperation, please send us a catalog and pricelist .w Looking
> > > forward to receiving your reply .
> > >
> > > Best regards,
> > > Catherina
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191211/cbd87d5a/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From gio at diveni.re  Wed Dec 11 17:07:12 2019
From: gio at diveni.re (Gio)
Date: Wed, 11 Dec 2019 23:07:12 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <20191211142209.GC1371@makrotopia.org>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
 <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
 <20191211142209.GC1371@makrotopia.org>
Message-ID: <6282917.FZ2IBkSyqR@lifestock>

On Wednesday, 11 December 2019 15:22:09 CET Daniel Golle wrote:
> Hi Tomislav,
> 
> On Wed, Dec 11, 2019 at 11:24:21AM +0100, Tom Psyborg wrote:
> > suck it
> 
> As a community, we decided to give our self a set of minimal rules[1].
> And even though it is in the last position, rule #12 "Be nice to each
> other." is meant just as serious as all the other rules.
> 
> So here, not for the first time, you are using language which has the
> only purpose to hurt other people (for which reason ever, it doesn't
> matter). This is therefore a very clear violation to the above
> mentioned rule. You statement "suck it" (guess what) is also an obvious
> and disgusting example of a masculist culture which hurts our community
> as a whole and I strongly believe we should not tolerate that.
> 
> And yes this was a spam mail. And it's even needless to say that
> replying to a spam email in which ever way will always make it worse.
> But that's not the point here and I will not engage in any discussion
> on that matter.
> 
> Please learn to behave or leave us alone.
> 
> [1]: https://openwrt.org/rules

+1

Thanks Daniel for the effort drawing attention to this issue




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Wed Dec 11 18:26:17 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Thu, 12 Dec 2019 02:26:17 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?wujk5e7v8/Ll+OXx8uLo/yDv7iDi8eXsIPPj?=
	=?cp1251?b?7uvq4Owg7+vg7eXy+yAtIPPt6Org6/zt4P8g6u7r6+Xq9uj/IOIg?=
	=?cp1251?b?7vLr6Pft7uwg6uD35fHy4uUuIDA1XzA4XzIwMTkgMDJfMTAgMTk5?=
	=?cp1251?q?508?=
Message-ID: <mailman.17481.1576106903.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ???????????????? ?? ???? ??????? ??????? - ?????????? ????????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Thu, 12 Dec 2019 02:26:17 +0300
Size: 169918
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191212/85127509/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From foss at volatilesystems.org  Thu Dec 12 02:34:00 2019
From: foss at volatilesystems.org (Stijn Segers)
Date: Thu, 12 Dec 2019 08:34:00 +0100
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <CAKxU2N8VhkB-kf6UWFQBg0+9VCAxUJ=S5AE0X_iYv-VeKwM+KA@mail.gmail.com>
References: <trinity-108cc2ee-b593-4dec-a1d9-77c447ee9eed-1576082246699@3c-app-mailcom-lxa07>
 <20191211175432.GI1371@makrotopia.org>
 <911d8b6a-df86-5a3f-906d-c6bb1c1d7e43@gmail.com>
 <CAKxU2N8VhkB-kf6UWFQBg0+9VCAxUJ=S5AE0X_iYv-VeKwM+KA@mail.gmail.com>
Message-ID: <F7BE36BC-35DC-48A2-8BEA-307DC73E1040@volatilesystems.org>

Rosen Penev <rosenp at gmail.com> schreef op 11 december 2019 22:17:34 CET:
>On Wed, Dec 11, 2019 at 11:32 AM Alberto Bursi
><bobafetthotmail at gmail.com> wrote:
>>
>>
>>
>> On 11/12/19 18:54, Daniel Golle wrote:
>> > On Wed, Dec 11, 2019 at 05:37:26PM +0100, WRT Burner wrote:
>> >> On 11/12/2019 15:22, Daniel Golle wrote:
>> >>> And it's even needless to say that
>> >>> replying to a spam email in which ever way will always make it
>worse.
>> >>
>> >> +1. There is no constructive value in replying to spam. Let's keep
>openwrt-devel
>> >> nice and clean.
>> >>
>> >> On 11/12/2019 15:22, Daniel Golle wrote:
>> >>> You statement "suck it" (guess what) is also an obvious
>> >>> and disgusting example of a masculist culture which hurts our
>community
>> >>> as a whole and I strongly believe we should not tolerate that.
>> >>
>> >> -1. This is a software development mailing list, not tumblr.com.
>> >
>> > '-1'? So I get right, you are saying it's ok to be insulting other
>> > people because this mailing list is about software development?
>> > If that's really what you wanted to say, I'm glad that's only a
>single
>> > individual opinion coming from an email address which has never
>> > actually been used on this mailing list.
>> > And btw, this is your first 'contribution', and it's not even about
>> > software development...
>> >
>>
>> He is just disappointed at your pointing out the "masculinist
>culture"
>> in a place where he expected more maturity.
>>
>> Yours is mostly SJW-speak and I'm also not fond of it, I'll explain
>why.
>> It is a double-edged blade.
>> In this case your definition is technically correct, we all know what
>> "suck it" implies.
>> But this highly polarizing approach to life and people can (and does,
>> especially in its dens like tumblr.com as mentioned) slippery slope
>into
>> full blown hate and reverse oppression, which is equally bad.
>>
>> I'm not impressed by your reaction here, first thing you do is a
>blatant
>> strawman logical fallacy and then proceed to attack him on his
>personal
>> values as a person without even asking to clarify his position first.
>> He just posted a single short sentence, for heaven's sake.
>>
>> This is EXACTLY an example of slippery slope into blind hate rage as
>I
>> said above, and exactly why this kind of polarizing categorizations
>and
>> statements should be avoided at all costs in a serious and sane
>environment.
>>
>> We should really not jump at each other's throats on a moment's
>notice
>> like that, especially not in a software development mailing list.
>+1
>
>Unnecessary drama is not neStijn

Very much so. Thank you for this voice of reason.

Stijn

>>
>> -Alberto
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
>_______________________________________________
>openwrt-devel mailing list
>openwrt-devel at lists.openwrt.org
>https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Thu Dec 12 05:01:04 2019
From: daniel at makrotopia.org (Daniel Golle)
Date: Thu, 12 Dec 2019 12:01:04 +0200
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <911d8b6a-df86-5a3f-906d-c6bb1c1d7e43@gmail.com>
References: <trinity-108cc2ee-b593-4dec-a1d9-77c447ee9eed-1576082246699@3c-app-mailcom-lxa07>
 <20191211175432.GI1371@makrotopia.org>
 <911d8b6a-df86-5a3f-906d-c6bb1c1d7e43@gmail.com>
Message-ID: <20191212100104.GA22359@makrotopia.org>

Hi Alberto,

On Wed, Dec 11, 2019 at 08:32:41PM +0100, Alberto Bursi wrote:
> 
> 
> On 11/12/19 18:54, Daniel Golle wrote:
> > On Wed, Dec 11, 2019 at 05:37:26PM +0100, WRT Burner wrote:
> > > On 11/12/2019 15:22, Daniel Golle wrote:
> > > > And it's even needless to say that
> > > > replying to a spam email in which ever way will always make it worse.
> > > 
> > > +1. There is no constructive value in replying to spam. Let's keep openwrt-devel
> > > nice and clean.
> > > 
> > > On 11/12/2019 15:22, Daniel Golle wrote:
> > > > You statement "suck it" (guess what) is also an obvious
> > > > and disgusting example of a masculist culture which hurts our community
> > > > as a whole and I strongly believe we should not tolerate that.
> > > 
> > > -1. This is a software development mailing list, not tumblr.com.
> > 
> > '-1'? So I get right, you are saying it's ok to be insulting other
> > people because this mailing list is about software development?
> > If that's really what you wanted to say, I'm glad that's only a single
> > individual opinion coming from an email address which has never
> > actually been used on this mailing list.
> > And btw, this is your first 'contribution', and it's not even about
> > software development...
> > 
> 
> He is just disappointed at your pointing out the "masculinist culture" in a
> place where he expected more maturity.

Maybe I don't understand this level of maturity where it can be
alright to use language which has the only purpose to deliberately
hurt other people. Maybe I even hope I will never get that 'mature'.

I pointed out the masculinist culture a statement like his
originates from just because that's what it is. Correct me if I'm
getting something wrong, but "suck it" basically says, "I'm the male
in the room here, so your rights are limited to please me sexually".
To me is not a border-line grey-zone of overdoing political
correctness and forcing everybody to use lots of virtue signalling
and a very specificly coded language changing every two weeks accoring
to fashion standards. It's not that he failed to use gender-correct
language or wrongly assumed someones identity or any of those things
which happen a lot without any bad intention involved.
But what Tom wrote was **meant** as an insult.

> 
> Yours is mostly SJW-speak and I'm also not fond of it, I'll explain why.
> It is a double-edged blade.
> In this case your definition is technically correct, we all know what "suck
> it" implies.
> But this highly polarizing approach to life and people can (and does,
> especially in its dens like tumblr.com as mentioned) slippery slope into
> full blown hate and reverse oppression, which is equally bad.

I guess I partially agree with you one that. I have never visited
tumblr nor know much about what's happening there. To me, "social
justice" sounds like something desireable, however, I can also see that
the fight for that is also being misused to call-out on people who
didn't intend to do any harm to anyone in some cases.

However, I don't think we need this debate here in this case, as very
clearly "suck it" is just very obviously not nice, ie. violates the
rule #12 "be nice to each other".

> 
> I'm not impressed by your reaction here, first thing you do is a blatant
> strawman logical fallacy and then proceed to attack him on his personal
> values as a person without even asking to clarify his position first.
> He just posted a single short sentence, for heaven's sake.
> 
> This is EXACTLY an example of slippery slope into blind hate rage as I said
> above, and exactly why this kind of polarizing categorizations and
> statements should be avoided at all costs in a serious and sane environment.
> 
> We should really not jump at each other's throats on a moment's notice like
> that, especially not in a software development mailing list.

I did asked for claritication, because it wasn't clear to me (see my
reply, there are some "if"s). I didn't make any assumptions on his
values, I was surprised and hoping that this would turn out to be just
a case of misunderstanding each other. Simply because it's hard for me
to imagine a setting where it would be ok to write "suck it" just
because this is about software development (and I still fail to follow
that logic, maybe you can explain that to me off-list).

I also agree that I don't want people to the scared to be super correct
and this is not the place to discuss subtle language details, for the
exact same reason that we will loose potential contributors.

Needless to say that WRT_Burner showed up out of nowhere (let me guess
what 'burner' means in that choice of a name) 


Cheers


Daniel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From m.storchak at gmail.com  Thu Dec 12 05:02:19 2019
From: m.storchak at gmail.com (Maxim Storchak)
Date: Thu, 12 Dec 2019 12:02:19 +0200
Subject: [OpenWrt-Devel] [PATCH] ca-certificates: provide ca-certs by both
 ca-certificates and ca-bundle
Message-ID: <20191212100218.37783-1-m.storchak@gmail.com>

- both packages provide ca-certs
- make ca-bundle the default provider

This should allow easy transition between these two forms of CA certificates storage

Signed-off-by: Maxim Storchak <m.storchak at gmail.com>
---
 package/system/ca-certificates/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile
index f449645c77..ea7d253fa2 100644
--- a/package/system/ca-certificates/Makefile
+++ b/package/system/ca-certificates/Makefile
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ca-certificates
 PKG_VERSION:=20190110
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
@@ -24,6 +24,7 @@ define Package/ca-certificates
   CATEGORY:=Base system
   TITLE:=System CA certificates
   PKGARCH:=all
+  PROVIDES:=ca-certs
 endef
 
 define Package/ca-bundle
@@ -31,6 +32,7 @@ define Package/ca-bundle
   CATEGORY:=Base system
   TITLE:=System CA certificates as a bundle
   PKGARCH:=all
+  PROVIDES:=ca-certs
 endef
 
 define Build/Install
@@ -59,5 +61,5 @@ define Package/ca-bundle/install
 	cat $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt >$(1)/etc/ssl/certs/ca-certificates.crt
 	$(LN) /etc/ssl/certs/ca-certificates.crt $(1)/etc/ssl/cert.pem
 endef
-$(eval $(call BuildPackage,ca-certificates))
 $(eval $(call BuildPackage,ca-bundle))
+$(eval $(call BuildPackage,ca-certificates))
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Thu Dec 12 08:01:12 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Thu, 12 Dec 2019 14:01:12 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: add support for JCG JHR-AC876M
In-Reply-To: <20191210132134.28943-1-dengqf6@mail2.sysu.edu.cn>
References: <20191210132134.28943-1-dengqf6@mail2.sysu.edu.cn>
Message-ID: <002801d5b0ec$3c0b1f70$b4215e50$@adrianschmutzler.de>

Hi,

> +	aliases {
> +		led-boot = &led_wps;
> +		led-failsafe = &led_wps;
> +		led-running = &led_wps;
> +		led-upgrade = &led_wps;
> +		label-mac-device = &wifi2g;

This won't work (address not set explicitly in DTS). You will need to provide the address in 02_network (see below).

> diff --git a/target/linux/ramips/image/mt7621.mk
> b/target/linux/ramips/image/mt7621.mk
> index d663aa29da..cbbda06822 100644
> --- a/target/linux/ramips/image/mt7621.mk
> +++ b/target/linux/ramips/image/mt7621.mk
> @@ -361,6 +361,19 @@ define Device/iodata_wnpr2600g
>  endef
>  TARGET_DEVICES += iodata_wnpr2600g
> 
> +define Device/jcg_jhr-ac876m
> +  MTK_SOC := mt7621
> +  IMAGE_SIZE := 16064k
> +  IMAGES += factory.bin
> +  IMAGE/factory.bin := \
> +        $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 89.1

Won't $$(sysupgrade_bin) include the metadata not needed for the factory image?

> +  JCG_MAXSIZE := 16449536

I'd prefer to have a substitution included in jcg-header, so we can use 16064k here, too.

> +  DEVICE_VENDOR := JCG
> +  DEVICE_MODEL := JHR-AC876M
> +  DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport
> wpad-basic
> +endef
> +TARGET_DEVICES += jcg_jhr-ac876m
> +
>  define Device/lenovo_newifi-d1
>    MTK_SOC := mt7621
>    IMAGE_SIZE := 32448k
> diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> index bb6e41e06f..904e82e09a 100755
> --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> @@ -14,6 +14,7 @@ ramips_setup_interfaces()
>  	d-team,pbr-m1|\
>  	firefly,firewrt|\
>  	hiwifi,hc5962|\
> +	jcg,jhr-ac876m|\
>  	mediatek,ap-mt7621a-v60|\
>  	mediatek,mt7621-eval-board|\
>  	mqmaker,witi|\
> @@ -223,6 +224,9 @@ ramips_setup_macs()
>  		wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
>  		label_mac=$wan_mac
>  		;;
> +	jcg,jhr-ac876m)
> +		wan_mac=$(mtd_get_mac_binary factory 0x4)

What about 0xe006? If lan is 0xe000, I would expect the wan MAC address there.

Add here:

label_mac=$(mtd_get_mac_binary factory 0x4)

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191212/37d26a79/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at aparcar.org  Thu Dec 12 08:40:15 2019
From: mail at aparcar.org (Paul Spooren)
Date: Thu, 12 Dec 2019 13:40:15 +0000 (UTC)
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <20191211142209.GC1371@makrotopia.org>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
 <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
 <20191211142209.GC1371@makrotopia.org>
Message-ID: <fa5c1f9f-ab3d-4b1d-bb6a-6919675818f1@localhost>


+1




11 Dec 2019 15:22:44 Daniel Golle <daniel at makrotopia.org>:

> Hi Tomislav,
> 
> On Wed, Dec 11, 2019 at 11:24:21AM +0100, Tom Psyborg wrote:
> 
> > suck it
> > 
> 
> As a community, we decided to give our self a set of minimal rules[1].
> And even though it is in the last position, rule #12 "Be nice to each
> other." is meant just as serious as all the other rules.
> 
> So here, not for the first time, you are using language which has the
> only purpose to hurt other people (for which reason ever, it doesn't
> matter). This is therefore a very clear violation to the above
> mentioned rule. You statement "suck it" (guess what) is also an obvious
> and disgusting example of a masculist culture which hurts our community
> as a whole and I strongly believe we should not tolerate that.
> 
> And yes this was a spam mail. And it's even needless to say that
> replying to a spam email in which ever way will always make it worse.
> But that's not the point here and I will not engage in any discussion
> on that matter.
> 
> Please learn to behave or leave us alone.
> 
> [1]: https://openwrt.org/rules
> 
> 
> 
> > 
> > On 11/12/2019, rqgxfc <rqgxfc at vip.163.com> wrote:
> > 
> > > 
> > > 
> > > Hello Sir ?
> > > 
> > > We are a trading company named Shaanxi Hao Zi Guan Materials Co.,Ltd . Now
> > > we are very interested in your products , we will plan to sell your
> > > products in the Chinese market . If you are interested in cooperation,
> > > please send us a catalog and pricelist .w
> > > Looking forward to receiving your reply .
> > > 
> > > Best regards,
> > > Catherina
> > > 
> > 
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> > 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dengqf6 at mail2.sysu.edu.cn  Thu Dec 12 09:08:48 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Thu, 12 Dec 2019 22:08:48 +0800
Subject: [OpenWrt-Devel] [PATCH V2] ramips: add support for JCG JHR-AC876M
Message-ID: <20191212140848.8071-1-dengqf6@mail2.sysu.edu.cn>

JCG JHR-AC876M is an AC2600M router

Hardware specs:
  SoC: MT7621AT
  2.4GHz: MT7615N 4x4 @ PCIe0
  5GHz: MT7615N 4x4 @ PCIe1
  Flash: Winbond W25Q128JVSQ 16MiB
  RAM: Nanya NT5CB128M16 256MiB
  USB 2.0 and 3.0 ports
  6 LEDs, 3 of which are connected to SoC GPIO
  Reset and WPS buttons

Flash instructions:
Stock to OpenWrt:
  Upload factory.bin in stock firmware's upgrade page,
  do not preserve settings

OpenWrt to stock:
  Push and hold the reset button for 5s while power cycling to
  enter recovery mode;
  Visit 192.168.1.1 and upload stock firmware

Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
---
Changes since V1:
  Rebased and fixed label-mac

---
 .../ramips/dts/mt7621_jcg_jhr-ac876m.dts      | 146 ++++++++++++++++++
 target/linux/ramips/image/mt7621.mk           |  13 ++
 .../mt7621/base-files/etc/board.d/02_network  |   5 +
 3 files changed, 164 insertions(+)
 create mode 100644 target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts

diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
new file mode 100644
index 0000000000..267043b5a1
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
@@ -0,0 +1,146 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "jcg,jhr-ac876m", "mediatek,mt7621-soc";
+	model = "JCG JHR-AC876M";
+
+	aliases {
+		led-boot = &led_wps;
+		led-failsafe = &led_wps;
+		led-running = &led_wps;
+		led-upgrade = &led_wps;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,57600";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		usb3 {
+			label = "jhr-ac876m:blue:usb3";
+			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&xhci_ehci_port1>;
+			linux,default-trigger = "usbport";
+		};
+
+		usb2 {
+			label = "jhr-ac876m:blue:usb2";
+			gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ehci_port2>;
+			linux,default-trigger = "usbport";
+		};
+
+		led_wps: wps {
+			label = "jhr-ac876m:blue:wps";
+			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <80000000>;
+		m25p,fast-read;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x30000>;
+				read-only;
+			};
+
+			partition at 30000 {
+				label = "u-boot-env";
+				reg = <0x30000 0x10000>;
+				read-only;
+			};
+
+			factory: partition at 40000 {
+				label = "factory";
+				reg = <0x40000 0x10000>;
+				read-only;
+			};
+
+			partition at 50000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x50000 0xfb0000>;
+			};
+		};
+	};
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie0 {
+	wifi at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x0>;
+		ieee80211-freq-limit = <2400000 2500000>;
+
+		led {
+			led-active-low;
+		};
+	};
+};
+
+&pcie1 {
+	wifi at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x8000>;
+		ieee80211-freq-limit = <5000000 6000000>;
+
+		led {
+			led-active-low;
+		};
+	};
+};
+
+&ethernet {
+	mtd-mac-address = <&factory 0xe000>;
+};
+
+&pinctrl {
+	state_default: pinctrl0 {
+		gpio {
+			ralink,group = "i2c", "uart3", "jtag", "wdt";
+			ralink,function = "gpio";
+		};
+	};
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index d663aa29da..cbbda06822 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -361,6 +361,19 @@ define Device/iodata_wnpr2600g
 endef
 TARGET_DEVICES += iodata_wnpr2600g
 
+define Device/jcg_jhr-ac876m
+  MTK_SOC := mt7621
+  IMAGE_SIZE := 16064k
+  IMAGES += factory.bin
+  IMAGE/factory.bin := \
+        $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 89.1
+  JCG_MAXSIZE := 16449536
+  DEVICE_VENDOR := JCG
+  DEVICE_MODEL := JHR-AC876M
+  DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
+endef
+TARGET_DEVICES += jcg_jhr-ac876m
+
 define Device/lenovo_newifi-d1
   MTK_SOC := mt7621
   IMAGE_SIZE := 32448k
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index 2447ff8a8d..295be63d61 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -14,6 +14,7 @@ ramips_setup_interfaces()
 	d-team,pbr-m1|\
 	firefly,firewrt|\
 	hiwifi,hc5962|\
+	jcg,jhr-ac876m|\
 	mediatek,ap-mt7621a-v60|\
 	mediatek,mt7621-eval-board|\
 	mqmaker,witi|\
@@ -217,6 +218,10 @@ ramips_setup_macs()
 		wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
 		label_mac=$wan_mac
 		;;
+	jcg,jhr-ac876m)
+		label_mac=$(mtd_get_mac_binary factory 0x4)
+		wan_mac=$label_mac
+		;;
 	mediatek,ap-mt7621a-v60)
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x5)" 1)
 		;;
-- 
2.24.0




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Thu Dec 12 14:41:30 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Thu, 12 Dec 2019 20:41:30 +0100
Subject: [OpenWrt-Devel] [PATCH V2] ramips: add support for JCG
 JHR-AC876M
In-Reply-To: <20191212140848.8071-1-dengqf6@mail2.sysu.edu.cn>
References: <20191212140848.8071-1-dengqf6@mail2.sysu.edu.cn>
Message-ID: <027201d5b124$27ac4d00$7704e700$@adrianschmutzler.de>

Hi again,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On
> Behalf Of DENG Qingfang
> Sent: Donnerstag, 12. Dezember 2019 15:09
> To: openwrt-devel at lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH V2] ramips: add support for JCG JHR-AC876M
> 
> JCG JHR-AC876M is an AC2600M router
> 
> Hardware specs:
>   SoC: MT7621AT
>   2.4GHz: MT7615N 4x4 @ PCIe0
>   5GHz: MT7615N 4x4 @ PCIe1
>   Flash: Winbond W25Q128JVSQ 16MiB
>   RAM: Nanya NT5CB128M16 256MiB
>   USB 2.0 and 3.0 ports
>   6 LEDs, 3 of which are connected to SoC GPIO
>   Reset and WPS buttons
> 
> Flash instructions:
> Stock to OpenWrt:
>   Upload factory.bin in stock firmware's upgrade page,
>   do not preserve settings
> 
> OpenWrt to stock:
>   Push and hold the reset button for 5s while power cycling to
>   enter recovery mode;
>   Visit 192.168.1.1 and upload stock firmware

Please add information about the MAC addresses to the commit message, as suggested in the previous e-mail, something like

0x4        *:00  wlan2g/wan/label 
0x8004 *:01  wlan5g 
0xe000 *:02  lan 
0xe006 *:03  not used in stock FW

[...]

> +
> +&pinctrl {
> +	state_default: pinctrl0 {
> +		gpio {
> +			ralink,group = "i2c", "uart3", "jtag", "wdt";
> +			ralink,function = "gpio";
> +		};
> +	};
> +};

For mt7621, state_default is already defined in mt7621.dtsi. So, you may use it directly:

 +&state_default {
 +	gpio {
 +		ralink,group = "i2c", "uart3", "jtag", "wdt";
 +		ralink,function = "gpio";
 +	};
 +};

> diff --git a/target/linux/ramips/image/mt7621.mk
> b/target/linux/ramips/image/mt7621.mk
> index d663aa29da..cbbda06822 100644
> --- a/target/linux/ramips/image/mt7621.mk
> +++ b/target/linux/ramips/image/mt7621.mk
> @@ -361,6 +361,19 @@ define Device/iodata_wnpr2600g
>  endef
>  TARGET_DEVICES += iodata_wnpr2600g
> 
> +define Device/jcg_jhr-ac876m
> +  MTK_SOC := mt7621
> +  IMAGE_SIZE := 16064k
> +  IMAGES += factory.bin
> +  IMAGE/factory.bin := \
> +        $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 89.1
> +  JCG_MAXSIZE := 16449536

I've built a patch to allow kilobytes here:
https://git.openwrt.org/?p=openwrt/staging/adrian.git;a=shortlog;h=refs/heads/staging

I'm currently built-testing it, maybe you can test with
JCG_MAXSIZE := 16064k
too.

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191212/710bf249/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From rosenp at gmail.com  Thu Dec 12 16:42:44 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Thu, 12 Dec 2019 13:42:44 -0800
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <20191212100104.GA22359@makrotopia.org>
References: <trinity-108cc2ee-b593-4dec-a1d9-77c447ee9eed-1576082246699@3c-app-mailcom-lxa07>
 <20191211175432.GI1371@makrotopia.org>
 <911d8b6a-df86-5a3f-906d-c6bb1c1d7e43@gmail.com>
 <20191212100104.GA22359@makrotopia.org>
Message-ID: <CAKxU2N9U5Fy27xJryv26xS9aVgNW3wscWQfC+=DcqhyCaopyQw@mail.gmail.com>

On Thu, Dec 12, 2019 at 2:01 AM Daniel Golle <daniel at makrotopia.org> wrote:
>
> Hi Alberto,
>
> On Wed, Dec 11, 2019 at 08:32:41PM +0100, Alberto Bursi wrote:
> >
> >
> > On 11/12/19 18:54, Daniel Golle wrote:
> > > On Wed, Dec 11, 2019 at 05:37:26PM +0100, WRT Burner wrote:
> > > > On 11/12/2019 15:22, Daniel Golle wrote:
> > > > > And it's even needless to say that
> > > > > replying to a spam email in which ever way will always make it worse.
> > > >
> > > > +1. There is no constructive value in replying to spam. Let's keep openwrt-devel
> > > > nice and clean.
> > > >
> > > > On 11/12/2019 15:22, Daniel Golle wrote:
> > > > > You statement "suck it" (guess what) is also an obvious
> > > > > and disgusting example of a masculist culture which hurts our community
> > > > > as a whole and I strongly believe we should not tolerate that.
> > > >
> > > > -1. This is a software development mailing list, not tumblr.com.
> > >
> > > '-1'? So I get right, you are saying it's ok to be insulting other
> > > people because this mailing list is about software development?
> > > If that's really what you wanted to say, I'm glad that's only a single
> > > individual opinion coming from an email address which has never
> > > actually been used on this mailing list.
> > > And btw, this is your first 'contribution', and it's not even about
> > > software development...
> > >
> >
> > He is just disappointed at your pointing out the "masculinist culture" in a
> > place where he expected more maturity.
>
> Maybe I don't understand this level of maturity where it can be
> alright to use language which has the only purpose to deliberately
> hurt other people. Maybe I even hope I will never get that 'mature'.
>
> I pointed out the masculinist culture a statement like his
> originates from just because that's what it is. Correct me if I'm
> getting something wrong, but "suck it" basically says, "I'm the male
> in the room here, so your rights are limited to please me sexually".
> To me is not a border-line grey-zone of overdoing political
> correctness and forcing everybody to use lots of virtue signalling
> and a very specificly coded language changing every two weeks accoring
> to fashion standards. It's not that he failed to use gender-correct
> language or wrongly assumed someones identity or any of those things
> which happen a lot without any bad intention involved.
> But what Tom wrote was **meant** as an insult.
>
> >
> > Yours is mostly SJW-speak and I'm also not fond of it, I'll explain why.
> > It is a double-edged blade.
> > In this case your definition is technically correct, we all know what "suck
> > it" implies.
> > But this highly polarizing approach to life and people can (and does,
> > especially in its dens like tumblr.com as mentioned) slippery slope into
> > full blown hate and reverse oppression, which is equally bad.
>
> I guess I partially agree with you one that. I have never visited
> tumblr nor know much about what's happening there. To me, "social
> justice" sounds like something desireable, however, I can also see that
> the fight for that is also being misused to call-out on people who
> didn't intend to do any harm to anyone in some cases.
>
> However, I don't think we need this debate here in this case, as very
> clearly "suck it" is just very obviously not nice, ie. violates the
> rule #12 "be nice to each other".
>
> >
> > I'm not impressed by your reaction here, first thing you do is a blatant
> > strawman logical fallacy and then proceed to attack him on his personal
> > values as a person without even asking to clarify his position first.
> > He just posted a single short sentence, for heaven's sake.
> >
> > This is EXACTLY an example of slippery slope into blind hate rage as I said
> > above, and exactly why this kind of polarizing categorizations and
> > statements should be avoided at all costs in a serious and sane environment.
> >
> > We should really not jump at each other's throats on a moment's notice like
> > that, especially not in a software development mailing list.
>
> I did asked for claritication, because it wasn't clear to me (see my
> reply, there are some "if"s). I didn't make any assumptions on his
> values, I was surprised and hoping that this would turn out to be just
> a case of misunderstanding each other. Simply because it's hard for me
> to imagine a setting where it would be ok to write "suck it" just
> because this is about software development (and I still fail to follow
> that logic, maybe you can explain that to me off-list).
>
> I also agree that I don't want people to the scared to be super correct
> and this is not the place to discuss subtle language details, for the
> exact same reason that we will loose potential contributors.
>
> Needless to say that WRT_Burner showed up out of nowhere (let me guess
> what 'burner' means in that choice of a name)
It's a spam message. The response by Tom may have been heavy but it's
nothing to cause commotion over.

That is to say, it was not serious. There is no need for a serious
response to it.
>
>
> Cheers
>
>
> Daniel
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Thu Dec 12 17:32:58 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Fri, 13 Dec 2019 01:32:58 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?z/Dg4u7x6+Di7eD/IOLo5OXu/e326Orr7u/l?=
	=?cp1251?b?5Oj/IC0g8+3o6uDr/O3u5SDo5+Tg7ejlIOIg7vLr6Pft7uwg6uD3?=
	=?cp1251?b?5fHy4uUuIDA1XzA4XzIwMTkgMDJfMTAgMTk5NTA4?=
Message-ID: <mailman.17895.1576190142.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ???????????? ????????????????? - ?????????? ??????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Fri, 13 Dec 2019 01:32:58 +0300
Size: 41358
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191213/80880085/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From yszhou4tech at gmail.com  Fri Dec 13 02:05:59 2019
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 13 Dec 2019 07:05:59 +0000
Subject: [OpenWrt-Devel] [PATCH] zones: enforce forward policy with
 zone_NAME_src_POLICY
Message-ID: <20191213070559.50319-1-yszhou4tech@gmail.com>

E.g. traffic entering zone_lan_forward must match "-i br-lan".  That is,
forward policy of zone X applies to those traffics from zone X and to be
forwarded to other zones The iptables target for zone policy enforcement
should be zone_NAME_src_POLICY to match "-i br-lan", not
zone_NAME_dest_POLICY that matches "-o br-lan"

Fixes FS#2525

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 zones.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/zones.c b/zones.c
index 310583d..f268615 100644
--- a/zones.c
+++ b/zones.c
@@ -317,11 +317,11 @@ fw3_load_zones(struct fw3_state *state, struct uci_package *p)
 		resolve_cthelpers(state, e, zone);
 
 		fw3_setbit(zone->flags[0], fw3_to_src_target(zone->policy_input));
-		fw3_setbit(zone->flags[0], zone->policy_forward);
+		fw3_setbit(zone->flags[0], fw3_to_src_target(zone->policy_forward));
 		fw3_setbit(zone->flags[0], zone->policy_output);
 
 		fw3_setbit(zone->flags[1], fw3_to_src_target(zone->policy_input));
-		fw3_setbit(zone->flags[1], zone->policy_forward);
+		fw3_setbit(zone->flags[1], fw3_to_src_target(zone->policy_forward));
 		fw3_setbit(zone->flags[1], zone->policy_output);
 
 		list_add_tail(&zone->list, &state->zones);
@@ -659,7 +659,7 @@ print_zone_rule(struct fw3_ipt_handle *handle, struct fw3_state *state,
 		fw3_ipt_rule_append(r, "zone_%s_input", zone->name);
 
 		r = fw3_ipt_rule_new(handle);
-		fw3_ipt_rule_target(r, "zone_%s_dest_%s", zone->name,
+		fw3_ipt_rule_target(r, "zone_%s_src_%s", zone->name,
 		                     fw3_flag_names[zone->policy_forward]);
 		fw3_ipt_rule_append(r, "zone_%s_forward", zone->name);
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From jo at mein.io  Fri Dec 13 03:58:27 2019
From: jo at mein.io (Jo-Philipp Wich)
Date: Fri, 13 Dec 2019 09:58:27 +0100
Subject: [OpenWrt-Devel] [PATCH] zones: enforce forward policy with
 zone_NAME_src_POLICY
In-Reply-To: <20191213070559.50319-1-yszhou4tech@gmail.com>
References: <20191213070559.50319-1-yszhou4tech@gmail.com>
Message-ID: <cd162aac-2d45-08a9-25d8-f4b749850cde@wwsnet.net>

Hi,

per definition, zone forward policies were only ever meant to apply to
traffic between interfaces within the same zone *not* to traffic
anywhere else.

Your patch would break that assumption as far as I can see.

~ Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191213/0e0bbaf0/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From yszhou4tech at gmail.com  Fri Dec 13 04:28:58 2019
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 13 Dec 2019 17:28:58 +0800
Subject: [OpenWrt-Devel] [PATCH] zones: enforce forward policy with
 zone_NAME_src_POLICY
In-Reply-To: <cd162aac-2d45-08a9-25d8-f4b749850cde@wwsnet.net>
References: <20191213070559.50319-1-yszhou4tech@gmail.com>
 <cd162aac-2d45-08a9-25d8-f4b749850cde@wwsnet.net>
Message-ID: <CAECwjAhoTDX-Z4v-=mr5aO0dazSJPcwMHV+bjX7JAPYYNOPyEQ@mail.gmail.com>

On Fri, 13 Dec 2019 at 16:58, Jo-Philipp Wich <jo at mein.io> wrote:
>
> Hi,
>
> per definition, zone forward policies were only ever meant to apply to
> traffic between interfaces within the same zone *not* to traffic
> anywhere else.
>
> Your patch would break that assumption as far as I can see.
>
> ~ Jo

I see.  I always thought that wan forward policy being REJECT by
default was for not forwarding traffic _from_ wan.  Hah,
embarrassing...  Please just ignore this one and take over FS#2525
from here.

Regards,
                yousong

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Fri Dec 13 05:05:10 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Fri, 13 Dec 2019 11:05:10 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 0/2] blocd: fix vlist holding devices
Message-ID: <20191213100512.31373-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

I noticed that "ubus call block info" was listing only the last added
devices for me. It has appeared to be a wrong vlist usage + memory
corruption.

After review/apply I'd like to cherry-pick those fixes to 19.07.

Rafa? Mi?ecki (2):
  blockd: fix vlist memory corruption
  blockd: don't flush devices list on "hotplug" call

 blockd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Fri Dec 13 05:05:11 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Fri, 13 Dec 2019 11:05:11 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 1/2] blockd: fix vlist memory
 corruption
In-Reply-To: <20191213100512.31373-1-zajec5@gmail.com>
References: <20191213100512.31373-1-zajec5@gmail.com>
Message-ID: <20191213100512.31373-2-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

vlist_add() expects key to point a persistent memory as it doesn't make
its copy. Passing blob_attr of current message was resulting in
undefined/random behavior including list corruption and possible
crashes.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 blockd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blockd.c b/blockd.c
index 88fe168..7375b2b 100644
--- a/blockd.c
+++ b/blockd.c
@@ -255,7 +255,7 @@ block_hotplug(struct ubus_context *ctx, struct ubus_object *obj,
 		strcpy(_name, devname);
 		device->target = __target;
 		strcpy(__target, target);
-		vlist_add(&devices, &device->node, blobmsg_get_string(data[MOUNT_DEVICE]));
+		vlist_add(&devices, &device->node, device->name);
 	}
 	vlist_flush(&devices);
 
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Fri Dec 13 05:05:12 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Fri, 13 Dec 2019 11:05:12 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 2/2] blockd: don't flush devices
 list on "hotplug" call
In-Reply-To: <20191213100512.31373-1-zajec5@gmail.com>
References: <20191213100512.31373-1-zajec5@gmail.com>
Message-ID: <20191213100512.31373-3-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

The point of "hotplug" call is to add or remove a single entry to/from
devices list. Using vlist_update() and vlist_flush() was clearing whole
list (and leaving the last entry in case of adding a devices).

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 blockd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/blockd.c b/blockd.c
index 7375b2b..e07530c 100644
--- a/blockd.c
+++ b/blockd.c
@@ -237,7 +237,6 @@ block_hotplug(struct ubus_context *ctx, struct ubus_object *obj,
 	if (!device)
 		return UBUS_STATUS_UNKNOWN_ERROR;
 
-	vlist_update(&devices);
 	if (data[MOUNT_REMOVE]) {
 		vlist_delete(&devices, &device->node);
 	} else {
@@ -257,7 +256,6 @@ block_hotplug(struct ubus_context *ctx, struct ubus_object *obj,
 		strcpy(__target, target);
 		vlist_add(&devices, &device->node, device->name);
 	}
-	vlist_flush(&devices);
 
 	return 0;
 }
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From freifunk at adrianschmutzler.de  Fri Dec 13 06:11:46 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Fri, 13 Dec 2019 12:11:46 +0100
Subject: [OpenWrt-Devel] [RFT PATCH v2] mediatek: split base-files into
 subtargets
Message-ID: <20191213111146.1492-1-freifunk@adrianschmutzler.de>

This splits some base-files across subtargets, as done previously
on ath79 and ramips and also introduced for mt7629 subtarget here
already.

While at it, apply the following fixes:
- Remove lots of trailing whitespaces
- Remove wildcard on unielec,u7623-02-emmc-512m
- Remove inconsistent quotation marks in cases

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>

---

Changes in v2:
- rebase

Note that the "left-over" platform_check_image for mt7622 looks odd.
I kept the original logic for now.
---
 .../mt7622/base-files/etc/board.d/02_network  | 29 ++++++++++++++
 .../mt7622/base-files/lib/upgrade/platform.sh | 25 ++++++++++++
 .../base-files/etc/board.d/02_network         |  8 ++--
 .../base-files/lib/preinit/07_set_iface_mac   |  2 +-
 .../base-files/lib/preinit/79_move_config     |  0
 .../base-files/lib/upgrade/platform.sh        | 38 +++++++++----------
 6 files changed, 78 insertions(+), 24 deletions(-)
 create mode 100755 target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
 create mode 100755 target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
 rename target/linux/mediatek/{ => mt7623}/base-files/etc/board.d/02_network (85%)
 rename target/linux/mediatek/{ => mt7623}/base-files/lib/preinit/07_set_iface_mac (97%)
 rename target/linux/mediatek/{ => mt7623}/base-files/lib/preinit/79_move_config (100%)
 rename target/linux/mediatek/{ => mt7623}/base-files/lib/upgrade/platform.sh (50%)

diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
new file mode 100755
index 0000000000..d719a35dec
--- /dev/null
+++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+. /lib/functions.sh
+. /lib/functions/uci-defaults.sh
+. /lib/functions/system.sh
+
+mediatek_setup_interfaces()
+{
+	local board="$1"
+
+	case $board in
+	esac
+}
+
+mediatek_setup_macs()
+{
+	local board="$1"
+
+	case $board in
+	esac
+}
+
+board_config_update
+board=$(board_name)
+mediatek_setup_interfaces $board
+mediatek_setup_macs $board
+board_config_flush
+
+exit 0
diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
new file mode 100755
index 0000000000..396c814ab7
--- /dev/null
+++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
@@ -0,0 +1,25 @@
+platform_do_upgrade() {
+	local board=$(board_name)
+	case "$board" in
+	*)
+		default_do_upgrade "$1"
+		;;
+	esac
+}
+
+PART_NAME=firmware
+
+platform_check_image() {
+	local board=$(board_name)
+
+	[ "$#" -gt 1 ] && return 1
+
+	case "$board" in
+	*)
+		echo "Sysupgrade is not supported on your board yet."
+		return 1
+		;;
+	esac
+
+	return 0
+}
diff --git a/target/linux/mediatek/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7623/base-files/etc/board.d/02_network
similarity index 85%
rename from target/linux/mediatek/base-files/etc/board.d/02_network
rename to target/linux/mediatek/mt7623/base-files/etc/board.d/02_network
index faa2434241..3b71ffe3aa 100755
--- a/target/linux/mediatek/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/mt7623/base-files/etc/board.d/02_network
@@ -9,12 +9,12 @@ mediatek_setup_interfaces()
 	local board="$1"
 
 	case $board in
-	'mediatek,mt7623a-rfb-emmc')
+	mediatek,mt7623a-rfb-emmc)
 		ucidef_set_interface_lan "lan0 lan1 lan2 lan3"
 		ucidef_set_interface_wan eth1
 		;;
-	'bananapi,bpi-r2'|\
-	"unielec,u7623"*)
+	bananapi,bpi-r2|\
+	unielec,u7623-02-emmc-512m)
 		ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "wan"
 		;;
 	esac
@@ -25,7 +25,7 @@ mediatek_setup_macs()
 	local board="$1"
 
 	case $board in
-	"unielec,u7623"*)
+	unielec,u7623-02-emmc-512m)
 		mac=$(cat /sys/class/net/wan/address)
 		ucidef_set_interface_macaddr "wan" $mac
 		;;
diff --git a/target/linux/mediatek/base-files/lib/preinit/07_set_iface_mac b/target/linux/mediatek/mt7623/base-files/lib/preinit/07_set_iface_mac
similarity index 97%
rename from target/linux/mediatek/base-files/lib/preinit/07_set_iface_mac
rename to target/linux/mediatek/mt7623/base-files/lib/preinit/07_set_iface_mac
index 3d04000738..7a73a2d84d 100644
--- a/target/linux/mediatek/base-files/lib/preinit/07_set_iface_mac
+++ b/target/linux/mediatek/mt7623/base-files/lib/preinit/07_set_iface_mac
@@ -10,7 +10,7 @@ preinit_set_mac_address() {
 	. /lib/functions/system.sh
 
 	case $(board_name) in
-	"unielec,u7623"*)
+	unielec,u7623-02-emmc-512m)
 		if [ -b $RECOVERY_PART ]; then
 			insmod nls_cp437
 			insmod nls_iso8859-1
diff --git a/target/linux/mediatek/base-files/lib/preinit/79_move_config b/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config
similarity index 100%
rename from target/linux/mediatek/base-files/lib/preinit/79_move_config
rename to target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config
diff --git a/target/linux/mediatek/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
similarity index 50%
rename from target/linux/mediatek/base-files/lib/upgrade/platform.sh
rename to target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
index 9c99ee1c18..39dcb8e831 100755
--- a/target/linux/mediatek/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
@@ -1,7 +1,7 @@
-platform_do_upgrade() {                 
+platform_do_upgrade() {
 	local board=$(board_name)
 	case "$board" in
-	"unielec,u7623"*)
+	unielec,u7623-02-emmc-512m)
 		#Keep the persisten random mac address (if it exists)
 		mkdir -p /tmp/recovery
 		mount -o rw,noatime /dev/mmcblk0p1 /tmp/recovery
@@ -26,29 +26,29 @@ platform_do_upgrade() {
 
 PART_NAME=firmware
 
-platform_check_image() {                                                         
-	local board=$(board_name)                                                
-	local magic="$(get_magic_long "$1")"                                     
+platform_check_image() {
+	local board=$(board_name)
+	local magic="$(get_magic_long "$1")"
 
-	[ "$#" -gt 1 ] && return 1                                               
+	[ "$#" -gt 1 ] && return 1
 
-	case "$board" in                                                       
+	case "$board" in
 	bananapi,bpi-r2|\
-	"unielec,u7623"*)
-		[ "$magic" != "27051956" ] && {   
+	unielec,u7623-02-emmc-512m)
+		[ "$magic" != "27051956" ] && {
 			echo "Invalid image type."
-			return 1                                     
-		}                                                    
-		return 0                                             
-		;;                                                   
+			return 1
+		}
+		return 0
+		;;
 
-	*)                                                           
+	*)
 		echo "Sysupgrade is not supported on your board yet."
-		return 1                                             
-		;;                                
-	esac                                      
+		return 1
+		;;
+	esac
 
-	return 0                                                                                         
+	return 0
 }
 
 platform_copy_config_emmc() {
@@ -61,7 +61,7 @@ platform_copy_config_emmc() {
 
 platform_copy_config() {
 	case "$(board_name)" in
-	"unielec,u7623"*)
+	unielec,u7623-02-emmc-512m)
 		platform_copy_config_emmc
 		;;
 	esac
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Fri Dec 13 07:44:31 2019
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Fri, 13 Dec 2019 13:44:31 +0100
Subject: [OpenWrt-Devel] libblkid-tiny: bugged buffer management
In-Reply-To: <94e6f04d-19c5-3818-0748-db4ec0d481ad@gmail.com>
References: <94e6f04d-19c5-3818-0748-db4ec0d481ad@gmail.com>
Message-ID: <88022db3-abe4-de12-118c-e9b74d8a331b@gmail.com>

On 26.08.2019 17:33, Rafa? Mi?ecki wrote:
> I noticed a bug in "block" tool behavior. It was providing inconsistent
> UUIDs for my disks with NTFS partitions.
> 
> (...)
> 
> That bug was exposed by cache_load(0) vs. cache_load(1). Those calls
> result in different order of buffer allocation in the
> blkid_probe_get_buffer().
> 
> This problem is caused by:
> 1) blkid_probe_get_buffer() resuing buffer when possible
> 2) __probe_ntfs() reading multiple blocks
> 
> As you can probably guess any subsequent block ready can overwrite a
> content of previously returned block content buffer. In __probe_ntfs()
> case it's something like:
> 
> ns = blkid_probe_get_sb(...);
> buf_mft = blkid_probe_get_buffer(...);
> buf_mft = blkid_probe_get_buffer(...);
> ns->volume_serial
> 
> If you take a look at blkid_probe_get_buffer() in the original project
> (util-linux's libblkid) it's a bit more complicated:
> https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/libblkid/src/probe.c#n640

Another user noticed the same bug and posted a workaround:
[PATCH] fstools: fix libblkid-tiny ntfs uuid detection
https://patchwork.ozlabs.org/patch/1157097/

Another example is vfat which cannot detect one of my partitions. It's
cased by probe_vfat():
1. Reading vfat superblock:
vs = blkid_probe_get_sb(pr, mag, struct vfat_super_block);
2. Reading while trying to get FAT entry:
buf = blkid_probe_get_buffer(pr, fat_entry_off, buf_size);
3. Trying to access vs data once it was corrupted:
fsinfo_sect = le16_to_cpu(vs->vs_fsinfo_sector);

This bug really requires a proper fix.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From john at phrozen.org  Fri Dec 13 08:07:11 2019
From: john at phrozen.org (John Crispin)
Date: Fri, 13 Dec 2019 14:07:11 +0100
Subject: [OpenWrt-Devel] [RFT PATCH v2] mediatek: split base-files into
 subtargets
In-Reply-To: <20191213111146.1492-1-freifunk@adrianschmutzler.de>
References: <20191213111146.1492-1-freifunk@adrianschmutzler.de>
Message-ID: <89b69073-cddb-5b08-d555-08efd97dd9f0@phrozen.org>

On 13/12/2019 12:11, Adrian Schmutzler wrote:
> This splits some base-files across subtargets, as done previously
> on ath79 and ramips and also introduced for mt7629 subtarget here
> already.
> 
> While at it, apply the following fixes:
> - Remove lots of trailing whitespaces
> - Remove wildcard on unielec,u7623-02-emmc-512m
> - Remove inconsistent quotation marks in cases
> 
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
Acked-by: John Crispin <john at phrozen.org>
I'll be doing some cleanups to the target next week and will look at the 
plaform_check issue
> 
> ---
> 
> Changes in v2:
> - rebase
> 
> Note that the "left-over" platform_check_image for mt7622 looks odd.
> I kept the original logic for now.
> ---
>   .../mt7622/base-files/etc/board.d/02_network  | 29 ++++++++++++++
>   .../mt7622/base-files/lib/upgrade/platform.sh | 25 ++++++++++++
>   .../base-files/etc/board.d/02_network         |  8 ++--
>   .../base-files/lib/preinit/07_set_iface_mac   |  2 +-
>   .../base-files/lib/preinit/79_move_config     |  0
>   .../base-files/lib/upgrade/platform.sh        | 38 +++++++++----------
>   6 files changed, 78 insertions(+), 24 deletions(-)
>   create mode 100755 target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
>   create mode 100755 target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
>   rename target/linux/mediatek/{ => mt7623}/base-files/etc/board.d/02_network (85%)
>   rename target/linux/mediatek/{ => mt7623}/base-files/lib/preinit/07_set_iface_mac (97%)
>   rename target/linux/mediatek/{ => mt7623}/base-files/lib/preinit/79_move_config (100%)
>   rename target/linux/mediatek/{ => mt7623}/base-files/lib/upgrade/platform.sh (50%)
> 
> diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
> new file mode 100755
> index 0000000000..d719a35dec
> --- /dev/null
> +++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
> @@ -0,0 +1,29 @@
> +#!/bin/sh
> +
> +. /lib/functions.sh
> +. /lib/functions/uci-defaults.sh
> +. /lib/functions/system.sh
> +
> +mediatek_setup_interfaces()
> +{
> +	local board="$1"
> +
> +	case $board in
> +	esac
> +}
> +
> +mediatek_setup_macs()
> +{
> +	local board="$1"
> +
> +	case $board in
> +	esac
> +}
> +
> +board_config_update
> +board=$(board_name)
> +mediatek_setup_interfaces $board
> +mediatek_setup_macs $board
> +board_config_flush
> +
> +exit 0
> diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
> new file mode 100755
> index 0000000000..396c814ab7
> --- /dev/null
> +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh
> @@ -0,0 +1,25 @@
> +platform_do_upgrade() {
> +	local board=$(board_name)
> +	case "$board" in
> +	*)
> +		default_do_upgrade "$1"
> +		;;
> +	esac
> +}
> +
> +PART_NAME=firmware
> +
> +platform_check_image() {
> +	local board=$(board_name)
> +
> +	[ "$#" -gt 1 ] && return 1
> +
> +	case "$board" in
> +	*)
> +		echo "Sysupgrade is not supported on your board yet."
> +		return 1
> +		;;
> +	esac
> +
> +	return 0
> +}
> diff --git a/target/linux/mediatek/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7623/base-files/etc/board.d/02_network
> similarity index 85%
> rename from target/linux/mediatek/base-files/etc/board.d/02_network
> rename to target/linux/mediatek/mt7623/base-files/etc/board.d/02_network
> index faa2434241..3b71ffe3aa 100755
> --- a/target/linux/mediatek/base-files/etc/board.d/02_network
> +++ b/target/linux/mediatek/mt7623/base-files/etc/board.d/02_network
> @@ -9,12 +9,12 @@ mediatek_setup_interfaces()
>   	local board="$1"
>   
>   	case $board in
> -	'mediatek,mt7623a-rfb-emmc')
> +	mediatek,mt7623a-rfb-emmc)
>   		ucidef_set_interface_lan "lan0 lan1 lan2 lan3"
>   		ucidef_set_interface_wan eth1
>   		;;
> -	'bananapi,bpi-r2'|\
> -	"unielec,u7623"*)
> +	bananapi,bpi-r2|\
> +	unielec,u7623-02-emmc-512m)
>   		ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "wan"
>   		;;
>   	esac
> @@ -25,7 +25,7 @@ mediatek_setup_macs()
>   	local board="$1"
>   
>   	case $board in
> -	"unielec,u7623"*)
> +	unielec,u7623-02-emmc-512m)
>   		mac=$(cat /sys/class/net/wan/address)
>   		ucidef_set_interface_macaddr "wan" $mac
>   		;;
> diff --git a/target/linux/mediatek/base-files/lib/preinit/07_set_iface_mac b/target/linux/mediatek/mt7623/base-files/lib/preinit/07_set_iface_mac
> similarity index 97%
> rename from target/linux/mediatek/base-files/lib/preinit/07_set_iface_mac
> rename to target/linux/mediatek/mt7623/base-files/lib/preinit/07_set_iface_mac
> index 3d04000738..7a73a2d84d 100644
> --- a/target/linux/mediatek/base-files/lib/preinit/07_set_iface_mac
> +++ b/target/linux/mediatek/mt7623/base-files/lib/preinit/07_set_iface_mac
> @@ -10,7 +10,7 @@ preinit_set_mac_address() {
>   	. /lib/functions/system.sh
>   
>   	case $(board_name) in
> -	"unielec,u7623"*)
> +	unielec,u7623-02-emmc-512m)
>   		if [ -b $RECOVERY_PART ]; then
>   			insmod nls_cp437
>   			insmod nls_iso8859-1
> diff --git a/target/linux/mediatek/base-files/lib/preinit/79_move_config b/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config
> similarity index 100%
> rename from target/linux/mediatek/base-files/lib/preinit/79_move_config
> rename to target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config
> diff --git a/target/linux/mediatek/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
> similarity index 50%
> rename from target/linux/mediatek/base-files/lib/upgrade/platform.sh
> rename to target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
> index 9c99ee1c18..39dcb8e831 100755
> --- a/target/linux/mediatek/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
> @@ -1,7 +1,7 @@
> -platform_do_upgrade() {
> +platform_do_upgrade() {
>   	local board=$(board_name)
>   	case "$board" in
> -	"unielec,u7623"*)
> +	unielec,u7623-02-emmc-512m)
>   		#Keep the persisten random mac address (if it exists)
>   		mkdir -p /tmp/recovery
>   		mount -o rw,noatime /dev/mmcblk0p1 /tmp/recovery
> @@ -26,29 +26,29 @@ platform_do_upgrade() {
>   
>   PART_NAME=firmware
>   
> -platform_check_image() {
> -	local board=$(board_name)
> -	local magic="$(get_magic_long "$1")"
> +platform_check_image() {
> +	local board=$(board_name)
> +	local magic="$(get_magic_long "$1")"
>   
> -	[ "$#" -gt 1 ] && return 1
> +	[ "$#" -gt 1 ] && return 1
>   
> -	case "$board" in
> +	case "$board" in
>   	bananapi,bpi-r2|\
> -	"unielec,u7623"*)
> -		[ "$magic" != "27051956" ] && {
> +	unielec,u7623-02-emmc-512m)
> +		[ "$magic" != "27051956" ] && {
>   			echo "Invalid image type."
> -			return 1
> -		}
> -		return 0
> -		;;
> +			return 1
> +		}
> +		return 0
> +		;;
>   
> -	*)
> +	*)
>   		echo "Sysupgrade is not supported on your board yet."
> -		return 1
> -		;;
> -	esac
> +		return 1
> +		;;
> +	esac
>   
> -	return 0
> +	return 0
>   }
>   
>   platform_copy_config_emmc() {
> @@ -61,7 +61,7 @@ platform_copy_config_emmc() {
>   
>   platform_copy_config() {
>   	case "$(board_name)" in
> -	"unielec,u7623"*)
> +	unielec,u7623-02-emmc-512m)
>   		platform_copy_config_emmc
>   		;;
>   	esac
> 


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From john at phrozen.org  Fri Dec 13 08:09:09 2019
From: john at phrozen.org (John Crispin)
Date: Fri, 13 Dec 2019 14:09:09 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 0/2] blocd: fix vlist holding
 devices
In-Reply-To: <20191213100512.31373-1-zajec5@gmail.com>
References: <20191213100512.31373-1-zajec5@gmail.com>
Message-ID: <5c78852e-63f2-2b5e-d964-bd749968842d@phrozen.org>

On 13/12/2019 11:05, Rafa? Mi?ecki wrote:
> From: Rafa? Mi?ecki <rafal at milecki.pl>
> 
> I noticed that "ubus call block info" was listing only the last added
> devices for me. It has appeared to be a wrong vlist usage + memory
> corruption.
> 
> After review/apply I'd like to cherry-pick those fixes to 19.07.
> 
Acked-by: John Crispin <john at phrozen.org>

> Rafa? Mi?ecki (2):
>    blockd: fix vlist memory corruption
>    blockd: don't flush devices list on "hotplug" call
> 
>   blockd.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From tomek_n at o2.pl  Fri Dec 13 08:16:15 2019
From: tomek_n at o2.pl (Tomasz Maciej Nowak)
Date: Fri, 13 Dec 2019 14:16:15 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] sunxi: construct DTS name from
 device node name and SOC
In-Reply-To: <008b01d5b00f$ac39ba00$04ad2e00$@adrianschmutzler.de>
References: <20191207222826.47389-1-freifunk@adrianschmutzler.de>
 <20191207222826.47389-3-freifunk@adrianschmutzler.de>
 <c548878d-5a73-6530-168b-f42057b124c3@o2.pl>
 <008b01d5b00f$ac39ba00$04ad2e00$@adrianschmutzler.de>
Message-ID: <d482001d-cb94-a41d-7499-efb8c278c757@o2.pl>

W dniu 11.12.2019 o?11:42, Adrian Schmutzler pisze:
> Hi,
> 
>> -----Original Message-----
>> From: Tomasz Maciej Nowak [mailto:tomek_n at o2.pl]
>> Sent: Dienstag, 10. Dezember 2019 14:39
>> To: Adrian Schmutzler <freifunk at adrianschmutzler.de>; openwrt-
>> devel at lists.openwrt.org
>> Subject: Re: [OpenWrt-Devel] [PATCH 2/2] sunxi: construct DTS name from
>> device node name and SOC
>>
>> Hi Adrian.
>>
>> W dniu 07.12.2019 o?23:28, Adrian Schmutzler pisze:
>>> The device part in the SUNXI_DTS variable always corresponds to
>>> device node name. This is another redundancy that can be removed
>>> by calculating the DTS name from a newly introduced SUNXI_SOC
>>> variable and the node name.
>>>
>>> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
>>> ---
>>>  target/linux/sunxi/image/Makefile      |  5 ++-
>>>  target/linux/sunxi/image/cortex-a53.mk | 18 +++++++----
>>>  target/linux/sunxi/image/cortex-a7.mk  | 44 +++++++++++++-------------
>>>  target/linux/sunxi/image/cortex-a8.mk  | 13 ++++----
>>>  4 files changed, 45 insertions(+), 35 deletions(-)
>>>
>>> diff --git a/target/linux/sunxi/image/Makefile
>> b/target/linux/sunxi/image/Makefile
>>> index 04e0abee49..929f4c70f9 100644
>>> --- a/target/linux/sunxi/image/Makefile
>>> +++ b/target/linux/sunxi/image/Makefile
>>> @@ -32,12 +32,15 @@ endef
>>>  # why \x00\x00\x00\x00 for zImage-initramfs
>>>  define Device/Default
>>>    PROFILES := Default
>>> -  DEVICE_VARS := SUNXI_DTS SUNXI_UBOOT
>>> +  DEVICE_VARS := SUNXI_SOC SUNXI_DTS SUNXI_DTS_DIR SUNXI_UBOOT
>>
>> Instead of adding new target speciffic variables, wouldn't using already
>> specified ones be better? We have DEVICE_DTS and DEVICE_DTS_DIR. Also the
> 
> Based on
> https://github.com/openwrt/openwrt/commit/7a8d3432c739c6ff038295176e8b6324e92fc116
> I had the impression that DEVICE_DTS and DEVICE_DTS_DIR are reserved keywords for a particular mechanism to append DTB.

These are not reserved at all. Other targets use it.

> 
> Thus, and since the target has been using "custom" SUNXI_DTS variable so far, I decided to stick to that pattern.

Looking at git history that variable precedes DEVICE_DTS, so I assume there was
no one bothered to convert it when global one was introduced. Now is best time
to do that.

> 
>> SUNXI_SOC feels bit redundant since it needs to be specified for each device
>> and it could be replaced with DEVICE_DTS := sun50i-h5-$(1) or simply full dts
>> name.
> 
> No, because I need to cut down the device name, so it would be
> DEVICE_DTS := sun50i-h5-$(lastword $(subst _, ,$(1)))
> which I would not like to repeat over and over.

Yeah, forgot about replacing separator with dash.

> 
> I admit that changing the DTS variable is the weakest part in my patchset. However, I think introducing the SUNXI_SOC and SUNXI_DTS_DIR will make the target more organized. Despite, by this it becomes more consistent with other targets where this has been reorganized recently (i.e. ath79 and ramips, where we use ATH_SOC and MTK_SOC to do the very same).
> At least I personally think that this is better that repeating the very same name again in the DTS definition.

Well, I've no strong feelings against using SUNXI_SOC, it's reasonable given
Your explanation, but SUNXI_DTS_DIR should be changed to global one.

> 
> Best
> 
> Adrian
> 

Regards

-- 
TMN

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From karlp at etactica.com  Fri Dec 13 09:38:14 2019
From: karlp at etactica.com (Karl Palsson)
Date: Fri, 13 Dec 2019 14:38:14 +0000
Subject: [OpenWrt-Devel] [PATCH] uboot-envtools: ath79: add etactica eg200
 support
Message-ID: <20191213143814.25083-1-karlp@etactica.com>

Was inadvertantly missed from the inital forward port from ar71xx to
ath79.

Fixes: 1588114cf2 ath79: add etactica-eg200 support

Signed-off-by: Karl Palsson <karlp at etactica.com>
---
 package/boot/uboot-envtools/files/ath79 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index 1499aa19a2..f956cf4ed4 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -16,6 +16,7 @@ case "$board" in
 alfa-network,ap121f|\
 buffalo,bhr-4grv2|\
 engenius,ecb1750|\
+etactica,eg200|\
 glinet,gl-ar300m-lite|\
 glinet,gl-ar300m-nand|\
 glinet,gl-ar300m-nor|\
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Fri Dec 13 09:42:09 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Fri, 13 Dec 2019 15:42:09 +0100
Subject: [OpenWrt-Devel] [RFT PATCH v2] mediatek: split base-files into
 subtargets
In-Reply-To: <89b69073-cddb-5b08-d555-08efd97dd9f0@phrozen.org>
References: <20191213111146.1492-1-freifunk@adrianschmutzler.de>
 <89b69073-cddb-5b08-d555-08efd97dd9f0@phrozen.org>
Message-ID: <015401d5b1c3$8269d290$873d77b0$@adrianschmutzler.de>

Hi John,

> -----Original Message-----
> From: John Crispin [mailto:john at phrozen.org]
> Sent: Freitag, 13. Dezember 2019 14:07
> To: Adrian Schmutzler <freifunk at adrianschmutzler.de>; openwrt-
> devel at lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [RFT PATCH v2] mediatek: split base-files into
> subtargets
> 
> On 13/12/2019 12:11, Adrian Schmutzler wrote:
> > This splits some base-files across subtargets, as done previously
> > on ath79 and ramips and also introduced for mt7629 subtarget here
> > already.
> >
> > While at it, apply the following fixes:
> > - Remove lots of trailing whitespaces
> > - Remove wildcard on unielec,u7623-02-emmc-512m
> > - Remove inconsistent quotation marks in cases
> >
> > Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> Acked-by: John Crispin <john at phrozen.org>
> I'll be doing some cleanups to the target next week and will look at the
> plaform_check issue

Sounds to me like it will be easiest if you push this patch together with the others then?

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191213/680d915d/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From dengqf6 at mail2.sysu.edu.cn  Fri Dec 13 11:24:19 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Sat, 14 Dec 2019 00:24:19 +0800
Subject: [OpenWrt-Devel] [PATCH] ramips: add support for JCG JHR-AC876M
Message-ID: <20191213162419.11469-1-dengqf6@mail2.sysu.edu.cn>

JCG JHR-AC876M is an AC2600M router

Hardware specs:
  SoC: MT7621AT
  2.4GHz: MT7615N 4x4 @ PCIe0
  5GHz: MT7615N 4x4 @ PCIe1
  Flash: Winbond W25Q128JVSQ 16MiB
  RAM: Nanya NT5CB128M16 256MiB
  USB 2.0 and 3.0 ports
  6 LEDs, 3 of which are connected to SoC GPIO
  Reset and WPS buttons

Flash instructions:
Stock to OpenWrt:
  Upload factory.bin in stock firmware's upgrade page,
  do not preserve settings

OpenWrt to stock:
  Push and hold the reset button for 5s while power cycling to
  enter recovery mode;
  Visit 192.168.1.1 and upload stock firmware

MAC addresses map:
  0x0004  *:1c  wlan2g/wan/label
  0x8004  *:20  wlan5g
  0xe000  *:1b  lan
  0xe006  *:1a  not used in stock fw

Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
---
Changes since v2:
	Flattened pinctrl node
	Add MAC addresses map in commit message
	Use kilobytes as JCG_MAXSIZE unit
---
 .../ramips/dts/mt7621_jcg_jhr-ac876m.dts      | 144 ++++++++++++++++++
 target/linux/ramips/image/mt7621.mk           |  13 ++
 .../mt7621/base-files/etc/board.d/02_network  |   5 +
 3 files changed, 162 insertions(+)
 create mode 100644 target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts

diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
new file mode 100644
index 0000000000..10766c0649
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
@@ -0,0 +1,144 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "jcg,jhr-ac876m", "mediatek,mt7621-soc";
+	model = "JCG JHR-AC876M";
+
+	aliases {
+		led-boot = &led_wps;
+		led-failsafe = &led_wps;
+		led-running = &led_wps;
+		led-upgrade = &led_wps;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,57600";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		usb3 {
+			label = "jhr-ac876m:blue:usb3";
+			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&xhci_ehci_port1>;
+			linux,default-trigger = "usbport";
+		};
+
+		usb2 {
+			label = "jhr-ac876m:blue:usb2";
+			gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ehci_port2>;
+			linux,default-trigger = "usbport";
+		};
+
+		led_wps: wps {
+			label = "jhr-ac876m:blue:wps";
+			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <80000000>;
+		m25p,fast-read;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x30000>;
+				read-only;
+			};
+
+			partition at 30000 {
+				label = "u-boot-env";
+				reg = <0x30000 0x10000>;
+				read-only;
+			};
+
+			factory: partition at 40000 {
+				label = "factory";
+				reg = <0x40000 0x10000>;
+				read-only;
+			};
+
+			partition at 50000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x50000 0xfb0000>;
+			};
+		};
+	};
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie0 {
+	wifi at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x0>;
+		ieee80211-freq-limit = <2400000 2500000>;
+
+		led {
+			led-active-low;
+		};
+	};
+};
+
+&pcie1 {
+	wifi at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x8000>;
+		ieee80211-freq-limit = <5000000 6000000>;
+
+		led {
+			led-active-low;
+		};
+	};
+};
+
+&ethernet {
+	mtd-mac-address = <&factory 0xe000>;
+};
+
+&state_default {
+	gpio {
+		ralink,group = "i2c", "uart3", "jtag", "wdt";
+		ralink,function = "gpio";
+	};
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 0b2b74800a..6120ad8ec9 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -361,6 +361,19 @@ define Device/iodata_wnpr2600g
 endef
 TARGET_DEVICES += iodata_wnpr2600g
 
+define Device/jcg_jhr-ac876m
+  MTK_SOC := mt7621
+  IMAGE_SIZE := 16064k
+  IMAGES += factory.bin
+  IMAGE/factory.bin := \
+        $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 89.1
+  JCG_MAXSIZE := 16064k
+  DEVICE_VENDOR := JCG
+  DEVICE_MODEL := JHR-AC876M
+  DEVICE_PACKAGES := kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
+endef
+TARGET_DEVICES += jcg_jhr-ac876m
+
 define Device/lenovo_newifi-d1
   MTK_SOC := mt7621
   IMAGE_SIZE := 32448k
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index c9e3cbb984..ed2c5bb185 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -14,6 +14,7 @@ ramips_setup_interfaces()
 	d-team,pbr-m1|\
 	firefly,firewrt|\
 	hiwifi,hc5962|\
+	jcg,jhr-ac876m|\
 	mediatek,ap-mt7621a-v60|\
 	mediatek,mt7621-eval-board|\
 	mqmaker,witi|\
@@ -218,6 +219,10 @@ ramips_setup_macs()
 		wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
 		label_mac=$wan_mac
 		;;
+	jcg,jhr-ac876m)
+		label_mac=$(mtd_get_mac_binary factory 0x4)
+		wan_mac=$label_mac
+		;;
 	mediatek,ap-mt7621a-v60)
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x5)" 1)
 		;;
-- 
2.24.1




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dengqf6 at mail2.sysu.edu.cn  Fri Dec 13 11:24:39 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Sat, 14 Dec 2019 00:24:39 +0800
Subject: [OpenWrt-Devel] [PATCH] ramips: move set-irq-affinity script to
 mt7621 subtarget
Message-ID: <20191213162439.11543-1-dengqf6@mail2.sysu.edu.cn>

Move the set-irq-affinity script to mt7621 because it is the only
SMP subtarget.

Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
---
 .../ramips/{ => mt7621}/base-files/etc/init.d/set-irq-affinity    | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename target/linux/ramips/{ => mt7621}/base-files/etc/init.d/set-irq-affinity (100%)

diff --git a/target/linux/ramips/base-files/etc/init.d/set-irq-affinity b/target/linux/ramips/mt7621/base-files/etc/init.d/set-irq-affinity
similarity index 100%
rename from target/linux/ramips/base-files/etc/init.d/set-irq-affinity
rename to target/linux/ramips/mt7621/base-files/etc/init.d/set-irq-affinity
-- 
2.24.1




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Fri Dec 13 11:44:48 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Fri, 13 Dec 2019 17:44:48 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: add support for JCG JHR-AC876M
In-Reply-To: <20191213162419.11469-1-dengqf6@mail2.sysu.edu.cn>
References: <20191213162419.11469-1-dengqf6@mail2.sysu.edu.cn>
Message-ID: <019201d5b1d4$a35ef4b0$ea1cde10$@adrianschmutzler.de>

Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On
> Behalf Of DENG Qingfang
> Sent: Freitag, 13. Dezember 2019 17:24
> To: openwrt-devel at lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH] ramips: add support for JCG JHR-AC876M
> 
> JCG JHR-AC876M is an AC2600M router

I've added this to my staging tree [1] and will merge it as soon as @DavideFioravanti has tested the jcg-header change for his Cudy WR1000 [2].

[1] https://git.openwrt.org/?p=openwrt/staging/adrian.git;a=shortlog;h=refs/heads/staging
[2] https://github.com/openwrt/openwrt/pull/2062#issuecomment-565415609

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191213/589be49c/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From devel-sven at geroedel.de  Fri Dec 13 14:50:46 2019
From: devel-sven at geroedel.de (Sven Roederer)
Date: Fri, 13 Dec 2019 20:50:46 +0100
Subject: [OpenWrt-Devel] [PATCH 19.07] ath79: add support for gl-ar750
Message-ID: <20191213195046.13358-1-devel-sven@geroedel.de>

From: Luochongjun <luochongjun at gl-inet.com>

This patch supports gl-ar750, which was previously supported by ar71xx.

Specification:
- SOC: QCA9531 (650MHz)
- Flash: 16 MiB (W25Q128FVSG)
- RAM: 128 MiB DDR2
- Ethernet: 10/100: 2xLAN + 10/100: 1xWAN
- Wireless: 2.4GHz (bgn) and 5GHz (ac)
- USB: 1x USB 2.0 port
- Switch: 1x switch
- Button: 1x reset button
- LED: 3x LEDS (white)

Flash instruction:
Support for sysupgrade directive upgrades, as well as luci upgrades.

Signed-off-by: Luochongjun <luochongjun at gl-inet.com>
(cherry picked from commit 921675a2d148330a7ec44f10ea4d583b8d7b5a44)
[backported to 19.07]
Signed-off-by: Sven Roederer <devel-sven at geroedel.de>
---
 .../ath79/base-files/etc/board.d/02_network   |   5 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata  |   1 +
 .../ath79/dts/qca9531_glinet_gl-ar750.dts     | 142 ++++++++++++++++++
 target/linux/ath79/image/generic.mk           |   9 ++
 4 files changed, 157 insertions(+)
 create mode 100644 target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts

diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network
index 82c1e09981..41c8e37e31 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -128,6 +128,11 @@ ath79_setup_interfaces()
 	etactica,eg200)
 		ucidef_set_interface_lan "eth0" "dhcp"
 		;;
+	glinet,gl-ar750)
+		ucidef_set_interface_wan "eth1"
+		ucidef_add_switch "switch0" \
+			"0 at eth0" "1:lan" "2:lan"
+		;;
 	glinet,gl-ar750s)
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "2:lan:2" "3:lan:1" "1:wan"
diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index d1f529fde5..cf28c474b1 100644
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -117,6 +117,7 @@ case "$FIRMWARE" in
 		ath10kcal_extract "art" 20480 2116
 		ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1)
 		;;
+	glinet,gl-ar750|\
 	glinet,gl-ar750s)
 		ath10kcal_extract "art" 20480 2116
 		ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) +1)
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
new file mode 100644
index 0000000000..54aad320f6
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
@@ -0,0 +1,142 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "qca953x.dtsi"
+
+/ {
+	compatible = "glinet,gl-ar750", "qca,qca9531";
+	model = "GL.iNet GL-AR750";
+
+	keys {
+		compatible = "gpio-keys";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&jtag_disable_pins>;
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+		};
+
+		mode {
+			label = "mode";
+			linux,code = <BTN_0>;
+			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		power {
+			label = "gl-ar750:white:power";
+			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+		};
+
+		wlan2g {
+			label = "gl-ar750:white:wlan2g";
+			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
+		};
+
+		wlan5g {
+			label = "gl-ar750:white:wlan5g";
+			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
+		};
+
+	};
+
+	i2c {
+		compatible = "i2c-gpio";
+
+		sda-gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+		scl-gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+	};
+
+
+};
+
+&pcie0 {
+	status = "okay";
+
+	wifi at 0,0 {
+		compatible = "qcom,ath10k";
+		reg = <0 0 0 0 0>;
+		device_type = "pci";
+	};
+};
+
+&uart {
+	status = "okay";
+};
+
+&usb0 {
+	status = "okay";
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&spi {
+	status = "okay";
+	num-cs = <0>;
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x000000 0x040000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "u-boot-env";
+				reg = <0x040000 0x010000>;
+				read-only;
+			};
+
+			art: partition at 50000 {
+				label = "art";
+				reg = <0x050000 0x010000>;
+				read-only;
+			};
+
+			partition at 60000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x060000 0xfa0000>;
+			};
+		};
+	};
+};
+
+&eth0 {
+	status = "okay";
+	mtd-mac-address = <&art 0x0>;
+	phy-handle = <&swphy4>;
+};
+
+&eth1 {
+	mtd-mac-address = <&art 0x0>;
+	mtd-mac-address-increment = <1>;
+};
+
+&wmac {
+	status = "okay";
+	mtd-cal-data = <&art 0x1000>;
+};
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 625c2bdd05..f8db5fca6f 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -397,6 +397,15 @@ define Device/glinet_gl-ar300m-nor
 endef
 #TARGET_DEVICES += glinet_gl-ar300m-nor
 
+define Device/glinet_gl-ar750
+  ATH_SOC := qca9531
+  DEVICE_TITLE := GL.iNet GL-AR750
+  DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct
+  IMAGE_SIZE := 16000k
+  SUPPORTED_DEVICES += gl-ar750
+endef
+TARGET_DEVICES += glinet_gl-ar750
+
 define Device/glinet_gl-ar750s
   ATH_SOC := qca9563
   DEVICE_TITLE := GL.iNet GL-AR750S
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Fri Dec 13 15:07:23 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Fri, 13 Dec 2019 23:07:23 +0300
Subject: [OpenWrt-Devel] [PATCH 19.07] ath79: add support for gl-ar750
In-Reply-To: <20191213195046.13358-1-devel-sven@geroedel.de>
References: <20191213195046.13358-1-devel-sven@geroedel.de>
Message-ID: <20191213200723.GX11070@home.paul.comp>

Hello,

On Fri, Dec 13, 2019 at 08:50:46PM +0100, Sven Roederer wrote:
>  .../ath79/base-files/etc/board.d/02_network   |   5 +
>  .../etc/hotplug.d/firmware/11-ath10k-caldata  |   1 +
>  .../ath79/dts/qca9531_glinet_gl-ar750.dts     | 142 ++++++++++++++++++
>  target/linux/ath79/image/generic.mk           |   9 ++

Is this not missing the additions to board.d/01_leds ?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Fri Dec 13 15:21:14 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Fri, 13 Dec 2019 21:21:14 +0100
Subject: [OpenWrt-Devel] [PATCH 19.07] ath79: add support for gl-ar750
In-Reply-To: <20191213195046.13358-1-devel-sven@geroedel.de>
References: <20191213195046.13358-1-devel-sven@geroedel.de>
Message-ID: <01c401d5b1f2$ded6d1c0$9c847540$@adrianschmutzler.de>

Hi Sven,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On
> Behalf Of Sven Roederer
> Sent: Freitag, 13. Dezember 2019 20:51
> To: openwrt-devel at lists.openwrt.org
> Cc: Luochongjun <luochongjun at gl-inet.com>
> Subject: [OpenWrt-Devel] [PATCH 19.07] ath79: add support for gl-ar750

so, the primary question remains unanswered: Why should exactly this device be backported (out of the big set of devices only in master)?

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191213/ece17505/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From lucy.mitchell at metamediaprodatasolutions.com  Fri Dec 13 16:33:28 2019
From: lucy.mitchell at metamediaprodatasolutions.com (Lucy Mitchell)
Date: Sat, 14 Dec 2019 03:03:28 +0530
Subject: [OpenWrt-Devel] Embedded World Exhibition & Conference
Message-ID: <!&!AAAAAAAAAAAYAAAAAAAAAGaUIo+vL9tHkzMA6WtwcifCgAAAEAAAAFFUacguNFJHjKYboh9OGMgBAAAAAA==@metamediaprodatasolutions.com>

Hi greetings 

Will you be interested in acquiring the attendees list of Embedded World
Exhibition & Conference? The leading international fair for embedded
systems.

Visitors list: 32,000 trade visitors and 2,200 conference participants from
77 countries.

Date: 25 - 27 Feb 2020

Location: Nurnberg Messe GmbH, Nuremberg, Germany

The counts given above are GDPR complaint with all the rules and regulations
with 100% opt-in contacts.

We provide all the relevant information about the attendee including email,
phone and mailing address. Hence you can use this information for your
email, telephonic and mailing campaigns.

Let me know if you would like to proceed with purchasing opt in contacts.

Awaiting your response 

Regards 

Lucy Mitchell | Business Analyst

Note: - If this is something you are interested in, please respond to this
email. If this is not of your interest, reply as "Exclude" so we will not
email you again.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191214/fa437d70/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From devel-sven at geroedel.de  Fri Dec 13 17:46:22 2019
From: devel-sven at geroedel.de (Sven Roederer)
Date: Fri, 13 Dec 2019 23:46:22 +0100
Subject: [OpenWrt-Devel] [PATCH 19.07] ath79: add support for gl-ar750
In-Reply-To: <01c401d5b1f2$ded6d1c0$9c847540$@adrianschmutzler.de>
References: <20191213195046.13358-1-devel-sven@geroedel.de>
 <01c401d5b1f2$ded6d1c0$9c847540$@adrianschmutzler.de>
Message-ID: <2161512.f3matcrDuR@strike>

Adrian,

it's just that I've this patch around for some time, as I use this device on 
19.07. So just sharing this patch ...

Sven

Am Freitag, 13. Dezember 2019, 21:21:14 CET schrieb Adrian Schmutzler:
> Hi Sven,
> 
> so, the primary question remains unanswered: Why should exactly this device
> be backported (out of the big set of devices only in master)?
> 




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From devel-sven at geroedel.de  Fri Dec 13 17:51:14 2019
From: devel-sven at geroedel.de (Sven Roederer)
Date: Fri, 13 Dec 2019 23:51:14 +0100
Subject: [OpenWrt-Devel] [PATCH 19.07] ath79: add support for gl-ar750
In-Reply-To: <20191213200723.GX11070@home.paul.comp>
References: <20191213195046.13358-1-devel-sven@geroedel.de>
 <20191213200723.GX11070@home.paul.comp>
Message-ID: <2070834.sci2Q4oWNF@strike>

Am Freitag, 13. Dezember 2019, 21:07:23 CET schrieb Paul Fertser:
> Hello,
> 
> On Fri, Dec 13, 2019 at 08:50:46PM +0100, Sven Roederer wrote:
> >  .../ath79/base-files/etc/board.d/02_network   |   5 +
> >  .../etc/hotplug.d/firmware/11-ath10k-caldata  |   1 +
> >  .../ath79/dts/qca9531_glinet_gl-ar750.dts     | 142 ++++++++++++++++++
> >  target/linux/ath79/image/generic.mk           |   9 ++
> 
> Is this not missing the additions to board.d/01_leds ?

Paul,

good point. But also on master seems to be no entry for this board in 
"01_leds". So I assume the default case fits  for it.

Sven



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Fri Dec 13 18:10:28 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sat, 14 Dec 2019 02:10:28 +0300
Subject: [OpenWrt-Devel] [PATCH 19.07] ath79: add support for gl-ar750
In-Reply-To: <2070834.sci2Q4oWNF@strike>
References: <20191213195046.13358-1-devel-sven@geroedel.de>
 <20191213200723.GX11070@home.paul.comp> <2070834.sci2Q4oWNF@strike>
Message-ID: <20191213231028.GY11070@home.paul.comp>

Hey Sven,

On Fri, Dec 13, 2019 at 11:51:14PM +0100, Sven Roederer wrote:
> good point. But also on master seems to be no entry for this board in 
> "01_leds". So I assume the default case fits  for it.

I looked several times through the config and was unable to see the
default case. Apparently, you count on trigger being set in DTS, and
that's ok for wlan and power, I see. It's just that I checked ar71xx
and it had those entries in uci-defaults but since triggers can be set
from DTS now that's not needed, got it.

Also, if you're going to improve the patch, I've noticed you have no
DTS designations for how the LEDs are to be used (aliases for led-boot
etc) and no label_mac assignment. Not sure if that's important.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sat Dec 14 00:07:04 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Fri, 13 Dec 2019 21:07:04 -0800
Subject: [OpenWrt-Devel] [PATCH] libcxx: Add package
Message-ID: <20191214050704.995870-1-rosenp@gmail.com>

Currently in OpenWrt, there are two libc++: libstdcpp and uClibc++. The
former is huge and the latter supports only C++98 with some basic support
for C++11. Those C++ versions seem to be specific to the compiler version

libcxx supports C++11 and above while being much smaller than libstdcpp.
On mt7621, these are the sizes of the ipks that I get:

libstdcpp: 460786
libcxx: 182881
uClibc++:67720

libcxx is faster than uClibc++ and is under active development as part of
the LLVM project while uClibc++ is effectively dead.

This PR modifies uclibc++.mk to expose the make menuconfig option. Further
cleanup is beyond the scope of this PR. What that means is, this is not
used by default.

A g++-libcxx wrapper based on the uClibc++ one was added. Works the same
way.

Compile tested with all packages that use uclibc++.mk in their Makefiles
under mipsel_24kc. kismet fails compilation but that package needs to be
cleaned up and updated.

Runtime tested with gddrescue, gdisk, dcwapd, bonnie++, and aircrack-ng
on a TP-Link Archer C7v2.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 config/Config-build.in               |  3 ++
 include/uclibc++.mk                  | 12 +++++-
 package/libs/libcxx/Makefile         | 62 ++++++++++++++++++++++++++++
 package/libs/libcxx/files/g++-libcxx | 19 +++++++++
 4 files changed, 94 insertions(+), 2 deletions(-)
 create mode 100644 package/libs/libcxx/Makefile
 create mode 100755 package/libs/libcxx/files/g++-libcxx

diff --git a/config/Config-build.in b/config/Config-build.in
index 872e5c12ab..bde5730e76 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -197,6 +197,9 @@ menu "Global build settings"
 		config USE_UCLIBCXX
 			bool "uClibc++"
 
+		config USE_LIBCXX
+			bool "libc++"
+
 		config USE_LIBSTDCXX
 			bool "libstdc++"
 	endchoice
diff --git a/include/uclibc++.mk b/include/uclibc++.mk
index a1a61f26d4..27533279c9 100644
--- a/include/uclibc++.mk
+++ b/include/uclibc++.mk
@@ -4,8 +4,8 @@ ifndef DUMP
   endif
 endif
 
-PKG_PREPARED_DEPENDS += CONFIG_USE_UCLIBCXX
-CXX_DEPENDS = +USE_UCLIBCXX:uclibcxx +USE_LIBSTDCXX:libstdcpp
+PKG_PREPARED_DEPENDS += CONFIG_USE_UCLIBCXX CONFIG_USE_LIBCXX
+CXX_DEPENDS = +USE_UCLIBCXX:uclibcxx +USE_LIBCXX:libcxx +USE_LIBSTDCXX:libstdcpp
 
 ifneq ($(CONFIG_USE_UCLIBCXX),)
  ifneq ($(CONFIG_CCACHE),)
@@ -14,3 +14,11 @@ ifneq ($(CONFIG_USE_UCLIBCXX),)
   TARGET_CXX=g++-uc
  endif
 endif
+
+ifneq ($(CONFIG_USE_LIBCXX),)
+ ifneq ($(CONFIG_CCACHE),)
+  TARGET_CXX_NOCACHE=g++-libcxx
+ else
+  TARGET_CXX=g++-libcxx
+ endif
+endif
diff --git a/package/libs/libcxx/Makefile b/package/libs/libcxx/Makefile
new file mode 100644
index 0000000000..c1fa1d6b07
--- /dev/null
+++ b/package/libs/libcxx/Makefile
@@ -0,0 +1,62 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libcxx
+PKG_VERSION:=9.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.llvm.org/git/libcxx
+PKG_SOURCE_VERSION:=2076f539f410805ef88692b9c0ce0a0b882a7680
+PKG_MIRROR_HASH:=6dff036660d478bfaa14e407fc5de26d22da1087118c897b1a3ad2e90cb7bf39
+
+PKG_MAINTAINER:=Rosen Penev <rosenp at gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE.txt
+
+PKG_BUILD_PARALLEL:=1
+CMAKE_BINARY_SUBDIR:=build
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/libcxx
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=LLVM libstdc++
+  URL:=https://libcxx.llvm.org/
+  DEPENDS:=+libatomic +libpthread
+endef
+
+define Package/libcxx/description
+  LLVM C++ library targeting C++11 and above
+endef
+
+CMAKE_OPTIONS += \
+	-DLIBCXX_ENABLE_ASSERTIONS=OFF \
+	-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \
+	-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
+	-DLIBCXX_INCLUDE_DOCS=OFF \
+	-DLIBCXX_INCLUDE_TESTS=OFF \
+	-DLIBCXX_HAS_MUSL_LIBC=ON \
+	-DLIBCXX_STANDALONE_BUILD=ON
+
+TARGET_CXXFLAGS += -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -Wno-attributes -flto
+TARGET_LDFLAGS += -Wl,--as-needed
+
+define Build/InstallDev
+	$(call Build/InstallDev/cmake,$(1))
+	$(CP) files/g++-libcxx	$(TOOLCHAIN_DIR)/bin/
+	$(SED) 's,CXX,$(TARGET_CXX),g' $(TOOLCHAIN_DIR)/bin/g++-libcxx
+endef
+
+define Package/libcxx/install
+	$(INSTALL_DIR)					$(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libc++.so.*	$(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libcxx))
diff --git a/package/libs/libcxx/files/g++-libcxx b/package/libs/libcxx/files/g++-libcxx
new file mode 100755
index 0000000000..81ca46eb0e
--- /dev/null
+++ b/package/libs/libcxx/files/g++-libcxx
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+WRAPPER_INCLUDEDIR="-I$STAGING_DIR/usr/include/c++/v1"
+WRAPPER_LIBDIR="-L$STAGING_DIR/usr/lib"
+WRAPPER_LIBS="-lc -lgcc_s -lssp_nonshared"
+
+WRAPPER_OPTIONS=""
+WRAPPER_INCLIB="Y"
+for arg
+do
+	case "$arg" in
+	-c|-E|-S) WRAPPER_INCLIB="N" ;;
+	-static) [ "$WRAPPER_LIBS" != "-lc -lgcc_s -lssp_nonshared -lgcc_eh" ] && WRAPPER_LIBS="-lc -lgcc_s -lssp_nonshared -lgcc_eh" ;;
+	esac
+done
+[ "$WRAPPER_INCLIB" = "Y" ] && WRAPPER_OPTIONS="-nodefaultlibs $WRAPPER_LIBDIR -lc++ -lsupc++ $WRAPPER_LIBS"
+
+exec CXX -fno-builtin -nostdinc++ -DGCC_HASCLASSVISIBILITY "$WRAPPER_INCLUDEDIR" "$@" $WRAPPER_OPTIONS
+
-- 
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sat Dec 14 00:25:03 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Fri, 13 Dec 2019 21:25:03 -0800
Subject: [OpenWrt-Devel] [PATCH] iperf: Fix compilation with libcxx
Message-ID: <20191214052503.1004780-1-rosenp@gmail.com>

Avoids redefining bool.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/network/utils/iperf/Makefile                 |  2 +-
 package/network/utils/iperf/patches/010-libcxx.patch | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 package/network/utils/iperf/patches/010-libcxx.patch

diff --git a/package/network/utils/iperf/Makefile b/package/network/utils/iperf/Makefile
index 33d00b43d7..3a235fadc7 100644
--- a/package/network/utils/iperf/Makefile
+++ b/package/network/utils/iperf/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iperf
 PKG_VERSION:=2.0.13
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=c88adec966096a81136dda91b4bd19c27aae06df4d45a7f547a8e50d723778ad
diff --git a/package/network/utils/iperf/patches/010-libcxx.patch b/package/network/utils/iperf/patches/010-libcxx.patch
new file mode 100644
index 0000000000..cf0124232f
--- /dev/null
+++ b/package/network/utils/iperf/patches/010-libcxx.patch
@@ -0,0 +1,12 @@
+--- a/config.h.in
++++ b/config.h.in
+@@ -360,7 +360,9 @@
+ #undef _REENTRANT
+ 
+ /* */
++#ifndef __cplusplus
+ #undef bool
++#endif
+ 
+ /* Define to empty if `const' does not conform to ANSI C. */
+ #undef const
-- 
2.23.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Sat Dec 14 06:12:55 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sat, 14 Dec 2019 14:12:55 +0300
Subject: [OpenWrt-Devel] LEDs in system UCI config (was: Re: [PATCH 19.07]
 ath79: add support for gl-ar750)
In-Reply-To: <20191213231028.GY11070@home.paul.comp>
References: <20191213195046.13358-1-devel-sven@geroedel.de>
 <20191213200723.GX11070@home.paul.comp> <2070834.sci2Q4oWNF@strike>
 <20191213231028.GY11070@home.paul.comp>
Message-ID: <20191214111254.GZ11070@home.paul.comp>

Hello,

Some follow-up thoughts, could someone clarify please?

On Sat, Dec 14, 2019 at 02:10:28AM +0300, Paul Fertser wrote:
> On Fri, Dec 13, 2019 at 11:51:14PM +0100, Sven Roederer wrote:
> > good point. But also on master seems to be no entry for this board in 
> > "01_leds". So I assume the default case fits  for it.
> 
> I looked several times through the config and was unable to see the
> default case. Apparently, you count on trigger being set in DTS, and
> that's ok for wlan and power, I see. It's just that I checked ar71xx
> and it had those entries in uci-defaults but since triggers can be set
> from DTS now that's not needed, got it.

So if default trigger can be set in DTS, then it should be set there,
I can see the rationale. But in this case it's not added to the system
config and so repurpusing it for other tasks (or just disabling the
LED) is not straight-forward anymore, as one would need to add it
manually.

Should a uci-defaults script be added to base-files that would
populate the system config with all the LEDs present in the DT but not
added by board config?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Sat Dec 14 10:09:50 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sat, 14 Dec 2019 18:09:50 +0300
Subject: [OpenWrt-Devel] LEDs in system UCI config (was: Re: [PATCH
 19.07] ath79: add support for gl-ar750)
In-Reply-To: <20191214111254.GZ11070@home.paul.comp>
References: <20191213195046.13358-1-devel-sven@geroedel.de>
 <20191213200723.GX11070@home.paul.comp> <2070834.sci2Q4oWNF@strike>
 <20191213231028.GY11070@home.paul.comp>
 <20191214111254.GZ11070@home.paul.comp>
Message-ID: <20191214150949.GA11070@home.paul.comp>

On Sat, Dec 14, 2019 at 02:12:55PM +0300, Paul Fertser wrote:
> Should a uci-defaults script be added to base-files that would
> populate the system config with all the LEDs present in the DT but not
> added by board config?

cd /sys/class/leds

for i in *; do
	uci show system | grep -q sysfs=\'$i\' || {
		l=${i#*:}
		f=${l#*:}
		c=${l%:*}
		echo ucidef_set_led_default \"$f-$c\" \"$f \($c\)\" \"$i\" \"0\"
	}
done

On my DIR-615-E4 this gives:

ucidef_set_led_default "power-amber" "power (amber)" "d-link:amber:power" "0"
ucidef_set_led_default "wan-amber" "wan (amber)" "d-link:amber:wan" "0"
ucidef_set_led_default "wps-blue" "wps (blue)" "d-link:blue:wps" "0"
ucidef_set_led_default "power-green" "power (green)" "d-link:green:power" "0"
ucidef_set_led_default "wlan-green" "wlan (green)" "d-link:green:wlan" "0"

Does this make sense?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at david-bauer.net  Sat Dec 14 13:15:21 2019
From: mail at david-bauer.net (David Bauer)
Date: Sat, 14 Dec 2019 19:15:21 +0100
Subject: [OpenWrt-Devel] [PATCH] ar71xx: indicate upgrade using system LED
Message-ID: <20191214181521.163145-1-mail@david-bauer.net>

This enables the system LED to indicate a running firmware upgrade. This
pattern is used on most platforms provided by the generic base-files
package. ar71xx uses it's own implementation for the system-LED, where
the upgrade case is not yet implemented.

Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/ar71xx/base-files/etc/diag.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 8ff75627a5..c5fe5bdcc1 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -575,6 +575,9 @@ set_state() {
 	preinit_regular)
 		status_led_blink_preinit_regular
 		;;
+	upgrade)
+		status_led_blink_preinit_regular
+		;;
 	done)
 		status_led_on
 		case $(board_name) in
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Sat Dec 14 16:54:59 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Sat, 14 Dec 2019 22:54:59 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 0/2] libblkid-tiny: rework handling
 buffers
Message-ID: <20191214215501.14219-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

This fixes problem with corrupting data buffer by a subsequent data
read. This was originally reported in the:
libblkid-tiny: bugged buffer management
Message-ID: <94e6f04d-19c5-3818-0748-db4ec0d481ad at gmail.com>

Please verify I didn't add any memory leak. I hope I actually fixed one
in the blkid_probe_get_buffer().

Rafa? Mi?ecki (2):
  libblkid-tiny: add functions for allocating & freeing probe struct
  libblkid-tiny: use separated buffer for each block device read

 CMakeLists.txt                |  1 +
 libblkid-tiny/libblkid-tiny.c | 36 +++++++++--------------
 libblkid-tiny/libblkid-tiny.h |  5 ++++
 libblkid-tiny/probe.c         | 54 +++++++++++++++++++++++++++++++++++
 probe.c                       | 38 +++++++++++++-----------
 5 files changed, 96 insertions(+), 38 deletions(-)
 create mode 100644 libblkid-tiny/probe.c

-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Sat Dec 14 16:55:00 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Sat, 14 Dec 2019 22:55:00 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 1/2] libblkid-tiny: add functions
 for allocating & freeing probe struct
In-Reply-To: <20191214215501.14219-1-zajec5@gmail.com>
References: <20191214215501.14219-1-zajec5@gmail.com>
Message-ID: <20191214215501.14219-2-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

This adds blkid_new_probe() and blkid_free_probe() which have to be used
in place of simple struct memory allocation. They will allow extending
probe struct by any extra initialization code and resources release.

Newly introduced probe.c file is based on original libblkid's code.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 CMakeLists.txt                |  1 +
 libblkid-tiny/libblkid-tiny.h |  3 +++
 libblkid-tiny/probe.c         | 31 ++++++++++++++++++++++++++++
 probe.c                       | 38 ++++++++++++++++++++---------------
 4 files changed, 57 insertions(+), 16 deletions(-)
 create mode 100644 libblkid-tiny/probe.c

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f13c4f..a586577 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,7 @@ ADD_LIBRARY(blkid-tiny SHARED
 		libblkid-tiny/encode.c
 		libblkid-tiny/libblkid-tiny.c
 		libblkid-tiny/mkdev.c
+		libblkid-tiny/probe.c
 		libblkid-tiny/ext.c
 		libblkid-tiny/jffs2.c
 		libblkid-tiny/vfat.c
diff --git a/libblkid-tiny/libblkid-tiny.h b/libblkid-tiny/libblkid-tiny.h
index 419d5db..06ff94b 100644
--- a/libblkid-tiny/libblkid-tiny.h
+++ b/libblkid-tiny/libblkid-tiny.h
@@ -60,6 +60,9 @@ struct blkid_struct_probe
 	char	version[64];
 };
 
+struct blkid_struct_probe *blkid_new_probe(void);
+void blkid_free_probe(struct blkid_struct_probe *pr);
+
 extern int probe_block(char *block, struct blkid_struct_probe *pr);
 extern int mkblkdev(void);
 
diff --git a/libblkid-tiny/probe.c b/libblkid-tiny/probe.c
new file mode 100644
index 0000000..54e22dc
--- /dev/null
+++ b/libblkid-tiny/probe.c
@@ -0,0 +1,31 @@
+/*
+ * Low-level libblkid probing API
+ *
+ * Copyright (C) 2008-2009 Karel Zak <kzak at redhat.com>
+ *
+ * This file may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ */
+
+#include <stdlib.h>
+
+#include "libblkid-tiny.h"
+
+struct blkid_struct_probe *blkid_new_probe(void)
+{
+	struct blkid_struct_probe *pr;
+
+	pr = calloc(1, sizeof(struct blkid_struct_probe));
+	if (!pr)
+		return NULL;
+
+	return pr;
+}
+
+void blkid_free_probe(struct blkid_struct_probe *pr)
+{
+	if (!pr)
+		return;
+
+	free(pr);
+}
diff --git a/probe.c b/probe.c
index 63d6f8c..7d0e831 100644
--- a/probe.c
+++ b/probe.c
@@ -21,34 +21,40 @@ static struct probe_info *
 probe_path_tiny(const char *path)
 {
 	struct probe_info *info = NULL;
-	struct blkid_struct_probe pr = { };
+	struct blkid_struct_probe *pr;
 	char *type, *dev, *uuid, *label, *version;
 
-	if (probe_block((char *)path, &pr) == 0 && pr.id && !pr.err) {
+	pr = blkid_new_probe();
+	if (!pr)
+		return NULL;
+
+	if (probe_block((char *)path, pr) == 0 && pr->id && !pr->err) {
 		info = calloc_a(sizeof(*info),
-		                &type,    strlen(pr.id->name) + 1,
-		                &dev,     strlen(pr.dev)      + 1,
-		                &uuid,    strlen(pr.uuid)     + 1,
-		                &label,   strlen(pr.label)    + 1,
-		                &version, strlen(pr.version)  + 1);
+		                &type,    strlen(pr->id->name) + 1,
+		                &dev,     strlen(pr->dev)      + 1,
+		                &uuid,    strlen(pr->uuid)     + 1,
+		                &label,   strlen(pr->label)    + 1,
+		                &version, strlen(pr->version)  + 1);
 
 		if (info) {
-			info->type = strcpy(type, pr.id->name);
+			info->type = strcpy(type, pr->id->name);
 
-			if (pr.dev[0])
-				info->dev = strcpy(dev, pr.dev);
+			if (pr->dev[0])
+				info->dev = strcpy(dev, pr->dev);
 
-			if (pr.uuid[0])
-				info->uuid = strcpy(uuid, pr.uuid);
+			if (pr->uuid[0])
+				info->uuid = strcpy(uuid, pr->uuid);
 
-			if (pr.label[0])
-				info->label = strcpy(label, pr.label);
+			if (pr->label[0])
+				info->label = strcpy(label, pr->label);
 
-			if (pr.version[0])
-				info->version = strcpy(version, pr.version);
+			if (pr->version[0])
+				info->version = strcpy(version, pr->version);
 		}
 	}
 
+	blkid_free_probe(pr);
+
 	return info;
 }
 
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Sat Dec 14 16:55:01 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Sat, 14 Dec 2019 22:55:01 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 2/2] libblkid-tiny: use separated
 buffer for each block device read
In-Reply-To: <20191214215501.14219-1-zajec5@gmail.com>
References: <20191214215501.14219-1-zajec5@gmail.com>
Message-ID: <20191214215501.14219-3-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

This allows reading multiple chunks of block device data and operating
on them simultaneously. Previous implementation was using a single
buffer (except for reading more data than allocated size) and subsequent
reads were corrupting memory of previously returned buffers.

This fixes e.g. problem with reading NTFS UUID and validating VFAT
signature.

Implementation is based on original libblkid code which handles it
similarly. Buffers are put on probe internal list and freed when
releasing a probe struct.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 libblkid-tiny/libblkid-tiny.c | 36 ++++++++++++++---------------------
 libblkid-tiny/libblkid-tiny.h |  2 ++
 libblkid-tiny/probe.c         | 23 ++++++++++++++++++++++
 3 files changed, 39 insertions(+), 22 deletions(-)

diff --git a/libblkid-tiny/libblkid-tiny.c b/libblkid-tiny/libblkid-tiny.c
index a30f619..05b4b99 100644
--- a/libblkid-tiny/libblkid-tiny.c
+++ b/libblkid-tiny/libblkid-tiny.c
@@ -13,9 +13,6 @@
 
 int blkid_debug_mask = 0;
 
-static unsigned char *probe_buffer;
-static unsigned int probe_buffer_size = 0;
-
 int get_linux_version (void)
 {
 	static int kver = -1;
@@ -81,32 +78,27 @@ int blkid_probe_sprintf_version(blkid_probe pr, const char *fmt, ...)
 unsigned char *blkid_probe_get_buffer(blkid_probe pr,
 				blkid_loff_t off, blkid_loff_t len)
 {
+	struct blkid_bufinfo *bf;
 	int ret;
-	unsigned char *buf;
-
-	if (len > probe_buffer_size) {
-		buf = realloc(probe_buffer, len);
 
-		if (!buf) {
-			fprintf(stderr, "failed to allocate %d byte buffer\n",
-			        (int)len);
-
-			return NULL;
-		}
-
-		probe_buffer = buf;
-		probe_buffer_size = len;
-	}
-
-	memset(probe_buffer, 0, probe_buffer_size);
+	bf = malloc(sizeof(*bf) + len);
+	if (!bf)
+		return NULL;
+	memset(bf, 0, sizeof(*bf));
+	bf->data = ((unsigned char *)bf) + sizeof(*bf);
 
 	lseek(pr->fd, off, SEEK_SET);
-	ret = read(pr->fd, probe_buffer, len);
+	ret = read(pr->fd, bf->data, len);
 
-	if (ret != len)
+	if (ret != len) {
 		fprintf(stderr, "faile to read blkid\n");
+		free(bf);
+		return NULL;
+	}
+
+	list_add_tail(&bf->bufs, &pr->buffers);
 
-	return probe_buffer;
+	return bf->data;
 }
 
 int blkid_probe_set_label(blkid_probe pr, unsigned char *label, size_t len)
diff --git a/libblkid-tiny/libblkid-tiny.h b/libblkid-tiny/libblkid-tiny.h
index 06ff94b..aa87fd9 100644
--- a/libblkid-tiny/libblkid-tiny.h
+++ b/libblkid-tiny/libblkid-tiny.h
@@ -58,6 +58,8 @@ struct blkid_struct_probe
 	char	uuid[64];
 	char	label[256];
 	char	version[64];
+
+	struct list_head	buffers;	/* list of buffers */
 };
 
 struct blkid_struct_probe *blkid_new_probe(void);
diff --git a/libblkid-tiny/probe.c b/libblkid-tiny/probe.c
index 54e22dc..ae7e708 100644
--- a/libblkid-tiny/probe.c
+++ b/libblkid-tiny/probe.c
@@ -9,8 +9,11 @@
 
 #include <stdlib.h>
 
+#include "blkidP.h"
 #include "libblkid-tiny.h"
 
+static int blkid_probe_reset_buffers(struct blkid_struct_probe *pr);
+
 struct blkid_struct_probe *blkid_new_probe(void)
 {
 	struct blkid_struct_probe *pr;
@@ -19,6 +22,8 @@ struct blkid_struct_probe *blkid_new_probe(void)
 	if (!pr)
 		return NULL;
 
+	INIT_LIST_HEAD(&pr->buffers);
+
 	return pr;
 }
 
@@ -27,5 +32,23 @@ void blkid_free_probe(struct blkid_struct_probe *pr)
 	if (!pr)
 		return;
 
+	blkid_probe_reset_buffers(pr);
+
 	free(pr);
 }
+
+static int blkid_probe_reset_buffers(struct blkid_struct_probe *pr)
+{
+	if (list_empty(&pr->buffers))
+		return 0;
+
+	while (!list_empty(&pr->buffers)) {
+		struct blkid_bufinfo *bf = list_first_entry(&pr->buffers, struct blkid_bufinfo, bufs);
+
+		list_del(&bf->bufs);
+
+		free(bf);
+	}
+
+	return 0;
+}
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From sebastian_ml at gmx.net  Sat Dec 14 17:21:31 2019
From: sebastian_ml at gmx.net (Sebastian Kemper)
Date: Sat, 14 Dec 2019 23:21:31 +0100
Subject: [OpenWrt-Devel] [PATCH] cmake: Install host packages to lib
 instead of lib64
In-Reply-To: <20191117214204.293611-1-rosenp@gmail.com>
References: <20191117214204.293611-1-rosenp@gmail.com>
Message-ID: <20191214222129.GA8313@darth.lan>

On Sun, Nov 17, 2019 at 01:42:04PM -0800, Rosen Penev wrote:
> Several CMake packages such as log4cplus and protobuf(-c) install to
> lib64 instead of lib on some hosts. This completely breaks rpath linking.
> Override it globally to avoid fixing each package individually.
>
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
>  include/cmake.mk | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/cmake.mk b/include/cmake.mk
> index a304ab3f70..2726b83a1e 100644
> --- a/include/cmake.mk
> +++ b/include/cmake.mk
> @@ -103,6 +103,7 @@ define Host/Configure/Default
>  			-DCMAKE_INSTALL_PREFIX=$(HOST_BUILD_PREFIX) \
>  			-DCMAKE_PREFIX_PATH=$(HOST_BUILD_PREFIX) \
>  			-DCMAKE_SKIP_RPATH=TRUE  \
> +			-DCMAKE_INSTALL_LIBDIR=lib \
>  			$(CMAKE_HOST_OPTIONS) \
>  		$(HOST_CMAKE_SOURCE_DIR) \
>  	)

This works fine and solves the problem, tested with protobuf/host.

Thanks Rosen!

Tested-by: Sebastian Kemper <sebastian_ml at gmx.net>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at david-bauer.net  Sat Dec 14 17:38:02 2019
From: mail at david-bauer.net (David Bauer)
Date: Sat, 14 Dec 2019 23:38:02 +0100
Subject: [OpenWrt-Devel] [PATCH] mac80211: fix txpower when using DFS
 channels
Message-ID: <20191214223802.184696-1-mail@david-bauer.net>

With this patch, txpower for the PHY is applied when configuring the PHY
instead of the VIF. Otherwise, the configured txpower is not applied for
the first initialized VIF when using DFS channels, as it is currently
applied to early when the CAC hasn't finished.

Reported-by: Martin Weinelt <martin at darmstadt.freifunk.net
Signed-off-by: David Bauer <mail at david-bauer.net>
---
 .../mac80211/files/lib/netifd/wireless/mac80211.sh       | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 18033e9d56..f1882ec509 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -743,7 +743,7 @@ mac80211_setup_vif() {
 
 	json_select config
 	json_get_vars mode
-	json_get_var vif_txpower txpower
+	json_get_var vif_txpower
 	json_get_var vif_enable enable 1
 
 	[ "$vif_enable" = 1 ] || action=down
@@ -753,7 +753,6 @@ mac80211_setup_vif() {
 		json_select ..
 		return
 	}
-	set_default vif_txpower "$txpower"
 	[ -z "$vif_txpower" ] || iw dev "$ifname" set txpower fixed "${vif_txpower%%.*}00"
 
 	case "$mode" in
@@ -908,6 +907,12 @@ drv_mac80211_setup() {
 	iw phy "$phy" set antenna_gain $antenna_gain
 	iw phy "$phy" set distance "$distance"
 
+	if [ -n "$txpower" ]; then
+		iw phy "$phy" set txpower fixed "${txpower%%.*}00"
+	else
+		iw phy "$phy" set txpower auto
+	fi
+
 	[ -n "$frag" ] && iw phy "$phy" set frag "${frag%%.*}"
 	[ -n "$rts" ] && iw phy "$phy" set rts "${rts%%.*}"
 
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From martin at darmstadt.freifunk.net  Sat Dec 14 17:39:13 2019
From: martin at darmstadt.freifunk.net (Martin Weinelt)
Date: Sat, 14 Dec 2019 23:39:13 +0100
Subject: [OpenWrt-Devel] [PATCH] mac80211: fix txpower when using DFS
 channels
In-Reply-To: <20191214223802.184696-1-mail@david-bauer.net>
References: <20191214223802.184696-1-mail@david-bauer.net>
Message-ID: <ab5e7587-dbe8-6c1f-191d-6ef85a29562c@darmstadt.freifunk.net>

Yep, that does the trick. Thank you!

Tested-by: Martin Weinelt <martin at darmstadt.freifunk.net>

On 12/14/19 11:38 PM, David Bauer wrote:
> With this patch, txpower for the PHY is applied when configuring the PHY
> instead of the VIF. Otherwise, the configured txpower is not applied for
> the first initialized VIF when using DFS channels, as it is currently
> applied to early when the CAC hasn't finished.
> 
> Reported-by: Martin Weinelt <martin at darmstadt.freifunk.net
> Signed-off-by: David Bauer <mail at david-bauer.net>
> ---
>   .../mac80211/files/lib/netifd/wireless/mac80211.sh       | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
> index 18033e9d56..f1882ec509 100644
> --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
> +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
> @@ -743,7 +743,7 @@ mac80211_setup_vif() {
>   
>   	json_select config
>   	json_get_vars mode
> -	json_get_var vif_txpower txpower
> +	json_get_var vif_txpower
>   	json_get_var vif_enable enable 1
>   
>   	[ "$vif_enable" = 1 ] || action=down
> @@ -753,7 +753,6 @@ mac80211_setup_vif() {
>   		json_select ..
>   		return
>   	}
> -	set_default vif_txpower "$txpower"
>   	[ -z "$vif_txpower" ] || iw dev "$ifname" set txpower fixed "${vif_txpower%%.*}00"
>   
>   	case "$mode" in
> @@ -908,6 +907,12 @@ drv_mac80211_setup() {
>   	iw phy "$phy" set antenna_gain $antenna_gain
>   	iw phy "$phy" set distance "$distance"
>   
> +	if [ -n "$txpower" ]; then
> +		iw phy "$phy" set txpower fixed "${txpower%%.*}00"
> +	else
> +		iw phy "$phy" set txpower auto
> +	fi
> +
>   	[ -n "$frag" ] && iw phy "$phy" set frag "${frag%%.*}"
>   	[ -n "$rts" ] && iw phy "$phy" set rts "${rts%%.*}"
>   
> 

-- 
Und im ?brigen bin ich der Meinung, dass Ger?te mit weniger als 8MB 
Flash und 64MB RAM zerst?rt werden m?ssen.
-- frei nach Marcus Porcious Cato der ?ltere

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From thess at kitschensync.net  Sat Dec 14 18:02:49 2019
From: thess at kitschensync.net (Ted Hess)
Date: Sat, 14 Dec 2019 23:02:49 +0000
Subject: [OpenWrt-Devel] Inquery
In-Reply-To: <72795206-d999-c459-4fa6-ae09df4e92f7@phrozen.org>
References: <e13712e.36225d.16ef3b3ec4c.Coremail.rqgxfc@vip.163.com>
 <CAKR_QV+a___R2qsPSf6vtpk+JUPqvt3ZdvTHQA9Y_pFOZ-R6zA@mail.gmail.com>
 <20191211142209.GC1371@makrotopia.org>
 <72795206-d999-c459-4fa6-ae09df4e92f7@phrozen.org>
Message-ID: <em02797504-f3aa-4a10-a70f-3c6f2adba652@twonky7>


>On 11/12/2019 15:22, Daniel Golle wrote:
>>As a community, we decided to give our self a set of minimal rules[1].
>>And even though it is in the last position, rule #12 "Be nice to each
>>other." is meant just as serious as all the other rules.
>>
>>So here, not for the first time, you are using language which has the
>>only purpose to hurt other people (for which reason ever, it doesn't
>>matter). This is therefore a very clear violation to the above
>>mentioned rule. You statement "suck it" (guess what) is also an obvious
>>and disgusting example of a masculist culture which hurts our community
>>as a whole and I strongly believe we should not tolerate that.
>>
>>And yes this was a spam mail. And it's even needless to say that
>>replying to a spam email in which ever way will always make it worse.
>>But that's not the point here and I will not engage in any discussion
>>on that matter.
>>
>>Please learn to behave or leave us alone.
>>
>>[1]:https://openwrt.org/rules
>
>+1
>
>
And, +1 from me - thanks.

/ted


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Sun Dec 15 06:00:48 2019
From: chunkeey at gmail.com (Christian Lamparter)
Date: Sun, 15 Dec 2019 12:00:48 +0100
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <20191211191652.GU11070@home.paul.comp>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <d938b7ab-80b0-c78a-5a84-435243dff86d@candelatech.com>
 <20191211191652.GU11070@home.paul.comp>
Message-ID: <5675304.dXXkMWVoIb@debian64>

On Wednesday, 11 December 2019 20:16:52 CET Paul Fertser wrote:
> Hey Ben,
> 
> On Wed, Dec 11, 2019 at 10:06:26AM -0800, Ben Greear wrote:
> > On 12/11/19 6:44 AM, Paul Fertser wrote:
> > > According to many bugreports [0][1][2] the default ath10k-ct kernel
> ...
> > And also if you want to just have the makefile pass a -DBUILD_ATH10K_SMALL or something
> > like that and #ifdef code in the ath10k-ct driver, then I'd apply that patch to ath10k-ct
> > so that you don't need the patches.
> 
> I am offering my patch to the OpenWrt maintainers as kind of a
> stop-gap measure to get ath10k-ct working for the release (or in any
> way they think is appropriate). Another approach they can choose is to
> select the upstream ath10k for those devices. Otherwise some
> previously supported boards will require manual intervention to get
> WiFi working after an upgrade.
> 
> Regarding your fwcfg idea, I am not sure it will work as it seems the
> PCI initialisation is happening before fwcfg is parsed and applied.
> 
> Adding a Kconfig option is another possibility.
> 
> But what do you think about an additional module parameter, wouldn't
> it be the cleanest solution in the long run?
> 
> BTW, according to the git logs the patches were initially added by
> Christian Lamparter, so I hope he can clarify the situation a
> bit. Probably there were some performance tests executed back than to
> measure the impact.
> 
Heh no. These patches come up in discussions time and time again. And I
would rather see them being removed alltogether. What I can tell you is
that the Idea of limiting ath10k memory thirst came from Qualcomm itself.

If you look on the ML you can find the old posts like:
<https://www.mail-archive.com/lede-dev at lists.infradead.org/msg04738.html>

And for reference: Here's a independent bootlog (from pepe2k/Piotr Dymacz
no less) with the "Low Memory System" messages for the RT-AC58U:
<https://gist.github.com/pepe2k/eba2766f05ccf4e089347c531c49848b>


From fercerpav at gmail.com  Sun Dec 15 07:01:14 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sun, 15 Dec 2019 15:01:14 +0300
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <5675304.dXXkMWVoIb@debian64>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <d938b7ab-80b0-c78a-5a84-435243dff86d@candelatech.com>
 <20191211191652.GU11070@home.paul.comp>
 <5675304.dXXkMWVoIb@debian64>
Message-ID: <20191215120114.GD11070@home.paul.comp>

Thank you for the answer Christian,

On Sun, Dec 15, 2019 at 12:00:48PM +0100, Christian Lamparter wrote:
> I think for this to have any chance of moving forward you'll need to
> pressure your ODMs and if that doesn't work: Go with a different WIFI
> chip vendor that supports low memory devices, or add more RAM.
> From what I can tell, Qualcomm nowadays gets what they want "for free"
> and for the past four-five years, they certainly didn't feel pressured
> to add "low memory" support to ath10k.

FWIW, OpenWrt's ath10k vendor is CT now, not QCA, so it's not much
relevant what do ODMs and (whatever is left from) QCA say, I guess.

It would be kind of weird to force OpenWrt users of certain devices to
downgrade to upstream ath10k (or to abandon hardware that is working
fine for them with previous OpenWrt release) just because Atheros no
longer exist and Qualcomm can't care less about free software
community, don't you think so?

I'll try to find the mailing list posts you're talking about to help
Ben decide if he is still OK with those patches getting used on
low-RAM devices in OpenWrt or not.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Sun Dec 15 07:21:27 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sun, 15 Dec 2019 15:21:27 +0300
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <5675304.dXXkMWVoIb@debian64>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <d938b7ab-80b0-c78a-5a84-435243dff86d@candelatech.com>
 <20191211191652.GU11070@home.paul.comp>
 <5675304.dXXkMWVoIb@debian64>
Message-ID: <20191215122127.GE11070@home.paul.comp>

On Sun, Dec 15, 2019 at 12:00:48PM +0100, Christian Lamparter wrote:
> From what I remember Sven Eckelmann also measured the impact from the
> patches on the performance and posted his results to the OpenWrt ML
> (google will find them).

https://github.com/freifunk-gluon/gluon/pull/1440 is what contains all
the relevant data. So Ben is well aware of the performance
implications.

"Even a 256MB device with three radios can go OOM"

It looks like having a version of kmod-ath10k-ct with reduced buffers
would be beneficial to the OpenWrt users.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From chunkeey at gmail.com  Sun Dec 15 08:09:43 2019
From: chunkeey at gmail.com (Christian Lamparter)
Date: Sun, 15 Dec 2019 14:09:43 +0100
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <20191215120114.GD11070@home.paul.comp>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <5675304.dXXkMWVoIb@debian64> <20191215120114.GD11070@home.paul.comp>
Message-ID: <4186246.Rc2P9gcx8s@debian64>

On Sunday, 15 December 2019 13:01:14 CET Paul Fertser wrote:
> Thank you for the answer Christian,
> 
> On Sun, Dec 15, 2019 at 12:00:48PM +0100, Christian Lamparter wrote:
> > I think for this to have any chance of moving forward you'll need to
> > pressure your ODMs and if that doesn't work: Go with a different WIFI
> > chip vendor that supports low memory devices, or add more RAM.
> > From what I can tell, Qualcomm nowadays gets what they want "for free"
> > and for the past four-five years, they certainly didn't feel pressured
> > to add "low memory" support to ath10k.
> 
> FWIW, OpenWrt's ath10k vendor is CT now, not QCA, so it's not much
> relevant what do ODMs and (whatever is left from) QCA say, I guess.
Well, not sure what you are trying to say here. But I think Ben is free
to do what he wants as well. For example see the:
"ath10k: add LED and GPIO controlling support for various chipsets"
patch that OpenWrt has been carrying because neither upstream (linux-wireless)
nor CT wants to integrate it.
<https://github.com/openwrt/openwrt/blob/master/package/kernel/ath10k-ct/patches/201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch>

The situation with the "low memory" support wasn't much better. Because
from what I remember, there was a discussion about this very topic between
Ben an Hauke in the past (and you can see how it played out, since you wouldn't
have posted this series if it was integrated back then). 
But it seems that Ben had a change of heart in this regard. I don't know the
details or why, But it makes sense because it would enable his company to save
some money for the systems his company sells:
 <https://www.candelatech.com/lf_systems.php> so there is some value
in supporting these devices, especially if someone else does all the work 
for it.

> It would be kind of weird to force OpenWrt users of certain devices to
> downgrade to upstream ath10k (or to abandon hardware that is working
> fine for them with previous OpenWrt release) just because Atheros no
> longer exist and Qualcomm can't care less about free software
> community, don't you think so?
This is something like "another" 32/4 situation, right? Well, can you tell
me what was the result of that?

> I'll try to find the mailing list posts you're talking about to help
> Ben decide if he is still OK with those patches getting used on
> low-RAM devices in OpenWrt or not.
Well, if you look at ath10k-ct (<https://github.com/greearb/ath10k-ct>),
you see that Ben takes upstream ath10k, adds his patches and pulls upstream
fixes. So if you are willing to work for it anyways, you might as well go
with upstream Linux-wireless and see what they want. After all the QSDK has
the "Low Memory" mode.

Cheers,
Christian



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Sun Dec 15 08:10:14 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Sun, 15 Dec 2019 14:10:14 +0100
Subject: [OpenWrt-Devel] Lantiq DTS rename
Message-ID: <008201d5b348$fd4eba30$f7ec2e90$@adrianschmutzler.de>

Hi,

I consider doing a DTS rename for lantiq target similar to what it's like on ath79 and what I did for ramips earlier that year.

However, I wonder whether the "soc_vendor_model.dts" scheme is useful there, or whether it wouldn't be better to just use "vendor_model.dts" ...

Any thoughts on this or any NAK in general?

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191215/2fa36098/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Sun Dec 15 08:27:28 2019
From: daniel at makrotopia.org (Daniel Golle)
Date: Sun, 15 Dec 2019 15:27:28 +0200
Subject: [OpenWrt-Devel] Lantiq DTS rename
In-Reply-To: <008201d5b348$fd4eba30$f7ec2e90$@adrianschmutzler.de>
References: <008201d5b348$fd4eba30$f7ec2e90$@adrianschmutzler.de>
Message-ID: <20191215132728.GD4782@makrotopia.org>

Hi Adrian,

On Sun, Dec 15, 2019 at 02:10:14PM +0100, mail at adrianschmutzler.de wrote:
> Hi,
> 
> I consider doing a DTS rename for lantiq target similar to what it's like on ath79 and what I did for ramips earlier that year.
> 
> However, I wonder whether the "soc_vendor_model.dts" scheme is useful there, or whether it wouldn't be better to just use "vendor_model.dts" ...
> 
> Any thoughts on this or any NAK in general?

soc_vendor_model should be appropriate here is well. why not?

> 
> Best
> 
> Adrian



> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hauke at hauke-m.de  Sun Dec 15 08:48:48 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sun, 15 Dec 2019 14:48:48 +0100
Subject: [OpenWrt-Devel] Lantiq DTS rename
In-Reply-To: <20191215132728.GD4782@makrotopia.org>
References: <008201d5b348$fd4eba30$f7ec2e90$@adrianschmutzler.de>
 <20191215132728.GD4782@makrotopia.org>
Message-ID: <ecf600e1-e264-44d1-c9e6-61513f2f4da6@hauke-m.de>

On 12/15/19 2:27 PM, Daniel Golle wrote:
> Hi Adrian,
> 
> On Sun, Dec 15, 2019 at 02:10:14PM +0100, mail at adrianschmutzler.de wrote:
>> Hi,
>>
>> I consider doing a DTS rename for lantiq target similar to what it's like on ath79 and what I did for ramips earlier that year.
>>
>> However, I wonder whether the "soc_vendor_model.dts" scheme is useful there, or whether it wouldn't be better to just use "vendor_model.dts" ...
>>
>> Any thoughts on this or any NAK in general?
> 
> soc_vendor_model should be appropriate here is well. why not?

Yes please clean this up and use the soc_vendor_model model, I think
this is the common format in the Linux kernel.

Be aware that there is a pull request from Martin pending with some
changes to the existing files:
https://github.com/openwrt/openwrt/pull/2216

Please also move the dts files into the lantiq subfolder at
arch/mips/boot/dts/lantiq/

Hauke

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191215/96ffd925/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From greearb at candelatech.com  Sun Dec 15 11:08:22 2019
From: greearb at candelatech.com (Ben Greear)
Date: Sun, 15 Dec 2019 08:08:22 -0800
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <4186246.Rc2P9gcx8s@debian64>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <5675304.dXXkMWVoIb@debian64> <20191215120114.GD11070@home.paul.comp>
 <4186246.Rc2P9gcx8s@debian64>
Message-ID: <5354fe9c-6a58-f7ab-1d50-23192c5a12dc@candelatech.com>



On 12/15/2019 05:09 AM, Christian Lamparter wrote:
> On Sunday, 15 December 2019 13:01:14 CET Paul Fertser wrote:
>> Thank you for the answer Christian,
>>
>> On Sun, Dec 15, 2019 at 12:00:48PM +0100, Christian Lamparter wrote:
>>> I think for this to have any chance of moving forward you'll need to
>>> pressure your ODMs and if that doesn't work: Go with a different WIFI
>>> chip vendor that supports low memory devices, or add more RAM.
>>> From what I can tell, Qualcomm nowadays gets what they want "for free"
>>> and for the past four-five years, they certainly didn't feel pressured
>>> to add "low memory" support to ath10k.
>>
>> FWIW, OpenWrt's ath10k vendor is CT now, not QCA, so it's not much
>> relevant what do ODMs and (whatever is left from) QCA say, I guess.
> Well, not sure what you are trying to say here. But I think Ben is free
> to do what he wants as well. For example see the:
> "ath10k: add LED and GPIO controlling support for various chipsets"
> patch that OpenWrt has been carrying because neither upstream (linux-wireless)
> nor CT wants to integrate it.
> <https://github.com/openwrt/openwrt/blob/master/package/kernel/ath10k-ct/patches/201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch>
>
> The situation with the "low memory" support wasn't much better. Because
> from what I remember, there was a discussion about this very topic between
> Ben an Hauke in the past (and you can see how it played out, since you wouldn't
> have posted this series if it was integrated back then).
> But it seems that Ben had a change of heart in this regard. I don't know the
> details or why, But it makes sense because it would enable his company to save
> some money for the systems his company sells:
>  <https://www.candelatech.com/lf_systems.php> so there is some value
> in supporting these devices, especially if someone else does all the work
> for it.

My goal is to have stable and fully featured ath10k that works well for higher powered
systems by default (our test rigs are typically powerful x86 with gigs of RAM running
Fedora or similar).

OpenWRT is all about adding patches on top of upstream projects for specific platforms, so that
would easily work with ath10k-ct too.

And, if someone wants to write a patch that either modifies ath10k-ct for OpenWRT
to work better on certain systems, then by all means, go ahead.  This should be just
as easy as doing the same thing for upstream ath10k.

If someone writes a patch that conditionally compiles for OpenWRT and/or allows
OpenWRT to configure smaller memory usage, then I will apply that to my ath10k-ct
driver (with caveat that defaults for non openwrt systems needs to remain as is).

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dengqf6 at mail2.sysu.edu.cn  Sun Dec 15 11:43:08 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Mon, 16 Dec 2019 00:43:08 +0800
Subject: [OpenWrt-Devel] [PATCH] linux-firmware: update to 20191215
Message-ID: <20191215164308.5900-1-dengqf6@mail2.sysu.edu.cn>

Update linux-firmware to 20191215

git log --pretty=oneline --abbrev-commit 20190815..20191215

eefb5f7 inside-secure: add new "mini" firmware for the EIP197 driver
dd1a12e Merge branch 'RB3-adsp-cdsp-mss-v4' of https://github.com/andersson/linux-firmware
c523dcd WHENCE: Add raspberry-pi4 SDIO file
99a15a4 Merge branch 'rpi4-fw' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux-firmware
2260cbd Merge branch 'master' of https://github.com/dikshitaagarwal/video_firmware_5.4
4c688be Merge branch 'for-upstream' of git://git.chelsio.net/pub/git/linux-firmware
e10ed21 qcom: update venus firmware files for v5.4
af4c4be cxgb4: Update firmware to revision 1.24.11.0
f93c7a1 brcm: Add BCM43455 NVRAM for Raspberry Pi 4 B
212e441 qcom: Add SDM845 Compute DSP firmware
ec84cf9 qcom: Add SDM845 Audio DSP firmware
62d0a1a qcom: Add SDM845 modem firmware
e8a0f4c rtl_nic: add firmware rtl8168fp-3
9581f15 Merge branch 'nxp_mc' of https://github.com/NXP/linux-firmware
978c04e linux-firmware: Update NXP Management Complex firmware to version 10.18.0
c62c3c2 linux-firmware: Update firmware file for Intel Bluetooth AX201
6272383 linux-firmware: Update firmware file for Intel Bluetooth AX200
84a7ca5 linux-firmware: Update firmware file for Intel Bluetooth 9560
96c3994 linux-firmware: Update firmware file for Intel Bluetooth 9260
7319341 amdgpu: update navi14 vcn firmware
b363d9d amdgpu: update navi10 vcn firmware
f1100dd Merge branch 'ehl_tgl_guc_huc' of git://anongit.freedesktop.org/drm/drm-firmware
4debf21 i915: Add HuC firmware v7.0.3 for TGL
1eb2ac4 i915: Add GuC firmware v35.2.0 for TGL
4b0a210 i915: Add HuC firmware v9.0.0 for EHL
610fe75 i915: Add GuC firmware v33.0.4 for EHL
11bdc57 rtw88: RTL8723D: add firmware file v48
9e194c7 qed: Add firmware 8.40.33.0
4065643 amdgpu: add new navi14 wks gfx firmware for 19.30
d4f88ea amdgpu: update navi14 firmware for 19.30
ea755b6 amdgpu: update raven firmware for 19.30
340e06e linux-firmware: Add firmware file for Intel Bluetooth AX201
ad7a8b2 Mellanox: Add new mlxsw_spectrum2 firmware 29.2000.2308
e756bf3 Mellanox: Add new mlxsw_spectrum firmware 13.2000.2308
b27d123 rtl_nic: add firmware files for RTL8153
180e2b4 rtl_bt: Update configuration file for BT part of RTL8822CU
0acd93e bnx2x: Add FW 7.13.15.0.
2b016af linux-firmware: Update AMD cpu microcode
4c3e853 linux-firmware: Update firmware file for Intel Bluetooth AX200
7a79d22 linux-firmware: Update firmware file for Intel Bluetooth AX201
fdab23a linux-firmware: Update firmware file for Intel Bluetooth 9560
b68efd7 linux-firmware: Update firmware file for Intel Bluetooth 9260
aa95e90 amdgpu: add initial navi14 firmware form 19.30
c1ce20e rtlwifi: rtl8821ae: Add firmware for the RTL8812AE variant.
7d187ac ice: Fix up WHENCE entry and symlink
4c55b97 Merge branch 'dev-queue' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/firmware
7c4db73 nvidia: Update Tegra210 XUSB firmware to v50.24
c054c53 nvidia: Add XUSB firmware for Tegra194
9cfefbd Remove duplicate symlinks
2de7abd copy-firmware: Create symlinks from WHENCE file
2116bcd Make symlinks consistent
c0590d8 amdgpu: update vega20 ucode for 19.30
43cc648 amdgpu: update vega12 ucode for 19.30
ffa0ed7 amdgpu: update vega10 ucode for 19.30
83e1b41 amdgpu: update picasso ucode for 19.30
7008617 amdgpu: update raven2 ucode for 19.30
9200baa amdgpu: update raven ucode for 19.30
f25a39c amdgpu: add new raven rlc firmware
9ae61e7 ice: Add package file for Intel E800 series driver
417a9c6 amdgpu: add initial navi10 firmware
702cc63 Merge branch 'cml_tgl-icl-dmc_huc_updates' of git://anongit.freedesktop.org/drm/drm-firmware
3182b4b Merge branch 'gpu-845' of https://github.com/ndechesne/linux-firmware
3ea84e5 drm/i915/firmware: Add v9.0.0 of HuC for Icelake
60ddd0e drm/i915/firmware: Add v4.0.0 of HuC for Cometlake
c47d8f8 drm/i915/firmware: Add v4.0.0 of HuC for Geminilake
2cdb78c drm/i915/firmware: Add v2.0.0 of HuC for Broxton
38965af drm/i915/firmware: Add v4.0.0 of HuC for Kabylake
8d127af drm/i915/firmware: Add v2.0.0 of HuC for Skylake
e7b6fa7 drm/i915/firmware: Add v33 of GuC for CML
e4ea25f drm/i915/firmware: Add v2.04 of DMC for TGL
51deca6 drm/i915/firmware: Add v1.09 of DMC for ICL
88ea23e qcom: add firmware files for Adreno a630
6c6918a linux-firmware: Update firmware file for Intel Bluetooth AX201
6ddb9d9 Merge branch 'for-upstream' of git://git.chelsio.net/pub/git/linux-firmware
d45c950 nvidia: Add XUSB firmware for Tegra186
65c6595 Add symlinks for Tegra VIC firmware binaries
0b22bfc rtl_bt: Update RTL8723D BT FW to 0x828A_96F1
f667c00 rtl_nic: add firmware rtl8125a-3
fe1ae0d linux-firmware: Add firmware file for Intel Bluetooth AX201
2f885ba Chelsio driver loads firmware configuration file to allow firmware to distribute resources before chip bring up. Chelsio NIC driver, cxgb4 searches for firmware config file at /lib/firmware/cxgb4/ directory.
7307a29 brcm: Add 43455 based AP6255 NVRAM for the Minix Neo Z83-4 Mini PC
65d02cd brcm: Add 43340 based AP6234 NVRAM for the PoV TAB-P1006W-232 tablet
f38fb4f Merge tag 'iwlwifi-fw-2019-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware
40e4162 iwlwifi: update FWs to core45-152 release
c0fb3d9 check_whence: Add copy-firmware.sh to the list of ignored files
aa703aa rtl_bt: Update RTL8822C BT FW to V0x098A_94A4
665001a linux-firmware: Update firmware file for Intel Bluetooth AX200
c0ca980 linux-firmware: Update firmware file for Intel Bluetooth AX201
b6427bf linux-firmware: Update firmware file for Intel Bluetooth 9560
fe48882 linux-firmware: Update firmware file for Intel Bluetooth 9260
ebd40c6 Mellanox: Add new mlxsw_spectrum firmware 13.2000.1886

Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
---
 package/firmware/linux-firmware/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile
index ac4c3d4a63..085cce422d 100644
--- a/package/firmware/linux-firmware/Makefile
+++ b/package/firmware/linux-firmware/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linux-firmware
-PKG_VERSION:=20190815
+PKG_VERSION:=20191215
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=15615d87ac9d93aa5c20939a6c65cca7f3bc656b5e8ffd998b8acb932c854327
+PKG_HASH:=c2068ff4a797c0f2c3edbb9488f82a48bca8a995855ea21310a8346195c0ae56
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
-- 
2.24.1




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Sun Dec 15 11:53:42 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Sun, 15 Dec 2019 17:53:42 +0100
Subject: [OpenWrt-Devel] Lantiq DTS rename
In-Reply-To: <ecf600e1-e264-44d1-c9e6-61513f2f4da6@hauke-m.de>
References: <008201d5b348$fd4eba30$f7ec2e90$@adrianschmutzler.de>
 <20191215132728.GD4782@makrotopia.org>
 <ecf600e1-e264-44d1-c9e6-61513f2f4da6@hauke-m.de>
Message-ID: <011f01d5b368$364cc830$a2e65890$@adrianschmutzler.de>

Hi,

how would you call the SOC variable in image Makefile then? (the equivalent to ATH_SOC and MTK_SOC...)

Best

Adrian

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Hauke Mehrtens
> Sent: Sonntag, 15. Dezember 2019 14:49
> To: Daniel Golle <daniel at makrotopia.org>; mail at adrianschmutzler.de
> Cc: Martin Blumenstingl <martin.blumenstingl at googlemail.com>; openwrt-
> devel at lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] Lantiq DTS rename
> 
> On 12/15/19 2:27 PM, Daniel Golle wrote:
> > Hi Adrian,
> >
> > On Sun, Dec 15, 2019 at 02:10:14PM +0100, mail at adrianschmutzler.de
> wrote:
> >> Hi,
> >>
> >> I consider doing a DTS rename for lantiq target similar to what it's like on
> ath79 and what I did for ramips earlier that year.
> >>
> >> However, I wonder whether the "soc_vendor_model.dts" scheme is
> useful there, or whether it wouldn't be better to just use
> "vendor_model.dts" ...
> >>
> >> Any thoughts on this or any NAK in general?
> >
> > soc_vendor_model should be appropriate here is well. why not?
> 
> Yes please clean this up and use the soc_vendor_model model, I think this is
> the common format in the Linux kernel.
> 
> Be aware that there is a pull request from Martin pending with some changes
> to the existing files:
> https://github.com/openwrt/openwrt/pull/2216
> 
> Please also move the dts files into the lantiq subfolder at
> arch/mips/boot/dts/lantiq/
> 
> Hauke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191215/6c9c079d/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Sun Dec 15 12:11:05 2019
From: daniel at makrotopia.org (Daniel Golle)
Date: Sun, 15 Dec 2019 19:11:05 +0200
Subject: [OpenWrt-Devel] Lantiq DTS rename
In-Reply-To: <011f01d5b368$364cc830$a2e65890$@adrianschmutzler.de>
References: <008201d5b348$fd4eba30$f7ec2e90$@adrianschmutzler.de>
 <20191215132728.GD4782@makrotopia.org>
 <ecf600e1-e264-44d1-c9e6-61513f2f4da6@hauke-m.de>
 <011f01d5b368$364cc830$a2e65890$@adrianschmutzler.de>
Message-ID: <20191215171105.GA2832@makrotopia.org>

On Sun, Dec 15, 2019 at 05:53:42PM +0100, mail at adrianschmutzler.de wrote:
> Hi,
> 
> how would you call the SOC variable in image Makefile then? (the equivalent to ATH_SOC and MTK_SOC...)

In a way those variables should be unified into something like 'SOC'...
For now, maybe 'LTQ_SOC' will do until we replace them all by 'SOC' and
that should be it...

Cheers

Daniel

> 
> Best
> 
> Adrian
> 
> > -----Original Message-----
> > From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> > On Behalf Of Hauke Mehrtens
> > Sent: Sonntag, 15. Dezember 2019 14:49
> > To: Daniel Golle <daniel at makrotopia.org>; mail at adrianschmutzler.de
> > Cc: Martin Blumenstingl <martin.blumenstingl at googlemail.com>; openwrt-
> > devel at lists.openwrt.org
> > Subject: Re: [OpenWrt-Devel] Lantiq DTS rename
> > 
> > On 12/15/19 2:27 PM, Daniel Golle wrote:
> > > Hi Adrian,
> > >
> > > On Sun, Dec 15, 2019 at 02:10:14PM +0100, mail at adrianschmutzler.de
> > wrote:
> > >> Hi,
> > >>
> > >> I consider doing a DTS rename for lantiq target similar to what it's like on
> > ath79 and what I did for ramips earlier that year.
> > >>
> > >> However, I wonder whether the "soc_vendor_model.dts" scheme is
> > useful there, or whether it wouldn't be better to just use
> > "vendor_model.dts" ...
> > >>
> > >> Any thoughts on this or any NAK in general?
> > >
> > > soc_vendor_model should be appropriate here is well. why not?
> > 
> > Yes please clean this up and use the soc_vendor_model model, I think this is
> > the common format in the Linux kernel.
> > 
> > Be aware that there is a pull request from Martin pending with some changes
> > to the existing files:
> > https://github.com/openwrt/openwrt/pull/2216
> > 
> > Please also move the dts files into the lantiq subfolder at
> > arch/mips/boot/dts/lantiq/
> > 
> > Hauke



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hauke at hauke-m.de  Sun Dec 15 12:11:23 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Sun, 15 Dec 2019 18:11:23 +0100
Subject: [OpenWrt-Devel] Lantiq DTS rename
In-Reply-To: <011f01d5b368$364cc830$a2e65890$@adrianschmutzler.de>
References: <008201d5b348$fd4eba30$f7ec2e90$@adrianschmutzler.de>
 <20191215132728.GD4782@makrotopia.org>
 <ecf600e1-e264-44d1-c9e6-61513f2f4da6@hauke-m.de>
 <011f01d5b368$364cc830$a2e65890$@adrianschmutzler.de>
Message-ID: <162fa723-69a2-f135-2eb3-fc1dfbcd7eba@hauke-m.de>

On 12/15/19 5:53 PM, mail at adrianschmutzler.de wrote:
> Hi,
> 
> how would you call the SOC variable in image Makefile then? (the equivalent to ATH_SOC and MTK_SOC...)
> 
> Best
> 
> Adrian

Lantiq currently has these 3:
CONFIG_SOC_AMAZON_SE
CONFIG_SOC_XWAY
CONFIG_SOC_FALCON

I would use these as a config options like CONFIG_ATH79 for the ath790
target.

as SOC names you can use these:
amazonse_
danube_
ar9_
vr9_
falcon_

Hauke


> 
>> -----Original Message-----
>> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
>> On Behalf Of Hauke Mehrtens
>> Sent: Sonntag, 15. Dezember 2019 14:49
>> To: Daniel Golle <daniel at makrotopia.org>; mail at adrianschmutzler.de
>> Cc: Martin Blumenstingl <martin.blumenstingl at googlemail.com>; openwrt-
>> devel at lists.openwrt.org
>> Subject: Re: [OpenWrt-Devel] Lantiq DTS rename
>>
>> On 12/15/19 2:27 PM, Daniel Golle wrote:
>>> Hi Adrian,
>>>
>>> On Sun, Dec 15, 2019 at 02:10:14PM +0100, mail at adrianschmutzler.de
>> wrote:
>>>> Hi,
>>>>
>>>> I consider doing a DTS rename for lantiq target similar to what it's like on
>> ath79 and what I did for ramips earlier that year.
>>>>
>>>> However, I wonder whether the "soc_vendor_model.dts" scheme is
>> useful there, or whether it wouldn't be better to just use
>> "vendor_model.dts" ...
>>>>
>>>> Any thoughts on this or any NAK in general?
>>>
>>> soc_vendor_model should be appropriate here is well. why not?
>>
>> Yes please clean this up and use the soc_vendor_model model, I think this is
>> the common format in the Linux kernel.
>>
>> Be aware that there is a pull request from Martin pending with some changes
>> to the existing files:
>> https://github.com/openwrt/openwrt/pull/2216
>>
>> Please also move the dts files into the lantiq subfolder at
>> arch/mips/boot/dts/lantiq/
>>
>> Hauke
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191215/f38142e1/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Sun Dec 15 12:25:22 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sun, 15 Dec 2019 20:25:22 +0300
Subject: [OpenWrt-Devel] [PATCH v2] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <20191211145458.GN11070@home.paul.comp>
References: <20191211145458.GN11070@home.paul.comp>
Message-ID: <20191215172522.26626-1-fercerpav@gmail.com>

According to many bugreports [0][1][2] the default ath10k-ct kernel
module is unusable on devices with just 64 MiB RAM or with 128 MiB and
dual ath10k cards. The target boards boot but eventually oom-killer
starts to interfere with normal operation, so the current state is
effectively broken.

Since the two patches in question have a performance impact (and
possibly some other unexpected side-effects) a dedicated build variant
is added so that users of the low RAM devices can still benefit from all
the ath10k-ct advantages.

According to testing [3] results, the issue can be experienced even with
"a 256MB device with three radios". Measured performance impact of
implementing small buffers was lowering "the maximum 5 GHz throughput on
an IPQ40xx device without RPS/XPS optimizations from 494/432 Mbit/s for
TCP transfers (download/upload) to 438/343 Mbit/s"

The patches were apparently inspired by QSDK tweaks used by ODMs for the
affected devices.

[0] http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020573.html
[1] https://github.com/openwrt/openwrt/pull/1077
[2] https://bugs.openwrt.org/index.php?do=details&task_id=2664
[3] https://github.com/freifunk-gluon/gluon/pull/1440#issue-195607701

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
Changes for v2:

    - Added performance impact details to the commit message
    - Fixed QUILT=1 operation
    - Refreshed the new patches

 package/kernel/ath10k-ct/Makefile             | 30 +++++++-
 ...0-0010-ath10k-limit-htt-rx-ring-size.patch | 22 ++++++
 ...60-0011-ath10k-limit-pci-buffer-size.patch | 76 +++++++++++++++++++
 3 files changed, 127 insertions(+), 1 deletion(-)
 create mode 100644 package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch
 create mode 100644 package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch

diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index dbf75fe174..99ec225570 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -35,6 +35,7 @@ define KernelPackage/ath10k-ct
 	$(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
   AUTOLOAD:=$(call AutoProbe,ath10k_pci)
   PROVIDES:=kmod-ath10k
+  VARIANT:=regular
 endef
 
 define KernelPackage/ath10k-ct/config
@@ -42,7 +43,17 @@ define KernelPackage/ath10k-ct/config
        config ATH10K-CT_LEDS
                bool "Enable LED support"
                default y
-               depends on PACKAGE_kmod-ath10k-ct
+               depends on PACKAGE_kmod-ath10k-ct || PACKAGE_kmod-ath10k-ct-smallbuffers
+endef
+
+define KernelPackage/ath10k-ct-smallbuffers
+$(call KernelPackage/ath10k-ct)
+  TITLE+= (small buffers for low-RAM devices)
+  VARIANT:=smallbuffers
+endef
+
+define KernelPackage/ath10k-ct-smallbuffers/config
+$(call KernelPackage/ath10k-ct/config)
 endef
 
 NOSTDINC_FLAGS = \
@@ -90,6 +101,22 @@ ifeq ($(CONFIG_ATH10K-CT_LEDS),y)
   NOSTDINC_FLAGS += -DCONFIG_ATH10K_LEDS
 endif
 
+define Build/Patch
+	$(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches)
+	$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR),regular/)
+ifeq ($(BUILD_VARIANT),smallbuffers)
+	$(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)-$(BUILD_VARIANT),$(BUILD_VARIANT)/)
+endif
+	$(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
+endef
+
+define Quilt/Refresh/Package
+	$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR),regular/)
+ifeq ($(BUILD_VARIANT),smallbuffers)
+	$(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)-$(BUILD_VARIANT),$(BUILD_VARIANT)/)
+endif
+endef
+
 define Build/Configure
 	cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
 endef
@@ -107,3 +134,4 @@ define Build/Compile
 endef
 
 $(eval $(call KernelPackage,ath10k-ct))
+$(eval $(call KernelPackage,ath10k-ct-smallbuffers))
diff --git a/package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch b/package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch
new file mode 100644
index 0000000000..fcc5927759
--- /dev/null
+++ b/package/kernel/ath10k-ct/patches-smallbuffers/960-0010-ath10k-limit-htt-rx-ring-size.patch
@@ -0,0 +1,22 @@
+--- a/ath10k-4.19/htt.h
++++ b/ath10k-4.19/htt.h
+@@ -237,7 +237,7 @@ enum htt_rx_ring_flags {
+ };
+ 
+ #define HTT_RX_RING_SIZE_MIN 128
+-#define HTT_RX_RING_SIZE_MAX 2048
++#define HTT_RX_RING_SIZE_MAX 512
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
+--- a/ath10k-5.2/htt.h
++++ b/ath10k-5.2/htt.h
+@@ -225,7 +225,7 @@ enum htt_rx_ring_flags {
+ };
+ 
+ #define HTT_RX_RING_SIZE_MIN 128
+-#define HTT_RX_RING_SIZE_MAX 2048
++#define HTT_RX_RING_SIZE_MAX 512
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
diff --git a/package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch b/package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch
new file mode 100644
index 0000000000..c54b36731e
--- /dev/null
+++ b/package/kernel/ath10k-ct/patches-smallbuffers/960-0011-ath10k-limit-pci-buffer-size.patch
@@ -0,0 +1,76 @@
+--- a/ath10k-4.19/pci.c
++++ b/ath10k-4.19/pci.c
+@@ -142,7 +142,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 512,
++		.dest_nentries = 128,
+ 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
+ 	},
+ 
+@@ -151,7 +151,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 128,
++		.dest_nentries = 64,
+ 		.recv_cb = ath10k_pci_htc_rx_cb,
+ 	},
+ 
+@@ -178,7 +178,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 512,
+-		.dest_nentries = 512,
++		.dest_nentries = 128,
+ 		.recv_cb = ath10k_pci_htt_rx_cb,
+ 	},
+ 
+@@ -203,7 +203,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 128,
++		.dest_nentries = 96,
+ 		.recv_cb = ath10k_pci_pktlog_rx_cb,
+ 	},
+ 
+--- a/ath10k-5.2/pci.c
++++ b/ath10k-5.2/pci.c
+@@ -131,7 +131,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 512,
++		.dest_nentries = 128,
+ 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
+ 	},
+ 
+@@ -140,7 +140,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 128,
++		.dest_nentries = 64,
+ 		.recv_cb = ath10k_pci_htc_rx_cb,
+ 	},
+ 
+@@ -167,7 +167,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 512,
+-		.dest_nentries = 512,
++		.dest_nentries = 128,
+ 		.recv_cb = ath10k_pci_htt_rx_cb,
+ 	},
+ 
+@@ -192,7 +192,7 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
+-		.dest_nentries = 128,
++		.dest_nentries = 96,
+ 		.recv_cb = ath10k_pci_pktlog_rx_cb,
+ 	},
+ 
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Sun Dec 15 13:06:24 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun, 15 Dec 2019 19:06:24 +0100
Subject: [OpenWrt-Devel] Lantiq DTS rename
In-Reply-To: <20191215171105.GA2832@makrotopia.org>
References: <008201d5b348$fd4eba30$f7ec2e90$@adrianschmutzler.de>
 <20191215132728.GD4782@makrotopia.org>
 <ecf600e1-e264-44d1-c9e6-61513f2f4da6@hauke-m.de>
 <011f01d5b368$364cc830$a2e65890$@adrianschmutzler.de>
 <20191215171105.GA2832@makrotopia.org>
Message-ID: <544C3B08-18C0-43DD-B5A0-A359F1B34DB4@adrianschmutzler.de>

Well, we could change it for ath79 and ramips right now, would be a simple rename without side effects.

We could use just SOC as proposed. I'd prefer to decide on the name right away and then would apply the patch directly without sending it to the list, to save us from rebasing...

Best

Adrian

On 15 December 2019 18:11:05 CET, Daniel Golle <daniel at makrotopia.org> wrote:
>On Sun, Dec 15, 2019 at 05:53:42PM +0100, mail at adrianschmutzler.de
>wrote:
>> Hi,
>> 
>> how would you call the SOC variable in image Makefile then? (the
>equivalent to ATH_SOC and MTK_SOC...)
>
>In a way those variables should be unified into something like 'SOC'...
>For now, maybe 'LTQ_SOC' will do until we replace them all by 'SOC' and
>that should be it...
>
>Cheers
>
>Daniel
>
>> 
>> Best
>> 
>> Adrian
>> 
>> > -----Original Message-----
>> > From: openwrt-devel
>[mailto:openwrt-devel-bounces at lists.openwrt.org]
>> > On Behalf Of Hauke Mehrtens
>> > Sent: Sonntag, 15. Dezember 2019 14:49
>> > To: Daniel Golle <daniel at makrotopia.org>; mail at adrianschmutzler.de
>> > Cc: Martin Blumenstingl <martin.blumenstingl at googlemail.com>;
>openwrt-
>> > devel at lists.openwrt.org
>> > Subject: Re: [OpenWrt-Devel] Lantiq DTS rename
>> > 
>> > On 12/15/19 2:27 PM, Daniel Golle wrote:
>> > > Hi Adrian,
>> > >
>> > > On Sun, Dec 15, 2019 at 02:10:14PM +0100,
>mail at adrianschmutzler.de
>> > wrote:
>> > >> Hi,
>> > >>
>> > >> I consider doing a DTS rename for lantiq target similar to what
>it's like on
>> > ath79 and what I did for ramips earlier that year.
>> > >>
>> > >> However, I wonder whether the "soc_vendor_model.dts" scheme is
>> > useful there, or whether it wouldn't be better to just use
>> > "vendor_model.dts" ...
>> > >>
>> > >> Any thoughts on this or any NAK in general?
>> > >
>> > > soc_vendor_model should be appropriate here is well. why not?
>> > 
>> > Yes please clean this up and use the soc_vendor_model model, I
>think this is
>> > the common format in the Linux kernel.
>> > 
>> > Be aware that there is a pull request from Martin pending with some
>changes
>> > to the existing files:
>> > https://github.com/openwrt/openwrt/pull/2216
>> > 
>> > Please also move the dts files into the lantiq subfolder at
>> > arch/mips/boot/dts/lantiq/
>> > 
>> > Hauke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191215/6dea9655/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From noreply at github.com  Sun Dec 15 15:58:42 2019
From: noreply at github.com (Stephen Walker)
Date: Sun, 15 Dec 2019 12:58:42 -0800
Subject: [OpenWrt-Devel] [sdwalker/sdwalker.github.io] 6bb22e: This week's
 update
Message-ID: <sdwalker/sdwalker.github.io/push/refs/heads/master/d4b099-6bb22e@github.com>

  Branch: refs/heads/master
  Home:   https://github.com/sdwalker/sdwalker.github.io
  Commit: 6bb22e3b77caeb9b283610ce8d7b1d42bb4dc1e9
      https://github.com/sdwalker/sdwalker.github.io/commit/6bb22e3b77caeb9b283610ce8d7b1d42bb4dc1e9
  Author: Stephen Walker <stephendwalker+github at gmail.com>
  Date:   2019-12-15 (Sun, 15 Dec 2019)

  Changed paths:
    M uscan/index-18.06.html
    M uscan/index-19.07.html
    M uscan/index.html

  Log Message:
  -----------
  This week's update



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From bobafetthotmail at gmail.com  Mon Dec 16 06:26:50 2019
From: bobafetthotmail at gmail.com (Alberto Bursi)
Date: Mon, 16 Dec 2019 12:26:50 +0100
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <4186246.Rc2P9gcx8s@debian64>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <5675304.dXXkMWVoIb@debian64> <20191215120114.GD11070@home.paul.comp>
 <4186246.Rc2P9gcx8s@debian64>
Message-ID: <a8f56a23-108f-3f76-2ea3-a904726ed224@gmail.com>


On 15/12/19 14:09, Christian Lamparter wrote:
>
> But it seems that Ben had a change of heart in this regard. I don't know the
> details or why, But it makes sense because it would enable his company to save
> some money for the systems his company sells:
>   <https://www.candelatech.com/lf_systems.php> so there is some value
> in supporting these devices, especially if someone else does all the work
> for it.

These are wifi/network testing equipment, not network devices.

Also I don't see the value in "saving some money" by using a bit less RAM

when the cheaper system is sold for 3k, and most stuff is above 10k.

You could use standard whitebox x86 stuff at that price point.

-Alberto


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Mon Dec 16 07:28:13 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Mon, 16 Dec 2019 13:28:13 +0100
Subject: [OpenWrt-Devel] [PATCH 0/4] lantiq: use soc_vendor_device scheme on
 DTS file
Message-ID: <20191216122817.22628-1-freifunk@adrianschmutzler.de>

** Please run-test **

This renames lantiq DTS(I) files to follow soc_vendor_device scheme.

The same patchset is available for easy build at:
https://git.openwrt.org/?p=openwrt/staging/adrian.git;a=shortlog;h=refs/heads/lantiq

It is based on the DTS changes proposed in
https://github.com/openwrt/openwrt/pull/2216
(this patchset is based on them, but they are not included in the set;
they are added in the referenced staging tree, though)

The state in my tree is build-tested on all subtargets, but should be
run-tested at least on 1-3 selected devices.

If Acked, I will change the ATH_SOC, MTK_SOC and SUNXI_SOC variables to
SOC as well when applying this patchset.

Adrian Schmutzler (4):
  lantiq: split device definitions into files
  build: image: add SOC device variable
  lantiq: use soc_vendor_device scheme on DTS file
  lantiq: remove ar9_lantiq_easy50810.dts

 include/image.mk                              |   3 +-
 .../files/arch/mips/boot/dts/EASY50810.dts    |  73 --
 .../mips/boot/dts/{ => lantiq}/amazonse.dtsi  |   0
 .../amazonse_allnet_all0333cj.dts}            |   0
 .../amazonse_netgear_dgn1000b.dts}            |   0
 .../arch/mips/boot/dts/{ => lantiq}/ar9.dtsi  |   0
 .../ar9_avm_fritz7312.dts}                    |   0
 .../ar9_avm_fritz7320.dts}                    |   0
 .../ar9_bt_homehub-v3a.dts}                   |   0
 .../ar9_buffalo_wbmr-hp-g300h.dts}            |   0
 .../ar9_netgear_dgn3500.dts}                  |   2 +-
 .../ar9_netgear_dgn3500.dtsi}                 |   0
 .../ar9_netgear_dgn3500b.dts}                 |   2 +-
 .../{H201L.dts => lantiq/ar9_zte_h201l.dts}   |   0
 .../ar9_zyxel_p-2601hn.dts}                   |   0
 .../mips/boot/dts/{ => lantiq}/danube.dtsi    |   0
 .../danube_arcadyan_arv4510pw.dts}            |   0
 .../danube_arcadyan_arv4518pwr01.dts}         |   2 +-
 .../danube_arcadyan_arv4518pwr01.dtsi}        |   0
 .../danube_arcadyan_arv4518pwr01a.dts}        |   2 +-
 .../danube_arcadyan_arv4519pw.dts}            |   0
 .../danube_arcadyan_arv4520pw.dts}            |   0
 .../danube_arcadyan_arv4525pw.dts}            |   0
 .../danube_arcadyan_arv452cqw.dts}            |   0
 .../danube_arcadyan_arv7506pw11.dts}          |   0
 .../danube_arcadyan_arv7510pw22.dts}          |   0
 .../danube_arcadyan_arv7518pw.dts}            |   0
 .../danube_arcadyan_arv7519pw.dts}            |   0
 .../danube_arcadyan_arv7525pw.dts}            |   0
 .../danube_arcadyan_arv752dpw.dts}            |   0
 .../danube_arcadyan_arv752dpw22.dts}          |   0
 .../danube_arcadyan_arv8539pw22.dts}          |   0
 .../danube_audiocodes_mp-252.dts}             |   0
 .../danube_bt_homehub-v2b.dts}                |   0
 .../danube_lantiq_easy50712.dts}              |   0
 .../danube_siemens_gigaset-sx76x.dts}         |   0
 .../mips/boot/dts/{ => lantiq}/falcon.dtsi    |   0
 .../falcon_lantiq_easy88388.dts}              |   2 +-
 .../falcon_lantiq_easy88444.dts}              |   2 +-
 .../falcon_lantiq_easy98000-nand.dts}         |   2 +-
 .../falcon_lantiq_easy98000-nor.dts}          |   2 +-
 .../falcon_lantiq_easy98000-sflash.dts}       |   4 +-
 .../falcon_lantiq_easy98000.dtsi}             |   0
 .../falcon_lantiq_easy98020-v18.dts}          |   2 +-
 .../falcon_lantiq_easy98020.dts}              |   2 +-
 .../falcon_lantiq_easy98021.dts}              |   2 +-
 .../falcon_lantiq_easy98035synce.dts}         |   2 +-
 .../falcon_lantiq_easy98035synce1588.dts}     |   2 +-
 .../falcon_lantiq_falcon-mdu.dts}             |   2 +-
 .../falcon_lantiq_falcon-sfp.dts}             |   2 +-
 .../falcon_sflash-16m.dtsi}                   |   0
 .../arch/mips/boot/dts/{ => lantiq}/vr9.dtsi  |   0
 .../vr9_alphanetworks_asl56026.dts}           |   0
 .../vr9_arcadyan_arv7519rw22.dts}             |   0
 .../vr9_arcadyan_vg3503j.dts}                 |   0
 .../vr9_arcadyan_vgv7510kw22-brn.dts}         |   2 +-
 .../vr9_arcadyan_vgv7510kw22-nor.dts}         |   2 +-
 .../vr9_arcadyan_vgv7510kw22.dtsi}            |   0
 .../vr9_arcadyan_vgv7519-brn.dts}             |   2 +-
 .../vr9_arcadyan_vgv7519-nor.dts}             |   2 +-
 .../vr9_arcadyan_vgv7519.dtsi}                |   0
 .../vr9_avm_fritz3370-rev2-hynix.dts}         |   2 +-
 .../vr9_avm_fritz3370-rev2-micron.dts}        |   2 +-
 .../vr9_avm_fritz3370-rev2.dtsi}              |   0
 .../vr9_avm_fritz7360sl.dts}                  |   2 +-
 .../vr9_avm_fritz7362sl.dts}                  |   2 +-
 .../vr9_avm_fritz736x.dtsi}                   |   0
 .../vr9_avm_fritz7412.dts}                    |   0
 .../vr9_bt_homehub-v5a.dts}                   |   0
 .../vr9_buffalo_wbmr-300hpd.dts}              |   0
 .../vr9_lantiq_easy80920-nand.dts}            |   2 +-
 .../vr9_lantiq_easy80920-nor.dts}             |   2 +-
 .../vr9_lantiq_easy80920.dtsi}                |   0
 .../vr9_netgear_dm200.dts}                    |   0
 .../vr9_tplink_tdw8970.dts}                   |   2 +-
 .../vr9_tplink_tdw8980.dts}                   |   2 +-
 .../vr9_tplink_tdw89x0.dtsi}                  |   0
 .../vr9_tplink_vr200.dts}                     |   2 +-
 .../vr9_tplink_vr200.dtsi}                    |   0
 .../vr9_tplink_vr200v.dts}                    |   2 +-
 .../vr9_zyxel_p-2812hnu-f1.dts}               |   2 +-
 .../vr9_zyxel_p-2812hnu-f3.dts}               |   2 +-
 .../vr9_zyxel_p-2812hnu-fx.dtsi}              |   0
 target/linux/lantiq/image/Makefile            | 859 +-----------------
 target/linux/lantiq/image/amazonse.mk         |  22 +
 target/linux/lantiq/image/ar9.mk              | 165 ++++
 target/linux/lantiq/image/danube.mk           | 219 +++++
 target/linux/lantiq/image/falcon.mk           | 105 +++
 target/linux/lantiq/image/tp-link.mk          |   5 +-
 target/linux/lantiq/image/vr9.mk              | 244 +++++
 target/linux/lantiq/image/xway_legacy.mk      |  77 ++
 91 files changed, 876 insertions(+), 962 deletions(-)
 delete mode 100644 target/linux/lantiq/files/arch/mips/boot/dts/EASY50810.dts
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ => lantiq}/amazonse.dtsi (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ALL0333CJ.dts => lantiq/amazonse_allnet_all0333cj.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{DGN1000B.dts => lantiq/amazonse_netgear_dgn1000b.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ => lantiq}/ar9.dtsi (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ7312.dts => lantiq/ar9_avm_fritz7312.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ7320.dts => lantiq/ar9_avm_fritz7320.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{BTHOMEHUBV3A.dts => lantiq/ar9_bt_homehub-v3a.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{WBMR.dts => lantiq/ar9_buffalo_wbmr-hp-g300h.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{DGN3500.dts => lantiq/ar9_netgear_dgn3500.dts} (75%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{DGN3500.dtsi => lantiq/ar9_netgear_dgn3500.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{DGN3500B.dts => lantiq/ar9_netgear_dgn3500b.dts} (75%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{H201L.dts => lantiq/ar9_zte_h201l.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{P2601HNFX.dts => lantiq/ar9_zyxel_p-2601hn.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ => lantiq}/danube.dtsi (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4510PW.dts => lantiq/danube_arcadyan_arv4510pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4518PWR01.dts => lantiq/danube_arcadyan_arv4518pwr01.dts} (71%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4518PWR01.dtsi => lantiq/danube_arcadyan_arv4518pwr01.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4518PWR01A.dts => lantiq/danube_arcadyan_arv4518pwr01a.dts} (78%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4519PW.dts => lantiq/danube_arcadyan_arv4519pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4520PW.dts => lantiq/danube_arcadyan_arv4520pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4525PW.dts => lantiq/danube_arcadyan_arv4525pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV452CQW.dts => lantiq/danube_arcadyan_arv452cqw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7506PW11.dts => lantiq/danube_arcadyan_arv7506pw11.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7510PW22.dts => lantiq/danube_arcadyan_arv7510pw22.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7518PW.dts => lantiq/danube_arcadyan_arv7518pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7519PW.dts => lantiq/danube_arcadyan_arv7519pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7525PW.dts => lantiq/danube_arcadyan_arv7525pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV752DPW.dts => lantiq/danube_arcadyan_arv752dpw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV752DPW22.dts => lantiq/danube_arcadyan_arv752dpw22.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV8539PW22.dts => lantiq/danube_arcadyan_arv8539pw22.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ACMP252.dts => lantiq/danube_audiocodes_mp-252.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{BTHOMEHUBV2B.dts => lantiq/danube_bt_homehub-v2b.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY50712.dts => lantiq/danube_lantiq_easy50712.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{GIGASX76X.dts => lantiq/danube_siemens_gigaset-sx76x.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ => lantiq}/falcon.dtsi (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY88388.dts => lantiq/falcon_lantiq_easy88388.dts} (98%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY88444.dts => lantiq/falcon_lantiq_easy88444.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98000NAND.dts => lantiq/falcon_lantiq_easy98000-nand.dts} (93%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98000NOR.dts => lantiq/falcon_lantiq_easy98000-nor.dts} (93%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98000SFLASH.dts => lantiq/falcon_lantiq_easy98000-sflash.dts} (73%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98000-base.dtsi => lantiq/falcon_lantiq_easy98000.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98020V18.dts => lantiq/falcon_lantiq_easy98020-v18.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98020.dts => lantiq/falcon_lantiq_easy98020.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98021.dts => lantiq/falcon_lantiq_easy98021.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98035SYNCE.dts => lantiq/falcon_lantiq_easy98035synce.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98035SYNCE1588.dts => lantiq/falcon_lantiq_easy98035synce1588.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FALCON-MDU.dts => lantiq/falcon_lantiq_falcon-mdu.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FALCON-SFP.dts => lantiq/falcon_lantiq_falcon-sfp.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{falcon-sflash-16M.dtsi => lantiq/falcon_sflash-16m.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ => lantiq}/vr9.dtsi (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ASL56026.dts => lantiq/vr9_alphanetworks_asl56026.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7519RW22.dts => lantiq/vr9_arcadyan_arv7519rw22.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VG3503J.dts => lantiq/vr9_arcadyan_vg3503j.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7510KW22BRN.dts => lantiq/vr9_arcadyan_vgv7510kw22-brn.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7510KW22NOR.dts => lantiq/vr9_arcadyan_vgv7510kw22-nor.dts} (92%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7510KW22.dtsi => lantiq/vr9_arcadyan_vgv7510kw22.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7519BRN.dts => lantiq/vr9_arcadyan_vgv7519-brn.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7519NOR.dts => lantiq/vr9_arcadyan_vgv7519-nor.dts} (92%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7519.dtsi => lantiq/vr9_arcadyan_vgv7519.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ3370-REV2-HYNIX.dts => lantiq/vr9_avm_fritz3370-rev2-hynix.dts} (94%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ3370-REV2-MICRON.dts => lantiq/vr9_avm_fritz3370-rev2-micron.dts} (94%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ3370-REV2.dtsi => lantiq/vr9_avm_fritz3370-rev2.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ7360SL.dts => lantiq/vr9_avm_fritz7360sl.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ7362SL.dts => lantiq/vr9_avm_fritz7362sl.dts} (98%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ736X.dtsi => lantiq/vr9_avm_fritz736x.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ7412.dts => lantiq/vr9_avm_fritz7412.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{BTHOMEHUBV5A.dts => lantiq/vr9_bt_homehub-v5a.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{WBMR300.dts => lantiq/vr9_buffalo_wbmr-300hpd.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY80920NAND.dts => lantiq/vr9_lantiq_easy80920-nand.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY80920NOR.dts => lantiq/vr9_lantiq_easy80920-nor.dts} (94%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY80920.dtsi => lantiq/vr9_lantiq_easy80920.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{DM200.dts => lantiq/vr9_netgear_dm200.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{TDW8970.dts => lantiq/vr9_tplink_tdw8970.dts} (78%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{TDW8980.dts => lantiq/vr9_tplink_tdw8980.dts} (94%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{TDW89X0.dtsi => lantiq/vr9_tplink_tdw89x0.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VR200.dts => lantiq/vr9_tplink_vr200.dts} (98%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VR200.dtsi => lantiq/vr9_tplink_vr200.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VR200v.dts => lantiq/vr9_tplink_vr200v.dts} (98%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{P2812HNUF1.dts => lantiq/vr9_zyxel_p-2812hnu-f1.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{P2812HNUF3.dts => lantiq/vr9_zyxel_p-2812hnu-f3.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{P2812HNUFX.dtsi => lantiq/vr9_zyxel_p-2812hnu-fx.dtsi} (100%)
 create mode 100644 target/linux/lantiq/image/amazonse.mk
 create mode 100644 target/linux/lantiq/image/ar9.mk
 create mode 100644 target/linux/lantiq/image/danube.mk
 create mode 100644 target/linux/lantiq/image/falcon.mk
 create mode 100644 target/linux/lantiq/image/vr9.mk
 create mode 100644 target/linux/lantiq/image/xway_legacy.mk

-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Mon Dec 16 07:28:14 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Mon, 16 Dec 2019 13:28:14 +0100
Subject: [OpenWrt-Devel] [PATCH 1/4] lantiq: split device definitions into
 files
In-Reply-To: <20191216122817.22628-1-freifunk@adrianschmutzler.de>
References: <20191216122817.22628-1-freifunk@adrianschmutzler.de>
Message-ID: <20191216122817.22628-2-freifunk@adrianschmutzler.de>

This splits device definitions into several *.mk files to increase
overview.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/lantiq/image/Makefile       | 857 +----------------------
 target/linux/lantiq/image/amazonse.mk    |  22 +
 target/linux/lantiq/image/ar9.mk         | 163 +++++
 target/linux/lantiq/image/danube.mk      | 219 ++++++
 target/linux/lantiq/image/falcon.mk      | 105 +++
 target/linux/lantiq/image/vr9.mk         | 246 +++++++
 target/linux/lantiq/image/xway_legacy.mk |  77 ++
 7 files changed, 838 insertions(+), 851 deletions(-)
 create mode 100644 target/linux/lantiq/image/amazonse.mk
 create mode 100644 target/linux/lantiq/image/ar9.mk
 create mode 100644 target/linux/lantiq/image/danube.mk
 create mode 100644 target/linux/lantiq/image/falcon.mk
 create mode 100644 target/linux/lantiq/image/vr9.mk
 create mode 100644 target/linux/lantiq/image/xway_legacy.mk

diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index bfb5390465..a2052ef924 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -108,872 +108,27 @@ define Device/AVM
 endef
 
 ifeq ($(SUBTARGET),ase)
-
-define Device/allnet_all0333cj
-  DEVICE_VENDOR := Allnet
-  DEVICE_MODEL := ALL0333CJ
-  IMAGE_SIZE := 3700k
-  DEVICE_DTS := ALL0333CJ
-  DEVICE_PACKAGES := kmod-ltq-adsl-ase kmod-ltq-adsl-ase-mei \
-	kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \
-	ltq-adsl-app ppp-mod-pppoe
-endef
-TARGET_DEVICES += allnet_all0333cj
-
-define Device/netgear_dgn1000b
-  DEVICE_VENDOR := NETGEAR
-  DEVICE_MODEL := DGN1000B
-  IMAGE_SIZE := 6000k
-  DEVICE_DTS := DGN1000B
-  DEVICE_PACKAGES := kmod-ltq-adsl-ase kmod-ltq-adsl-ase-mei \
-	kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \
-	ltq-adsl-app ppp-mod-pppoe
-  SUPPORTED_DEVICES += DGN1000B
-endef
-TARGET_DEVICES += netgear_dgn1000b
-
+include amazonse.mk
 endif
 
 ifeq ($(SUBTARGET),xway_legacy)
-
-define Device/arcadyan_arv4518pwr01
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV4518PWR01
-  IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV4518PWR01
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ath5k wpad-mini
-  SUPPORTED_DEVICES += ARV4518PWR01
-endef
-TARGET_DEVICES += arcadyan_arv4518pwr01
-
-define Device/arcadyan_arv4518pwr01a
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV4518PWR01A
-  IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV4518PWR01A
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ath5k wpad-basic
-  SUPPORTED_DEVICES += ARV4518PWR01A
-endef
-TARGET_DEVICES += arcadyan_arv4518pwr01a
-
-define Device/arcadyan_arv4520pw
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV4520PW
-  DEVICE_ALT0_VENDOR := Vodafone
-  DEVICE_ALT0_MODEL := Easybox 800
-  DEVICE_ALT1_VENDOR := Airties
-  DEVICE_ALT1_MODEL := WAV-281
-  IMAGE_SIZE := 3648k
-  DEVICE_DTS := ARV4520PW
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-rt61-pci wpad-mini
-  SUPPORTED_DEVICES += ARV4520PW
-endef
-TARGET_DEVICES += arcadyan_arv4520pw
-
-define Device/arcadyan_arv4525pw
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV4525PW
-  DEVICE_ALT0_VENDOR := Telekom
-  DEVICE_ALT0_MODEL := Speedport W502V
-  DEVICE_ALT0_VARIANT := Typ A
-  IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV4525PW
-  DEVICE_PACKAGES := kmod-ath5k wpad-mini \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa -swconfig
-  SUPPORTED_DEVICES += ARV4525PW
-endef
-TARGET_DEVICES += arcadyan_arv4525pw
-
-define Device/arcadyan_arv452cqw
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV452CQW
-  DEVICE_ALT0_VENDOR := Vodafone
-  DEVICE_ALT0_MODEL := Easybox 801
-  IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV452CQW
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ath5k wpad-mini \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa
-  SUPPORTED_DEVICES += ARV452CQW
-endef
-TARGET_DEVICES += arcadyan_arv452cqw
-
+include xway_legacy.mk
 endif
 
 ifeq ($(SUBTARGET),xway)
-
-# Danube
-
-define Device/arcadyan_arv4510pw
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV4510PW
-  DEVICE_ALT0_VENDOR := Wippies
-  DEVICE_ALT0_MODEL := BeWan iBox v1.0
-  IMAGE_SIZE := 15616k
-  DEVICE_DTS := ARV4510PW
-  DEVICE_PACKAGES := kmod-usb-ledtrig-usbport kmod-usb2-pci kmod-usb-uhci \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-tapi kmod-ltq-vmmc \
-	kmod-rt2800-pci kmod-ath5k wpad-basic
-  SUPPORTED_DEVICES += ARV4510PW
-endef
-TARGET_DEVICES += arcadyan_arv4510pw
-
-define Device/arcadyan_arv4519pw
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV4519PW
-  DEVICE_ALT0_VENDOR := Vodafone
-  DEVICE_ALT0_MODEL := NetFasteR IAD 2
-  DEVICE_ALT1_VENDOR := Pirelli
-  DEVICE_ALT1_MODEL := P.RG A4201G
-  IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV4519PW
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa
-  SUPPORTED_DEVICES += ARV4519PW
-endef
-TARGET_DEVICES += arcadyan_arv4519pw
-
-define Device/arcadyan_arv7506pw11
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV7506PW11
-  DEVICE_ALT0_VENDOR := Alice/O2
-  DEVICE_ALT0_MODEL := IAD 4421
-  IMAGE_SIZE := 7808k
-  DEVICE_DTS := ARV7506PW11
-  DEVICE_PACKAGES := kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-rt2800-pci wpad-basic
-  SUPPORTED_DEVICES += ARV7506PW11
-endef
-TARGET_DEVICES += arcadyan_arv7506pw11
-
-define Device/arcadyan_arv7510pw22
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV7510PW22
-  DEVICE_ALT0_VENDOR := Astoria Networks
-  DEVICE_ALT0_MODEL := ARV7510PW22
-  IMAGE_SIZE := 31232k
-  DEVICE_DTS := ARV7510PW22
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-tapi kmod-ltq-vmmc \
-	kmod-rt2800-pci wpad-basic \
-	kmod-usb-uhci kmod-usb2 kmod-usb2-pci
-  SUPPORTED_DEVICES += ARV7510PW22
-endef
-TARGET_DEVICES += arcadyan_arv7510pw22
-
-define Device/arcadyan_arv7518pw
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV7518PW
-  DEVICE_ALT0_VENDOR := Astoria Networks
-  DEVICE_ALT0_MODEL := ARV7518PW
-  IMAGE_SIZE := 7872k
-  DEVICE_DTS := ARV7518PW
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ath9k kmod-owl-loader wpad-basic
-  SUPPORTED_DEVICES += ARV7518PW
-endef
-TARGET_DEVICES += arcadyan_arv7518pw
-
-define Device/arcadyan_arv7519pw
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV7519PW
-  DEVICE_ALT0_VENDOR := Astoria Networks
-  DEVICE_ALT0_MODEL := ARV7519PW
-  IMAGE_SIZE := 15488k
-  DEVICE_DTS := ARV7519PW
-  DEVICE_PACKAGES := kmod-usb-dwc2 \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-rt2800-pci wpad-basic
-  SUPPORTED_DEVICES += ARV7519PW
-endef
-TARGET_DEVICES += arcadyan_arv7519pw
-
-define Device/arcadyan_arv7525pw
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV7525PW
-  DEVICE_ALT0_VENDOR := Telekom
-  DEVICE_ALT0_MODEL := Speedport W303V
-  DEVICE_ALT0_VARIANT := Typ A
-  IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV4510PW
-  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa -swconfig
-  SUPPORTED_DEVICES += ARV4510PW
-endef
-TARGET_DEVICES += arcadyan_arv7525pw
-
-define Device/arcadyan_arv752dpw
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV752DPW
-  DEVICE_ALT0_VENDOR := Vodafone
-  DEVICE_ALT0_MODEL := Easybox 802
-  IMAGE_SIZE := 7872k
-  DEVICE_DTS := ARV752DPW
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-tapi kmod-ltq-vmmc \
-	kmod-rt2800-pci wpad-basic
-  SUPPORTED_DEVICES += ARV752DPW
-endef
-TARGET_DEVICES += arcadyan_arv752dpw
-
-define Device/arcadyan_arv752dpw22
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV752DPW22
-  DEVICE_ALT0_VENDOR := Vodafone
-  DEVICE_ALT0_MODEL := Easybox 803
-  IMAGE_SIZE := 7616k
-  DEVICE_DTS := ARV752DPW22
-  DEVICE_PACKAGES := kmod-usb2-pci kmod-usb-uhci kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-tapi kmod-ltq-vmmc \
-	kmod-rt2800-pci wpad-basic
-  SUPPORTED_DEVICES += ARV752DPW22
-endef
-TARGET_DEVICES += arcadyan_arv752dpw22
-
-define Device/arcadyan_arv8539pw22
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV8539PW22
-  DEVICE_ALT0_VENDOR := Telekom
-  DEVICE_ALT0_MODEL := Speedport W504V Typ A
-  IMAGE_SIZE := 7616k
-  DEVICE_DTS := ARV8539PW22
-  DEVICE_PACKAGES := kmod-usb-dwc2 \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ath9k kmod-owl-loader wpad-basic
-  SUPPORTED_DEVICES += ARV8539PW22
-endef
-TARGET_DEVICES += arcadyan_arv8539pw22
-
-define Device/audiocodes_mp-252
-  DEVICE_VENDOR := AudioCodes
-  DEVICE_MODEL := MediaPack MP-252
-  IMAGE_SIZE := 14848k
-  DEVICE_DTS := ACMP252
-  DEVICE_PACKAGES :=  kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
-	kmod-ltq-tapi kmod-ltq-vmmc \
-	kmod-usb-ledtrig-usbport kmod-usb-dwc2 \
-	kmod-rt2800-pci \
-	ltq-adsl-app ppp-mod-pppoa \
-	wpad-basic
-  SUPPORTED_DEVICES += ACMP252
-endef
-TARGET_DEVICES += audiocodes_mp-252
-
-define Device/bt_homehub-v2b
-  $(Device/NAND)
-  DEVICE_VENDOR := British Telecom
-  DEVICE_MODEL := Home Hub 2
-  DEVICE_VARIANT := Type B
-  BOARD_NAME := BTHOMEHUBV2B
-  DEVICE_DTS := BTHOMEHUBV2B
-  DEVICE_PACKAGES := kmod-usb-dwc2 \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
-	kmod-ltq-deu-danube \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ath9k kmod-owl-loader wpad-basic
-  SUPPORTED_DEVICES += BTHOMEHUBV2B
-endef
-TARGET_DEVICES += bt_homehub-v2b
-
-define Device/lantiq_easy50712
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := Danube (EASY50712)
-  DEVICE_DTS := EASY50712
-  IMAGE_SIZE := 3776k
-endef
-TARGET_DEVICES += lantiq_easy50712
-
-define Device/siemens_gigaset-sx76x
-  DEVICE_VENDOR := Siemens
-  DEVICE_MODEL := Gigaset sx76x
-  IMAGE_SIZE := 7680k
-  DEVICE_DTS := GIGASX76X
-  DEVICE_PACKAGES := kmod-usb-dwc2 \
-	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
-	ltq-adsl-app ppp-mod-pppoe \
-	kmod-ath5k wpad-basic
-  SUPPORTED_DEVICES += GIGASX76X
-endef
-TARGET_DEVICES += siemens_gigaset-sx76x
-
-
-# AR9
-
-define Device/avm_fritz7312
-  $(Device/AVM)
-  DEVICE_MODEL := FRITZ!Box 7312
-  DEVICE_DTS := FRITZ7312
-  IMAGE_SIZE := 15744k
-  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic \
-	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
-	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-deu-ar9 -swconfig
-endef
-TARGET_DEVICES += avm_fritz7312
-
-define Device/avm_fritz7320
-  $(Device/AVM)
-  DEVICE_MODEL := FRITZ!Box 7320
-  DEVICE_ALT0_VENDOR := 1&1
-  DEVICE_ALT0_MODEL := HomeServer
-  DEVICE_DTS := FRITZ7320
-  IMAGE_SIZE := 15744k
-  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic \
-	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
-	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-deu-ar9 kmod-usb-dwc2 -swconfig
-  SUPPORTED_DEVICES += FRITZ7320
-endef
-TARGET_DEVICES += avm_fritz7320
-
-define Device/bt_homehub-v3a
-  $(Device/NAND)
-  DEVICE_VENDOR := British Telecom
-  DEVICE_MODEL := Home Hub
-  DEVICE_VARIANT := Type A
-  BOARD_NAME := BTHOMEHUBV3A
-  DEVICE_DTS := BTHOMEHUBV3A
-  DEVICE_PACKAGES := kmod-usb-dwc2 \
-	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
-	kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
-	kmod-ltq-deu-ar9 \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ath9k kmod-owl-loader wpad-basic \
-	uboot-envtools
-  SUPPORTED_DEVICES += BTHOMEHUBV3A
-endef
-TARGET_DEVICES += bt_homehub-v3a
-
-define Device/buffalo_wbmr-hp-g300h-a
-  DEVICE_VENDOR := Buffalo
-  DEVICE_MODEL := WBMR-HP-G300H
-  DEVICE_VARIANT := A
-  IMAGE_SIZE := 31488k
-  DEVICE_DTS := WBMR
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
-	kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ath9k kmod-owl-loader wpad-basic
-  SUPPORTED_DEVICES := WBMR buffalo,wbmr-hp-g300h
-endef
-TARGET_DEVICES += buffalo_wbmr-hp-g300h-a
-
-define Device/buffalo_wbmr-hp-g300h-b
-  DEVICE_VENDOR := Buffalo
-  DEVICE_MODEL := WBMR-HP-G300H
-  DEVICE_VARIANT := B
-  IMAGE_SIZE := 31488k
-  DEVICE_DTS := WBMR
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
-	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ath9k kmod-owl-loader wpad-basic
-  SUPPORTED_DEVICES := WBMR buffalo,wbmr-hp-g300h
-endef
-TARGET_DEVICES += buffalo_wbmr-hp-g300h-b
-
-DGN3500_KERNEL_OFFSET_HEX=0x50000
-DGN3500_KERNEL_OFFSET_DEC=327680
-define Device/netgear_dgn3500
-  DEVICE_VENDOR := NETGEAR
-  DEVICE_MODEL := DGN3500
-  DEVICE_DTS := DGN3500
-  IMAGE_SIZE := 16000k
-  IMAGES := \
-	sysupgrade-na.bin sysupgrade.bin \
-	factory-na.img factory.img
-  IMAGE/sysupgrade-na.bin := \
-	append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "NA" | \
-	pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
-  IMAGE/sysupgrade.bin := \
-	append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "WW" | \
-	pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
-  IMAGE/factory-na.img := \
-	pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \
-	dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "NA" | pad-rootfs | \
-	check-size 16320k | pad-to 16384k
-  IMAGE/factory.img := \
-	pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \
-	dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "WW" | pad-rootfs | \
-	check-size 16320k | pad-to 16384k
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ath9k kmod-owl-loader wpad-basic \
-	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
-	kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-deu-ar9
-  SUPPORTED_DEVICES += DGN3500
-endef
-TARGET_DEVICES += netgear_dgn3500
-
-define Device/netgear_dgn3500b
-  DEVICE_VENDOR := NETGEAR
-  DEVICE_MODEL := DGN3500B
-  DEVICE_DTS := DGN3500B
-  IMAGE_SIZE := 16000k
-  IMAGES += factory.img
-  IMAGE/sysupgrade.bin := \
-	append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "DE" | \
-	pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
-  IMAGE/factory.img := \
-	pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \
-	dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "DE" | pad-rootfs | \
-	check-size 16320k | pad-to 16384k
-  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ath9k kmod-owl-loader wpad-basic \
-	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
-	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-deu-ar9
-  SUPPORTED_DEVICES += DGN3500B
-endef
-TARGET_DEVICES += netgear_dgn3500b
-
-define Device/zte_h201l
-  DEVICE_VENDOR := ZTE
-  DEVICE_MODEL := H201L
-  IMAGE_SIZE := 7808k
-  DEVICE_DTS := H201L
-  DEVICE_PACKAGES := kmod-ath9k-htc wpad-basic \
-	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
-	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
-	ltq-adsl-app ppp-mod-pppoe \
-	kmod-ltq-deu-ar9 kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
-	kmod-ltq-tapi kmod-ltq-vmmc
-  SUPPORTED_DEVICES += H201L
-endef
-TARGET_DEVICES += zte_h201l
-
-define Device/zyxel_p-2601hn
-  DEVICE_VENDOR := ZyXEL
-  DEVICE_MODEL := P-2601HN
-  DEVICE_VARIANT := F1/F3
-  IMAGE_SIZE := 15616k
-  DEVICE_DTS := P2601HNFX
-  DEVICE_PACKAGES := kmod-rt2800-usb wpad-basic \
-	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
-	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
-	ltq-adsl-app ppp-mod-pppoe \
-	kmod-ltq-deu-ar9 kmod-usb-dwc2
-  SUPPORTED_DEVICES += P2601HNFX
-endef
-TARGET_DEVICES += zyxel_p-2601hn
-
+include danube.mk
+include ar9.mk
 endif
 
 
 ifeq ($(SUBTARGET),xrx200)
-
-# VR9
-
 include tp-link.mk
-
-define Device/alphanetworks_asl56026
-  DEVICE_VENDOR := Alpha
-  DEVICE_MODEL := ASL56026
-  DEVICE_ALT0_VENDOR := BT Openreach
-  DEVICE_ALT0_MODEL := ECI VDSL Modem V-2FUb/I
-  DEVICE_DTS := ASL56026
-  IMAGE_SIZE := 7488k
-endef
-TARGET_DEVICES += alphanetworks_asl56026
-
-define Device/arcadyan_arv7519rw22
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := ARV7519RW22
-  DEVICE_ALT0_VENDOR := Orange
-  DEVICE_ALT0_MODEL := Livebox
-  DEVICE_ALT0_VARIANT := 2.1
-  DEVICE_ALT1_VENDOR := Astoria Networks
-  DEVICE_ALT1_MODEL := ARV7519RW22
-  IMAGE_SIZE := 31232k
-  DEVICE_DTS := ARV7519RW22
-  DEVICE_PACKAGES := kmod-usb-dwc2
-  SUPPORTED_DEVICES += ARV7519RW22
-endef
-TARGET_DEVICES += arcadyan_arv7519rw22
-
-define Device/arcadyan_vg3503j
-  DEVICE_VENDOR := BT Openreach
-  DEVICE_MODEL := ECI VDSL Modem V-2FUb/R
-  IMAGE_SIZE := 8000k
-  DEVICE_DTS := VG3503J
-  SUPPORTED_DEVICES += VG3503J
-endef
-TARGET_DEVICES += arcadyan_vg3503j
-
-define Device/arcadyan_vgv7510kw22-brn
-  $(Device/lantiqBrnImage)
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := VGV7510KW22
-  DEVICE_VARIANT := BRN
-  DEVICE_ALT0_VENDOR := o2
-  DEVICE_ALT0_MODEL := Box 6431
-  DEVICE_ALT0_VARIANT := BRN
-  IMAGE_SIZE := 7168k
-  DEVICE_DTS := VGV7510KW22BRN
-  SIGNATURE := BRNDA6431
-  MAGIC := 0x12345678
-  CRC32_POLY := 0x04c11db7
-  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc
-  SUPPORTED_DEVICES += VGV7510KW22BRN
-endef
-TARGET_DEVICES += arcadyan_vgv7510kw22-brn
-
-define Device/arcadyan_vgv7510kw22-nor
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := VGV7510KW22
-  DEVICE_VARIANT := NOR
-  DEVICE_ALT0_VENDOR := o2
-  DEVICE_ALT0_MODEL := Box 6431
-  DEVICE_ALT0_VARIANT := NOR
-  IMAGE_SIZE := 15232k
-  DEVICE_DTS := VGV7510KW22NOR
-  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc
-  SUPPORTED_DEVICES += VGV7510KW22NOR
-endef
-TARGET_DEVICES += arcadyan_vgv7510kw22-nor
-
-define Device/arcadyan_vgv7519-brn
-  $(Device/lantiqBrnImage)
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := VGV7519
-  DEVICE_VARIANT := BRN
-  DEVICE_ALT0_VENDOR := KPN
-  DEVICE_ALT0_MODEL := Experiabox 8
-  DEVICE_ALT0_VARIANT := BRN
-  IMAGE_SIZE := 7168k
-  DEVICE_DTS := VGV7519BRN
-  SIGNATURE := 5D00008000
-  MAGIC := 0x12345678
-  CRC32_POLY := 0x2083b8ed
-  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc
-  SUPPORTED_DEVICES += VGV7519BRN
-endef
-TARGET_DEVICES += arcadyan_vgv7519-brn
-
-define Device/arcadyan_vgv7519-nor
-  DEVICE_VENDOR := Arcadyan
-  DEVICE_MODEL := VGV7519
-  DEVICE_VARIANT := NOR
-  DEVICE_ALT0_VENDOR := KPN
-  DEVICE_ALT0_MODEL := Experiabox 8
-  DEVICE_ALT0_VARIANT := NOR
-  IMAGE_SIZE := 15360k
-  DEVICE_DTS := VGV7519NOR
-  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc
-  SUPPORTED_DEVICES += VGV7519NOR
-endef
-TARGET_DEVICES += arcadyan_vgv7519-nor
-
-define Device/avm_fritz3370
-  $(Device/AVM)
-  $(Device/NAND)
-  DEVICE_MODEL := FRITZ!Box 3370
-  DEVICE_VARIANT := Rev. 2
-  DEVICE_DTS := FRITZ3370
-  KERNEL_SIZE := 4096k
-  UBINIZE_OPTS := -E 5
-  IMAGES += eva-kernel.bin eva-filesystem.bin
-  IMAGE/eva-kernel.bin := append-kernel
-  IMAGE/eva-filesystem.bin := append-ubi
-  DEVICE_PACKAGES := kmod-ath9k wpad-basic kmod-usb-dwc2 fritz-tffs
-endef
-
-define Device/avm_fritz3370-rev2-hynix
-  $(Device/avm_fritz3370)
-  DEVICE_MODEL := FRITZ!Box 3370
-  DEVICE_VARIANT := Rev. 2 (Hynix NAND)
-  DEVICE_DTS := FRITZ3370-REV2-HYNIX
-endef
-TARGET_DEVICES += avm_fritz3370-rev2-hynix
-
-define Device/avm_fritz3370-rev2-micron
-  $(Device/avm_fritz3370)
-  DEVICE_MODEL := FRITZ!Box 3370
-  DEVICE_VARIANT := Rev. 2 (Micron NAND)
-  DEVICE_DTS := FRITZ3370-REV2-MICRON
-endef
-TARGET_DEVICES += avm_fritz3370-rev2-micron
-
-define Device/avm_fritz7360sl
-  $(Device/AVM)
-  DEVICE_MODEL := FRITZ!Box 7360 SL
-  IMAGE_SIZE := 15744k
-  DEVICE_DTS := FRITZ7360SL
-  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2
-  SUPPORTED_DEVICES += FRITZ7360SL
-endef
-TARGET_DEVICES += avm_fritz7360sl
-
-define Device/avm_fritz7362sl
-  $(Device/AVM)
-  $(Device/NAND)
-  DEVICE_MODEL := FRITZ!Box 7362 SL
-  KERNEL_SIZE := 4096k
-  IMAGE_SIZE := 49152k
-  DEVICE_DTS := FRITZ7362SL
-  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 fritz-tffs
-endef
-TARGET_DEVICES += avm_fritz7362sl
-
-define Device/avm_fritz7412
-  $(Device/AVM)
-  $(Device/NAND)
-  DEVICE_MODEL := FRITZ!Box 7412
-  BOARD_NAME := FRITZ7412
-  DEVICE_DTS := FRITZ7412
-  KERNEL_SIZE := 4096k
-  IMAGE_SIZE := 49152k
-  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic fritz-tffs-nand fritz-caldata
-endef
-TARGET_DEVICES += avm_fritz7412
-
-define Device/bt_homehub-v5a
-  $(Device/NAND)
-  DEVICE_VENDOR := British Telecom
-  DEVICE_MODEL := Home Hub 5
-  DEVICE_VARIANT := Type A
-  BOARD_NAME := BTHOMEHUBV5A
-  DEVICE_DTS := BTHOMEHUBV5A
-  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader \
-	kmod-ath10k-ct ath10k-firmware-qca988x-ct wpad-basic kmod-usb-dwc2
-  SUPPORTED_DEVICES += BTHOMEHUBV5A
-endef
-TARGET_DEVICES += bt_homehub-v5a
-
-define Device/buffalo_wbmr-300hpd
-  DEVICE_VENDOR := Buffalo
-  DEVICE_MODEL := WBMR-300HPD
-  IMAGE_SIZE := 15616k
-  DEVICE_DTS := WBMR300
-  DEVICE_PACKAGES := kmod-mt7603 wpad-basic kmod-usb-dwc2
-  SUPPORTED_DEVICES += WBMR300
-endef
-TARGET_DEVICES += buffalo_wbmr-300hpd
-
-define Device/lantiq_easy80920-nand
-  $(Device/lantiqFullImage)
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := VR9 EASY80920
-  DEVICE_VARIANT := NAND
-  DEVICE_DTS := EASY80920NAND
-  IMAGE_SIZE := 64512k
-  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport
-endef
-TARGET_DEVICES += lantiq_easy80920-nand
-
-define Device/lantiq_easy80920-nor
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := VR9 EASY80920
-  DEVICE_VARIANT := NOR
-  DEVICE_DTS := EASY80920NOR
-  IMAGE_SIZE := 7936k
-  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport
-endef
-TARGET_DEVICES += lantiq_easy80920-nor
-
-define Device/netgear_dm200
-  DEVICE_VENDOR := NETGEAR
-  DEVICE_MODEL := DM200
-  DEVICE_DTS := DM200
-  IMAGES := sysupgrade.bin factory.img
-  IMAGE/sysupgrade.bin := append-kernel | \
-	pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
-	pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
-	append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
-  IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni
-  IMAGE_SIZE := 7872k
-  NETGEAR_BOARD_ID := DM200
-  NETGEAR_HW_ID := 29765233+8+0+64+0+0
-endef
-DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
-TARGET_DEVICES += netgear_dm200
-
-define Device/zyxel_p-2812hnu-f1
-  $(Device/NAND)
-  DEVICE_VENDOR := ZyXEL
-  DEVICE_MODEL := P-2812HNU
-  DEVICE_VARIANT := F1
-  BOARD_NAME := P2812HNUF1
-  DEVICE_DTS := P2812HNUF1
-  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport
-  KERNEL_SIZE := 3072k
-  SUPPORTED_DEVICES += P2812HNUF1
-endef
-TARGET_DEVICES += zyxel_p-2812hnu-f1
-
-define Device/zyxel_p-2812hnu-f3
-  $(Device/NAND)
-  DEVICE_VENDOR := ZyXEL
-  DEVICE_MODEL := P-2812HNU
-  DEVICE_VARIANT := F3
-  BOARD_NAME := P2812HNUF3
-  DEVICE_DTS := P2812HNUF3
-  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2
-  SUPPORTED_DEVICES += P2812HNUF3
-endef
-TARGET_DEVICES += zyxel_p-2812hnu-f3
-
+include vr9.mk
 endif
 
 
 ifeq ($(SUBTARGET),falcon)
-
-define Device/lantiq_easy88388
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := EASY88388 Falcon FTTDP8 Reference Board
-  IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY88388
-endef
-TARGET_DEVICES += lantiq_easy88388
-
-define Device/lantiq_easy88444
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := EASY88444 Falcon FTTdp G.FAST Reference Board
-  IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY88444
-endef
-TARGET_DEVICES += lantiq_easy88444
-
-define Device/lantiq_easy98020
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := Falcon SFU Reference Board (EASY98020)
-  DEVICE_VARIANT := v1.0-v1.7
-  IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98020
-endef
-TARGET_DEVICES += lantiq_easy98020
-
-define Device/lantiq_easy98020-v18
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := Falcon SFU Reference Board (EASY98020)
-  DEVICE_VARIANT := v1.8
-  IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98020V18
-endef
-TARGET_DEVICES += lantiq_easy98020-v18
-
-define Device/lantiq_easy98021
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := Falcon HGU Reference Board (EASY98021)
-  IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98021
-endef
-TARGET_DEVICES += lantiq_easy98021
-
-define Device/lantiq_easy98035synce
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := Falcon SFP Stick (EASY98035SYNCE)
-  DEVICE_VARIANT := with Synchronous Ethernet
-  IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98035SYNCE
-endef
-TARGET_DEVICES += lantiq_easy98035synce
-
-define Device/lantiq_easy98035synce1588
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := Falcon SFP Stick (EASY98035SYNCE1588)
-  DEVICE_VARIANT := with SyncE and IEEE1588
-  IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98035SYNCE1588
-endef
-TARGET_DEVICES += lantiq_easy98035synce1588
-
-define Device/lantiq_easy98000-nand
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := EASY98000 Falcon Eval Board
-  DEVICE_VARIANT := NAND
-  IMAGE_SIZE := 3904k
-  DEVICE_DTS := EASY98000NAND
-  DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
-endef
-TARGET_DEVICES += lantiq_easy98000-nand
-
-define Device/lantiq_easy98000-nor
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := EASY98000 Falcon Eval Board
-  DEVICE_VARIANT := NOR
-  IMAGE_SIZE := 3904k
-  DEVICE_DTS := EASY98000NOR
-  DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
-endef
-TARGET_DEVICES += lantiq_easy98000-nor
-
-define Device/lantiq_easy98000-sflash
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := EASY98000 Falcon Eval Board
-  DEVICE_VARIANT := SFLASH
-  IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98000SFLASH
-  DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
-endef
-TARGET_DEVICES += lantiq_easy98000-sflash
-
-define Device/lantiq_falcon-mdu
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := Falcon / VINAXdp MDU Board
-  IMAGE_SIZE := 7424k
-  DEVICE_DTS := FALCON-MDU
-endef
-TARGET_DEVICES += lantiq_falcon-mdu
-
-define Device/lantiq_falcon-sfp
-  DEVICE_VENDOR := Lantiq
-  DEVICE_MODEL := Falcon SFP Stick
-  IMAGE_SIZE := 7424k
-  DEVICE_DTS := FALCON-SFP
-endef
-TARGET_DEVICES += lantiq_falcon-sfp
-
+include falcon.mk
 endif
 
 $(eval $(call BuildImage))
diff --git a/target/linux/lantiq/image/amazonse.mk b/target/linux/lantiq/image/amazonse.mk
new file mode 100644
index 0000000000..77afaa8bed
--- /dev/null
+++ b/target/linux/lantiq/image/amazonse.mk
@@ -0,0 +1,22 @@
+define Device/allnet_all0333cj
+  DEVICE_VENDOR := Allnet
+  DEVICE_MODEL := ALL0333CJ
+  IMAGE_SIZE := 3700k
+  DEVICE_DTS := ALL0333CJ
+  DEVICE_PACKAGES := kmod-ltq-adsl-ase kmod-ltq-adsl-ase-mei \
+	kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \
+	ltq-adsl-app ppp-mod-pppoe
+endef
+TARGET_DEVICES += allnet_all0333cj
+
+define Device/netgear_dgn1000b
+  DEVICE_VENDOR := NETGEAR
+  DEVICE_MODEL := DGN1000B
+  IMAGE_SIZE := 6000k
+  DEVICE_DTS := DGN1000B
+  DEVICE_PACKAGES := kmod-ltq-adsl-ase kmod-ltq-adsl-ase-mei \
+	kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \
+	ltq-adsl-app ppp-mod-pppoe
+  SUPPORTED_DEVICES += DGN1000B
+endef
+TARGET_DEVICES += netgear_dgn1000b
diff --git a/target/linux/lantiq/image/ar9.mk b/target/linux/lantiq/image/ar9.mk
new file mode 100644
index 0000000000..272227bdb3
--- /dev/null
+++ b/target/linux/lantiq/image/ar9.mk
@@ -0,0 +1,163 @@
+define Device/avm_fritz7312
+  $(Device/AVM)
+  DEVICE_MODEL := FRITZ!Box 7312
+  DEVICE_DTS := FRITZ7312
+  IMAGE_SIZE := 15744k
+  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic \
+	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ltq-deu-ar9 -swconfig
+endef
+TARGET_DEVICES += avm_fritz7312
+
+define Device/avm_fritz7320
+  $(Device/AVM)
+  DEVICE_MODEL := FRITZ!Box 7320
+  DEVICE_ALT0_VENDOR := 1&1
+  DEVICE_ALT0_MODEL := HomeServer
+  DEVICE_DTS := FRITZ7320
+  IMAGE_SIZE := 15744k
+  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic \
+	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ltq-deu-ar9 kmod-usb-dwc2 -swconfig
+  SUPPORTED_DEVICES += FRITZ7320
+endef
+TARGET_DEVICES += avm_fritz7320
+
+define Device/bt_homehub-v3a
+  $(Device/NAND)
+  DEVICE_VENDOR := British Telecom
+  DEVICE_MODEL := Home Hub
+  DEVICE_VARIANT := Type A
+  BOARD_NAME := BTHOMEHUBV3A
+  DEVICE_DTS := BTHOMEHUBV3A
+  DEVICE_PACKAGES := kmod-usb-dwc2 \
+	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+	kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
+	kmod-ltq-deu-ar9 \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ath9k kmod-owl-loader wpad-basic \
+	uboot-envtools
+  SUPPORTED_DEVICES += BTHOMEHUBV3A
+endef
+TARGET_DEVICES += bt_homehub-v3a
+
+define Device/buffalo_wbmr-hp-g300h-a
+  DEVICE_VENDOR := Buffalo
+  DEVICE_MODEL := WBMR-HP-G300H
+  DEVICE_VARIANT := A
+  IMAGE_SIZE := 31488k
+  DEVICE_DTS := WBMR
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+	kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ath9k kmod-owl-loader wpad-basic
+  SUPPORTED_DEVICES := WBMR buffalo,wbmr-hp-g300h
+endef
+TARGET_DEVICES += buffalo_wbmr-hp-g300h-a
+
+define Device/buffalo_wbmr-hp-g300h-b
+  DEVICE_VENDOR := Buffalo
+  DEVICE_MODEL := WBMR-HP-G300H
+  DEVICE_VARIANT := B
+  IMAGE_SIZE := 31488k
+  DEVICE_DTS := WBMR
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ath9k kmod-owl-loader wpad-basic
+  SUPPORTED_DEVICES := WBMR buffalo,wbmr-hp-g300h
+endef
+TARGET_DEVICES += buffalo_wbmr-hp-g300h-b
+
+DGN3500_KERNEL_OFFSET_HEX=0x50000
+DGN3500_KERNEL_OFFSET_DEC=327680
+define Device/netgear_dgn3500
+  DEVICE_VENDOR := NETGEAR
+  DEVICE_MODEL := DGN3500
+  DEVICE_DTS := DGN3500
+  IMAGE_SIZE := 16000k
+  IMAGES := \
+	sysupgrade-na.bin sysupgrade.bin \
+	factory-na.img factory.img
+  IMAGE/sysupgrade-na.bin := \
+	append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "NA" | \
+	pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
+  IMAGE/sysupgrade.bin := \
+	append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "WW" | \
+	pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory-na.img := \
+	pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \
+	dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "NA" | pad-rootfs | \
+	check-size 16320k | pad-to 16384k
+  IMAGE/factory.img := \
+	pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \
+	dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "WW" | pad-rootfs | \
+	check-size 16320k | pad-to 16384k
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ath9k kmod-owl-loader wpad-basic \
+	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+	kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ltq-deu-ar9
+  SUPPORTED_DEVICES += DGN3500
+endef
+TARGET_DEVICES += netgear_dgn3500
+
+define Device/netgear_dgn3500b
+  DEVICE_VENDOR := NETGEAR
+  DEVICE_MODEL := DGN3500B
+  DEVICE_DTS := DGN3500B
+  IMAGE_SIZE := 16000k
+  IMAGES += factory.img
+  IMAGE/sysupgrade.bin := \
+	append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "DE" | \
+	pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory.img := \
+	pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \
+	dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "DE" | pad-rootfs | \
+	check-size 16320k | pad-to 16384k
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ath9k kmod-owl-loader wpad-basic \
+	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ltq-deu-ar9
+  SUPPORTED_DEVICES += DGN3500B
+endef
+TARGET_DEVICES += netgear_dgn3500b
+
+define Device/zte_h201l
+  DEVICE_VENDOR := ZTE
+  DEVICE_MODEL := H201L
+  IMAGE_SIZE := 7808k
+  DEVICE_DTS := H201L
+  DEVICE_PACKAGES := kmod-ath9k-htc wpad-basic \
+	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
+	ltq-adsl-app ppp-mod-pppoe \
+	kmod-ltq-deu-ar9 kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ltq-tapi kmod-ltq-vmmc
+  SUPPORTED_DEVICES += H201L
+endef
+TARGET_DEVICES += zte_h201l
+
+define Device/zyxel_p-2601hn
+  DEVICE_VENDOR := ZyXEL
+  DEVICE_MODEL := P-2601HN
+  DEVICE_VARIANT := F1/F3
+  IMAGE_SIZE := 15616k
+  DEVICE_DTS := P2601HNFX
+  DEVICE_PACKAGES := kmod-rt2800-usb wpad-basic \
+	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
+	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
+	ltq-adsl-app ppp-mod-pppoe \
+	kmod-ltq-deu-ar9 kmod-usb-dwc2
+  SUPPORTED_DEVICES += P2601HNFX
+endef
+TARGET_DEVICES += zyxel_p-2601hn
diff --git a/target/linux/lantiq/image/danube.mk b/target/linux/lantiq/image/danube.mk
new file mode 100644
index 0000000000..8171900a6f
--- /dev/null
+++ b/target/linux/lantiq/image/danube.mk
@@ -0,0 +1,219 @@
+define Device/arcadyan_arv4510pw
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV4510PW
+  DEVICE_ALT0_VENDOR := Wippies
+  DEVICE_ALT0_MODEL := BeWan iBox v1.0
+  IMAGE_SIZE := 15616k
+  DEVICE_DTS := ARV4510PW
+  DEVICE_PACKAGES := kmod-usb-ledtrig-usbport kmod-usb2-pci kmod-usb-uhci \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ltq-tapi kmod-ltq-vmmc \
+	kmod-rt2800-pci kmod-ath5k wpad-basic
+  SUPPORTED_DEVICES += ARV4510PW
+endef
+TARGET_DEVICES += arcadyan_arv4510pw
+
+define Device/arcadyan_arv4519pw
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV4519PW
+  DEVICE_ALT0_VENDOR := Vodafone
+  DEVICE_ALT0_MODEL := NetFasteR IAD 2
+  DEVICE_ALT1_VENDOR := Pirelli
+  DEVICE_ALT1_MODEL := P.RG A4201G
+  IMAGE_SIZE := 3776k
+  DEVICE_DTS := ARV4519PW
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa
+  SUPPORTED_DEVICES += ARV4519PW
+endef
+TARGET_DEVICES += arcadyan_arv4519pw
+
+define Device/arcadyan_arv7506pw11
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV7506PW11
+  DEVICE_ALT0_VENDOR := Alice/O2
+  DEVICE_ALT0_MODEL := IAD 4421
+  IMAGE_SIZE := 7808k
+  DEVICE_DTS := ARV7506PW11
+  DEVICE_PACKAGES := kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-rt2800-pci wpad-basic
+  SUPPORTED_DEVICES += ARV7506PW11
+endef
+TARGET_DEVICES += arcadyan_arv7506pw11
+
+define Device/arcadyan_arv7510pw22
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV7510PW22
+  DEVICE_ALT0_VENDOR := Astoria Networks
+  DEVICE_ALT0_MODEL := ARV7510PW22
+  IMAGE_SIZE := 31232k
+  DEVICE_DTS := ARV7510PW22
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ltq-tapi kmod-ltq-vmmc \
+	kmod-rt2800-pci wpad-basic \
+	kmod-usb-uhci kmod-usb2 kmod-usb2-pci
+  SUPPORTED_DEVICES += ARV7510PW22
+endef
+TARGET_DEVICES += arcadyan_arv7510pw22
+
+define Device/arcadyan_arv7518pw
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV7518PW
+  DEVICE_ALT0_VENDOR := Astoria Networks
+  DEVICE_ALT0_MODEL := ARV7518PW
+  IMAGE_SIZE := 7872k
+  DEVICE_DTS := ARV7518PW
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ath9k kmod-owl-loader wpad-basic
+  SUPPORTED_DEVICES += ARV7518PW
+endef
+TARGET_DEVICES += arcadyan_arv7518pw
+
+define Device/arcadyan_arv7519pw
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV7519PW
+  DEVICE_ALT0_VENDOR := Astoria Networks
+  DEVICE_ALT0_MODEL := ARV7519PW
+  IMAGE_SIZE := 15488k
+  DEVICE_DTS := ARV7519PW
+  DEVICE_PACKAGES := kmod-usb-dwc2 \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-rt2800-pci wpad-basic
+  SUPPORTED_DEVICES += ARV7519PW
+endef
+TARGET_DEVICES += arcadyan_arv7519pw
+
+define Device/arcadyan_arv7525pw
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV7525PW
+  DEVICE_ALT0_VENDOR := Telekom
+  DEVICE_ALT0_MODEL := Speedport W303V
+  DEVICE_ALT0_VARIANT := Typ A
+  IMAGE_SIZE := 3776k
+  DEVICE_DTS := ARV4510PW
+  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa -swconfig
+  SUPPORTED_DEVICES += ARV4510PW
+endef
+TARGET_DEVICES += arcadyan_arv7525pw
+
+define Device/arcadyan_arv752dpw
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV752DPW
+  DEVICE_ALT0_VENDOR := Vodafone
+  DEVICE_ALT0_MODEL := Easybox 802
+  IMAGE_SIZE := 7872k
+  DEVICE_DTS := ARV752DPW
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ltq-tapi kmod-ltq-vmmc \
+	kmod-rt2800-pci wpad-basic
+  SUPPORTED_DEVICES += ARV752DPW
+endef
+TARGET_DEVICES += arcadyan_arv752dpw
+
+define Device/arcadyan_arv752dpw22
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV752DPW22
+  DEVICE_ALT0_VENDOR := Vodafone
+  DEVICE_ALT0_MODEL := Easybox 803
+  IMAGE_SIZE := 7616k
+  DEVICE_DTS := ARV752DPW22
+  DEVICE_PACKAGES := kmod-usb2-pci kmod-usb-uhci kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ltq-tapi kmod-ltq-vmmc \
+	kmod-rt2800-pci wpad-basic
+  SUPPORTED_DEVICES += ARV752DPW22
+endef
+TARGET_DEVICES += arcadyan_arv752dpw22
+
+define Device/arcadyan_arv8539pw22
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV8539PW22
+  DEVICE_ALT0_VENDOR := Telekom
+  DEVICE_ALT0_MODEL := Speedport W504V Typ A
+  IMAGE_SIZE := 7616k
+  DEVICE_DTS := ARV8539PW22
+  DEVICE_PACKAGES := kmod-usb-dwc2 \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ath9k kmod-owl-loader wpad-basic
+  SUPPORTED_DEVICES += ARV8539PW22
+endef
+TARGET_DEVICES += arcadyan_arv8539pw22
+
+define Device/audiocodes_mp-252
+  DEVICE_VENDOR := AudioCodes
+  DEVICE_MODEL := MediaPack MP-252
+  IMAGE_SIZE := 14848k
+  DEVICE_DTS := ACMP252
+  DEVICE_PACKAGES :=  kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+	kmod-ltq-tapi kmod-ltq-vmmc \
+	kmod-usb-ledtrig-usbport kmod-usb-dwc2 \
+	kmod-rt2800-pci \
+	ltq-adsl-app ppp-mod-pppoa \
+	wpad-basic
+  SUPPORTED_DEVICES += ACMP252
+endef
+TARGET_DEVICES += audiocodes_mp-252
+
+define Device/bt_homehub-v2b
+  $(Device/NAND)
+  DEVICE_VENDOR := British Telecom
+  DEVICE_MODEL := Home Hub 2
+  DEVICE_VARIANT := Type B
+  BOARD_NAME := BTHOMEHUBV2B
+  DEVICE_DTS := BTHOMEHUBV2B
+  DEVICE_PACKAGES := kmod-usb-dwc2 \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+	kmod-ltq-deu-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ath9k kmod-owl-loader wpad-basic
+  SUPPORTED_DEVICES += BTHOMEHUBV2B
+endef
+TARGET_DEVICES += bt_homehub-v2b
+
+define Device/lantiq_easy50712
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := Danube (EASY50712)
+  DEVICE_DTS := EASY50712
+  IMAGE_SIZE := 3776k
+endef
+TARGET_DEVICES += lantiq_easy50712
+
+define Device/siemens_gigaset-sx76x
+  DEVICE_VENDOR := Siemens
+  DEVICE_MODEL := Gigaset sx76x
+  IMAGE_SIZE := 7680k
+  DEVICE_DTS := GIGASX76X
+  DEVICE_PACKAGES := kmod-usb-dwc2 \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoe \
+	kmod-ath5k wpad-basic
+  SUPPORTED_DEVICES += GIGASX76X
+endef
+TARGET_DEVICES += siemens_gigaset-sx76x
diff --git a/target/linux/lantiq/image/falcon.mk b/target/linux/lantiq/image/falcon.mk
new file mode 100644
index 0000000000..38ba856cf8
--- /dev/null
+++ b/target/linux/lantiq/image/falcon.mk
@@ -0,0 +1,105 @@
+define Device/lantiq_easy88388
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := EASY88388 Falcon FTTDP8 Reference Board
+  IMAGE_SIZE := 7424k
+  DEVICE_DTS := EASY88388
+endef
+TARGET_DEVICES += lantiq_easy88388
+
+define Device/lantiq_easy88444
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := EASY88444 Falcon FTTdp G.FAST Reference Board
+  IMAGE_SIZE := 7424k
+  DEVICE_DTS := EASY88444
+endef
+TARGET_DEVICES += lantiq_easy88444
+
+define Device/lantiq_easy98020
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := Falcon SFU Reference Board (EASY98020)
+  DEVICE_VARIANT := v1.0-v1.7
+  IMAGE_SIZE := 7424k
+  DEVICE_DTS := EASY98020
+endef
+TARGET_DEVICES += lantiq_easy98020
+
+define Device/lantiq_easy98020-v18
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := Falcon SFU Reference Board (EASY98020)
+  DEVICE_VARIANT := v1.8
+  IMAGE_SIZE := 7424k
+  DEVICE_DTS := EASY98020V18
+endef
+TARGET_DEVICES += lantiq_easy98020-v18
+
+define Device/lantiq_easy98021
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := Falcon HGU Reference Board (EASY98021)
+  IMAGE_SIZE := 7424k
+  DEVICE_DTS := EASY98021
+endef
+TARGET_DEVICES += lantiq_easy98021
+
+define Device/lantiq_easy98035synce
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := Falcon SFP Stick (EASY98035SYNCE)
+  DEVICE_VARIANT := with Synchronous Ethernet
+  IMAGE_SIZE := 7424k
+  DEVICE_DTS := EASY98035SYNCE
+endef
+TARGET_DEVICES += lantiq_easy98035synce
+
+define Device/lantiq_easy98035synce1588
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := Falcon SFP Stick (EASY98035SYNCE1588)
+  DEVICE_VARIANT := with SyncE and IEEE1588
+  IMAGE_SIZE := 7424k
+  DEVICE_DTS := EASY98035SYNCE1588
+endef
+TARGET_DEVICES += lantiq_easy98035synce1588
+
+define Device/lantiq_easy98000-nand
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := EASY98000 Falcon Eval Board
+  DEVICE_VARIANT := NAND
+  IMAGE_SIZE := 3904k
+  DEVICE_DTS := EASY98000NAND
+  DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
+endef
+TARGET_DEVICES += lantiq_easy98000-nand
+
+define Device/lantiq_easy98000-nor
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := EASY98000 Falcon Eval Board
+  DEVICE_VARIANT := NOR
+  IMAGE_SIZE := 3904k
+  DEVICE_DTS := EASY98000NOR
+  DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
+endef
+TARGET_DEVICES += lantiq_easy98000-nor
+
+define Device/lantiq_easy98000-sflash
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := EASY98000 Falcon Eval Board
+  DEVICE_VARIANT := SFLASH
+  IMAGE_SIZE := 7424k
+  DEVICE_DTS := EASY98000SFLASH
+  DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
+endef
+TARGET_DEVICES += lantiq_easy98000-sflash
+
+define Device/lantiq_falcon-mdu
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := Falcon / VINAXdp MDU Board
+  IMAGE_SIZE := 7424k
+  DEVICE_DTS := FALCON-MDU
+endef
+TARGET_DEVICES += lantiq_falcon-mdu
+
+define Device/lantiq_falcon-sfp
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := Falcon SFP Stick
+  IMAGE_SIZE := 7424k
+  DEVICE_DTS := FALCON-SFP
+endef
+TARGET_DEVICES += lantiq_falcon-sfp
diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk
new file mode 100644
index 0000000000..dee4b0d161
--- /dev/null
+++ b/target/linux/lantiq/image/vr9.mk
@@ -0,0 +1,246 @@
+define Device/alphanetworks_asl56026
+  DEVICE_VENDOR := Alpha
+  DEVICE_MODEL := ASL56026
+  DEVICE_ALT0_VENDOR := BT Openreach
+  DEVICE_ALT0_MODEL := ECI VDSL Modem V-2FUb/I
+  DEVICE_DTS := ASL56026
+  IMAGE_SIZE := 7488k
+endef
+TARGET_DEVICES += alphanetworks_asl56026
+
+define Device/arcadyan_arv7519rw22
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV7519RW22
+  DEVICE_ALT0_VENDOR := Orange
+  DEVICE_ALT0_MODEL := Livebox
+  DEVICE_ALT0_VARIANT := 2.1
+  DEVICE_ALT1_VENDOR := Astoria Networks
+  DEVICE_ALT1_MODEL := ARV7519RW22
+  IMAGE_SIZE := 31232k
+  DEVICE_DTS := ARV7519RW22
+  DEVICE_PACKAGES := kmod-usb-dwc2
+  SUPPORTED_DEVICES += ARV7519RW22
+endef
+TARGET_DEVICES += arcadyan_arv7519rw22
+
+define Device/arcadyan_vg3503j
+  DEVICE_VENDOR := BT Openreach
+  DEVICE_MODEL := ECI VDSL Modem V-2FUb/R
+  IMAGE_SIZE := 8000k
+  DEVICE_DTS := VG3503J
+  SUPPORTED_DEVICES += VG3503J
+endef
+TARGET_DEVICES += arcadyan_vg3503j
+
+define Device/arcadyan_vgv7510kw22-brn
+  $(Device/lantiqBrnImage)
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := VGV7510KW22
+  DEVICE_VARIANT := BRN
+  DEVICE_ALT0_VENDOR := o2
+  DEVICE_ALT0_MODEL := Box 6431
+  DEVICE_ALT0_VARIANT := BRN
+  IMAGE_SIZE := 7168k
+  DEVICE_DTS := VGV7510KW22BRN
+  SIGNATURE := BRNDA6431
+  MAGIC := 0x12345678
+  CRC32_POLY := 0x04c11db7
+  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc
+  SUPPORTED_DEVICES += VGV7510KW22BRN
+endef
+TARGET_DEVICES += arcadyan_vgv7510kw22-brn
+
+define Device/arcadyan_vgv7510kw22-nor
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := VGV7510KW22
+  DEVICE_VARIANT := NOR
+  DEVICE_ALT0_VENDOR := o2
+  DEVICE_ALT0_MODEL := Box 6431
+  DEVICE_ALT0_VARIANT := NOR
+  IMAGE_SIZE := 15232k
+  DEVICE_DTS := VGV7510KW22NOR
+  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc
+  SUPPORTED_DEVICES += VGV7510KW22NOR
+endef
+TARGET_DEVICES += arcadyan_vgv7510kw22-nor
+
+define Device/arcadyan_vgv7519-brn
+  $(Device/lantiqBrnImage)
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := VGV7519
+  DEVICE_VARIANT := BRN
+  DEVICE_ALT0_VENDOR := KPN
+  DEVICE_ALT0_MODEL := Experiabox 8
+  DEVICE_ALT0_VARIANT := BRN
+  IMAGE_SIZE := 7168k
+  DEVICE_DTS := VGV7519BRN
+  SIGNATURE := 5D00008000
+  MAGIC := 0x12345678
+  CRC32_POLY := 0x2083b8ed
+  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc
+  SUPPORTED_DEVICES += VGV7519BRN
+endef
+TARGET_DEVICES += arcadyan_vgv7519-brn
+
+define Device/arcadyan_vgv7519-nor
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := VGV7519
+  DEVICE_VARIANT := NOR
+  DEVICE_ALT0_VENDOR := KPN
+  DEVICE_ALT0_MODEL := Experiabox 8
+  DEVICE_ALT0_VARIANT := NOR
+  IMAGE_SIZE := 15360k
+  DEVICE_DTS := VGV7519NOR
+  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc
+  SUPPORTED_DEVICES += VGV7519NOR
+endef
+TARGET_DEVICES += arcadyan_vgv7519-nor
+
+define Device/avm_fritz3370
+  $(Device/AVM)
+  $(Device/NAND)
+  DEVICE_MODEL := FRITZ!Box 3370
+  DEVICE_VARIANT := Rev. 2
+  DEVICE_DTS := FRITZ3370
+  KERNEL_SIZE := 4096k
+  UBINIZE_OPTS := -E 5
+  IMAGES += eva-kernel.bin eva-filesystem.bin
+  IMAGE/eva-kernel.bin := append-kernel
+  IMAGE/eva-filesystem.bin := append-ubi
+  DEVICE_PACKAGES := kmod-ath9k wpad-basic kmod-usb-dwc2 fritz-tffs
+endef
+
+define Device/avm_fritz3370-rev2-hynix
+  $(Device/avm_fritz3370)
+  DEVICE_MODEL := FRITZ!Box 3370
+  DEVICE_VARIANT := Rev. 2 (Hynix NAND)
+  DEVICE_DTS := FRITZ3370-REV2-HYNIX
+endef
+TARGET_DEVICES += avm_fritz3370-rev2-hynix
+
+define Device/avm_fritz3370-rev2-micron
+  $(Device/avm_fritz3370)
+  DEVICE_MODEL := FRITZ!Box 3370
+  DEVICE_VARIANT := Rev. 2 (Micron NAND)
+  DEVICE_DTS := FRITZ3370-REV2-MICRON
+endef
+TARGET_DEVICES += avm_fritz3370-rev2-micron
+
+define Device/avm_fritz7360sl
+  $(Device/AVM)
+  DEVICE_MODEL := FRITZ!Box 7360 SL
+  IMAGE_SIZE := 15744k
+  DEVICE_DTS := FRITZ7360SL
+  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2
+  SUPPORTED_DEVICES += FRITZ7360SL
+endef
+TARGET_DEVICES += avm_fritz7360sl
+
+define Device/avm_fritz7362sl
+  $(Device/AVM)
+  $(Device/NAND)
+  DEVICE_MODEL := FRITZ!Box 7362 SL
+  KERNEL_SIZE := 4096k
+  IMAGE_SIZE := 49152k
+  DEVICE_DTS := FRITZ7362SL
+  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 fritz-tffs
+endef
+TARGET_DEVICES += avm_fritz7362sl
+
+define Device/avm_fritz7412
+  $(Device/AVM)
+  $(Device/NAND)
+  DEVICE_MODEL := FRITZ!Box 7412
+  BOARD_NAME := FRITZ7412
+  DEVICE_DTS := FRITZ7412
+  KERNEL_SIZE := 4096k
+  IMAGE_SIZE := 49152k
+  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic fritz-tffs-nand fritz-caldata
+endef
+TARGET_DEVICES += avm_fritz7412
+
+define Device/bt_homehub-v5a
+  $(Device/NAND)
+  DEVICE_VENDOR := British Telecom
+  DEVICE_MODEL := Home Hub 5
+  DEVICE_VARIANT := Type A
+  BOARD_NAME := BTHOMEHUBV5A
+  DEVICE_DTS := BTHOMEHUBV5A
+  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader \
+	kmod-ath10k-ct ath10k-firmware-qca988x-ct wpad-basic kmod-usb-dwc2
+  SUPPORTED_DEVICES += BTHOMEHUBV5A
+endef
+TARGET_DEVICES += bt_homehub-v5a
+
+define Device/buffalo_wbmr-300hpd
+  DEVICE_VENDOR := Buffalo
+  DEVICE_MODEL := WBMR-300HPD
+  IMAGE_SIZE := 15616k
+  DEVICE_DTS := WBMR300
+  DEVICE_PACKAGES := kmod-mt7603 wpad-basic kmod-usb-dwc2
+  SUPPORTED_DEVICES += WBMR300
+endef
+TARGET_DEVICES += buffalo_wbmr-300hpd
+
+define Device/lantiq_easy80920-nand
+  $(Device/lantiqFullImage)
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := VR9 EASY80920
+  DEVICE_VARIANT := NAND
+  DEVICE_DTS := EASY80920NAND
+  IMAGE_SIZE := 64512k
+  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport
+endef
+TARGET_DEVICES += lantiq_easy80920-nand
+
+define Device/lantiq_easy80920-nor
+  DEVICE_VENDOR := Lantiq
+  DEVICE_MODEL := VR9 EASY80920
+  DEVICE_VARIANT := NOR
+  DEVICE_DTS := EASY80920NOR
+  IMAGE_SIZE := 7936k
+  DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport
+endef
+TARGET_DEVICES += lantiq_easy80920-nor
+
+define Device/netgear_dm200
+  DEVICE_VENDOR := NETGEAR
+  DEVICE_MODEL := DM200
+  DEVICE_DTS := DM200
+  IMAGES := sysupgrade.bin factory.img
+  IMAGE/sysupgrade.bin := append-kernel | \
+	pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
+	pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
+	append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
+  IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni
+  IMAGE_SIZE := 7872k
+  NETGEAR_BOARD_ID := DM200
+  NETGEAR_HW_ID := 29765233+8+0+64+0+0
+endef
+DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
+TARGET_DEVICES += netgear_dm200
+
+define Device/zyxel_p-2812hnu-f1
+  $(Device/NAND)
+  DEVICE_VENDOR := ZyXEL
+  DEVICE_MODEL := P-2812HNU
+  DEVICE_VARIANT := F1
+  BOARD_NAME := P2812HNUF1
+  DEVICE_DTS := P2812HNUF1
+  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport
+  KERNEL_SIZE := 3072k
+  SUPPORTED_DEVICES += P2812HNUF1
+endef
+TARGET_DEVICES += zyxel_p-2812hnu-f1
+
+define Device/zyxel_p-2812hnu-f3
+  $(Device/NAND)
+  DEVICE_VENDOR := ZyXEL
+  DEVICE_MODEL := P-2812HNU
+  DEVICE_VARIANT := F3
+  BOARD_NAME := P2812HNUF3
+  DEVICE_DTS := P2812HNUF3
+  DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2
+  SUPPORTED_DEVICES += P2812HNUF3
+endef
+TARGET_DEVICES += zyxel_p-2812hnu-f3
diff --git a/target/linux/lantiq/image/xway_legacy.mk b/target/linux/lantiq/image/xway_legacy.mk
new file mode 100644
index 0000000000..011de20914
--- /dev/null
+++ b/target/linux/lantiq/image/xway_legacy.mk
@@ -0,0 +1,77 @@
+define Device/arcadyan_arv4518pwr01
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV4518PWR01
+  IMAGE_SIZE := 3776k
+  DEVICE_DTS := ARV4518PWR01
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ath5k wpad-mini
+  SUPPORTED_DEVICES += ARV4518PWR01
+endef
+TARGET_DEVICES += arcadyan_arv4518pwr01
+
+define Device/arcadyan_arv4518pwr01a
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV4518PWR01A
+  IMAGE_SIZE := 3776k
+  DEVICE_DTS := ARV4518PWR01A
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-ath5k wpad-basic
+  SUPPORTED_DEVICES += ARV4518PWR01A
+endef
+TARGET_DEVICES += arcadyan_arv4518pwr01a
+
+define Device/arcadyan_arv4520pw
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV4520PW
+  DEVICE_ALT0_VENDOR := Vodafone
+  DEVICE_ALT0_MODEL := Easybox 800
+  DEVICE_ALT1_VENDOR := Airties
+  DEVICE_ALT1_MODEL := WAV-281
+  IMAGE_SIZE := 3648k
+  DEVICE_DTS := ARV4520PW
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa \
+	kmod-rt61-pci wpad-mini
+  SUPPORTED_DEVICES += ARV4520PW
+endef
+TARGET_DEVICES += arcadyan_arv4520pw
+
+define Device/arcadyan_arv4525pw
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV4525PW
+  DEVICE_ALT0_VENDOR := Telekom
+  DEVICE_ALT0_MODEL := Speedport W502V
+  DEVICE_ALT0_VARIANT := Typ A
+  IMAGE_SIZE := 3776k
+  DEVICE_DTS := ARV4525PW
+  DEVICE_PACKAGES := kmod-ath5k wpad-mini \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa -swconfig
+  SUPPORTED_DEVICES += ARV4525PW
+endef
+TARGET_DEVICES += arcadyan_arv4525pw
+
+define Device/arcadyan_arv452cqw
+  DEVICE_VENDOR := Arcadyan
+  DEVICE_MODEL := ARV452CQW
+  DEVICE_ALT0_VENDOR := Vodafone
+  DEVICE_ALT0_MODEL := Easybox 801
+  IMAGE_SIZE := 3776k
+  DEVICE_DTS := ARV452CQW
+  DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-ath5k wpad-mini \
+	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
+	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
+	ltq-adsl-app ppp-mod-pppoa
+  SUPPORTED_DEVICES += ARV452CQW
+endef
+TARGET_DEVICES += arcadyan_arv452cqw
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Mon Dec 16 07:28:15 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Mon, 16 Dec 2019 13:28:15 +0100
Subject: [OpenWrt-Devel] [PATCH 2/4] build: image: add SOC device variable
In-Reply-To: <20191216122817.22628-1-freifunk@adrianschmutzler.de>
References: <20191216122817.22628-1-freifunk@adrianschmutzler.de>
Message-ID: <20191216122817.22628-3-freifunk@adrianschmutzler.de>

This add the device variable SOC and adds it to DEFAULT_DEVICE_VARS.

It is supposed to replace target-specific SOC variables like ATH_SOC
and thus unify variable names.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 include/image.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/image.mk b/include/image.mk
index 8592c19b99..26da4d6819 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -420,6 +420,7 @@ define Device/Init
   DEVICE_DTS :=
   DEVICE_DTS_CONFIG :=
   DEVICE_DTS_DIR :=
+  SOC :=
 
   BOARD_NAME :=
   UIMAGE_NAME :=
@@ -437,7 +438,7 @@ DEFAULT_DEVICE_VARS := \
   DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \
   CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
   VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \
-  DEVICE_DTS_CONFIG DEVICE_DTS_DIR BOARD_NAME UIMAGE_NAME SUPPORTED_DEVICES \
+  DEVICE_DTS_CONFIG DEVICE_DTS_DIR SOC BOARD_NAME UIMAGE_NAME SUPPORTED_DEVICES \
   IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR UBOOT_PATH DEVICE_VENDOR \
   DEVICE_MODEL DEVICE_VARIANT \
   DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Mon Dec 16 07:28:16 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Mon, 16 Dec 2019 13:28:16 +0100
Subject: [OpenWrt-Devel] [PATCH 3/4] lantiq: use soc_vendor_device scheme on
 DTS file
In-Reply-To: <20191216122817.22628-1-freifunk@adrianschmutzler.de>
References: <20191216122817.22628-1-freifunk@adrianschmutzler.de>
Message-ID: <20191216122817.22628-4-freifunk@adrianschmutzler.de>

This renames lantiq DTS(I) files to follow soc_vendor_device scheme.
This will make DTS files easier to maintain.

As a side effect, DTS file name can be derived from device node
names now, only having to specify a SOC variable in Makefiles.

While at it, move files to arch/mips/boot/dts/lantiq subfolder.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../mips/boot/dts/{ => lantiq}/amazonse.dtsi  |  0
 .../amazonse_allnet_all0333cj.dts}            |  0
 .../amazonse_netgear_dgn1000b.dts}            |  0
 .../arch/mips/boot/dts/{ => lantiq}/ar9.dtsi  |  0
 .../ar9_avm_fritz7312.dts}                    |  0
 .../ar9_avm_fritz7320.dts}                    |  0
 .../ar9_bt_homehub-v3a.dts}                   |  0
 .../ar9_buffalo_wbmr-hp-g300h.dts}            |  0
 .../ar9_lantiq_easy50810.dts}                 |  0
 .../ar9_netgear_dgn3500.dts}                  |  2 +-
 .../ar9_netgear_dgn3500.dtsi}                 |  0
 .../ar9_netgear_dgn3500b.dts}                 |  2 +-
 .../{H201L.dts => lantiq/ar9_zte_h201l.dts}   |  0
 .../ar9_zyxel_p-2601hn.dts}                   |  0
 .../mips/boot/dts/{ => lantiq}/danube.dtsi    |  0
 .../danube_arcadyan_arv4510pw.dts}            |  0
 .../danube_arcadyan_arv4518pwr01.dts}         |  2 +-
 .../danube_arcadyan_arv4518pwr01.dtsi}        |  0
 .../danube_arcadyan_arv4518pwr01a.dts}        |  2 +-
 .../danube_arcadyan_arv4519pw.dts}            |  0
 .../danube_arcadyan_arv4520pw.dts}            |  0
 .../danube_arcadyan_arv4525pw.dts}            |  0
 .../danube_arcadyan_arv452cqw.dts}            |  0
 .../danube_arcadyan_arv7506pw11.dts}          |  0
 .../danube_arcadyan_arv7510pw22.dts}          |  0
 .../danube_arcadyan_arv7518pw.dts}            |  0
 .../danube_arcadyan_arv7519pw.dts}            |  0
 .../danube_arcadyan_arv7525pw.dts}            |  0
 .../danube_arcadyan_arv752dpw.dts}            |  0
 .../danube_arcadyan_arv752dpw22.dts}          |  0
 .../danube_arcadyan_arv8539pw22.dts}          |  0
 .../danube_audiocodes_mp-252.dts}             |  0
 .../danube_bt_homehub-v2b.dts}                |  0
 .../danube_lantiq_easy50712.dts}              |  0
 .../danube_siemens_gigaset-sx76x.dts}         |  0
 .../mips/boot/dts/{ => lantiq}/falcon.dtsi    |  0
 .../falcon_lantiq_easy88388.dts}              |  2 +-
 .../falcon_lantiq_easy88444.dts}              |  2 +-
 .../falcon_lantiq_easy98000-nand.dts}         |  2 +-
 .../falcon_lantiq_easy98000-nor.dts}          |  2 +-
 .../falcon_lantiq_easy98000-sflash.dts}       |  4 +-
 .../falcon_lantiq_easy98000.dtsi}             |  0
 .../falcon_lantiq_easy98020-v18.dts}          |  2 +-
 .../falcon_lantiq_easy98020.dts}              |  2 +-
 .../falcon_lantiq_easy98021.dts}              |  2 +-
 .../falcon_lantiq_easy98035synce.dts}         |  2 +-
 .../falcon_lantiq_easy98035synce1588.dts}     |  2 +-
 .../falcon_lantiq_falcon-mdu.dts}             |  2 +-
 .../falcon_lantiq_falcon-sfp.dts}             |  2 +-
 .../falcon_sflash-16m.dtsi}                   |  0
 .../arch/mips/boot/dts/{ => lantiq}/vr9.dtsi  |  0
 .../vr9_alphanetworks_asl56026.dts}           |  0
 .../vr9_arcadyan_arv7519rw22.dts}             |  0
 .../vr9_arcadyan_vg3503j.dts}                 |  0
 .../vr9_arcadyan_vgv7510kw22-brn.dts}         |  2 +-
 .../vr9_arcadyan_vgv7510kw22-nor.dts}         |  2 +-
 .../vr9_arcadyan_vgv7510kw22.dtsi}            |  0
 .../vr9_arcadyan_vgv7519-brn.dts}             |  2 +-
 .../vr9_arcadyan_vgv7519-nor.dts}             |  2 +-
 .../vr9_arcadyan_vgv7519.dtsi}                |  0
 .../vr9_avm_fritz3370-rev2-hynix.dts}         |  2 +-
 .../vr9_avm_fritz3370-rev2-micron.dts}        |  2 +-
 .../vr9_avm_fritz3370-rev2.dtsi}              |  0
 .../vr9_avm_fritz7360sl.dts}                  |  2 +-
 .../vr9_avm_fritz7362sl.dts}                  |  2 +-
 .../vr9_avm_fritz736x.dtsi}                   |  0
 .../vr9_avm_fritz7412.dts}                    |  0
 .../vr9_bt_homehub-v5a.dts}                   |  0
 .../vr9_buffalo_wbmr-300hpd.dts}              |  0
 .../vr9_lantiq_easy80920-nand.dts}            |  2 +-
 .../vr9_lantiq_easy80920-nor.dts}             |  2 +-
 .../vr9_lantiq_easy80920.dtsi}                |  0
 .../vr9_netgear_dm200.dts}                    |  0
 .../vr9_tplink_tdw8970.dts}                   |  2 +-
 .../vr9_tplink_tdw8980.dts}                   |  2 +-
 .../vr9_tplink_tdw89x0.dtsi}                  |  0
 .../vr9_tplink_vr200.dts}                     |  2 +-
 .../vr9_tplink_vr200.dtsi}                    |  0
 .../vr9_tplink_vr200v.dts}                    |  2 +-
 .../vr9_zyxel_p-2812hnu-f1.dts}               |  2 +-
 .../vr9_zyxel_p-2812hnu-f3.dts}               |  2 +-
 .../vr9_zyxel_p-2812hnu-fx.dtsi}              |  0
 target/linux/lantiq/image/Makefile            |  2 +
 target/linux/lantiq/image/amazonse.mk         |  4 +-
 target/linux/lantiq/image/ar9.mk              | 20 +++++-----
 target/linux/lantiq/image/danube.mk           | 28 +++++++-------
 target/linux/lantiq/image/falcon.mk           | 24 ++++++------
 target/linux/lantiq/image/tp-link.mk          |  5 +--
 target/linux/lantiq/image/vr9.mk              | 38 +++++++++----------
 target/linux/lantiq/image/xway_legacy.mk      | 10 ++---
 90 files changed, 98 insertions(+), 99 deletions(-)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ => lantiq}/amazonse.dtsi (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ALL0333CJ.dts => lantiq/amazonse_allnet_all0333cj.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{DGN1000B.dts => lantiq/amazonse_netgear_dgn1000b.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ => lantiq}/ar9.dtsi (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ7312.dts => lantiq/ar9_avm_fritz7312.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ7320.dts => lantiq/ar9_avm_fritz7320.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{BTHOMEHUBV3A.dts => lantiq/ar9_bt_homehub-v3a.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{WBMR.dts => lantiq/ar9_buffalo_wbmr-hp-g300h.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY50810.dts => lantiq/ar9_lantiq_easy50810.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{DGN3500.dts => lantiq/ar9_netgear_dgn3500.dts} (75%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{DGN3500.dtsi => lantiq/ar9_netgear_dgn3500.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{DGN3500B.dts => lantiq/ar9_netgear_dgn3500b.dts} (75%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{H201L.dts => lantiq/ar9_zte_h201l.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{P2601HNFX.dts => lantiq/ar9_zyxel_p-2601hn.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ => lantiq}/danube.dtsi (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4510PW.dts => lantiq/danube_arcadyan_arv4510pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4518PWR01.dts => lantiq/danube_arcadyan_arv4518pwr01.dts} (71%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4518PWR01.dtsi => lantiq/danube_arcadyan_arv4518pwr01.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4518PWR01A.dts => lantiq/danube_arcadyan_arv4518pwr01a.dts} (78%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4519PW.dts => lantiq/danube_arcadyan_arv4519pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4520PW.dts => lantiq/danube_arcadyan_arv4520pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV4525PW.dts => lantiq/danube_arcadyan_arv4525pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV452CQW.dts => lantiq/danube_arcadyan_arv452cqw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7506PW11.dts => lantiq/danube_arcadyan_arv7506pw11.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7510PW22.dts => lantiq/danube_arcadyan_arv7510pw22.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7518PW.dts => lantiq/danube_arcadyan_arv7518pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7519PW.dts => lantiq/danube_arcadyan_arv7519pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7525PW.dts => lantiq/danube_arcadyan_arv7525pw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV752DPW.dts => lantiq/danube_arcadyan_arv752dpw.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV752DPW22.dts => lantiq/danube_arcadyan_arv752dpw22.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV8539PW22.dts => lantiq/danube_arcadyan_arv8539pw22.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ACMP252.dts => lantiq/danube_audiocodes_mp-252.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{BTHOMEHUBV2B.dts => lantiq/danube_bt_homehub-v2b.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY50712.dts => lantiq/danube_lantiq_easy50712.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{GIGASX76X.dts => lantiq/danube_siemens_gigaset-sx76x.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ => lantiq}/falcon.dtsi (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY88388.dts => lantiq/falcon_lantiq_easy88388.dts} (98%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY88444.dts => lantiq/falcon_lantiq_easy88444.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98000NAND.dts => lantiq/falcon_lantiq_easy98000-nand.dts} (93%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98000NOR.dts => lantiq/falcon_lantiq_easy98000-nor.dts} (93%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98000SFLASH.dts => lantiq/falcon_lantiq_easy98000-sflash.dts} (73%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98000-base.dtsi => lantiq/falcon_lantiq_easy98000.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98020V18.dts => lantiq/falcon_lantiq_easy98020-v18.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98020.dts => lantiq/falcon_lantiq_easy98020.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98021.dts => lantiq/falcon_lantiq_easy98021.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98035SYNCE.dts => lantiq/falcon_lantiq_easy98035synce.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY98035SYNCE1588.dts => lantiq/falcon_lantiq_easy98035synce1588.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FALCON-MDU.dts => lantiq/falcon_lantiq_falcon-mdu.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FALCON-SFP.dts => lantiq/falcon_lantiq_falcon-sfp.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{falcon-sflash-16M.dtsi => lantiq/falcon_sflash-16m.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ => lantiq}/vr9.dtsi (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ASL56026.dts => lantiq/vr9_alphanetworks_asl56026.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{ARV7519RW22.dts => lantiq/vr9_arcadyan_arv7519rw22.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VG3503J.dts => lantiq/vr9_arcadyan_vg3503j.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7510KW22BRN.dts => lantiq/vr9_arcadyan_vgv7510kw22-brn.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7510KW22NOR.dts => lantiq/vr9_arcadyan_vgv7510kw22-nor.dts} (92%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7510KW22.dtsi => lantiq/vr9_arcadyan_vgv7510kw22.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7519BRN.dts => lantiq/vr9_arcadyan_vgv7519-brn.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7519NOR.dts => lantiq/vr9_arcadyan_vgv7519-nor.dts} (92%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VGV7519.dtsi => lantiq/vr9_arcadyan_vgv7519.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ3370-REV2-HYNIX.dts => lantiq/vr9_avm_fritz3370-rev2-hynix.dts} (94%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ3370-REV2-MICRON.dts => lantiq/vr9_avm_fritz3370-rev2-micron.dts} (94%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ3370-REV2.dtsi => lantiq/vr9_avm_fritz3370-rev2.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ7360SL.dts => lantiq/vr9_avm_fritz7360sl.dts} (97%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ7362SL.dts => lantiq/vr9_avm_fritz7362sl.dts} (98%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ736X.dtsi => lantiq/vr9_avm_fritz736x.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{FRITZ7412.dts => lantiq/vr9_avm_fritz7412.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{BTHOMEHUBV5A.dts => lantiq/vr9_bt_homehub-v5a.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{WBMR300.dts => lantiq/vr9_buffalo_wbmr-300hpd.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY80920NAND.dts => lantiq/vr9_lantiq_easy80920-nand.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY80920NOR.dts => lantiq/vr9_lantiq_easy80920-nor.dts} (94%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{EASY80920.dtsi => lantiq/vr9_lantiq_easy80920.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{DM200.dts => lantiq/vr9_netgear_dm200.dts} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{TDW8970.dts => lantiq/vr9_tplink_tdw8970.dts} (78%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{TDW8980.dts => lantiq/vr9_tplink_tdw8980.dts} (94%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{TDW89X0.dtsi => lantiq/vr9_tplink_tdw89x0.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VR200.dts => lantiq/vr9_tplink_vr200.dts} (98%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VR200.dtsi => lantiq/vr9_tplink_vr200.dtsi} (100%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{VR200v.dts => lantiq/vr9_tplink_vr200v.dts} (98%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{P2812HNUF1.dts => lantiq/vr9_zyxel_p-2812hnu-f1.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{P2812HNUF3.dts => lantiq/vr9_zyxel_p-2812hnu-f3.dts} (96%)
 rename target/linux/lantiq/files/arch/mips/boot/dts/{P2812HNUFX.dtsi => lantiq/vr9_zyxel_p-2812hnu-fx.dtsi} (100%)

diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/amazonse.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/amazonse.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ALL0333CJ.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ALL0333CJ.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DGN1000B.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/DGN1000B.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ar9.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7312.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7312.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7320.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7320.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV3A.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV3A.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/WBMR.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/WBMR.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY50810.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_lantiq_easy50810.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY50810.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_lantiq_easy50810.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dts
similarity index 75%
rename from target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dts
index 98a2ebd98e..cbc99fe620 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "DGN3500.dtsi"
+#include "ar9_netgear_dgn3500.dtsi"
 
 / {
 	compatible = "netgear,dgn3500", "lantiq,xway", "lantiq,ar9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/DGN3500.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500B.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500b.dts
similarity index 75%
rename from target/linux/lantiq/files/arch/mips/boot/dts/DGN3500B.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500b.dts
index d1d788cc7d..b69613e48f 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/DGN3500B.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500b.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "DGN3500.dtsi"
+#include "ar9_netgear_dgn3500.dtsi"
 
 / {
 	compatible = "netgear,dgn3500b", "lantiq,xway", "lantiq,ar9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/H201L.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/H201L.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/P2601HNFX.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/P2601HNFX.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/danube.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/danube.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4510PW.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4510PW.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dts
similarity index 71%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dts
index 34f868f484..ff34068005 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "ARV4518PWR01.dtsi"
+#include "danube_arcadyan_arv4518pwr01.dtsi"
 
 / {
 	compatible = "arcadyan,arv4518pwr01", "lantiq,xway", "lantiq,danube";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01A.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01a.dts
similarity index 78%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01A.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01a.dts
index 9617398bbc..b261a2fa91 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4518PWR01A.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01a.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "ARV4518PWR01.dtsi"
+#include "danube_arcadyan_arv4518pwr01.dtsi"
 
 / {
 	compatible = "arcadyan,arv4518pwr01a", "lantiq,xway", "lantiq,danube";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4519PW.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4519PW.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4520PW.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4520PW.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV4525PW.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV4525PW.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV452CQW.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV452CQW.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7506PW11.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7506PW11.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7510PW22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7510PW22.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7518PW.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7518PW.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7519PW.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7519PW.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7525PW.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7525PW.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV752DPW.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV752DPW.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV752DPW22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV752DPW22.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV8539PW22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV8539PW22.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ACMP252.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ACMP252.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV2B.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV2B.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY50712.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY50712.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/GIGASX76X.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/GIGASX76X.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/falcon.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/falcon.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY88388.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88388.dts
similarity index 98%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY88388.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88388.dts
index 12c448c2e6..22ce8caced 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY88388.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88388.dts
@@ -2,7 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include "falcon.dtsi"
-#include "falcon-sflash-16M.dtsi"
+#include "falcon_sflash-16m.dtsi"
 
 / {
 	model = "Lantiq Falcon FTTDP8 Reference Board";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY88444.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88444.dts
similarity index 97%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY88444.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88444.dts
index 3f29d319cd..fa331450bf 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY88444.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy88444.dts
@@ -2,7 +2,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include "falcon.dtsi"
-#include "falcon-sflash-16M.dtsi"
+#include "falcon_sflash-16m.dtsi"
 
 / {
 	model = "Lantiq Falcon FTTdp G.FAST Reference Board";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NAND.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts
similarity index 93%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NAND.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts
index 2155f0cb1d..e4719d59e0 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NAND.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts
@@ -1,7 +1,7 @@
 /dts-v1/;
 
 #include "falcon.dtsi"
-#include "EASY98000-base.dtsi"
+#include "falcon_lantiq_easy98000.dtsi"
 
 / {
 	model = "Lantiq Falcon (NAND)";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NOR.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts
similarity index 93%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NOR.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts
index 3cb00343f5..cba277e6d1 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000NOR.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts
@@ -1,7 +1,7 @@
 /dts-v1/;
 
 #include "falcon.dtsi"
-#include "EASY98000-base.dtsi"
+#include "falcon_lantiq_easy98000.dtsi"
 
 / {
 	model = "Lantiq Falcon (NOR)";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000SFLASH.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-sflash.dts
similarity index 73%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98000SFLASH.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-sflash.dts
index bbe524e94e..e8d8b42470 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000SFLASH.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-sflash.dts
@@ -1,8 +1,8 @@
 /dts-v1/;
 
 #include "falcon.dtsi"
-#include "EASY98000-base.dtsi"
-#include "falcon-sflash-16M.dtsi"
+#include "falcon_lantiq_easy98000.dtsi"
+#include "falcon_sflash-16m.dtsi"
 
 / {
 	model = "Lantiq Falcon (SFLASH)";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98000-base.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98000-base.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98020V18.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020-v18.dts
similarity index 97%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98020V18.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020-v18.dts
index 571e23454a..773a490019 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98020V18.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020-v18.dts
@@ -3,7 +3,7 @@
 #include <dt-bindings/gpio/gpio.h>
 
 #include "falcon.dtsi"
-#include "falcon-sflash-16M.dtsi"
+#include "falcon_sflash-16m.dtsi"
 
 / {
 	model = "Lantiq Falcon Reference Board V1.8";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98020.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020.dts
similarity index 97%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98020.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020.dts
index 7a3ef418d0..397764aac4 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98020.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98020.dts
@@ -3,7 +3,7 @@
 #include <dt-bindings/gpio/gpio.h>
 
 #include "falcon.dtsi"
-#include "falcon-sflash-16M.dtsi"
+#include "falcon_sflash-16m.dtsi"
 
 / {
 	model = "Lantiq Falcon Reference Board";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98021.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98021.dts
similarity index 97%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98021.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98021.dts
index 7eb40bde24..aa63268149 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98021.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98021.dts
@@ -3,7 +3,7 @@
 #include <dt-bindings/gpio/gpio.h>
 
 #include "falcon.dtsi"
-#include "falcon-sflash-16M.dtsi"
+#include "falcon_sflash-16m.dtsi"
 
 / {
 	model = "Lantiq Falcon HGU Reference Board";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce.dts
similarity index 97%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce.dts
index df941cdb67..f1ecebec3b 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce.dts
@@ -1,7 +1,7 @@
 /dts-v1/;
 
 #include "falcon.dtsi"
-#include "falcon-sflash-16M.dtsi"
+#include "falcon_sflash-16m.dtsi"
 
 / {
 	model = "Lantiq Falcon SFP Stick with SyncE";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE1588.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce1588.dts
similarity index 97%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE1588.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce1588.dts
index a3abc6e707..98421174d3 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY98035SYNCE1588.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98035synce1588.dts
@@ -1,7 +1,7 @@
 /dts-v1/;
 
 #include "falcon.dtsi"
-#include "falcon-sflash-16M.dtsi"
+#include "falcon_sflash-16m.dtsi"
 
 / {
 	model = "Lantiq Falcon SFP Stick with SyncE/1588";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FALCON-MDU.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-mdu.dts
similarity index 96%
rename from target/linux/lantiq/files/arch/mips/boot/dts/FALCON-MDU.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-mdu.dts
index c5da8b564f..130d49ebd7 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/FALCON-MDU.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-mdu.dts
@@ -3,7 +3,7 @@
 #include <dt-bindings/gpio/gpio.h>
 
 #include "falcon.dtsi"
-#include "falcon-sflash-16M.dtsi"
+#include "falcon_sflash-16m.dtsi"
 
 / {
 	model = "Lantiq Falcon / Vinax MDU Board";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FALCON-SFP.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-sfp.dts
similarity index 97%
rename from target/linux/lantiq/files/arch/mips/boot/dts/FALCON-SFP.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-sfp.dts
index 8d45de4ebe..880c4edca8 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/FALCON-SFP.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_lantiq_falcon-sfp.dts
@@ -1,7 +1,7 @@
 /dts-v1/;
 
 #include "falcon.dtsi"
-#include "falcon-sflash-16M.dtsi"
+#include "falcon_sflash-16m.dtsi"
 
 / {
 	model = "Lantiq Falcon SFP Stick";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/falcon-sflash-16M.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/falcon-sflash-16M.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/vr9.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ASL56026.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ASL56026.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/ARV7519RW22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/ARV7519RW22.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VG3503J.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/VG3503J.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22BRN.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-brn.dts
similarity index 96%
rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22BRN.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-brn.dts
index 5a33121d72..9f6f405a09 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22BRN.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-brn.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "VGV7510KW22.dtsi"
+#include "vr9_arcadyan_vgv7510kw22.dtsi"
 
 / {
 	compatible = "arcadyan,vgv7510kw22-brn", "arcadyan,vgv7510kw22", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22NOR.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts
similarity index 92%
rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22NOR.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts
index 2accffaed7..613ff3782c 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22NOR.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "VGV7510KW22.dtsi"
+#include "vr9_arcadyan_vgv7510kw22.dtsi"
 
 / {
 	compatible = "arcadyan,vgv7510kw22-nor", "arcadyan,vgv7510kw22", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7510KW22.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7519BRN.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-brn.dts
similarity index 96%
rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7519BRN.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-brn.dts
index c51a44bb3d..051de0c23e 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7519BRN.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-brn.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "VGV7519.dtsi"
+#include "vr9_arcadyan_vgv7519.dtsi"
 
 / {
 	compatible = "arcadyan,vgv7519-brn", "arcadyan,vgv7519", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7519NOR.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts
similarity index 92%
rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7519NOR.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts
index aa6a96156f..2121fbf41d 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7519NOR.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "VGV7519.dtsi"
+#include "vr9_arcadyan_vgv7519.dtsi"
 
 / {
 	compatible = "arcadyan,vgv7519-nor", "arcadyan,vgv7519", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VGV7519.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/VGV7519.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-hynix.dts
similarity index 94%
rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-hynix.dts
index 15bd0d2713..1aea98260a 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-hynix.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "FRITZ3370-REV2.dtsi"
+#include "vr9_avm_fritz3370-rev2.dtsi"
 
 / {
 	compatible = "avm,fritz3370-rev2-hynix", "avm,fritz3370-rev2", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-micron.dts
similarity index 94%
rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-micron.dts
index 7e4a3e1114..a19d168159 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2-micron.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "FRITZ3370-REV2.dtsi"
+#include "vr9_avm_fritz3370-rev2.dtsi"
 
 / {
 	compatible = "avm,fritz3370-rev2-micron", "avm,fritz3370-rev2", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ3370-REV2.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz3370-rev2.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7360SL.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts
similarity index 97%
rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7360SL.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts
index 0fbe6396a8..012300ec57 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7360SL.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7360sl.dts
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 /dts-v1/;
 
-#include "FRITZ736X.dtsi"
+#include "vr9_avm_fritz736x.dtsi"
 
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts
similarity index 98%
rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts
index feb9242574..a061a482da 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7362SL.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 /dts-v1/;
 
-#include "FRITZ736X.dtsi"
+#include "vr9_avm_fritz736x.dtsi"
 
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ736X.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ736X.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7412.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/FRITZ7412.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV5A.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/BTHOMEHUBV5A.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/WBMR300.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/WBMR300.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NAND.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts
similarity index 96%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NAND.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts
index 0bf8e1b7ef..585521459b 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NAND.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts
@@ -1,7 +1,7 @@
 /dts-v1/;
 
 
-#include "EASY80920.dtsi"
+#include "vr9_lantiq_easy80920.dtsi"
 
 / {
 	compatible = "lantiq,easy80920-nand", "lantiq,easy80920", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NOR.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts
similarity index 94%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NOR.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts
index 6ed6c5d427..c204c5e093 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920NOR.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "EASY80920.dtsi"
+#include "vr9_lantiq_easy80920.dtsi"
 
 / {
 	compatible = "lantiq,easy80920-nor", "lantiq,easy80920", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/EASY80920.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/DM200.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/DM200.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/TDW8970.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts
similarity index 78%
rename from target/linux/lantiq/files/arch/mips/boot/dts/TDW8970.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts
index 25eb3dac67..9b3055983a 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/TDW8970.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8970.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "TDW89X0.dtsi"
+#include "vr9_tplink_tdw89x0.dtsi"
 
 / {
 	compatible = "tplink,tdw8970", "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/TDW8980.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts
similarity index 94%
rename from target/linux/lantiq/files/arch/mips/boot/dts/TDW8980.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts
index 76875e735d..725aa759d2 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/TDW8980.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "TDW89X0.dtsi"
+#include "vr9_tplink_tdw89x0.dtsi"
 
 / {
 	compatible = "tplink,tdw8980", "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/TDW89X0.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VR200.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts
similarity index 98%
rename from target/linux/lantiq/files/arch/mips/boot/dts/VR200.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts
index 8724e37b47..98f2282579 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/VR200.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "VR200.dtsi"
+#include "vr9_tplink_vr200.dtsi"
 
 / {
 	compatible = "tplink,vr200", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VR200.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/VR200.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/VR200v.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200v.dts
similarity index 98%
rename from target/linux/lantiq/files/arch/mips/boot/dts/VR200v.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200v.dts
index 34805bb9f0..2e25a72a83 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/VR200v.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200v.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "VR200.dtsi"
+#include "vr9_tplink_vr200.dtsi"
 
 / {
 	compatible = "tplink,vr200v", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF1.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts
similarity index 96%
rename from target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF1.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts
index d1a04a4a78..4d7aac325b 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF1.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "P2812HNUFX.dtsi"
+#include "vr9_zyxel_p-2812hnu-fx.dtsi"
 
 / {
 	compatible = "zyxel,p-2812hnu-f1", "zyxel,p-2812hnu", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF3.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts
similarity index 96%
rename from target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF3.dts
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts
index a607311460..7da1533809 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUF3.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-#include "P2812HNUFX.dtsi"
+#include "vr9_zyxel_p-2812hnu-fx.dtsi"
 
 / {
 	compatible = "zyxel,p-2812hnu-f3", "zyxel,p-2812hnu", "lantiq,xway", "lantiq,vr9";
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUFX.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi
similarity index 100%
rename from target/linux/lantiq/files/arch/mips/boot/dts/P2812HNUFX.dtsi
rename to target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-fx.dtsi
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index a2052ef924..3060ff920b 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -61,6 +61,8 @@ define Device/Default
   KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
   FILESYSTEMS := squashfs
   IMAGE_SIZE :=
+  DTS_DIR := $(DTS_DIR)/lantiq
+  DEVICE_DTS = $$(SOC)_$(1)
   SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
diff --git a/target/linux/lantiq/image/amazonse.mk b/target/linux/lantiq/image/amazonse.mk
index 77afaa8bed..c9329a4dd9 100644
--- a/target/linux/lantiq/image/amazonse.mk
+++ b/target/linux/lantiq/image/amazonse.mk
@@ -2,7 +2,7 @@ define Device/allnet_all0333cj
   DEVICE_VENDOR := Allnet
   DEVICE_MODEL := ALL0333CJ
   IMAGE_SIZE := 3700k
-  DEVICE_DTS := ALL0333CJ
+  SOC := amazonse
   DEVICE_PACKAGES := kmod-ltq-adsl-ase kmod-ltq-adsl-ase-mei \
 	kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \
 	ltq-adsl-app ppp-mod-pppoe
@@ -13,7 +13,7 @@ define Device/netgear_dgn1000b
   DEVICE_VENDOR := NETGEAR
   DEVICE_MODEL := DGN1000B
   IMAGE_SIZE := 6000k
-  DEVICE_DTS := DGN1000B
+  SOC := amazonse
   DEVICE_PACKAGES := kmod-ltq-adsl-ase kmod-ltq-adsl-ase-mei \
 	kmod-ltq-adsl-ase-fw-b kmod-ltq-atm-ase \
 	ltq-adsl-app ppp-mod-pppoe
diff --git a/target/linux/lantiq/image/ar9.mk b/target/linux/lantiq/image/ar9.mk
index 272227bdb3..f86e2d1c68 100644
--- a/target/linux/lantiq/image/ar9.mk
+++ b/target/linux/lantiq/image/ar9.mk
@@ -1,7 +1,7 @@
 define Device/avm_fritz7312
   $(Device/AVM)
   DEVICE_MODEL := FRITZ!Box 7312
-  DEVICE_DTS := FRITZ7312
+  SOC := ar9
   IMAGE_SIZE := 15744k
   DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic \
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
@@ -16,7 +16,7 @@ define Device/avm_fritz7320
   DEVICE_MODEL := FRITZ!Box 7320
   DEVICE_ALT0_VENDOR := 1&1
   DEVICE_ALT0_MODEL := HomeServer
-  DEVICE_DTS := FRITZ7320
+  SOC := ar9
   IMAGE_SIZE := 15744k
   DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic \
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
@@ -33,7 +33,7 @@ define Device/bt_homehub-v3a
   DEVICE_MODEL := Home Hub
   DEVICE_VARIANT := Type A
   BOARD_NAME := BTHOMEHUBV3A
-  DEVICE_DTS := BTHOMEHUBV3A
+  SOC := ar9
   DEVICE_PACKAGES := kmod-usb-dwc2 \
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
@@ -50,7 +50,8 @@ define Device/buffalo_wbmr-hp-g300h-a
   DEVICE_MODEL := WBMR-HP-G300H
   DEVICE_VARIANT := A
   IMAGE_SIZE := 31488k
-  DEVICE_DTS := WBMR
+  SOC := ar9
+  DEVICE_DTS := ar9_buffalo_wbmr-hp-g300h
   DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
@@ -65,7 +66,8 @@ define Device/buffalo_wbmr-hp-g300h-b
   DEVICE_MODEL := WBMR-HP-G300H
   DEVICE_VARIANT := B
   IMAGE_SIZE := 31488k
-  DEVICE_DTS := WBMR
+  SOC := ar9
+  DEVICE_DTS := ar9_buffalo_wbmr-hp-g300h
   DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
@@ -80,7 +82,7 @@ DGN3500_KERNEL_OFFSET_DEC=327680
 define Device/netgear_dgn3500
   DEVICE_VENDOR := NETGEAR
   DEVICE_MODEL := DGN3500
-  DEVICE_DTS := DGN3500
+  SOC := ar9
   IMAGE_SIZE := 16000k
   IMAGES := \
 	sysupgrade-na.bin sysupgrade.bin \
@@ -112,7 +114,7 @@ TARGET_DEVICES += netgear_dgn3500
 define Device/netgear_dgn3500b
   DEVICE_VENDOR := NETGEAR
   DEVICE_MODEL := DGN3500B
-  DEVICE_DTS := DGN3500B
+  SOC := ar9
   IMAGE_SIZE := 16000k
   IMAGES += factory.img
   IMAGE/sysupgrade.bin := \
@@ -136,7 +138,7 @@ define Device/zte_h201l
   DEVICE_VENDOR := ZTE
   DEVICE_MODEL := H201L
   IMAGE_SIZE := 7808k
-  DEVICE_DTS := H201L
+  SOC := ar9
   DEVICE_PACKAGES := kmod-ath9k-htc wpad-basic \
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
@@ -152,7 +154,7 @@ define Device/zyxel_p-2601hn
   DEVICE_MODEL := P-2601HN
   DEVICE_VARIANT := F1/F3
   IMAGE_SIZE := 15616k
-  DEVICE_DTS := P2601HNFX
+  SOC := ar9
   DEVICE_PACKAGES := kmod-rt2800-usb wpad-basic \
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
diff --git a/target/linux/lantiq/image/danube.mk b/target/linux/lantiq/image/danube.mk
index 8171900a6f..2fb5ea061f 100644
--- a/target/linux/lantiq/image/danube.mk
+++ b/target/linux/lantiq/image/danube.mk
@@ -4,7 +4,7 @@ define Device/arcadyan_arv4510pw
   DEVICE_ALT0_VENDOR := Wippies
   DEVICE_ALT0_MODEL := BeWan iBox v1.0
   IMAGE_SIZE := 15616k
-  DEVICE_DTS := ARV4510PW
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-ledtrig-usbport kmod-usb2-pci kmod-usb-uhci \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
@@ -23,7 +23,7 @@ define Device/arcadyan_arv4519pw
   DEVICE_ALT1_VENDOR := Pirelli
   DEVICE_ALT1_MODEL := P.RG A4201G
   IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV4519PW
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
@@ -38,7 +38,7 @@ define Device/arcadyan_arv7506pw11
   DEVICE_ALT0_VENDOR := Alice/O2
   DEVICE_ALT0_MODEL := IAD 4421
   IMAGE_SIZE := 7808k
-  DEVICE_DTS := ARV7506PW11
+  SOC := danube
   DEVICE_PACKAGES := kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
 	ltq-adsl-app ppp-mod-pppoa \
@@ -53,7 +53,7 @@ define Device/arcadyan_arv7510pw22
   DEVICE_ALT0_VENDOR := Astoria Networks
   DEVICE_ALT0_MODEL := ARV7510PW22
   IMAGE_SIZE := 31232k
-  DEVICE_DTS := ARV7510PW22
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
@@ -71,7 +71,7 @@ define Device/arcadyan_arv7518pw
   DEVICE_ALT0_VENDOR := Astoria Networks
   DEVICE_ALT0_MODEL := ARV7518PW
   IMAGE_SIZE := 7872k
-  DEVICE_DTS := ARV7518PW
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
@@ -87,7 +87,7 @@ define Device/arcadyan_arv7519pw
   DEVICE_ALT0_VENDOR := Astoria Networks
   DEVICE_ALT0_MODEL := ARV7519PW
   IMAGE_SIZE := 15488k
-  DEVICE_DTS := ARV7519PW
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
@@ -104,7 +104,7 @@ define Device/arcadyan_arv7525pw
   DEVICE_ALT0_MODEL := Speedport W303V
   DEVICE_ALT0_VARIANT := Typ A
   IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV4510PW
+  SOC := danube
   DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
@@ -119,7 +119,7 @@ define Device/arcadyan_arv752dpw
   DEVICE_ALT0_VENDOR := Vodafone
   DEVICE_ALT0_MODEL := Easybox 802
   IMAGE_SIZE := 7872k
-  DEVICE_DTS := ARV752DPW
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
@@ -136,7 +136,7 @@ define Device/arcadyan_arv752dpw22
   DEVICE_ALT0_VENDOR := Vodafone
   DEVICE_ALT0_MODEL := Easybox 803
   IMAGE_SIZE := 7616k
-  DEVICE_DTS := ARV752DPW22
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb2-pci kmod-usb-uhci kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
@@ -153,7 +153,7 @@ define Device/arcadyan_arv8539pw22
   DEVICE_ALT0_VENDOR := Telekom
   DEVICE_ALT0_MODEL := Speedport W504V Typ A
   IMAGE_SIZE := 7616k
-  DEVICE_DTS := ARV8539PW22
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
@@ -167,7 +167,7 @@ define Device/audiocodes_mp-252
   DEVICE_VENDOR := AudioCodes
   DEVICE_MODEL := MediaPack MP-252
   IMAGE_SIZE := 14848k
-  DEVICE_DTS := ACMP252
+  SOC := danube
   DEVICE_PACKAGES :=  kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
 	kmod-ltq-tapi kmod-ltq-vmmc \
@@ -185,7 +185,7 @@ define Device/bt_homehub-v2b
   DEVICE_MODEL := Home Hub 2
   DEVICE_VARIANT := Type B
   BOARD_NAME := BTHOMEHUBV2B
-  DEVICE_DTS := BTHOMEHUBV2B
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
@@ -199,7 +199,7 @@ TARGET_DEVICES += bt_homehub-v2b
 define Device/lantiq_easy50712
   DEVICE_VENDOR := Lantiq
   DEVICE_MODEL := Danube (EASY50712)
-  DEVICE_DTS := EASY50712
+  SOC := danube
   IMAGE_SIZE := 3776k
 endef
 TARGET_DEVICES += lantiq_easy50712
@@ -208,7 +208,7 @@ define Device/siemens_gigaset-sx76x
   DEVICE_VENDOR := Siemens
   DEVICE_MODEL := Gigaset sx76x
   IMAGE_SIZE := 7680k
-  DEVICE_DTS := GIGASX76X
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
diff --git a/target/linux/lantiq/image/falcon.mk b/target/linux/lantiq/image/falcon.mk
index 38ba856cf8..e6aae1240b 100644
--- a/target/linux/lantiq/image/falcon.mk
+++ b/target/linux/lantiq/image/falcon.mk
@@ -2,7 +2,7 @@ define Device/lantiq_easy88388
   DEVICE_VENDOR := Lantiq
   DEVICE_MODEL := EASY88388 Falcon FTTDP8 Reference Board
   IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY88388
+  SOC := falcon
 endef
 TARGET_DEVICES += lantiq_easy88388
 
@@ -10,7 +10,7 @@ define Device/lantiq_easy88444
   DEVICE_VENDOR := Lantiq
   DEVICE_MODEL := EASY88444 Falcon FTTdp G.FAST Reference Board
   IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY88444
+  SOC := falcon
 endef
 TARGET_DEVICES += lantiq_easy88444
 
@@ -19,7 +19,7 @@ define Device/lantiq_easy98020
   DEVICE_MODEL := Falcon SFU Reference Board (EASY98020)
   DEVICE_VARIANT := v1.0-v1.7
   IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98020
+  SOC := falcon
 endef
 TARGET_DEVICES += lantiq_easy98020
 
@@ -28,7 +28,7 @@ define Device/lantiq_easy98020-v18
   DEVICE_MODEL := Falcon SFU Reference Board (EASY98020)
   DEVICE_VARIANT := v1.8
   IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98020V18
+  SOC := falcon
 endef
 TARGET_DEVICES += lantiq_easy98020-v18
 
@@ -36,7 +36,7 @@ define Device/lantiq_easy98021
   DEVICE_VENDOR := Lantiq
   DEVICE_MODEL := Falcon HGU Reference Board (EASY98021)
   IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98021
+  SOC := falcon
 endef
 TARGET_DEVICES += lantiq_easy98021
 
@@ -45,7 +45,7 @@ define Device/lantiq_easy98035synce
   DEVICE_MODEL := Falcon SFP Stick (EASY98035SYNCE)
   DEVICE_VARIANT := with Synchronous Ethernet
   IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98035SYNCE
+  SOC := falcon
 endef
 TARGET_DEVICES += lantiq_easy98035synce
 
@@ -54,7 +54,7 @@ define Device/lantiq_easy98035synce1588
   DEVICE_MODEL := Falcon SFP Stick (EASY98035SYNCE1588)
   DEVICE_VARIANT := with SyncE and IEEE1588
   IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98035SYNCE1588
+  SOC := falcon
 endef
 TARGET_DEVICES += lantiq_easy98035synce1588
 
@@ -63,7 +63,7 @@ define Device/lantiq_easy98000-nand
   DEVICE_MODEL := EASY98000 Falcon Eval Board
   DEVICE_VARIANT := NAND
   IMAGE_SIZE := 3904k
-  DEVICE_DTS := EASY98000NAND
+  SOC := falcon
   DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
 endef
 TARGET_DEVICES += lantiq_easy98000-nand
@@ -73,7 +73,7 @@ define Device/lantiq_easy98000-nor
   DEVICE_MODEL := EASY98000 Falcon Eval Board
   DEVICE_VARIANT := NOR
   IMAGE_SIZE := 3904k
-  DEVICE_DTS := EASY98000NOR
+  SOC := falcon
   DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
 endef
 TARGET_DEVICES += lantiq_easy98000-nor
@@ -83,7 +83,7 @@ define Device/lantiq_easy98000-sflash
   DEVICE_MODEL := EASY98000 Falcon Eval Board
   DEVICE_VARIANT := SFLASH
   IMAGE_SIZE := 7424k
-  DEVICE_DTS := EASY98000SFLASH
+  SOC := falcon
   DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
 endef
 TARGET_DEVICES += lantiq_easy98000-sflash
@@ -92,7 +92,7 @@ define Device/lantiq_falcon-mdu
   DEVICE_VENDOR := Lantiq
   DEVICE_MODEL := Falcon / VINAXdp MDU Board
   IMAGE_SIZE := 7424k
-  DEVICE_DTS := FALCON-MDU
+  SOC := falcon
 endef
 TARGET_DEVICES += lantiq_falcon-mdu
 
@@ -100,6 +100,6 @@ define Device/lantiq_falcon-sfp
   DEVICE_VENDOR := Lantiq
   DEVICE_MODEL := Falcon SFP Stick
   IMAGE_SIZE := 7424k
-  DEVICE_DTS := FALCON-SFP
+  SOC := falcon
 endef
 TARGET_DEVICES += lantiq_falcon-sfp
diff --git a/target/linux/lantiq/image/tp-link.mk b/target/linux/lantiq/image/tp-link.mk
index 3be40fc947..56a7e5ca57 100644
--- a/target/linux/lantiq/image/tp-link.mk
+++ b/target/linux/lantiq/image/tp-link.mk
@@ -2,6 +2,7 @@ DEVICE_VARS += TPLINK_FLASHLAYOUT TPLINK_HWID TPLINK_HWREV TPLINK_HWREVADD TPLIN
 
 define Device/lantiqTpLink
   DEVICE_VENDOR := TP-Link
+  SOC := vr9
   TPLINK_HWREVADD := 0
   TPLINK_HVERSION := 2
   KERNEL := kernel-bin | append-dtb | lzma
@@ -16,7 +17,6 @@ define Device/tplink_tdw8970
   $(Device/lantiqTpLink)
   DEVICE_MODEL := TD-W8970
   DEVICE_VARIANT := v1
-  DEVICE_DTS := TDW8970
   TPLINK_FLASHLAYOUT := 8Mltq
   TPLINK_HWID := 0x89700001
   TPLINK_HWREV := 1
@@ -30,7 +30,6 @@ define Device/tplink_tdw8980
   $(Device/lantiqTpLink)
   DEVICE_MODEL := TD-W8980
   DEVICE_VARIANT := v1
-  DEVICE_DTS := TDW8980
   TPLINK_FLASHLAYOUT := 8Mltq
   TPLINK_HWID := 0x89800001
   TPLINK_HWREV := 14
@@ -44,7 +43,6 @@ define Device/tplink_vr200
   $(Device/lantiqTpLink)
   DEVICE_MODEL := Archer VR200
   DEVICE_VARIANT := v1
-  DEVICE_DTS := VR200
   TPLINK_FLASHLAYOUT := 16Mltq
   TPLINK_HWID := 0x63e64801
   TPLINK_HWREV := 0x53
@@ -58,7 +56,6 @@ define Device/tplink_vr200v
   $(Device/lantiqTpLink)
   DEVICE_MODEL := Archer VR200v
   DEVICE_VARIANT := v1
-  DEVICE_DTS := VR200v
   TPLINK_FLASHLAYOUT := 16Mltq
   TPLINK_HWID := 0x73b70801
   TPLINK_HWREV := 0x2f
diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk
index dee4b0d161..cd43c61e6e 100644
--- a/target/linux/lantiq/image/vr9.mk
+++ b/target/linux/lantiq/image/vr9.mk
@@ -3,7 +3,7 @@ define Device/alphanetworks_asl56026
   DEVICE_MODEL := ASL56026
   DEVICE_ALT0_VENDOR := BT Openreach
   DEVICE_ALT0_MODEL := ECI VDSL Modem V-2FUb/I
-  DEVICE_DTS := ASL56026
+  SOC := vr9
   IMAGE_SIZE := 7488k
 endef
 TARGET_DEVICES += alphanetworks_asl56026
@@ -17,7 +17,7 @@ define Device/arcadyan_arv7519rw22
   DEVICE_ALT1_VENDOR := Astoria Networks
   DEVICE_ALT1_MODEL := ARV7519RW22
   IMAGE_SIZE := 31232k
-  DEVICE_DTS := ARV7519RW22
+  SOC := vr9
   DEVICE_PACKAGES := kmod-usb-dwc2
   SUPPORTED_DEVICES += ARV7519RW22
 endef
@@ -27,7 +27,7 @@ define Device/arcadyan_vg3503j
   DEVICE_VENDOR := BT Openreach
   DEVICE_MODEL := ECI VDSL Modem V-2FUb/R
   IMAGE_SIZE := 8000k
-  DEVICE_DTS := VG3503J
+  SOC := vr9
   SUPPORTED_DEVICES += VG3503J
 endef
 TARGET_DEVICES += arcadyan_vg3503j
@@ -41,7 +41,7 @@ define Device/arcadyan_vgv7510kw22-brn
   DEVICE_ALT0_MODEL := Box 6431
   DEVICE_ALT0_VARIANT := BRN
   IMAGE_SIZE := 7168k
-  DEVICE_DTS := VGV7510KW22BRN
+  SOC := vr9
   SIGNATURE := BRNDA6431
   MAGIC := 0x12345678
   CRC32_POLY := 0x04c11db7
@@ -58,7 +58,7 @@ define Device/arcadyan_vgv7510kw22-nor
   DEVICE_ALT0_MODEL := Box 6431
   DEVICE_ALT0_VARIANT := NOR
   IMAGE_SIZE := 15232k
-  DEVICE_DTS := VGV7510KW22NOR
+  SOC := vr9
   DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc
   SUPPORTED_DEVICES += VGV7510KW22NOR
 endef
@@ -73,7 +73,7 @@ define Device/arcadyan_vgv7519-brn
   DEVICE_ALT0_MODEL := Experiabox 8
   DEVICE_ALT0_VARIANT := BRN
   IMAGE_SIZE := 7168k
-  DEVICE_DTS := VGV7519BRN
+  SOC := vr9
   SIGNATURE := 5D00008000
   MAGIC := 0x12345678
   CRC32_POLY := 0x2083b8ed
@@ -90,7 +90,7 @@ define Device/arcadyan_vgv7519-nor
   DEVICE_ALT0_MODEL := Experiabox 8
   DEVICE_ALT0_VARIANT := NOR
   IMAGE_SIZE := 15360k
-  DEVICE_DTS := VGV7519NOR
+  SOC := vr9
   DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-ltq-tapi kmod-ltq-vmmc
   SUPPORTED_DEVICES += VGV7519NOR
 endef
@@ -101,7 +101,7 @@ define Device/avm_fritz3370
   $(Device/NAND)
   DEVICE_MODEL := FRITZ!Box 3370
   DEVICE_VARIANT := Rev. 2
-  DEVICE_DTS := FRITZ3370
+  SOC := vr9
   KERNEL_SIZE := 4096k
   UBINIZE_OPTS := -E 5
   IMAGES += eva-kernel.bin eva-filesystem.bin
@@ -114,7 +114,6 @@ define Device/avm_fritz3370-rev2-hynix
   $(Device/avm_fritz3370)
   DEVICE_MODEL := FRITZ!Box 3370
   DEVICE_VARIANT := Rev. 2 (Hynix NAND)
-  DEVICE_DTS := FRITZ3370-REV2-HYNIX
 endef
 TARGET_DEVICES += avm_fritz3370-rev2-hynix
 
@@ -122,7 +121,6 @@ define Device/avm_fritz3370-rev2-micron
   $(Device/avm_fritz3370)
   DEVICE_MODEL := FRITZ!Box 3370
   DEVICE_VARIANT := Rev. 2 (Micron NAND)
-  DEVICE_DTS := FRITZ3370-REV2-MICRON
 endef
 TARGET_DEVICES += avm_fritz3370-rev2-micron
 
@@ -130,7 +128,7 @@ define Device/avm_fritz7360sl
   $(Device/AVM)
   DEVICE_MODEL := FRITZ!Box 7360 SL
   IMAGE_SIZE := 15744k
-  DEVICE_DTS := FRITZ7360SL
+  SOC := vr9
   DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2
   SUPPORTED_DEVICES += FRITZ7360SL
 endef
@@ -142,7 +140,7 @@ define Device/avm_fritz7362sl
   DEVICE_MODEL := FRITZ!Box 7362 SL
   KERNEL_SIZE := 4096k
   IMAGE_SIZE := 49152k
-  DEVICE_DTS := FRITZ7362SL
+  SOC := vr9
   DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 fritz-tffs
 endef
 TARGET_DEVICES += avm_fritz7362sl
@@ -152,7 +150,7 @@ define Device/avm_fritz7412
   $(Device/NAND)
   DEVICE_MODEL := FRITZ!Box 7412
   BOARD_NAME := FRITZ7412
-  DEVICE_DTS := FRITZ7412
+  SOC := vr9
   KERNEL_SIZE := 4096k
   IMAGE_SIZE := 49152k
   DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic fritz-tffs-nand fritz-caldata
@@ -165,7 +163,7 @@ define Device/bt_homehub-v5a
   DEVICE_MODEL := Home Hub 5
   DEVICE_VARIANT := Type A
   BOARD_NAME := BTHOMEHUBV5A
-  DEVICE_DTS := BTHOMEHUBV5A
+  SOC := vr9
   DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader \
 	kmod-ath10k-ct ath10k-firmware-qca988x-ct wpad-basic kmod-usb-dwc2
   SUPPORTED_DEVICES += BTHOMEHUBV5A
@@ -176,7 +174,7 @@ define Device/buffalo_wbmr-300hpd
   DEVICE_VENDOR := Buffalo
   DEVICE_MODEL := WBMR-300HPD
   IMAGE_SIZE := 15616k
-  DEVICE_DTS := WBMR300
+  SOC := vr9
   DEVICE_PACKAGES := kmod-mt7603 wpad-basic kmod-usb-dwc2
   SUPPORTED_DEVICES += WBMR300
 endef
@@ -187,7 +185,7 @@ define Device/lantiq_easy80920-nand
   DEVICE_VENDOR := Lantiq
   DEVICE_MODEL := VR9 EASY80920
   DEVICE_VARIANT := NAND
-  DEVICE_DTS := EASY80920NAND
+  SOC := vr9
   IMAGE_SIZE := 64512k
   DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport
 endef
@@ -197,7 +195,7 @@ define Device/lantiq_easy80920-nor
   DEVICE_VENDOR := Lantiq
   DEVICE_MODEL := VR9 EASY80920
   DEVICE_VARIANT := NOR
-  DEVICE_DTS := EASY80920NOR
+  SOC := vr9
   IMAGE_SIZE := 7936k
   DEVICE_PACKAGES := kmod-ath9k kmod-owl-loader wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport
 endef
@@ -206,7 +204,7 @@ TARGET_DEVICES += lantiq_easy80920-nor
 define Device/netgear_dm200
   DEVICE_VENDOR := NETGEAR
   DEVICE_MODEL := DM200
-  DEVICE_DTS := DM200
+  SOC := vr9
   IMAGES := sysupgrade.bin factory.img
   IMAGE/sysupgrade.bin := append-kernel | \
 	pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
@@ -226,7 +224,7 @@ define Device/zyxel_p-2812hnu-f1
   DEVICE_MODEL := P-2812HNU
   DEVICE_VARIANT := F1
   BOARD_NAME := P2812HNUF1
-  DEVICE_DTS := P2812HNUF1
+  SOC := vr9
   DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2 kmod-usb-ledtrig-usbport
   KERNEL_SIZE := 3072k
   SUPPORTED_DEVICES += P2812HNUF1
@@ -239,7 +237,7 @@ define Device/zyxel_p-2812hnu-f3
   DEVICE_MODEL := P-2812HNU
   DEVICE_VARIANT := F3
   BOARD_NAME := P2812HNUF3
-  DEVICE_DTS := P2812HNUF3
+  SOC := vr9
   DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic kmod-usb-dwc2
   SUPPORTED_DEVICES += P2812HNUF3
 endef
diff --git a/target/linux/lantiq/image/xway_legacy.mk b/target/linux/lantiq/image/xway_legacy.mk
index 011de20914..8af2e1c3fc 100644
--- a/target/linux/lantiq/image/xway_legacy.mk
+++ b/target/linux/lantiq/image/xway_legacy.mk
@@ -2,7 +2,7 @@ define Device/arcadyan_arv4518pwr01
   DEVICE_VENDOR := Arcadyan
   DEVICE_MODEL := ARV4518PWR01
   IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV4518PWR01
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
@@ -16,7 +16,7 @@ define Device/arcadyan_arv4518pwr01a
   DEVICE_VENDOR := Arcadyan
   DEVICE_MODEL := ARV4518PWR01A
   IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV4518PWR01A
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
@@ -34,7 +34,7 @@ define Device/arcadyan_arv4520pw
   DEVICE_ALT1_VENDOR := Airties
   DEVICE_ALT1_MODEL := WAV-281
   IMAGE_SIZE := 3648k
-  DEVICE_DTS := ARV4520PW
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
@@ -51,7 +51,7 @@ define Device/arcadyan_arv4525pw
   DEVICE_ALT0_MODEL := Speedport W502V
   DEVICE_ALT0_VARIANT := Typ A
   IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV4525PW
+  SOC := danube
   DEVICE_PACKAGES := kmod-ath5k wpad-mini \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
@@ -66,7 +66,7 @@ define Device/arcadyan_arv452cqw
   DEVICE_ALT0_VENDOR := Vodafone
   DEVICE_ALT0_MODEL := Easybox 801
   IMAGE_SIZE := 3776k
-  DEVICE_DTS := ARV452CQW
+  SOC := danube
   DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ath5k wpad-mini \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Mon Dec 16 07:28:17 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Mon, 16 Dec 2019 13:28:17 +0100
Subject: [OpenWrt-Devel] [PATCH 4/4] lantiq: remove ar9_lantiq_easy50810.dts
In-Reply-To: <20191216122817.22628-1-freifunk@adrianschmutzler.de>
References: <20191216122817.22628-1-freifunk@adrianschmutzler.de>
Message-ID: <20191216122817.22628-5-freifunk@adrianschmutzler.de>

This file seems to be orphaned, no device setup existing for it.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../boot/dts/lantiq/ar9_lantiq_easy50810.dts  | 73 -------------------
 1 file changed, 73 deletions(-)
 delete mode 100644 target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_lantiq_easy50810.dts

diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_lantiq_easy50810.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_lantiq_easy50810.dts
deleted file mode 100644
index 87ba62de33..0000000000
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_lantiq_easy50810.dts
+++ /dev/null
@@ -1,73 +0,0 @@
-/dts-v1/;
-
-#include "ar9.dtsi"
-
-/ {
-	compatible = "lantiq,easy50810", "lantiq,xway", "lantiq,ar9";
-	model = "Lantiq EASY50810";
-
-	chosen {
-		bootargs = "console=ttyLTQ0,115200";
-	};
-
-	memory at 0 {
-		device_type = "memory";
-		reg = <0x0 0x2000000>;
-	};
-};
-
-&gpio {
-	pinctrl-names = "default";
-	pinctrl-0 = <&state_default>;
-
-	state_default: pinmux {
-		exin {
-			lantiq,groups = "exin1";
-			lantiq,function = "exin";
-		};
-	};
-};
-
-&gsw {
-	phy-mode = "rmii";
-};
-
-&localbus {
-	flash at 0 {
-		compatible = "lantiq,nor";
-		bank-width = <2>;
-		reg = <0 0x0 0x2000000>;
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition at 0 {
-				label = "uboot";
-				reg = <0x00000 0x10000>; /* 64 KB */
-			};
-
-			partition at 10000 {
-				label = "uboot_env";
-				reg = <0x10000 0x10000>; /* 64 KB */
-			};
-
-			partition at 20000 {
-				label = "firmware";
-				reg = <0x20000 0x3d0000>;
-			};
-
-			partition at 400000 {
-				label = "rootfs";
-				reg = <0x400000 0x400000>;
-			};
-		};
-	};
-};
-
-&stp {
-	status = "okay";
-	lantiq,shadow = <0xfff>;
-	lantiq,groups = <0x3>;
-};
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Mon Dec 16 07:31:10 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Mon, 16 Dec 2019 13:31:10 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix port setup for Ubiquiti
 EdgeRouter X (and SFP)
Message-ID: <20191216123110.22741-1-freifunk@adrianschmutzler.de>

The EdgeRouter only has LAN ports labelled eth0 to eth4 (plus
unsupported eth5 for SFP version). Thus, there is no reason to set
up one of them as WAN.

This patch sets all ports to "lan" and removes the unused wan_mac.

Actually, stock firmware on the EdgeRouter X assigns a specific MAC
address to each port:

eth0    *:f4 (label)
eth1    *:f5
eth2    *:f6
eth3    *:f7
eth4    *:f8
switch0 *:f9

(No data for SFP version)

Only the label MAC is stored on flash in factory 0x22.

OpenWrt currently sets &ethernet to this address, so all ports will
use that one in OpenWrt.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../ramips/mt7621/base-files/etc/board.d/02_network   | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index 5c6b5659cb..6dfe24e296 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -62,8 +62,6 @@ ramips_setup_interfaces()
 	asus,rt-ac85p|\
 	iptime,a6ns-m|\
 	mikrotik,rb750gr3|\
-	ubiquiti,edgerouterx|\
-	ubiquiti,edgerouterx-sfp|\
 	youhua,wr1200js)
 		ucidef_add_switch "switch0" \
 			"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6 at eth0"
@@ -124,6 +122,11 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0:lan" "6 at eth0"
 		;;
+	ubiquiti,edgerouterx|\
+	ubiquiti,edgerouterx-sfp)
+		ucidef_add_switch "switch0" \
+			"0:lan" "1:lan" "2:lan" "3:lan" "4:lan" "6 at eth0"
+		;;
 	xiaomi,mir3g)
 		ucidef_add_switch "switch0" \
 			"2:lan:2" "3:lan:1" "1:wan" "6t at eth0"
@@ -246,10 +249,6 @@ ramips_setup_macs()
 	telco-electronics,x1)
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xe006)" 1)
 		;;
-	ubiquiti,edgerouterx|\
-	ubiquiti,edgerouterx-sfp)
-		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x22)" 1)
-		;;
 	wevo,11acnas|\
 	wevo,w2914ns-v2|\
 	zio,freezio)
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From greearb at candelatech.com  Mon Dec 16 09:29:41 2019
From: greearb at candelatech.com (Ben Greear)
Date: Mon, 16 Dec 2019 06:29:41 -0800
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <a8f56a23-108f-3f76-2ea3-a904726ed224@gmail.com>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <5675304.dXXkMWVoIb@debian64> <20191215120114.GD11070@home.paul.comp>
 <4186246.Rc2P9gcx8s@debian64>
 <a8f56a23-108f-3f76-2ea3-a904726ed224@gmail.com>
Message-ID: <af007825-49ef-73fe-edc9-3198737e3f3d@candelatech.com>



On 12/16/2019 03:26 AM, Alberto Bursi wrote:
>
> On 15/12/19 14:09, Christian Lamparter wrote:
>>
>> But it seems that Ben had a change of heart in this regard. I don't know the
>> details or why, But it makes sense because it would enable his company to save
>> some money for the systems his company sells:
>>   <https://www.candelatech.com/lf_systems.php> so there is some value
>> in supporting these devices, especially if someone else does all the work
>> for it.
>
> These are wifi/network testing equipment, not network devices.
>
> Also I don't see the value in "saving some money" by using a bit less RAM
>
> when the cheaper system is sold for 3k, and most stuff is above 10k.
>
> You could use standard whitebox x86 stuff at that price point.

The low-ram thing is for people using OpenWRT on low-powered AP boards.  We don't
need it for our test equipment.

Hopefully someone can test Paul Fertser's patches, and if they work well, then can
be applied to OpenWRT.

Maybe later we can conditionally compile it directly into ath10k-ct instead of having
the extra patch in OpenWRT.

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From christina.martin at nicheprospectmarketers.com  Mon Dec 16 11:45:38 2019
From: christina.martin at nicheprospectmarketers.com (Christina Martin)
Date: Mon, 16 Dec 2019 22:15:38 +0530
Subject: [OpenWrt-Devel] Embedded World Exhibition & Conference
Message-ID: <!&!AAAAAAAAAAAYAAAAAAAAAD0IW/l5TtZLl4M+uEfmUorCgAAAEAAAAHL1ZWQZIiFOneldulhqlJ8BAAAAAA==@nicheprospectmarketers.com>

Hi greetings 

Will you be interested in acquiring the attendees list of Embedded World
Exhibition & Conference? The leading international fair for embedded
systems.

Visitors list: 32,000 trade visitors and 2,200 conference participants from
77 countries.

Date: 25 - 27 Feb 2020

Location: Nurnberg Messe GmbH, Nuremberg, Germany

The counts given above are GDPR complaint with all the rules and regulations
with 100% opt-in contacts.

We provide all the relevant information about the attendee including email,
phone and mailing address. Hence you can use this information for your
email, telephonic and mailing campaigns.

Let me know if you would like to proceed with purchasing opt in contacts.

Awaiting your response 

Regards 

Christina Martin | Business Analyst

Note: - If this is something you are interested in, please respond to this
email. If this is not of your interest, reply as "Exclude" so we will not
email you again.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191216/1d04c0bb/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From chunkeey at gmail.com  Mon Dec 16 15:04:44 2019
From: chunkeey at gmail.com (Christian Lamparter)
Date: Mon, 16 Dec 2019 21:04:44 +0100
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <a8f56a23-108f-3f76-2ea3-a904726ed224@gmail.com>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <5675304.dXXkMWVoIb@debian64> <20191215120114.GD11070@home.paul.comp>
 <4186246.Rc2P9gcx8s@debian64> <a8f56a23-108f-3f76-2ea3-a904726ed224@gmail.com>
Message-ID: <CAAd0S9BT1y2F7tEXp720u4xx_3Xry0uZnyvaOExH-85X7ctyjg@mail.gmail.com>

Hello,

On Mon, Dec 16, 2019 at 12:27 PM Alberto Bursi
<bobafetthotmail at gmail.com> wrote:
>
>
> On 15/12/19 14:09, Christian Lamparter wrote:
> >
> > But it seems that Ben had a change of heart in this regard. I don't know the
> > details or why, But it makes sense because it would enable his company to save
> > some money for the systems his company sells:
> >   <https://www.candelatech.com/lf_systems.php> so there is some value
> > in supporting these devices, especially if someone else does all the work
> > for it.
>
> These are wifi/network testing equipment, not network devices.
>
> Also I don't see the value in "saving some money" by using a bit less RAM
>
> when the cheaper system is sold for 3k, and most stuff is above 10k.
>
> You could use standard whitebox x86 stuff at that price point.

I'm glad this is getting some attention and others are chiming in. But
let me tell
you first, that I'm not an opponent of the "American way", I'm trying
to make sense
of it though and also what would happen to the ath10k GPIO patches that got
quietly dropped from your reply there...

As for the "These are wifi/network testing equipment, not network devices."
True and If you are interested you can buy cheaper devices like
<https://www.candelatech.com/ct314_product.php> from the company as well:

"The CT314 is a low-power and affordable applicance with a single 10/100
Ethernet port and one Broadcome 802.11b/g/n Wireless interface. It is targeted
at users who wish to have an inexpensive appliance that can be left at remote
sites for network monitoring and lower speed testing. The maximum throughput
is about 90Mbps bi-directional wired. Wireless throughput is steady at 38Mbps
and can peak at 48Mpbs. The CT314 is based on the Raspberry PI B version 3
platform, running the Ubuntu Server OS. [...]".

I know these have not much to do with the issue at hand ("low-memory system"
support in ath10k(-ct) with OpenWrt). But as Ben explained in the follow-up that
he has a keen interest for supporting the ath10k-ct driver+firmware
and he's doing
a great job with the ath10k-ct issue tracker.

Cheers,
Christian

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Mon Dec 16 15:25:13 2019
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Mon, 16 Dec 2019 21:25:13 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix port setup for Ubiquiti
 EdgeRouter X (and SFP)
In-Reply-To: <20191216123110.22741-1-freifunk@adrianschmutzler.de>
References: <20191216123110.22741-1-freifunk@adrianschmutzler.de>
Message-ID: <b3565dbd-88aa-2346-3f7c-7db8183af98b@universe-factory.net>

On 12/16/19 1:31 PM, Adrian Schmutzler wrote:
> The EdgeRouter only has LAN ports labelled eth0 to eth4 (plus
> unsupported eth5 for SFP version). Thus, there is no reason to set
> up one of them as WAN.
> 
> This patch sets all ports to "lan" and removes the unused wan_mac.
> 
> Actually, stock firmware on the EdgeRouter X assigns a specific MAC
> address to each port:
> 
> eth0    *:f4 (label)
> eth1    *:f5
> eth2    *:f6
> eth3    *:f7
> eth4    *:f8
> switch0 *:f9
> 
> (No data for SFP version)
> 
> Only the label MAC is stored on flash in factory 0x22.
> 
> OpenWrt currently sets &ethernet to this address, so all ports will
> use that one in OpenWrt.
> 
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>

Having a WAN port by default is extremely useful (and necessary for easy
automatic configuration by OpenWrt-based frameworks like Gluon without
having to special-case many devices).

I would prefer if we could always make one port WAN as long as we have at
least two independently configurable ports, regardless of labeling - at
least that was my policy for creating new hardware support in the past.

Regards,
Matthias


> ---
>  .../ramips/mt7621/base-files/etc/board.d/02_network   | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> index 5c6b5659cb..6dfe24e296 100755
> --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
> @@ -62,8 +62,6 @@ ramips_setup_interfaces()
>  	asus,rt-ac85p|\
>  	iptime,a6ns-m|\
>  	mikrotik,rb750gr3|\
> -	ubiquiti,edgerouterx|\
> -	ubiquiti,edgerouterx-sfp|\
>  	youhua,wr1200js)
>  		ucidef_add_switch "switch0" \
>  			"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6 at eth0"
> @@ -124,6 +122,11 @@ ramips_setup_interfaces()
>  		ucidef_add_switch "switch0" \
>  			"0:lan" "6 at eth0"
>  		;;
> +	ubiquiti,edgerouterx|\
> +	ubiquiti,edgerouterx-sfp)
> +		ucidef_add_switch "switch0" \
> +			"0:lan" "1:lan" "2:lan" "3:lan" "4:lan" "6 at eth0"
> +		;;
>  	xiaomi,mir3g)
>  		ucidef_add_switch "switch0" \
>  			"2:lan:2" "3:lan:1" "1:wan" "6t at eth0"
> @@ -246,10 +249,6 @@ ramips_setup_macs()
>  	telco-electronics,x1)
>  		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xe006)" 1)
>  		;;
> -	ubiquiti,edgerouterx|\
> -	ubiquiti,edgerouterx-sfp)
> -		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x22)" 1)
> -		;;
>  	wevo,11acnas|\
>  	wevo,w2914ns-v2|\
>  	zio,freezio)
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191216/2eeaed8f/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at adrianschmutzler.de  Mon Dec 16 16:01:31 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Mon, 16 Dec 2019 22:01:31 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix port setup for Ubiquiti
 EdgeRouter X (and SFP)
Message-ID: <012a01d5b453$fe9c9ea0$fbd5dbe0$@adrianschmutzler.de>

Hallo Matthias,

> Having a WAN port by default is extremely useful (and necessary for easy 
> automatic configuration by OpenWrt-based frameworks like Gluon without 
> having to special-case many devices). 
> I would prefer if we could always make one port WAN as long as we have at 
> least two independently configurable ports, regardless of labeling - at 
> least that was my policy for creating new hardware support in the past. 
> Regards, 
> Matthias 

while I understand your reasoning, I look at this from a different angle:
On a device with five equivalent ports, I would expect those to be still equivalent in OpenWrt. Having an arbitrary port chosen to be a WAN port is rather confusing in that situation; users may only realize that if they really look into the configuration in the first place. Consequently, I would handle this the opposite way: For the uneducated user downloading the prebuild image, I would provide the setup which is supposed to be "expected". Experienced users and downstream developers (as I am myself) would then be able to change configuration to their particular demands. Though one could argue that the uneducated user would also be troubled to set up a WAN port if he wanted it, this is already assuming a certain use case which I would not do for the default settings (where I would plead that the user expects what the device is built for).
To make it even worse, having the predefined wan port for this device in particular will mess up the port order in luci, where ports are ordered "1 2 3 4 0" because 0 is wan. On the device, ports are 0 1 2 3 4 ...

Note that this is not just my personal opinion: I actually was made aware of the situation with the EdgeRouter by a user who reported the situation, complaining about having to configure away the WAN port for this device and being annoyed by the luci issue.

So, I'd still prefer to have this device switched to lan-only.

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191216/20210418/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From bobafetthotmail at gmail.com  Mon Dec 16 16:25:43 2019
From: bobafetthotmail at gmail.com (Alberto Bursi)
Date: Mon, 16 Dec 2019 22:25:43 +0100
Subject: [OpenWrt-Devel] [PATCH] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <CAAd0S9BT1y2F7tEXp720u4xx_3Xry0uZnyvaOExH-85X7ctyjg@mail.gmail.com>
References: <4c10fab6-2a90-ea0b-8176-314638e1cb06@hauke-m.de>
 <5675304.dXXkMWVoIb@debian64> <20191215120114.GD11070@home.paul.comp>
 <4186246.Rc2P9gcx8s@debian64>
 <a8f56a23-108f-3f76-2ea3-a904726ed224@gmail.com>
 <CAAd0S9BT1y2F7tEXp720u4xx_3Xry0uZnyvaOExH-85X7ctyjg@mail.gmail.com>
Message-ID: <c073338d-eea5-36f2-1fed-62f40613855b@gmail.com>



On 16/12/19 21:04, Christian Lamparter wrote:
> Hello,
> 
> On Mon, Dec 16, 2019 at 12:27 PM Alberto Bursi
> <bobafetthotmail at gmail.com> wrote:
>>
>>
>> On 15/12/19 14:09, Christian Lamparter wrote:
>>>
>>> But it seems that Ben had a change of heart in this regard. I don't know the
>>> details or why, But it makes sense because it would enable his company to save
>>> some money for the systems his company sells:
>>>    <https://www.candelatech.com/lf_systems.php> so there is some value
>>> in supporting these devices, especially if someone else does all the work
>>> for it.
>>
>> These are wifi/network testing equipment, not network devices.
>>
>> Also I don't see the value in "saving some money" by using a bit less RAM
>>
>> when the cheaper system is sold for 3k, and most stuff is above 10k.
>>
>> You could use standard whitebox x86 stuff at that price point.
> 
> I'm glad this is getting some attention and others are chiming in. But
> let me tell
> you first, that I'm not an opponent of the "American way", I'm trying
> to make sense
> of it though and also what would happen to the ath10k GPIO patches that got
> quietly dropped from your reply there...
I was just commenting about the fact that they clearly don't care about 
RAM consumption for their own hardware, I found it strange that you 
pulled that up as a "potential way to save money".

Saving 10-20$ (RAM prices) on a low-volume high-price item costing 
thousands of dollars is mostly irrelevant.

> 
> As for the "These are wifi/network testing equipment, not network devices."
> True and If you are interested you can buy cheaper devices like
> <https://www.candelatech.com/ct314_product.php> from the company as well:
> 

When I said "expensive devices" I was talking of their devices that 
could mount a ath10k-supported card. A Raspi really does not.

> 
> I know these have not much to do with the issue at hand ("low-memory system"
> support in ath10k(-ct) with OpenWrt). But as Ben explained in the follow-up that
> he has a keen interest for supporting the ath10k-ct driver+firmware
> and he's doing
> a great job with the ath10k-ct issue tracker.
> 

I fully agree with merging and possibly upstreaming the current patches 
about a build option to reduce buffer sizes so that this thing does not 
OOM on devices that OpenWrt supports.

My remarks about RAM usage being irrelevant was specifc to their own 
usecase in their "expensive test equipment".

-Alberto

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Mon Dec 16 17:36:41 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Tue, 17 Dec 2019 01:36:41 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?xOjx7eXl4vHq6OUg7PPr/PL06Ov87PsgLSDh?=
	=?cp1251?b?7uv8+OD/IOru6+vl6vbo/yDiIO7y6+j37e7sIOrg9+Xx8uLlLiAw?=
	=?cp1251?q?5=5F08=5F2019_02=5F10_199508?=
Message-ID: <mailman.18733.1576535968.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ??????????? ??????????? - ??????? ????????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Tue, 17 Dec 2019 01:36:41 +0300
Size: 37963
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191217/8597c80e/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From greearb at candelatech.com  Mon Dec 16 17:48:01 2019
From: greearb at candelatech.com (Ben Greear)
Date: Mon, 16 Dec 2019 14:48:01 -0800
Subject: [OpenWrt-Devel] New ath10k-ct wave-2 firmware available
Message-ID: <2402695f-1854-5317-9acc-732e08526720@candelatech.com>

No changes to wave-1, but I make a version .014 copy anyway to keep the makefile in
sync.

Wave-2 has a fix to make setting txpower work better.  Before setting the power was
ignored at least some of the time (it also appeared to work mostly, so I guess it
was being correctly set in other ways).

988x
19db86003509dedb8ace339c183813ca637d65af24d00666411d1590efe33e13  firmware-2-ct-full-community-22.bin.lede.014
454e67dab545e720369a07be2fee16de008c76db4ab3119e7760bf9f7504c066  firmware-2-ct-full-htt-mgt-community-22.bin.lede.014
/home/greearb/candela_html/downloads
9887
b3c738328427e124701a5735d65cde0f60e4172ae5bc23b00e5b16df7995dbd4  firmware-2-ct-full-community-22.bin.lede.014
4432ccee23133bbaa4a5552e50a1e7e889b257362603e05530e751b67c29b7b5  firmware-2-ct-full-htt-mgt-community-22.bin.lede.014
/home/greearb/candela_html/downloads
9980
9a908f743604a468b651a5f73c49e6b0ba11a05c677b9726fbf041b849d88b25  firmware-5-ct-full-community-12.bin-lede.014
800dd0816702aaca75f3eb5436c2ea724a6c24833838cd54399b9286b4d4fbe8  firmware-5-ct-full-htt-mgt-community-12.bin-lede.014
/home/greearb/candela_html/downloads
9984
a8b12dba478e8c9d4a215f82324382c7554a900e83c31775f8511af84e59fef7  firmware-5-ct-full-community-12.bin-lede.014
d185651b5d3d1f0082720bc6c2bbe43b2a00cdb6333403fac9336a720b1d93ae  firmware-5-ct-full-htt-mgt-community-12.bin-lede.014
/home/greearb/candela_html/downloads
4019
4c2e48835219f420b18dc58e31d1387dae0da70d8170c3fc5e7bce39c06cf355  firmware-5-ct-full-community-12.bin-lede.014
743da4d537d094a7839bd8e1f792e4cb8b517101f66777c84fd84585f0b85e64  firmware-5-ct-full-htt-mgt-community-12.bin-lede.014
/home/greearb/candela_html/downloads
9888
5809c8a6b3bd81cbc829b5e90af3c0a3300488fe194524a90e260448158016b6  firmware-5-ct-full-community-12.bin-lede.014
a284943c203ff66ec2e865f20ae2d2aa049b450801d7205b53c9163862228f15  firmware-5-ct-full-htt-mgt-community-12.bin-lede.014
/home/greearb/candela_html/downloads


Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Tue Dec 17 02:28:33 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Tue, 17 Dec 2019 08:28:33 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 0/3] libblkid-tiny: cherry-pick
 upstream vfat fixes
Message-ID: <20191217072836.11411-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

This fixes reading vfat labels. With updated code "NO NAME    " is no
longer read and so our downstream hack for dropping extra spaces can be
dropped.

Pali Roh?r (2):
  libblkid: vfat: Fix reading labels which starts with byte 0x05
  libblkid: vfat: Change parsing label in special cases

Rafa? Mi?ecki (1):
  libblkid-tiny: add blkid_probe_set_id_label() stub

 libblkid-tiny/libblkid-tiny.c |  6 ++++++
 libblkid-tiny/superblocks.h   |  2 +-
 libblkid-tiny/vfat.c          | 19 ++++++++-----------
 3 files changed, 15 insertions(+), 12 deletions(-)

-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Tue Dec 17 02:28:34 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Tue, 17 Dec 2019 08:28:34 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 1/3] libblkid-tiny: add
 blkid_probe_set_id_label() stub
In-Reply-To: <20191217072836.11411-1-zajec5@gmail.com>
References: <20191217072836.11411-1-zajec5@gmail.com>
Message-ID: <20191217072836.11411-2-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

This stub will allow porting more upstream code without commenting out
calls and them unused variables. This will simplify maintenance.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 libblkid-tiny/libblkid-tiny.c | 6 ++++++
 libblkid-tiny/superblocks.h   | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/libblkid-tiny/libblkid-tiny.c b/libblkid-tiny/libblkid-tiny.c
index 05b4b99..52470ca 100644
--- a/libblkid-tiny/libblkid-tiny.c
+++ b/libblkid-tiny/libblkid-tiny.c
@@ -101,6 +101,12 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr,
 	return bf->data;
 }
 
+int blkid_probe_set_id_label(blkid_probe pr, const char *name,
+			     const unsigned char *data, size_t len)
+{
+	return -ENOTSUP;
+}
+
 int blkid_probe_set_label(blkid_probe pr, unsigned char *label, size_t len)
 {
 	if (len > (sizeof(pr->label) - 1)) {
diff --git a/libblkid-tiny/superblocks.h b/libblkid-tiny/superblocks.h
index cde8a40..ade2ae0 100644
--- a/libblkid-tiny/superblocks.h
+++ b/libblkid-tiny/superblocks.h
@@ -97,7 +97,7 @@ extern int blkid_probe_set_uuid(blkid_probe pr, unsigned char *uuid);
 extern int blkid_probe_set_uuid_as(blkid_probe pr, unsigned char *uuid, const char *name);
 
 extern int blkid_probe_set_id_label(blkid_probe pr, const char *name,
-			     unsigned char *data, size_t len);
+			     const unsigned char *data, size_t len);
 extern int blkid_probe_set_utf8_id_label(blkid_probe pr, const char *name,
 			     unsigned char *data, size_t len, int enc);
 
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Tue Dec 17 02:28:35 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Tue, 17 Dec 2019 08:28:35 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 2/3] libblkid: vfat: Fix reading
 labels which starts with byte 0x05
In-Reply-To: <20191217072836.11411-1-zajec5@gmail.com>
References: <20191217072836.11411-1-zajec5@gmail.com>
Message-ID: <20191217072836.11411-3-zajec5@gmail.com>

From: Pali Roh?r <pali.rohar at gmail.com>

commit e526f503918cc29d8b1ccf36a5c3a34645d2be6e upstream.

When FAT directory entry has leading byte 0x05 it is interpreted as byte
0xE5. This is how FAT stores file name which starts with byte 0xE5 as
leading byte in 0xE5 in FAT directory entry means that file slot is empty.

Fixes: #533
---
 libblkid-tiny/vfat.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libblkid-tiny/vfat.c b/libblkid-tiny/vfat.c
index 49b865a..93e4053 100644
--- a/libblkid-tiny/vfat.c
+++ b/libblkid-tiny/vfat.c
@@ -167,6 +167,8 @@ static unsigned char *search_fat_label(blkid_probe pr,
 		if ((ent->attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) ==
 		    FAT_ATTR_VOLUME_ID) {
 			DBG(LOWPROBE, ul_debug("\tfound fs LABEL at entry %d", i));
+			if (ent->name[0] == 0x05)
+				ent->name[0] = 0xE5;
 			return ent->name;
 		}
 	}
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Tue Dec 17 02:28:36 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Tue, 17 Dec 2019 08:28:36 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 3/3] libblkid: vfat: Change parsing
 label in special cases
In-Reply-To: <20191217072836.11411-1-zajec5@gmail.com>
References: <20191217072836.11411-1-zajec5@gmail.com>
Message-ID: <20191217072836.11411-4-zajec5@gmail.com>

From: Pali Roh?r <pali.rohar at gmail.com>

commit f0ca7e80d7a171701d0d04a3eae22d97f15d0683 upstream.

* Use only label from the root directory and do not fallback to the label
  stored in boot sector. This is how MS-DOS 6.22, MS-DOS 7.10, Windows 98,
  Windows XP and also Windows 10 behave. Moreover Windows XP and Windows 10
  do not touch label in boot sector anymore, so removing FAT label on those
  Windowses leads to having old label still stored in boot sector (which
  MS-DOS and Windows fully ignore).

* Label entry "NO NAME" in root directory is treated as label "NO NAME"
  instead of empty label. In root directory it has no special meaning.
  String "NO NAME" has a special meaning (empty label) only for label
  stored in boot sector.

* Label from the boot sector is now stored into LABEL_FATBOOT field. So if
  there are applications which depends or needs to read this label, they
  have ability.

After this change LABEL always correspondent to the label from the root
directory and LABEL_FATBOOT to the label stored in the boot sector. If some
of those labels is missing or is not present (e.g. "NO LABEL" in boot
sector) then particular field is not set.

Signed-off-by: Pali Roh?r <pali.rohar at gmail.com>
[rmilecki: drop unneeded now downstream hacks for handling spaces]
Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 libblkid-tiny/vfat.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/libblkid-tiny/vfat.c b/libblkid-tiny/vfat.c
index 93e4053..e70dd75 100644
--- a/libblkid-tiny/vfat.c
+++ b/libblkid-tiny/vfat.c
@@ -305,11 +305,11 @@ static int probe_vfat(blkid_probe pr, const struct blkid_idmag *mag)
 	struct vfat_super_block *vs;
 	struct msdos_super_block *ms;
 	unsigned char *vol_label = 0;
+	const unsigned char *boot_label = NULL;
 	unsigned char *vol_serno = NULL, vol_label_buf[12] = { 0 };
 	uint16_t sector_size = 0, reserved;
 	uint32_t cluster_count, fat_size;
 	const char *version = NULL;
-	int i;
 
 	ms = blkid_probe_get_sb(pr, mag, struct msdos_super_block);
 	if (!ms)
@@ -336,8 +336,7 @@ static int probe_vfat(blkid_probe pr, const struct blkid_idmag *mag)
 			vol_label = vol_label_buf;
 		}
 
-		if (!vol_label || !memcmp(vol_label, no_name, 11))
-			vol_label = ms->ms_label;
+		boot_label = ms->ms_label;
 		vol_serno = ms->ms_serno;
 
 		blkid_probe_set_value(pr, "SEC_TYPE", (unsigned char *) "msdos",
@@ -391,8 +390,7 @@ static int probe_vfat(blkid_probe pr, const struct blkid_idmag *mag)
 
 		version = "FAT32";
 
-		if (!vol_label || !memcmp(vol_label, no_name, 11))
-			vol_label = vs->vs_label;
+		boot_label = vs->vs_label;
 		vol_serno = vs->vs_serno;
 
 		/*
@@ -421,13 +419,10 @@ static int probe_vfat(blkid_probe pr, const struct blkid_idmag *mag)
 		}
 	}
 
-	for (i = 10; i >= 0; i--) {
-		if (vol_label[i] != ' ')
-			break;
-		vol_label[i] = '\0';
-	}
+	if (boot_label && memcmp(boot_label, no_name, 11))
+		blkid_probe_set_id_label(pr, "LABEL_FATBOOT", (unsigned char *) boot_label, 11);
 
-	if (vol_label && memcmp(vol_label, no_name, 11))
+	if (vol_label)
 		blkid_probe_set_label(pr, (unsigned char *) vol_label, 11);
 
 	/* We can't just print them as %04X, because they are unaligned */
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Tue Dec 17 02:42:24 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Tue, 17 Dec 2019 10:42:24 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?xdDAy8DYLiDE5fLx6ujpIP7s7vDo8fLo9+Xx?=
	=?cp1251?b?6ujpIOro7e7m8/Dt4OsgLSDv7uvt4P8g6u7r6+Xq9uj/IOIg7vLr?=
	=?cp1251?b?6Pft7uwg6uD35fHy4uUuIDA1XzA4XzIwMTkgMDJfMTAgMTk5NTA4?=
Message-ID: <mailman.18811.1576568712.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ??????. ??????? ?????????????? ?????????? - ?????? ????????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Tue, 17 Dec 2019 10:42:24 +0300
Size: 25768
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191217/5d032b38/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Tue Dec 17 02:45:34 2019
From: ynezz at true.cz (=?UTF-8?Q?Petr_=C5=A0tetiar?=)
Date: Tue, 17 Dec 2019 07:45:34 +0000
Subject: [OpenWrt-Devel] [PATCH fstools 2/3] libblkid: vfat: Fix reading
 labels which starts with byte 0x05
In-Reply-To: <20191217072836.11411-3-zajec5@gmail.com>
References: <20191217072836.11411-1-zajec5@gmail.com>
 <20191217072836.11411-3-zajec5@gmail.com>
Message-ID: <E971CD68-3F9F-4FCC-BF88-F46ECF732F30@true.cz>

On December 17, 2019 7:28:35 AM UTC, "Rafa? Mi?ecki" <zajec5 at gmail.com> wrote:
>From: Pali Roh?r <pali.rohar at gmail.com>
>
>commit e526f503918cc29d8b1ccf36a5c3a34645d2be6e upstream.
>
>When FAT directory entry has leading byte 0x05 it is interpreted as
>byte
>0xE5. This is how FAT stores file name which starts with byte 0xE5 as
>leading byte in 0xE5 in FAT directory entry means that file slot is
>empty.
>
>Fixes: #533

FYI missing SoBs

>---
> libblkid-tiny/vfat.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/libblkid-tiny/vfat.c b/libblkid-tiny/vfat.c
>index 49b865a..93e4053 100644
>--- a/libblkid-tiny/vfat.c
>+++ b/libblkid-tiny/vfat.c
>@@ -167,6 +167,8 @@ static unsigned char *search_fat_label(blkid_probe
>pr,
> 		if ((ent->attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) ==
> 		    FAT_ATTR_VOLUME_ID) {
> 			DBG(LOWPROBE, ul_debug("\tfound fs LABEL at entry %d", i));
>+			if (ent->name[0] == 0x05)
>+				ent->name[0] = 0xE5;

Would it be possible to replace this magic values with some #define or such? 

> 			return ent->name;
> 		}
> 	}
>-- 
>2.21.0
>
>
>_______________________________________________
>openwrt-devel mailing list
>openwrt-devel at lists.openwrt.org
>https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From watchpeng168 at gmail.com  Tue Dec 17 03:43:57 2019
From: watchpeng168 at gmail.com (Huan Peng)
Date: Tue, 17 Dec 2019 16:43:57 +0800
Subject: [OpenWrt-Devel] Please forward it to your purchasing manager
Message-ID: <CAFbghhX+yd_YUnnd6rgWxMdjVJzyGfXXiLfOjMK-ziS_AW_mBA@mail.gmail.com>

*Hello there.  Dear friends!  Thank you very much for checking my email, I
am very happy!  I hope that you can spend a minute to see the whole
email.  I believe it will be of great help to your business.  We are a
professional watch trading company.  Production of   Michael
Kors   watches,   Armani watches,     **Daniel Wellington*




















*   watches,   Hugo Boss   watches,   Calvin Klein   watches
and   Tissot   watches.  Our watches are sold in more than 10 countries,
and we will cooperate with you, you will get a lot of advantages in quality
and price, welcome wholesalers and retailers.Samples are welcome to be
sampled for quality inspection and a wholesale order is issued after that.
I hope we can build long-term business relationships. If you are interested
in our products, please feel free to contact us!About purchasing
samples:  You can purchase 1-5 samples at our wholesale price, which can be
paid via paypal and bank transfer.  About delivery time:  After the payment
is successful, we will mail the goods out within 3 working days.  About
logistics and transportation:  Our company will use DHL and FedEx will mail
the goods for you.  You will receive the goods within 4-7 days.  About the
issue of return:  If the watch has quality problems, we will replace it for
you for free!  Promotions:Our company will launch 1-2 models of watches
every month for special wholesale, which is 5%-10% lower than the normal
wholesale price.  If you are interested, or want to know more, please reply
to my  , we will reply you within 2 hours! *








*Please believe us?Our company's Facebook public
homepage:   @watchtradingcoltd  My Whatsapp: +86 18898596065  Give you the
best wishes, I hope to be your friend!  Xin Shangyi Trading Co., Ltd*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191217/84f25ba6/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at david-bauer.net  Tue Dec 17 06:52:03 2019
From: mail at david-bauer.net (David Bauer)
Date: Tue, 17 Dec 2019 12:52:03 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] ipq-wifi: add BDF for Aruba AP-303
Message-ID: <20191217115204.9422-1-mail@david-bauer.net>

The BDF originates from the vendor-firmware.

Signed-off-by: David Bauer <mail at david-bauer.net>
---
 package/firmware/ipq-wifi/Makefile              |   2 ++
 .../ipq-wifi/board-aruba_ap-303.qca4019         | Bin 0 -> 24316 bytes
 2 files changed, 2 insertions(+)
 create mode 100644 package/firmware/ipq-wifi/board-aruba_ap-303.qca4019

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index b97fe2f1c9..906f11ac96 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -24,6 +24,7 @@ endef
 #
 
 ALLWIFIBOARDS:= \
+	aruba_ap-303 \
 	avm_fritzrepeater-1200 \
 	linksys_ea8300 \
 	qxwlan_e2600ac
@@ -89,6 +90,7 @@ endef
 # Place files in this directory as board-<devicename>.<qca4019|qca9888|qca9984>
 # Add $(eval $(call generate-ipq-wifi-package,<devicename>,<display name>))
 
+$(eval $(call generate-ipq-wifi-package,aruba_ap-303,Aruba AP-303))
 $(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater 1200))
 $(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
 $(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac,Qxwlan E2600AC))
diff --git a/package/firmware/ipq-wifi/board-aruba_ap-303.qca4019 b/package/firmware/ipq-wifi/board-aruba_ap-303.qca4019
new file mode 100644
index 0000000000000000000000000000000000000000..4848115cfbe3a4a0ed6b17cac929731ecbd7968c
GIT binary patch
literal 24316
zcmeHPdr(tX8b1l)p-UHTNDu)pAp}Se0tBi-!W$`%6c7~&un1I<M58<m4?`F1_ at EFG
zfm#qEXc?48Q$)t%1F%?IJEP40v48CBA8luLw|}fVw5!gvGrOyM?hO}02ql3q<#9ha
z=X~e8-#O<yzk5jTz30c>6BFeZwJ$y}AjvN}B`Pfz$mMbX<(NN~1F#FGd_`$kUSYm(
zzFg|}UZJ$ePkJaU0I%hr$SXO7RRsaQWqBpiyyGXsqDmC`d45r;enA02aybRIXTiQ$
z{(Fv6D8Qnc9-NN#>(d1&AQynm*7jHxFaWR*!ZjM6>t{S38|w;yprD{vFJ4eY3 at h-<
z-!4WF$pUt;M0u#+u2DM at cmo9<o32e4-TK}{-42{)MS-YT8nB=KA&y`%68dZzvGj;%
zJAvBfnQ>V_`vZ+ET^9yjw-&*$wzjskw6xF>07kKy8YxWZr<)vMT{juo&5WBJl$pvJ
zSBe at 2uw^qXb0;%4&|Y78I5R0hICi_exl*3FFCluYul;;oiF8lGj<J5Il}ghR-u?y3
z<F9$%VC>WOy2|{_1bA?;y|Gf7nVJwj){D78n-DgruPe_KCxqe+o_PC!v0LpI;0W&~
zgp7R#8_4hmJ+PC)%p at TfcGpx{l$j<Bm~P-bH at -z`l~5LOnR}RQFc%NQwe^6K;hC*1
zYj=HKdB|b!bl0Sb=920-IsYItdbF>&E$%$G#3{F}KdUX|Jgd|puct0g5t8q<cU!`P
z#^Y7HrM_9r at UMC+KTbK%FWvUuz5epHckBJiT?>XU6jp>E=A|Pc_n}{`jGyHYexpa)
z8eg})+@<jDr)8b~)ow)&xoZn0GFk!wOY2R)d&>@SU~bv!vW at t_*D0~j*k2Ra54<44
zGAfly!Ey@=__b^`E!H<{G6I~Qyq_vSIUEo8>&bR^_h7rT+37SJ;+lkrg)CPdfsBl_
zWH#Fk4)pWSFMfRe8oL4#@;p7Xw*UV4*B^9knBz8EYbuTQKj>!%PuOhxmoH!ZTkE^h
zQ5Oxs>k&9eQFX%rmay^oy5hs-a5%Vu>&0fVaLp_>UjzM_W;28hf+9#18ifR+fk=_!
zRP~t;8=70^D?l_Y4@^?%D4kD#N=KYgXTG!89<@iD&}cN8AN at 2MNkkL*iQ-5!5{X9z
zsDLkcDnNFjyZF1r0cZdsL}!9fUpK7I#3T~UL`ACe&W|yWIG_$w4u}it!gmqJpfOW1
zND`XFPZ9^AK~q6UC>qKS6>Cp|ZjKM7g?`0zZ0#0(s2<Qwp34-SuNH%<p}&`<+SbE0
zDLDsY&OV6}iP8cHkV|6$VCI-NBuaA-AS)ySBmyJ?BmyJ?Bmx^4fh~e9h#UPK!8=F_
zeWze25<#~i1f=CRT_1X+n-jPGrj_%@*hGlg#@N88kes at S2)vvpCU&q=?$dOIMY}iF
zZ_$ocmxDOFP&NDv09aP2x`v<WmwZ28Utjp7n}x1U4F>1q!}Wsktx^q!Hyz)q)K=GO
zoF7djK!C#!ycz%kffr-~xxvJNR46t~SlLJq1Z=jeD_c)mpnblT&CYJ-0FjUaUY!7-
z#TubR1_QvgL4XK|Xt`DhpfahOvtem(k8e884~Vp^8wB1A+A^rrLvRNI?k-blHXlQ|
z28Ed52$bd6#2N6zwQKmBg-UNPPtI?dv^#g&y*lmgoH%t~Mt1I at LRDi+Ye!f2&4Iz;
zk<l+6fAh at r13LS7rd_$N8E=5^gNo_3#7-!_2P%%PC3Zpa{ZFx=me>I`9mEA&tbcUZ
z%raPCff}=CoSdFh&~W)`kLJ$!*9+<E3zgZ~FkUkdSJaj7DrSJ#*RhBg74ya7SP=X=
z7!jc&zDOKww)^YZQBBbt1&#<xj}ycp$@Cq99Y{Dm^9uGezYpSjjwsj4Esm+2`@lsx
z_pP233MAZDG~x_!W*4x)IQLBJ8XOwPV6wwG_mF at _V5M8~BrC?bzpXnCrvEDEUf+49
zzBuO|MP{6#qUF9 at TUl7rX4vll48Jjsia$KVkvGV>*BuD^e+C^f1J|FyU;r!;;^^oI
zutbQ7^|zo9O_y4-fz<*{BN<(cKQSIMS&pfWHI9R`Q7+)GZ~m87zSOtRt#@=xPIh$J
z+RmlJ%=Iy)wjsB2$w?ctL{=e6#)NGiAEXw5z3>BC;Y0;D{!GEsIar?io&qX3RM0m-
z1^qu!!LtzyFeRb^yHOg52(ttT)56l)JRy+1kO+_nY&ZmFIrD}%_y76l- at pIvyT3qG
z!a_rK!Uv_0b8llsqdtHB4`|cp+)q8%a_-ajrKM^)`>$U7G-ZAsz9G)NzdxUkC2X$&
zduq<ccO90m`EJJ_!n5Hnfmt*|3ykF4Yws{0%-(2jK-HM%C%SBVt&T&cMQg=#Z0+ju
z?J<3slzUHc2KJzP^x51yjM<u at zZYHGw?pGC>M~`z#Q)p7<L&AyWsXERen)*-SuBYY
zdX5iix>ZV<MCgkBpV)(k-dq41G^-WL{SyA<pyrb5ge*-W)C{Y;WHL#z(0BZEb(2yq
zi59Z32BQ<+-T-%#DbtndllL?oDuryXWT)ny>awgPK2|7z4Vsn5hz4U5-aIh*Kyy`9
z2K#+`d{Fa=s!Ar2h&1D>cG=1J-CQSpgrl-7ZAjx2Fr>-5ns)VRm0Y%a{Fdgrx(+r@
z*4$UM$;#s6xh~@)>W}b{+^~=yKH~BKoNA}$qFSNKg(0ccXH~^YiRPBNQznm(68cZx
z*IZXs$_ at yfwGDV)*c_VFr&I;XWO(qZszR13 at rQx5DHW0=A#d`I=8CFBmJ-jw8hkOq
zgDBk|Z&R15a+I-?Bk*9UGFz4i!@LHuj1;2qXotF778Ab}Z}1q-!4z4Am-=K##+*PB
zB@(3t5LgdOV}YrW<_(KL>(KEV5iNeTE at js=e`t at r=v}q-_{qz0XL!ZV`L=NnyANLo
zQ+gcPBDpqn@<w#Cf31sRXs|$?cxn3|T~1u=N^b}}#gf at 2f7N@eDYC{>zBNZRxW7|)
z$*qbmtL at F{5S&95^!$;V#g`*L;FZw#KkAb<N7Q&6bIPge-+$Gw*17EWd3}TBpF}or
ztF{!X+LO-)o at 5?)YxmvW{H9&itfS1VFYhY*Qrf*wJIXb;6xT!R*k$yCb!{o<g3FvF
zw(+<74}K*4z)jA~>Cs3#V=uB4NN#U`sakZFU2HEI?ks7Dsq&ROrak#AvEH|GYk~cN
z-oYbXaZQ|4jDps_<5wf<yeb%ZH`=7N;R>H44oN*XPh1H-<59xMxzd~07FF+FO3!KO
zkzNs<^C)%5zR+;s{a_h8iyk at DSK5($fm`l$c*8Cna^fTc>i~h}zJUY22WwUg;4xU6
zE40Voz~Sl1fxqzW8!QiZceZ;vST%3pn9qkNDEBsI+pnKL20^*sWVSI3z)zY;1PmfD
zk8=M~&&^oEhq?Xq!q{llMLGBQ>t)~ra4xR!eZAQ1X^ph;*FG+*f4xJlJ!C>*eEV+r
z#z~GXOppZ=2|4(iyLmNON}QN2ao#+YHqDy{lvv2w_X*(?ul{+G5$Yp=apGx^6Q9v~
z^YKb>;`PTfcYPtQJz at VX`S#e at B<CLA>so3?a_*Ok9NBKwB4Es(@j^U%UHht?;4%Xv
NIrrxNmNc!u{{!hMI2Hf^

literal 0
HcmV?d00001

-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at david-bauer.net  Tue Dec 17 06:52:04 2019
From: mail at david-bauer.net (David Bauer)
Date: Tue, 17 Dec 2019 12:52:04 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] ipq40xx: add support for Aruba AP-303
In-Reply-To: <20191217115204.9422-1-mail@david-bauer.net>
References: <20191217115204.9422-1-mail@david-bauer.net>
Message-ID: <20191217115204.9422-2-mail@david-bauer.net>

Hardware
--------

SoC:   Qualcomm IPQ4029
RAM:   512M DDR3
FLASH: - 128MB NAND (Macronix MX30LF1G18AC)
       - 4MB SPI-NOR (Macronix MX25R3235F)
TPM:   Atmel AT97SC3203
BLE:   Texas Instruments CC2540T
       attached to ttyMSM0
ETH:   Atheros AR8035
LED:   WiFi (amber / green)
       System (red / green)
BTN:   Reset

To connect to the serial console, you can solder to the labled pads next
to the USB port or use your Aruba supplied UARt adapter.

Do NOT plug a standard USB cable int the Console labled USB-port!
Aruba/HPE simply put UART on the micro-USB pins. You can solder yourself
an adapter cable:

VCC - NC
 D+ - TX
 D- - RX
GND - GND

The console setting in bootloader and OS is 9600 8N1. Voltage level is
3.3V.

To enable a full list of commands in the U-Boot "help" command, execute
the literal "diag" command.

Installation
------------

1. Put the OpenWrt initramfs image. Rename it to ipq40xx.ari and put it
   into the TFTP  server root directory. Configure the TFTP server to
   be reachable at 192.168.1.75/24. Connect the machine running the TFTP
   server to the ethernet port of the access point.

2. Connect to the serial console. Interrupt autobooting by pressing
   Enter when prompted.

3. Configure the bootargs and bootcmd for OpenWrt.
   $ setenv bootargs_openwrt "setenv bootargs console=ttyMSM1,9600n8"
   $ setenv nandboot_openwrt "run bootargs_openwrt; ubi part aos1;
     ubi read 0x85000000 kernel; bootm 0x85000000"
   $ setenv ramboot_openwrt "run bootargs_openwrt;
     setenv ipaddr 192.168.1.105; setenv serverip 192.168.1.75;
     netget; set fdt_high 0x87000000; bootm"
   $ setenv bootcmd "run nandboot_openwrt"
   $ saveenv

4. Load OpenWrt into RAM:
   $ run ramboot_openwrt

5. After OpenWrt booted, transfer the OpenWrt sysupgrade image to the
   /tmp folder on the device.

6. Flash OpenWrt:
   $ ubidetach -p /dev/mtd1
   $ ubiformat /dev/mtd1
   $ sysupgrade -n /tmp/openwrt-sysupgrade.bin

To go back to the stock firmware, simply reset the bootcmd in the
bootloader to the original value:

  $ setenv bootcmd "boot"
  $ saveenv

Signed-off-by: David Bauer <mail at david-bauer.net>
---
 .../ipq40xx/base-files/etc/board.d/02_network |   1 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata  |   8 +
 target/linux/ipq40xx/base-files/etc/inittab   |   1 +
 .../preinit/06_set_preinit_iface_ipq40xx.sh   |   1 +
 .../base-files/lib/upgrade/platform.sh        |   1 +
 .../arch/arm/boot/dts/qcom-ipq4029-ap-303.dts | 420 ++++++++++++++++++
 target/linux/ipq40xx/image/Makefile           |  10 +
 ...d-spi-nor-Add-support-for-mx25r3235f.patch |  26 ++
 .../901-arm-boot-add-dts-files.patch          |   3 +-
 9 files changed, 470 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts
 create mode 100644 target/linux/ipq40xx/patches-4.19/304-mtd-spi-nor-Add-support-for-mx25r3235f.patch

diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index 122c1a103d..dcf684f511 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -40,6 +40,7 @@ ipq40xx_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0u at eth0" "1:lan" "2:lan" "3:lan" "4:lan"
 		;;
+	aruba,ap-303|\
 	avm,fritzrepeater-1200|\
 	engenius,eap1300|\
 	meraki,mr33|\
diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 3d46519415..8b6abc4ff7 100644
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -51,6 +51,10 @@ case "$FIRMWARE" in
 	qcom,ap-dk01.1-c1)
 		caldata_extract "ART" 0x1000 0x2f20
 		;;
+	aruba,ap-303)
+		caldata_extract "ART" 0x1000 0x2f20
+		ath10k_patch_mac $(mtd_get_mac_binary mfginfo 0x1D)
+		;;
 	asus,map-ac2200)
 		caldata_extract_ubi "Factory" 0x1000 0x2f20
 		;;
@@ -116,6 +120,10 @@ case "$FIRMWARE" in
 	qcom,ap-dk01.1-c1)
 		caldata_extract "ART" 0x5000 0x2f20
 		;;
+	aruba,ap-303)
+		caldata_extract "ART" 0x5000 0x2f20
+		ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mfginfo 0x1D) +1)
+		;;
 	asus,map-ac2200)
 		caldata_extract_ubi "Factory" 0x5000 0x2f20
 		;;
diff --git a/target/linux/ipq40xx/base-files/etc/inittab b/target/linux/ipq40xx/base-files/etc/inittab
index 809bba5e5f..3181021a05 100644
--- a/target/linux/ipq40xx/base-files/etc/inittab
+++ b/target/linux/ipq40xx/base-files/etc/inittab
@@ -2,3 +2,4 @@
 ::sysinit:/etc/init.d/rcS S boot
 ::shutdown:/etc/init.d/rcS K shutdown
 ttyMSM0::askfirst:/usr/libexec/login.sh
+ttyMSM1::askfirst:/usr/libexec/login.sh
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
index be4b6322cb..a0dec1042a 100644
--- a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
+++ b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
@@ -4,6 +4,7 @@ set_preinit_iface() {
 	. /lib/functions.sh
 
 	case $(board_name) in
+	aruba,ap-303| \
 	asus,rt-ac58u| \
 	avm,fritzbox-4040| \
 	glinet,gl-b1300| \
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index 41f8fcfccb..60070fa9e3 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -47,6 +47,7 @@ zyxel_do_upgrade() {
 platform_do_upgrade() {
 	case "$(board_name)" in
 	8dev,jalapeno |\
+	aruba,ap-303 |\
 	avm,fritzbox-7530 |\
 	avm,fritzrepeater-1200 |\
 	avm,fritzrepeater-3000 |\
diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts
new file mode 100644
index 0000000000..fad4a38a4b
--- /dev/null
+++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts
@@ -0,0 +1,420 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+
+#include "qcom-ipq4019.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/soc/qcom,tcsr.h>
+
+/ {
+	model = "Aruba AP-303";
+	compatible = "aruba,ap-303";
+
+	aliases {
+		led-boot = &led_system_green;
+		led-failsafe = &led_system_red;
+		led-running = &led_system_green;
+		led-upgrade = &led_system_red;
+		label-mac-device = &gmac0;
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>;
+	};
+
+	soc {
+		rng at 22000 {
+			status = "okay";
+		};
+
+		mdio at 90000 {
+			status = "okay";
+			pinctrl-0 = <&mdio_pins>;
+			pinctrl-names = "default";
+
+			/delete-node/ ethernet-phy at 0;
+			/delete-node/ ethernet-phy at 2;
+			/delete-node/ ethernet-phy at 3;
+			/delete-node/ ethernet-phy at 4;
+
+			ethernet-phy at 5 {
+				reg = <0x5>;
+			};
+		};
+
+		counter at 4a1000 {
+			compatible = "qcom,qca-gcnt";
+			reg = <0x4a1000 0x4>;
+		};
+
+		ess_tcsr at 1953000 {
+			compatible = "qcom,tcsr";
+			reg = <0x1953000 0x1000>;
+			qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII5>;
+		};
+
+		tcsr at 1949000 {
+			compatible = "qcom,tcsr";
+			reg = <0x1949000 0x100>;
+			qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
+		};
+
+		tcsr at 1957000 {
+			compatible = "qcom,tcsr";
+			reg = <0x1957000 0x100>;
+			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
+		};
+
+		crypto at 8e3a000 {
+			status = "okay";
+		};
+
+		watchdog at b017000 {
+			status = "okay";
+		};
+
+		ess-switch at c000000 {
+			switch_mac_mode = <0x3>; /* mac mode for RGMII RMII */
+			switch_lan_bmp = <0x0>; /* lan port bitmap */
+			switch_wan_bmp = <0x10>; /* wan port bitmap */
+		};
+
+		edma at c080000 {
+			qcom,single-phy;
+			qcom,num_gmac = <1>;
+			phy-mode = "rgmii-id";
+			status = "okay";
+		};
+
+		i2c_0: i2c at 78b7000 {
+			pinctrl-0 = <&i2c_0_pins>;
+			pinctrl-names = "default";
+			status = "ok";
+
+			tpm at 29 {
+				/* No Driver */
+				compatible = "atmel,at97sc3203";
+				reg = <0x29>;
+				read-only;
+			};
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		wifi_green {
+			label = "ap-303:green:wifi";
+			gpios = <&tlmm 39 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		wifi_amber {
+			label = "ap-303:amber:wifi";
+			gpios = <&tlmm 40 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "phy1tpt";
+		};
+
+		led_system_red: system_red {
+			label = "ap-303:red:system";
+			gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
+		};
+
+		led_system_green: system_green {
+			label = "ap-303:green:system";
+			gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "Reset button";
+			gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+};
+
+&blsp_dma {
+	status = "okay";
+};
+
+&blsp1_uart1 {
+	/* Texas Instruments CC2540T BLE radio */
+	pinctrl-0 = <&serial_0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&blsp1_uart2 {
+	pinctrl-0 = <&serial_1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&cryptobam {
+	status = "okay";
+};
+
+&gmac0 {
+	qcom,phy_mdio_addr = <5>;
+	qcom,poll_required = <1>;
+	vlan_tag = <0 0x20>;
+};
+
+&qpic_bam {
+	status = "okay";
+};
+
+&tlmm {
+	/*
+	 * In addition to the Pins listed below,
+	 * the following GPIOs have "features":
+	 * 54 - out - active low to force HW reset
+	 * 41 - out - active low to reset TPM
+	 * 43 - out - active low to reset BLE radio
+	 * 19 - in  - active high when DC powered
+	 */
+	mdio_pins: mdio_pinmux {
+		mux_1 {
+			pins = "gpio6";
+			function = "mdio";
+			bias-pull-up;
+		};
+		mux_2 {
+			pins = "gpio7";
+			function = "mdc";
+			bias-pull-up;
+		};
+	};
+
+	nand_pins: nand_pins {
+		pullups {
+			pins = "gpio53", "gpio58", "gpio59";
+			function = "qpic";
+			bias-pull-up;
+		};
+
+		pulldowns {
+			pins = "gpio54", "gpio55", "gpio56",
+				"gpio57", "gpio60", "gpio61",
+				"gpio62", "gpio63", "gpio64",
+				"gpio65", "gpio66", "gpio67",
+				"gpio68", "gpio69";
+			function = "qpic";
+			bias-pull-down;
+		};
+	};
+
+	spi_0_pins: spi_0_pinmux {
+		pin {
+			function = "blsp_spi0";
+			pins = "gpio13", "gpio14", "gpio15";
+			drive-strength = <12>;
+			bias-disable;
+		};
+		pin_cs {
+			function = "gpio";
+			pins = "gpio12";
+			drive-strength = <2>;
+			bias-disable;
+			output-high;
+		};
+	};
+	i2c_0_pins: i2c_0_pinmux {
+		mux {
+			pins = "gpio10", "gpio11";
+			function = "blsp_i2c0";
+			drive-strength = <4>;
+			bias-disable;
+		};
+	};
+
+	serial_0_pins: serial_0_pinmux {
+		mux {
+			pins = "gpio16", "gpio17";
+			function = "blsp_uart0";
+			bias-disable;
+		};
+	};
+
+	serial_1_pins: serial_1_pinmux {
+		mux {
+			pins = "gpio8", "gpio9";
+			function = "blsp_uart1";
+			bias-disable;
+		};
+	};
+
+	phy-reset {
+		line-name = "PHY-reset";
+		gpios = <42 GPIO_ACTIVE_HIGH>;
+		gpio-hog;
+		output-high;
+	};
+};
+
+&nand {
+	pinctrl-0 = <&nand_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	nand at 0 {
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				/* 'aos0' in Aruba firmware */
+				label = "aos0";
+				reg = <0x0 0x2000000>;
+				read-only;
+			};
+
+			partition at 2000000 {
+				/* 'aos1' in AVM firmware */
+				label = "ubi";
+				reg = <0x2000000 0x2000000>;
+			};
+
+			partition at 4000000 {
+				label = "aruba-ubifs";
+				reg = <0x4000000 0x4000000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&blsp1_spi1 {
+	pinctrl-0 = <&spi_0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+	cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <24000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			/*
+			 * There is no partition map for the NOR flash
+			 * in the stock firmware.
+			 *
+			 * All partitions here are based on offsets
+			 * found in the U-Boot GPL code and information
+			 * from smem.
+			 */
+
+			partition at 0 {
+				label = "sbl1";
+				reg = <0x0 0x40000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "mibib";
+				reg = <0x40000 0x20000>;
+				read-only;
+			};
+
+			partition at 60000 {
+				label = "qsee";
+				reg = <0x60000 0x60000>;
+				read-only;
+			};
+
+			partition at c0000 {
+				label = "cdt";
+				reg = <0xc0000 0x10000>;
+				read-only;
+			};
+
+			partition at d0000 {
+				label = "ddrparams";
+				reg = <0xd0000 0x10000>;
+				read-only;
+			};
+
+			partition at e0000 {
+				label = "ART";
+				reg = <0xe0000 0x10000>;
+				read-only;
+			};
+
+			partition at f0000 {
+				label = "appsbl";
+				reg = <0xf0000 0xf0000>;
+				read-only;
+			};
+
+			partition at 1e0000 {
+				label = "mfginfo";
+				reg = <0x1e0000 0x10000>;
+				read-only;
+			};
+
+			partition at 1f0000 {
+				label = "apcd";
+				reg = <0x1f0000 0x10000>;
+				read-only;
+			};
+
+			partition at 200000 {
+				label = "osss";
+				reg = <0x200000 0x180000>;
+				read-only;
+			};
+
+			partition at 380000 {
+				/* This is empty */
+				label = "appsblenv";
+				reg = <0x380000 0x10000>;
+				read-only;
+			};
+
+			partition at 390000 {
+				label = "pds";
+				reg = <0x390000 0x10000>;
+				read-only;
+			};
+
+			partition at 3a0000 {
+				label = "fcache";
+				reg = <0x3a0000 0x10000>;
+				read-only;
+			};
+
+			partition at 3b0000 {
+				/* Called osss1 in smem */
+				label = "u-boot-env-bak";
+				reg = <0x3b0000 0x10000>;
+				read-only;
+			};
+
+			partition at 3f0000 {
+				label = "u-boot-env";
+				reg = <0x3f0000 0x10000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&wifi0 {
+	status = "okay";
+	qcom,ath10k-calibration-variant = "Aruba-AP-303";
+};
+
+&wifi1 {
+	status = "okay";
+	qcom,ath10k-calibration-variant = "Aruba-AP-303";
+};
diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
index ac34447475..fada35a49d 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -91,6 +91,16 @@ define Device/alfa-network_ap120c-ac
 endef
 TARGET_DEVICES += alfa-network_ap120c-ac
 
+define Device/aruba_ap-303
+	$(call Device/FitImageLzma)
+	DEVICE_VENDOR := Aruba
+	DEVICE_MODEL := AP-303
+	DEVICE_DTS := qcom-ipq4029-ap-303
+	DEVICE_PACKAGES := ipq-wifi-aruba_ap-303
+	IMAGES := sysupgrade.bin
+endef
+TARGET_DEVICES += aruba_ap-303
+
 define Device/asus_map-ac2200
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := ASUS
diff --git a/target/linux/ipq40xx/patches-4.19/304-mtd-spi-nor-Add-support-for-mx25r3235f.patch b/target/linux/ipq40xx/patches-4.19/304-mtd-spi-nor-Add-support-for-mx25r3235f.patch
new file mode 100644
index 0000000000..7dee12fedd
--- /dev/null
+++ b/target/linux/ipq40xx/patches-4.19/304-mtd-spi-nor-Add-support-for-mx25r3235f.patch
@@ -0,0 +1,26 @@
+From 158acdbf0336f601971637f988b57a6a67a0869b Mon Sep 17 00:00:00 2001
+From: David Bauer <mail at david-bauer.net>
+Date: Sun, 15 Dec 2019 13:10:50 +0100
+Subject: [PATCH] mtd: spi-nor: Add support for mx25r3235f
+
+Add MTD support for the Macronix MX25R3235F SPI NOR chip from Macronix.
+The chip has 4MB of total capacity, divided into a total of 64 sectors,
+each 64KB sized. The chip also supports 4KB large sectors.
+Additionally, it supports dual and quad read modes.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+---
+ drivers/mtd/spi-nor/spi-nor.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -1091,6 +1091,8 @@ static const struct flash_info spi_nor_i
+ 	{ "mx25u6435f",  INFO(0xc22537, 0, 64 * 1024, 128, SECT_4K) },
+ 	{ "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) },
+ 	{ "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) },
++	{ "mx25r3235f",  INFO(0xc22816, 0, 64 * 1024,  64,
++			 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+ 	{ "mx25u12835f", INFO(0xc22538, 0, 64 * 1024, 256,
+ 			 SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+ 	{ "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
diff --git a/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch
index 93214e60e9..52484b3dd3 100644
--- a/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch
+++ b/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/arch/arm/boot/dts/Makefile
 +++ b/arch/arm/boot/dts/Makefile
-@@ -785,11 +785,37 @@ dtb-$(CONFIG_ARCH_QCOM) += \
+@@ -785,11 +785,38 @@ dtb-$(CONFIG_ARCH_QCOM) += \
  	qcom-apq8074-dragonboard.dtb \
  	qcom-apq8084-ifc6540.dtb \
  	qcom-apq8084-mtp.dtb \
@@ -43,6 +43,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 +	qcom-ipq4019-unielec-u4019-32m.dtb \
 +	qcom-ipq4019-wpj419.dtb \
 +	qcom-ipq4028-wpj428.dtb \
++	qcom-ipq4029-ap-303.dtb \
 +	qcom-ipq4029-gl-b1300.dtb \
 +	qcom-ipq4029-mr33.dtb \
  	qcom-ipq8064-ap148.dtb \
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From gururug at gmail.com  Tue Dec 17 08:59:28 2019
From: gururug at gmail.com (Imran K)
Date: Tue, 17 Dec 2019 05:59:28 -0800
Subject: [OpenWrt-Devel] [PATCH] uboot-env-tools be safer
Message-ID: <CAA21KT99Eevnj=1eqyT7YbvHYhRp6G+sxd-gEmjpJ=f23UGUmQ@mail.gmail.com>

uboot-env-tools: Check for config prior to append

In the rare event a pre-populated fw_env.config exists in the rootfs prior
to firstboot, calling fw_setenv after the system has initialised will
annihilate the devices environment due to two identical lines in
fw_env.config.

Check for existence prior to blind appendage.

--- a/uboot-envtools.sh
+++ b/uboot-envtools.sh
@@ -31,6 +31,6 @@ ubootenv_add_app_config() {
  config_get envsize "$1" envsize
  config_get secsize "$1" secsize
  config_get numsec "$1" numsec
- echo "$dev $offset $envsize $secsize $numsec" >>/etc/fw_env.config
+ grep -q "$dev $offset $envsize $secsize $numsec" /etc/fw_env.config ||
echo "$dev $offset $envsize $secsize $numsec" >>/etc/fw_env.config
 }

Signed-off-by: Imran Khan <gururug at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191217/7f329ade/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Tue Dec 17 17:05:24 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Wed, 18 Dec 2019 01:05:24 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?0PPx8ero6SDY4O3x7u0gLSDy7uv86u4g8eDs?=
	=?cp1251?b?++Ug6/P3+OjlIO/l8e3oIOgg6Ofi5fHy7fvlIPjg7fHu7fzlIOIg?=
	=?cp1251?b?7vLr6Pft7uwg6uD35fHy4uUuIDA1XzA4XzIwMTkgMDJfMTAgMTk5?=
	=?cp1251?q?508?=
Message-ID: <mailman.19004.1576620497.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ??????? ?????? - ?????? ????? ?????? ????? ? ????????? ???????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Wed, 18 Dec 2019 01:05:24 +0300
Size: 125082
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191218/ff92d32d/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Wed Dec 18 03:02:48 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Wed, 18 Dec 2019 11:02:48 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?wcDLxdIgLSDR4Oz75SDr8/f46OUg7+7x8uDt?=
	=?cp1251?b?7uLq6CDiIO7y6+j37e7sIOrg9+Xx8uLlLiAwNV8wOF8yMDE5IDAy?=
	=?cp1251?q?=5F10_199508?=
Message-ID: <mailman.19065.1576656352.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ????? - ????? ?????? ?????????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Wed, 18 Dec 2019 11:02:48 +0300
Size: 175419
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191218/b8497c07/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From alin.nastac at gmail.com  Wed Dec 18 05:44:50 2019
From: alin.nastac at gmail.com (Alin Nastac)
Date: Wed, 18 Dec 2019 11:44:50 +0100
Subject: [OpenWrt-Devel] [PATCH] interface: add IPv6 addresses without
 IFA_F_NOPREFIXROUTE
Message-ID: <1576665890-5819-1-git-send-email-alin.nastac@gmail.com>

When netifd manages the prefix route directly, it will remove it
the moment prefix gets deprecated. This will make it impossible
for the target to send ICMPv6 errors back to LAN devices still
using the deprecated prefix, thus breaking the L-14 requirement
of RFC 7084.

Signed-off-by: Alin Nastac <alin.nastac at gmail.com>
---
 interface-ip.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/interface-ip.c b/interface-ip.c
index c159e09..0958fcb 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -905,20 +905,14 @@ interface_set_prefix_address(struct device_prefix_assignment *assignment,
 	struct device *l3_downlink = iface->l3_dev.dev;
 
 	struct device_addr addr;
-	struct device_route route;
 	memset(&addr, 0, sizeof(addr));
-	memset(&route, 0, sizeof(route));
 
 	addr.addr.in6 = assignment->addr;
 	addr.mask = assignment->length;
-	addr.flags = DEVADDR_INET6 | DEVADDR_OFFLINK;
+	addr.flags = DEVADDR_INET6;
 	addr.preferred_until = prefix->preferred_until;
 	addr.valid_until = prefix->valid_until;
 
-	route.flags = DEVADDR_INET6;
-	route.mask = addr.mask < 64 ? 64 : addr.mask;
-	route.addr = addr.addr;
-
 	if (!add && assignment->enabled) {
 		time_t now = system_get_rtime();
 
@@ -939,10 +933,6 @@ interface_set_prefix_address(struct device_prefix_assignment *assignment,
 							addr.mask, 0, iface, "unreachable", true);
 		}
 
-		clear_if_addr(&route.addr, route.mask);
-		interface_set_route_info(iface, &route);
-
-		system_del_route(l3_downlink, &route);
 		system_add_address(l3_downlink, &addr);
 
 		assignment->addr = in6addr_any;
@@ -955,7 +945,6 @@ interface_set_prefix_address(struct device_prefix_assignment *assignment,
 				return;
 
 			assignment->addr = addr.addr.in6;
-			route.addr = addr.addr;
 		}
 
 		if (system_add_address(l3_downlink, &addr))
@@ -976,11 +965,6 @@ interface_set_prefix_address(struct device_prefix_assignment *assignment,
 			}
 		}
 
-		clear_if_addr(&route.addr, route.mask);
-		interface_set_route_info(iface, &route);
-
-		system_add_route(l3_downlink, &route);
-
 		if (uplink && uplink->l3_dev.dev && !(l3_downlink->settings.flags & DEV_OPT_MTU6)) {
 			int mtu = system_update_ipv6_mtu(uplink->l3_dev.dev, 0);
 			int mtu_old = system_update_ipv6_mtu(l3_downlink, 0);
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From pali.rohar at gmail.com  Wed Dec 18 06:44:32 2019
From: pali.rohar at gmail.com (Pali =?utf-8?B?Um9ow6Fy?=)
Date: Wed, 18 Dec 2019 12:44:32 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 2/3] libblkid: vfat: Fix reading
 labels which starts with byte 0x05
In-Reply-To: <20191217072836.11411-3-zajec5@gmail.com>
References: <20191217072836.11411-1-zajec5@gmail.com>
 <20191217072836.11411-3-zajec5@gmail.com>
Message-ID: <20191218114432.rasbfboex2z2xsj5@pali>

On Tuesday 17 December 2019 08:28:35 Rafa? Mi?ecki wrote:
> From: Pali Roh?r <pali.rohar at gmail.com>
> 
> commit e526f503918cc29d8b1ccf36a5c3a34645d2be6e upstream.
> 
> When FAT directory entry has leading byte 0x05 it is interpreted as byte
> 0xE5. This is how FAT stores file name which starts with byte 0xE5 as
> leading byte in 0xE5 in FAT directory entry means that file slot is empty.
> 
> Fixes: #533
> ---
>  libblkid-tiny/vfat.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libblkid-tiny/vfat.c b/libblkid-tiny/vfat.c
> index 49b865a..93e4053 100644
> --- a/libblkid-tiny/vfat.c
> +++ b/libblkid-tiny/vfat.c
> @@ -167,6 +167,8 @@ static unsigned char *search_fat_label(blkid_probe pr,
>  		if ((ent->attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) ==
>  		    FAT_ATTR_VOLUME_ID) {
>  			DBG(LOWPROBE, ul_debug("\tfound fs LABEL at entry %d", i));
> +			if (ent->name[0] == 0x05)
> +				ent->name[0] = 0xE5;
>  			return ent->name;
>  		}
>  	}

Yes, this is my patch for util-linux project which was included in
upstream two years ago... It was part of my initiative to fix handling
of FAT labels in different Linux software, see for more details:
https://www.spinics.net/lists/kernel/msg2640891.html

Do you need some help with FAT labels?

-- 
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191218/92c9426a/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Wed Dec 18 11:39:42 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Wed, 18 Dec 2019 19:39:42 +0300
Subject: [OpenWrt-Devel] [PATCH] ubox: print an error when no kernel module
 dir can be found
Message-ID: <20191218163942.32696-1-fercerpav@gmail.com>

Do not just silently fail when kernel modules are nowhere to be
found. This is essential for diagnosing mismatched kernel version
failures.

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
 kmodloader.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kmodloader.c b/kmodloader.c
index 07b6700..b4facb4 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -108,8 +108,10 @@ static int init_module_folders(void)
 		s = p + 1;
 	}
 
-	if (!module_folders)
+	if (!module_folders) {
+		ULOG_ERR("no module folders for kernel version %s found\n", ver.release);
 		return -1;
+	}
 
 	module_folders[n] = NULL;
 	return 0;
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From Xianjun.Jiao at UGent.be  Wed Dec 18 17:09:27 2019
From: Xianjun.Jiao at UGent.be (Xianjun Jiao (UGent-imec))
Date: Wed, 18 Dec 2019 22:09:27 +0000
Subject: [OpenWrt-Devel] =?utf-8?q?openwifi=3A_Open_source_Wi-Fi_?=
 =?utf-8?q?=E2=80=9Cchip=E2=80=9D_on_zynq_FPGA_with_Linux_mac80211_on_ARM?=
Message-ID: <58B9F79D-3B9A-4CAE-BD8A-D1EBF0E9BCD8@UGent.be>

Dear openwrt friends,


A message may interest you. Our openwifi project is online:

https://github.com/open-sdr/openwifi


Full stack real time SDR (Software Defined Radio) Wi-Fi implementation on zynq FPGA with embedded ARM Linux. Compatible with Linux mac80211 SoftMAC framework.


hostapd, wpa_supplicant and other native Linux Wi-Fi tools already work out of the box!


But for openwrt, I have too little experience, only know that it is also a kind of embedded Linux.


Is openwrt above the mac80211 subsystem?


How much effort do you think we need to run openwrt on the openwifi design?


If someone would like to work on this porting, we will definitely help!


Thanks for your time, and have fun!

Best regards,
--
Xianjun Jiao
Senior researcher, imec-Gent university
210.007, IDLab, iGent, Technologiepark 126, 9052, Ghent, Belgium
Mobile: +32 484 57 22 32<tel:+32%20484%2057%2022%2032>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191218/9c3f53bd/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hauke at hauke-m.de  Wed Dec 18 17:36:41 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Wed, 18 Dec 2019 23:36:41 +0100
Subject: [OpenWrt-Devel] =?utf-8?q?openwifi=3A_Open_source_Wi-Fi_?=
 =?utf-8?q?=E2=80=9Cchip=E2=80=9D_on_zynq_FPGA_with_Linux_mac80211_on_ARM?=
In-Reply-To: <58B9F79D-3B9A-4CAE-BD8A-D1EBF0E9BCD8@UGent.be>
References: <58B9F79D-3B9A-4CAE-BD8A-D1EBF0E9BCD8@UGent.be>
Message-ID: <12b45477-cc74-f344-3b5f-5552b62d03cf@hauke-m.de>

On 12/18/19 11:09 PM, Xianjun Jiao (UGent-imec) wrote:
> Dear openwrt friends,
> 
> 
> A message may interest you. Our openwifi project is online:
> 
> https://github.com/open-sdr/openwifi
> 
> 
> Full stack real time SDR (Software Defined Radio) Wi-Fi implementation
> on zynq FPGA with embedded ARM Linux. Compatible with Linux mac80211
> SoftMAC framework.
> 
> 
> hostapd, wpa_supplicant and other native Linux Wi-Fi tools already work
> out of the box!
> 
> 
> But for openwrt, I have too little experience, only know that it is also
> a kind of embedded Linux.?
> 
> 
> Is openwrt above the mac80211 subsystem?
> 
> 
> How much effort do you think we need to run openwrt on the openwifi design?
> 
> 
> If someone would like to work on this porting, we will definitely help!


Hi,

Interesting project, I would like to see support for this in OpenWrt.

OpenWrt is a Linux distribution which also ships mac80211 and other
drivers and user space components.

The zynq target is already support in OpenWrt master, see here:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=tree;f=target/linux/zynq;h=d20f848fca5d6de2e3afd88fc208aa9747b8b101;hb=HEAD

You have to add support for you broad to the zynq target, see here for
an example of an other board:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=64f4c3ef357815e5d8c780a0d02924b9176db794

Then you would already get images for you board using kernel 4.19.

Then you have to add your wifi driver, you can use the integration of
the mwlwifi driver as an example:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/kernel/mwlwifi/Makefile;h=aa8eea0450a2e16a460c2f18af1fa6a3dcc07a0c;hb=HEAD
This builds against mac80211 from kernel 5.4 provided by backports.

Then you should add your other user space tools as normal OpenWrt packages.
You should list the basic packages you need in the DEVICE_PACKAGES
variable in the board definition in target/linux/zynq/image/Makefile to
create images with your wifi driver by default.

Hauke

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From Xianjun.Jiao at UGent.be  Wed Dec 18 17:41:31 2019
From: Xianjun.Jiao at UGent.be (Xianjun Jiao (UGent-imec))
Date: Wed, 18 Dec 2019 22:41:31 +0000
Subject: [OpenWrt-Devel] =?utf-8?q?openwifi=3A_Open_source_Wi-Fi_?=
 =?utf-8?q?=E2=80=9Cchip=E2=80=9D_on_zynq_FPGA_with_Linux_mac80211_on_ARM?=
In-Reply-To: <12b45477-cc74-f344-3b5f-5552b62d03cf@hauke-m.de>
References: <58B9F79D-3B9A-4CAE-BD8A-D1EBF0E9BCD8@UGent.be>,
 <12b45477-cc74-f344-3b5f-5552b62d03cf@hauke-m.de>
Message-ID: <92330104-A071-445C-AAC6-5A53DEEB9717@UGent.be>

Thanks so much for the quick response.

Sounds promising. I will definitely take a look on those steps.

Best regards,
--
Xianjun Jiao
Senior researcher, imec-Gent university
210.007, IDLab, iGent, Technologiepark 126, 9052, Ghent, Belgium
Mobile: +32 484 57 22 32<tel:+32%20484%2057%2022%2032>

On Dec 18, 2019, at 23:36, Hauke Mehrtens <hauke at hauke-m.de> wrote:

?On 12/18/19 11:09 PM, Xianjun Jiao (UGent-imec) wrote:
Dear openwrt friends,


A message may interest you. Our openwifi project is online:

https://github.com/open-sdr/openwifi


Full stack real time SDR (Software Defined Radio) Wi-Fi implementation
on zynq FPGA with embedded ARM Linux. Compatible with Linux mac80211
SoftMAC framework.


hostapd, wpa_supplicant and other native Linux Wi-Fi tools already work
out of the box!


But for openwrt, I have too little experience, only know that it is also
a kind of embedded Linux.


Is openwrt above the mac80211 subsystem?


How much effort do you think we need to run openwrt on the openwifi design?


If someone would like to work on this porting, we will definitely help!


Hi,

Interesting project, I would like to see support for this in OpenWrt.

OpenWrt is a Linux distribution which also ships mac80211 and other
drivers and user space components.

The zynq target is already support in OpenWrt master, see here:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=tree;f=target/linux/zynq;h=d20f848fca5d6de2e3afd88fc208aa9747b8b101;hb=HEAD

You have to add support for you broad to the zynq target, see here for
an example of an other board:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=64f4c3ef357815e5d8c780a0d02924b9176db794

Then you would already get images for you board using kernel 4.19.

Then you have to add your wifi driver, you can use the integration of
the mwlwifi driver as an example:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/kernel/mwlwifi/Makefile;h=aa8eea0450a2e16a460c2f18af1fa6a3dcc07a0c;hb=HEAD
This builds against mac80211 from kernel 5.4 provided by backports.

Then you should add your other user space tools as normal OpenWrt packages.
You should list the basic packages you need in the DEVICE_PACKAGES
variable in the board definition in target/linux/zynq/image/Makefile to
create images with your wifi driver by default.

Hauke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191218/6691d2ac/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Wed Dec 18 18:05:06 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Thu, 19 Dec 2019 02:05:06 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?xOjg9Ojr/Oz7IOTr/yDk5fLl6SDiIPbo9PDu?=
	=?cp1251?b?4u7sIPTu8Ozg8uUgLSDz7ejq4Ov87eD/IOru6+vl6vbo/yDiIO7y?=
	=?cp1251?b?6+j37e7sIOrg9+Xx8uLlLiAwNV8wOF8yMDE5IDAyXzEwIDE5OTUw?=
	=?cp1251?q?8?=
Message-ID: <mailman.19387.1576710485.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ????????? ??? ????? ? ???????? ??????? - ?????????? ????????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Thu, 19 Dec 2019 02:05:06 +0300
Size: 138355
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191219/fb9406eb/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Thu Dec 19 03:30:30 2019
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Thu, 19 Dec 2019 09:30:30 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 2/3] libblkid: vfat: Fix reading
 labels which starts with byte 0x05
In-Reply-To: <20191218114432.rasbfboex2z2xsj5@pali>
References: <20191217072836.11411-1-zajec5@gmail.com>
 <20191217072836.11411-3-zajec5@gmail.com>
 <20191218114432.rasbfboex2z2xsj5@pali>
Message-ID: <CACna6ryc_CF27aNCd0DCU0HPBhywbAfzirVtMjo1YTiGj9nr3A@mail.gmail.com>

On Wed, 18 Dec 2019 at 12:44, Pali Roh?r <pali.rohar at gmail.com> wrote:
>
> On Tuesday 17 December 2019 08:28:35 Rafa? Mi?ecki wrote:
> > From: Pali Roh?r <pali.rohar at gmail.com>
> >
> > commit e526f503918cc29d8b1ccf36a5c3a34645d2be6e upstream.
> >
> > When FAT directory entry has leading byte 0x05 it is interpreted as byte
> > 0xE5. This is how FAT stores file name which starts with byte 0xE5 as
> > leading byte in 0xE5 in FAT directory entry means that file slot is empty.
> >
> > Fixes: #533
> > ---
> >  libblkid-tiny/vfat.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/libblkid-tiny/vfat.c b/libblkid-tiny/vfat.c
> > index 49b865a..93e4053 100644
> > --- a/libblkid-tiny/vfat.c
> > +++ b/libblkid-tiny/vfat.c
> > @@ -167,6 +167,8 @@ static unsigned char *search_fat_label(blkid_probe pr,
> >               if ((ent->attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) ==
> >                   FAT_ATTR_VOLUME_ID) {
> >                       DBG(LOWPROBE, ul_debug("\tfound fs LABEL at entry %d", i));
> > +                     if (ent->name[0] == 0x05)
> > +                             ent->name[0] = 0xE5;
> >                       return ent->name;
> >               }
> >       }
>
> Yes, this is my patch for util-linux project which was included in
> upstream two years ago... It was part of my initiative to fix handling
> of FAT labels in different Linux software, see for more details:
> https://www.spinics.net/lists/kernel/msg2640891.html
>
> Do you need some help with FAT labels?

No help needed as everything works correctly, thank you!

As you can see vfat.c copy in OpenWrt's fstools project was quite
outdated. Porting your fixes makes it work for me perfectly!

--
Rafa?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Thu Dec 19 04:48:44 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Thu, 19 Dec 2019 12:48:44 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?yPHy7vDo/yDj7vHz5ODw8fLi4CDQ7vHx6Onx?=
	=?cp1251?b?6u7j7iCXIPPt6Org6/zt4P8g4ujk5e7q7uvr5er26P8g4iDu8uvo?=
	=?cp1251?b?9+3u7CDq4Pfl8fLi5S4gMDVfMDhfMjAxOSAwMl8xMCAxOTk1MDg=?=
Message-ID: <mailman.19450.1576749097.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ??????? ??????????? ??????????? ? ?????????? ?????????????? ? ???????? ????????. 05_08_2019 02_10 199508
Date: Thu, 19 Dec 2019 12:48:44 +0300
Size: 163530
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191219/2a636618/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From edgar at soldin.de  Thu Dec 19 04:52:30 2019
From: edgar at soldin.de (Edgar Soldin)
Date: Thu, 19 Dec 2019 10:52:30 +0100
Subject: [OpenWrt-Devel] test
Message-ID: <2bf3ffb2-c358-a5f0-8d13-6e9d3e0ca00e@soldin.de>


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From pali.rohar at gmail.com  Thu Dec 19 04:53:03 2019
From: pali.rohar at gmail.com (Pali =?utf-8?B?Um9ow6Fy?=)
Date: Thu, 19 Dec 2019 10:53:03 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 2/3] libblkid: vfat: Fix reading
 labels which starts with byte 0x05
In-Reply-To: <CACna6ryc_CF27aNCd0DCU0HPBhywbAfzirVtMjo1YTiGj9nr3A@mail.gmail.com>
References: <20191217072836.11411-1-zajec5@gmail.com>
 <20191217072836.11411-3-zajec5@gmail.com>
 <20191218114432.rasbfboex2z2xsj5@pali>
 <CACna6ryc_CF27aNCd0DCU0HPBhywbAfzirVtMjo1YTiGj9nr3A@mail.gmail.com>
Message-ID: <20191219095303.p2d2e26hznmrtgvm@pali>

On Thursday 19 December 2019 09:30:30 Rafa? Mi?ecki wrote:
> On Wed, 18 Dec 2019 at 12:44, Pali Roh?r <pali.rohar at gmail.com> wrote:
> >
> > On Tuesday 17 December 2019 08:28:35 Rafa? Mi?ecki wrote:
> > > From: Pali Roh?r <pali.rohar at gmail.com>
> > >
> > > commit e526f503918cc29d8b1ccf36a5c3a34645d2be6e upstream.
> > >
> > > When FAT directory entry has leading byte 0x05 it is interpreted as byte
> > > 0xE5. This is how FAT stores file name which starts with byte 0xE5 as
> > > leading byte in 0xE5 in FAT directory entry means that file slot is empty.
> > >
> > > Fixes: #533
> > > ---
> > >  libblkid-tiny/vfat.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/libblkid-tiny/vfat.c b/libblkid-tiny/vfat.c
> > > index 49b865a..93e4053 100644
> > > --- a/libblkid-tiny/vfat.c
> > > +++ b/libblkid-tiny/vfat.c
> > > @@ -167,6 +167,8 @@ static unsigned char *search_fat_label(blkid_probe pr,
> > >               if ((ent->attr & (FAT_ATTR_VOLUME_ID | FAT_ATTR_DIR)) ==
> > >                   FAT_ATTR_VOLUME_ID) {
> > >                       DBG(LOWPROBE, ul_debug("\tfound fs LABEL at entry %d", i));
> > > +                     if (ent->name[0] == 0x05)
> > > +                             ent->name[0] = 0xE5;
> > >                       return ent->name;
> > >               }
> > >       }
> >
> > Yes, this is my patch for util-linux project which was included in
> > upstream two years ago... It was part of my initiative to fix handling
> > of FAT labels in different Linux software, see for more details:
> > https://www.spinics.net/lists/kernel/msg2640891.html
> >
> > Do you need some help with FAT labels?
> 
> No help needed as everything works correctly, thank you!
> 
> As you can see vfat.c copy in OpenWrt's fstools project was quite
> outdated. Porting your fixes makes it work for me perfectly!

Ok.

-- 
Pali Roh?r
pali.rohar at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191219/f88633e5/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ole.m.janssen at gmx.net  Thu Dec 19 04:59:48 2019
From: ole.m.janssen at gmx.net (ole.m.janssen at gmx.net)
Date: Thu, 19 Dec 2019 10:59:48 +0100
Subject: [OpenWrt-Devel] test
Message-ID: <0e990db0-d461-83c8-c3c7-c80d86c51b8d@gmx.net>


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hauke at hauke-m.de  Thu Dec 19 05:29:07 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Thu, 19 Dec 2019 11:29:07 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] iwinfo: add current hw and ht mode
 to info call
In-Reply-To: <20191127172952.2143-2-daniel@dd-wrt.com>
References: <20191127172952.2143-1-daniel@dd-wrt.com>
 <20191127172952.2143-2-daniel@dd-wrt.com>
Message-ID: <7d92a7e1-ef8b-4b4c-351a-0c169ba47aef@hauke-m.de>

On 11/27/19 6:29 PM, Daniel Danzberger wrote:
> Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
> ---
>  iwinfo.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
> 
> diff --git a/iwinfo.c b/iwinfo.c
> index a76b72a..7f46e3e 100644
> --- a/iwinfo.c
> +++ b/iwinfo.c

This file does not exist.

Hauke

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hauke at hauke-m.de  Thu Dec 19 05:33:47 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Thu, 19 Dec 2019 11:33:47 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] nl80211: add htmode to iwinfo_ops
In-Reply-To: <20191127172952.2143-3-daniel@dd-wrt.com>
References: <20191127172952.2143-1-daniel@dd-wrt.com>
 <20191127172952.2143-3-daniel@dd-wrt.com>
Message-ID: <3bcad720-ea8b-1ba9-b12c-9bcf6e13a174@hauke-m.de>

On 11/27/19 6:29 PM, Daniel Danzberger wrote:
> This callback shows the currently active HTMODE of the device.
> 
> Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
> ---
>  include/iwinfo.h |  4 ++-
>  iwinfo_nl80211.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 73 insertions(+), 1 deletion(-)
> 
> diff --git a/include/iwinfo.h b/include/iwinfo.h
> index d035c9c..5e64294 100644
> --- a/include/iwinfo.h
> +++ b/include/iwinfo.h
> @@ -88,8 +88,9 @@ enum iwinfo_htmode {
>  	IWINFO_HTMODE_VHT80      = (1 << 4),
>  	IWINFO_HTMODE_VHT80_80   = (1 << 5),
>  	IWINFO_HTMODE_VHT160     = (1 << 6),
> +	IWINFO_HTMODE_NOHT       = (1 << 7),
>  
> -	IWINFO_HTMODE_COUNT      = 7
> +	IWINFO_HTMODE_COUNT      = 8
>  };
>  
>  extern const char *IWINFO_HTMODE_NAMES[IWINFO_HTMODE_COUNT];
> @@ -231,6 +232,7 @@ struct iwinfo_ops {
>  	int (*mbssid_support)(const char *, int *);
>  	int (*hwmodelist)(const char *, int *);
>  	int (*htmodelist)(const char *, int *);
> +	int (*htmode)(const char *, int *);
>  	int (*ssid)(const char *, char *);
>  	int (*bssid)(const char *, char *);
>  	int (*country)(const char *, char *);
> diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
> index 4b6ef91..36f1da2 100644
> --- a/iwinfo_nl80211.c
> +++ b/iwinfo_nl80211.c
> @@ -2958,6 +2958,75 @@ out:
>  	return -1;
>  }
>  
> +struct chan_info {
> +	int width;
> +	int mode;
> +};
> +
> +static int nl80211_get_htmode_cb(struct nl_msg *msg, void *arg)
> +{
> +	struct nlattr **tb = nl80211_parse(msg);
> +	struct nlattr *cur;
> +	struct chan_info *chn = arg;
> +
> +	if ((cur = tb[NL80211_ATTR_CHANNEL_WIDTH]))
> +		chn->width = nla_get_u32(cur);
> +
> +	if ((cur = tb[NL80211_ATTR_BSS_HT_OPMODE]))
> +		chn->mode = nla_get_u32(cur);
> +
> +	return NL_SKIP;
> +}
> +
> +static int nl80211_get_htmode(const char *ifname, int *buf)
> +{
> +	struct chan_info chn = { .width = 0, .mode = 0 };
> +	char *res;
> +	int err;
> +
> +	res = nl80211_phy2ifname(ifname);
> +	*buf = 0;
> +
> +	err =  nl80211_request(res ? res : ifname,
> +				NL80211_CMD_GET_INTERFACE, 0,
> +				nl80211_get_htmode_cb, &chn);
> +	if (err)
> +		return -1;
> +
> +	switch (chn.width) {
> +	case NL80211_CHAN_WIDTH_20_NOHT:
> +		*buf = IWINFO_HTMODE_NOHT;
> +		break;
> +	case NL80211_CHAN_WIDTH_20:
> +		if (chn.mode == -1)
> +			*buf = IWINFO_HTMODE_VHT20;
> +		else
> +			*buf = IWINFO_HTMODE_HT20;
> +		break;
> +	case NL80211_CHAN_WIDTH_40:
> +		if (chn.mode == -1)
> +			*buf = IWINFO_HTMODE_VHT40;
> +		else
> +			*buf = IWINFO_HTMODE_HT40;
> +		break;
> +	case NL80211_CHAN_WIDTH_80:
> +		*buf = IWINFO_HTMODE_VHT80;
> +		break;
> +	case NL80211_CHAN_WIDTH_80P80:
> +		*buf = IWINFO_HTMODE_VHT80_80;
> +		break;
> +	case NL80211_CHAN_WIDTH_160:
> +		*buf = IWINFO_HTMODE_VHT160;
> +		break;
> +	case NL80211_CHAN_WIDTH_5:
> +	case NL80211_CHAN_WIDTH_10:

Should this also return IWINFO_HTMODE_NOHT ?

> +	default:
> +		break;

Why not return an error if nothing matches?

> +	}
> +
> +	return 0;
> +}
> +
>  static int nl80211_get_htmodelist(const char *ifname, int *buf)
>  {
>  	struct nl80211_modes m = { 0 };
> @@ -3147,6 +3216,7 @@ const struct iwinfo_ops nl80211_ops = {
>  	.mbssid_support   = nl80211_get_mbssid_support,
>  	.hwmodelist       = nl80211_get_hwmodelist,
>  	.htmodelist       = nl80211_get_htmodelist,
> +	.htmode		  = nl80211_get_htmode,
>  	.mode             = nl80211_get_mode,
>  	.ssid             = nl80211_get_ssid,
>  	.bssid            = nl80211_get_bssid,
> 


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at dd-wrt.com  Thu Dec 19 06:49:33 2019
From: daniel at dd-wrt.com (Daniel Danzberger)
Date: Thu, 19 Dec 2019 12:49:33 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] iwinfo: add current hw and ht mode
 to info call
In-Reply-To: <7d92a7e1-ef8b-4b4c-351a-0c169ba47aef@hauke-m.de>
References: <20191127172952.2143-1-daniel@dd-wrt.com>
 <20191127172952.2143-2-daniel@dd-wrt.com>
 <7d92a7e1-ef8b-4b4c-351a-0c169ba47aef@hauke-m.de>
Message-ID: <37e03683-ddcc-db67-b784-0540a771c960@dd-wrt.com>

On 12/19/19 11:29 AM, Hauke Mehrtens wrote:
> On 11/27/19 6:29 PM, Daniel Danzberger wrote:
>> Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
>> ---
>>  iwinfo.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 44 insertions(+)
>>
>> diff --git a/iwinfo.c b/iwinfo.c
>> index a76b72a..7f46e3e 100644
>> --- a/iwinfo.c
>> +++ b/iwinfo.c
> 
> This file does not exist.
This is the rpcd part of the patch. The file exists in the rpcd repository.

> 
> Hauke
> 

-- 
Regards

Daniel Danzberger
embeDD GmbH, Alter Postplatz 2, CH-6370 Stans

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From jeffery.to at gmail.com  Thu Dec 19 06:50:41 2019
From: jeffery.to at gmail.com (Jeffery To)
Date: Thu, 19 Dec 2019 19:50:41 +0800
Subject: [OpenWrt-Devel] [PATCH] toolchain/gcc: Backport patch to fix
 unconditional MULTIARCH_DIRNAME
In-Reply-To: <20191118220459.14022-1-jeffery.to@gmail.com>
References: <20191118220459.14022-1-jeffery.to@gmail.com>
Message-ID: <CAJXyS=gwZ_CMm1X1-BB1Jspz_j1Auy1w-W6tiJiNSVvohp6gEA@mail.gmail.com>

On Tue, Nov 19, 2019 at 6:05 AM Jeffery To <jeffery.to at gmail.com> wrote:

> This backports the patch for GCC PR target/89587 (gcc's rs6000
> configuration unconditionally sets MULTIARCH_DIRNAME, even when
> multiarch is disabled).
>

Can someone take a look at this change? This issue is preventing the Python
3 package from compiling for apm821xx (
https://github.com/openwrt/packages/issues/10552).

Thanks,
Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191219/fb19e396/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 08:23:22 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 14:23:22 +0100
Subject: [OpenWrt-Devel] [PATCH] toolchain/gcc: Backport patch to fix
 unconditional MULTIARCH_DIRNAME
In-Reply-To: <CAJXyS=gwZ_CMm1X1-BB1Jspz_j1Auy1w-W6tiJiNSVvohp6gEA@mail.gmail.com>
References: <20191118220459.14022-1-jeffery.to@gmail.com>
 <CAJXyS=gwZ_CMm1X1-BB1Jspz_j1Auy1w-W6tiJiNSVvohp6gEA@mail.gmail.com>
Message-ID: <20191219132322.GC70645@meh.true.cz>

Jeffery To <jeffery.to at gmail.com> [2019-12-19 19:50:41]:

Hi,

> On Tue, Nov 19, 2019 at 6:05 AM Jeffery To <jeffery.to at gmail.com> wrote:
> 
> > This backports the patch for GCC PR target/89587 (gcc's rs6000
> > configuration unconditionally sets MULTIARCH_DIRNAME, even when
> > multiarch is disabled).
> >
> 
> Can someone take a look at this change? This issue is preventing the Python
> 3 package from compiling for apm821xx (

just added it to my staging tree and I'll push it once it passes some tests.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From daniel at dd-wrt.com  Thu Dec 19 09:41:24 2019
From: daniel at dd-wrt.com (Daniel Danzberger)
Date: Thu, 19 Dec 2019 15:41:24 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] nl80211: add htmode to iwinfo_ops
Message-ID: <20191219144124.1918037-1-daniel@dd-wrt.com>

This callback shows the currently active HTMODE of the device.

Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>
---
 include/iwinfo.h |  4 ++-
 iwinfo_nl80211.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+), 1 deletion(-)

diff --git a/include/iwinfo.h b/include/iwinfo.h
index d035c9c..5e64294 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -88,8 +88,9 @@ enum iwinfo_htmode {
 	IWINFO_HTMODE_VHT80      = (1 << 4),
 	IWINFO_HTMODE_VHT80_80   = (1 << 5),
 	IWINFO_HTMODE_VHT160     = (1 << 6),
+	IWINFO_HTMODE_NOHT       = (1 << 7),
 
-	IWINFO_HTMODE_COUNT      = 7
+	IWINFO_HTMODE_COUNT      = 8
 };
 
 extern const char *IWINFO_HTMODE_NAMES[IWINFO_HTMODE_COUNT];
@@ -231,6 +232,7 @@ struct iwinfo_ops {
 	int (*mbssid_support)(const char *, int *);
 	int (*hwmodelist)(const char *, int *);
 	int (*htmodelist)(const char *, int *);
+	int (*htmode)(const char *, int *);
 	int (*ssid)(const char *, char *);
 	int (*bssid)(const char *, char *);
 	int (*country)(const char *, char *);
diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 4b6ef91..20d75e9 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -2958,6 +2958,75 @@ out:
 	return -1;
 }
 
+struct chan_info {
+	int width;
+	int mode;
+};
+
+static int nl80211_get_htmode_cb(struct nl_msg *msg, void *arg)
+{
+	struct nlattr **tb = nl80211_parse(msg);
+	struct nlattr *cur;
+	struct chan_info *chn = arg;
+
+	if ((cur = tb[NL80211_ATTR_CHANNEL_WIDTH]))
+		chn->width = nla_get_u32(cur);
+
+	if ((cur = tb[NL80211_ATTR_BSS_HT_OPMODE]))
+		chn->mode = nla_get_u32(cur);
+
+	return NL_SKIP;
+}
+
+static int nl80211_get_htmode(const char *ifname, int *buf)
+{
+	struct chan_info chn = { .width = 0, .mode = 0 };
+	char *res;
+	int err;
+
+	res = nl80211_phy2ifname(ifname);
+	*buf = 0;
+
+	err =  nl80211_request(res ? res : ifname,
+				NL80211_CMD_GET_INTERFACE, 0,
+				nl80211_get_htmode_cb, &chn);
+	if (err)
+		return -1;
+
+	switch (chn.width) {
+	case NL80211_CHAN_WIDTH_20:
+		if (chn.mode == -1)
+			*buf = IWINFO_HTMODE_VHT20;
+		else
+			*buf = IWINFO_HTMODE_HT20;
+		break;
+	case NL80211_CHAN_WIDTH_40:
+		if (chn.mode == -1)
+			*buf = IWINFO_HTMODE_VHT40;
+		else
+			*buf = IWINFO_HTMODE_HT40;
+		break;
+	case NL80211_CHAN_WIDTH_80:
+		*buf = IWINFO_HTMODE_VHT80;
+		break;
+	case NL80211_CHAN_WIDTH_80P80:
+		*buf = IWINFO_HTMODE_VHT80_80;
+		break;
+	case NL80211_CHAN_WIDTH_160:
+		*buf = IWINFO_HTMODE_VHT160;
+		break;
+	case NL80211_CHAN_WIDTH_5:
+	case NL80211_CHAN_WIDTH_10:
+	case NL80211_CHAN_WIDTH_20_NOHT:
+		*buf = IWINFO_HTMODE_NOHT;
+		break;
+	default:
+		return -1;
+	}
+
+	return 0;
+}
+
 static int nl80211_get_htmodelist(const char *ifname, int *buf)
 {
 	struct nl80211_modes m = { 0 };
@@ -3147,6 +3216,7 @@ const struct iwinfo_ops nl80211_ops = {
 	.mbssid_support   = nl80211_get_mbssid_support,
 	.hwmodelist       = nl80211_get_hwmodelist,
 	.htmodelist       = nl80211_get_htmodelist,
+	.htmode		  = nl80211_get_htmode,
 	.mode             = nl80211_get_mode,
 	.ssid             = nl80211_get_ssid,
 	.bssid            = nl80211_get_bssid,
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Thu Dec 19 13:58:57 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Thu, 19 Dec 2019 21:58:57 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?wujk5e7q8/DxICLM4PHy5fAg5OXr7uLu4+4g?=
	=?cp1251?b?4OTs6O3o8fLw6PDu4uDt6P8iIC0g8+v88vDg8e7i8OXs5e3t++Ug?=
	=?cp1251?b?5+3g7ej/LCDs5fLu5Ojq6CDoIPDl+OXt6P8uIDA1XzA4XzIwMTkg?=
	=?cp1251?q?02=5F10_199508?=
Message-ID: <mailman.19563.1576782103.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ????????? "?????? ???????? ?????????????????" - ????????????????? ??????, ???????? ? ???????. 05_08_2019 02_10 199508
Date: Thu, 19 Dec 2019 21:58:57 +0300
Size: 39837
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191219/43444b59/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:16 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:16 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 00/20] tests, fuzzing,
 fixes and improvements
Message-ID: <20191219215836.21773-1-ynezz@true.cz>

Hi,

this patch series adds unit tests passed through Valgrind, unit tests covered
with Clang's {Address,Leak,UndefinedBehavior}Sanitizer, fuzzing with
libFuzzer and bunch of fixes uncovered by the new tests.

Petr ?tetiar (17):
  cmake: use extra compiler warnings only on gcc6+
  blobmsg/ulog: fix format string compiler warnings
  cmake: add more hardening compiler flags
  tests: add unit tests covered with Clang sanitizers
  tests: add libFuzzer based tests
  tests: add test cases for blob parsing
  test: fuzz: add blob_parse crashes
  blob: refactor attr parsing into separate function
  blob: introduce blob_parse_untrusted
  tests: use blob_parse_untrusted variant
  blob: fix OOB access in blob_check_type
  test: fuzz: add blobmsg_check_attr crashes
  tests: add test cases for blobmsg parsing
  blobmsg: make blobmsg_len and blobmsg_data_len return unsigned value
  blobmsg: fix heap buffer overflow in blobmsg_parse
  tests: fuzz: fuzz _len variants of checking methods
  blobmsg: reuse blobmsg_namelen in blobmsg_data

Tobias Schramm (3):
  Ensure blob_attr length check does not perform out of bounds reads
  Replace use of blobmsg_check_attr by blobmsg_check_attr_len
  blobmsg: add _len variants for all attribute checking methods

 CMakeLists.txt                                |  20 +-
 blob.c                                        |  98 +++++++---
 blob.h                                        |  11 +-
 blobmsg.c                                     |  89 ++++++---
 blobmsg.h                                     |  68 ++++++-
 tests/CMakeLists.txt                          |   9 +-
 tests/cram/inputs/invalid.ucert               | Bin 0 -> 362 bytes
 tests/cram/inputs/key-build.ucert             | Bin 0 -> 356 bytes
 tests/cram/test_avl.t                         |   9 +
 tests/cram/test_base64.t                      |  30 ++-
 tests/cram/test_blob_parse.t                  |  78 ++++++++
 tests/cram/test_blobmsg.t                     |  15 ++
 tests/cram/test_blobmsg_parse.t               |  65 +++++++
 tests/cram/test_jshn.t                        | 144 ++++++++++++++
 tests/cram/test_json_script.t                 |  55 ++++++
 tests/cram/test_list.t                        |  20 ++
 tests/cram/test_runqueue.t                    |  12 ++
 tests/fuzz/CMakeLists.txt                     |  18 ++
 .../71520a5c4b5ca73903216857abbad54a8002d44a  | Bin 0 -> 2 bytes
 .../c1dfd96eea8cc2b62785275bca38ac261256e278  |   1 +
 .../c42ac1c46f1d4e211c735cc7dfad4ff8391110e9  | Bin 0 -> 3 bytes
 ...h-1b8fb1be45db3aff7699100f497fb74138f3df4f | Bin 0 -> 6 bytes
 ...h-333757b203a44751d3535f24b05f467183a96d09 | Bin 0 -> 10 bytes
 ...h-4c4d2c3c9ade5da9347534e290305c3b9760f627 | Bin 0 -> 17 bytes
 ...h-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b | Bin 0 -> 86 bytes
 ...h-75b146c4e6fac64d3e62236b27c64b50657bab2a | Bin 0 -> 4 bytes
 ...h-813f3e68661da09c26d4a87dbb9d5099e92be50f | Bin 0 -> 36 bytes
 ...h-98595faa58ba01d85ba4fd0b109cd3d490b45795 | Bin 0 -> 6 bytes
 ...h-d0f3aa7d60a094b021f635d4edb7807c055a4ea1 |   1 +
 ...h-df9d1243057b27bbad6211e5a23d1cb699028aa2 | Bin 0 -> 16 bytes
 ...h-e2fd5ecb3b37926743256f1083f47a07c39e10c2 | Bin 0 -> 66 bytes
 tests/fuzz/corpus/valid-blobmsg.bin           | Bin 0 -> 176 bytes
 tests/fuzz/test-fuzz.c                        | 100 ++++++++++
 tests/test-blob-parse.c                       | 175 ++++++++++++++++++
 tests/test-blobmsg-parse.c                    |  74 ++++++++
 ulog.c                                        |   3 +
 36 files changed, 1035 insertions(+), 60 deletions(-)
 create mode 100644 tests/cram/inputs/invalid.ucert
 create mode 100644 tests/cram/inputs/key-build.ucert
 create mode 100644 tests/cram/test_blob_parse.t
 create mode 100644 tests/cram/test_blobmsg_parse.t
 create mode 100644 tests/fuzz/CMakeLists.txt
 create mode 100644 tests/fuzz/corpus/71520a5c4b5ca73903216857abbad54a8002d44a
 create mode 100644 tests/fuzz/corpus/c1dfd96eea8cc2b62785275bca38ac261256e278
 create mode 100644 tests/fuzz/corpus/c42ac1c46f1d4e211c735cc7dfad4ff8391110e9
 create mode 100644 tests/fuzz/corpus/crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
 create mode 100644 tests/fuzz/corpus/crash-333757b203a44751d3535f24b05f467183a96d09
 create mode 100644 tests/fuzz/corpus/crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
 create mode 100644 tests/fuzz/corpus/crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
 create mode 100644 tests/fuzz/corpus/crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
 create mode 100644 tests/fuzz/corpus/crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
 create mode 100644 tests/fuzz/corpus/crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
 create mode 100644 tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
 create mode 100644 tests/fuzz/corpus/crash-df9d1243057b27bbad6211e5a23d1cb699028aa2
 create mode 100644 tests/fuzz/corpus/crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2
 create mode 100644 tests/fuzz/corpus/valid-blobmsg.bin
 create mode 100644 tests/fuzz/test-fuzz.c
 create mode 100644 tests/test-blob-parse.c
 create mode 100644 tests/test-blobmsg-parse.c


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:17 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:17 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 01/20] cmake: use extra compiler
 warnings only on gcc6+
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-2-ynezz@true.cz>

gcc version 4.8.4 (Ubuntu 14.04) and -Wextra produces following:

 json_script.c:124:3: error: missing initializer for field 'name' of 'struct blobmsg_policy' [-Werror=missing-field-initializers]

Reported-by: Jonas Gorski <jonas.gorski at gmail.com>
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 CMakeLists.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b80d551c112f..da7d03c7fc21 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,12 @@ INCLUDE(CheckLibraryExists)
 INCLUDE(CheckFunctionExists)
 
 PROJECT(ubox C)
-ADD_DEFINITIONS(-Os -Wextra -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations -Wno-unused-parameter)
+
+ADD_DEFINITIONS(-Wall -Werror)
+IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)
+	ADD_DEFINITIONS(-Wextra)
+ENDIF()
+ADD_DEFINITIONS(-Os -std=gnu99 -g3 -Wmissing-declarations -Wno-unused-parameter)
 
 OPTION(BUILD_LUA "build Lua plugin" ON)
 OPTION(BUILD_EXAMPLES "build examples" ON)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:18 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:18 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 02/20] blobmsg/ulog: fix format
 string compiler warnings
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-3-ynezz@true.cz>

Fixes following compiler warnings:

 blobmsg.c:242:39: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
 blobmsg.c:248:23: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
 ulog.c:100:18: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
 ulog.c:112:16: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
 ulog.c:117:20: error: format string is not a string literal [-Werror,-Wformat-nonliteral]

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 blobmsg.c | 8 ++++----
 ulog.c    | 3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/blobmsg.c b/blobmsg.c
index a860483bfa7e..97e0c20575ff 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -230,8 +230,8 @@ blobmsg_open_nested(struct blob_buf *buf, const char *name, bool array)
 	return (void *)offset;
 }
 
-int
-blobmsg_vprintf(struct blob_buf *buf, const char *name, const char *format, va_list arg)
+__attribute__((format(printf, 3, 0)))
+int blobmsg_vprintf(struct blob_buf *buf, const char *name, const char *format, va_list arg)
 {
 	va_list arg2;
 	char cbuf;
@@ -251,8 +251,8 @@ blobmsg_vprintf(struct blob_buf *buf, const char *name, const char *format, va_l
 	return ret;
 }
 
-int
-blobmsg_printf(struct blob_buf *buf, const char *name, const char *format, ...)
+__attribute__((format(printf, 3, 4)))
+int blobmsg_printf(struct blob_buf *buf, const char *name, const char *format, ...)
 {
 	va_list ap;
 	int ret;
diff --git a/ulog.c b/ulog.c
index b7300e720d21..05946a0c3521 100644
--- a/ulog.c
+++ b/ulog.c
@@ -87,6 +87,7 @@ static void ulog_defaults(void)
 	_ulog_initialized = 1;
 }
 
+__attribute__((format(printf, 2, 0)))
 static void ulog_kmsg(int priority, const char *fmt, va_list ap)
 {
 	FILE *kmsg;
@@ -102,6 +103,7 @@ static void ulog_kmsg(int priority, const char *fmt, va_list ap)
 	}
 }
 
+__attribute__((format(printf, 2, 0)))
 static void ulog_stdio(int priority, const char *fmt, va_list ap)
 {
 	FILE *out = stderr;
@@ -112,6 +114,7 @@ static void ulog_stdio(int priority, const char *fmt, va_list ap)
 	vfprintf(out, fmt, ap);
 }
 
+__attribute__((format(printf, 2, 0)))
 static void ulog_syslog(int priority, const char *fmt, va_list ap)
 {
 	vsyslog(priority, fmt, ap);

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:19 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:19 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 03/20] cmake: add more hardening
 compiler flags
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-4-ynezz@true.cz>

In order to spot possible issues with direct impact on security during
QA on CI (GCC version 6 and higher).

Ref: https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index da7d03c7fc21..0b0c9e316bfb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,8 @@ PROJECT(ubox C)
 
 ADD_DEFINITIONS(-Wall -Werror)
 IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)
-	ADD_DEFINITIONS(-Wextra)
+	ADD_DEFINITIONS(-Wextra -Werror=implicit-function-declaration)
+	ADD_DEFINITIONS(-Wformat -Werror=format-security -Werror=format-nonliteral)
 ENDIF()
 ADD_DEFINITIONS(-Os -std=gnu99 -g3 -Wmissing-declarations -Wno-unused-parameter)
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:20 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:20 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 04/20] tests: add unit tests covered
 with Clang sanitizers
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-5-ynezz@true.cz>

Currently we run all tests via Valgrind. This patch adds 2nd batch of
tests which are compiled with Clang AddressSanitizer[1],
LeakSanitizer[2] and UndefinedBehaviorSanitizer[3] in order to catch
more issues during QA on CI.

AddressSanitizer is a fast memory error detector.  The tool can detect
the following types of bugs:

 * Out-of-bounds accesses to heap, stack and globals
 * Use-after-free, use-after-return, use-after-scope
 * Double-free, invalid free

LeakSanitizer is a run-time memory leak detector. It can be combined
with AddressSanitizer to get both memory error and leak detection, or
used in a stand-alone mode.

UndefinedBehaviorSanitizer (UBSan) is a fast undefined behavior
detector. UBSan modifies the program at compile-time to catch various
kinds of undefined behavior during program execution, for example:

 * Using misaligned or null pointer
 * Signed integer overflow
 * Conversion to, from, or between floating-point types which would
   overflow the destination

1. http://clang.llvm.org/docs/AddressSanitizer.html
2. http://http://clang.llvm.org/docs/LeakSanitizer.html
3. http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 CMakeLists.txt                |  12 +++
 tests/CMakeLists.txt          |   5 +-
 tests/cram/test_avl.t         |   9 +++
 tests/cram/test_base64.t      |  30 ++++++-
 tests/cram/test_blobmsg.t     |  15 ++++
 tests/cram/test_jshn.t        | 144 ++++++++++++++++++++++++++++++++++
 tests/cram/test_json_script.t |  55 +++++++++++++
 tests/cram/test_list.t        |  20 +++++
 tests/cram/test_runqueue.t    |  12 +++
 9 files changed, 297 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b0c9e316bfb..dcd455c02dfb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,14 @@ INSTALL(TARGETS ubox ubox-static
 ADD_SUBDIRECTORY(lua)
 ADD_SUBDIRECTORY(examples)
 
+MACRO(ADD_UNIT_TEST_SAN name)
+  ADD_EXECUTABLE(${name}-san ${name}.c)
+  TARGET_COMPILE_OPTIONS(${name}-san PRIVATE -g -fno-omit-frame-pointer -fsanitize=undefined,address,leak -fno-sanitize-recover=all)
+  TARGET_LINK_OPTIONS(${name}-san PRIVATE -fsanitize=undefined,address,leak)
+  TARGET_LINK_LIBRARIES(${name}-san ubox blobmsg_json json_script ${json})
+  TARGET_INCLUDE_DIRECTORIES(${name}-san PRIVATE ${PROJECT_SOURCE_DIR})
+ENDMACRO(ADD_UNIT_TEST_SAN)
+
 IF(UNIT_TESTING)
   ENABLE_TESTING()
   ADD_SUBDIRECTORY(tests)
@@ -62,6 +70,10 @@ IF(EXISTS ${json})
 	SET_TARGET_PROPERTIES(blobmsg_json-static
 			      PROPERTIES OUTPUT_NAME blobmsg_json)
 
+	IF(UNIT_TESTING)
+		ADD_UNIT_TEST_SAN(jshn)
+	ENDIF(UNIT_TESTING)
+
 	ADD_EXECUTABLE(jshn jshn.c)
 	TARGET_LINK_LIBRARIES(jshn blobmsg_json ${json})
 
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 1c448257a4d6..bd2205743318 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -8,6 +8,7 @@ ENDMACRO(ADD_UNIT_TEST)
 
 FILE(GLOB test_cases "test-*.c")
 FOREACH(test_case ${test_cases})
-	GET_FILENAME_COMPONENT(test_case ${test_case} NAME_WE)
-	ADD_UNIT_TEST(${test_case})
+  GET_FILENAME_COMPONENT(test_case ${test_case} NAME_WE)
+  ADD_UNIT_TEST(${test_case})
+  ADD_UNIT_TEST_SAN(${test_case})
 ENDFOREACH(test_case)
diff --git a/tests/cram/test_avl.t b/tests/cram/test_avl.t
index 19a8d21f1f3e..d8d1640008c6 100644
--- a/tests/cram/test_avl.t
+++ b/tests/cram/test_avl.t
@@ -9,3 +9,12 @@ check that avl is producing expected results:
   test_basics: delete 'one' element
   test_basics: for each element reverse: zero two twelve three ten six seven nine four five eleven eight 
   test_basics: delete all elements
+
+  $ test-avl-san
+  test_basics: insert: 0=zero 0=one 0=two 0=three 0=four 0=five 0=six 0=seven 0=eight 0=nine 0=ten 0=eleven 0=twelve 
+  test_basics: insert duplicate: -1=zero -1=one -1=two -1=three -1=four -1=five -1=six -1=seven -1=eight -1=nine -1=ten -1=eleven -1=twelve 
+  test_basics: first=eight last=zero
+  test_basics: for each element: eight eleven five four nine one seven six ten three twelve two zero 
+  test_basics: delete 'one' element
+  test_basics: for each element reverse: zero two twelve three ten six seven nine four five eleven eight 
+  test_basics: delete all elements
diff --git a/tests/cram/test_base64.t b/tests/cram/test_base64.t
index 0a7a9d5c026d..ade41fb1eb2a 100644
--- a/tests/cram/test_base64.t
+++ b/tests/cram/test_base64.t
@@ -20,14 +20,38 @@ check that base64 is producing expected results:
   5 fooba
   6 foobar
 
+  $ test-b64-san
+  0 
+  4 Zg==
+  4 Zm8=
+  4 Zm9v
+  8 Zm9vYg==
+  8 Zm9vYmE=
+  8 Zm9vYmFy
+  0 
+  1 f
+  2 fo
+  3 foo
+  4 foob
+  5 fooba
+  6 foobar
+
 check that b64_encode and b64_decode assert invalid input
 
-  $ alias check="egrep '(dumped|Assertion)' | sed 's;.*\(b64_.*code\).*\(Assertion.*$\);\1: \2;' | LC_ALL=C sort"
+  $ alias check="egrep '(dumped|Assertion)' output.log | sed 's;.*\(b64_.*code\).*\(Assertion.*$\);\1: \2;' | LC_ALL=C sort"
+
+  $ test-b64_decode 2> output.log; check
+  Aborted (core dumped)
+  b64_decode: Assertion `dest && targsize > 0' failed.
+
+  $ test-b64_encode 2> output.log; check
+  Aborted (core dumped)
+  b64_encode: Assertion `dest && targsize > 0' failed.
 
-  $ test-b64_decode 2>&1 | check
+  $ test-b64_decode-san 2> output.log; check
   Aborted (core dumped)
   b64_decode: Assertion `dest && targsize > 0' failed.
 
-  $ test-b64_encode 2>&1 | check
+  $ test-b64_encode-san 2> output.log; check
   Aborted (core dumped)
   b64_encode: Assertion `dest && targsize > 0' failed.
diff --git a/tests/cram/test_blobmsg.t b/tests/cram/test_blobmsg.t
index 504a056f52c4..3a5801a5a0f4 100644
--- a/tests/cram/test_blobmsg.t
+++ b/tests/cram/test_blobmsg.t
@@ -15,3 +15,18 @@ check that blobmsg is producing expected results:
   \tworld : 2 (esc)
   }
   json: {"message":"Hello, world!","testdata":{"double":133.700000,"hello":1,"world":"2"},"list":[0,1,2,133.700000]}
+
+  $ test-blobmsg-san
+  Message: Hello, world!
+  List: {
+  0
+  1
+  2
+  133.700000
+  }
+  Testdata: {
+  \tdouble : 133.700000 (esc)
+  \thello : 1 (esc)
+  \tworld : 2 (esc)
+  }
+  json: {"message":"Hello, world!","testdata":{"double":133.700000,"hello":1,"world":"2"},"list":[0,1,2,133.700000]}
diff --git a/tests/cram/test_jshn.t b/tests/cram/test_jshn.t
index 1881a3d639a5..b2f28534a737 100644
--- a/tests/cram/test_jshn.t
+++ b/tests/cram/test_jshn.t
@@ -9,12 +9,20 @@ check usage:
   Usage: jshn [-n] [-i] -r <message>|-R <file>|-o <file>|-p <prefix>|-w
   [2]
 
+  $ jshn-san
+  Usage: jshn-san [-n] [-i] -r <message>|-R <file>|-o <file>|-p <prefix>|-w
+  [2]
+
 test bad json:
 
   $ jshn -r '[]'
   Failed to parse message data
   [1]
 
+  $ jshn-san -r '[]'
+  Failed to parse message data
+  [1]
+
 test good json:
 
   $ jshn -r '{"foo": "bar", "baz": {"next": "meep"}}'
@@ -24,16 +32,31 @@ test good json:
   json_add_string 'next' 'meep';
   json_close_object;
 
+  $ jshn-san -r '{"foo": "bar", "baz": {"next": "meep"}}'
+  json_init;
+  json_add_string 'foo' 'bar';
+  json_add_object 'baz';
+  json_add_string 'next' 'meep';
+  json_close_object;
+
 test json from file:
 
   $ echo '[]' > test.json; jshn -R test.json
   Failed to parse message data
   [1]
 
+  $ echo '[]' > test.json; jshn-san -R test.json
+  Failed to parse message data
+  [1]
+
   $ jshn -R nada.json
   Error opening nada.json
   [3]
 
+  $ jshn-san -R nada.json
+  Error opening nada.json
+  [3]
+
   $ echo '{"foo": "bar", "baz": {"next": "meep"}}' > test.json; jshn -R test.json
   json_init;
   json_add_string 'foo' 'bar';
@@ -41,38 +64,74 @@ test json from file:
   json_add_string 'next' 'meep';
   json_close_object;
 
+  $ echo '{"foo": "bar", "baz": {"next": "meep"}}' > test.json; jshn-san -R test.json
+  json_init;
+  json_add_string 'foo' 'bar';
+  json_add_object 'baz';
+  json_add_string 'next' 'meep';
+  json_close_object;
+
 test json formatting without prepared environment:
 
   $ jshn -p procd -w
   { }
 
+  $ jshn-san -p procd -w
+  { }
+
   $ jshn -i -p procd -w
   {
   \t (esc)
   }
 
+  $ jshn-san -i -p procd -w
+  {
+  \t (esc)
+  }
+
   $ jshn -i -n -p procd -w
   {
   \t (esc)
   } (no-eol)
 
+  $ jshn-san -i -n -p procd -w
+  {
+  \t (esc)
+  } (no-eol)
+
   $ jshn -p procd -o test.json; cat test.json
   { }
 
+  $ jshn-san -p procd -o test.json; cat test.json
+  { }
+
   $ jshn -i -p procd -o test.json; cat test.json
   {
   \t (esc)
   }
 
+  $ jshn-san -i -p procd -o test.json; cat test.json
+  {
+  \t (esc)
+  }
+
   $ jshn -i -n -p procd -o test.json; cat test.json
   {
   \t (esc)
   } (no-eol)
 
+  $ jshn-san -i -n -p procd -o test.json; cat test.json
+  {
+  \t (esc)
+  } (no-eol)
+
   $ chmod oug= test.json
   $ jshn -i -n -p procd -o test.json
   Error opening test.json
   [3]
+  $ jshn-san -i -n -p procd -o test.json
+  Error opening test.json
+  [3]
   $ rm -f test.json
 
 test json formatting with prepared environment:
@@ -104,6 +163,9 @@ test json formatting with prepared environment:
   $ jshn -p procd -w
   { "name": "urngd", "script": "\/etc\/init.d\/urngd", "instances": { "instance1": { "command": [ "\/sbin\/urngd" ] } }, "triggers": [ ], "data": { } }
 
+  $ jshn-san -p procd -w
+  { "name": "urngd", "script": "\/etc\/init.d\/urngd", "instances": { "instance1": { "command": [ "\/sbin\/urngd" ] } }, "triggers": [ ], "data": { } }
+
   $ jshn -i -p procd -w
   {
   \t"name": "urngd", (esc)
@@ -123,6 +185,25 @@ test json formatting with prepared environment:
   \t} (esc)
   }
 
+  $ jshn-san -i -p procd -w
+  {
+  \t"name": "urngd", (esc)
+  \t"script": "/etc/init.d/urngd", (esc)
+  \t"instances": { (esc)
+  \t\t"instance1": { (esc)
+  \t\t\t"command": [ (esc)
+  \t\t\t\t"/sbin/urngd" (esc)
+  \t\t\t] (esc)
+  \t\t} (esc)
+  \t}, (esc)
+  \t"triggers": [ (esc)
+  \t\t (esc)
+  \t], (esc)
+  \t"data": { (esc)
+  \t\t (esc)
+  \t} (esc)
+  }
+
   $ jshn -n -i -p procd -w
   {
   \t"name": "urngd", (esc)
@@ -142,9 +223,31 @@ test json formatting with prepared environment:
   \t} (esc)
   } (no-eol)
 
+  $ jshn-san -n -i -p procd -w
+  {
+  \t"name": "urngd", (esc)
+  \t"script": "/etc/init.d/urngd", (esc)
+  \t"instances": { (esc)
+  \t\t"instance1": { (esc)
+  \t\t\t"command": [ (esc)
+  \t\t\t\t"/sbin/urngd" (esc)
+  \t\t\t] (esc)
+  \t\t} (esc)
+  \t}, (esc)
+  \t"triggers": [ (esc)
+  \t\t (esc)
+  \t], (esc)
+  \t"data": { (esc)
+  \t\t (esc)
+  \t} (esc)
+  } (no-eol)
+
   $ jshn -p procd -o test.json; cat test.json
   { "name": "urngd", "script": "\/etc\/init.d\/urngd", "instances": { "instance1": { "command": [ "\/sbin\/urngd" ] } }, "triggers": [ ], "data": { } }
 
+  $ jshn-san -p procd -o test.json; cat test.json
+  { "name": "urngd", "script": "\/etc\/init.d\/urngd", "instances": { "instance1": { "command": [ "\/sbin\/urngd" ] } }, "triggers": [ ], "data": { } }
+
   $ jshn -i -p procd -o test.json; cat test.json
   {
   \t"name": "urngd", (esc)
@@ -164,6 +267,25 @@ test json formatting with prepared environment:
   \t} (esc)
   }
 
+  $ jshn-san -i -p procd -o test.json; cat test.json
+  {
+  \t"name": "urngd", (esc)
+  \t"script": "/etc/init.d/urngd", (esc)
+  \t"instances": { (esc)
+  \t\t"instance1": { (esc)
+  \t\t\t"command": [ (esc)
+  \t\t\t\t"/sbin/urngd" (esc)
+  \t\t\t] (esc)
+  \t\t} (esc)
+  \t}, (esc)
+  \t"triggers": [ (esc)
+  \t\t (esc)
+  \t], (esc)
+  \t"data": { (esc)
+  \t\t (esc)
+  \t} (esc)
+  }
+
   $ jshn -n -i -p procd -o test.json; cat test.json
   {
   \t"name": "urngd", (esc)
@@ -183,7 +305,29 @@ test json formatting with prepared environment:
   \t} (esc)
   } (no-eol)
 
+  $ jshn-san -n -i -p procd -o test.json; cat test.json
+  {
+  \t"name": "urngd", (esc)
+  \t"script": "/etc/init.d/urngd", (esc)
+  \t"instances": { (esc)
+  \t\t"instance1": { (esc)
+  \t\t\t"command": [ (esc)
+  \t\t\t\t"/sbin/urngd" (esc)
+  \t\t\t] (esc)
+  \t\t} (esc)
+  \t}, (esc)
+  \t"triggers": [ (esc)
+  \t\t (esc)
+  \t], (esc)
+  \t"data": { (esc)
+  \t\t (esc)
+  \t} (esc)
+  } (no-eol)
+
   $ chmod oug= test.json
   $ jshn -n -i -p procd -o test.json
   Error opening test.json
   [3]
+  $ jshn-san -n -i -p procd -o test.json
+  Error opening test.json
+  [3]
diff --git a/tests/cram/test_json_script.t b/tests/cram/test_json_script.t
index 3e80a5c10b81..4af7f5414ab5 100644
--- a/tests/cram/test_json_script.t
+++ b/tests/cram/test_json_script.t
@@ -3,6 +3,7 @@ set test bin path:
   $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
   $ export TEST_INPUTS="$TESTDIR/inputs"
   $ alias js="valgrind --quiet --leak-check=full test-json-script"
+  $ alias js-san="test-json-script-san"
 
 check that json-script is producing expected results:
 
@@ -10,25 +11,46 @@ check that json-script is producing expected results:
   Usage: test-json-script [VARNAME=value] <filename_json_script>
   [254]
 
+  $ js-san
+  Usage: test-json-script-san [VARNAME=value] <filename_json_script>
+  [254]
+
   $ echo '}' > test.json; js test.json
   load JSON data from test.json failed.
 
+  $ echo '}' > test.json; js-san test.json
+  load JSON data from test.json failed.
+
   $ js nada.json 2>&1 | grep load.*failed
   load JSON data from nada.json failed.
 
+  $ js-san nada.json 2>&1 | grep load.*failed
+  load JSON data from nada.json failed.
+
   $ echo '[ [ ] [ ] ]' > test.json; js test.json
   load JSON data from test.json failed.
 
+  $ echo '[ [ ] [ ] ]' > test.json; js-san test.json
+  load JSON data from test.json failed.
+
 check example json-script:
 
   $ js $TEST_INPUTS/json-script.json
   exec  /%/
   exec_if_or 
 
+  $ js-san $TEST_INPUTS/json-script.json
+  exec  /%/
+  exec_if_or 
+
   $ js EXECVAR=meh ORVAR=meep $TEST_INPUTS/json-script.json
   exec meh /%/
   exec_if_or meep
 
+  $ js-san EXECVAR=meh ORVAR=meep $TEST_INPUTS/json-script.json
+  exec meh /%/
+  exec_if_or meep
+
 check has expression:
 
   $ echo '
@@ -43,12 +65,21 @@ check has expression:
   $ js VAR=foo test.json
   echo bar
 
+  $ js-san VAR=foo test.json
+  echo bar
+
   $ js VAR=bar test.json
   echo bar
 
+  $ js-san VAR=bar test.json
+  echo bar
+
   $ js test.json
   echo baz
 
+  $ js-san test.json
+  echo baz
+
 check eq expression:
 
   $ echo '
@@ -63,12 +94,21 @@ check eq expression:
   $ js VAR=bar test.json
   echo foo
 
+  $ js-san VAR=bar test.json
+  echo foo
+
   $ js VAR=xxx test.json
   echo baz
 
+  $ js-san VAR=xxx test.json
+  echo baz
+
   $ js test.json
   echo baz
 
+  $ js-san test.json
+  echo baz
+
 check regex single expression:
 
   $ echo '
@@ -83,14 +123,29 @@ check regex single expression:
   $ js VAR=hello test.json
   echo bar
 
+  $ js-san VAR=hello test.json
+  echo bar
+
   $ js VAR=.ell. test.json
   echo bar
 
+  $ js-san VAR=.ell. test.json
+  echo bar
+
   $ js test.json
   echo baz
 
+  $ js-san test.json
+  echo baz
+
   $ js VAR= test.json
   echo baz
 
+  $ js-san VAR= test.json
+  echo baz
+
   $ js VAR=hell test.json
   echo baz
+
+  $ js-san VAR=hell test.json
+  echo baz
diff --git a/tests/cram/test_list.t b/tests/cram/test_list.t
index f7f18bd3746d..81affad29f83 100644
--- a/tests/cram/test_list.t
+++ b/tests/cram/test_list.t
@@ -20,3 +20,23 @@ check that list is producing expected results:
   test_basics: list_for_each_entry_reverse: one eleven ten nine eight seven six five four three two 
   test_basics: delete all entries
   test_basics: list_empty: yes
+
+  $ test-list-san
+  test_basics: list_empty: yes
+  test_basics: list_add_tail: zero one two three four five six seven eight nine ten eleven twelve 
+  test_basics: list_empty: no
+  test_basics: first=zero last=twelve
+  test_basics: 'zero' is first, yes
+  test_basics: 'twelve' is last, yes
+  test_basics: removing 'twelve' and 'zero'
+  test_basics: first=one last=eleven
+  test_basics: 'one' is first, yes
+  test_basics: 'eleven' is last, yes
+  test_basics: moving 'one' to the tail
+  test_basics: first=two last=one
+  test_basics: 'two' is first, yes
+  test_basics: 'one' is last, yes
+  test_basics: list_for_each_entry: two three four five six seven eight nine ten eleven one 
+  test_basics: list_for_each_entry_reverse: one eleven ten nine eight seven six five four three two 
+  test_basics: delete all entries
+  test_basics: list_empty: yes
diff --git a/tests/cram/test_runqueue.t b/tests/cram/test_runqueue.t
index 4d4911047c18..227f41429557 100644
--- a/tests/cram/test_runqueue.t
+++ b/tests/cram/test_runqueue.t
@@ -12,3 +12,15 @@ check that runqueue is producing expected results:
   [1/1] cancel 'sleep 1'
   [0/1] finish 'sleep 1'
   All done!
+
+  $ test-runqueue-san
+  [1/1] start 'sleep 1'
+  [1/1] cancel 'sleep 1'
+  [0/1] finish 'sleep 1'
+  [1/1] start 'sleep 1'
+  [1/1] cancel 'sleep 1'
+  [0/1] finish 'sleep 1'
+  [1/1] start 'sleep 1'
+  [1/1] cancel 'sleep 1'
+  [0/1] finish 'sleep 1'
+  All done!

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:21 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:21 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 05/20] tests: add libFuzzer based
 tests
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-6-ynezz@true.cz>

LibFuzzer is in-process, coverage-guided, evolutionary fuzzing engine.

LibFuzzer is linked with the library under test, and feeds fuzzed inputs
to the library via a specific fuzzing entrypoint (aka "target
function"); the fuzzer then tracks which areas of the code are reached,
and generates mutations on the corpus of input data in order to maximize
the code coverage.

Lets use libFuzzer to fuzz blob and blobmsg parsing for the start.

Ref: https://llvm.org/docs/LibFuzzer.html
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 tests/CMakeLists.txt                          |   4 +
 tests/fuzz/CMakeLists.txt                     |  18 +++++
 .../71520a5c4b5ca73903216857abbad54a8002d44a  | Bin 0 -> 2 bytes
 .../c1dfd96eea8cc2b62785275bca38ac261256e278  |   1 +
 .../c42ac1c46f1d4e211c735cc7dfad4ff8391110e9  | Bin 0 -> 3 bytes
 tests/fuzz/corpus/valid-blobmsg.bin           | Bin 0 -> 176 bytes
 tests/fuzz/test-fuzz.c                        |  76 ++++++++++++++++++
 7 files changed, 99 insertions(+)
 create mode 100644 tests/fuzz/CMakeLists.txt
 create mode 100644 tests/fuzz/corpus/71520a5c4b5ca73903216857abbad54a8002d44a
 create mode 100644 tests/fuzz/corpus/c1dfd96eea8cc2b62785275bca38ac261256e278
 create mode 100644 tests/fuzz/corpus/c42ac1c46f1d4e211c735cc7dfad4ff8391110e9
 create mode 100644 tests/fuzz/corpus/valid-blobmsg.bin
 create mode 100644 tests/fuzz/test-fuzz.c

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index bd2205743318..0cb33427e45a 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -12,3 +12,7 @@ FOREACH(test_case ${test_cases})
   ADD_UNIT_TEST(${test_case})
   ADD_UNIT_TEST_SAN(${test_case})
 ENDFOREACH(test_case)
+
+IF(CMAKE_C_COMPILER_ID STREQUAL "Clang")
+  ADD_SUBDIRECTORY(fuzz)
+ENDIF()
diff --git a/tests/fuzz/CMakeLists.txt b/tests/fuzz/CMakeLists.txt
new file mode 100644
index 000000000000..cca74fd6ca12
--- /dev/null
+++ b/tests/fuzz/CMakeLists.txt
@@ -0,0 +1,18 @@
+FILE(GLOB test_cases "test-*.c")
+
+MACRO(ADD_FUZZER_TEST name)
+  ADD_EXECUTABLE(${name} ${name}.c)
+  TARGET_COMPILE_OPTIONS(${name} PRIVATE -g -O1 -fno-omit-frame-pointer -fsanitize=fuzzer,address,leak,undefined)
+  TARGET_INCLUDE_DIRECTORIES(${name} PRIVATE ${PROJECT_SOURCE_DIR})
+  TARGET_LINK_OPTIONS(${name} PRIVATE -stdlib=libc++ -fsanitize=fuzzer,address,leak,undefined)
+  TARGET_LINK_LIBRARIES(${name} ubox blobmsg_json json_script ${json})
+  ADD_TEST(
+    NAME ${name}
+    COMMAND ${name} -max_len=256 -timeout=10 -max_total_time=300 ${CMAKE_CURRENT_SOURCE_DIR}/corpus
+  )
+ENDMACRO(ADD_FUZZER_TEST)
+
+FOREACH(test_case ${test_cases})
+  GET_FILENAME_COMPONENT(test_case ${test_case} NAME_WE)
+  ADD_FUZZER_TEST(${test_case})
+ENDFOREACH(test_case)
diff --git a/tests/fuzz/corpus/71520a5c4b5ca73903216857abbad54a8002d44a b/tests/fuzz/corpus/71520a5c4b5ca73903216857abbad54a8002d44a
new file mode 100644
index 0000000000000000000000000000000000000000..b4e009dd6d7e91ff56595a84010db2eb81e41622
GIT binary patch
literal 2
Jcmcb}0004`0MY;e

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/c1dfd96eea8cc2b62785275bca38ac261256e278 b/tests/fuzz/corpus/c1dfd96eea8cc2b62785275bca38ac261256e278
new file mode 100644
index 000000000000..62f9457511f8
--- /dev/null
+++ b/tests/fuzz/corpus/c1dfd96eea8cc2b62785275bca38ac261256e278
@@ -0,0 +1 @@
+6
\ No newline at end of file
diff --git a/tests/fuzz/corpus/c42ac1c46f1d4e211c735cc7dfad4ff8391110e9 b/tests/fuzz/corpus/c42ac1c46f1d4e211c735cc7dfad4ff8391110e9
new file mode 100644
index 0000000000000000000000000000000000000000..3d70d85eba81360f757bc71859316667610c5339
GIT binary patch
literal 3
KcmZQ%U<3dF2LJ;A

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/valid-blobmsg.bin b/tests/fuzz/corpus/valid-blobmsg.bin
new file mode 100644
index 0000000000000000000000000000000000000000..2d0c68e8a1273ae12ac6d4401c7471927809a926
GIT binary patch
literal 176
zcmZo>V31>A&rK~ZPE1c_U|{e_&B at 8vQ7F$Z%1KcK@*9Cd3 at kaB#U%_3tqcr2Kp`+d
zVlyJKnK~F4BpBFI@=KF)K*ljRBy39qfhLeS93`p6B`Jv|i3|+5)B(*BU|`JvxdNn}
Rv6+E^kAW5J90ntx007e$BMSfk

literal 0
HcmV?d00001

diff --git a/tests/fuzz/test-fuzz.c b/tests/fuzz/test-fuzz.c
new file mode 100644
index 000000000000..7153847e0825
--- /dev/null
+++ b/tests/fuzz/test-fuzz.c
@@ -0,0 +1,76 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+
+#include "blob.h"
+#include "blobmsg.h"
+
+static void fuzz_blobmsg_parse(const uint8_t *data, size_t size)
+{
+	enum {
+		FOO_MESSAGE,
+		FOO_LIST,
+		FOO_TESTDATA,
+		__FOO_MAX
+	};
+
+	static const struct blobmsg_policy foo_policy[] = {
+		[FOO_MESSAGE] = {
+			.name = "message",
+			.type = BLOBMSG_TYPE_STRING,
+		},
+		[FOO_LIST] = {
+			.name = "list",
+			.type = BLOBMSG_TYPE_ARRAY,
+		},
+		[FOO_TESTDATA] = {
+			.name = "testdata",
+			.type = BLOBMSG_TYPE_TABLE,
+		},
+	};
+
+	struct blob_attr *tb[__FOO_MAX];
+
+	blobmsg_parse(foo_policy, __FOO_MAX, tb, (uint8_t *)data, size);
+	blobmsg_parse_array(foo_policy, __FOO_MAX, tb, (uint8_t *)data, size);
+}
+
+static void fuzz_blob_parse(const uint8_t *data, size_t size)
+{
+	enum {
+		FOO_ATTR_NESTED,
+		FOO_ATTR_BINARY,
+		FOO_ATTR_STRING,
+		FOO_ATTR_INT8,
+		FOO_ATTR_INT16,
+		FOO_ATTR_INT32,
+		FOO_ATTR_INT64,
+		FOO_ATTR_DOUBLE,
+		__FOO_ATTR_MAX
+	};
+
+
+	static const struct blob_attr_info foo_policy[__FOO_ATTR_MAX] = {
+		[FOO_ATTR_NESTED] = { .type = BLOB_ATTR_NESTED },
+		[FOO_ATTR_BINARY] = { .type = BLOB_ATTR_BINARY },
+		[FOO_ATTR_STRING] = { .type = BLOB_ATTR_STRING },
+		[FOO_ATTR_INT8] = { .type = BLOB_ATTR_INT8 },
+		[FOO_ATTR_INT16] = { .type = BLOB_ATTR_INT16 },
+		[FOO_ATTR_INT32] = { .type = BLOB_ATTR_INT32 },
+		[FOO_ATTR_INT64] = { .type = BLOB_ATTR_INT64 },
+		[FOO_ATTR_DOUBLE] = { .type = BLOB_ATTR_DOUBLE },
+	};
+
+	struct blob_attr *foo[__FOO_ATTR_MAX];
+	struct blob_attr *buf = (struct blob_attr *)data;
+
+	blob_parse(buf, foo, foo_policy, __FOO_ATTR_MAX);
+}
+
+int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+	fuzz_blob_parse(data, size);
+	fuzz_blobmsg_parse(data, size);
+
+	return 0;
+}

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:22 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:22 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 06/20] tests: add test cases for
 blob parsing
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-7-ynezz@true.cz>

Increasing test coverage.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 tests/cram/inputs/invalid.ucert   | Bin 0 -> 362 bytes
 tests/cram/inputs/key-build.ucert | Bin 0 -> 356 bytes
 tests/cram/test_blob_parse.t      |  76 +++++++++++++
 tests/test-blob-parse.c           | 175 ++++++++++++++++++++++++++++++
 4 files changed, 251 insertions(+)
 create mode 100644 tests/cram/inputs/invalid.ucert
 create mode 100644 tests/cram/inputs/key-build.ucert
 create mode 100644 tests/cram/test_blob_parse.t
 create mode 100644 tests/test-blob-parse.c

diff --git a/tests/cram/inputs/invalid.ucert b/tests/cram/inputs/invalid.ucert
new file mode 100644
index 0000000000000000000000000000000000000000..dbdeb725d490b51fb442ae3c5a5b90a32376f108
GIT binary patch
literal 362
zcmZwDyHbNt5P;!Lp`+9mmXtaa8pj0Uj74IIQG^6 at K{AdraLxfvJmkVPP<nX^U&g}M
z at HH%Kki^OvyWPLqZ;PTRJ~@C227tGC76ow_5zM2x?~_?{#)s6MmAjqsk0j%zQ`<q3
zWL3p#y<QVV?$#K{iA0soYQnH!>w-31Uf?$C_TsUrr8PYjbt&|wj_P)<(Qp~$*0OhO
zXW{fp_l6esQJNUkNV+UjQQEv4(A7!H#E$FbN4eLYChq8*g9^aM6Tmxc#fStEyaMdO
z&U%cp1t~8t0WSdiu$x$nVkemUn|OclmH&3KTF`)mR<!94+~M~#fDhY?*e+e`_>cW&
zjx5I8F=cqI|BJ0B6v<VJ4A0aYdEDr$;zdJMMhX*5O;%b$A2*H5cBeLJl>Y_z0WNxQ
A<p2Nx

literal 0
HcmV?d00001

diff --git a/tests/cram/inputs/key-build.ucert b/tests/cram/inputs/key-build.ucert
new file mode 100644
index 0000000000000000000000000000000000000000..8b347b1e3f63edcb0c37dd5f1d3e477cd91954ed
GIT binary patch
literal 356
zcmZvXJ5Pg99L4_~G|KGY$f#k^8Y$Gop$}>mp~XIs#+bmp7r6D(2X7dCd<wsegP+O4
z$x<g1w{w2O$@u})FaW$Ki#SZ8m|z|)gMcjJ3qGRWV$+?1e<B4hpF1v+WxFob8x2vC
zxI1&Cq%u`|`HW$~F$8_Q?%*!#50a^+XQGiwh8+2GSMz!|XuJ+fdp$UHifDdq_+uLf
zC`(OhrhQguC~Mu1XnxkVu<QBdN$GdzsW-Xgpa$^y4DbOv2_j((ZvY3dSH-wkk<D{}
z+AF{z?58%P*bSG#7Csz(mA{<iD;ko>j<@`gJN|wF2w-=WI2*4D{^NeTL^k7{gfd*&
r|CMc|6e)FzOyAO7W!fBSQm3h at 6O{>;uBdHch+F1Ww<pe;T($oLPOWSL

literal 0
HcmV?d00001

diff --git a/tests/cram/test_blob_parse.t b/tests/cram/test_blob_parse.t
new file mode 100644
index 000000000000..77d8bdd858b6
--- /dev/null
+++ b/tests/cram/test_blob_parse.t
@@ -0,0 +1,76 @@
+check that blob_parse is producing expected results:
+
+  $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
+  $ export TEST_INPUTS="$TESTDIR/inputs"
+  $ export FUZZ_CORPUS="$TESTDIR/../fuzz/corpus"
+
+  $ valgrind --quiet --leak-check=full test-blob-parse $TEST_INPUTS/key-build.ucert
+  === CHAIN ELEMENT 01 ===
+  signature:
+  ---
+  untrusted comment: signed by key 84bfc88a17166577
+  RWSEv8iKFxZld+bQ+NTqCdDlHOuVYNw5Qw7Q8shjfMgFJcTqrzaqO0bysjIQhTadmcwvWiWvHlyMcwAXSix2BYdfghz/zhDjvgU=
+  ---
+  payload:
+  ---
+  "ucert": {
+  \t"certtype": 1, (esc)
+  \t"validfrom": 1546188410, (esc)
+  \t"expiresat": 1577724410, (esc)
+  \t"pubkey": "untrusted comment: Local build key\\nRWSEv8iKFxZld6vicE1icWhYNfEV9PM7C9MKUKl+YNEKB+PdAWGDF5Z9\\n" (esc)
+  }
+  ---
+
+  $ valgrind --quiet --leak-check=full test-blob-parse $TEST_INPUTS/invalid.ucert
+  cannot parse cert invalid.ucert
+
+  $ test-blob-parse-san $TEST_INPUTS/key-build.ucert
+  === CHAIN ELEMENT 01 ===
+  signature:
+  ---
+  untrusted comment: signed by key 84bfc88a17166577
+  RWSEv8iKFxZld+bQ+NTqCdDlHOuVYNw5Qw7Q8shjfMgFJcTqrzaqO0bysjIQhTadmcwvWiWvHlyMcwAXSix2BYdfghz/zhDjvgU=
+  ---
+  payload:
+  ---
+  "ucert": {
+  \t"certtype": 1, (esc)
+  \t"validfrom": 1546188410, (esc)
+  \t"expiresat": 1577724410, (esc)
+  \t"pubkey": "untrusted comment: Local build key\\nRWSEv8iKFxZld6vicE1icWhYNfEV9PM7C9MKUKl+YNEKB+PdAWGDF5Z9\\n" (esc)
+  }
+  ---
+
+  $ test-blob-parse-san $TEST_INPUTS/invalid.ucert
+  cannot parse cert invalid.ucert
+
+  $ for blob in $(LC_ALL=C find $FUZZ_CORPUS -type f | sort ); do
+  >   valgrind --quiet --leak-check=full test-blob-parse $blob; \
+  >   test-blob-parse-san $blob; \
+  > done
+  cannot parse cert 71520a5c4b5ca73903216857abbad54a8002d44a
+  cannot parse cert 71520a5c4b5ca73903216857abbad54a8002d44a
+  cannot parse cert c1dfd96eea8cc2b62785275bca38ac261256e278
+  cannot parse cert c1dfd96eea8cc2b62785275bca38ac261256e278
+  cannot parse cert c42ac1c46f1d4e211c735cc7dfad4ff8391110e9
+  cannot parse cert c42ac1c46f1d4e211c735cc7dfad4ff8391110e9
+  cannot parse cert crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
+  cannot parse cert crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
+  cannot parse cert crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
+  cannot parse cert crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
+  cannot parse cert crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
+  cannot parse cert crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
+  cannot parse cert crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
+  cannot parse cert crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
+  cannot parse cert crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
+  cannot parse cert crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
+  cannot parse cert crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
+  cannot parse cert crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
+  cannot parse cert crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
+  cannot parse cert crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
+  cannot parse cert crash-df9d1243057b27bbad6211e5a23d1cb699028aa2
+  cannot parse cert crash-df9d1243057b27bbad6211e5a23d1cb699028aa2
+  cannot parse cert crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2
+  cannot parse cert crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2
+  cannot parse cert valid-blobmsg.bin
+  cannot parse cert valid-blobmsg.bin
diff --git a/tests/test-blob-parse.c b/tests/test-blob-parse.c
new file mode 100644
index 000000000000..6b1fb56485da
--- /dev/null
+++ b/tests/test-blob-parse.c
@@ -0,0 +1,175 @@
+/*
+ * Based on certificate dump functionality from ucert.c:
+ *
+ *  Copyright (C) 2018 Daniel Golle <daniel at makrotopia.org>
+ *  SPDX-License-Identifier: GPL-3.0
+ *
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <libgen.h>
+
+#include "blob.h"
+#include "list.h"
+#include "blobmsg_json.h"
+
+#define CERT_BUF_LEN 4096
+
+/*
+ * ucert structure
+ * |               BLOB                    |
+ * |    SIGNATURE    |       PAYLOAD       |
+ * |                 |[ BLOBMSG CONTAINER ]|
+ * |                 |[[T,i,v,e,f,pubkey ]]|
+ */
+enum cert_attr {
+	CERT_ATTR_SIGNATURE,
+	CERT_ATTR_PAYLOAD,
+	CERT_ATTR_MAX
+};
+
+static const struct blob_attr_info cert_policy[CERT_ATTR_MAX] = {
+	[CERT_ATTR_SIGNATURE] = { .type = BLOB_ATTR_BINARY },
+	[CERT_ATTR_PAYLOAD] = { .type = BLOB_ATTR_NESTED },
+};
+
+enum cert_cont_attr {
+	CERT_CT_ATTR_PAYLOAD,
+	CERT_CT_ATTR_MAX
+};
+
+enum cert_payload_attr {
+	CERT_PL_ATTR_CERTTYPE,
+	CERT_PL_ATTR_CERTID,
+	CERT_PL_ATTR_VALIDFROMTIME,
+	CERT_PL_ATTR_EXPIRETIME,
+	CERT_PL_ATTR_PUBKEY,
+	CERT_PL_ATTR_KEY_FINGERPRINT,
+	CERT_PL_ATTR_MAX
+};
+
+enum certtype_id {
+	CERTTYPE_UNSPEC,
+	CERTTYPE_AUTH,
+	CERTTYPE_REVOKE
+};
+
+/* list to store certificate chain at runtime */
+struct cert_object {
+	struct list_head list;
+	struct blob_attr *cert[CERT_ATTR_MAX];
+};
+
+static int cert_load(const char *certfile, struct list_head *chain)
+{
+	FILE *f;
+	struct blob_attr *certtb[CERT_ATTR_MAX];
+	struct blob_attr *bufpt;
+	struct cert_object *cobj;
+	char filebuf[CERT_BUF_LEN];
+	int ret = 0, pret = 0;
+	size_t len, pos = 0;
+
+	f = fopen(certfile, "r");
+	if (!f)
+		return 1;
+
+	len = fread(&filebuf, 1, CERT_BUF_LEN - 1, f);
+	if (len < 64)
+		return 1;
+
+	ret = ferror(f) || !feof(f);
+	fclose(f);
+	if (ret)
+		return 1;
+
+	bufpt = (struct blob_attr *)filebuf;
+	do {
+		pret = blob_parse(bufpt, certtb, cert_policy, CERT_ATTR_MAX);
+		if (pret <= 0)
+			/* no attributes found */
+			break;
+
+		if (pos + blob_pad_len(bufpt) > len)
+			/* blob exceeds filebuffer */
+			break;
+		else
+			pos += blob_pad_len(bufpt);
+
+		if (!certtb[CERT_ATTR_SIGNATURE])
+			/* no signature -> drop */
+			break;
+
+		cobj = calloc(1, sizeof(*cobj));
+		cobj->cert[CERT_ATTR_SIGNATURE] = blob_memdup(certtb[CERT_ATTR_SIGNATURE]);
+		if (certtb[CERT_ATTR_PAYLOAD])
+			cobj->cert[CERT_ATTR_PAYLOAD] = blob_memdup(certtb[CERT_ATTR_PAYLOAD]);
+
+		list_add_tail(&cobj->list, chain);
+		ret += pret;
+	/* repeat parsing while there is still enough remaining data in buffer */
+	} while(len > pos + sizeof(struct blob_attr) && (bufpt = blob_next(bufpt)));
+
+	return (ret <= 0);
+}
+
+/* dump single chain element to console */
+static void cert_dump_blob(struct blob_attr *cert[CERT_ATTR_MAX])
+{
+	int i;
+	char *json = NULL;
+
+	for (i = 0; i < CERT_ATTR_MAX; i++) {
+		struct blob_attr *v = cert[i];
+
+		if (!v)
+			continue;
+
+		switch(cert_policy[i].type) {
+		case BLOB_ATTR_BINARY:
+			fprintf(stdout, "signature:\n---\n%s---\n", (char *) blob_data(v));
+			break;
+		case BLOB_ATTR_NESTED:
+			json = blobmsg_format_json_indent(blob_data(v), false, 0);
+			if (!json)
+				continue;
+
+			fprintf(stdout, "payload:\n---\n%s\n---\n", json);
+			free(json);
+			break;
+		}
+	}
+}
+
+static int cert_dump(const char *certfile)
+{
+	struct cert_object *cobj;
+	static LIST_HEAD(certchain);
+	unsigned int count = 0;
+
+	if (cert_load(certfile, &certchain)) {
+		fprintf(stderr, "cannot parse cert %s\n", basename((char *) certfile));
+		return 1;
+	}
+
+	list_for_each_entry(cobj, &certchain, list) {
+		fprintf(stdout, "=== CHAIN ELEMENT %02u ===\n", ++count);
+		cert_dump_blob(cobj->cert);
+	}
+
+	return 0;
+}
+
+int main(int argc, char *argv[])
+{
+	if (argc != 2) {
+		fprintf(stderr, "Usage: %s <cert.ucert>\n", argv[0]);
+		return 3;
+	}
+
+	cert_dump(argv[1]);
+
+	return 0;
+}

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:23 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:23 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 07/20] test: fuzz: add blob_parse
 crashes
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-8-ynezz@true.cz>

==5872==ERROR: AddressSanitizer: SEGV on unknown address 0x6020004100b4
==5872==The signal is caused by a READ memory access.
    #0 blob_data blob.h
    #1 blob_parse blob.c:228:2

Signed-off-by: Petr ??tetiar <ynezz at true.cz>
---
 .../crash-1b8fb1be45db3aff7699100f497fb74138f3df4f | Bin 0 -> 6 bytes
 .../crash-98595faa58ba01d85ba4fd0b109cd3d490b45795 | Bin 0 -> 6 bytes
 .../crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1 |   1 +
 .../crash-df9d1243057b27bbad6211e5a23d1cb699028aa2 | Bin 0 -> 16 bytes
 4 files changed, 1 insertion(+)
 create mode 100644 tests/fuzz/corpus/crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
 create mode 100644 tests/fuzz/corpus/crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
 create mode 100644 tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
 create mode 100644 tests/fuzz/corpus/crash-df9d1243057b27bbad6211e5a23d1cb699028aa2

diff --git a/tests/fuzz/corpus/crash-1b8fb1be45db3aff7699100f497fb74138f3df4f b/tests/fuzz/corpus/crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
new file mode 100644
index 0000000000000000000000000000000000000000..407114eb1a9fc2c82f40cac9948c75ac23948385
GIT binary patch
literal 6
Lcmd;L00Kt<0D}Nb

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-98595faa58ba01d85ba4fd0b109cd3d490b45795 b/tests/fuzz/corpus/crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
new file mode 100644
index 0000000000000000000000000000000000000000..530ae8f6c1f7b9fa3ed86d1bf66b7e0a6d8b7485
GIT binary patch
literal 6
Ncmd<$;^Jap0{{TP051Rl

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1 b/tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
new file mode 100644
index 000000000000..46b749ee7968
--- /dev/null
+++ b/tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
@@ -0,0 +1 @@
+?????
diff --git a/tests/fuzz/corpus/crash-df9d1243057b27bbad6211e5a23d1cb699028aa2 b/tests/fuzz/corpus/crash-df9d1243057b27bbad6211e5a23d1cb699028aa2
new file mode 100644
index 0000000000000000000000000000000000000000..f6899b51bcb4283949208b7937e9a4ce3a7ef13c
GIT binary patch
literal 16
RcmZQzVBln8U;rWr4FCY<02=@R

literal 0
HcmV?d00001


-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:24 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:24 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 08/20] blob: refactor attr parsing
 into separate function
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-9-ynezz@true.cz>

Making blob_parse easier to review.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 blob.c | 61 +++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 35 insertions(+), 26 deletions(-)

diff --git a/blob.c b/blob.c
index 9b3d8abe330a..ee93894b9e6f 100644
--- a/blob.c
+++ b/blob.c
@@ -217,44 +217,53 @@ blob_check_type(const void *ptr, unsigned int len, int type)
 	return true;
 }
 
-int
-blob_parse(struct blob_attr *attr, struct blob_attr **data, const struct blob_attr_info *info, int max)
+static int
+blob_parse_attr(struct blob_attr *attr, struct blob_attr **data, const struct blob_attr_info *info, int max)
 {
-	struct blob_attr *pos;
 	int found = 0;
-	size_t rem;
+	int id = blob_id(attr);
+	size_t len = blob_len(attr);
 
-	memset(data, 0, sizeof(struct blob_attr *) * max);
-	blob_for_each_attr(pos, attr, rem) {
-		int id = blob_id(pos);
-		size_t len = blob_len(pos);
+	if (id >= max)
+		return 0;
 
-		if (id >= max)
-			continue;
+	if (info) {
+		int type = info[id].type;
 
-		if (info) {
-			int type = info[id].type;
+		if (type < BLOB_ATTR_LAST) {
+			if (!blob_check_type(blob_data(attr), len, type))
+				return 0;
+		}
 
-			if (type < BLOB_ATTR_LAST) {
-				if (!blob_check_type(blob_data(pos), len, type))
-					continue;
-			}
+		if (info[id].minlen && len < info[id].minlen)
+			return 0;
 
-			if (info[id].minlen && len < info[id].minlen)
-				continue;
+		if (info[id].maxlen && len > info[id].maxlen)
+			return 0;
 
-			if (info[id].maxlen && len > info[id].maxlen)
-				continue;
+		if (info[id].validate && !info[id].validate(&info[id], attr))
+			return 0;
+	}
 
-			if (info[id].validate && !info[id].validate(&info[id], pos))
-				continue;
-		}
+	if (!data[id])
+		found++;
 
-		if (!data[id])
-			found++;
+	data[id] = attr;
+	return found;
+}
 
-		data[id] = pos;
+int
+blob_parse(struct blob_attr *attr, struct blob_attr **data, const struct blob_attr_info *info, int max)
+{
+	struct blob_attr *pos;
+	int found = 0;
+	size_t rem;
+
+	memset(data, 0, sizeof(struct blob_attr *) * max);
+	blob_for_each_attr(pos, attr, rem) {
+		found += blob_parse_attr(pos, data, info, max);
 	}
+
 	return found;
 }
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:25 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:25 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 09/20] blob: introduce
 blob_parse_untrusted
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-10-ynezz@true.cz>

blob_parse can be only used on trusted input as it has no possibility to
check the length of the provided input buffer, which might lead to
undefined behaviour and/or crashes when supplied with malformed,
corrupted or otherwise specially crafted input.

So this introduces blob_parse_untrusted variant which expects additional
input buffer length argument and thus should be able to process also
inputs from untrusted sources.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 blob.c | 24 ++++++++++++++++++++++++
 blob.h |  7 +++++++
 2 files changed, 31 insertions(+)

diff --git a/blob.c b/blob.c
index ee93894b9e6f..dc908d9ea745 100644
--- a/blob.c
+++ b/blob.c
@@ -252,6 +252,30 @@ blob_parse_attr(struct blob_attr *attr, struct blob_attr **data, const struct bl
 	return found;
 }
 
+int
+blob_parse_untrusted(struct blob_attr *attr, size_t attr_len, struct blob_attr **data, const struct blob_attr_info *info, int max)
+{
+	struct blob_attr *pos;
+	size_t len = 0;
+	int found = 0;
+	size_t rem;
+
+	if (!attr || attr_len < sizeof(struct blob_attr))
+		return 0;
+
+	len = blob_raw_len(attr);
+	if (len != attr_len)
+		return 0;
+
+	memset(data, 0, sizeof(struct blob_attr *) * max);
+	blob_for_each_attr_len(pos, attr, len, rem) {
+		found += blob_parse_attr(pos, rem, data, info, max);
+	}
+
+	return found;
+}
+
+/* use only on trusted input, otherwise consider blob_parse_untrusted */
 int
 blob_parse(struct blob_attr *attr, struct blob_attr **data, const struct blob_attr_info *info, int max)
 {
diff --git a/blob.h b/blob.h
index d34652229b59..af033607e309 100644
--- a/blob.h
+++ b/blob.h
@@ -199,6 +199,7 @@ extern void blob_nest_end(struct blob_buf *buf, void *cookie);
 extern struct blob_attr *blob_put(struct blob_buf *buf, int id, const void *ptr, unsigned int len);
 extern bool blob_check_type(const void *ptr, unsigned int len, int type);
 extern int blob_parse(struct blob_attr *attr, struct blob_attr **data, const struct blob_attr_info *info, int max);
+extern int blob_parse_untrusted(struct blob_attr *attr, size_t attr_len, struct blob_attr **data, const struct blob_attr_info *info, int max);
 extern struct blob_attr *blob_memdup(struct blob_attr *attr);
 extern struct blob_attr *blob_put_raw(struct blob_buf *buf, const void *ptr, unsigned int len);
 
@@ -254,5 +255,11 @@ blob_put_u64(struct blob_buf *buf, int id, uint64_t val)
 	     (blob_pad_len(pos) >= sizeof(struct blob_attr)); \
 	     rem -= blob_pad_len(pos), pos = blob_next(pos))
 
+#define blob_for_each_attr_len(pos, attr, attr_len, rem) \
+	for (rem = attr ? blob_len(attr) : 0, \
+	     pos = (struct blob_attr *) (attr ? blob_data(attr) : NULL); \
+	     rem >= sizeof(struct blob_attr) && rem < attr_len && (blob_pad_len(pos) <= rem) && \
+	     (blob_pad_len(pos) >= sizeof(struct blob_attr)); \
+	     rem -= blob_pad_len(pos), pos = blob_next(pos))
 
 #endif

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:26 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:26 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 10/20] tests: use
 blob_parse_untrusted variant
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-11-ynezz@true.cz>

In order to be able to use invalid input for testing as well.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 tests/fuzz/test-fuzz.c  | 2 +-
 tests/test-blob-parse.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/fuzz/test-fuzz.c b/tests/fuzz/test-fuzz.c
index 7153847e0825..52f2bbce878f 100644
--- a/tests/fuzz/test-fuzz.c
+++ b/tests/fuzz/test-fuzz.c
@@ -64,7 +64,7 @@ static void fuzz_blob_parse(const uint8_t *data, size_t size)
 	struct blob_attr *foo[__FOO_ATTR_MAX];
 	struct blob_attr *buf = (struct blob_attr *)data;
 
-	blob_parse(buf, foo, foo_policy, __FOO_ATTR_MAX);
+	blob_parse_untrusted(buf, size, foo, foo_policy, __FOO_ATTR_MAX);
 }
 
 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
diff --git a/tests/test-blob-parse.c b/tests/test-blob-parse.c
index 6b1fb56485da..6d65eb4995b5 100644
--- a/tests/test-blob-parse.c
+++ b/tests/test-blob-parse.c
@@ -87,7 +87,7 @@ static int cert_load(const char *certfile, struct list_head *chain)
 
 	bufpt = (struct blob_attr *)filebuf;
 	do {
-		pret = blob_parse(bufpt, certtb, cert_policy, CERT_ATTR_MAX);
+		pret = blob_parse_untrusted(bufpt, len, certtb, cert_policy, CERT_ATTR_MAX);
 		if (pret <= 0)
 			/* no attributes found */
 			break;

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:27 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:27 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 11/20] blob: fix OOB access in
 blob_check_type
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-12-ynezz@true.cz>

Found by fuzzer:

 ERROR: AddressSanitizer: SEGV on unknown address 0x602100000455
 The signal is caused by a READ memory access.
     #0 in blob_check_type blob.c:214:43
     #1 in blob_parse_attr blob.c:234:9
     #2 in blob_parse_untrusted blob.c:272:12
     #3 in fuzz_blob_parse tests/fuzzer/test-blob-parse-fuzzer.c:34:2
     #4 in LLVMFuzzerTestOneInput tests/fuzzer/test-blob-parse-fuzzer.c:39:2

Caused by following line:

	if (type == BLOB_ATTR_STRING && data[len - 1] != 0)

where len was pointing outside of the data buffer.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 blob.c                                        |  23 ++++++++++++++----
 tests/cram/test_blob_parse.t                  |   2 ++
 ...h-333757b203a44751d3535f24b05f467183a96d09 | Bin 0 -> 10 bytes
 3 files changed, 20 insertions(+), 5 deletions(-)
 create mode 100644 tests/fuzz/corpus/crash-333757b203a44751d3535f24b05f467183a96d09

diff --git a/blob.c b/blob.c
index dc908d9ea745..528e717615d6 100644
--- a/blob.c
+++ b/blob.c
@@ -218,20 +218,33 @@ blob_check_type(const void *ptr, unsigned int len, int type)
 }
 
 static int
-blob_parse_attr(struct blob_attr *attr, struct blob_attr **data, const struct blob_attr_info *info, int max)
+blob_parse_attr(struct blob_attr *attr, size_t attr_len, struct blob_attr **data, const struct blob_attr_info *info, int max)
 {
+	int id;
+	size_t len;
 	int found = 0;
-	int id = blob_id(attr);
-	size_t len = blob_len(attr);
+	size_t data_len;
 
+	if (!attr || attr_len < sizeof(struct blob_attr))
+		return 0;
+
+	id = blob_id(attr);
 	if (id >= max)
 		return 0;
 
+	len = blob_raw_len(attr);
+	if (len > attr_len || len < sizeof(struct blob_attr))
+		return 0;
+
+	data_len = blob_len(attr);
+	if (data_len > len)
+		return 0;
+
 	if (info) {
 		int type = info[id].type;
 
 		if (type < BLOB_ATTR_LAST) {
-			if (!blob_check_type(blob_data(attr), len, type))
+			if (!blob_check_type(blob_data(attr), data_len, type))
 				return 0;
 		}
 
@@ -285,7 +298,7 @@ blob_parse(struct blob_attr *attr, struct blob_attr **data, const struct blob_at
 
 	memset(data, 0, sizeof(struct blob_attr *) * max);
 	blob_for_each_attr(pos, attr, rem) {
-		found += blob_parse_attr(pos, data, info, max);
+		found += blob_parse_attr(pos, rem, data, info, max);
 	}
 
 	return found;
diff --git a/tests/cram/test_blob_parse.t b/tests/cram/test_blob_parse.t
index 77d8bdd858b6..1fd60bc71122 100644
--- a/tests/cram/test_blob_parse.t
+++ b/tests/cram/test_blob_parse.t
@@ -56,6 +56,8 @@ check that blob_parse is producing expected results:
   cannot parse cert c42ac1c46f1d4e211c735cc7dfad4ff8391110e9
   cannot parse cert crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
   cannot parse cert crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
+  cannot parse cert crash-333757b203a44751d3535f24b05f467183a96d09
+  cannot parse cert crash-333757b203a44751d3535f24b05f467183a96d09
   cannot parse cert crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
   cannot parse cert crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
   cannot parse cert crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
diff --git a/tests/fuzz/corpus/crash-333757b203a44751d3535f24b05f467183a96d09 b/tests/fuzz/corpus/crash-333757b203a44751d3535f24b05f467183a96d09
new file mode 100644
index 0000000000000000000000000000000000000000..b9a958e08d457aaeb05102bb0d654428ffca161e
GIT binary patch
literal 10
RcmZQzVBlh6U|=$10002a07U=*

literal 0
HcmV?d00001


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:28 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:28 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 12/20] test: fuzz: add
 blobmsg_check_attr crashes
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-13-ynezz@true.cz>

 ==31775==ERROR: AddressSanitizer: SEGV on unknown address 0x604000a7c715
 ==31775==The signal is caused by a READ memory access.
    #0 blobmsg_check_attr blobmsg.c:48:6
    #1 blobmsg_parse_array blobmsg.c:118:8
    #2 fuzz_blobmsg_parse test-blobmsg-parse-fuzzer.c:35:2

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 .../crash-4c4d2c3c9ade5da9347534e290305c3b9760f627 | Bin 0 -> 17 bytes
 .../crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b | Bin 0 -> 86 bytes
 .../crash-75b146c4e6fac64d3e62236b27c64b50657bab2a | Bin 0 -> 4 bytes
 .../crash-813f3e68661da09c26d4a87dbb9d5099e92be50f | Bin 0 -> 36 bytes
 .../crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2 | Bin 0 -> 66 bytes
 5 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 tests/fuzz/corpus/crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
 create mode 100644 tests/fuzz/corpus/crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
 create mode 100644 tests/fuzz/corpus/crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
 create mode 100644 tests/fuzz/corpus/crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
 create mode 100644 tests/fuzz/corpus/crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2

diff --git a/tests/fuzz/corpus/crash-4c4d2c3c9ade5da9347534e290305c3b9760f627 b/tests/fuzz/corpus/crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
new file mode 100644
index 0000000000000000000000000000000000000000..2ca392f0c6109a4b0d6cf44ed18d69133addd8ca
GIT binary patch
literal 17
NcmZQ(U|@cV3;<Ep3#b49

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b b/tests/fuzz/corpus/crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
new file mode 100644
index 0000000000000000000000000000000000000000..b49d3e7de86e2402f1d182aad74819a2c0abd8cc
GIT binary patch
literal 86
OcmZQ(U|_yRbpQY#s6>+h

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-75b146c4e6fac64d3e62236b27c64b50657bab2a b/tests/fuzz/corpus/crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
new file mode 100644
index 0000000000000000000000000000000000000000..39ae859cc00ce0c4b80c5a1d0bf031b6a6310ce0
GIT binary patch
literal 4
LcmZQ(U|<3O01^NO

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-813f3e68661da09c26d4a87dbb9d5099e92be50f b/tests/fuzz/corpus/crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
new file mode 100644
index 0000000000000000000000000000000000000000..62338ff4f0801529d0f6598c02bfbb9c57b5533c
GIT binary patch
literal 36
QcmZQ(U|{}_7cese01OQs?*IS*

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2 b/tests/fuzz/corpus/crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2
new file mode 100644
index 0000000000000000000000000000000000000000..92a30d23706ee628d4a076fcbe0b7613650c2039
GIT binary patch
literal 66
QcmZQ(U|{}F0bphZ0GOFO(EtDd

literal 0
HcmV?d00001


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:29 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:29 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 13/20] tests: add test cases for
 blobmsg parsing
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-14-ynezz@true.cz>

Increasing test coverage.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 tests/cram/test_blobmsg_parse.t | 65 +++++++++++++++++++++++++++++
 tests/test-blobmsg-parse.c      | 74 +++++++++++++++++++++++++++++++++
 2 files changed, 139 insertions(+)
 create mode 100644 tests/cram/test_blobmsg_parse.t
 create mode 100644 tests/test-blobmsg-parse.c

diff --git a/tests/cram/test_blobmsg_parse.t b/tests/cram/test_blobmsg_parse.t
new file mode 100644
index 000000000000..37e09ce33f1a
--- /dev/null
+++ b/tests/cram/test_blobmsg_parse.t
@@ -0,0 +1,65 @@
+check that blobmsg_parse is producing expected results:
+
+  $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
+  $ export FUZZ_CORPUS="$TESTDIR/../fuzz/corpus"
+
+  $ for blob in $(LC_ALL=C find $FUZZ_CORPUS -type f | sort ); do
+  >   valgrind --quiet --leak-check=full test-blobmsg-parse $blob; \
+  >   test-blobmsg-parse-san $blob; \
+  > done
+  71520a5c4b5ca73903216857abbad54a8002d44a: blobmsg_parse: ... (0)
+  71520a5c4b5ca73903216857abbad54a8002d44a: blobmsg_parse_array: ... (0)
+  71520a5c4b5ca73903216857abbad54a8002d44a: blobmsg_parse: ... (0)
+  71520a5c4b5ca73903216857abbad54a8002d44a: blobmsg_parse_array: ... (0)
+  c1dfd96eea8cc2b62785275bca38ac261256e278: blobmsg_parse: ... (0)
+  c1dfd96eea8cc2b62785275bca38ac261256e278: blobmsg_parse_array: ... (0)
+  c1dfd96eea8cc2b62785275bca38ac261256e278: blobmsg_parse: ... (0)
+  c1dfd96eea8cc2b62785275bca38ac261256e278: blobmsg_parse_array: ... (0)
+  c42ac1c46f1d4e211c735cc7dfad4ff8391110e9: blobmsg_parse: ... (0)
+  c42ac1c46f1d4e211c735cc7dfad4ff8391110e9: blobmsg_parse_array: ... (0)
+  c42ac1c46f1d4e211c735cc7dfad4ff8391110e9: blobmsg_parse: ... (0)
+  c42ac1c46f1d4e211c735cc7dfad4ff8391110e9: blobmsg_parse_array: ... (0)
+  crash-1b8fb1be45db3aff7699100f497fb74138f3df4f: blobmsg_parse: ... (0)
+  crash-1b8fb1be45db3aff7699100f497fb74138f3df4f: blobmsg_parse_array: ... (0)
+  crash-1b8fb1be45db3aff7699100f497fb74138f3df4f: blobmsg_parse: ... (0)
+  crash-1b8fb1be45db3aff7699100f497fb74138f3df4f: blobmsg_parse_array: ... (0)
+  crash-333757b203a44751d3535f24b05f467183a96d09: blobmsg_parse: ... (0)
+  crash-333757b203a44751d3535f24b05f467183a96d09: blobmsg_parse_array: ... (0)
+  crash-333757b203a44751d3535f24b05f467183a96d09: blobmsg_parse: ... (0)
+  crash-333757b203a44751d3535f24b05f467183a96d09: blobmsg_parse_array: ... (0)
+  crash-4c4d2c3c9ade5da9347534e290305c3b9760f627: blobmsg_parse: ... (0)
+  crash-4c4d2c3c9ade5da9347534e290305c3b9760f627: blobmsg_parse_array: ... (-1)
+  crash-4c4d2c3c9ade5da9347534e290305c3b9760f627: blobmsg_parse: ... (0)
+  crash-4c4d2c3c9ade5da9347534e290305c3b9760f627: blobmsg_parse_array: ... (-1)
+  crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b: blobmsg_parse: ... (0)
+  crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b: blobmsg_parse_array: ... (-1)
+  crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b: blobmsg_parse: ... (0)
+  crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b: blobmsg_parse_array: ... (-1)
+  crash-75b146c4e6fac64d3e62236b27c64b50657bab2a: blobmsg_parse: ... (0)
+  crash-75b146c4e6fac64d3e62236b27c64b50657bab2a: blobmsg_parse_array: ... (-1)
+  crash-75b146c4e6fac64d3e62236b27c64b50657bab2a: blobmsg_parse: ... (0)
+  crash-75b146c4e6fac64d3e62236b27c64b50657bab2a: blobmsg_parse_array: ... (-1)
+  crash-813f3e68661da09c26d4a87dbb9d5099e92be50f: blobmsg_parse: ... (0)
+  crash-813f3e68661da09c26d4a87dbb9d5099e92be50f: blobmsg_parse_array: ... (-1)
+  crash-813f3e68661da09c26d4a87dbb9d5099e92be50f: blobmsg_parse: ... (0)
+  crash-813f3e68661da09c26d4a87dbb9d5099e92be50f: blobmsg_parse_array: ... (-1)
+  crash-98595faa58ba01d85ba4fd0b109cd3d490b45795: blobmsg_parse: ... (0)
+  crash-98595faa58ba01d85ba4fd0b109cd3d490b45795: blobmsg_parse_array: ... (0)
+  crash-98595faa58ba01d85ba4fd0b109cd3d490b45795: blobmsg_parse: ... (0)
+  crash-98595faa58ba01d85ba4fd0b109cd3d490b45795: blobmsg_parse_array: ... (0)
+  crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1: blobmsg_parse: ... (0)
+  crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1: blobmsg_parse_array: ... (0)
+  crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1: blobmsg_parse: ... (0)
+  crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1: blobmsg_parse_array: ... (0)
+  crash-df9d1243057b27bbad6211e5a23d1cb699028aa2: blobmsg_parse: ... (0)
+  crash-df9d1243057b27bbad6211e5a23d1cb699028aa2: blobmsg_parse_array: ... (0)
+  crash-df9d1243057b27bbad6211e5a23d1cb699028aa2: blobmsg_parse: ... (0)
+  crash-df9d1243057b27bbad6211e5a23d1cb699028aa2: blobmsg_parse_array: ... (0)
+  crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2: blobmsg_parse: ... (0)
+  crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2: blobmsg_parse_array: ... (-1)
+  crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2: blobmsg_parse: ... (0)
+  crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2: blobmsg_parse_array: ... (-1)
+  valid-blobmsg.bin: blobmsg_parse: MLT (0)
+  valid-blobmsg.bin: blobmsg_parse_array: MLT (0)
+  valid-blobmsg.bin: blobmsg_parse: MLT (0)
+  valid-blobmsg.bin: blobmsg_parse_array: MLT (0)
diff --git a/tests/test-blobmsg-parse.c b/tests/test-blobmsg-parse.c
new file mode 100644
index 000000000000..ca710fd58663
--- /dev/null
+++ b/tests/test-blobmsg-parse.c
@@ -0,0 +1,74 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <libgen.h>
+
+#include "blobmsg.h"
+
+enum {
+	FOO_MESSAGE,
+	FOO_LIST,
+	FOO_TESTDATA,
+	__FOO_MAX
+};
+
+static const struct blobmsg_policy foo_policy[] = {
+	[FOO_MESSAGE] = {
+		.name = "message",
+		.type = BLOBMSG_TYPE_STRING,
+	},
+	[FOO_LIST] = {
+		.name = "list",
+		.type = BLOBMSG_TYPE_ARRAY,
+	},
+	[FOO_TESTDATA] = {
+		.name = "testdata",
+		.type = BLOBMSG_TYPE_TABLE,
+	},
+};
+
+static void dump_result(const char *fn, int r, const char *filename, struct blob_attr **tb)
+{
+	fprintf(stdout, "%s: %s: %c%c%c (%d)\n", basename((char *) filename), fn,
+		tb[FOO_MESSAGE] ? 'M' : '.',
+		tb[FOO_LIST] ? 'L' : '.',
+		tb[FOO_TESTDATA] ? 'T' : '.',
+		r);
+}
+
+static void test_blobmsg(const char *filename)
+{
+#define BUF_LEN 256
+	int r = 0;
+	FILE *fd = NULL;
+	size_t len = 0;
+	char buf[BUF_LEN+1] = { 0 };
+	struct blob_attr *tb[__FOO_MAX];
+
+	fd = fopen(filename, "r");
+	if (!fd) {
+		fprintf(stderr, "unable to open %s", filename);
+		return;
+	}
+
+	len = fread(&buf, 1, BUF_LEN, fd);
+	fclose(fd);
+
+	r = blobmsg_parse(foo_policy, ARRAY_SIZE(foo_policy), tb, buf, len);
+	dump_result("blobmsg_parse", r, filename, tb);
+
+	r = blobmsg_parse_array(foo_policy, ARRAY_SIZE(foo_policy), tb, buf, len);
+	dump_result("blobmsg_parse_array", r, filename, tb);
+}
+
+int main(int argc, char *argv[])
+{
+	if (argc != 2) {
+		fprintf(stderr, "Usage: %s <blobmsg.bin>\n", argv[0]);
+		return 3;
+	}
+
+	test_blobmsg(argv[1]);
+
+	return 0;
+}

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:30 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:30 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 14/20] blobmsg: make blobmsg_len and
 blobmsg_data_len return unsigned value
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-15-ynezz@true.cz>

One usually doesn't guard against negative length values in the code.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 blobmsg.c | 3 ++-
 blobmsg.h | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/blobmsg.c b/blobmsg.c
index 97e0c20575ff..1a8b783e9ba9 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -35,7 +35,8 @@ bool blobmsg_check_attr(const struct blob_attr *attr, bool name)
 {
 	const struct blobmsg_hdr *hdr;
 	const char *data;
-	int id, len;
+	size_t len;
+	int id;
 
 	if (blob_len(attr) < sizeof(struct blobmsg_hdr))
 		return false;
diff --git a/blobmsg.h b/blobmsg.h
index b06ef597d8c6..0af087890000 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -86,7 +86,7 @@ static inline void *blobmsg_data(const struct blob_attr *attr)
 	return data;
 }
 
-static inline int blobmsg_data_len(const struct blob_attr *attr)
+static inline size_t blobmsg_data_len(const struct blob_attr *attr)
 {
 	uint8_t *start, *end;
 
@@ -99,7 +99,7 @@ static inline int blobmsg_data_len(const struct blob_attr *attr)
 	return blob_len(attr) - (end - start);
 }
 
-static inline int blobmsg_len(const struct blob_attr *attr)
+static inline size_t blobmsg_len(const struct blob_attr *attr)
 {
 	return blobmsg_data_len(attr);
 }

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:31 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:31 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 15/20] blobmsg: fix heap buffer
 overflow in blobmsg_parse
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-16-ynezz@true.cz>

Fixes following error found by the fuzzer:

 ==29774==ERROR: AddressSanitizer: heap-buffer-overflow
 READ of size 1 at 0x6020004f1c56 thread T0
     #0 strcmp sanitizer_common_interceptors.inc:442:3
     #1 blobmsg_parse blobmsg.c:168:8

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 blobmsg.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/blobmsg.c b/blobmsg.c
index 1a8b783e9ba9..71d4a36a647c 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -53,6 +53,9 @@ bool blobmsg_check_attr(const struct blob_attr *attr, bool name)
 
 	id = blob_id(attr);
 	len = blobmsg_data_len(attr);
+	if (len > blob_raw_len(attr))
+		return false;
+
 	data = blobmsg_data(attr);
 
 	if (id > BLOBMSG_TYPE_LAST)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:32 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:32 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 16/20] Ensure blob_attr length check
 does not perform out of bounds reads
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-17-ynezz@true.cz>

From: Tobias Schramm <tobleminer at gmail.com>

Before there might have been as little as one single byte left which
would result in 3 bytes of blob_attr->id_len being out of bounds.

Acked-by: Yousong Zhou <yszhou4tech at gmail.com>
Signed-off-by: Tobias Schramm <tobleminer at gmail.com>
[line wrapped < 72 chars]
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 blob.h    | 4 ++--
 blobmsg.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/blob.h b/blob.h
index af033607e309..6d618767b91a 100644
--- a/blob.h
+++ b/blob.h
@@ -243,7 +243,7 @@ blob_put_u64(struct blob_buf *buf, int id, uint64_t val)
 
 #define __blob_for_each_attr(pos, attr, rem) \
 	for (pos = (struct blob_attr *) attr; \
-	     rem > 0 && (blob_pad_len(pos) <= rem) && \
+	     rem >= sizeof(struct blob_attr) && (blob_pad_len(pos) <= rem) && \
 	     (blob_pad_len(pos) >= sizeof(struct blob_attr)); \
 	     rem -= blob_pad_len(pos), pos = blob_next(pos))
 
@@ -251,7 +251,7 @@ blob_put_u64(struct blob_buf *buf, int id, uint64_t val)
 #define blob_for_each_attr(pos, attr, rem) \
 	for (rem = attr ? blob_len(attr) : 0, \
 	     pos = (struct blob_attr *) (attr ? blob_data(attr) : NULL); \
-	     rem > 0 && (blob_pad_len(pos) <= rem) && \
+	     rem >= sizeof(struct blob_attr) && (blob_pad_len(pos) <= rem) && \
 	     (blob_pad_len(pos) >= sizeof(struct blob_attr)); \
 	     rem -= blob_pad_len(pos), pos = blob_next(pos))
 
diff --git a/blobmsg.h b/blobmsg.h
index 0af087890000..00e0fdc1d5c6 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -266,7 +266,7 @@ int blobmsg_printf(struct blob_buf *buf, const char *name, const char *format, .
 #define blobmsg_for_each_attr(pos, attr, rem) \
 	for (rem = attr ? blobmsg_data_len(attr) : 0, \
 	     pos = (struct blob_attr *) (attr ? blobmsg_data(attr) : NULL); \
-	     rem > 0 && (blob_pad_len(pos) <= rem) && \
+	     rem >= sizeof(struct blob_attr) && (blob_pad_len(pos) <= rem) && \
 	     (blob_pad_len(pos) >= sizeof(struct blob_attr)); \
 	     rem -= blob_pad_len(pos), pos = blob_next(pos))
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:33 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:33 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 17/20] Replace use of
 blobmsg_check_attr by blobmsg_check_attr_len
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-18-ynezz@true.cz>

From: Tobias Schramm <tobleminer at gmail.com>

blobmsg_check_attr_len adds a length limit specifying the max offset
from attr that can be read safely.

Signed-off-by: Tobias Schramm <tobleminer at gmail.com>
[rebased and reworked, line wrapped commit message, _safe -> _len]
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 blobmsg.c | 60 ++++++++++++++++++++++++++++++++++++++++++-------------
 blobmsg.h |  2 ++
 2 files changed, 48 insertions(+), 14 deletions(-)

diff --git a/blobmsg.c b/blobmsg.c
index 71d4a36a647c..fbc6d2de9135 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -33,38 +33,70 @@ blobmsg_namelen(const struct blobmsg_hdr *hdr)
 
 bool blobmsg_check_attr(const struct blob_attr *attr, bool name)
 {
+	return blobmsg_check_attr_len(attr, name, blob_raw_len(attr));
+}
+
+static bool blobmsg_check_name(const struct blob_attr *attr, size_t len, bool name)
+{
+	char *limit = (char *) attr + len;
 	const struct blobmsg_hdr *hdr;
-	const char *data;
-	size_t len;
-	int id;
 
-	if (blob_len(attr) < sizeof(struct blobmsg_hdr))
+	hdr = blob_data(attr);
+	if (name && !hdr->namelen)
 		return false;
 
-	hdr = (void *) attr->data;
-	if (!hdr->namelen && name)
+	if ((char *) hdr->name + blobmsg_namelen(hdr) > limit)
 		return false;
 
-	if (blobmsg_namelen(hdr) > blob_len(attr) - sizeof(struct blobmsg_hdr))
+	if (blobmsg_namelen(hdr) > (blob_len(attr) - sizeof(struct blobmsg_hdr)))
 		return false;
 
 	if (hdr->name[blobmsg_namelen(hdr)] != 0)
 		return false;
 
-	id = blob_id(attr);
-	len = blobmsg_data_len(attr);
-	if (len > blob_raw_len(attr))
-		return false;
+	return true;
+}
+
+static const char* blobmsg_check_data(const struct blob_attr *attr, size_t len, size_t *data_len)
+{
+	char *limit = (char *) attr + len;
+	const char *data;
+
+	*data_len = blobmsg_data_len(attr);
+	if (*data_len > blob_raw_len(attr))
+		return NULL;
 
 	data = blobmsg_data(attr);
+	if (data + *data_len > limit)
+		return NULL;
+
+	return data;
+}
+
+bool blobmsg_check_attr_len(const struct blob_attr *attr, bool name, size_t len)
+{
+	const char *data;
+	size_t data_len;
+	int id;
 
+	if (len < sizeof(struct blob_attr))
+		return false;
+
+	if (!blobmsg_check_name(attr, len, name))
+		return false;
+
+	id = blob_id(attr);
 	if (id > BLOBMSG_TYPE_LAST)
 		return false;
 
 	if (!blob_type[id])
 		return true;
 
-	return blob_check_type(data, len, blob_type[id]);
+	data = blobmsg_check_data(attr, len, &data_len);
+	if (!data)
+		return false;
+
+	return blob_check_type(data, data_len, blob_type[id]);
 }
 
 int blobmsg_check_array(const struct blob_attr *attr, int type)
@@ -115,7 +147,7 @@ int blobmsg_parse_array(const struct blobmsg_policy *policy, int policy_len,
 		    blob_id(attr) != policy[i].type)
 			continue;
 
-		if (!blobmsg_check_attr(attr, false))
+		if (!blobmsg_check_attr_len(attr, false, len))
 			return -1;
 
 		if (tb[i])
@@ -162,7 +194,7 @@ int blobmsg_parse(const struct blobmsg_policy *policy, int policy_len,
 			if (blobmsg_namelen(hdr) != pslen[i])
 				continue;
 
-			if (!blobmsg_check_attr(attr, true))
+			if (!blobmsg_check_attr_len(attr, true, len))
 				return -1;
 
 			if (tb[i])
diff --git a/blobmsg.h b/blobmsg.h
index 00e0fdc1d5c6..c44015942a37 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -107,6 +107,8 @@ static inline size_t blobmsg_len(const struct blob_attr *attr)
 bool blobmsg_check_attr(const struct blob_attr *attr, bool name);
 bool blobmsg_check_attr_list(const struct blob_attr *attr, int type);
 
+bool blobmsg_check_attr_len(const struct blob_attr *attr, bool name, size_t len);
+
 /*
  * blobmsg_check_array: validate array/table and return size
  *

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:34 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:34 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 18/20] blobmsg: add _len variants
 for all attribute checking methods
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-19-ynezz@true.cz>

From: Tobias Schramm <tobleminer at gmail.com>

Introduce _len variants of blobmsg attribute checking functions which
aims to provide safer implementation as those functions should limit all
memory accesses performed on the blob to the range [attr, attr + len]
(upper bound non inclusive) and thus should be suited for checking of
untrusted blob attributes.

While at it add some comments in order to make it clear.

Signed-off-by: Tobias Schramm <tobleminer at gmail.com>
[_safe -> _len, blobmsg_check_array_len fix, commit subject/desc facelift]
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 blobmsg.c | 21 ++++++++++++++++++---
 blobmsg.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 72 insertions(+), 4 deletions(-)

diff --git a/blobmsg.c b/blobmsg.c
index fbc6d2de9135..7cd0934600de 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -100,12 +100,22 @@ bool blobmsg_check_attr_len(const struct blob_attr *attr, bool name, size_t len)
 }
 
 int blobmsg_check_array(const struct blob_attr *attr, int type)
+{
+	return blobmsg_check_array_len(attr, type, blob_raw_len(attr));
+}
+
+int blobmsg_check_array_len(const struct blob_attr *attr, int type, size_t len)
 {
 	struct blob_attr *cur;
 	bool name;
-	size_t rem;
 	int size = 0;
 
+	if (type > BLOBMSG_TYPE_LAST)
+		return -1;
+
+	if (!blobmsg_check_attr_len(attr, false, len))
+		return -1;
+
 	switch (blobmsg_type(attr)) {
 	case BLOBMSG_TYPE_TABLE:
 		name = true;
@@ -117,11 +127,11 @@ int blobmsg_check_array(const struct blob_attr *attr, int type)
 		return -1;
 	}
 
-	blobmsg_for_each_attr(cur, attr, rem) {
+	__blobmsg_for_each_attr(cur, attr, len) {
 		if (type != BLOBMSG_TYPE_UNSPEC && blobmsg_type(cur) != type)
 			return -1;
 
-		if (!blobmsg_check_attr(cur, name))
+		if (!blobmsg_check_attr_len(cur, name, len))
 			return -1;
 
 		size++;
@@ -135,6 +145,11 @@ bool blobmsg_check_attr_list(const struct blob_attr *attr, int type)
 	return blobmsg_check_array(attr, type) >= 0;
 }
 
+bool blobmsg_check_attr_list_len(const struct blob_attr *attr, int type, size_t len)
+{
+	return blobmsg_check_array_len(attr, type, len) >= 0;
+}
+
 int blobmsg_parse_array(const struct blobmsg_policy *policy, int policy_len,
 			struct blob_attr **tb, void *data, unsigned int len)
 {
diff --git a/blobmsg.h b/blobmsg.h
index c44015942a37..af88c1feb86f 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -104,19 +104,66 @@ static inline size_t blobmsg_len(const struct blob_attr *attr)
 	return blobmsg_data_len(attr);
 }
 
+/*
+ * blobmsg_check_attr: validate a list of attributes
+ *
+ * This method may be used with trusted data only. Providing
+ * malformed blobs will cause out of bounds memory access.
+ */
 bool blobmsg_check_attr(const struct blob_attr *attr, bool name);
-bool blobmsg_check_attr_list(const struct blob_attr *attr, int type);
 
+/*
+ * blobmsg_check_attr_len: validate a list of attributes
+ *
+ * This method should be safer implementation of blobmsg_check_attr.
+ * It will limit all memory access performed on the blob to the
+ * range [attr, attr + len] (upper bound non inclusive) and is
+ * thus suited for checking of untrusted blob attributes.
+ */
 bool blobmsg_check_attr_len(const struct blob_attr *attr, bool name, size_t len);
 
+/*
+ * blobmsg_check_attr_list: validate a list of attributes
+ *
+ * This method may be used with trusted data only. Providing
+ * malformed blobs will cause out of bounds memory access.
+ */
+bool blobmsg_check_attr_list(const struct blob_attr *attr, int type);
+
+/*
+ * blobmsg_check_attr_list_len: validate a list of untrusted attributes
+ *
+ * This method should be safer implementation of blobmsg_check_attr_list.
+ * It will limit all memory access performed on the blob to the
+ * range [attr, attr + len] (upper bound non inclusive) and is
+ * thus suited for checking of untrusted blob attributes.
+ */
+bool blobmsg_check_attr_list_len(const struct blob_attr *attr, int type, size_t len);
+
 /*
  * blobmsg_check_array: validate array/table and return size
  *
  * Checks if all elements of an array or table are valid and have
  * the specified type. Returns the number of elements in the array
+ *
+ * This method may be used with trusted data only. Providing
+ * malformed blobs will cause out of bounds memory access.
  */
 int blobmsg_check_array(const struct blob_attr *attr, int type);
 
+/*
+ * blobmsg_check_array_len: validate untrusted array/table and return size
+ *
+ * Checks if all elements of an array or table are valid and have
+ * the specified type. Returns the number of elements in the array.
+ *
+ * This method should be safer implementation of blobmsg_check_array.
+ * It will limit all memory access performed on the blob to the
+ * range [attr, attr + len] (upper bound non inclusive) and is
+ * thus suited for checking of untrusted blob attributes.
+ */
+int blobmsg_check_array_len(const struct blob_attr *attr, int type, size_t len);
+
 int blobmsg_parse(const struct blobmsg_policy *policy, int policy_len,
                   struct blob_attr **tb, void *data, unsigned int len);
 int blobmsg_parse_array(const struct blobmsg_policy *policy, int policy_len,
@@ -272,4 +319,10 @@ int blobmsg_printf(struct blob_buf *buf, const char *name, const char *format, .
 	     (blob_pad_len(pos) >= sizeof(struct blob_attr)); \
 	     rem -= blob_pad_len(pos), pos = blob_next(pos))
 
+#define __blobmsg_for_each_attr(pos, attr, rem) \
+	for (pos = (struct blob_attr *) (attr ? blobmsg_data(attr) : NULL); \
+	     rem >= sizeof(struct blob_attr) && (blob_pad_len(pos) <= rem) && \
+	     (blob_pad_len(pos) >= sizeof(struct blob_attr)); \
+	     rem -= blob_pad_len(pos), pos = blob_next(pos))
+
 #endif

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:35 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:35 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 19/20] tests: fuzz: fuzz _len
 variants of checking methods
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-20-ynezz@true.cz>

In order to increase test coverage.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 tests/fuzz/test-fuzz.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/tests/fuzz/test-fuzz.c b/tests/fuzz/test-fuzz.c
index 52f2bbce878f..4dc13a8d8a3b 100644
--- a/tests/fuzz/test-fuzz.c
+++ b/tests/fuzz/test-fuzz.c
@@ -1,10 +1,13 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <stddef.h>
+#include <limits.h>
 
 #include "blob.h"
 #include "blobmsg.h"
 
+#define BLOBMSG_TYPE_TROUBLE INT_MAX
+
 static void fuzz_blobmsg_parse(const uint8_t *data, size_t size)
 {
 	enum {
@@ -14,6 +17,19 @@ static void fuzz_blobmsg_parse(const uint8_t *data, size_t size)
 		__FOO_MAX
 	};
 
+	static const int blobmsg_type[] = {
+		BLOBMSG_TYPE_UNSPEC,
+		BLOBMSG_TYPE_ARRAY,
+		BLOBMSG_TYPE_TABLE,
+		BLOBMSG_TYPE_STRING,
+		BLOBMSG_TYPE_INT64,
+		BLOBMSG_TYPE_INT32,
+		BLOBMSG_TYPE_INT16,
+		BLOBMSG_TYPE_INT8,
+		BLOBMSG_TYPE_DOUBLE,
+		BLOBMSG_TYPE_TROUBLE,
+	};
+
 	static const struct blobmsg_policy foo_policy[] = {
 		[FOO_MESSAGE] = {
 			.name = "message",
@@ -33,6 +49,14 @@ static void fuzz_blobmsg_parse(const uint8_t *data, size_t size)
 
 	blobmsg_parse(foo_policy, __FOO_MAX, tb, (uint8_t *)data, size);
 	blobmsg_parse_array(foo_policy, __FOO_MAX, tb, (uint8_t *)data, size);
+
+	blobmsg_check_attr_len((struct blob_attr *)data, false, size);
+	blobmsg_check_attr_len((struct blob_attr *)data, true, size);
+
+	for (size_t i=0; i < ARRAY_SIZE(blobmsg_type); i++) {
+		blobmsg_check_array_len((struct blob_attr *)data, blobmsg_type[i], size);
+		blobmsg_check_attr_list_len((struct blob_attr *)data, blobmsg_type[i], size);
+	}
 }
 
 static void fuzz_blob_parse(const uint8_t *data, size_t size)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 16:58:36 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 22:58:36 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 20/20] blobmsg: reuse
 blobmsg_namelen in blobmsg_data
In-Reply-To: <20191219215836.21773-1-ynezz@true.cz>
References: <20191219215836.21773-1-ynezz@true.cz>
Message-ID: <20191219215836.21773-21-ynezz@true.cz>

Move blobmsg_namelen into header file so it's possible to reuse it in
blobmsg_data.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 blobmsg.c | 6 ------
 blobmsg.h | 7 ++++++-
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/blobmsg.c b/blobmsg.c
index 7cd0934600de..48dba8156d58 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -25,12 +25,6 @@ static const int blob_type[__BLOBMSG_TYPE_LAST] = {
 	[BLOBMSG_TYPE_UNSPEC] = BLOB_ATTR_BINARY,
 };
 
-static uint16_t
-blobmsg_namelen(const struct blobmsg_hdr *hdr)
-{
-	return be16_to_cpu(hdr->namelen);
-}
-
 bool blobmsg_check_attr(const struct blob_attr *attr, bool name)
 {
 	return blobmsg_check_attr_len(attr, name, blob_raw_len(attr));
diff --git a/blobmsg.h b/blobmsg.h
index af88c1feb86f..be3c7ee2cbfd 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -69,6 +69,11 @@ static inline int blobmsg_type(const struct blob_attr *attr)
 	return blob_id(attr);
 }
 
+static uint16_t blobmsg_namelen(const struct blobmsg_hdr *hdr)
+{
+	return be16_to_cpu(hdr->namelen);
+}
+
 static inline void *blobmsg_data(const struct blob_attr *attr)
 {
 	struct blobmsg_hdr *hdr;
@@ -81,7 +86,7 @@ static inline void *blobmsg_data(const struct blob_attr *attr)
 	data = (char *) blob_data(attr);
 
 	if (blob_is_extended(attr))
-		data += blobmsg_hdrlen(be16_to_cpu(hdr->namelen));
+		data += blobmsg_hdrlen(blobmsg_namelen(hdr));
 
 	return data;
 }

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:04:12 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:04:12 +0100
Subject: [OpenWrt-Devel] [PATCH ucert 0/9] GitLab CI, tests,
 fixes and improvements
Message-ID: <20191219220421.22206-1-ynezz@true.cz>

Hi,

this patch series adds GitLab CI support, unit tests passed through Valgrind,
unit tests covered with Clang's {Address,Leak,UndefinedBehavior}Sanitizer and
few fixes uncovered by the new test suite.

Petr ?tetiar (9):
  cmake: add proper include and library dependencies
  add initial GitLab CI support
  cmake: enable hardening compiler flags and fix the reported issues
  cmake: reindent the file
  cmake: split usign bits into static library
  add cram based unit tests
  fix possibly garbage value returned in cert_process_revoker
  fix leaking memory in cert_dump_blob
  fix certificate blob parsing vulnerability by using blob_parse_untrusted

 .gitlab-ci.yml                    |   6 +++
 CMakeLists.txt                    |  48 +++++++++++++++++-----
 tests/CMakeLists.txt              |  14 +++++++
 tests/cram/CMakeLists.txt         |  21 ++++++++++
 tests/cram/inputs/invalid.ucert   | Bin 0 -> 362 bytes
 tests/cram/inputs/key-build.ucert | Bin 0 -> 356 bytes
 tests/cram/test_ucert.t           |  65 ++++++++++++++++++++++++++++++
 ucert.c                           |  31 +++++++++-----
 8 files changed, 165 insertions(+), 20 deletions(-)
 create mode 100644 .gitlab-ci.yml
 create mode 100644 tests/CMakeLists.txt
 create mode 100644 tests/cram/CMakeLists.txt
 create mode 100644 tests/cram/inputs/invalid.ucert
 create mode 100644 tests/cram/inputs/key-build.ucert
 create mode 100644 tests/cram/test_ucert.t


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:04:13 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:04:13 +0100
Subject: [OpenWrt-Devel] [PATCH ucert 1/9] cmake: add proper include and
 library dependencies
In-Reply-To: <20191219220421.22206-1-ynezz@true.cz>
References: <20191219220421.22206-1-ynezz@true.cz>
Message-ID: <20191219220421.22206-2-ynezz@true.cz>

Otherwise it's not possible to compile it properly if the dependencies
are not installed in the standard include/libraries paths.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 CMakeLists.txt | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c81184caf82..14888ac38135 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,13 @@ ADD_DEFINITIONS(-Os -ggdb -Wall --std=gnu99 -Wmissing-declarations)
 
 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
 
-find_library(json NAMES json-c json)
+FIND_PATH(ubox_include_dir NAMES libubox/usock.h)
+FIND_PATH(jsonc_include_dir NAMES json-c/json.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir} ${jsonc_include_dir})
+
+FIND_LIBRARY(ubox NAMES ubox)
+FIND_LIBRARY(blobmsg_json NAMES blobmsg_json)
+FIND_LIBRARY(json NAMES json-c json)
 
 IF(UCERT_HOST_BUILD)
 ADD_DEFINITIONS(-DUCERT_HOST_BUILD)
@@ -19,10 +25,10 @@ ENDIF()
 ADD_EXECUTABLE(ucert ucert.c usign-exec.c)
 IF(UCERT_FULL)
 ADD_DEFINITIONS(-DUCERT_FULL)
-TARGET_LINK_LIBRARIES(ucert ubox blobmsg_json ${json})
+TARGET_LINK_LIBRARIES(ucert ${ubox} ${blobmsg_json} ${json})
 ELSE()
 ADD_DEFINITIONS(-DUCERT_STRIP_MESSAGES)
-TARGET_LINK_LIBRARIES(ucert ubox)
+TARGET_LINK_LIBRARIES(ucert ${ubox})
 ENDIF()
 
 INSTALL(TARGETS ucert RUNTIME DESTINATION bin)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:04:14 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:04:14 +0100
Subject: [OpenWrt-Devel] [PATCH ucert 2/9] add initial GitLab CI support
In-Reply-To: <20191219220421.22206-1-ynezz@true.cz>
References: <20191219220421.22206-1-ynezz@true.cz>
Message-ID: <20191219220421.22206-3-ynezz@true.cz>

Uses currently proof-of-concept openwrt-ci[1] in order to:

 * improve the quality of the codebase in various areas
 * decrease code review time and help merging contributions faster
 * get automagic feedback loop on various platforms and tools
   - out of tree build with OpenWrt SDK on following targets:
     * ath79-generic
     * imx6-generic
     * malta-be
     * mvebu-cortexa53
   - out of tree native build on x86/64 with GCC (versions 7, 8, 9) and Clang 10
   - out of tree native x86/64 static code analysis with cppcheck and
     scan-build from Clang 10

1. https://gitlab.com/ynezz/openwrt-ci/

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 .gitlab-ci.yml | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000000..94f65e71b111
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,6 @@
+variables:
+  CI_TARGET_BUILD_DEPENDS: ucert
+
+include:
+  - remote: https://gitlab.com/ynezz/openwrt-ci/raw/master/openwrt-ci/gitlab/main.yml
+  - remote: https://gitlab.com/ynezz/openwrt-ci/raw/master/openwrt-ci/gitlab/pipeline.yml

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:04:15 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:04:15 +0100
Subject: [OpenWrt-Devel] [PATCH ucert 3/9] cmake: enable hardening compiler
 flags and fix the reported issues
In-Reply-To: <20191219220421.22206-1-ynezz@true.cz>
References: <20191219220421.22206-1-ynezz@true.cz>
Message-ID: <20191219220421.22206-4-ynezz@true.cz>

Lets enable some useful flags in order to spot possible issues during
QA on CI (GCC version 6 and higher). Fix warnings uncovered by this new
flags as reported by clang-9 on x86/64:

 ucert.c:158:33: error: comparison of integers of different signs: 'unsigned long' and 'int' [-Werror,-Wsign-compare]
 ucert.c:176:14: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare]
 ucert.c:314:18: error: comparison of integers of different signs: '__time_t' (aka 'long') and 'uint64_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
 ucert.c:315:18: error: comparison of integers of different signs: '__time_t' (aka 'long') and 'uint64_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
 ucert.c:557:17: error: comparison of integers of different signs: '__time_t' (aka 'long') and 'uint64_t' (aka 'unsigned long') [-Werror,-Wsign-compare]

Ref: https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 CMakeLists.txt |  8 +++++++-
 ucert.c        | 18 +++++++++++-------
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14888ac38135..436abc6857b3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,13 @@
 cmake_minimum_required(VERSION 2.6)
 
 PROJECT(ucert C)
-ADD_DEFINITIONS(-Os -ggdb -Wall --std=gnu99 -Wmissing-declarations)
+
+ADD_DEFINITIONS(-Wall -Werror)
+IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)
+	ADD_DEFINITIONS(-Wextra -Werror=implicit-function-declaration)
+	ADD_DEFINITIONS(-Wformat -Werror=format-security -Werror=format-nonliteral)
+ENDIF()
+ADD_DEFINITIONS(-Os -std=gnu99 -ggdb -Wmissing-declarations -Wno-unused-parameter)
 
 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
 
diff --git a/ucert.c b/ucert.c
index 569b31d5f16e..8503eeb26cd8 100644
--- a/ucert.c
+++ b/ucert.c
@@ -48,9 +48,13 @@ static enum {
 
 static bool quiet;
 #ifndef UCERT_STRIP_MESSAGES
-#define DPRINTF(format, ...) if (!quiet) fprintf(stderr, "%s(%d): " format, __func__, __LINE__, ## __VA_ARGS__)
+#define DPRINTF(format, ...)									\
+	do {											\
+		if (!quiet)									\
+			fprintf(stderr, "%s(%d): " format, __func__, __LINE__, ## __VA_ARGS__);	\
+	} while (0)
 #else
-#define DPRINTF(format, ...)
+#define DPRINTF(format, ...) do { } while (0)
 #endif
 
 /*
@@ -133,7 +137,7 @@ static int cert_load(const char *certfile, struct list_head *chain) {
 	struct cert_object *cobj;
 	char filebuf[CERT_BUF_LEN];
 	int ret = 0, pret = 0;
-	int len, pos = 0;
+	size_t len, pos = 0;
 
 	f = fopen(certfile, "r");
 	if (!f)
@@ -269,8 +273,8 @@ static int chain_verify(const char *msgfile, const char *pubkeyfile,
 	list_for_each_entry(cobj, chain, list) {
 		/* blob has payload, verify that using signature */
 		if (cobj->cert[CERT_ATTR_PAYLOAD]) {
-			uint64_t validfrom;
-			uint64_t expiresat;
+			time_t validfrom;
+			time_t expiresat;
 			uint32_t certtype;
 
 			ret = cert_verify_blob(cobj->cert, chainedpubkey[0]?chainedpubkey:pubkeyfile, pubkeydir);
@@ -499,8 +503,8 @@ static int cert_process_revoker(const char *certfile, const char *pubkeydir) {
 	struct blob_attr *payloadtb[CERT_PL_ATTR_MAX];
 	struct stat st;
 	struct timeval tv;
-	uint64_t validfrom;
-	uint32_t certtype;
+	time_t validfrom;
+	enum certtype_id certtype;
 	char *fingerprint;
 	char rfname[512];
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:04:16 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:04:16 +0100
Subject: [OpenWrt-Devel] [PATCH ucert 4/9] cmake: reindent the file
In-Reply-To: <20191219220421.22206-1-ynezz@true.cz>
References: <20191219220421.22206-1-ynezz@true.cz>
Message-ID: <20191219220421.22206-5-ynezz@true.cz>

In order to make the indentation consistent within the file.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 CMakeLists.txt | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 436abc6857b3..78970d2632b5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,21 +20,21 @@ FIND_LIBRARY(blobmsg_json NAMES blobmsg_json)
 FIND_LIBRARY(json NAMES json-c json)
 
 IF(UCERT_HOST_BUILD)
-ADD_DEFINITIONS(-DUCERT_HOST_BUILD)
+	ADD_DEFINITIONS(-DUCERT_HOST_BUILD)
 ENDIF()
 
 IF(USE_RPATH)
-SET(CMAKE_INSTALL_RPATH "${USE_RPATH}")
-SET(CMAKE_MACOSX_RPATH 1)
+	SET(CMAKE_INSTALL_RPATH "${USE_RPATH}")
+	SET(CMAKE_MACOSX_RPATH 1)
 ENDIF()
 
 ADD_EXECUTABLE(ucert ucert.c usign-exec.c)
 IF(UCERT_FULL)
-ADD_DEFINITIONS(-DUCERT_FULL)
-TARGET_LINK_LIBRARIES(ucert ${ubox} ${blobmsg_json} ${json})
+	ADD_DEFINITIONS(-DUCERT_FULL)
+	TARGET_LINK_LIBRARIES(ucert ${ubox} ${blobmsg_json} ${json})
 ELSE()
-ADD_DEFINITIONS(-DUCERT_STRIP_MESSAGES)
-TARGET_LINK_LIBRARIES(ucert ${ubox})
+	ADD_DEFINITIONS(-DUCERT_STRIP_MESSAGES)
+	TARGET_LINK_LIBRARIES(ucert ${ubox})
 ENDIF()
 
 INSTALL(TARGETS ucert RUNTIME DESTINATION bin)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:04:17 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:04:17 +0100
Subject: [OpenWrt-Devel] [PATCH ucert 5/9] cmake: split usign bits into
 static library
In-Reply-To: <20191219220421.22206-1-ynezz@true.cz>
References: <20191219220421.22206-1-ynezz@true.cz>
Message-ID: <20191219220421.22206-6-ynezz@true.cz>

So it could be reused easily in unit tests for example.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 CMakeLists.txt | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 78970d2632b5..443d79bd4e8b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,13 +28,15 @@ IF(USE_RPATH)
 	SET(CMAKE_MACOSX_RPATH 1)
 ENDIF()
 
-ADD_EXECUTABLE(ucert ucert.c usign-exec.c)
+ADD_LIBRARY(ucert_lib STATIC usign-exec.c)
+ADD_EXECUTABLE(ucert ucert.c)
+
 IF(UCERT_FULL)
 	ADD_DEFINITIONS(-DUCERT_FULL)
-	TARGET_LINK_LIBRARIES(ucert ${ubox} ${blobmsg_json} ${json})
+	TARGET_LINK_LIBRARIES(ucert ucert_lib ${ubox} ${blobmsg_json} ${json})
 ELSE()
 	ADD_DEFINITIONS(-DUCERT_STRIP_MESSAGES)
-	TARGET_LINK_LIBRARIES(ucert ${ubox})
+	TARGET_LINK_LIBRARIES(ucert ucert_lib ${ubox})
 ENDIF()
 
 INSTALL(TARGETS ucert RUNTIME DESTINATION bin)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:04:18 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:04:18 +0100
Subject: [OpenWrt-Devel] [PATCH ucert 6/9] add cram based unit tests
In-Reply-To: <20191219220421.22206-1-ynezz@true.cz>
References: <20191219220421.22206-1-ynezz@true.cz>
Message-ID: <20191219220421.22206-7-ynezz@true.cz>

For improved QA etc. for the start with initial test case for dump
command.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 CMakeLists.txt                    |  14 +++++++
 tests/CMakeLists.txt              |  14 +++++++
 tests/cram/CMakeLists.txt         |  21 ++++++++++
 tests/cram/inputs/invalid.ucert   | Bin 0 -> 362 bytes
 tests/cram/inputs/key-build.ucert | Bin 0 -> 356 bytes
 tests/cram/test_ucert.t           |  65 ++++++++++++++++++++++++++++++
 6 files changed, 114 insertions(+)
 create mode 100644 tests/CMakeLists.txt
 create mode 100644 tests/cram/CMakeLists.txt
 create mode 100644 tests/cram/inputs/invalid.ucert
 create mode 100644 tests/cram/inputs/key-build.ucert
 create mode 100644 tests/cram/test_ucert.t

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 443d79bd4e8b..71c005990335 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,14 @@ FIND_LIBRARY(ubox NAMES ubox)
 FIND_LIBRARY(blobmsg_json NAMES blobmsg_json)
 FIND_LIBRARY(json NAMES json-c json)
 
+MACRO(ADD_UNIT_TEST_SAN name)
+	ADD_EXECUTABLE(${name}-san ${name}.c)
+	TARGET_COMPILE_OPTIONS(${name}-san PRIVATE -g -fno-omit-frame-pointer -fsanitize=undefined,address,leak -fno-sanitize-recover=all)
+	TARGET_LINK_OPTIONS(${name}-san PRIVATE -fsanitize=undefined,address,leak)
+	TARGET_LINK_LIBRARIES(${name}-san ucert_lib ${ubox} ${blobmsg_json} ${json})
+	TARGET_INCLUDE_DIRECTORIES(${name}-san PRIVATE ${PROJECT_SOURCE_DIR})
+ENDMACRO(ADD_UNIT_TEST_SAN)
+
 IF(UCERT_HOST_BUILD)
 	ADD_DEFINITIONS(-DUCERT_HOST_BUILD)
 ENDIF()
@@ -39,4 +47,10 @@ ELSE()
 	TARGET_LINK_LIBRARIES(ucert ucert_lib ${ubox})
 ENDIF()
 
+IF(UNIT_TESTING)
+	ENABLE_TESTING()
+	ADD_SUBDIRECTORY(tests)
+	ADD_UNIT_TEST_SAN(ucert)
+ENDIF()
+
 INSTALL(TARGETS ucert RUNTIME DESTINATION bin)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 000000000000..efefc2e6cde7
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,14 @@
+ADD_SUBDIRECTORY(cram)
+
+MACRO(ADD_UNIT_TEST name)
+  ADD_EXECUTABLE(${name} ${name}.c)
+  TARGET_LINK_LIBRARIES(${name} ubox blobmsg_json ${json})
+  TARGET_INCLUDE_DIRECTORIES(${name} PRIVATE ${PROJECT_SOURCE_DIR})
+ENDMACRO(ADD_UNIT_TEST)
+
+FILE(GLOB test_cases "test-*.c")
+FOREACH(test_case ${test_cases})
+  GET_FILENAME_COMPONENT(test_case ${test_case} NAME_WE)
+  ADD_UNIT_TEST(${test_case})
+  ADD_UNIT_TEST_SAN(${test_case})
+ENDFOREACH(test_case)
diff --git a/tests/cram/CMakeLists.txt b/tests/cram/CMakeLists.txt
new file mode 100644
index 000000000000..47247aa026a6
--- /dev/null
+++ b/tests/cram/CMakeLists.txt
@@ -0,0 +1,21 @@
+FIND_PACKAGE(PythonInterp 3 REQUIRED)
+FILE(GLOB test_cases "test_*.t")
+
+SET(PYTHON_VENV_DIR "${CMAKE_CURRENT_BINARY_DIR}/.venv")
+SET(PYTHON_VENV_PIP "${PYTHON_VENV_DIR}/bin/pip")
+SET(PYTHON_VENV_CRAM "${PYTHON_VENV_DIR}/bin/cram")
+
+ADD_CUSTOM_COMMAND(
+	OUTPUT ${PYTHON_VENV_CRAM}
+	COMMAND ${PYTHON_EXECUTABLE} -m venv ${PYTHON_VENV_DIR}
+	COMMAND ${PYTHON_VENV_PIP} install cram
+)
+ADD_CUSTOM_TARGET(prepare-cram-venv ALL DEPENDS ${PYTHON_VENV_CRAM})
+
+ADD_TEST(
+	NAME cram
+	COMMAND ${PYTHON_VENV_CRAM} ${test_cases}
+	WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+SET_PROPERTY(TEST cram APPEND PROPERTY ENVIRONMENT "TEST_BIN_DIR=$<TARGET_FILE_DIR:ucert>")
diff --git a/tests/cram/inputs/invalid.ucert b/tests/cram/inputs/invalid.ucert
new file mode 100644
index 0000000000000000000000000000000000000000..dbdeb725d490b51fb442ae3c5a5b90a32376f108
GIT binary patch
literal 362
zcmZwDyHbNt5P;!Lp`+9mmXtaa8pj0Uj74IIQG^6 at K{AdraLxfvJmkVPP<nX^U&g}M
z at HH%Kki^OvyWPLqZ;PTRJ~@C227tGC76ow_5zM2x?~_?{#)s6MmAjqsk0j%zQ`<q3
zWL3p#y<QVV?$#K{iA0soYQnH!>w-31Uf?$C_TsUrr8PYjbt&|wj_P)<(Qp~$*0OhO
zXW{fp_l6esQJNUkNV+UjQQEv4(A7!H#E$FbN4eLYChq8*g9^aM6Tmxc#fStEyaMdO
z&U%cp1t~8t0WSdiu$x$nVkemUn|OclmH&3KTF`)mR<!94+~M~#fDhY?*e+e`_>cW&
zjx5I8F=cqI|BJ0B6v<VJ4A0aYdEDr$;zdJMMhX*5O;%b$A2*H5cBeLJl>Y_z0WNxQ
A<p2Nx

literal 0
HcmV?d00001

diff --git a/tests/cram/inputs/key-build.ucert b/tests/cram/inputs/key-build.ucert
new file mode 100644
index 0000000000000000000000000000000000000000..8b347b1e3f63edcb0c37dd5f1d3e477cd91954ed
GIT binary patch
literal 356
zcmZvXJ5Pg99L4_~G|KGY$f#k^8Y$Gop$}>mp~XIs#+bmp7r6D(2X7dCd<wsegP+O4
z$x<g1w{w2O$@u})FaW$Ki#SZ8m|z|)gMcjJ3qGRWV$+?1e<B4hpF1v+WxFob8x2vC
zxI1&Cq%u`|`HW$~F$8_Q?%*!#50a^+XQGiwh8+2GSMz!|XuJ+fdp$UHifDdq_+uLf
zC`(OhrhQguC~Mu1XnxkVu<QBdN$GdzsW-Xgpa$^y4DbOv2_j((ZvY3dSH-wkk<D{}
z+AF{z?58%P*bSG#7Csz(mA{<iD;ko>j<@`gJN|wF2w-=WI2*4D{^NeTL^k7{gfd*&
r|CMc|6e)FzOyAO7W!fBSQm3h at 6O{>;uBdHch+F1Ww<pe;T($oLPOWSL

literal 0
HcmV?d00001

diff --git a/tests/cram/test_ucert.t b/tests/cram/test_ucert.t
new file mode 100644
index 000000000000..985740def8f2
--- /dev/null
+++ b/tests/cram/test_ucert.t
@@ -0,0 +1,65 @@
+check that ucert is producing expected results:
+
+  $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
+  $ export TEST_INPUTS="$TESTDIR/inputs"
+  $ alias ucert='valgrind --quiet --leak-check=full ucert'
+
+  $ ucert
+  Usage: ucert <command> <options>
+  Commands:
+    -A:\t\t\tappend signature (needs -c and -x) (esc)
+    -D:\t\t\tdump (needs -c) (esc)
+    -I:\t\t\tissue cert and revoker (needs -c and -p and -s) (esc)
+    -R:\t\t\tprocess revoker certificate (needs -c and -P) (esc)
+    -V:\t\t\tverify (needs -c and -p|-P, may have -m) (esc)
+  Options:
+    -c <file>:\t\tcertificate file (esc)
+    -m <file>:\t\tmessage file (verify only) (esc)
+    -p <file>:\t\tpublic key file (esc)
+    -P <path>:\t\tpublic key directory (verify only) (esc)
+    -q:\t\t\tquiet (do not print verification result, use return code only) (esc)
+    -s <file>:\t\tsecret key file (issue only) (esc)
+    -x <file>:\t\tsignature file (append only) (esc)
+  
+  [1]
+
+  $ ucert -D -c $TEST_INPUTS/key-build.ucert
+  === CHAIN ELEMENT 01 ===
+  signature:
+  ---
+  untrusted comment: signed by key 84bfc88a17166577
+  RWSEv8iKFxZld+bQ+NTqCdDlHOuVYNw5Qw7Q8shjfMgFJcTqrzaqO0bysjIQhTadmcwvWiWvHlyMcwAXSix2BYdfghz/zhDjvgU=
+  ---
+  payload:
+  ---
+  "ucert": {
+  \t"certtype": 1, (esc)
+  \t"validfrom": 1546188410, (esc)
+  \t"expiresat": 1577724410, (esc)
+  \t"pubkey": "untrusted comment: Local build key\\nRWSEv8iKFxZld6vicE1icWhYNfEV9PM7C9MKUKl+YNEKB+PdAWGDF5Z9\\n" (esc)
+  }
+  ---
+  $ ucert-san -D -c $TEST_INPUTS/key-build.ucert
+  === CHAIN ELEMENT 01 ===
+  signature:
+  ---
+  untrusted comment: signed by key 84bfc88a17166577
+  RWSEv8iKFxZld+bQ+NTqCdDlHOuVYNw5Qw7Q8shjfMgFJcTqrzaqO0bysjIQhTadmcwvWiWvHlyMcwAXSix2BYdfghz/zhDjvgU=
+  ---
+  payload:
+  ---
+  "ucert": {
+  \t"certtype": 1, (esc)
+  \t"validfrom": 1546188410, (esc)
+  \t"expiresat": 1577724410, (esc)
+  \t"pubkey": "untrusted comment: Local build key\\nRWSEv8iKFxZld6vicE1icWhYNfEV9PM7C9MKUKl+YNEKB+PdAWGDF5Z9\\n" (esc)
+  }
+  ---
+
+  $ ucert -D -c $TEST_INPUTS/invalid.ucert
+  cert_dump(406): cannot parse cert
+  [1]
+
+  $ ucert-san -D -c $TEST_INPUTS/invalid.ucert
+  cert_dump(406): cannot parse cert
+  [1]

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:04:19 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:04:19 +0100
Subject: [OpenWrt-Devel] [PATCH ucert 7/9] fix possibly garbage value
 returned in cert_process_revoker
In-Reply-To: <20191219220421.22206-1-ynezz@true.cz>
References: <20191219220421.22206-1-ynezz@true.cz>
Message-ID: <20191219220421.22206-8-ynezz@true.cz>

Fixes following warning reported by clang-9 scan-build analyzer:

 ucert.c:585:2: warning: Undefined or garbage value returned to caller
        return ret;
        ^~~~~~~~~~

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 ucert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ucert.c b/ucert.c
index 8503eeb26cd8..b9c5c889ddfa 100644
--- a/ucert.c
+++ b/ucert.c
@@ -508,7 +508,7 @@ static int cert_process_revoker(const char *certfile, const char *pubkeydir) {
 	char *fingerprint;
 	char rfname[512];
 
-	int ret;
+	int ret = -1;
 
 	if (cert_load(certfile, &certchain)) {
 		DPRINTF("cannot parse cert\n");

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:04:20 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:04:20 +0100
Subject: [OpenWrt-Devel] [PATCH ucert 8/9] fix leaking memory in
 cert_dump_blob
In-Reply-To: <20191219220421.22206-1-ynezz@true.cz>
References: <20191219220421.22206-1-ynezz@true.cz>
Message-ID: <20191219220421.22206-9-ynezz@true.cz>

Fixes following valgrind reported memory leak:

 189 bytes in 1 blocks are definitely lost in loss record 3 of 4
    at realloc
    by blobmsg_format_json_with_cb
    by blobmsg_format_json_indent
    by cert_dump_blob (ucert.c:386)
    by cert_dump (ucert.c:405)
    by main (ucert.c:728)

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 ucert.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/ucert.c b/ucert.c
index b9c5c889ddfa..76960a200be0 100644
--- a/ucert.c
+++ b/ucert.c
@@ -371,6 +371,7 @@ clean_and_return:
 /* dump single chain element to console */
 static void cert_dump_blob(struct blob_attr *cert[CERT_ATTR_MAX]) {
 	int i;
+	char *json = NULL;
 
 	for (i = 0; i < CERT_ATTR_MAX; i++) {
 		struct blob_attr *v = cert[i];
@@ -383,7 +384,13 @@ static void cert_dump_blob(struct blob_attr *cert[CERT_ATTR_MAX]) {
 			fprintf(stdout, "signature:\n---\n%s---\n", (char *) blob_data(v));
 			break;
 		case BLOB_ATTR_NESTED:
-			fprintf(stdout, "payload:\n---\n%s\n---\n", blobmsg_format_json_indent(blob_data(v), false, 0));
+			json = blobmsg_format_json_indent(blob_data(v), false, 0);
+			if (!json) {
+				DPRINTF("cannot parse payload\n");
+				continue;
+			}
+			fprintf(stdout, "payload:\n---\n%s\n---\n", json);
+			free(json);
 			break;
 		}
 	}

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:04:21 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:04:21 +0100
Subject: [OpenWrt-Devel] [PATCH ucert 9/9] fix certificate blob parsing
 vulnerability by using blob_parse_untrusted
In-Reply-To: <20191219220421.22206-1-ynezz@true.cz>
References: <20191219220421.22206-1-ynezz@true.cz>
Message-ID: <20191219220421.22206-10-ynezz@true.cz>

blob_parse expects blobs from trusted inputs, but in this case it can be
supplied with possibly malicious certificates from untrusted inputs as
well, so in order to prevent such conditions, switch to
blob_parse_untrusted which should hopefully handle such inputs
appropriately.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 ucert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ucert.c b/ucert.c
index 76960a200be0..d822199eb7f8 100644
--- a/ucert.c
+++ b/ucert.c
@@ -154,7 +154,7 @@ static int cert_load(const char *certfile, struct list_head *chain) {
 
 	bufpt = (struct blob_attr *)filebuf;
 	do {
-		pret = blob_parse(bufpt, certtb, cert_policy, CERT_ATTR_MAX);
+		pret = blob_parse_untrusted(bufpt, len, certtb, cert_policy, CERT_ATTR_MAX);
 		if (pret <= 0)
 			/* no attributes found */
 			break;

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:09 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:09 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 00/16] GitLab CI, tests, fuzzing,
 fixes and improvements
Message-ID: <20191219221125.22646-1-ynezz@true.cz>

Hi,

this patch series adds GitLab CI support, unit tests passed through Valgrind,
unit tests covered with Clang's {Address,Leak,UndefinedBehavior}Sanitizer,
fuzzing with libFuzzer and bunch of fixes uncovered by Coverity and this new
CI test suite.

Petr ?tetiar (16):
  cmake: enable extra compiler checks
  ubusd: fix comparison of integers of different signs
  ubusd/libubus-io: fix variable sized struct position warning
  iron out all extra compiler warnings
  libubus: fix incompatible pointer types assigment
  add initial GitLab CI support
  examples: remove dead increments
  refactor ubusd.c into reusable ubusd_library
  add fuzzer and cram based unit tests
  lua: workaround false positive dereference of null pointer
  lua: ubus_lua_do_subscribe: fix copy&paste error
  workaround possibly false positive uses of memory after it is freed
  ubus_common: remove duplicate ARRAY_SIZE and add missing include
  ubusd_monitor: fix possible null pointer dereference
  ubus_monitor: workaround possibly false positive uses of memory after
    it is freed
  fix blob parsing vulnerability by using blob_parse_untrusted

 .gitlab-ci.yml                                |   7 +
 CMakeLists.txt                                |  29 +-
 cli.c                                         |  13 +-
 examples/client.c                             |   3 -
 examples/server.c                             |  10 +-
 libubus-acl.c                                 |   2 +-
 libubus-internal.h                            |   3 +-
 libubus-io.c                                  |  16 +-
 libubus-obj.c                                 |   6 +-
 libubus-req.c                                 |  15 +-
 libubus.c                                     |  14 +-
 lua/ubus.c                                    |  27 +-
 tests/CMakeLists.txt                          |  18 ++
 tests/cram/CMakeLists.txt                     |  22 ++
 tests/cram/test_ubus.t                        |  58 ++++
 tests/cram/test_ubusd.t                       |  24 ++
 tests/fuzz/CMakeLists.txt                     |  18 ++
 .../05fe405753166f125559e7c9ac558654f107c7e9  | Bin 0 -> 8 bytes
 .../0660e49c13f6d167a8298d885f724bad8f62fc35  | Bin 0 -> 8 bytes
 .../37dadeab8d8ce7611f230f9524c1e8ab751c4a6a  | Bin 0 -> 8 bytes
 .../71520a5c4b5ca73903216857abbad54a8002d44a  | Bin 0 -> 2 bytes
 .../73c72a4d2bd1cd31b0b44256a888feec9eaaba27  | Bin 0 -> 9 bytes
 .../8db068f76b98df8730f5308b12c793fdf04c47c2  | Bin 0 -> 8 bytes
 .../c1dfd96eea8cc2b62785275bca38ac261256e278  |   1 +
 .../c42ac1c46f1d4e211c735cc7dfad4ff8391110e9  | Bin 0 -> 3 bytes
 ...h-1b8fb1be45db3aff7699100f497fb74138f3df4f | Bin 0 -> 6 bytes
 ...h-4c4d2c3c9ade5da9347534e290305c3b9760f627 | Bin 0 -> 17 bytes
 ...h-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b | Bin 0 -> 86 bytes
 ...h-75b146c4e6fac64d3e62236b27c64b50657bab2a | Bin 0 -> 4 bytes
 ...h-813f3e68661da09c26d4a87dbb9d5099e92be50f | Bin 0 -> 36 bytes
 ...h-98595faa58ba01d85ba4fd0b109cd3d490b45795 | Bin 0 -> 6 bytes
 ...h-d0f3aa7d60a094b021f635d4edb7807c055a4ea1 |   1 +
 ...h-df9d1243057b27bbad6211e5a23d1cb699028aa2 | Bin 0 -> 16 bytes
 ...h-e2fd5ecb3b37926743256f1083f47a07c39e10c2 | Bin 0 -> 66 bytes
 .../e2814b29dd2fd5db02b1ab7c5e147e1194a489ce  | Bin 0 -> 8 bytes
 tests/fuzz/corpus/valid-blobmsg.bin           | Bin 0 -> 176 bytes
 tests/fuzz/test-fuzz.c                        |  40 +++
 ubus_common.h                                 |   6 +-
 ubusd.c                                       | 285 +-----------------
 ubusd.h                                       |   3 +-
 ubusd_acl.c                                   |  12 +-
 ubusd_event.c                                 |   7 +-
 ubusd_main.c                                  | 271 +++++++++++++++++
 ubusd_monitor.c                               |  42 ++-
 ubusd_obj.c                                   |   7 +-
 ubusd_proto.c                                 |  12 +-
 46 files changed, 603 insertions(+), 369 deletions(-)
 create mode 100644 .gitlab-ci.yml
 create mode 100644 tests/CMakeLists.txt
 create mode 100644 tests/cram/CMakeLists.txt
 create mode 100644 tests/cram/test_ubus.t
 create mode 100644 tests/cram/test_ubusd.t
 create mode 100644 tests/fuzz/CMakeLists.txt
 create mode 100644 tests/fuzz/corpus/05fe405753166f125559e7c9ac558654f107c7e9
 create mode 100644 tests/fuzz/corpus/0660e49c13f6d167a8298d885f724bad8f62fc35
 create mode 100644 tests/fuzz/corpus/37dadeab8d8ce7611f230f9524c1e8ab751c4a6a
 create mode 100644 tests/fuzz/corpus/71520a5c4b5ca73903216857abbad54a8002d44a
 create mode 100644 tests/fuzz/corpus/73c72a4d2bd1cd31b0b44256a888feec9eaaba27
 create mode 100644 tests/fuzz/corpus/8db068f76b98df8730f5308b12c793fdf04c47c2
 create mode 100644 tests/fuzz/corpus/c1dfd96eea8cc2b62785275bca38ac261256e278
 create mode 100644 tests/fuzz/corpus/c42ac1c46f1d4e211c735cc7dfad4ff8391110e9
 create mode 100644 tests/fuzz/corpus/crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
 create mode 100644 tests/fuzz/corpus/crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
 create mode 100644 tests/fuzz/corpus/crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
 create mode 100644 tests/fuzz/corpus/crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
 create mode 100644 tests/fuzz/corpus/crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
 create mode 100644 tests/fuzz/corpus/crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
 create mode 100644 tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
 create mode 100644 tests/fuzz/corpus/crash-df9d1243057b27bbad6211e5a23d1cb699028aa2
 create mode 100644 tests/fuzz/corpus/crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2
 create mode 100644 tests/fuzz/corpus/e2814b29dd2fd5db02b1ab7c5e147e1194a489ce
 create mode 100644 tests/fuzz/corpus/valid-blobmsg.bin
 create mode 100644 tests/fuzz/test-fuzz.c
 create mode 100644 ubusd_main.c


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:10 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:10 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 01/16] cmake: enable extra compiler
 checks
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-2-ynezz@true.cz>

Let's enforce additional automatic checks enforced by the compiler in
order to catch possible errors during compilation.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 CMakeLists.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8ef4aa58ccf..866b3ab60168 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,13 @@
 cmake_minimum_required(VERSION 2.6)
 
 PROJECT(ubus C)
-ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
+
+ADD_DEFINITIONS(-Wall -Werror)
+IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)
+	ADD_DEFINITIONS(-Wextra -Werror=implicit-function-declaration)
+	ADD_DEFINITIONS(-Wformat -Werror=format-security -Werror=format-nonliteral)
+ENDIF()
+ADD_DEFINITIONS(-Os -std=gnu99 -g3 -Wmissing-declarations -Wno-unused-parameter)
 
 OPTION(BUILD_LUA "build Lua plugin" ON)
 OPTION(BUILD_EXAMPLES "build examples" ON)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:11 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:11 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 02/16] ubusd: fix comparison of
 integers of different signs
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-3-ynezz@true.cz>

Fixes following clang-9 compiler warning:

 ubusd.c:36:19: error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
         if (ub->refcount == ~0) {
             ~~~~~~~~~~~~ ^  ~~

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 ubusd.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ubusd.c b/ubusd.c
index 0f35d3e25d34..7738f50f9779 100644
--- a/ubusd.c
+++ b/ubusd.c
@@ -30,10 +30,12 @@
 
 #include "ubusd.h"
 
+#define USES_EXTERNAL_BUFFER ~0U
+
 static struct ubus_msg_buf *ubus_msg_ref(struct ubus_msg_buf *ub)
 {
 	struct ubus_msg_buf *new_ub;
-	if (ub->refcount == ~0) {
+	if (ub->refcount == USES_EXTERNAL_BUFFER) {
 		new_ub = ubus_msg_new(ub->data, ub->len, false);
 		if (!new_ub)
 			return NULL;
@@ -61,7 +63,7 @@ struct ubus_msg_buf *ubus_msg_new(void *data, int len, bool shared)
 	ub->fd = -1;
 
 	if (shared) {
-		ub->refcount = ~0;
+		ub->refcount = USES_EXTERNAL_BUFFER;
 		ub->data = data;
 	} else {
 		ub->refcount = 1;
@@ -78,7 +80,7 @@ void ubus_msg_free(struct ubus_msg_buf *ub)
 {
 	switch (ub->refcount) {
 	case 1:
-	case ~0:
+	case USES_EXTERNAL_BUFFER:
 		if (ub->fd >= 0)
 			close(ub->fd);
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:12 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:12 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 03/16] ubusd/libubus-io: fix variable
 sized struct position warning
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-4-ynezz@true.cz>

Fixes following clang-9 compiler warnings:

 ubusd.c:99:18: error: field 'h' with variable sized type 'struct cmsghdr' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
                struct cmsghdr h;
                               ^

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 libubus-io.c | 4 ++--
 ubusd.c      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libubus-io.c b/libubus-io.c
index 228af5ca279c..cdd1e6e1ed6a 100644
--- a/libubus-io.c
+++ b/libubus-io.c
@@ -60,8 +60,8 @@ static void wait_data(int fd, bool write)
 static int writev_retry(int fd, struct iovec *iov, int iov_len, int sock_fd)
 {
 	static struct {
-		struct cmsghdr h;
 		int fd;
+		struct cmsghdr h;
 	} fd_buf = {
 		.h = {
 			.cmsg_len = sizeof(fd_buf),
@@ -159,8 +159,8 @@ static int recv_retry(struct ubus_context *ctx, struct iovec *iov, bool wait, in
 	int bytes, total = 0;
 	int fd = ctx->sock.fd;
 	static struct {
-		struct cmsghdr h;
 		int fd;
+		struct cmsghdr h;
 	} fd_buf = {
 		.h = {
 			.cmsg_type = SCM_RIGHTS,
diff --git a/ubusd.c b/ubusd.c
index 7738f50f9779..d6a72e73370b 100644
--- a/ubusd.c
+++ b/ubusd.c
@@ -96,8 +96,8 @@ static int ubus_msg_writev(int fd, struct ubus_msg_buf *ub, int offset)
 {
 	static struct iovec iov[2];
 	static struct {
-		struct cmsghdr h;
 		int fd;
+		struct cmsghdr h;
 	} fd_buf = {
 		.h = {
 			.cmsg_len = sizeof(fd_buf),
@@ -216,8 +216,8 @@ static void client_cb(struct uloop_fd *sock, unsigned int events)
 	struct ubus_msg_buf *ub;
 	static struct iovec iov;
 	static struct {
-		struct cmsghdr h;
 		int fd;
+		struct cmsghdr h;
 	} fd_buf = {
 		.h = {
 			.cmsg_type = SCM_RIGHTS,

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:13 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:13 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 04/16] iron out all extra compiler
 warnings
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-5-ynezz@true.cz>

clang-9 on x86/64 has reported following warnings/errors:

 libubus-acl.c:123:2: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
 libubus-io.c:108:18: error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
 libubus-io.c:395:56: error: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
 libubus-req.c:441:4: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
 ubusd_acl.c:119:18: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare]
 ubusd_acl.c:152:5: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
 ubusd_acl.c:348:3: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
 ubusd_acl.c:352:3: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
 ubusd_acl.c:357:3: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
 ubusd_acl.c:362:3: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
 ubusd_acl.c:367:3: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
 ubusd_acl.c:447:16: error: comparison of integers of different signs: 'int' and '__size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
 ubusd_acl.c:502:18: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare]
 ubusd.c:123:13: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare]
 ubusd.c:170:15: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare]
 ubusd.c:262:43: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare]
 ubusd.c:287:30: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare]
 ubusd_event.c:170:18: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare]
 ubusd_obj.c:71:2: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 cli.c             | 11 ++++++-----
 examples/server.c |  7 ++++---
 libubus-acl.c     |  2 +-
 libubus-io.c      |  6 +++---
 libubus-req.c     |  3 ++-
 lua/ubus.c        |  4 ++--
 ubusd.c           | 14 +++++++-------
 ubusd_acl.c       | 10 +++++-----
 ubusd_event.c     |  2 +-
 ubusd_obj.c       |  2 +-
 10 files changed, 32 insertions(+), 29 deletions(-)

diff --git a/cli.c b/cli.c
index 19ccbb5093ce..421f244ad9dc 100644
--- a/cli.c
+++ b/cli.c
@@ -47,7 +47,7 @@ static const char *format_type(void *priv, struct blob_attr *attr)
 		[BLOBMSG_TYPE_TABLE] = "\"Table\"",
 	};
 	const char *type = NULL;
-	int typeid;
+	size_t typeid;
 
 	if (blob_id(attr) != BLOBMSG_TYPE_INT32)
 		return NULL;
@@ -65,7 +65,7 @@ static void receive_list_result(struct ubus_context *ctx, struct ubus_object_dat
 {
 	struct blob_attr *cur;
 	char *s;
-	int rem;
+	size_t rem;
 
 	if (simple_output || !verbose) {
 		printf("%s\n", obj->path);
@@ -520,7 +520,7 @@ static int ubus_cli_monitor(struct ubus_context *ctx, int argc, char **argv)
 
 static int add_monitor_type(const char *type)
 {
-	int i;
+	size_t i;
 
 	for (i = 0; i < ARRAY_SIZE(monitor_types); i++) {
 		if (!monitor_types[i] || strcmp(monitor_types[i], type) != 0)
@@ -575,9 +575,10 @@ int main(int argc, char **argv)
 {
 	const char *progname, *ubus_socket = NULL;
 	struct ubus_context *ctx;
-	char *cmd;
 	int ret = 0;
-	int i, ch;
+	char *cmd;
+	size_t i;
+	int ch;
 
 	progname = argv[0];
 
diff --git a/examples/server.c b/examples/server.c
index e0cde0bf3a86..004eaf3a7ae1 100644
--- a/examples/server.c
+++ b/examples/server.c
@@ -84,7 +84,7 @@ static int test_hello(struct ubus_context *ctx, struct ubus_object *obj,
 {
 	struct hello_request *hreq;
 	struct blob_attr *tb[__HELLO_MAX];
-	const char *format = "%s received a message: %s";
+	const char format[] = "%s received a message: %s";
 	const char *msgstr = "(unknown)";
 
 	blobmsg_parse(hello_policy, ARRAY_SIZE(hello_policy), tb, blob_data(msg), blob_len(msg));
@@ -92,11 +92,12 @@ static int test_hello(struct ubus_context *ctx, struct ubus_object *obj,
 	if (tb[HELLO_MSG])
 		msgstr = blobmsg_data(tb[HELLO_MSG]);
 
-	hreq = calloc(1, sizeof(*hreq) + strlen(format) + strlen(obj->name) + strlen(msgstr) + 1);
+	size_t len = sizeof(*hreq) + sizeof(format) + strlen(obj->name) + strlen(msgstr) + 1;
+	hreq = calloc(1, len);
 	if (!hreq)
 		return UBUS_STATUS_UNKNOWN_ERROR;
 
-	sprintf(hreq->data, format, obj->name, msgstr);
+	snprintf(hreq->data, len, format, obj->name, msgstr);
 	ubus_defer_request(ctx, req, &hreq->req);
 	hreq->timeout.cb = test_hello_reply;
 	uloop_timeout_set(&hreq->timeout, 1000);
diff --git a/libubus-acl.c b/libubus-acl.c
index 0274520f7d57..aab6629d1367 100644
--- a/libubus-acl.c
+++ b/libubus-acl.c
@@ -102,7 +102,7 @@ static void acl_recv_cb(struct ubus_request *req,
 {
 	struct blob_attr *tb[__ACL_POLICY_MAX];
 	struct blob_attr *cur;
-	int rem;
+	size_t rem;
 
 	if (acl_blob) {
 		struct acl_object *p, *q;
diff --git a/libubus-io.c b/libubus-io.c
index cdd1e6e1ed6a..120fb605e90a 100644
--- a/libubus-io.c
+++ b/libubus-io.c
@@ -78,7 +78,7 @@ static int writev_retry(int fd, struct iovec *iov, int iov_len, int sock_fd)
 	int len = 0;
 
 	do {
-		int cur_len;
+		ssize_t cur_len;
 
 		if (sock_fd < 0) {
 			msghdr.msg_control = NULL;
@@ -105,7 +105,7 @@ static int writev_retry(int fd, struct iovec *iov, int iov_len, int sock_fd)
 			sock_fd = -1;
 
 		len += cur_len;
-		while (cur_len >= iov->iov_len) {
+		while (cur_len >= (ssize_t) iov->iov_len) {
 			cur_len -= iov->iov_len;
 			iov_len--;
 			iov++;
@@ -392,7 +392,7 @@ int ubus_reconnect(struct ubus_context *ctx, const char *path)
 		goto out_close;
 
 	memcpy(buf, &hdr.data, sizeof(hdr.data));
-	if (read(ctx->sock.fd, blob_data(buf), blob_len(buf)) != blob_len(buf))
+	if (read(ctx->sock.fd, blob_data(buf), blob_len(buf)) != (ssize_t) blob_len(buf))
 		goto out_free;
 
 	ctx->local_id = hdr.hdr.peer;
diff --git a/libubus-req.c b/libubus-req.c
index 74446f3fef51..97785a1e24cd 100644
--- a/libubus-req.c
+++ b/libubus-req.c
@@ -428,7 +428,8 @@ static void ubus_process_notify_status(struct ubus_request *req, int id, struct
 	struct ubus_notify_request *nreq;
 	struct blob_attr **tb;
 	struct blob_attr *cur;
-	int rem, idx = 1;
+	size_t rem;
+	int idx = 1;
 	int ret = 0;
 
 	nreq = container_of(req, struct ubus_notify_request, req);
diff --git a/lua/ubus.c b/lua/ubus.c
index 4da3c80e07f5..6fbbc0686af3 100644
--- a/lua/ubus.c
+++ b/lua/ubus.c
@@ -52,11 +52,11 @@ static int
 ubus_lua_parse_blob(lua_State *L, struct blob_attr *attr, bool table);
 
 static int
-ubus_lua_parse_blob_array(lua_State *L, struct blob_attr *attr, int len, bool table)
+ubus_lua_parse_blob_array(lua_State *L, struct blob_attr *attr, size_t len, bool table)
 {
 	int rv;
 	int idx = 1;
-	int rem = len;
+	size_t rem = len;
 	struct blob_attr *pos;
 
 	lua_newtable(L);
diff --git a/ubusd.c b/ubusd.c
index d6a72e73370b..c020ff416a32 100644
--- a/ubusd.c
+++ b/ubusd.c
@@ -92,7 +92,7 @@ void ubus_msg_free(struct ubus_msg_buf *ub)
 	}
 }
 
-static int ubus_msg_writev(int fd, struct ubus_msg_buf *ub, int offset)
+static ssize_t ubus_msg_writev(int fd, struct ubus_msg_buf *ub, size_t offset)
 {
 	static struct iovec iov[2];
 	static struct {
@@ -112,7 +112,7 @@ static int ubus_msg_writev(int fd, struct ubus_msg_buf *ub, int offset)
 		.msg_controllen = sizeof(fd_buf),
 	};
 	struct ubus_msghdr hdr;
-	int ret;
+	ssize_t ret;
 
 	fd_buf.fd = ub->fd;
 	if (ub->fd < 0 || offset) {
@@ -156,7 +156,7 @@ static void ubus_msg_enqueue(struct ubus_client *cl, struct ubus_msg_buf *ub)
 /* takes the msgbuf reference */
 void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub)
 {
-	int written;
+	ssize_t written;
 
 	if (ub->hdr.type != UBUS_MSG_MONITOR)
 		ubusd_monitor_message(cl, ub, true);
@@ -167,7 +167,7 @@ void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub)
 		if (written < 0)
 			written = 0;
 
-		if (written >= ub->len + sizeof(ub->hdr))
+		if (written >= (ssize_t) (ub->len + sizeof(ub->hdr)))
 			return;
 
 		cl->txq_ofs = written;
@@ -232,7 +232,7 @@ static void client_cb(struct uloop_fd *sock, unsigned int events)
 
 	/* first try to tx more pending data */
 	while ((ub = ubus_msg_head(cl))) {
-		int written;
+		ssize_t written;
 
 		written = ubus_msg_writev(sock->fd, ub, cl->txq_ofs);
 		if (written < 0) {
@@ -259,7 +259,7 @@ static void client_cb(struct uloop_fd *sock, unsigned int events)
 		uloop_fd_add(sock, ULOOP_READ | ULOOP_EDGE_TRIGGER);
 
 retry:
-	if (!sock->eof && cl->pending_msg_offset < sizeof(cl->hdrbuf)) {
+	if (!sock->eof && cl->pending_msg_offset < (int) sizeof(cl->hdrbuf)) {
 		int offset = cl->pending_msg_offset;
 		int bytes;
 
@@ -284,7 +284,7 @@ retry:
 			cl->pending_msg_fd = fd_buf.fd;
 
 		cl->pending_msg_offset += bytes;
-		if (cl->pending_msg_offset < sizeof(cl->hdrbuf))
+		if (cl->pending_msg_offset < (int) sizeof(cl->hdrbuf))
 			goto out;
 
 		if (blob_pad_len(&cl->hdrbuf.data) > UBUS_MAX_MSGLEN)
diff --git a/ubusd_acl.c b/ubusd_acl.c
index 6257f811a651..f19df9a875c7 100644
--- a/ubusd_acl.c
+++ b/ubusd_acl.c
@@ -116,7 +116,7 @@ ubusd_acl_check(struct ubus_client *cl, const char *obj,
 			if (!acl->partial)
 				continue;
 
-			if (match_len != strlen(key))
+			if (match_len != (int) strlen(key))
 				continue;
 		}
 
@@ -147,7 +147,7 @@ ubusd_acl_check(struct ubus_client *cl, const char *obj,
 		case UBUS_ACL_ACCESS:
 			if (acl->methods) {
 				struct blob_attr *cur;
-				int rem;
+				size_t rem;
 
 				blobmsg_for_each_attr(cur, acl->methods, rem)
 					if (blobmsg_type(cur) == BLOBMSG_TYPE_STRING)
@@ -332,7 +332,7 @@ static void
 ubusd_acl_file_add(struct ubusd_acl_file *file)
 {
 	struct blob_attr *tb[__ACL_MAX], *cur;
-	int rem;
+	size_t rem;
 
 	blobmsg_parse(acl_policy, __ACL_MAX, tb, blob_data(file->blob),
 		      blob_len(file->blob));
@@ -435,7 +435,7 @@ ubusd_acl_load(void)
 {
 	struct stat st;
 	glob_t gl;
-	int j;
+	size_t j;
 	const char *suffix = "/*.json";
 	char *path = alloca(strlen(ubusd_acl_dir) + strlen(suffix) + 1);
 
@@ -499,7 +499,7 @@ ubusd_reply_add(struct ubus_object *obj)
 			if (!acl->partial)
 				continue;
 
-			if (match_len != strlen(key))
+			if (match_len != (int) strlen(key))
 				continue;
 		}
 
diff --git a/ubusd_event.c b/ubusd_event.c
index 712e7049946a..d36bcb73ddda 100644
--- a/ubusd_event.c
+++ b/ubusd_event.c
@@ -167,7 +167,7 @@ int ubusd_send_event(struct ubus_client *cl, const char *id,
 			if (!ev->partial)
 				continue;
 
-			if (match_len != strlen(key))
+			if (match_len != (int) strlen(key))
 				continue;
 		}
 
diff --git a/ubusd_obj.c b/ubusd_obj.c
index 08314732567e..0c9cb9ae8208 100644
--- a/ubusd_obj.c
+++ b/ubusd_obj.c
@@ -55,7 +55,7 @@ static struct ubus_object_type *ubus_create_obj_type(struct blob_attr *sig)
 {
 	struct ubus_object_type *type;
 	struct blob_attr *pos;
-	int rem;
+	size_t rem;
 
 	type = calloc(1, sizeof(*type));
 	if (!type)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:14 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:14 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 05/16] libubus: fix incompatible
 pointer types assigment
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-6-ynezz@true.cz>

Fixes following error reported by clang-9 analyzer:

 libubus.c:286:19: error: incompatible pointer types assigning to 'struct blob_attr *' from 'char *' [-Werror,-Wincompatible-pointer-types]
         ctx->msgbuf.data = (char *) calloc(UBUS_MSG_CHUNK_SIZE, sizeof(char));

Result of 'calloc' is converted to a pointer of type 'struct blob_attr',
which is incompatible with sizeof operand type 'char'.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 libubus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libubus.c b/libubus.c
index 260e40f2f44b..846ae83bcc12 100644
--- a/libubus.c
+++ b/libubus.c
@@ -283,7 +283,7 @@ int ubus_connect_ctx(struct ubus_context *ctx, const char *path)
 	ctx->connection_lost = ubus_default_connection_lost;
 	ctx->pending_timer.cb = ubus_process_pending_msg;
 
-	ctx->msgbuf.data = calloc(UBUS_MSG_CHUNK_SIZE, sizeof(char));
+	ctx->msgbuf.data = calloc(1, UBUS_MSG_CHUNK_SIZE);
 	if (!ctx->msgbuf.data)
 		return -1;
 	ctx->msgbuf_data_len = UBUS_MSG_CHUNK_SIZE;

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:15 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:15 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 06/16] add initial GitLab CI support
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-7-ynezz@true.cz>

Uses currently proof-of-concept openwrt-ci[1] in order to:

 * improve the quality of the codebase in various areas
 * decrease code review time and help merging contributions faster
 * get automagic feedback loop on various platforms and tools
   - out of tree build with OpenWrt SDK on following targets:
     * ath79-generic
     * imx6-generic
     * malta-be
     * mvebu-cortexa53
   - out of tree native build on x86/64 with GCC (versions 7, 8, 9) and Clang 10
   - out of tree native x86/64 static code analysis with cppcheck and
     scan-build from Clang 9

1. https://gitlab.com/ynezz/openwrt-ci/

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 .gitlab-ci.yml | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000000..1b4d5a795865
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,7 @@
+variables:
+  CI_TARGET_BUILD_DEPENDS: ubus
+  CI_CMAKE_EXTRA_BUILD_ARGS: -DLUAPATH=/usr/lib/lua
+
+include:
+  - remote: https://gitlab.com/ynezz/openwrt-ci/raw/master/openwrt-ci/gitlab/main.yml
+  - remote: https://gitlab.com/ynezz/openwrt-ci/raw/master/openwrt-ci/gitlab/pipeline.yml

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:16 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:16 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 07/16] examples: remove dead increments
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-8-ynezz@true.cz>

Fixes following error reported by clang-9 analyzer:

 examples/server.c:244:2: warning: Value stored to 'argc' is never read
        argc -= optind;
        ^       ~~~~~~

 examples/server.c:245:2: warning: Value stored to 'argv' is never read
        argv += optind;
        ^       ~~~~~~

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 examples/client.c | 3 ---
 examples/server.c | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/examples/client.c b/examples/client.c
index 7ef566347e54..aae09f480af4 100644
--- a/examples/client.c
+++ b/examples/client.c
@@ -220,9 +220,6 @@ int main(int argc, char **argv)
 		}
 	}
 
-	argc -= optind;
-	argv += optind;
-
 	uloop_init();
 
 	ctx = ubus_connect(ubus_socket);
diff --git a/examples/server.c b/examples/server.c
index 004eaf3a7ae1..0913fff0d016 100644
--- a/examples/server.c
+++ b/examples/server.c
@@ -241,9 +241,6 @@ int main(int argc, char **argv)
 		}
 	}
 
-	argc -= optind;
-	argv += optind;
-
 	uloop_init();
 	signal(SIGPIPE, SIG_IGN);
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:17 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:17 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 08/16] refactor ubusd.c into reusable
 ubusd_library
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-9-ynezz@true.cz>

In order to allow reusability in unit testing & fuzzing.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 CMakeLists.txt     |   5 +-
 libubus-internal.h |   1 +
 libubus-io.c       |   2 +-
 ubusd.c            | 269 +-------------------------------------------
 ubusd.h            |   1 +
 ubusd_main.c       | 271 +++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 278 insertions(+), 271 deletions(-)
 create mode 100644 ubusd_main.c

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 866b3ab60168..dc6e42847086 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,8 +41,9 @@ TARGET_LINK_LIBRARIES(ubus ${ubox_library})
 
 find_library(json NAMES json-c json)
 
-ADD_EXECUTABLE(ubusd ubusd.c ubusd_id.c ubusd_obj.c ubusd_proto.c ubusd_event.c ubusd_acl.c ubusd_monitor.c)
-TARGET_LINK_LIBRARIES(ubusd ${ubox_library} ${blob_library} ${json})
+ADD_LIBRARY(ubusd_library STATIC ubusd.c ubusd_proto.c ubusd_id.c ubusd_obj.c ubusd_event.c ubusd_acl.c ubusd_monitor.c)
+ADD_EXECUTABLE(ubusd ubusd_main.c)
+TARGET_LINK_LIBRARIES(ubusd ubusd_library ${ubox_library} ${blob_library} ${json})
 
 ADD_EXECUTABLE(cli cli.c)
 SET_TARGET_PROPERTIES(cli PROPERTIES OUTPUT_NAME ubus)
diff --git a/libubus-internal.h b/libubus-internal.h
index c4067d343817..8cf99b3bc6b1 100644
--- a/libubus-internal.h
+++ b/libubus-internal.h
@@ -18,6 +18,7 @@ extern struct blob_buf b;
 extern const struct ubus_method watch_method;
 
 struct blob_attr **ubus_parse_msg(struct blob_attr *msg);
+bool ubus_validate_hdr(struct ubus_msghdr *hdr);
 void ubus_handle_data(struct uloop_fd *u, unsigned int events);
 int ubus_send_msg(struct ubus_context *ctx, uint32_t seq,
 		  struct blob_attr *msg, int cmd, uint32_t peer, int fd);
diff --git a/libubus-io.c b/libubus-io.c
index 120fb605e90a..81c1cd1309b1 100644
--- a/libubus-io.c
+++ b/libubus-io.c
@@ -215,7 +215,7 @@ static int recv_retry(struct ubus_context *ctx, struct iovec *iov, bool wait, in
 	return total;
 }
 
-static bool ubus_validate_hdr(struct ubus_msghdr *hdr)
+bool ubus_validate_hdr(struct ubus_msghdr *hdr)
 {
 	struct blob_attr *data = (struct blob_attr *) (hdr + 1);
 
diff --git a/ubusd.c b/ubusd.c
index c020ff416a32..0d43977c0bde 100644
--- a/ubusd.c
+++ b/ubusd.c
@@ -12,21 +12,9 @@
  */
 
 #include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/uio.h>
 #ifdef FreeBSD
 #include <sys/param.h>
 #endif
-#include <syslog.h>
-#include <signal.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#include <libubox/blob.h>
-#include <libubox/uloop.h>
-#include <libubox/usock.h>
-#include <libubox/list.h>
 
 #include "ubusd.h"
 
@@ -92,7 +80,7 @@ void ubus_msg_free(struct ubus_msg_buf *ub)
 	}
 }
 
-static ssize_t ubus_msg_writev(int fd, struct ubus_msg_buf *ub, size_t offset)
+ssize_t ubus_msg_writev(int fd, struct ubus_msg_buf *ub, size_t offset)
 {
 	static struct iovec iov[2];
 	static struct {
@@ -177,258 +165,3 @@ void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub)
 	}
 	ubus_msg_enqueue(cl, ub);
 }
-
-static struct ubus_msg_buf *ubus_msg_head(struct ubus_client *cl)
-{
-	return cl->tx_queue[cl->txq_cur];
-}
-
-static void ubus_msg_dequeue(struct ubus_client *cl)
-{
-	struct ubus_msg_buf *ub = ubus_msg_head(cl);
-
-	if (!ub)
-		return;
-
-	ubus_msg_free(ub);
-	cl->txq_ofs = 0;
-	cl->tx_queue[cl->txq_cur] = NULL;
-	cl->txq_cur = (cl->txq_cur + 1) % ARRAY_SIZE(cl->tx_queue);
-}
-
-static void handle_client_disconnect(struct ubus_client *cl)
-{
-	while (ubus_msg_head(cl))
-		ubus_msg_dequeue(cl);
-
-	ubusd_monitor_disconnect(cl);
-	ubusd_proto_free_client(cl);
-	if (cl->pending_msg_fd >= 0)
-		close(cl->pending_msg_fd);
-	uloop_fd_delete(&cl->sock);
-	close(cl->sock.fd);
-	free(cl);
-}
-
-static void client_cb(struct uloop_fd *sock, unsigned int events)
-{
-	struct ubus_client *cl = container_of(sock, struct ubus_client, sock);
-	struct ubus_msg_buf *ub;
-	static struct iovec iov;
-	static struct {
-		int fd;
-		struct cmsghdr h;
-	} fd_buf = {
-		.h = {
-			.cmsg_type = SCM_RIGHTS,
-			.cmsg_level = SOL_SOCKET,
-			.cmsg_len = sizeof(fd_buf),
-		}
-	};
-	struct msghdr msghdr = {
-		.msg_iov = &iov,
-		.msg_iovlen = 1,
-	};
-
-	/* first try to tx more pending data */
-	while ((ub = ubus_msg_head(cl))) {
-		ssize_t written;
-
-		written = ubus_msg_writev(sock->fd, ub, cl->txq_ofs);
-		if (written < 0) {
-			switch(errno) {
-			case EINTR:
-			case EAGAIN:
-				break;
-			default:
-				goto disconnect;
-			}
-			break;
-		}
-
-		cl->txq_ofs += written;
-		if (cl->txq_ofs < ub->len + sizeof(ub->hdr))
-			break;
-
-		ubus_msg_dequeue(cl);
-	}
-
-	/* prevent further ULOOP_WRITE events if we don't have data
-	 * to send anymore */
-	if (!ubus_msg_head(cl) && (events & ULOOP_WRITE))
-		uloop_fd_add(sock, ULOOP_READ | ULOOP_EDGE_TRIGGER);
-
-retry:
-	if (!sock->eof && cl->pending_msg_offset < (int) sizeof(cl->hdrbuf)) {
-		int offset = cl->pending_msg_offset;
-		int bytes;
-
-		fd_buf.fd = -1;
-
-		iov.iov_base = ((char *) &cl->hdrbuf) + offset;
-		iov.iov_len = sizeof(cl->hdrbuf) - offset;
-
-		if (cl->pending_msg_fd < 0) {
-			msghdr.msg_control = &fd_buf;
-			msghdr.msg_controllen = sizeof(fd_buf);
-		} else {
-			msghdr.msg_control = NULL;
-			msghdr.msg_controllen = 0;
-		}
-
-		bytes = recvmsg(sock->fd, &msghdr, 0);
-		if (bytes < 0)
-			goto out;
-
-		if (fd_buf.fd >= 0)
-			cl->pending_msg_fd = fd_buf.fd;
-
-		cl->pending_msg_offset += bytes;
-		if (cl->pending_msg_offset < (int) sizeof(cl->hdrbuf))
-			goto out;
-
-		if (blob_pad_len(&cl->hdrbuf.data) > UBUS_MAX_MSGLEN)
-			goto disconnect;
-
-		cl->pending_msg = ubus_msg_new(NULL, blob_raw_len(&cl->hdrbuf.data), false);
-		if (!cl->pending_msg)
-			goto disconnect;
-
-		cl->hdrbuf.hdr.seq = be16_to_cpu(cl->hdrbuf.hdr.seq);
-		cl->hdrbuf.hdr.peer = be32_to_cpu(cl->hdrbuf.hdr.peer);
-
-		memcpy(&cl->pending_msg->hdr, &cl->hdrbuf.hdr, sizeof(cl->hdrbuf.hdr));
-		memcpy(cl->pending_msg->data, &cl->hdrbuf.data, sizeof(cl->hdrbuf.data));
-	}
-
-	ub = cl->pending_msg;
-	if (ub) {
-		int offset = cl->pending_msg_offset - sizeof(ub->hdr);
-		int len = blob_raw_len(ub->data) - offset;
-		int bytes = 0;
-
-		if (len > 0) {
-			bytes = read(sock->fd, (char *) ub->data + offset, len);
-			if (bytes <= 0)
-				goto out;
-		}
-
-		if (bytes < len) {
-			cl->pending_msg_offset += bytes;
-			goto out;
-		}
-
-		/* accept message */
-		ub->fd = cl->pending_msg_fd;
-		cl->pending_msg_fd = -1;
-		cl->pending_msg_offset = 0;
-		cl->pending_msg = NULL;
-		ubusd_monitor_message(cl, ub, false);
-		ubusd_proto_receive_message(cl, ub);
-		goto retry;
-	}
-
-out:
-	if (!sock->eof || ubus_msg_head(cl))
-		return;
-
-disconnect:
-	handle_client_disconnect(cl);
-}
-
-static bool get_next_connection(int fd)
-{
-	struct ubus_client *cl;
-	int client_fd;
-
-	client_fd = accept(fd, NULL, 0);
-	if (client_fd < 0) {
-		switch (errno) {
-		case ECONNABORTED:
-		case EINTR:
-			return true;
-		default:
-			return false;
-		}
-	}
-
-	cl = ubusd_proto_new_client(client_fd, client_cb);
-	if (cl)
-		uloop_fd_add(&cl->sock, ULOOP_READ | ULOOP_EDGE_TRIGGER);
-	else
-		close(client_fd);
-
-	return true;
-}
-
-static void server_cb(struct uloop_fd *fd, unsigned int events)
-{
-	bool next;
-
-	do {
-		next = get_next_connection(fd->fd);
-	} while (next);
-}
-
-static struct uloop_fd server_fd = {
-	.cb = server_cb,
-};
-
-static int usage(const char *progname)
-{
-	fprintf(stderr, "Usage: %s [<options>]\n"
-		"Options: \n"
-		"  -A <path>:		Set the path to ACL files\n"
-		"  -s <socket>:		Set the unix domain socket to listen on\n"
-		"\n", progname);
-	return 1;
-}
-
-static void sighup_handler(int sig)
-{
-	ubusd_acl_load();
-}
-
-int main(int argc, char **argv)
-{
-	const char *ubus_socket = UBUS_UNIX_SOCKET;
-	int ret = 0;
-	int ch;
-
-	signal(SIGPIPE, SIG_IGN);
-	signal(SIGHUP, sighup_handler);
-
-	openlog("ubusd", LOG_PID, LOG_DAEMON);
-	uloop_init();
-
-	while ((ch = getopt(argc, argv, "A:s:")) != -1) {
-		switch (ch) {
-		case 's':
-			ubus_socket = optarg;
-			break;
-		case 'A':
-			ubusd_acl_dir = optarg;
-			break;
-		default:
-			return usage(argv[0]);
-		}
-	}
-
-	unlink(ubus_socket);
-	umask(0111);
-	server_fd.fd = usock(USOCK_UNIX | USOCK_SERVER | USOCK_NONBLOCK, ubus_socket, NULL);
-	if (server_fd.fd < 0) {
-		perror("usock");
-		ret = -1;
-		goto out;
-	}
-	uloop_fd_add(&server_fd, ULOOP_READ | ULOOP_EDGE_TRIGGER);
-	ubusd_acl_load();
-
-	uloop_run();
-	unlink(ubus_socket);
-
-out:
-	uloop_done();
-	return ret;
-}
diff --git a/ubusd.h b/ubusd.h
index 4d879201e2f5..867cde9a384b 100644
--- a/ubusd.h
+++ b/ubusd.h
@@ -70,6 +70,7 @@ extern const char *ubusd_acl_dir;
 
 struct ubus_msg_buf *ubus_msg_new(void *data, int len, bool shared);
 void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub);
+ssize_t ubus_msg_writev(int fd, struct ubus_msg_buf *ub, size_t offset);
 void ubus_msg_free(struct ubus_msg_buf *ub);
 struct blob_attr **ubus_parse_msg(struct blob_attr *msg);
 
diff --git a/ubusd_main.c b/ubusd_main.c
new file mode 100644
index 000000000000..81868c1482bc
--- /dev/null
+++ b/ubusd_main.c
@@ -0,0 +1,271 @@
+/*
+ * Copyright (C) 2011-2014 Felix Fietkau <nbd at openwrt.org>
+ *
+ * SPDX-License-Identifier: LGPL-2.1-only
+ */
+
+#include <sys/socket.h>
+#include <sys/stat.h>
+#ifdef FreeBSD
+#include <sys/param.h>
+#endif
+#include <syslog.h>
+
+#include <libubox/usock.h>
+
+#include "ubusd.h"
+
+static struct ubus_msg_buf *ubus_msg_head(struct ubus_client *cl)
+{
+	return cl->tx_queue[cl->txq_cur];
+}
+
+static void ubus_msg_dequeue(struct ubus_client *cl)
+{
+	struct ubus_msg_buf *ub = ubus_msg_head(cl);
+
+	if (!ub)
+		return;
+
+	ubus_msg_free(ub);
+	cl->txq_ofs = 0;
+	cl->tx_queue[cl->txq_cur] = NULL;
+	cl->txq_cur = (cl->txq_cur + 1) % ARRAY_SIZE(cl->tx_queue);
+}
+
+static void handle_client_disconnect(struct ubus_client *cl)
+{
+	while (ubus_msg_head(cl))
+		ubus_msg_dequeue(cl);
+
+	ubusd_monitor_disconnect(cl);
+	ubusd_proto_free_client(cl);
+	if (cl->pending_msg_fd >= 0)
+		close(cl->pending_msg_fd);
+	uloop_fd_delete(&cl->sock);
+	close(cl->sock.fd);
+	free(cl);
+}
+
+static void client_cb(struct uloop_fd *sock, unsigned int events)
+{
+	struct ubus_client *cl = container_of(sock, struct ubus_client, sock);
+	struct ubus_msg_buf *ub;
+	static struct iovec iov;
+	static struct {
+		int fd;
+		struct cmsghdr h;
+	} fd_buf = {
+		.h = {
+			.cmsg_type = SCM_RIGHTS,
+			.cmsg_level = SOL_SOCKET,
+			.cmsg_len = sizeof(fd_buf),
+		}
+	};
+	struct msghdr msghdr = {
+		.msg_iov = &iov,
+		.msg_iovlen = 1,
+	};
+
+	/* first try to tx more pending data */
+	while ((ub = ubus_msg_head(cl))) {
+		ssize_t written;
+
+		written = ubus_msg_writev(sock->fd, ub, cl->txq_ofs);
+		if (written < 0) {
+			switch(errno) {
+			case EINTR:
+			case EAGAIN:
+				break;
+			default:
+				goto disconnect;
+			}
+			break;
+		}
+
+		cl->txq_ofs += written;
+		if (cl->txq_ofs < ub->len + sizeof(ub->hdr))
+			break;
+
+		ubus_msg_dequeue(cl);
+	}
+
+	/* prevent further ULOOP_WRITE events if we don't have data
+	 * to send anymore */
+	if (!ubus_msg_head(cl) && (events & ULOOP_WRITE))
+		uloop_fd_add(sock, ULOOP_READ | ULOOP_EDGE_TRIGGER);
+
+retry:
+	if (!sock->eof && cl->pending_msg_offset < (int) sizeof(cl->hdrbuf)) {
+		int offset = cl->pending_msg_offset;
+		int bytes;
+
+		fd_buf.fd = -1;
+
+		iov.iov_base = ((char *) &cl->hdrbuf) + offset;
+		iov.iov_len = sizeof(cl->hdrbuf) - offset;
+
+		if (cl->pending_msg_fd < 0) {
+			msghdr.msg_control = &fd_buf;
+			msghdr.msg_controllen = sizeof(fd_buf);
+		} else {
+			msghdr.msg_control = NULL;
+			msghdr.msg_controllen = 0;
+		}
+
+		bytes = recvmsg(sock->fd, &msghdr, 0);
+		if (bytes < 0)
+			goto out;
+
+		if (fd_buf.fd >= 0)
+			cl->pending_msg_fd = fd_buf.fd;
+
+		cl->pending_msg_offset += bytes;
+		if (cl->pending_msg_offset < (int) sizeof(cl->hdrbuf))
+			goto out;
+
+		if (blob_pad_len(&cl->hdrbuf.data) > UBUS_MAX_MSGLEN)
+			goto disconnect;
+
+		cl->pending_msg = ubus_msg_new(NULL, blob_raw_len(&cl->hdrbuf.data), false);
+		if (!cl->pending_msg)
+			goto disconnect;
+
+		cl->hdrbuf.hdr.seq = be16_to_cpu(cl->hdrbuf.hdr.seq);
+		cl->hdrbuf.hdr.peer = be32_to_cpu(cl->hdrbuf.hdr.peer);
+
+		memcpy(&cl->pending_msg->hdr, &cl->hdrbuf.hdr, sizeof(cl->hdrbuf.hdr));
+		memcpy(cl->pending_msg->data, &cl->hdrbuf.data, sizeof(cl->hdrbuf.data));
+	}
+
+	ub = cl->pending_msg;
+	if (ub) {
+		int offset = cl->pending_msg_offset - sizeof(ub->hdr);
+		int len = blob_raw_len(ub->data) - offset;
+		int bytes = 0;
+
+		if (len > 0) {
+			bytes = read(sock->fd, (char *) ub->data + offset, len);
+			if (bytes <= 0)
+				goto out;
+		}
+
+		if (bytes < len) {
+			cl->pending_msg_offset += bytes;
+			goto out;
+		}
+
+		/* accept message */
+		ub->fd = cl->pending_msg_fd;
+		cl->pending_msg_fd = -1;
+		cl->pending_msg_offset = 0;
+		cl->pending_msg = NULL;
+		ubusd_monitor_message(cl, ub, false);
+		ubusd_proto_receive_message(cl, ub);
+		goto retry;
+	}
+
+out:
+	if (!sock->eof || ubus_msg_head(cl))
+		return;
+
+disconnect:
+	handle_client_disconnect(cl);
+}
+
+static bool get_next_connection(int fd)
+{
+	struct ubus_client *cl;
+	int client_fd;
+
+	client_fd = accept(fd, NULL, 0);
+	if (client_fd < 0) {
+		switch (errno) {
+		case ECONNABORTED:
+		case EINTR:
+			return true;
+		default:
+			return false;
+		}
+	}
+
+	cl = ubusd_proto_new_client(client_fd, client_cb);
+	if (cl)
+		uloop_fd_add(&cl->sock, ULOOP_READ | ULOOP_EDGE_TRIGGER);
+	else
+		close(client_fd);
+
+	return true;
+}
+
+static void server_cb(struct uloop_fd *fd, unsigned int events)
+{
+	bool next;
+
+	do {
+		next = get_next_connection(fd->fd);
+	} while (next);
+}
+
+static struct uloop_fd server_fd = {
+	.cb = server_cb,
+};
+
+static int usage(const char *progname)
+{
+	fprintf(stderr, "Usage: %s [<options>]\n"
+		"Options: \n"
+		"  -A <path>:		Set the path to ACL files\n"
+		"  -s <socket>:		Set the unix domain socket to listen on\n"
+		"\n", progname);
+	return 1;
+}
+
+static void sighup_handler(int sig)
+{
+	ubusd_acl_load();
+}
+
+int main(int argc, char **argv)
+{
+	const char *ubus_socket = UBUS_UNIX_SOCKET;
+	int ret = 0;
+	int ch;
+
+	signal(SIGPIPE, SIG_IGN);
+	signal(SIGHUP, sighup_handler);
+
+	openlog("ubusd", LOG_PID, LOG_DAEMON);
+	uloop_init();
+
+	while ((ch = getopt(argc, argv, "A:s:")) != -1) {
+		switch (ch) {
+		case 's':
+			ubus_socket = optarg;
+			break;
+		case 'A':
+			ubusd_acl_dir = optarg;
+			break;
+		default:
+			return usage(argv[0]);
+		}
+	}
+
+	unlink(ubus_socket);
+	umask(0111);
+	server_fd.fd = usock(USOCK_UNIX | USOCK_SERVER | USOCK_NONBLOCK, ubus_socket, NULL);
+	if (server_fd.fd < 0) {
+		perror("usock");
+		ret = -1;
+		goto out;
+	}
+	uloop_fd_add(&server_fd, ULOOP_READ | ULOOP_EDGE_TRIGGER);
+	ubusd_acl_load();
+
+	uloop_run();
+	unlink(ubus_socket);
+
+out:
+	uloop_done();
+	return ret;
+}

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:18 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:18 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 09/16] add fuzzer and cram based unit
 tests
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-10-ynezz@true.cz>

For improved QA etc.

Signed-off-by: Petr ??tetiar <ynezz at true.cz>
---
 CMakeLists.txt                                |  16 +++++
 tests/CMakeLists.txt                          |  18 ++++++
 tests/cram/CMakeLists.txt                     |  22 +++++++
 tests/cram/test_ubus.t                        |  58 ++++++++++++++++++
 tests/cram/test_ubusd.t                       |  24 ++++++++
 tests/fuzz/CMakeLists.txt                     |  18 ++++++
 .../05fe405753166f125559e7c9ac558654f107c7e9  | Bin 0 -> 8 bytes
 .../0660e49c13f6d167a8298d885f724bad8f62fc35  | Bin 0 -> 8 bytes
 .../37dadeab8d8ce7611f230f9524c1e8ab751c4a6a  | Bin 0 -> 8 bytes
 .../71520a5c4b5ca73903216857abbad54a8002d44a  | Bin 0 -> 2 bytes
 .../73c72a4d2bd1cd31b0b44256a888feec9eaaba27  | Bin 0 -> 9 bytes
 .../8db068f76b98df8730f5308b12c793fdf04c47c2  | Bin 0 -> 8 bytes
 .../c1dfd96eea8cc2b62785275bca38ac261256e278  |   1 +
 .../c42ac1c46f1d4e211c735cc7dfad4ff8391110e9  | Bin 0 -> 3 bytes
 ...h-1b8fb1be45db3aff7699100f497fb74138f3df4f | Bin 0 -> 6 bytes
 ...h-4c4d2c3c9ade5da9347534e290305c3b9760f627 | Bin 0 -> 17 bytes
 ...h-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b | Bin 0 -> 86 bytes
 ...h-75b146c4e6fac64d3e62236b27c64b50657bab2a | Bin 0 -> 4 bytes
 ...h-813f3e68661da09c26d4a87dbb9d5099e92be50f | Bin 0 -> 36 bytes
 ...h-98595faa58ba01d85ba4fd0b109cd3d490b45795 | Bin 0 -> 6 bytes
 ...h-d0f3aa7d60a094b021f635d4edb7807c055a4ea1 |   1 +
 ...h-df9d1243057b27bbad6211e5a23d1cb699028aa2 | Bin 0 -> 16 bytes
 ...h-e2fd5ecb3b37926743256f1083f47a07c39e10c2 | Bin 0 -> 66 bytes
 .../e2814b29dd2fd5db02b1ab7c5e147e1194a489ce  | Bin 0 -> 8 bytes
 tests/fuzz/corpus/valid-blobmsg.bin           | Bin 0 -> 176 bytes
 tests/fuzz/test-fuzz.c                        |  40 ++++++++++++
 26 files changed, 198 insertions(+)
 create mode 100644 tests/CMakeLists.txt
 create mode 100644 tests/cram/CMakeLists.txt
 create mode 100644 tests/cram/test_ubus.t
 create mode 100644 tests/cram/test_ubusd.t
 create mode 100644 tests/fuzz/CMakeLists.txt
 create mode 100644 tests/fuzz/corpus/05fe405753166f125559e7c9ac558654f107c7e9
 create mode 100644 tests/fuzz/corpus/0660e49c13f6d167a8298d885f724bad8f62fc35
 create mode 100644 tests/fuzz/corpus/37dadeab8d8ce7611f230f9524c1e8ab751c4a6a
 create mode 100644 tests/fuzz/corpus/71520a5c4b5ca73903216857abbad54a8002d44a
 create mode 100644 tests/fuzz/corpus/73c72a4d2bd1cd31b0b44256a888feec9eaaba27
 create mode 100644 tests/fuzz/corpus/8db068f76b98df8730f5308b12c793fdf04c47c2
 create mode 100644 tests/fuzz/corpus/c1dfd96eea8cc2b62785275bca38ac261256e278
 create mode 100644 tests/fuzz/corpus/c42ac1c46f1d4e211c735cc7dfad4ff8391110e9
 create mode 100644 tests/fuzz/corpus/crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
 create mode 100644 tests/fuzz/corpus/crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
 create mode 100644 tests/fuzz/corpus/crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
 create mode 100644 tests/fuzz/corpus/crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
 create mode 100644 tests/fuzz/corpus/crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
 create mode 100644 tests/fuzz/corpus/crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
 create mode 100644 tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
 create mode 100644 tests/fuzz/corpus/crash-df9d1243057b27bbad6211e5a23d1cb699028aa2
 create mode 100644 tests/fuzz/corpus/crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2
 create mode 100644 tests/fuzz/corpus/e2814b29dd2fd5db02b1ab7c5e147e1194a489ce
 create mode 100644 tests/fuzz/corpus/valid-blobmsg.bin
 create mode 100644 tests/fuzz/test-fuzz.c

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc6e42847086..5c0f760d031c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,15 @@ TARGET_LINK_LIBRARIES(ubus ${ubox_library})
 
 find_library(json NAMES json-c json)
 
+MACRO(ADD_UNIT_TEST_SAN name output_name)
+  ADD_EXECUTABLE(${name}-san ${name}.c)
+  TARGET_COMPILE_OPTIONS(${name}-san PRIVATE -g -fno-omit-frame-pointer -fsanitize=undefined,address,leak -fno-sanitize-recover=all)
+  TARGET_LINK_OPTIONS(${name}-san PRIVATE -fsanitize=undefined,address,leak)
+  TARGET_LINK_LIBRARIES(${name}-san ubus ubusd_library ${ubox_library} ${blob_library} ${json})
+  TARGET_INCLUDE_DIRECTORIES(${name}-san PRIVATE ${PROJECT_SOURCE_DIR})
+  SET_TARGET_PROPERTIES(${name}-san PROPERTIES OUTPUT_NAME ${output_name})
+ENDMACRO(ADD_UNIT_TEST_SAN)
+
 ADD_LIBRARY(ubusd_library STATIC ubusd.c ubusd_proto.c ubusd_id.c ubusd_obj.c ubusd_event.c ubusd_acl.c ubusd_monitor.c)
 ADD_EXECUTABLE(ubusd ubusd_main.c)
 TARGET_LINK_LIBRARIES(ubusd ubusd_library ${ubox_library} ${blob_library} ${json})
@@ -52,6 +61,13 @@ TARGET_LINK_LIBRARIES(cli ubus ${ubox_library} ${blob_library} ${json})
 ADD_SUBDIRECTORY(lua)
 ADD_SUBDIRECTORY(examples)
 
+IF(UNIT_TESTING)
+  ENABLE_TESTING()
+  ADD_SUBDIRECTORY(tests)
+  ADD_UNIT_TEST_SAN(cli ubus-san)
+  ADD_UNIT_TEST_SAN(ubusd_main ubusd-san)
+ENDIF()
+
 INSTALL(TARGETS ubus cli
 	ARCHIVE DESTINATION lib
 	LIBRARY DESTINATION lib
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 000000000000..0cb33427e45a
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,18 @@
+ADD_SUBDIRECTORY(cram)
+
+MACRO(ADD_UNIT_TEST name)
+  ADD_EXECUTABLE(${name} ${name}.c)
+  TARGET_LINK_LIBRARIES(${name} ubox blobmsg_json json_script ${json})
+  TARGET_INCLUDE_DIRECTORIES(${name} PRIVATE ${PROJECT_SOURCE_DIR})
+ENDMACRO(ADD_UNIT_TEST)
+
+FILE(GLOB test_cases "test-*.c")
+FOREACH(test_case ${test_cases})
+  GET_FILENAME_COMPONENT(test_case ${test_case} NAME_WE)
+  ADD_UNIT_TEST(${test_case})
+  ADD_UNIT_TEST_SAN(${test_case})
+ENDFOREACH(test_case)
+
+IF(CMAKE_C_COMPILER_ID STREQUAL "Clang")
+  ADD_SUBDIRECTORY(fuzz)
+ENDIF()
diff --git a/tests/cram/CMakeLists.txt b/tests/cram/CMakeLists.txt
new file mode 100644
index 000000000000..30593aeb7605
--- /dev/null
+++ b/tests/cram/CMakeLists.txt
@@ -0,0 +1,22 @@
+FIND_PACKAGE(PythonInterp 3 REQUIRED)
+FILE(GLOB test_cases "test_*.t")
+
+SET(PYTHON_VENV_DIR "${CMAKE_CURRENT_BINARY_DIR}/.venv")
+SET(PYTHON_VENV_PIP "${PYTHON_VENV_DIR}/bin/pip")
+SET(PYTHON_VENV_CRAM "${PYTHON_VENV_DIR}/bin/cram")
+
+ADD_CUSTOM_COMMAND(
+	OUTPUT ${PYTHON_VENV_CRAM}
+	COMMAND ${PYTHON_EXECUTABLE} -m venv ${PYTHON_VENV_DIR}
+	COMMAND ${PYTHON_VENV_PIP} install cram
+)
+ADD_CUSTOM_TARGET(prepare-cram-venv ALL DEPENDS ${PYTHON_VENV_CRAM})
+
+ADD_TEST(
+	NAME cram
+	COMMAND ${PYTHON_VENV_CRAM} ${test_cases}
+	WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+SET_PROPERTY(TEST cram APPEND PROPERTY ENVIRONMENT "UBUS=$<TARGET_FILE:ubus>")
+SET_PROPERTY(TEST cram APPEND PROPERTY ENVIRONMENT "TEST_BIN_DIR=$<TARGET_FILE_DIR:ubus>")
diff --git a/tests/cram/test_ubus.t b/tests/cram/test_ubus.t
new file mode 100644
index 000000000000..e4ba87fd14a6
--- /dev/null
+++ b/tests/cram/test_ubus.t
@@ -0,0 +1,58 @@
+set environment for convenience:
+
+  $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
+  $ alias ubus='valgrind --quiet --leak-check=full ubus'
+
+check usage:
+
+  $ ubus
+  Usage: ubus [<options>] <command> [arguments...]
+  Options:
+   -s <socket>:\t\tSet the unix domain socket to connect to (esc)
+   -t <timeout>:\t\tSet the timeout (in seconds) for a command to complete (esc)
+   -S:\t\t\tUse simplified output (for scripts) (esc)
+   -v:\t\t\tMore verbose output (esc)
+   -m <type>:\t\t(for monitor): include a specific message type (esc)
+  \t\t\t(can be used more than once) (esc)
+   -M <r|t>\t\t(for monitor): only capture received or transmitted traffic (esc)
+  
+  Commands:
+   - list [<path>]\t\t\tList objects (esc)
+   - call <path> <method> [<message>]\tCall an object method (esc)
+   - listen [<path>...]\t\t\tListen for events (esc)
+   - send <type> [<message>]\t\tSend an event (esc)
+   - wait_for <object> [<object>...]\tWait for multiple objects to appear on ubus (esc)
+   - monitor\t\t\t\tMonitor ubus traffic (esc)
+  
+  [1]
+
+  $ ubus-san
+  Usage: ubus-san [<options>] <command> [arguments...]
+  Options:
+   -s <socket>:\t\tSet the unix domain socket to connect to (esc)
+   -t <timeout>:\t\tSet the timeout (in seconds) for a command to complete (esc)
+   -S:\t\t\tUse simplified output (for scripts) (esc)
+   -v:\t\t\tMore verbose output (esc)
+   -m <type>:\t\t(for monitor): include a specific message type (esc)
+  \t\t\t(can be used more than once) (esc)
+   -M <r|t>\t\t(for monitor): only capture received or transmitted traffic (esc)
+  
+  Commands:
+   - list [<path>]\t\t\tList objects (esc)
+   - call <path> <method> [<message>]\tCall an object method (esc)
+   - listen [<path>...]\t\t\tListen for events (esc)
+   - send <type> [<message>]\t\tSend an event (esc)
+   - wait_for <object> [<object>...]\tWait for multiple objects to appear on ubus (esc)
+   - monitor\t\t\t\tMonitor ubus traffic (esc)
+  
+  [1]
+
+check monitor command:
+
+  $ ubus monitor
+  Failed to connect to ubus
+  [255]
+
+  $ ubus-san monitor
+  Failed to connect to ubus
+  [255]
diff --git a/tests/cram/test_ubusd.t b/tests/cram/test_ubusd.t
new file mode 100644
index 000000000000..1f72e61a8bb8
--- /dev/null
+++ b/tests/cram/test_ubusd.t
@@ -0,0 +1,24 @@
+set environment for convenience:
+
+  $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
+  $ alias ubusd='valgrind --quiet --leak-check=full ubusd'
+
+check usage:
+
+  $ ubusd -h
+  ubusd: invalid option -- 'h'
+  Usage: ubusd [<options>]
+  Options: 
+    -A <path>:\t\tSet the path to ACL files (esc)
+    -s <socket>:\t\tSet the unix domain socket to listen on (esc)
+  
+  [1]
+
+  $ ubusd-san -h
+  ubusd-san: invalid option -- 'h'
+  Usage: ubusd-san [<options>]
+  Options: 
+    -A <path>:\t\tSet the path to ACL files (esc)
+    -s <socket>:\t\tSet the unix domain socket to listen on (esc)
+  
+  [1]
diff --git a/tests/fuzz/CMakeLists.txt b/tests/fuzz/CMakeLists.txt
new file mode 100644
index 000000000000..ecdfd32a1a6e
--- /dev/null
+++ b/tests/fuzz/CMakeLists.txt
@@ -0,0 +1,18 @@
+FILE(GLOB test_cases "test-*.c")
+
+MACRO(ADD_FUZZER_TEST name)
+  ADD_EXECUTABLE(${name} ${name}.c)
+  TARGET_COMPILE_OPTIONS(${name} PRIVATE -g -O1 -fno-omit-frame-pointer -fsanitize=fuzzer,address,leak,undefined)
+  TARGET_INCLUDE_DIRECTORIES(${name} PRIVATE ${PROJECT_SOURCE_DIR})
+  TARGET_LINK_OPTIONS(${name} PRIVATE -stdlib=libc++ -fsanitize=fuzzer,address,leak,undefined)
+  TARGET_LINK_LIBRARIES(${name} ubus ubusd_library ${ubox_library} ${blob_library} ${json})
+  ADD_TEST(
+    NAME ${name}
+    COMMAND ${name} -max_len=256 -timeout=10 -max_total_time=300 ${CMAKE_CURRENT_SOURCE_DIR}/corpus
+  )
+ENDMACRO(ADD_FUZZER_TEST)
+
+FOREACH(test_case ${test_cases})
+  GET_FILENAME_COMPONENT(test_case ${test_case} NAME_WE)
+  ADD_FUZZER_TEST(${test_case})
+ENDFOREACH(test_case)
diff --git a/tests/fuzz/corpus/05fe405753166f125559e7c9ac558654f107c7e9 b/tests/fuzz/corpus/05fe405753166f125559e7c9ac558654f107c7e9
new file mode 100644
index 0000000000000000000000000000000000000000..1b1cb4d44c57c2d7a5122870fa6ac3e62ff7e94e
GIT binary patch
literal 8
KcmZQzfB*mh2mk>9

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/0660e49c13f6d167a8298d885f724bad8f62fc35 b/tests/fuzz/corpus/0660e49c13f6d167a8298d885f724bad8f62fc35
new file mode 100644
index 0000000000000000000000000000000000000000..ec23f710327d388930349f21e39d79aecaf3971a
GIT binary patch
literal 8
Mcmd<$0s#gF00B|}Jpcdz

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/37dadeab8d8ce7611f230f9524c1e8ab751c4a6a b/tests/fuzz/corpus/37dadeab8d8ce7611f230f9524c1e8ab751c4a6a
new file mode 100644
index 0000000000000000000000000000000000000000..9281635f0e9260b19cd1f470c1de0be0397cc2e7
GIT binary patch
literal 8
NcmZQzU=Uyc0ssJ501*HH

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/71520a5c4b5ca73903216857abbad54a8002d44a b/tests/fuzz/corpus/71520a5c4b5ca73903216857abbad54a8002d44a
new file mode 100644
index 0000000000000000000000000000000000000000..b4e009dd6d7e91ff56595a84010db2eb81e41622
GIT binary patch
literal 2
Jcmcb}0004`0MY;e

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/73c72a4d2bd1cd31b0b44256a888feec9eaaba27 b/tests/fuzz/corpus/73c72a4d2bd1cd31b0b44256a888feec9eaaba27
new file mode 100644
index 0000000000000000000000000000000000000000..490a43d8a011333cb0d599b294b465ab33fe25f2
GIT binary patch
literal 9
QcmZQzVBq3n<YHg|005Z)AOHXW

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/8db068f76b98df8730f5308b12c793fdf04c47c2 b/tests/fuzz/corpus/8db068f76b98df8730f5308b12c793fdf04c47c2
new file mode 100644
index 0000000000000000000000000000000000000000..91fa1a0929eebfcff6b81cf8e5310266ff62845a
GIT binary patch
literal 8
NcmZSJ0s;mG1^@u$04V?f

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/c1dfd96eea8cc2b62785275bca38ac261256e278 b/tests/fuzz/corpus/c1dfd96eea8cc2b62785275bca38ac261256e278
new file mode 100644
index 000000000000..62f9457511f8
--- /dev/null
+++ b/tests/fuzz/corpus/c1dfd96eea8cc2b62785275bca38ac261256e278
@@ -0,0 +1 @@
+6
\ No newline at end of file
diff --git a/tests/fuzz/corpus/c42ac1c46f1d4e211c735cc7dfad4ff8391110e9 b/tests/fuzz/corpus/c42ac1c46f1d4e211c735cc7dfad4ff8391110e9
new file mode 100644
index 0000000000000000000000000000000000000000..3d70d85eba81360f757bc71859316667610c5339
GIT binary patch
literal 3
KcmZQ%U<3dF2LJ;A

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-1b8fb1be45db3aff7699100f497fb74138f3df4f b/tests/fuzz/corpus/crash-1b8fb1be45db3aff7699100f497fb74138f3df4f
new file mode 100644
index 0000000000000000000000000000000000000000..407114eb1a9fc2c82f40cac9948c75ac23948385
GIT binary patch
literal 6
Lcmd;L00Kt<0D}Nb

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-4c4d2c3c9ade5da9347534e290305c3b9760f627 b/tests/fuzz/corpus/crash-4c4d2c3c9ade5da9347534e290305c3b9760f627
new file mode 100644
index 0000000000000000000000000000000000000000..2ca392f0c6109a4b0d6cf44ed18d69133addd8ca
GIT binary patch
literal 17
NcmZQ(U|@cV3;<Ep3#b49

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b b/tests/fuzz/corpus/crash-5e9937b197c88bf4e7b7ee2612456cad4cb83f5b
new file mode 100644
index 0000000000000000000000000000000000000000..b49d3e7de86e2402f1d182aad74819a2c0abd8cc
GIT binary patch
literal 86
OcmZQ(U|_yRbpQY#s6>+h

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-75b146c4e6fac64d3e62236b27c64b50657bab2a b/tests/fuzz/corpus/crash-75b146c4e6fac64d3e62236b27c64b50657bab2a
new file mode 100644
index 0000000000000000000000000000000000000000..39ae859cc00ce0c4b80c5a1d0bf031b6a6310ce0
GIT binary patch
literal 4
LcmZQ(U|<3O01^NO

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-813f3e68661da09c26d4a87dbb9d5099e92be50f b/tests/fuzz/corpus/crash-813f3e68661da09c26d4a87dbb9d5099e92be50f
new file mode 100644
index 0000000000000000000000000000000000000000..62338ff4f0801529d0f6598c02bfbb9c57b5533c
GIT binary patch
literal 36
QcmZQ(U|{}_7cese01OQs?*IS*

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-98595faa58ba01d85ba4fd0b109cd3d490b45795 b/tests/fuzz/corpus/crash-98595faa58ba01d85ba4fd0b109cd3d490b45795
new file mode 100644
index 0000000000000000000000000000000000000000..530ae8f6c1f7b9fa3ed86d1bf66b7e0a6d8b7485
GIT binary patch
literal 6
Ncmd<$;^Jap0{{TP051Rl

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1 b/tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
new file mode 100644
index 000000000000..46b749ee7968
--- /dev/null
+++ b/tests/fuzz/corpus/crash-d0f3aa7d60a094b021f635d4edb7807c055a4ea1
@@ -0,0 +1 @@
+?????
diff --git a/tests/fuzz/corpus/crash-df9d1243057b27bbad6211e5a23d1cb699028aa2 b/tests/fuzz/corpus/crash-df9d1243057b27bbad6211e5a23d1cb699028aa2
new file mode 100644
index 0000000000000000000000000000000000000000..f6899b51bcb4283949208b7937e9a4ce3a7ef13c
GIT binary patch
literal 16
RcmZQzVBln8U;rWr4FCY<02=@R

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2 b/tests/fuzz/corpus/crash-e2fd5ecb3b37926743256f1083f47a07c39e10c2
new file mode 100644
index 0000000000000000000000000000000000000000..92a30d23706ee628d4a076fcbe0b7613650c2039
GIT binary patch
literal 66
QcmZQ(U|{}F0bphZ0GOFO(EtDd

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/e2814b29dd2fd5db02b1ab7c5e147e1194a489ce b/tests/fuzz/corpus/e2814b29dd2fd5db02b1ab7c5e147e1194a489ce
new file mode 100644
index 0000000000000000000000000000000000000000..cc81c2c7fcbddacaab466e0b4cb46d0e8e4e1332
GIT binary patch
literal 8
NcmZQz-~s{$1^@uO04V?f

literal 0
HcmV?d00001

diff --git a/tests/fuzz/corpus/valid-blobmsg.bin b/tests/fuzz/corpus/valid-blobmsg.bin
new file mode 100644
index 0000000000000000000000000000000000000000..2d0c68e8a1273ae12ac6d4401c7471927809a926
GIT binary patch
literal 176
zcmZo>V31>A&rK~ZPE1c_U|{e_&B at 8vQ7F$Z%1KcK@*9Cd3 at kaB#U%_3tqcr2Kp`+d
zVlyJKnK~F4BpBFI@=KF)K*ljRBy39qfhLeS93`p6B`Jv|i3|+5)B(*BU|`JvxdNn}
Rv6+E^kAW5J90ntx007e$BMSfk

literal 0
HcmV?d00001

diff --git a/tests/fuzz/test-fuzz.c b/tests/fuzz/test-fuzz.c
new file mode 100644
index 000000000000..9922ff9de609
--- /dev/null
+++ b/tests/fuzz/test-fuzz.c
@@ -0,0 +1,40 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <limits.h>
+
+#include <libubox/blob.h>
+#include <libubox/blobmsg.h>
+
+#include "ubusmsg.h"
+#include "libubus.h"
+#include "libubus-internal.h"
+
+static void _ubus_validate_hdr(const uint8_t *data, size_t size)
+{
+	if (size > sizeof(struct ubus_msghdr))
+		return;
+
+	ubus_validate_hdr((struct ubus_msghdr *) data);
+}
+
+static void _ubus_parse_msg(const uint8_t *data, size_t size)
+{
+	struct blob_attr *attr = (struct blob_attr *) data;
+
+	if (size < sizeof(struct blob_attr *))
+		return;
+
+	if (blob_pad_len(attr) > UBUS_MAX_MSGLEN)
+		return;
+
+	ubus_parse_msg(attr);
+}
+
+int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+	_ubus_validate_hdr(data, size);
+	_ubus_parse_msg(data, size);
+
+	return 0;
+}

-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:19 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:19 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 10/16] lua: workaround false positive
 dereference of null pointer
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-11-ynezz@true.cz>

scan-build from clang-9 has reported following:

 ubus.c:837:16: warning: Access to field 'rnotify' results in a dereference of a null pointer (loaded from variable 'sub')
                 sub->rnotify = luaL_ref(L, -2);

Which is false positive as the lua_error() does a long jump and
therefore never returns and this long jump probably confuses the static
analyzer. So this patch workarounds this false positive by helping
static analyzer by using common Lua idiom which is to return
lua_error()'s return value.

Ref: https://www.lua.org/manual/5.1/manual.html#lua_error
Addresses-Coverity-ID: 1412355 ("Dereference after null check")
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 lua/ubus.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/lua/ubus.c b/lua/ubus.c
index 6fbbc0686af3..fb50418d27b0 100644
--- a/lua/ubus.c
+++ b/lua/ubus.c
@@ -557,8 +557,7 @@ static int ubus_lua_add(lua_State *L)
 	/* verify top level object */
 	if (lua_istable(L, 1)) {
 		lua_pushstring(L, "you need to pass a table");
-		lua_error(L);
-		return 0;
+		return lua_error(L);
 	}
 
 	/* scan each object */
@@ -598,7 +597,7 @@ ubus_lua_notify( lua_State *L )
 
 	if( !lua_islightuserdata( L, 2 ) ){
 		lua_pushfstring( L, "Invald 2nd parameter, expected ubus obj ref" );
-		lua_error( L );
+		return lua_error( L );
 	}
 	obj = lua_touserdata( L, 2 );
 
@@ -606,7 +605,7 @@ ubus_lua_notify( lua_State *L )
 	blob_buf_init(&c->buf, 0);
 	if( !ubus_lua_format_blob_array( L, &c->buf, true ) ){
 		lua_pushfstring( L, "Invalid 4th parameter, expected table of arguments" );
-		lua_error( L );
+		return lua_error( L );
 	}
 
 	ubus_notify( c->ctx, obj, method, c->buf.head, -1 );
@@ -812,7 +811,7 @@ ubus_sub_notify_handler(struct ubus_context *ctx, struct ubus_object *obj,
 
 
 
-static void
+static int
 ubus_lua_do_subscribe( struct ubus_context *ctx, lua_State *L, const char* target,
                         int idxnotify, int idxremove )
 {
@@ -822,13 +821,13 @@ ubus_lua_do_subscribe( struct ubus_context *ctx, lua_State *L, const char* targe
 
 	if( ( status = ubus_lookup_id( ctx, target, &id ) ) ){
 		lua_pushfstring( L, "Unable find target, status=%d", status );
-		lua_error( L );
+		return lua_error( L );
 	}
 
 	sub = calloc( 1, sizeof( struct ubus_lua_subscriber ) );
 	if( !sub ){
 		lua_pushstring( L, "Out of memory" );
-		lua_error( L );
+		return lua_error( L );
 	}
 
 	if( idxnotify ){
@@ -849,13 +848,15 @@ ubus_lua_do_subscribe( struct ubus_context *ctx, lua_State *L, const char* targe
 
 	if( ( status = ubus_register_subscriber( ctx, &sub->s ) ) ){
 		lua_pushfstring( L, "Failed to register subscriber, status=%d", status );
-		lua_error( L );
+		return lua_error( L );
 	}
 
 	if( ( status = ubus_subscribe( ctx, &sub->s, id) ) ){
 		lua_pushfstring( L, "Failed to register subscriber, status=%d", status );
-		lua_error( L );
+		return lua_error( L );
 	}
+
+	return 0;
 }
 
 static int

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:20 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:20 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 11/16] lua: ubus_lua_do_subscribe: fix
 copy&paste error
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-12-ynezz@true.cz>

Fix copy&paste error in Lua ubus subscriber removal callback.

Addresses-Coverity-ID: 1412311 ("Copy-paste error")
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 lua/ubus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lua/ubus.c b/lua/ubus.c
index fb50418d27b0..86dcc5007b3a 100644
--- a/lua/ubus.c
+++ b/lua/ubus.c
@@ -840,8 +840,8 @@ ubus_lua_do_subscribe( struct ubus_context *ctx, lua_State *L, const char* targe
 
 	if( idxremove ){
 		lua_getglobal(L, "__ubus_cb_subscribe");
-		lua_pushvalue(L, idxnotify);
-		sub->rnotify = luaL_ref(L, -2);
+		lua_pushvalue(L, idxremove);
+		sub->rremove = luaL_ref(L, -2);
 		lua_pop(L, 1);
 		sub->s.remove_cb = ubus_sub_remove_handler;
 	}

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:21 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:21 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 12/16] workaround possibly false
 positive uses of memory after it is freed
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-13-ynezz@true.cz>

scan-build from clang-9 has reported following:

 libubox/list.h:83:22: warning: Use of memory after it is freed
        entry->next->prev = entry->prev;
                            ^~~~~~~~~~~

 ubusd_event.c:42:3: warning: Use of memory after it is freed
                ubusd_delete_event_source(ev);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Which might be a false positives, but in order to make the code pass the
static analyzer checks, rewrite the while loops on lists with the safe
list iterator.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 libubus-req.c | 6 ++----
 libubus.c     | 8 +++++---
 ubusd_event.c | 5 ++---
 ubusd_obj.c   | 5 ++---
 ubusd_proto.c | 6 +++---
 5 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/libubus-req.c b/libubus-req.c
index 97785a1e24cd..fd9a548839e4 100644
--- a/libubus-req.c
+++ b/libubus-req.c
@@ -40,11 +40,9 @@ static void req_data_cb(struct ubus_request *req, int type, struct blob_attr *da
 
 static void __ubus_process_req_data(struct ubus_request *req)
 {
-	struct ubus_pending_data *data;
+	struct ubus_pending_data *data, *tmp;
 
-	while (!list_empty(&req->pending)) {
-		data = list_first_entry(&req->pending,
-			struct ubus_pending_data, list);
+	list_for_each_entry_safe(data, tmp, &req->pending, list) {
 		list_del(&data->list);
 		if (!req->cancelled)
 			req_data_cb(req, data->type, data->data);
diff --git a/libubus.c b/libubus.c
index 846ae83bcc12..b405891416c2 100644
--- a/libubus.c
+++ b/libubus.c
@@ -115,10 +115,12 @@ ubus_process_msg(struct ubus_context *ctx, struct ubus_msghdr_buf *buf, int fd)
 static void ubus_process_pending_msg(struct uloop_timeout *timeout)
 {
 	struct ubus_context *ctx = container_of(timeout, struct ubus_context, pending_timer);
-	struct ubus_pending_msg *pending;
+	struct ubus_pending_msg *pending, *tmp;
+
+	list_for_each_entry_safe(pending, tmp, &ctx->pending, list) {
+		if (ctx->stack_depth)
+			break;
 
-	while (!ctx->stack_depth && !list_empty(&ctx->pending)) {
-		pending = list_first_entry(&ctx->pending, struct ubus_pending_msg, list);
 		list_del(&pending->list);
 		ubus_process_msg(ctx, &pending->hdr, -1);
 		free(pending);
diff --git a/ubusd_event.c b/ubusd_event.c
index d36bcb73ddda..ef433f81a71e 100644
--- a/ubusd_event.c
+++ b/ubusd_event.c
@@ -35,10 +35,9 @@ static void ubusd_delete_event_source(struct event_source *evs)
 
 void ubusd_event_cleanup_object(struct ubus_object *obj)
 {
-	struct event_source *ev;
+	struct event_source *ev, *tmp;
 
-	while (!list_empty(&obj->events)) {
-		ev = list_first_entry(&obj->events, struct event_source, list);
+	list_for_each_entry_safe(ev, tmp, &obj->events, list) {
 		ubusd_delete_event_source(ev);
 	}
 }
diff --git a/ubusd_obj.c b/ubusd_obj.c
index 0c9cb9ae8208..dd44882e08d5 100644
--- a/ubusd_obj.c
+++ b/ubusd_obj.c
@@ -20,13 +20,12 @@ struct avl_tree path;
 
 static void ubus_unref_object_type(struct ubus_object_type *type)
 {
-	struct ubus_method *m;
+	struct ubus_method *m, *tmp;
 
 	if (--type->refcount > 0)
 		return;
 
-	while (!list_empty(&type->methods)) {
-		m = list_first_entry(&type->methods, struct ubus_method, list);
+	list_for_each_entry_safe(m, tmp, &type->methods, list) {
 		list_del(&m->list);
 		free(m);
 	}
diff --git a/ubusd_proto.c b/ubusd_proto.c
index 2d04b5a7da6e..4dd89ddb4939 100644
--- a/ubusd_proto.c
+++ b/ubusd_proto.c
@@ -519,12 +519,12 @@ free:
 
 void ubusd_proto_free_client(struct ubus_client *cl)
 {
-	struct ubus_object *obj;
+	struct ubus_object *obj, *tmp;
 
-	while (!list_empty(&cl->objects)) {
-		obj = list_first_entry(&cl->objects, struct ubus_object, list);
+	list_for_each_entry_safe(obj, tmp, &cl->objects, list) {
 		ubusd_free_object(obj);
 	}
+
 	ubus_msg_free(cl->retmsg);
 	blob_buf_free(&cl->b);
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:22 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:22 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 13/16] ubus_common: remove duplicate
 ARRAY_SIZE and add missing include
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-14-ynezz@true.cz>

ARRAY_SIZE is available from libubox/utils.h.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 ubus_common.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/ubus_common.h b/ubus_common.h
index 5e4d0ad94f8f..502e5c484a75 100644
--- a/ubus_common.h
+++ b/ubus_common.h
@@ -14,13 +14,11 @@
 #ifndef __UBUS_COMMON_H
 #define __UBUS_COMMON_H
 
+#include <stdbool.h>
+
 #define UBUS_SIGNATURE_METHOD	(BLOBMSG_TYPE_LAST + 1)
 #define UBUS_SIGNATURE_END		(BLOBMSG_TYPE_LAST + 2)
 
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-#endif
-
 static inline bool ubus_strmatch_len(const char *s1, const char *s2, int *len)
 {
 	for (*len = 0; s1[*len] == s2[*len]; (*len)++)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:23 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:23 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 14/16] ubusd_monitor: fix possible null
 pointer dereference
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-15-ynezz@true.cz>

This dereference could possibly happen if the calloc call fails as the
return value is unchecked. While at it refactor the code little bit to
make it easier to follow, use safe list iterator and provide return
value for ubusd_monitor_connect.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 ubusd_monitor.c | 40 ++++++++++++++++++++++++++++++----------
 1 file changed, 30 insertions(+), 10 deletions(-)

diff --git a/ubusd_monitor.c b/ubusd_monitor.c
index fcbc6a4b10c0..501e06d0716c 100644
--- a/ubusd_monitor.c
+++ b/ubusd_monitor.c
@@ -29,7 +29,7 @@ ubusd_monitor_free(struct ubus_monitor *m)
 	free(m);
 }
 
-static void
+static bool
 ubusd_monitor_connect(struct ubus_client *cl, struct ubus_msg_buf *ub)
 {
 	struct ubus_monitor *m;
@@ -37,22 +37,40 @@ ubusd_monitor_connect(struct ubus_client *cl, struct ubus_msg_buf *ub)
 	ubusd_monitor_disconnect(cl);
 
 	m = calloc(1, sizeof(*m));
+	if (!m)
+		return false;
+
 	m->cl = cl;
 	list_add(&m->list, &monitors);
+
+	return true;
 }
 
-void
-ubusd_monitor_disconnect(struct ubus_client *cl)
+static struct ubus_monitor*
+ubusd_monitor_find(struct ubus_client *cl)
 {
-	struct ubus_monitor *m;
+	struct ubus_monitor *m, *tmp;
 
-	list_for_each_entry(m, &monitors, list) {
+	list_for_each_entry_safe(m, tmp, &monitors, list) {
 		if (m->cl != cl)
 			continue;
 
-		ubusd_monitor_free(m);
-		return;
+		return m;
 	}
+
+	return NULL;
+}
+
+void
+ubusd_monitor_disconnect(struct ubus_client *cl)
+{
+	struct ubus_monitor *m;
+
+	m = ubusd_monitor_find(cl);
+	if (!m)
+		return;
+
+	ubusd_monitor_free(m);
 }
 
 void
@@ -92,13 +110,15 @@ ubusd_monitor_recv(struct ubus_client *cl, struct ubus_msg_buf *ub,
 		return UBUS_STATUS_PERMISSION_DENIED;
 
 	if (!strcmp(method, "add")) {
-		ubusd_monitor_connect(cl, ub);
-		return 0;
+		if (!ubusd_monitor_connect(cl, ub))
+			return UBUS_STATUS_UNKNOWN_ERROR;
+
+		return UBUS_STATUS_OK;
 	}
 
 	if (!strcmp(method, "remove")) {
 		ubusd_monitor_disconnect(cl);
-		return 0;
+		return UBUS_STATUS_OK;
 	}
 
 	return UBUS_STATUS_METHOD_NOT_FOUND;

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:24 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:24 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 15/16] ubus_monitor: workaround
 possibly false positive uses of memory after it is freed
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-16-ynezz@true.cz>

scan-build from clang-9 has reported following:

 libubox/list.h:141:2: warning: Use of memory after it is freed
        _list_add(_new, head, head->next);

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 ubusd_monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ubusd_monitor.c b/ubusd_monitor.c
index 501e06d0716c..bba741e86987 100644
--- a/ubusd_monitor.c
+++ b/ubusd_monitor.c
@@ -41,7 +41,7 @@ ubusd_monitor_connect(struct ubus_client *cl, struct ubus_msg_buf *ub)
 		return false;
 
 	m->cl = cl;
-	list_add(&m->list, &monitors);
+	list_add_tail(&m->list, &monitors);
 
 	return true;
 }

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 19 17:11:25 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Thu, 19 Dec 2019 23:11:25 +0100
Subject: [OpenWrt-Devel] [PATCH ubus 16/16] fix blob parsing vulnerability
 by using blob_parse_untrusted
In-Reply-To: <20191219221125.22646-1-ynezz@true.cz>
References: <20191219221125.22646-1-ynezz@true.cz>
Message-ID: <20191219221125.22646-17-ynezz@true.cz>

blob_parse expects blobs from trusted inputs, but it can be supplied
with possibly malicious blobs from untrusted inputs as well, which might
lead to undefined behaviour and/or crash of ubus daemon. In order to
prevent such conditions, switch to blob_parse_untrusted which should
hopefully handle such untrusted inputs appropriately.

Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 cli.c                  | 2 +-
 libubus-internal.h     | 2 +-
 libubus-io.c           | 4 ++--
 libubus-obj.c          | 6 +++---
 libubus-req.c          | 6 +++---
 libubus.c              | 4 ++--
 tests/fuzz/test-fuzz.c | 2 +-
 ubusd.h                | 2 +-
 ubusd_acl.c            | 2 +-
 ubusd_proto.c          | 6 +++---
 10 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/cli.c b/cli.c
index 421f244ad9dc..f566279b4f6d 100644
--- a/cli.c
+++ b/cli.c
@@ -472,7 +472,7 @@ ubus_cli_monitor_cb(struct ubus_context *ctx, uint32_t seq, struct blob_attr *ms
 	bool send;
 	char *data;
 
-	blob_parse(msg, tb, policy, UBUS_MONITOR_MAX);
+	blob_parse_untrusted(msg, blob_raw_len(msg), tb, policy, UBUS_MONITOR_MAX);
 
 	if (!tb[UBUS_MONITOR_CLIENT] ||
 	    !tb[UBUS_MONITOR_PEER] ||
diff --git a/libubus-internal.h b/libubus-internal.h
index 8cf99b3bc6b1..24477a032144 100644
--- a/libubus-internal.h
+++ b/libubus-internal.h
@@ -17,7 +17,7 @@
 extern struct blob_buf b;
 extern const struct ubus_method watch_method;
 
-struct blob_attr **ubus_parse_msg(struct blob_attr *msg);
+struct blob_attr **ubus_parse_msg(struct blob_attr *msg, size_t len);
 bool ubus_validate_hdr(struct ubus_msghdr *hdr);
 void ubus_handle_data(struct uloop_fd *u, unsigned int events);
 int ubus_send_msg(struct ubus_context *ctx, uint32_t seq,
diff --git a/libubus-io.c b/libubus-io.c
index 81c1cd1309b1..ba1016d0fa09 100644
--- a/libubus-io.c
+++ b/libubus-io.c
@@ -43,9 +43,9 @@ static const struct blob_attr_info ubus_policy[UBUS_ATTR_MAX] = {
 
 static struct blob_attr *attrbuf[UBUS_ATTR_MAX];
 
-__hidden struct blob_attr **ubus_parse_msg(struct blob_attr *msg)
+__hidden struct blob_attr **ubus_parse_msg(struct blob_attr *msg, size_t len)
 {
-	blob_parse(msg, attrbuf, ubus_policy, UBUS_ATTR_MAX);
+	blob_parse_untrusted(msg, len, attrbuf, ubus_policy, UBUS_ATTR_MAX);
 	return attrbuf;
 }
 
diff --git a/libubus-obj.c b/libubus-obj.c
index 2580b2442c4b..29cbb2b98e6e 100644
--- a/libubus-obj.c
+++ b/libubus-obj.c
@@ -121,7 +121,7 @@ void __hidden ubus_process_obj_msg(struct ubus_context *ctx, struct ubus_msghdr_
 	struct ubus_object *obj;
 	uint32_t objid;
 	void *prev_data = NULL;
-	attrbuf = ubus_parse_msg(buf->data);
+	attrbuf = ubus_parse_msg(buf->data, blob_raw_len(buf->data));
 	if (!attrbuf[UBUS_ATTR_OBJID])
 		return;
 
@@ -160,7 +160,7 @@ void __hidden ubus_process_obj_msg(struct ubus_context *ctx, struct ubus_msghdr_
 static void ubus_add_object_cb(struct ubus_request *req, int type, struct blob_attr *msg)
 {
 	struct ubus_object *obj = req->priv;
-	struct blob_attr **attrbuf = ubus_parse_msg(msg);
+	struct blob_attr **attrbuf = ubus_parse_msg(msg, blob_raw_len(msg));
 
 	if (!attrbuf[UBUS_ATTR_OBJID])
 		return;
@@ -240,7 +240,7 @@ int ubus_add_object(struct ubus_context *ctx, struct ubus_object *obj)
 static void ubus_remove_object_cb(struct ubus_request *req, int type, struct blob_attr *msg)
 {
 	struct ubus_object *obj = req->priv;
-	struct blob_attr **attrbuf = ubus_parse_msg(msg);
+	struct blob_attr **attrbuf = ubus_parse_msg(msg, blob_raw_len(msg));
 
 	if (!attrbuf[UBUS_ATTR_OBJID])
 		return;
diff --git a/libubus-req.c b/libubus-req.c
index fd9a548839e4..ae9d1925ecdf 100644
--- a/libubus-req.c
+++ b/libubus-req.c
@@ -31,7 +31,7 @@ static void req_data_cb(struct ubus_request *req, int type, struct blob_attr *da
 	if (!req->data_cb)
 		return;
 
-	attr = ubus_parse_msg(data);
+	attr = ubus_parse_msg(data, blob_raw_len(data));
 	if (!attr[UBUS_ATTR_DATA])
 		return;
 
@@ -328,7 +328,7 @@ int ubus_notify(struct ubus_context *ctx, struct ubus_object *obj,
 
 static bool ubus_get_status(struct ubus_msghdr_buf *buf, int *ret)
 {
-	struct blob_attr **attrbuf = ubus_parse_msg(buf->data);
+	struct blob_attr **attrbuf = ubus_parse_msg(buf->data, blob_raw_len(buf->data));
 
 	if (!attrbuf[UBUS_ATTR_STATUS])
 		return false;
@@ -435,7 +435,7 @@ static void ubus_process_notify_status(struct ubus_request *req, int id, struct
 
 	if (!id) {
 		/* first id: ubusd's status message with a list of ids */
-		tb = ubus_parse_msg(buf->data);
+		tb = ubus_parse_msg(buf->data, blob_raw_len(buf->data));
 		if (tb[UBUS_ATTR_SUBSCRIBERS]) {
 			blob_for_each_attr(cur, tb[UBUS_ATTR_SUBSCRIBERS], rem) {
 				if (!blob_check_type(blob_data(cur), blob_len(cur), BLOB_ATTR_INT32))
diff --git a/libubus.c b/libubus.c
index b405891416c2..91f317c59867 100644
--- a/libubus.c
+++ b/libubus.c
@@ -139,7 +139,7 @@ static void ubus_lookup_cb(struct ubus_request *ureq, int type, struct blob_attr
 	struct blob_attr **attr;
 
 	req = container_of(ureq, struct ubus_lookup_request, req);
-	attr = ubus_parse_msg(msg);
+	attr = ubus_parse_msg(msg, blob_raw_len(msg));
 
 	if (!attr[UBUS_ATTR_OBJID] || !attr[UBUS_ATTR_OBJPATH] ||
 	    !attr[UBUS_ATTR_OBJTYPE])
@@ -175,7 +175,7 @@ static void ubus_lookup_id_cb(struct ubus_request *req, int type, struct blob_at
 	struct blob_attr **attr;
 	uint32_t *id = req->priv;
 
-	attr = ubus_parse_msg(msg);
+	attr = ubus_parse_msg(msg, blob_raw_len(msg));
 
 	if (!attr[UBUS_ATTR_OBJID])
 		return;
diff --git a/tests/fuzz/test-fuzz.c b/tests/fuzz/test-fuzz.c
index 9922ff9de609..7a7a1ebe8b11 100644
--- a/tests/fuzz/test-fuzz.c
+++ b/tests/fuzz/test-fuzz.c
@@ -28,7 +28,7 @@ static void _ubus_parse_msg(const uint8_t *data, size_t size)
 	if (blob_pad_len(attr) > UBUS_MAX_MSGLEN)
 		return;
 
-	ubus_parse_msg(attr);
+	ubus_parse_msg(attr, size);
 }
 
 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
diff --git a/ubusd.h b/ubusd.h
index 867cde9a384b..923e43dd92da 100644
--- a/ubusd.h
+++ b/ubusd.h
@@ -72,7 +72,7 @@ struct ubus_msg_buf *ubus_msg_new(void *data, int len, bool shared);
 void ubus_msg_send(struct ubus_client *cl, struct ubus_msg_buf *ub);
 ssize_t ubus_msg_writev(int fd, struct ubus_msg_buf *ub, size_t offset);
 void ubus_msg_free(struct ubus_msg_buf *ub);
-struct blob_attr **ubus_parse_msg(struct blob_attr *msg);
+struct blob_attr **ubus_parse_msg(struct blob_attr *msg, size_t len);
 
 struct ubus_client *ubusd_proto_new_client(int fd, uloop_fd_handler cb);
 void ubusd_proto_receive_message(struct ubus_client *cl, struct ubus_msg_buf *ub);
diff --git a/ubusd_acl.c b/ubusd_acl.c
index f19df9a875c7..e426a4af95ef 100644
--- a/ubusd_acl.c
+++ b/ubusd_acl.c
@@ -549,7 +549,7 @@ static int ubusd_reply_query(struct ubus_client *cl, struct ubus_msg_buf *ub, st
 static int ubusd_acl_recv(struct ubus_client *cl, struct ubus_msg_buf *ub, const char *method, struct blob_attr *msg)
 {
 	if (!strcmp(method, "query"))
-		return ubusd_reply_query(cl, ub, ubus_parse_msg(ub->data), msg);
+		return ubusd_reply_query(cl, ub, ubus_parse_msg(ub->data, blob_raw_len(ub->data)), msg);
 
 	return UBUS_STATUS_INVALID_COMMAND;
 }
diff --git a/ubusd_proto.c b/ubusd_proto.c
index 4dd89ddb4939..4746605f4960 100644
--- a/ubusd_proto.c
+++ b/ubusd_proto.c
@@ -34,9 +34,9 @@ static const struct blob_attr_info ubus_policy[UBUS_ATTR_MAX] = {
 	[UBUS_ATTR_GROUP] = { .type = BLOB_ATTR_STRING },
 };
 
-struct blob_attr **ubus_parse_msg(struct blob_attr *msg)
+struct blob_attr **ubus_parse_msg(struct blob_attr *msg, size_t len)
 {
-	blob_parse(msg, attrbuf, ubus_policy, UBUS_ATTR_MAX);
+	blob_parse_untrusted(msg, len, attrbuf, ubus_policy, UBUS_ATTR_MAX);
 	return attrbuf;
 }
 
@@ -454,7 +454,7 @@ void ubusd_proto_receive_message(struct ubus_client *cl, struct ubus_msg_buf *ub
 	/* Note: no callback should free the `ub` buffer
 	         that's always done right after the callback finishes */
 	if (cb)
-		ret = cb(cl, ub, ubus_parse_msg(ub->data));
+		ret = cb(cl, ub, ubus_parse_msg(ub->data, blob_raw_len(ub->data)));
 	else
 		ret = UBUS_STATUS_INVALID_COMMAND;
 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From devel-sven at geroedel.de  Thu Dec 19 18:16:19 2019
From: devel-sven at geroedel.de (Sven Roederer)
Date: Fri, 20 Dec 2019 00:16:19 +0100
Subject: [OpenWrt-Devel] [PATCH 19.07] ath79: add support for gl-ar750
In-Reply-To: <20191213231028.GY11070@home.paul.comp>
References: <20191213195046.13358-1-devel-sven@geroedel.de>
 <2070834.sci2Q4oWNF@strike> <20191213231028.GY11070@home.paul.comp>
Message-ID: <5885774.H1UGKFp7n6@strike>

Paul,

Am Samstag, 14. Dezember 2019, 00:10:28 CET schrieb Paul Fertser:
> Also, if you're going to improve the patch, I've noticed you have no
> DTS designations for how the LEDs are to be used (aliases for led-boot
> etc) and no label_mac assignment. Not sure if that's important.

As the router is in a hidden location, I never checked the Leds ... Probably I 
should.
But at least the board is running stable for me.

Sven



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Fri Dec 20 02:05:12 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Fri, 20 Dec 2019 10:05:12 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?wvLu8OD/IOzo8O7i4P8g4u7p7eAuIMTl7fwg?=
	=?cp1251?b?5+Ag5O247CCXIOTu6vPs5e3y4Ov87fvpIPbo6ussIO3g6OHu6+Xl?=
	=?cp1251?b?IO/u6+3g/yDq6O3u6PHy7vDo/y4gMDVfMDhfMjAxOSAwMl8xMCAx?=
	=?cp1251?q?99508?=
Message-ID: <mailman.19777.1576825680.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ?????? ??????? ?????. ???? ?? ???? ? ?????????????? ????, ???????? ?????? ???????????. 05_08_2019 02_10 199508
Date: Fri, 20 Dec 2019 10:05:12 +0300
Size: 59692
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191220/dd4896cb/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From thomas.petazzoni at bootlin.com  Fri Dec 20 09:04:32 2019
From: thomas.petazzoni at bootlin.com (Thomas Petazzoni)
Date: Fri, 20 Dec 2019 15:04:32 +0100
Subject: [OpenWrt-Devel] [PATCH v2 00/12] dm-verity support
In-Reply-To: <20191121162322.671035-1-thomas.petazzoni@bootlin.com>
References: <20191121162322.671035-1-thomas.petazzoni@bootlin.com>
Message-ID: <20191220150432.22e33185@windsurf>

Hello,

On Thu, 21 Nov 2019 17:23:10 +0100
Thomas Petazzoni <thomas.petazzoni at bootlin.com> wrote:

> This is the second iteration of my patch series adding support for
> dm-verity in OpenWRT. See below for some introduction about the
> purpose of this series.

Unless I missed it, I don't think I have received any feedback on the
v2 of this patch series. Is there any chance of getting it merged, or
at least parts of it ?

Thanks!

Thomas Petazzoni
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Fri Dec 20 17:08:48 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Fri, 20 Dec 2019 23:08:48 +0100
Subject: [OpenWrt-Devel] [PATCH 0/3] ath79: add support for QCA9563-based
 Netgear WNDR routers
In-Reply-To: <20191112140214.59f2971f@kosmio.komorska>
References: <20191112140214.59f2971f@kosmio.komorska>
Message-ID: <20191220230848.3bcd6e3a@kosmio.komorska>

This patchset introduces support for two Netgear dual-band routers
based on the same PCB (29764821) with QCA9563 SoC, AR9580 5GHz chip,
128 MiB RAM, 2 MiB SPI-NOR + 128 MiB SPI-NAND flash:
* Netgear WNDR4300 v2
* Netgear WNDR4500 v3

WNDR4300v2 has been tested successfully with this patchset applied
to master branch. Since I have no access to 4500v3, configuration
for this device is based on information provided by various websites,
including abandoned ar71xx patch https://patchwork.ozlabs.org/patch/809227/

Note: technical wikis claim device is running CPU @ 750 MHz, while on my
WNDR4300v2 both u-boot and OpenWrt report CPU clock value of 775 MHz.

MAC address printed on device label is for LAN interface (ART offset 0x0).

Patch #1 is a prerequisite and allows to unmask certain pins for
ath9k-compatible wireless chips using Device Tree definition. Parameter
is labelled "qca,gpio-mask" and accepts u32 value (see *_GPIO_MASK
constants in ath9k/reg.h file). One of main reasons for blocking access
to these pins is that they provide only one-way communication (in or out).
Here - setting new mask to 0xf6ff (default one is 0xf4ff) enables RFKILL
button wired to input pin 9.

Patch list (3):
  mac80211: ath9k: add GPIO mask dts property
  ath79: add support for Netgear WNDR4300 v2
  ath79: add support for Netgear WNDR4500 v3

 package/boot/uboot-envtools/files/ath79       |   2 +
 .../patches/ath/553-ath9k_of_gpio_mask.patch  |  25 ++
 .../linux/ath79/dts/qca9563_netgear_wndr.dtsi | 262 ++++++++++++++++++
 .../ath79/dts/qca9563_netgear_wndr4300-v2.dts |  19 ++
 .../ath79/dts/qca9563_netgear_wndr4500-v3.dts |  41 +++
 target/linux/ath79/image/nand.mk              |  22 ++
 .../ath79/nand/base-files/etc/board.d/01_leds |   4 +-
 .../nand/base-files/etc/board.d/02_network    |   8 +-
 .../etc/hotplug.d/firmware/10-ath9k-eeprom    |   8 +-
 9 files changed, 386 insertions(+), 5 deletions(-)
 create mode 100644 package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts

-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Fri Dec 20 17:09:48 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Fri, 20 Dec 2019 23:09:48 +0100
Subject: [OpenWrt-Devel] [PATCH 1/3] mac80211: ath9k: add GPIO mask dts
 property
In-Reply-To: <20191220230848.3bcd6e3a@kosmio.komorska>
References: <20191112140214.59f2971f@kosmio.komorska>
 <20191220230848.3bcd6e3a@kosmio.komorska>
Message-ID: <20191220230948.7702c39d@kosmio.komorska>

This patch adds 'qca,gpio-mask=<u32>' device tree property to ath9k node.
This optional setting is a hack and should only be used in very special
(and rare) cases when a button or LED is wired to a GPIO pin normally
masked out (due to being one-way etc). Netgear WNDR4300 v2 is one such
example - it uses GPI9 for RFKILL.

See ath9k/reg.h *_GPIO_MASK constants.

Use with caution and expect to see stream of kernel warnings if wrong
mask value is provided.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
---
 .../patches/ath/553-ath9k_of_gpio_mask.patch  | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch

diff --git a/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch b/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch
new file mode 100644
index 0000000000..72b99050c4
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch
@@ -0,0 +1,25 @@
+--- a/drivers/net/wireless/ath/ath9k/init.c
++++ b/drivers/net/wireless/ath/ath9k/init.c
+@@ -654,6 +654,12 @@ static int ath9k_of_init(struct ath_soft
+ 	return 0;
+ }
+ 
++static void ath9k_of_gpio_mask(struct ath_softc *sc)
++{
++	of_property_read_u32(sc->dev->of_node, "qca,gpio-mask",
++			     &sc->sc_ah->caps.gpio_mask);
++}
++
+ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
+ 			    const struct ath_bus_ops *bus_ops)
+ {
+@@ -758,6 +764,9 @@ static int ath9k_init_softc(u16 devid, s
+ 	if (ret)
+ 		goto err_hw;
+ 
++	/* GPIO mask quirk */
++	ath9k_of_gpio_mask(sc);
++
+ 	ret = ath9k_init_queues(sc);
+ 	if (ret)
+ 		goto err_queues;
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Fri Dec 20 17:33:20 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Fri, 20 Dec 2019 23:33:20 +0100
Subject: [OpenWrt-Devel] [PATCH 2/3] ath79: add support for Netgear WNDR4300
 v2
In-Reply-To: <20191220230848.3bcd6e3a@kosmio.komorska>
References: <20191112140214.59f2971f@kosmio.komorska>
 <20191220230848.3bcd6e3a@kosmio.komorska>
Message-ID: <20191220233320.4b061d27@kosmio.komorska>

This patch introduces support for Netgear WNDR4300v2.

Specification
=============
  * Description: Netgear WNDR4300 v2
  * Loader: U-boot
  * SOC: Qualcomm Atheros QCA9563 (775 MHz)
  * RAM: 128 MiB
  * Flash: 2 MiB SPI-NOR + 128 MiB SPI-NAND
	- NOR: U-boot binary: 256 KiB
	- NOR: U-boot environment: 64 KiB
	- NOR: ART Backup: 64 KiB
 	- NOR: Config: 64 KiB
	- NOR: Traffic Meter: 64 KiB
	- NOR: POT: 64 KiB
	- NOR: Reserved: 1408 KiB
	- NOR: ART: 64 KiB
	- NAND: Firmware: 25600 KiB (see notes for OpenWrt)
	- NAND: Language: 2048 KiB
	- NAND: mtdoops Crash Dump: 128 KiB
	- NAND: Reserved: 103296 KiB
  * Ethernet: 5 x 10/100/1000 (4 x LAN, 1 x WAN) (AR8337)
  * Wireless:
	- 2.4 GHz b/g/n (internal)
	- 5 GHz a/n (AR9580)
  * USB: yes, 1 x USB 2.0
  * Buttons:
	- Reset
	- WiFi (rfkill)
	- WPS
  * LEDs:
	- Power (amber/green)
	- WAN (amber/green)
	- WLAN 2G (green)
	- WLAN 5G (blue)
	- 4 x LAN (amber/green)
	- USB (green)
	- WPS (green)
  * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1
  * Power supply: DC 12V 1.5A
  * MAC addresses: LAN=WLAN2G on case label, WAN +1, WLAN5G +2

Important Notes
===============
0. NOR Flash (2 MiB) is not touched by OpenWrt installation.
1. NAND Flash (128 MiB) layout under OpenWrt is changed as follows:
   all space is assigned to 'firmware' partition which is divided into
   2 MiB kernel and 126 MiB UBI areas; vendor partitions (language and
   mtdoops) are removed; kernel space size can be increased if needed;
   maximum image size is set to 25600k for compatibility and can also
   be increased.
2. CPU clock is 775 MHz, not 750 MHz.
3. 5 GHz wireless radio chip is Atheros AR9580-AR1A with bogus PCI
   device ID 0xabcd. For ath9k driver to load successfully, this is
   overriden in DTS with correct value for this chip, 0x0033.
4. RFKILL button is wired to AR9580 pin 9 which is normally disabled
   by chip definition in ath9k code (0x0000F4FF gpio mask). Therefore
   'qca,gpio-mask=<0xf6ff>' hack must be used for button to work
   properly.
5. USB port is always on, no GPIO for 5V power control has been
   identified.

Installation
============
  * TFTP recovery
  * TFTP via U-boot prompt
  * sysupgrade
  * Web interface

Test build configuration
========================
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_nand=y
CONFIG_TARGET_ath79_nand_DEVICE_netgear_wndr4300-v2=y
CONFIG_ALL_KMODS=y
CONFIG_DEVEL=y
CONFIG_CCACHE=y
CONFIG_COLLECT_KERNEL_DEBUG=y
CONFIG_IMAGEOPT=y

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
---
 package/boot/uboot-envtools/files/ath79       |   1 +
 .../linux/ath79/dts/qca9563_netgear_wndr.dtsi | 262 ++++++++++++++++++
 .../ath79/dts/qca9563_netgear_wndr4300-v2.dts |  19 ++
 target/linux/ath79/image/nand.mk              |  11 +
 .../ath79/nand/base-files/etc/board.d/01_leds |   3 +-
 .../nand/base-files/etc/board.d/02_network    |   6 +-
 .../etc/hotplug.d/firmware/10-ath9k-eeprom    |   6 +-
 7 files changed, 303 insertions(+), 5 deletions(-)
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index f956cf4ed4..85a0342a60 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -26,6 +26,7 @@ glinet,gl-ar750s-nor-nand|\
 librerouter,librerouter-v1|\
 netgear,ex6400|\
 netgear,ex7300|\
+netgear,wndr4300-v2|\
 netgear,wnr1000-v2|\
 netgear,wnr2000-v3|\
 netgear,wnr2200-8m|\
diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
new file mode 100644
index 0000000000..b9f76b1fe9
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
@@ -0,0 +1,262 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "qca956x.dtsi"
+
+/ {
+	chosen {
+		bootargs = "console=ttyS0,115200n8";
+	};
+
+	aliases {
+		led-boot = &led_power_amber;
+		led-failsafe = &led_power_amber;
+		led-running = &led_power_green;
+		led-upgrade = &led_power_amber;
+		label-mac-device = &eth0;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	ath9k-keys {
+		compatible = "gpio-keys-polled";
+		poll-interval = <20>;
+
+		rfkill {
+			label = "rfkill";
+			linux,code = <KEY_RFKILL>;
+			gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds: leds {
+		compatible = "gpio-leds";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&jtag_disable_pins>;
+
+		led_power_green: power_green {
+			label = "netgear:green:power";
+			gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+		};
+
+		led_power_amber: power_amber {
+			label = "netgear:amber:power";
+			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+			default-state = "keep";
+		};
+
+		wan_green {
+			label = "netgear:green:wan";
+			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+		};
+
+		wan_amber {
+			label = "netgear:amber:wan";
+			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+		};
+
+		wlan2g_green {
+			label = "netgear:green:wlan2g";
+			gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		wps_green {
+			label = "netgear:green:wps";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	ath9k-leds {
+		compatible = "gpio-leds";
+
+		wlan5g_blue {
+			label = "netgear:blue:wlan5g";
+			gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
+		};
+	};
+};
+
+&spi {
+	status = "okay";
+
+	num-cs = <2>;
+	cs-gpios = <0>, <0>;
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x40000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "u-boot-env";
+				reg = <0x40000 0x10000>;
+			};
+
+			partition at 50000 {
+				label = "caldata_backup";
+				reg = <0x50000 0x10000>;
+				read-only;
+			};
+
+			partition at 60000 {
+				label = "config";
+				reg = <0x60000 0x10000>;
+			};
+
+			partition at 70000 {
+				label = "traffic_meter";
+				reg = <0x70000 0x10000>;
+			};
+
+			partition at 80000 {
+				label = "pot";
+				reg = <0x80000 0x10000>;
+			};
+
+			partition at 90000 {
+				label = "reserved";
+				reg = <0x90000 0x160000>;
+			};
+
+			art: partition at 1f0000 {
+				label = "caldata";
+				reg = <0x1f0000 0x10000>;
+				read-only;
+			};
+		};
+	};
+
+	flash at 1 {
+		compatible = "spi-nand";
+		reg = <1>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "firmware";
+				reg = <0x0 0x8000000>;
+				compatible = "netgear,uimage";
+			};
+
+			kernel at 0 {
+				label = "kernel";
+				reg = <0x0 0x200000>;
+			};
+
+			ubi at 200000 {
+				label = "ubi";
+				reg = <0x200000 0x7e00000>;
+			};
+		};
+	};
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy-mask = <0>;
+
+	phy0: ethernet-phy at 0 {
+		reg = <0>;
+		phy-mode = "sgmii";
+		qca,mib-poll-interval = <500>;
+
+		qca,ar8327-initvals = <
+			0x04 0x00000080	/* PORT0 PAD MODE CTRL */
+			0x10 0x81000080	/* POWER_ON_STRIP */
+			0x50 0xcc35cc35	/* LED_CTRL0 */
+			0x54 0xcb37cb37	/* LED_CTRL1 */
+			0x58 0x00000000	/* LED_CTRL2 */
+			0x5c 0x00f3cf00	/* LED_CTRL3 */
+			0x7c 0x0000007e	/* PORT0_STATUS */
+			0x94 0x00000200 /* PORT6_STATUS */
+			>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	pll-data = <0x03000101 0x00000101 0x00001919>;
+
+	mtd-mac-address = <&art 0x0>;
+
+	phy-mode = "sgmii";
+	phy-handle = <&phy0>;
+};
+
+&wmac {
+	status = "okay";
+
+	mtd-mac-address = <&art 0x0>;
+	qca,no-eeprom;
+};
+
+&pcie {
+	status = "okay";
+
+	ath9k: wifi at 0,0 {
+		/* chip is AR9580, override bogus PCI ID 168c:abcd */
+		compatible = "pci168c,0033";
+		reg = <0x0000 0 0 0 0>;
+		mtd-mac-address = <&art 0xc>;
+		qca,no-eeprom;
+		qca,gpio-mask=<0xf6ff>;	/* unmask pin 9 for RFKILL button */
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+};
+
+&usb_phy0 {
+	status = "okay";
+};
+
+&usb0 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	hub_port0: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+};
+
+&uart {
+	status = "okay";
+};
diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts b/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts
new file mode 100644
index 0000000000..e4b4ba2ac6
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include "qca9563_netgear_wndr.dtsi"
+
+/ {
+	compatible = "netgear,wndr4300-v2", "qca,qca9563";
+	model = "Netgear WNDR4300 v2";
+};
+
+&leds {
+	usb_green {
+		label = "netgear:green:usb";
+		gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+		trigger-sources = <&hub_port0>;
+		linux,default-trigger = "usbport";
+	};
+};
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index c6a1441ed9..a81127a962 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -151,6 +151,17 @@ define Device/netgear_wndr4300
 endef
 TARGET_DEVICES += netgear_wndr4300
 
+define Device/netgear_wndr4300-v2
+  SOC := qca9563
+  DEVICE_MODEL := WNDR4300
+  DEVICE_VARIANT := v2
+  NETGEAR_KERNEL_MAGIC := 0x27051956
+  NETGEAR_BOARD_ID := WNDR4500series
+  NETGEAR_HW_ID := 29764821+2+128+128+3x3+3x3+5508012175
+  $(Device/netgear_ath79_nand)
+endef
+TARGET_DEVICES += netgear_wndr4300-v2
+
 define Device/zyxel_nbg6716
   SOC := qca9558
   DEVICE_VENDOR := ZyXEL
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
index 49d4005495..0376b7cfc6 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
@@ -13,7 +13,8 @@ glinet,gl-ar300m-nor)
 	ucidef_set_led_netdev "lan" "LAN" "gl-ar300m:green:lan" "eth0"
 	;;
 netgear,wndr3700-v4|\
-netgear,wndr4300)
+netgear,wndr4300|\
+netgear,wndr4300-v2)
 	ucidef_set_led_switch "wan-amber" "WAN (amber)" "netgear:amber:wan" "switch0" "0x20"
 	;;
 esac
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index f7e43addc1..135a06d44b 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -17,7 +17,8 @@ ath79_setup_interfaces()
 			"0 at eth0" "2:lan:2" "3:lan:1" "1:wan"
 		;;
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
 		;;
@@ -37,7 +38,8 @@ ath79_setup_macs()
 
 	case "$board" in
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		wan_mac=$(mtd_get_mac_binary caldata 0x6)
 		;;
 	zyxel,nbg6716)
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 25bafe67ac..7ee291d109 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -10,7 +10,8 @@ case "$FIRMWARE" in
 "ath9k-eeprom-ahb-18100000.wmac.bin")
 	case $board in
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		caldata_extract "caldata" 0x1000 0x440
 		;;
 	zyxel,nbg6716)
@@ -25,7 +26,8 @@ case "$FIRMWARE" in
 "ath9k-eeprom-pci-0000:00:00.0.bin")
 	case $board in
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		caldata_extract "caldata" 0x5000 0x440
 		;;
 	*)
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Fri Dec 20 17:35:00 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Fri, 20 Dec 2019 23:35:00 +0100
Subject: [OpenWrt-Devel] [PATCH 3/3] ath79: add support for Netgear WNDR4500
 v3
In-Reply-To: <20191220230848.3bcd6e3a@kosmio.komorska>
References: <20191112140214.59f2971f@kosmio.komorska>
 <20191220230848.3bcd6e3a@kosmio.komorska>
Message-ID: <20191220233419.3261569f@kosmio.komorska>

This patch introduces support for Netgear WNDR4500v3. Router
is very similar to WNDR4300v2 and is based on the same PCB.

Information gathered from various Internet sources (including
https://patchwork.ozlabs.org/patch/809227/) shows following
differences to WNDR4300v2:

 * two USB 2.0 ports with separate LEDs
 * WPS and RFKILL buttons soldered to secondary pads
 * described as N900 device with 3x3:3 MIMO for 2.4GHz radio
 * power supply requirement is DC 12V 2.5A
 * HW ID suffix differs in one digit
 * bigger case

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
---
 package/boot/uboot-envtools/files/ath79       |  1 +
 .../ath79/dts/qca9563_netgear_wndr4500-v3.dts | 41 +++++++++++++++++++
 target/linux/ath79/image/nand.mk              | 11 +++++
 .../ath79/nand/base-files/etc/board.d/01_leds |  3 +-
 .../nand/base-files/etc/board.d/02_network    |  6 ++-
 .../etc/hotplug.d/firmware/10-ath9k-eeprom    |  6 ++-
 6 files changed, 63 insertions(+), 5 deletions(-)
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index 85a0342a60..aafced98db 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -27,6 +27,7 @@ librerouter,librerouter-v1|\
 netgear,ex6400|\
 netgear,ex7300|\
 netgear,wndr4300-v2|\
+netgear,wndr4500-v3|\
 netgear,wnr1000-v2|\
 netgear,wnr2000-v3|\
 netgear,wnr2200-8m|\
diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts b/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts
new file mode 100644
index 0000000000..95e30ea84b
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include "qca9563_netgear_wndr.dtsi"
+
+/ {
+	compatible = "netgear,wndr4500-v3", "qca,qca9563";
+	model = "Netgear WNDR4500 v3";
+};
+
+&leds {
+	usb1_green {
+		label = "netgear:green:usb1";
+		gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+		trigger-sources = <&hub_port0>;
+		linux,default-trigger = "usbport";
+	};
+
+	usb2_green {
+		label = "netgear:green:usb2";
+		gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+		trigger-sources = <&hub_port1>;
+		linux,default-trigger = "usbport";
+	};
+};
+
+&usb_phy1 {
+	status = "okay";
+};
+
+&usb1 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	hub_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+};
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index a81127a962..529ae870a5 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -162,6 +162,17 @@ define Device/netgear_wndr4300-v2
 endef
 TARGET_DEVICES += netgear_wndr4300-v2
 
+define Device/netgear_wndr4500-v3
+  SOC := qca9563
+  DEVICE_MODEL := WNDR4500
+  DEVICE_VARIANT := v3
+  NETGEAR_KERNEL_MAGIC := 0x27051956
+  NETGEAR_BOARD_ID := WNDR4500series
+  NETGEAR_HW_ID := 29764821+2+128+128+3x3+3x3+5508012173
+  $(Device/netgear_ath79_nand)
+endef
+TARGET_DEVICES += netgear_wndr4500-v3
+
 define Device/zyxel_nbg6716
   SOC := qca9558
   DEVICE_VENDOR := ZyXEL
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
index 0376b7cfc6..d9989ec538 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
@@ -14,7 +14,8 @@ glinet,gl-ar300m-nor)
 	;;
 netgear,wndr3700-v4|\
 netgear,wndr4300|\
-netgear,wndr4300-v2)
+netgear,wndr4300-v2|\
+netgear,wndr4500-v3)
 	ucidef_set_led_switch "wan-amber" "WAN (amber)" "netgear:amber:wan" "switch0" "0x20"
 	;;
 esac
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index 135a06d44b..bd02a4b383 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -18,7 +18,8 @@ ath79_setup_interfaces()
 		;;
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
 		;;
@@ -39,7 +40,8 @@ ath79_setup_macs()
 	case "$board" in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		wan_mac=$(mtd_get_mac_binary caldata 0x6)
 		;;
 	zyxel,nbg6716)
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 7ee291d109..d2f8bae1ca 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -11,7 +11,8 @@ case "$FIRMWARE" in
 	case $board in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		caldata_extract "caldata" 0x1000 0x440
 		;;
 	zyxel,nbg6716)
@@ -27,7 +28,8 @@ case "$FIRMWARE" in
 	case $board in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		caldata_extract "caldata" 0x5000 0x440
 		;;
 	*)
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From g.m0n3y.2503 at gmail.com  Fri Dec 20 20:32:13 2019
From: g.m0n3y.2503 at gmail.com (Gerard Ryan)
Date: Sat, 21 Dec 2019 11:32:13 +1000
Subject: [OpenWrt-Devel] [OpenWrt-Devel, V3,
 2/2] kmodloader: added -a arg to modprobe
In-Reply-To: <20191022090743.1487-1-G.M0N3Y.2503@gmail.com>
References: <20191022090743.1487-1-G.M0N3Y.2503@gmail.com>
Message-ID: <CAKycSdBphp4zdRNM2xkMhSWawQDa5=703q_FN3+4_XvPJJXGLA@mail.gmail.com>

Does anyone have any tips on how to expedite the review of this patch?
Am I missing something or is the patch malformed?

Thanks in advance,
Gerard

On Tue, Oct 22, 2019 at 7:08 PM Gerard Ryan <g.m0n3y.2503 at gmail.com> wrote:
>
> -a treats all non-op trailing arguments as module names
> and attempts to load all of them. This behaviour mirrors the behaviour
> of the respective -a in /tools/modprobe.c from https://git.kernel.org.
>
> This is primarily to satiate the multiple modules passed by
> docker/libnetwork.
>
> Signed-off-by: Gerard Ryan <G.M0N3Y.2503 at gmail.com>
> ---
> Compile tested: x86_x64, Hyper-V, OpenWrt Master
> Run tested: x86_x64, Hyper-V, OpenWrt Master
>
> You can also find this patch on GitHub if you prefer.
> https://github.com/G-M0N3Y-2503/openwrt-ubox-mirror/tree/feature_extend_modprobe_options
>
> Since https://patchwork.ozlabs.org/patch/1175792/ I adjusted some whitespace to indent more consistently and split the patch by the args they implement.
> Since https://patchwork.ozlabs.org/patch/1179955/ I reworded the commit message to explain the functionality of -a
>
>  kmodloader.c | 68 +++++++++++++++++++++++++++++-----------------------
>  1 file changed, 38 insertions(+), 30 deletions(-)
>
> diff --git a/kmodloader.c b/kmodloader.c
> index 07b6700..838bc8c 100644
> --- a/kmodloader.c
> +++ b/kmodloader.c
> @@ -681,6 +681,7 @@ static int print_modprobe_usage(void)
>         ULOG_INFO(
>                 "Usage:\n"
>                 "\tmodprobe [-q] [-v] filename\n"
> +               "\tmodprobe -a [-q] [-v] filename [filename...]\n"
>         );
>
>         return -1;
> @@ -854,16 +855,20 @@ static int main_modinfo(int argc, char **argv)
>
>  static int main_modprobe(int argc, char **argv)
>  {
> +       int exit_code = EXIT_SUCCESS;
>         struct module_node *mn;
>         struct module *m;
> -       char *name;
> -       char *mod = NULL;
> +       int load_fail;
>         int log_level = LOG_WARNING;
>         int opt;
>         bool quiet = false;
> +       bool use_all = false;
>
> -       while ((opt = getopt(argc, argv, "qv")) != -1 ) {
> +       while ((opt = getopt(argc, argv, "aqv")) != -1 ) {
>                 switch (opt) {
> +                       case 'a':
> +                               use_all = true;
> +                               break;
>                         case 'q': /* shhhh! */
>                                 quiet = true;
>                                 break;
> @@ -882,48 +887,51 @@ static int main_modprobe(int argc, char **argv)
>         /* after print_modprobe_usage() so it won't be filtered out */
>         ulog_threshold(log_level);
>
> -       mod = argv[optind];
> -
>         if (scan_module_folders())
>                 return -1;
>
>         if (scan_loaded_modules())
>                 return -1;
>
> -       name = get_module_name(mod);
> -       m = find_module(name);
> -       if (m && m->state == LOADED) {
> -               if (!quiet)
> -                       ULOG_ERR("%s is already loaded\n", name);
> -               return 0;
> -       } else if (!m) {
> -               if (!quiet)
> -                       ULOG_ERR("failed to find a module named %s\n", name);
> -               return -1;
> -       } else {
> -               int fail;
> +       do {
> +               char *name;
>
> -               m->state = PROBE;
> +               name = get_module_name(argv[optind]);
> +               m = find_module(name);
>
> -               fail = load_modprobe(true);
> +               if (m && m->state == LOADED) {
> +                       if (!quiet)
> +                               ULOG_INFO("%s is already loaded\n", name);
> +               } else if (!m) {
> +                       if (!quiet)
> +                               ULOG_ERR("failed to find a module named %s\n", name);
> +                       exit_code = EXIT_FAILURE;
> +               } else {
> +                       m->state = PROBE;
> +               }
>
> -               if (fail) {
> -                       ULOG_ERR("%d module%s could not be probed\n",
> -                                fail, (fail == 1) ? ("") : ("s"));
> +               optind++;
> +       } while (use_all && optind < argc);
>
> -                       avl_for_each_element(&modules, mn, avl) {
> -                               if (mn->is_alias)
> -                                       continue;
> -                               m = mn->m;
> -                               if ((m->state == PROBE) || m->error)
> -                                       ULOG_ERR("- %s\n", m->name);
> -                       }
> +       load_fail = load_modprobe(true);
> +       if (load_fail) {
> +               ULOG_ERR("%d module%s could not be probed\n",
> +                        load_fail, (load_fail == 1) ? ("") : ("s"));
> +
> +               avl_for_each_element(&modules, mn, avl) {
> +                       if (mn->is_alias)
> +                               continue;
> +                       m = mn->m;
> +                       if ((m->state == PROBE) || m->error)
> +                               ULOG_ERR("- %s\n", m->name);
>                 }
> +
> +               exit_code = EXIT_FAILURE;
>         }
>
>         free_modules();
>
> -       return 0;
> +       return exit_code;
>  }
>
>  static int main_loader(int argc, char **argv)
> --
> 2.17.1
>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Sat Dec 21 08:50:41 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Sat, 21 Dec 2019 14:50:41 +0100
Subject: [OpenWrt-Devel] [PATCH 0/3] ath79: add support for QCA9563-based
 Netgear WNDR routers
Message-ID: <20191221145041.3e272a8b@kosmio.komorska>


(resent due to me being lazy and using reply-to, apologies and pls
ignore previous thread)

This patchset introduces support for two Netgear dual-band routers
based on the same PCB (29764821) with QCA9563 SoC, AR9580 5GHz chip,
128 MiB RAM, 2 MiB SPI-NOR + 128 MiB SPI-NAND flash:
* Netgear WNDR4300 v2
* Netgear WNDR4500 v3

WNDR4300v2 has been tested successfully with this patchset applied
to master branch. Since I have no access to 4500v3, configuration
for this device is based on information provided by various websites,
including abandoned ar71xx patch https://patchwork.ozlabs.org/patch/809227/

Note: technical wikis claim device is running CPU @ 750 MHz, while on my
WNDR4300v2 both u-boot and OpenWrt report CPU clock value of 775 MHz.

MAC address printed on device label is for LAN interface (ART offset 0x0).

Patch #1 is a prerequisite and allows to unmask certain pins for
ath9k-compatible wireless chips using Device Tree definition. Parameter
is labelled "qca,gpio-mask" and accepts u32 value (see *_GPIO_MASK
constants in ath9k/reg.h file). One of main reasons for blocking access
to these pins is that they provide only one-way communication (in or out).
Here - setting new mask to 0xf6ff (default one is 0xf4ff) enables RFKILL
button wired to input pin 9.

Patch list (3):
  mac80211: ath9k: add GPIO mask dts property
  ath79: add support for Netgear WNDR4300 v2
  ath79: add support for Netgear WNDR4500 v3

 package/boot/uboot-envtools/files/ath79       |   2 +
 .../patches/ath/553-ath9k_of_gpio_mask.patch  |  25 ++
 .../linux/ath79/dts/qca9563_netgear_wndr.dtsi | 262 ++++++++++++++++++
 .../ath79/dts/qca9563_netgear_wndr4300-v2.dts |  19 ++
 .../ath79/dts/qca9563_netgear_wndr4500-v3.dts |  41 +++
 target/linux/ath79/image/nand.mk              |  22 ++
 .../ath79/nand/base-files/etc/board.d/01_leds |   4 +-
 .../nand/base-files/etc/board.d/02_network    |   8 +-
 .../etc/hotplug.d/firmware/10-ath9k-eeprom    |   8 +-
 9 files changed, 386 insertions(+), 5 deletions(-)
 create mode 100644 package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts

-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Sat Dec 21 08:52:41 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Sat, 21 Dec 2019 14:52:41 +0100
Subject: [OpenWrt-Devel] [PATCH 1/3] mac80211: ath9k: add GPIO mask dts
 property
In-Reply-To: <20191221145041.3e272a8b@kosmio.komorska>
References: <20191221145041.3e272a8b@kosmio.komorska>
Message-ID: <20191221145206.74596e41@kosmio.komorska>

This patch adds 'qca,gpio-mask=<u32>' device tree property to ath9k node.
This optional setting is a hack and should only be used in very special
(and rare) cases when a button or LED is wired to a GPIO pin normally
masked out (due to being one-way etc). Netgear WNDR4300 v2 is one such
example - it uses GPI9 for RFKILL.

See ath9k/reg.h *_GPIO_MASK constants.

Use with caution and expect to see stream of kernel warnings if wrong
mask value is provided.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
---
 .../patches/ath/553-ath9k_of_gpio_mask.patch  | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch

diff --git a/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch b/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch
new file mode 100644
index 0000000000..72b99050c4
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch
@@ -0,0 +1,25 @@
+--- a/drivers/net/wireless/ath/ath9k/init.c
++++ b/drivers/net/wireless/ath/ath9k/init.c
+@@ -654,6 +654,12 @@ static int ath9k_of_init(struct ath_soft
+ 	return 0;
+ }
+ 
++static void ath9k_of_gpio_mask(struct ath_softc *sc)
++{
++	of_property_read_u32(sc->dev->of_node, "qca,gpio-mask",
++			     &sc->sc_ah->caps.gpio_mask);
++}
++
+ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
+ 			    const struct ath_bus_ops *bus_ops)
+ {
+@@ -758,6 +764,9 @@ static int ath9k_init_softc(u16 devid, s
+ 	if (ret)
+ 		goto err_hw;
+ 
++	/* GPIO mask quirk */
++	ath9k_of_gpio_mask(sc);
++
+ 	ret = ath9k_init_queues(sc);
+ 	if (ret)
+ 		goto err_queues;
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Sat Dec 21 08:54:34 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Sat, 21 Dec 2019 14:54:34 +0100
Subject: [OpenWrt-Devel] [PATCH 2/3] ath79: add support for Netgear WNDR4300
 v2
In-Reply-To: <20191221145041.3e272a8b@kosmio.komorska>
References: <20191221145041.3e272a8b@kosmio.komorska>
Message-ID: <20191221145331.18ed2dad@kosmio.komorska>

This patch introduces support for Netgear WNDR4300v2.

Specification
=============
  * Description: Netgear WNDR4300 v2
  * Loader: U-boot
  * SOC: Qualcomm Atheros QCA9563 (775 MHz)
  * RAM: 128 MiB
  * Flash: 2 MiB SPI-NOR + 128 MiB SPI-NAND
	- NOR: U-boot binary: 256 KiB
	- NOR: U-boot environment: 64 KiB
	- NOR: ART Backup: 64 KiB
 	- NOR: Config: 64 KiB
	- NOR: Traffic Meter: 64 KiB
	- NOR: POT: 64 KiB
	- NOR: Reserved: 1408 KiB
	- NOR: ART: 64 KiB
	- NAND: Firmware: 25600 KiB (see notes for OpenWrt)
	- NAND: Language: 2048 KiB
	- NAND: mtdoops Crash Dump: 128 KiB
	- NAND: Reserved: 103296 KiB
  * Ethernet: 5 x 10/100/1000 (4 x LAN, 1 x WAN) (AR8337)
  * Wireless:
	- 2.4 GHz b/g/n (internal)
	- 5 GHz a/n (AR9580)
  * USB: yes, 1 x USB 2.0
  * Buttons:
	- Reset
	- WiFi (rfkill)
	- WPS
  * LEDs:
	- Power (amber/green)
	- WAN (amber/green)
	- WLAN 2G (green)
	- WLAN 5G (blue)
	- 4 x LAN (amber/green)
	- USB (green)
	- WPS (green)
  * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1
  * Power supply: DC 12V 1.5A
  * MAC addresses: LAN=WLAN2G on case label, WAN +1, WLAN5G +2

Important Notes
===============
0. NOR Flash (2 MiB) is not touched by OpenWrt installation.
1. NAND Flash (128 MiB) layout under OpenWrt is changed as follows:
   all space is assigned to 'firmware' partition which is divided into
   2 MiB kernel and 126 MiB UBI areas; vendor partitions (language and
   mtdoops) are removed; kernel space size can be increased if needed;
   maximum image size is set to 25600k for compatibility and can also
   be increased.
2. 5 GHz wireless radio chip is Atheros AR9580-AR1A with bogus PCI
   device ID 0xabcd. For ath9k driver to load successfully, this is
   overriden in DTS with correct value for this chip, 0x0033.
3. RFKILL button is wired to AR9580 pin 9 which is normally disabled
   by chip definition in ath9k code (0x0000F4FF gpio mask). Therefore
   'qca,gpio-mask=<0xf6ff>' hack must be used for button to work
   properly.
4. USB port is always on, no GPIO for 5V power control has been
   identified.

Installation
============
  * TFTP recovery
  * TFTP via U-boot prompt
  * sysupgrade
  * Web interface

Test build configuration
========================
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_nand=y
CONFIG_TARGET_ath79_nand_DEVICE_netgear_wndr4300-v2=y
CONFIG_ALL_KMODS=y
CONFIG_DEVEL=y
CONFIG_CCACHE=y
CONFIG_COLLECT_KERNEL_DEBUG=y
CONFIG_IMAGEOPT=y

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
---
 package/boot/uboot-envtools/files/ath79       |   1 +
 .../linux/ath79/dts/qca9563_netgear_wndr.dtsi | 262 ++++++++++++++++++
 .../ath79/dts/qca9563_netgear_wndr4300-v2.dts |  19 ++
 target/linux/ath79/image/nand.mk              |  11 +
 .../ath79/nand/base-files/etc/board.d/01_leds |   3 +-
 .../nand/base-files/etc/board.d/02_network    |   6 +-
 .../etc/hotplug.d/firmware/10-ath9k-eeprom    |   6 +-
 7 files changed, 303 insertions(+), 5 deletions(-)
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index f956cf4ed4..85a0342a60 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -26,6 +26,7 @@ glinet,gl-ar750s-nor-nand|\
 librerouter,librerouter-v1|\
 netgear,ex6400|\
 netgear,ex7300|\
+netgear,wndr4300-v2|\
 netgear,wnr1000-v2|\
 netgear,wnr2000-v3|\
 netgear,wnr2200-8m|\
diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
new file mode 100644
index 0000000000..b9f76b1fe9
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
@@ -0,0 +1,262 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "qca956x.dtsi"
+
+/ {
+	chosen {
+		bootargs = "console=ttyS0,115200n8";
+	};
+
+	aliases {
+		led-boot = &led_power_amber;
+		led-failsafe = &led_power_amber;
+		led-running = &led_power_green;
+		led-upgrade = &led_power_amber;
+		label-mac-device = &eth0;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	ath9k-keys {
+		compatible = "gpio-keys-polled";
+		poll-interval = <20>;
+
+		rfkill {
+			label = "rfkill";
+			linux,code = <KEY_RFKILL>;
+			gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds: leds {
+		compatible = "gpio-leds";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&jtag_disable_pins>;
+
+		led_power_green: power_green {
+			label = "netgear:green:power";
+			gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+		};
+
+		led_power_amber: power_amber {
+			label = "netgear:amber:power";
+			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+			default-state = "keep";
+		};
+
+		wan_green {
+			label = "netgear:green:wan";
+			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+		};
+
+		wan_amber {
+			label = "netgear:amber:wan";
+			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+		};
+
+		wlan2g_green {
+			label = "netgear:green:wlan2g";
+			gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		wps_green {
+			label = "netgear:green:wps";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	ath9k-leds {
+		compatible = "gpio-leds";
+
+		wlan5g_blue {
+			label = "netgear:blue:wlan5g";
+			gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
+		};
+	};
+};
+
+&spi {
+	status = "okay";
+
+	num-cs = <2>;
+	cs-gpios = <0>, <0>;
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x40000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "u-boot-env";
+				reg = <0x40000 0x10000>;
+			};
+
+			partition at 50000 {
+				label = "caldata_backup";
+				reg = <0x50000 0x10000>;
+				read-only;
+			};
+
+			partition at 60000 {
+				label = "config";
+				reg = <0x60000 0x10000>;
+			};
+
+			partition at 70000 {
+				label = "traffic_meter";
+				reg = <0x70000 0x10000>;
+			};
+
+			partition at 80000 {
+				label = "pot";
+				reg = <0x80000 0x10000>;
+			};
+
+			partition at 90000 {
+				label = "reserved";
+				reg = <0x90000 0x160000>;
+			};
+
+			art: partition at 1f0000 {
+				label = "caldata";
+				reg = <0x1f0000 0x10000>;
+				read-only;
+			};
+		};
+	};
+
+	flash at 1 {
+		compatible = "spi-nand";
+		reg = <1>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "firmware";
+				reg = <0x0 0x8000000>;
+				compatible = "netgear,uimage";
+			};
+
+			kernel at 0 {
+				label = "kernel";
+				reg = <0x0 0x200000>;
+			};
+
+			ubi at 200000 {
+				label = "ubi";
+				reg = <0x200000 0x7e00000>;
+			};
+		};
+	};
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy-mask = <0>;
+
+	phy0: ethernet-phy at 0 {
+		reg = <0>;
+		phy-mode = "sgmii";
+		qca,mib-poll-interval = <500>;
+
+		qca,ar8327-initvals = <
+			0x04 0x00000080	/* PORT0 PAD MODE CTRL */
+			0x10 0x81000080	/* POWER_ON_STRIP */
+			0x50 0xcc35cc35	/* LED_CTRL0 */
+			0x54 0xcb37cb37	/* LED_CTRL1 */
+			0x58 0x00000000	/* LED_CTRL2 */
+			0x5c 0x00f3cf00	/* LED_CTRL3 */
+			0x7c 0x0000007e	/* PORT0_STATUS */
+			0x94 0x00000200 /* PORT6_STATUS */
+			>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	pll-data = <0x03000101 0x00000101 0x00001919>;
+
+	mtd-mac-address = <&art 0x0>;
+
+	phy-mode = "sgmii";
+	phy-handle = <&phy0>;
+};
+
+&wmac {
+	status = "okay";
+
+	mtd-mac-address = <&art 0x0>;
+	qca,no-eeprom;
+};
+
+&pcie {
+	status = "okay";
+
+	ath9k: wifi at 0,0 {
+		/* chip is AR9580, override bogus PCI ID 168c:abcd */
+		compatible = "pci168c,0033";
+		reg = <0x0000 0 0 0 0>;
+		mtd-mac-address = <&art 0xc>;
+		qca,no-eeprom;
+		qca,gpio-mask=<0xf6ff>;	/* unmask pin 9 for RFKILL button */
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+};
+
+&usb_phy0 {
+	status = "okay";
+};
+
+&usb0 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	hub_port0: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+};
+
+&uart {
+	status = "okay";
+};
diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts b/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts
new file mode 100644
index 0000000000..e4b4ba2ac6
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include "qca9563_netgear_wndr.dtsi"
+
+/ {
+	compatible = "netgear,wndr4300-v2", "qca,qca9563";
+	model = "Netgear WNDR4300 v2";
+};
+
+&leds {
+	usb_green {
+		label = "netgear:green:usb";
+		gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+		trigger-sources = <&hub_port0>;
+		linux,default-trigger = "usbport";
+	};
+};
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index c6a1441ed9..a81127a962 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -151,6 +151,17 @@ define Device/netgear_wndr4300
 endef
 TARGET_DEVICES += netgear_wndr4300
 
+define Device/netgear_wndr4300-v2
+  SOC := qca9563
+  DEVICE_MODEL := WNDR4300
+  DEVICE_VARIANT := v2
+  NETGEAR_KERNEL_MAGIC := 0x27051956
+  NETGEAR_BOARD_ID := WNDR4500series
+  NETGEAR_HW_ID := 29764821+2+128+128+3x3+3x3+5508012175
+  $(Device/netgear_ath79_nand)
+endef
+TARGET_DEVICES += netgear_wndr4300-v2
+
 define Device/zyxel_nbg6716
   SOC := qca9558
   DEVICE_VENDOR := ZyXEL
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
index 49d4005495..0376b7cfc6 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
@@ -13,7 +13,8 @@ glinet,gl-ar300m-nor)
 	ucidef_set_led_netdev "lan" "LAN" "gl-ar300m:green:lan" "eth0"
 	;;
 netgear,wndr3700-v4|\
-netgear,wndr4300)
+netgear,wndr4300|\
+netgear,wndr4300-v2)
 	ucidef_set_led_switch "wan-amber" "WAN (amber)" "netgear:amber:wan" "switch0" "0x20"
 	;;
 esac
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index f7e43addc1..135a06d44b 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -17,7 +17,8 @@ ath79_setup_interfaces()
 			"0 at eth0" "2:lan:2" "3:lan:1" "1:wan"
 		;;
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
 		;;
@@ -37,7 +38,8 @@ ath79_setup_macs()
 
 	case "$board" in
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		wan_mac=$(mtd_get_mac_binary caldata 0x6)
 		;;
 	zyxel,nbg6716)
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 25bafe67ac..7ee291d109 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -10,7 +10,8 @@ case "$FIRMWARE" in
 "ath9k-eeprom-ahb-18100000.wmac.bin")
 	case $board in
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		caldata_extract "caldata" 0x1000 0x440
 		;;
 	zyxel,nbg6716)
@@ -25,7 +26,8 @@ case "$FIRMWARE" in
 "ath9k-eeprom-pci-0000:00:00.0.bin")
 	case $board in
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		caldata_extract "caldata" 0x5000 0x440
 		;;
 	*)
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Sat Dec 21 08:55:55 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Sat, 21 Dec 2019 14:55:55 +0100
Subject: [OpenWrt-Devel] [PATCH 3/3] ath79: add support for Netgear WNDR4500
 v3
In-Reply-To: <20191221145041.3e272a8b@kosmio.komorska>
References: <20191221145041.3e272a8b@kosmio.komorska>
Message-ID: <20191221145523.603be643@kosmio.komorska>

This patch introduces support for Netgear WNDR4500v3. Router
is very similar to WNDR4300v2 and is based on the same PCB.

Information gathered from various Internet sources (including
https://patchwork.ozlabs.org/patch/809227/) shows following
differences to WNDR4300v2:

 * two USB 2.0 ports
 * WPS and RFKILL buttons soldered to secondary pads
 * described as N900 device with 3x3:3 MIMO for 2.4GHz radio
 * power supply requirement is DC 12V 2.5A
 * HW ID suffix differs in one digit
 * bigger case

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
---
 package/boot/uboot-envtools/files/ath79       |  1 +
 .../ath79/dts/qca9563_netgear_wndr4500-v3.dts | 41 +++++++++++++++++++
 target/linux/ath79/image/nand.mk              | 11 +++++
 .../ath79/nand/base-files/etc/board.d/01_leds |  3 +-
 .../nand/base-files/etc/board.d/02_network    |  6 ++-
 .../etc/hotplug.d/firmware/10-ath9k-eeprom    |  6 ++-
 6 files changed, 63 insertions(+), 5 deletions(-)
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index 85a0342a60..aafced98db 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -27,6 +27,7 @@ librerouter,librerouter-v1|\
 netgear,ex6400|\
 netgear,ex7300|\
 netgear,wndr4300-v2|\
+netgear,wndr4500-v3|\
 netgear,wnr1000-v2|\
 netgear,wnr2000-v3|\
 netgear,wnr2200-8m|\
diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts b/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts
new file mode 100644
index 0000000000..95e30ea84b
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include "qca9563_netgear_wndr.dtsi"
+
+/ {
+	compatible = "netgear,wndr4500-v3", "qca,qca9563";
+	model = "Netgear WNDR4500 v3";
+};
+
+&leds {
+	usb1_green {
+		label = "netgear:green:usb1";
+		gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+		trigger-sources = <&hub_port0>;
+		linux,default-trigger = "usbport";
+	};
+
+	usb2_green {
+		label = "netgear:green:usb2";
+		gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+		trigger-sources = <&hub_port1>;
+		linux,default-trigger = "usbport";
+	};
+};
+
+&usb_phy1 {
+	status = "okay";
+};
+
+&usb1 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	hub_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+};
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index a81127a962..529ae870a5 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -162,6 +162,17 @@ define Device/netgear_wndr4300-v2
 endef
 TARGET_DEVICES += netgear_wndr4300-v2
 
+define Device/netgear_wndr4500-v3
+  SOC := qca9563
+  DEVICE_MODEL := WNDR4500
+  DEVICE_VARIANT := v3
+  NETGEAR_KERNEL_MAGIC := 0x27051956
+  NETGEAR_BOARD_ID := WNDR4500series
+  NETGEAR_HW_ID := 29764821+2+128+128+3x3+3x3+5508012173
+  $(Device/netgear_ath79_nand)
+endef
+TARGET_DEVICES += netgear_wndr4500-v3
+
 define Device/zyxel_nbg6716
   SOC := qca9558
   DEVICE_VENDOR := ZyXEL
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
index 0376b7cfc6..d9989ec538 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
@@ -14,7 +14,8 @@ glinet,gl-ar300m-nor)
 	;;
 netgear,wndr3700-v4|\
 netgear,wndr4300|\
-netgear,wndr4300-v2)
+netgear,wndr4300-v2|\
+netgear,wndr4500-v3)
 	ucidef_set_led_switch "wan-amber" "WAN (amber)" "netgear:amber:wan" "switch0" "0x20"
 	;;
 esac
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index 135a06d44b..bd02a4b383 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -18,7 +18,8 @@ ath79_setup_interfaces()
 		;;
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
 		;;
@@ -39,7 +40,8 @@ ath79_setup_macs()
 	case "$board" in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		wan_mac=$(mtd_get_mac_binary caldata 0x6)
 		;;
 	zyxel,nbg6716)
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 7ee291d109..d2f8bae1ca 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -11,7 +11,8 @@ case "$FIRMWARE" in
 	case $board in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		caldata_extract "caldata" 0x1000 0x440
 		;;
 	zyxel,nbg6716)
@@ -27,7 +28,8 @@ case "$FIRMWARE" in
 	case $board in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		caldata_extract "caldata" 0x5000 0x440
 		;;
 	*)
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at david-bauer.net  Sat Dec 21 11:52:18 2019
From: mail at david-bauer.net (David Bauer)
Date: Sat, 21 Dec 2019 17:52:18 +0100
Subject: [OpenWrt-Devel] [PATCH 2/3] ath79: add support for Netgear
 WNDR4300 v2
In-Reply-To: <20191221145331.18ed2dad@kosmio.komorska>
References: <20191221145041.3e272a8b@kosmio.komorska>
 <20191221145331.18ed2dad@kosmio.komorska>
Message-ID: <6c29edd3-88d9-ae74-cd29-d50eafde3ec9@david-bauer.net>

Hello Michal,

On 12/21/19 2:54 PM, Michal Cieslakiewicz wrote:
> 1. NAND Flash (128 MiB) layout under OpenWrt is changed as follows:
>    all space is assigned to 'firmware' partition which is divided into
>    2 MiB kernel and 126 MiB UBI areas; vendor partitions (language and
>    mtdoops) are removed; kernel space size can be increased if needed;
>    maximum image size is set to 25600k for compatibility and can also
>    be increased.

Do you know if there is a hard limit to the kernel size? OpenWrt does not support
relocation of UBI as doing so would interfere with wear leveling.
This means the kernel size is more or less fixed if we want to be able to use sysupgrade.

I personally would prefer to allocate 4 (or even 8) megabytes to the kernel partition.
This would give us a lot more flexibility (ath79 kernel is already at ~1.8MB the last time
I've checked.

> +	flash at 1 {
> +		compatible = "spi-nand";
> +		reg = <1>;
> +		spi-max-frequency = <25000000>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition at 0 {
> +				label = "firmware";
> +				reg = <0x0 0x8000000>;
> +				compatible = "netgear,uimage";
> +			};
> +
> +			kernel at 0 {
> +				label = "kernel";
> +				reg = <0x0 0x200000>;
> +			};
> +
> +			ubi at 200000 {
> +				label = "ubi";
> +				reg = <0x200000 0x7e00000>;
> +			};
> +		};
> +	};

The firmware node can be dropped, as kernel and UBI partitions are fixed.

Best wishes
David

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Sat Dec 21 13:04:12 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Sat, 21 Dec 2019 19:04:12 +0100
Subject: [OpenWrt-Devel] [PATCH 2/3] ath79: add support for Netgear
 WNDR4300 v2
In-Reply-To: <6c29edd3-88d9-ae74-cd29-d50eafde3ec9@david-bauer.net>
References: <20191221145041.3e272a8b@kosmio.komorska>
 <20191221145331.18ed2dad@kosmio.komorska>
 <6c29edd3-88d9-ae74-cd29-d50eafde3ec9@david-bauer.net>
Message-ID: <20191221190412.30bfcde7@kosmio.komorska>

Hello David!

> 
> Do you know if there is a hard limit to the kernel size? OpenWrt does
> not support relocation of UBI as doing so would interfere with wear
> leveling. This means the kernel size is more or less fixed if we want
> to be able to use sysupgrade.
> 

AFAIK there is no problem with increasing kernel size here.
Unfortunately I couldn't find proper u-boot source for this router, so
my claim is not based on actual code analysis. However there was
a similar question for WNDR4300(v1) and u-boot definitely allowed
kernels > 2 MiB then.

>
> I personally would prefer to allocate 4 (or even 8) megabytes to the
> kernel partition. This would give us a lot more flexibility (ath79
> kernel is already at ~1.8MB the last time I've checked.
>

That's reasonable, it's better to reserve space for future developments
than issue a patch every time kernel size grows over a certain
boundary. So in v2 I will assign 4 MiBs here - and prepare similar patch
for WNDR4300(v1) to keep them compatible.
 
> 
> The firmware node can be dropped, as kernel and UBI partitions are
> fixed.
> 

OK then, I just wasn't sure if "netgear,uimage" compatibility string is
not used somwehere in the install/config/sysupgrade process. If not,
then indeed it's redundant.

Best regards
Michal

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sat Dec 21 20:51:47 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sat, 21 Dec 2019 17:51:47 -0800
Subject: [OpenWrt-Devel] [PATCH] perf: Add libunwind only if selected
Message-ID: <20191222015147.671590-1-rosenp@gmail.com>

The depends are totally wrong. libunwind does not work with powerpc and
i386 as it needs glibc.

Instead of duplicating the platforms, just change the dependency.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/devel/perf/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile
index 6f31c826e5..aa5fb16f60 100644
--- a/package/devel/perf/Makefile
+++ b/package/devel/perf/Makefile
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=perf
 PKG_VERSION:=$(LINUX_VERSION)
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_USE_MIPS16:=0
 PKG_BUILD_PARALLEL:=1
@@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/perf
   SECTION:=devel
   CATEGORY:=Development
-  DEPENDS:= +libelf +libdw +(mips||mipsel||powerpc||i386||x86_64||arm||aarch64):libunwind +libpthread +librt +objdump @!IN_SDK @!TARGET_arc770 @KERNEL_PERF_EVENTS
+  DEPENDS:= +libelf +libdw +PACKAGE_libunwind:libunwind +libpthread +librt +objdump @!IN_SDK @!TARGET_arc770 @KERNEL_PERF_EVENTS
   TITLE:=Linux performance monitoring tool
   VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
   URL:=http://www.kernel.org
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From luizluca at gmail.com  Sat Dec 21 23:03:37 2019
From: luizluca at gmail.com (Luiz Angelo Daros de Luca)
Date: Sun, 22 Dec 2019 01:03:37 -0300
Subject: [OpenWrt-Devel] OpenWrt 19.07 status
In-Reply-To: <70070970-21c9-3d4e-3af5-0fdb49f2f340@hauke-m.de>
References: <d530eff4-2b67-0bfe-78d0-510185e416b9@hauke-m.de>
 <70070970-21c9-3d4e-3af5-0fdb49f2f340@hauke-m.de>
Message-ID: <CAJq09z72+aP3FY7VykRX7kEzb2PvUc8qLujrBZoZvwwbCr=v4Q@mail.gmail.com>

Hello,

19.07 page has a Roadmap without dates:
https://openwrt.org/releases/19.07/start#roadmap

It should have some real info with dates, something to make clear that it
does not have a real schedule ("It's ready when it is ready") or simply get
removed.

Regards,
---
     Luiz Angelo Daros de Luca
            luizluca at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191222/1c83c346/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From patchwork at patchwork.ozlabs.org  Sun Dec 22 05:00:03 2019
From: patchwork at patchwork.ozlabs.org (Patchwork)
Date: Sun, 22 Dec 2019 10:00:03 -0000
Subject: [OpenWrt-Devel] [openwrt] Patch notification: 2 patches updated
Message-ID: <20191222100003.22312.47159@bilbo.ozlabs.org>

Hello,

The following patches (submitted by you) have been updated in Patchwork:

 * openwrt: [OpenWrt-Devel,1/2] openssh: add openwrt failsafe support
     - http://patchwork.ozlabs.org/patch/1192884/
     - for: OpenWrt development
    was: New
    now: Not Applicable

 * openwrt: [OpenWrt-Devel,2/2] openssh: update to 8.1p1
     - http://patchwork.ozlabs.org/patch/1192885/
     - for: OpenWrt development
    was: New
    now: Not Applicable

This email is a notification only - you do not need to respond.

Happy patchworking.

--

This is an automated mail sent by the Patchwork system at
patchwork.ozlabs.org. To stop receiving these notifications, edit
your mail settings at:
  http://patchwork.ozlabs.org/mail/

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec 22 10:45:54 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun, 22 Dec 2019 16:45:54 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] ipq40xx: build DEVICE_DTS based on SOC
 and device name
Message-ID: <20191222154555.1814-1-freifunk@adrianschmutzler.de>

This patch uses the SOC variable to calculate DTS names automatically
based on the SOC and the device definition node name.

This reduces redundancy and (by having to choose DTS name
appropriately) will unify the naming of a device in different places
(image/Makefile, DTS name, compatible, image name). This is supposed
to make life easier for developers and reviewers.

Since the kernel uses a "soc-device.dts" scheme for this target, we
use this for the derivation of DEVICE_DTS, too, and rename the files
not having followed it so far.

Note that for some devices the kernel itself is inconsistent, leaving
us with a manual overwrite for ap.dk01.1-c1 and ap.dk04.1-c1.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 ...040.dts => qcom-ipq4018-fritzbox-4040.dts} |  0
 ...0ac-c1.dts => qcom-ipq4019-e2600ac-c1.dts} |  2 +-
 ...0ac-c2.dts => qcom-ipq4019-e2600ac-c2.dts} |  2 +-
 ...e2600ac.dtsi => qcom-ipq4019-e2600ac.dtsi} |  0
 ...sys_ea8300.dts => qcom-ipq4019-ea8300.dts} |  0
 ...040.dts => qcom-ipq4018-fritzbox-4040.dts} |  0
 ...0ac-c1.dts => qcom-ipq4019-e2600ac-c1.dts} |  2 +-
 ...0ac-c2.dts => qcom-ipq4019-e2600ac-c2.dts} |  2 +-
 ...e2600ac.dtsi => qcom-ipq4019-e2600ac.dtsi} |  0
 ...sys_ea8300.dts => qcom-ipq4019-ea8300.dts} |  0
 ...019-32m.dts => qcom-ipq4019-u4019-32m.dts} |  2 +-
 ...lec-u4019.dtsi => qcom-ipq4019-u4019.dtsi} |  0
 target/linux/ipq40xx/image/Makefile           | 55 ++++++++++---------
 .../901-arm-boot-add-dts-files.patch          |  8 +--
 .../901-arm-boot-add-dts-files.patch          | 10 ++--
 15 files changed, 42 insertions(+), 41 deletions(-)
 rename target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/{qcom-ipq4018-fritz4040.dts => qcom-ipq4018-fritzbox-4040.dts} (100%)
 rename target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/{qcom-ipq4019-qxwlan-e2600ac-c1.dts => qcom-ipq4019-e2600ac-c1.dts} (97%)
 rename target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/{qcom-ipq4019-qxwlan-e2600ac-c2.dts => qcom-ipq4019-e2600ac-c2.dts} (97%)
 rename target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/{qcom-ipq4019-qxwlan-e2600ac.dtsi => qcom-ipq4019-e2600ac.dtsi} (100%)
 rename target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/{qcom-ipq4019-linksys_ea8300.dts => qcom-ipq4019-ea8300.dts} (100%)
 rename target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/{qcom-ipq4018-fritz4040.dts => qcom-ipq4018-fritzbox-4040.dts} (100%)
 rename target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/{qcom-ipq4019-qxwlan-e2600ac-c1.dts => qcom-ipq4019-e2600ac-c1.dts} (97%)
 rename target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/{qcom-ipq4019-qxwlan-e2600ac-c2.dts => qcom-ipq4019-e2600ac-c2.dts} (97%)
 rename target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/{qcom-ipq4019-qxwlan-e2600ac.dtsi => qcom-ipq4019-e2600ac.dtsi} (100%)
 rename target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/{qcom-ipq4019-linksys_ea8300.dts => qcom-ipq4019-ea8300.dts} (100%)
 rename target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/{qcom-ipq4019-unielec-u4019-32m.dts => qcom-ipq4019-u4019-32m.dts} (97%)
 rename target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/{qcom-ipq4019-unielec-u4019.dtsi => qcom-ipq4019-u4019.dtsi} (100%)

diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-fritz4040.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
similarity index 100%
rename from target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-fritz4040.dts
rename to target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c1.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
similarity index 97%
rename from target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c1.dts
rename to target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
index d5ee068c9f..8db5588492 100644
--- a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c1.dts
+++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
@@ -4,7 +4,7 @@
  *
  */
 
-#include "qcom-ipq4019-qxwlan-e2600ac.dtsi"
+#include "qcom-ipq4019-e2600ac.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c2.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts
similarity index 97%
rename from target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c2.dts
rename to target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts
index 09ebde99ca..d88de61379 100644
--- a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c2.dts
+++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts
@@ -4,7 +4,7 @@
  *
  */
 
-#include "qcom-ipq4019-qxwlan-e2600ac.dtsi"
+#include "qcom-ipq4019-e2600ac.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac.dtsi b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac.dtsi
rename to target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi
diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-linksys_ea8300.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts
similarity index 100%
rename from target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-linksys_ea8300.dts
rename to target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts
diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-fritz4040.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
similarity index 100%
rename from target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-fritz4040.dts
rename to target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c1.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
similarity index 97%
rename from target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c1.dts
rename to target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
index ab0ec76f16..df1df2529a 100644
--- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c1.dts
+++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
@@ -4,7 +4,7 @@
  *
  */
 
-#include "qcom-ipq4019-qxwlan-e2600ac.dtsi"
+#include "qcom-ipq4019-e2600ac.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c2.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts
similarity index 97%
rename from target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c2.dts
rename to target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts
index 1c6e859951..9348ef4eec 100644
--- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac-c2.dts
+++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts
@@ -4,7 +4,7 @@
  *
  */
 
-#include "qcom-ipq4019-qxwlan-e2600ac.dtsi"
+#include "qcom-ipq4019-e2600ac.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac.dtsi b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-qxwlan-e2600ac.dtsi
rename to target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi
diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-linksys_ea8300.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts
similarity index 100%
rename from target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-linksys_ea8300.dts
rename to target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts
diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-unielec-u4019-32m.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts
similarity index 97%
rename from target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-unielec-u4019-32m.dts
rename to target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts
index 606ac165ba..63fbfb65c1 100644
--- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-unielec-u4019-32m.dts
+++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts
@@ -2,7 +2,7 @@
 
 /dts-v1/;
 
-#include "qcom-ipq4019-unielec-u4019.dtsi"
+#include "qcom-ipq4019-u4019.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 
diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-unielec-u4019.dtsi b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-unielec-u4019.dtsi
rename to target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi
diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
index fada35a49d..6cbabf1979 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -9,6 +9,7 @@ define Device/Default
 	KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
 	KERNEL_PREFIX := $$(IMAGE_PREFIX)
 	KERNEL_LOADADDR := 0x80208000
+	DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
 	SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 	IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
 	IMAGE/sysupgrade.bin/squashfs :=
@@ -65,13 +66,13 @@ define Device/8dev_jalapeno-common
 	$(call Device/UbiFit)
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
+	SOC := qcom-ipq4018
 endef
 
 define Device/8dev_jalapeno
 	$(call Device/8dev_jalapeno-common)
 	DEVICE_VENDOR := 8devices
 	DEVICE_MODEL := Jalapeno
-	DEVICE_DTS := qcom-ipq4018-jalapeno
 endef
 TARGET_DEVICES += 8dev_jalapeno
 
@@ -80,7 +81,7 @@ define Device/alfa-network_ap120c-ac
 	$(call Device/UbiFit)
 	DEVICE_VENDOR := ALFA Network
 	DEVICE_MODEL := AP120C-AC
-	DEVICE_DTS := qcom-ipq4018-ap120c-ac
+	SOC := qcom-ipq4018
 	DEVICE_PACKAGES := kmod-usb-acm \
 		kmod-tpm-i2c-atmel uboot-envtools
 	BLOCKSIZE := 128k
@@ -95,7 +96,7 @@ define Device/aruba_ap-303
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := Aruba
 	DEVICE_MODEL := AP-303
-	DEVICE_DTS := qcom-ipq4029-ap-303
+	SOC := qcom-ipq4029
 	DEVICE_PACKAGES := ipq-wifi-aruba_ap-303
 	IMAGES := sysupgrade.bin
 endef
@@ -105,7 +106,7 @@ define Device/asus_map-ac2200
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := ASUS
 	DEVICE_MODEL := Lyra (MAP-AC2200)
-	DEVICE_DTS := qcom-ipq4019-map-ac2200
+	SOC := qcom-ipq4019
 	IMAGES := sysupgrade.bin
 	DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-ath3k
 endef
@@ -115,7 +116,7 @@ define Device/asus_rt-ac58u
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := ASUS
 	DEVICE_MODEL := RT-AC58U
-	DEVICE_DTS := qcom-ipq4018-rt-ac58u
+	SOC := qcom-ipq4018
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
 	DTB_SIZE := 65536
@@ -136,7 +137,7 @@ define Device/avm_fritzbox-4040
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := AVM
 	DEVICE_MODEL := FRITZ!Box 4040
-	DEVICE_DTS := qcom-ipq4018-fritz4040
+	SOC := qcom-ipq4018
 	BOARD_NAME := fritz4040
 	IMAGE_SIZE := 29056k
 	UBOOT_PATH := $(STAGING_DIR_IMAGE)/uboot-fritz4040.bin
@@ -152,7 +153,7 @@ define Device/avm_fritzbox-7530
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := AVM
 	DEVICE_MODEL := FRITZ!Box 7530
-	DEVICE_DTS := qcom-ipq4019-fritzbox-7530
+	SOC := qcom-ipq4019
 	DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand
 	IMAGES := sysupgrade.bin
 endef
@@ -162,7 +163,7 @@ define Device/avm_fritzrepeater-1200
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := AVM
 	DEVICE_MODEL := FRITZ!Repeater 1200
-	DEVICE_DTS := qcom-ipq4019-fritzrepeater-1200
+	SOC := qcom-ipq4019
 	DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand ipq-wifi-avm_fritzrepeater-1200
 	IMAGES := sysupgrade.bin
 endef
@@ -172,7 +173,7 @@ define Device/avm_fritzrepeater-3000
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := AVM
 	DEVICE_MODEL := FRITZ!Repeater 3000
-	DEVICE_DTS := qcom-ipq4019-fritzrepeater-3000
+	SOC := qcom-ipq4019
 	DEVICE_PACKAGES := ath10k-firmware-qca9984-ct fritz-caldata fritz-tffs-nand
 	IMAGES := sysupgrade.bin
 endef
@@ -180,7 +181,6 @@ TARGET_DEVICES += avm_fritzrepeater-3000
 
 define Device/cilab_meshpoint-one
 	$(call Device/8dev_jalapeno-common)
-	DEVICE_DTS := qcom-ipq4018-meshpoint-one
 	DEVICE_VENDOR := Crisis Innovation Lab
 	DEVICE_MODEL := MeshPoint.One
 	DEVICE_PACKAGES := kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127
@@ -192,7 +192,7 @@ define Device/compex_wpj419
 	$(call Device/UbiFit)
 	DEVICE_VENDOR := Compex
 	DEVICE_MODEL := WPJ419
-	DEVICE_DTS := qcom-ipq4019-wpj419
+	SOC := qcom-ipq4019
 	DEVICE_DTS_CONFIG := config at 12
 	KERNEL_INSTALL := 1
 	BLOCKSIZE := 128k
@@ -205,7 +205,7 @@ define Device/compex_wpj428
 	$(call Device/FitImage)
 	DEVICE_VENDOR := Compex
 	DEVICE_MODEL := WPJ428
-	DEVICE_DTS := qcom-ipq4028-wpj428
+	SOC := qcom-ipq4028
 	DEVICE_DTS_CONFIG := config at 4
 	BLOCKSIZE := 64k
 	IMAGE_SIZE := 31232k
@@ -222,7 +222,7 @@ define Device/engenius_eap1300
 	DEVICE_MODEL := EAP1300
 	DEVICE_DTS_CONFIG := config at 4
 	BOARD_NAME := eap1300
-	DEVICE_DTS := qcom-ipq4018-eap1300
+	SOC := qcom-ipq4018
 	KERNEL_SIZE := 5120k
 	IMAGE_SIZE := 25344k
 	IMAGES := sysupgrade.bin
@@ -234,7 +234,7 @@ define Device/engenius_ens620ext
 	$(call Device/FitImage)
 	DEVICE_VENDOR := EnGenius
 	DEVICE_MODEL := ENS620EXT
-	DEVICE_DTS := qcom-ipq4018-ens620ext
+	SOC := qcom-ipq4018
 	DEVICE_DTS_CONFIG := config at 4
 	BLOCKSIZE := 64k
 	PAGESIZE := 256
@@ -261,7 +261,7 @@ define Device/glinet_gl-b1300
 	DEVICE_VENDOR := GL.iNet
 	DEVICE_MODEL := GL-B1300
 	BOARD_NAME := gl-b1300
-	DEVICE_DTS := qcom-ipq4029-gl-b1300
+	SOC := qcom-ipq4029
 	KERNEL_SIZE := 4096k
 	IMAGE_SIZE := 26624k
 	IMAGES := sysupgrade.bin
@@ -294,7 +294,7 @@ define Device/linksys_ea6350v3
 	DEVICE_VENDOR := Linksys
 	DEVICE_MODEL := EA6350
 	DEVICE_VARIANT := v3
-	DEVICE_DTS := qcom-ipq4018-ea6350v3
+	SOC := qcom-ipq4018
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
 	KERNEL_SIZE := 3072k
@@ -310,7 +310,7 @@ define Device/linksys_ea8300
 	$(call Device/FitzImage)
 	DEVICE_VENDOR := Linksys
 	DEVICE_MODEL := EA8300
-	DEVICE_DTS := qcom-ipq4019-linksys_ea8300
+	SOC := qcom-ipq4019
 	KERNEL_SIZE := 3072k
 	IMAGE_SIZE := 87040k
 	BLOCKSIZE := 128k
@@ -326,7 +326,7 @@ define Device/meraki_mr33
 	$(call Device/FitImage)
 	DEVICE_VENDOR := Cisco Meraki
 	DEVICE_MODEL := MR33
-	DEVICE_DTS := qcom-ipq4029-mr33
+	SOC := qcom-ipq4029
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
 	IMAGES = sysupgrade.bin
@@ -339,6 +339,7 @@ define Device/netgear_ex61x0v2
 	DEVICE_DTS_CONFIG := config at 4
 	NETGEAR_BOARD_ID := EX6150v2series
 	NETGEAR_HW_ID := 29765285+16+0+128+2x2
+	SOC := qcom-ipq4018
 endef
 
 define Device/netgear_ex6100v2
@@ -346,7 +347,6 @@ define Device/netgear_ex6100v2
 	DEVICE_VENDOR := Netgear
 	DEVICE_MODEL := EX6100
 	DEVICE_VARIANT := v2
-	DEVICE_DTS := qcom-ipq4018-ex6100v2
 endef
 TARGET_DEVICES += netgear_ex6100v2
 
@@ -355,7 +355,6 @@ define Device/netgear_ex6150v2
 	DEVICE_VENDOR := Netgear
 	DEVICE_MODEL := EX6150
 	DEVICE_VARIANT := v2
-	DEVICE_DTS := qcom-ipq4018-ex6150v2
 endef
 TARGET_DEVICES += netgear_ex6150v2
 
@@ -363,7 +362,7 @@ define Device/openmesh_a42
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := OpenMesh
 	DEVICE_MODEL := A42
-	DEVICE_DTS := qcom-ipq4018-a42
+	SOC := qcom-ipq4018
 	DEVICE_DTS_CONFIG := config at om.a42
 	BLOCKSIZE := 64k
 	KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
@@ -379,7 +378,7 @@ define Device/openmesh_a62
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := OpenMesh
 	DEVICE_MODEL := A62
-	DEVICE_DTS := qcom-ipq4019-a62
+	SOC := qcom-ipq4019
 	DEVICE_DTS_CONFIG := config at om.a62
 	BLOCKSIZE := 64k
 	KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
@@ -397,6 +396,7 @@ define Device/qcom_ap-dk01.1-c1
 	DEVICE_MODEL := AP-DK01.1
 	DEVICE_VARIANT := C1
 	BOARD_NAME := ap-dk01.1-c1
+	SOC := qcom-ipq4019
 	DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1
 	KERNEL_INSTALL := 1
 	KERNEL_SIZE := 4096k
@@ -413,6 +413,7 @@ define Device/qcom_ap-dk04.1-c1
 	DEVICE_VENDOR := Qualcomm Atheros
 	DEVICE_MODEL := AP-DK04.1
 	DEVICE_VARIANT := C1
+	SOC := qcom-ipq4019
 	DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1
 	KERNEL_INSTALL := 1
 	KERNEL_SIZE := 4048k
@@ -428,7 +429,7 @@ define Device/qxwlan_e2600ac-c1
 	DEVICE_MODEL := E2600AC
 	DEVICE_VARIANT := C1
 	BOARD_NAME := e2600ac-c1
-	DEVICE_DTS := qcom-ipq4019-qxwlan-e2600ac-c1
+	SOC := qcom-ipq4019
 	KERNEL_SIZE := 4096k
 	IMAGE_SIZE := 31232k
 	IMAGES := sysupgrade.bin
@@ -443,7 +444,7 @@ define Device/qxwlan_e2600ac-c2
 	DEVICE_VENDOR := Qxwlan
 	DEVICE_MODEL := E2600AC
 	DEVICE_VARIANT := C2
-	DEVICE_DTS := qcom-ipq4019-qxwlan-e2600ac-c2
+	SOC := qcom-ipq4019
 	KERNEL_INSTALL := 1
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
@@ -457,7 +458,7 @@ define Device/unielec_u4019-32m
 	DEVICE_MODEL := U4019
 	DEVICE_VARIANT := 32M
 	BOARD_NAME := u4019-32m
-	DEVICE_DTS := qcom-ipq4019-unielec-u4019-32m
+	SOC := qcom-ipq4019
 	KERNEL_SIZE := 4096k
 	IMAGE_SIZE := 31232k
 	IMAGES := sysupgrade.bin
@@ -469,7 +470,7 @@ define Device/zyxel_nbg6617
 	$(call Device/FitImageLzma)
 	DEVICE_VENDOR := ZyXEL
 	DEVICE_MODEL := NBG6617
-	DEVICE_DTS := qcom-ipq4018-nbg6617
+	SOC := qcom-ipq4018
 	ROOTFS_SIZE := 24960k
 	RAS_BOARD := NBG6617
 	RAS_ROOTFS_SIZE := 19840k
@@ -491,7 +492,7 @@ define Device/zyxel_wre6606
 	DEVICE_VENDOR := ZyXEL
 	DEVICE_MODEL := WRE6606
 	DEVICE_DTS_CONFIG := config at 4
-	DEVICE_DTS := qcom-ipq4018-wre6606
+	SOC := qcom-ipq4018
 	IMAGES := sysupgrade.bin
 	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
 endef
diff --git a/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch
index f7efd415f1..6c1ed49cde 100644
--- a/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch
+++ b/target/linux/ipq40xx/patches-4.14/901-arm-boot-add-dts-files.patch
@@ -21,7 +21,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 +	qcom-ipq4018-ens620ext.dtb \
 +	qcom-ipq4018-ex6100v2.dtb \
 +	qcom-ipq4018-ex6150v2.dtb \
-+	qcom-ipq4018-fritz4040.dtb \
++	qcom-ipq4018-fritzbox-4040.dtb \
 +	qcom-ipq4018-jalapeno.dtb \
 +	qcom-ipq4018-nbg6617.dtb \
 +	qcom-ipq4018-rt-ac58u.dtb \
@@ -32,10 +32,10 @@ Signed-off-by: John Crispin <john at phrozen.org>
 +	qcom-ipq4019-fritzbox-7530.dtb \
 +	qcom-ipq4019-fritzrepeater-1200.dtb \
 +	qcom-ipq4019-fritzrepeater-3000.dtb \
-+	qcom-ipq4019-linksys_ea8300.dtb \
++	qcom-ipq4019-ea8300.dtb \
 +	qcom-ipq4019-map-ac2200.dtb \
-+	qcom-ipq4019-qxwlan-e2600ac-c1.dtb \
-+	qcom-ipq4019-qxwlan-e2600ac-c2.dtb \
++	qcom-ipq4019-e2600ac-c1.dtb \
++	qcom-ipq4019-e2600ac-c2.dtb \
 +	qcom-ipq4028-wpj428.dtb \
 +	qcom-ipq4029-gl-b1300.dtb \
 +	qcom-ipq4029-mr33.dtb \
diff --git a/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch
index 52484b3dd3..8e97b3b51b 100644
--- a/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch
+++ b/target/linux/ipq40xx/patches-4.19/901-arm-boot-add-dts-files.patch
@@ -21,7 +21,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 +	qcom-ipq4018-ens620ext.dtb \
 +	qcom-ipq4018-ex6100v2.dtb \
 +	qcom-ipq4018-ex6150v2.dtb \
-+	qcom-ipq4018-fritz4040.dtb \
++	qcom-ipq4018-fritzbox-4040.dtb \
 +	qcom-ipq4018-jalapeno.dtb \
 +	qcom-ipq4018-meshpoint-one.dtb \
 +	qcom-ipq4018-nbg6617.dtb \
@@ -36,11 +36,11 @@ Signed-off-by: John Crispin <john at phrozen.org>
 +	qcom-ipq4019-fritzbox-7530.dtb \
 +	qcom-ipq4019-fritzrepeater-1200.dtb \
 +	qcom-ipq4019-fritzrepeater-3000.dtb \
-+	qcom-ipq4019-linksys_ea8300.dtb \
++	qcom-ipq4019-ea8300.dtb \
 +	qcom-ipq4019-map-ac2200.dtb \
-+	qcom-ipq4019-qxwlan-e2600ac-c1.dtb \
-+	qcom-ipq4019-qxwlan-e2600ac-c2.dtb \
-+	qcom-ipq4019-unielec-u4019-32m.dtb \
++	qcom-ipq4019-e2600ac-c1.dtb \
++	qcom-ipq4019-e2600ac-c2.dtb \
++	qcom-ipq4019-u4019-32m.dtb \
 +	qcom-ipq4019-wpj419.dtb \
 +	qcom-ipq4028-wpj428.dtb \
 +	qcom-ipq4029-ap-303.dtb \
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec 22 10:45:55 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun, 22 Dec 2019 16:45:55 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] ipq806x: build DEVICE_DTS based on SOC
 and device name
In-Reply-To: <20191222154555.1814-1-freifunk@adrianschmutzler.de>
References: <20191222154555.1814-1-freifunk@adrianschmutzler.de>
Message-ID: <20191222154555.1814-2-freifunk@adrianschmutzler.de>

This patch uses the SOC variable to calculate DTS names automatically
based on the SOC and the device definition node name.

This reduces redundancy and (by having to choose DTS name
appropriately) will unify the naming of a device in different places
(image/Makefile, DTS name, compatible, image name). This is supposed
to make life easier for developers and reviewers.

Since the kernel uses a "soc-device.dts" scheme for this target, we
use this for the derivation of DEVICE_DTS, too, leaving the DTS names
unchanged for this target.

Note that for some devices the kernel itself uses inconsistent names
(DTS naming scheme vs. compatible), leaving us with a manual overwrite
of DEVICE_DTS for those cases.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/ipq806x/image/Makefile | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
index 81f14b4756..33f68b7a60 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -16,6 +16,7 @@ define Device/Default
 	KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
 	KERNEL_PREFIX := $$(IMAGE_PREFIX)
 	KERNEL_LOADADDR = 0x42208000
+	DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
 	SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
 	IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata
 	IMAGE/sysupgrade.bin/squashfs :=
@@ -81,7 +82,7 @@ endef
 
 define Device/buffalo_wxr-2533dhp
 	$(call Device/LegacyImage)
-	DEVICE_DTS := qcom-ipq8064-wxr-2533dhp
+	SOC := qcom-ipq8064
 	DEVICE_VENDOR := Buffalo
 	DEVICE_MODEL := WXR-2533DHP
 	BLOCKSIZE := 128k
@@ -102,7 +103,7 @@ define Device/compex_wpq864
 	DEVICE_MODEL := WPQ864
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
-	DEVICE_DTS := qcom-ipq8064-wpq864
+	SOC := qcom-ipq8064
 	DEVICE_PACKAGES := kmod-gpio-beeper
 endef
 TARGET_DEVICES += compex_wpq864
@@ -111,7 +112,7 @@ define Device/linksys_ea8500
 	$(call Device/LegacyImage)
 	DEVICE_VENDOR := Linksys
 	DEVICE_MODEL := EA8500
-	DEVICE_DTS := qcom-ipq8064-ea8500
+	SOC := qcom-ipq8064
 	PAGESIZE := 2048
 	BLOCKSIZE := 128k
 	KERNEL_SIZE := 3072k
@@ -129,7 +130,7 @@ define Device/nec_wg2600hp
 	$(call Device/LegacyImage)
 	DEVICE_VENDOR := NEC
 	DEVICE_MODEL := Aterm WG2600HP
-	DEVICE_DTS := qcom-ipq8064-wg2600hp
+	SOC := qcom-ipq8064
 	BLOCKSIZE := 64k
 	BOARD_NAME := wg2600hp
 	IMAGES := sysupgrade.bin
@@ -142,7 +143,7 @@ define Device/netgear_d7800
 	$(call Device/DniImage)
 	DEVICE_VENDOR := NETGEAR
 	DEVICE_MODEL := Nighthawk X4 D7800
-	DEVICE_DTS := qcom-ipq8064-d7800
+	SOC := qcom-ipq8064
 	KERNEL_SIZE := 4096k
 	NETGEAR_BOARD_ID := D7800
 	NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
@@ -159,7 +160,7 @@ define Device/netgear_r7500
 	DEVICE_VENDOR := NETGEAR
 	DEVICE_MODEL := Nighthawk X4 R7500
 	DEVICE_VARIANT := v1
-	DEVICE_DTS := qcom-ipq8064-r7500
+	SOC := qcom-ipq8064
 	KERNEL_SIZE := 4096k
 	NETGEAR_BOARD_ID := R7500
 	NETGEAR_HW_ID := 29764841+0+128+256+3x3+4x4
@@ -176,7 +177,7 @@ define Device/netgear_r7500v2
 	DEVICE_VENDOR := NETGEAR
 	DEVICE_MODEL := Nighthawk X4 R7500
 	DEVICE_VARIANT := v2
-	DEVICE_DTS := qcom-ipq8064-r7500v2
+	SOC := qcom-ipq8064
 	KERNEL_SIZE := 4096k
 	NETGEAR_BOARD_ID := R7500v2
 	NETGEAR_HW_ID := 29764958+0+128+512+3x3+4x4
@@ -192,7 +193,7 @@ define Device/netgear_r7800
 	$(call Device/DniImage)
 	DEVICE_VENDOR := NETGEAR
 	DEVICE_MODEL := Nighthawk X4S R7800
-	DEVICE_DTS := qcom-ipq8065-r7800
+	SOC := qcom-ipq8065
 	KERNEL_SIZE := 4096k
 	NETGEAR_BOARD_ID := R7800
 	NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4+cascade
@@ -210,6 +211,7 @@ define Device/qcom_ipq8064-ap148
 	DEVICE_VENDOR := Qualcomm
 	DEVICE_MODEL := AP148
 	DEVICE_VARIANT := standard
+	SOC := qcom-ipq8064
 	DEVICE_DTS := qcom-ipq8064-ap148
 	KERNEL_INSTALL := 1
 	BLOCKSIZE := 128k
@@ -226,6 +228,7 @@ define Device/qcom_ipq8064-ap148-legacy
 	DEVICE_VENDOR := Qualcomm
 	DEVICE_MODEL := AP148
 	DEVICE_VARIANT := legacy
+	SOC := qcom-ipq8064
 	DEVICE_DTS := qcom-ipq8064-ap148
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
@@ -240,6 +243,7 @@ define Device/qcom_ipq8064-ap161
 	$(call Device/UbiFit)
 	DEVICE_VENDOR := Qualcomm
 	DEVICE_MODEL := AP161
+	SOC := qcom-ipq8064
 	DEVICE_DTS := qcom-ipq8064-ap161
 	KERNEL_INSTALL := 1
 	BLOCKSIZE := 128k
@@ -253,6 +257,7 @@ define Device/qcom_ipq8064-db149
 	$(call Device/FitImage)
 	DEVICE_VENDOR := Qualcomm
 	DEVICE_MODEL := DB149
+	SOC := qcom-ipq8064
 	DEVICE_DTS := qcom-ipq8064-db149
 	KERNEL_INSTALL := 1
 	BOARD_NAME := db149
@@ -265,7 +270,7 @@ define Device/tplink_c2600
 	DEVICE_VENDOR := TP-Link
 	DEVICE_MODEL := Archer C2600
 	DEVICE_VARIANT := v1
-	DEVICE_DTS := qcom-ipq8064-c2600
+	SOC := qcom-ipq8064
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
 	BOARD_NAME := c2600
@@ -283,7 +288,7 @@ define Device/tplink_vr2600v
 	KERNEL = kernel-bin | append-dtb | uImage none
 	KERNEL_NAME := zImage
 	KERNEL_SIZE := 3072k
-	DEVICE_DTS := qcom-ipq8064-vr2600v
+	SOC := qcom-ipq8064
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
 	BOARD_NAME := vr2600v
@@ -297,7 +302,7 @@ TARGET_DEVICES += tplink_vr2600v
 define Device/zyxel_nbg6817
 	DEVICE_VENDOR := ZyXEL
 	DEVICE_MODEL := NBG6817
-	DEVICE_DTS := qcom-ipq8065-nbg6817
+	SOC := qcom-ipq8065
 	KERNEL_SIZE := 4096k
 	BLOCKSIZE := 64k
 	BOARD_NAME := nbg6817
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sun Dec 22 11:04:43 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sun, 22 Dec 2019 17:04:43 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: remove bogus ralink,
 mtd-eeprom with offset 0x4
Message-ID: <20191222160443.2247-1-freifunk@adrianschmutzler.de>

Several devices in mt76x8 subtarget use the following line to set
up wmac in their DTS(I) files:

ralink,mtd-eeprom = <&factory 0x4>

This is strange for several reasons:
- They should use mediatek,mtd-eeprom on this SOC
- The caldata is supposed to start at 0x0
- The parent DTSI mt7628an.dtsi specifies mediatek,mtd-eeprom anyway,
  starting from 0x0
- The offset coincides with the default location of the MAC address
  in caldata

Based on the comment in b28e94d4bfa1 ("ramips: MiWiFi Nano fixes"),
it looks like the author for this device wanted to actually use
mtd-mac-address instead of ralink,mtd-eeprom. A check on the same
device revealed that actually the MAC address start at offset 4 there,
so the correct caldata offset is 0x0.

Based on these findings, and the fact that the expected location on
this SOC is 0x0, we remove the "ralink,mtd-eeprom = <&factory 0x4>"
statement from all devices in ramips (being only mt7628an anyway).

Thanks to Sungbo Eo for finding and researching this.

Reported-by: Sungbo Eo <mans0n at gorani.run>
Fixes: b28e94d4bfa1 ("ramips: MiWiFi Nano fixes")
Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/ramips/dts/mt7628an_cudy_wr1000.dts             | 1 -
 target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts      | 1 -
 target/linux/ramips/dts/mt7628an_totolink_lr1200.dts         | 1 -
 target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi         | 1 -
 target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts      | 1 -
 target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts      | 1 -
 target/linux/ramips/mt76x8/base-files/etc/board.d/02_network | 4 ++--
 7 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
index aa3f01e68e..a23a8ad07c 100644
--- a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
+++ b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
@@ -134,7 +134,6 @@
 
 &wmac {
 	status = "okay";
-	ralink,mtd-eeprom = <&factory 0x4>;
 };
 
 &ethernet {
diff --git a/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts
index 1316a290d7..00ae2b1a45 100644
--- a/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts
+++ b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts
@@ -95,5 +95,4 @@
 
 &wmac {
 	status = "okay";
-	ralink,mtd-eeprom = <&factory 0x4>;
 };
diff --git a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts
index 4a712e917a..242a54e058 100644
--- a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts
+++ b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts
@@ -110,7 +110,6 @@
 
 &wmac {
 	status = "okay";
-	ralink,mtd-eeprom = <&factory 0x4>;
 };
 
 &ethernet {
diff --git a/target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi b/target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi
index 6a312ff0b1..2e604aee59 100644
--- a/target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi
+++ b/target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi
@@ -23,7 +23,6 @@
 
 &wmac {
 	status = "okay";
-	ralink,mtd-eeprom = <&factory 0x4>;
 };
 
 &ethernet {
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
index 8b2a3d6c9d..76bc798bb8 100644
--- a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
@@ -69,7 +69,6 @@
 
 &wmac {
 	status = "okay";
-	ralink,mtd-eeprom = <&factory 0x4>;
 };
 
 &ethernet {
diff --git a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts
index b89e689508..dc7ee82f35 100644
--- a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts
+++ b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts
@@ -105,7 +105,6 @@
 
 &wmac {
 	status = "okay";
-	ralink,mtd-eeprom = <&factory 0x4>;
 };
 
 &ethernet {
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
index aeaf296984..23d045614e 100755
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
@@ -134,7 +134,7 @@ ramips_setup_macs()
 		;;
 	cudy,wr1000)
 		wan_mac=$(mtd_get_mac_binary factory 0x2e)
-		label_mac=$(mtd_get_mac_binary factory 0x8)
+		label_mac=$(mtd_get_mac_binary factory 0x4)
 		;;
 	duzun,dm06|\
 	netgear,r6120|\
@@ -194,7 +194,7 @@ ramips_setup_macs()
 		;;
 	vocore,vocore2|\
 	vocore,vocore2-lite)
-		label_mac=$(mtd_get_mac_binary factory 0x8)
+		label_mac=$(mtd_get_mac_binary factory 0x4)
 		;;
 	wavlink,wl-wn570ha1|\
 	zbtlink,zbt-we1226)
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Sun Dec 22 12:32:51 2019
From: openwrt-devel at lists.openwrt.org (hjskvntjwgvt.ru via openwrt-devel)
Date: Sun, 22 Dec 2019 20:32:51 +0300
Subject: [OpenWrt-Devel] =?cp1251?b?yPHy7vDo/yDQ7vHx6OguIFhYIOLl6iCXIOTu?=
	=?cp1251?b?6vPs5e3y4Ov87e4t6PHy7vDo9+Xx6ujpIPbo6usg9Ojr/Ozu4i4g?=
	=?cp1251?q?05=5F08=5F2019_02=5F10_199508?=
Message-ID: <mailman.20086.1577036143.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: "hjskvntjwgvt.ru" <info at hjskvntjwgvt.ru>
Subject: ??????? ??????. XX ??? ? ?????????????-???????????? ???? ???????. 05_08_2019 02_10 199508
Date: Sun, 22 Dec 2019 20:32:51 +0300
Size: 85156
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191222/0e5bc170/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Sun Dec 22 13:20:57 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sun, 22 Dec 2019 21:20:57 +0300
Subject: [OpenWrt-Devel] [PATCH v3] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <20191215172522.26626-1-fercerpav@gmail.com>
References: <20191215172522.26626-1-fercerpav@gmail.com>
Message-ID: <20191222182057.9805-1-fercerpav@gmail.com>

According to many bugreports [0][1][2] the default ath10k-ct kernel
module is unusable on devices with just 64 MiB RAM or with 128 MiB and
dual ath10k cards. The target boards boot but eventually oom-killer
starts to interfere with normal operation, so the current state is
effectively broken.

Since the two patches in question have a performance impact (and
possibly some other unexpected side-effects) a dedicated build variant
is added so that users of the low RAM devices can still benefit from all
the ath10k-ct advantages.

According to testing [3] results, the issue can be experienced even with
"a 256MB device with three radios". Measured performance impact of
implementing small buffers was lowering "the maximum 5 GHz throughput on
an IPQ40xx device without RPS/XPS optimizations from 494/432 Mbit/s for
TCP transfers (download/upload) to 438/343 Mbit/s"

The patches were apparently inspired by QSDK tweaks used by ODMs for the
affected devices.

[0] http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020573.html
[1] https://github.com/openwrt/openwrt/pull/1077
[2] https://bugs.openwrt.org/index.php?do=details&task_id=2664
[3] https://github.com/freifunk-gluon/gluon/pull/1440#issue-195607701

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
This is compile-tested only!

Changes for v3:

    - Apply all patches to both build variants, select by a preprocessor
      symbol

Changes for v2:

    - Added performance impact details to the commit message
    - Fixed QUILT=1 operation
    - Refreshed the new patches

 package/kernel/ath10k-ct/Makefile             |  18 +++-
 ...0-0010-ath10k-limit-htt-rx-ring-size.patch |  28 +++++
 ...60-0011-ath10k-limit-pci-buffer-size.patch | 100 ++++++++++++++++++
 3 files changed, 145 insertions(+), 1 deletion(-)
 create mode 100644 package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch
 create mode 100644 package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch

diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index dbf75fe174..e38380547a 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -35,6 +35,7 @@ define KernelPackage/ath10k-ct
 	$(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
   AUTOLOAD:=$(call AutoProbe,ath10k_pci)
   PROVIDES:=kmod-ath10k
+  VARIANT:=regular
 endef
 
 define KernelPackage/ath10k-ct/config
@@ -42,7 +43,17 @@ define KernelPackage/ath10k-ct/config
        config ATH10K-CT_LEDS
                bool "Enable LED support"
                default y
-               depends on PACKAGE_kmod-ath10k-ct
+               depends on PACKAGE_kmod-ath10k-ct || PACKAGE_kmod-ath10k-ct-smallbuffers
+endef
+
+define KernelPackage/ath10k-ct-smallbuffers
+$(call KernelPackage/ath10k-ct)
+  TITLE+= (small buffers for low-RAM devices)
+  VARIANT:=smallbuffers
+endef
+
+define KernelPackage/ath10k-ct-smallbuffers/config
+$(call KernelPackage/ath10k-ct/config)
 endef
 
 NOSTDINC_FLAGS = \
@@ -90,6 +101,10 @@ ifeq ($(CONFIG_ATH10K-CT_LEDS),y)
   NOSTDINC_FLAGS += -DCONFIG_ATH10K_LEDS
 endif
 
+ifeq ($(BUILD_VARIANT),smallbuffers)
+  NOSTDINC_FLAGS += -DCONFIG_ATH10K_SMALLBUFFERS
+endif
+
 define Build/Configure
 	cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
 endef
@@ -107,3 +122,4 @@ define Build/Compile
 endef
 
 $(eval $(call KernelPackage,ath10k-ct))
+$(eval $(call KernelPackage,ath10k-ct-smallbuffers))
diff --git a/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch b/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch
new file mode 100644
index 0000000000..a3a939440a
--- /dev/null
+++ b/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch
@@ -0,0 +1,28 @@
+--- a/ath10k-4.19/htt.h
++++ b/ath10k-4.19/htt.h
+@@ -237,7 +237,11 @@ enum htt_rx_ring_flags {
+ };
+ 
+ #define HTT_RX_RING_SIZE_MIN 128
++#ifndef CONFIG_ATH10K_SMALLBUFFERS
+ #define HTT_RX_RING_SIZE_MAX 2048
++#else
++#define HTT_RX_RING_SIZE_MAX 512
++#endif
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
+--- a/ath10k-5.2/htt.h
++++ b/ath10k-5.2/htt.h
+@@ -225,7 +225,11 @@ enum htt_rx_ring_flags {
+ };
+ 
+ #define HTT_RX_RING_SIZE_MIN 128
++#ifndef CONFIG_ATH10K_SMALLBUFFERS
+ #define HTT_RX_RING_SIZE_MAX 2048
++#else
++#define HTT_RX_RING_SIZE_MAX 512
++#endif
+ #define HTT_RX_RING_SIZE HTT_RX_RING_SIZE_MAX
+ #define HTT_RX_RING_FILL_LEVEL (((HTT_RX_RING_SIZE) / 2) - 1)
+ #define HTT_RX_RING_FILL_LEVEL_DUAL_MAC (HTT_RX_RING_SIZE - 1)
diff --git a/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
new file mode 100644
index 0000000000..517be89dab
--- /dev/null
+++ b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
@@ -0,0 +1,100 @@
+--- a/ath10k-4.19/pci.c
++++ b/ath10k-4.19/pci.c
+@@ -142,7 +142,11 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
++#ifndef CONFIG_ATH10K_SMALLBUFFERS
+ 		.dest_nentries = 512,
++#else
++		.dest_nentries = 128,
++#endif
+ 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
+ 	},
+ 
+@@ -151,7 +155,11 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
++#ifndef CONFIG_ATH10K_SMALLBUFFERS
+ 		.dest_nentries = 128,
++#else
++		.dest_nentries = 64,
++#endif
+ 		.recv_cb = ath10k_pci_htc_rx_cb,
+ 	},
+ 
+@@ -178,7 +186,11 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 512,
++#ifndef CONFIG_ATH10K_SMALLBUFFERS
+ 		.dest_nentries = 512,
++#else
++		.dest_nentries = 128,
++#endif
+ 		.recv_cb = ath10k_pci_htt_rx_cb,
+ 	},
+ 
+@@ -203,7 +215,11 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
++#ifndef CONFIG_ATH10K_SMALLBUFFERS
+ 		.dest_nentries = 128,
++#else
++		.dest_nentries = 96,
++#endif
+ 		.recv_cb = ath10k_pci_pktlog_rx_cb,
+ 	},
+ 
+--- a/ath10k-5.2/pci.c
++++ b/ath10k-5.2/pci.c
+@@ -131,7 +131,11 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
++#ifndef CONFIG_ATH10K_SMALLBUFFERS
+ 		.dest_nentries = 512,
++#else
++		.dest_nentries = 128,
++#endif
+ 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
+ 	},
+ 
+@@ -140,7 +144,11 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
++#ifndef CONFIG_ATH10K_SMALLBUFFERS
+ 		.dest_nentries = 128,
++#else
++		.dest_nentries = 64,
++#endif
+ 		.recv_cb = ath10k_pci_htc_rx_cb,
+ 	},
+ 
+@@ -167,7 +175,11 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 512,
++#ifndef CONFIG_ATH10K_SMALLBUFFERS
+ 		.dest_nentries = 512,
++#else
++		.dest_nentries = 128,
++#endif
+ 		.recv_cb = ath10k_pci_htt_rx_cb,
+ 	},
+ 
+@@ -192,7 +204,11 @@ static struct ce_attr host_ce_config_wla
+ 		.flags = CE_ATTR_FLAGS,
+ 		.src_nentries = 0,
+ 		.src_sz_max = 2048,
++#ifndef CONFIG_ATH10K_SMALLBUFFERS
+ 		.dest_nentries = 128,
++#else
++		.dest_nentries = 96,
++#endif
+ 		.recv_cb = ath10k_pci_pktlog_rx_cb,
+ 	},
+ 
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From noreply at github.com  Sun Dec 22 14:05:07 2019
From: noreply at github.com (Stephen Walker)
Date: Sun, 22 Dec 2019 11:05:07 -0800
Subject: [OpenWrt-Devel] [sdwalker/sdwalker.github.io] ac019b: This week's
 update
Message-ID: <sdwalker/sdwalker.github.io/push/refs/heads/master/6bb22e-ac019b@github.com>

  Branch: refs/heads/master
  Home:   https://github.com/sdwalker/sdwalker.github.io
  Commit: ac019b7f822f0aea70d3498d237c93ca0f39f4fa
      https://github.com/sdwalker/sdwalker.github.io/commit/ac019b7f822f0aea70d3498d237c93ca0f39f4fa
  Author: Stephen Walker <stephendwalker+github at gmail.com>
  Date:   2019-12-22 (Sun, 22 Dec 2019)

  Changed paths:
    M uscan/index-18.06.html
    M uscan/index-19.07.html
    M uscan/index.html

  Log Message:
  -----------
  This week's update



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Sun Dec 22 15:05:13 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sun, 22 Dec 2019 23:05:13 +0300
Subject: [OpenWrt-Devel] [PATCH] ath79: use ath10k-ct-smallbuffers for 64
 MiB devices
In-Reply-To: <20191222182057.9805-1-fercerpav@gmail.com>
References: <20191222182057.9805-1-fercerpav@gmail.com>
Message-ID: <20191222200514.9955-1-fercerpav@gmail.com>

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---

These should be all the affected ath79 devices. There're also some in
ipq40xx and ipq806x. And, of course, plenty in ar71xx, not sure if
it's worth caring about those.


 target/linux/ath79/image/generic-tp-link.mk | 10 +++++-----
 target/linux/ath79/image/generic-ubnt.mk    | 10 +++++-----
 target/linux/ath79/image/generic.mk         |  8 ++++----
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index cc5c13b919..8a030492c5 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -20,7 +20,7 @@ define Device/tplink_archer-c2-v3
   IMAGE_SIZE := 7808k
   DEVICE_MODEL := Archer C2
   DEVICE_VARIANT := v3
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
   TPLINK_BOARD_ID := ARCHER-C2-V3
 endef
 TARGET_DEVICES += tplink_archer-c2-v3
@@ -32,7 +32,7 @@ define Device/tplink_archer-c25-v1
   DEVICE_MODEL := Archer C25
   DEVICE_VARIANT := v1
   TPLINK_BOARD_ID := ARCHER-C25-V1
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
   SUPPORTED_DEVICES += archer-c25-v1
 endef
 TARGET_DEVICES += tplink_archer-c25-v1
@@ -56,7 +56,7 @@ define Device/tplink_archer-c58-v1
   DEVICE_MODEL := Archer C58
   DEVICE_VARIANT := v1
   TPLINK_BOARD_ID := ARCHER-C58-V1
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
   SUPPORTED_DEVICES += archer-c58-v1
 endef
 TARGET_DEVICES += tplink_archer-c58-v1
@@ -119,7 +119,7 @@ define Device/tplink_archer-c60-v1
   DEVICE_MODEL := Archer C60
   DEVICE_VARIANT := v1
   TPLINK_BOARD_ID := ARCHER-C60-V1
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
   SUPPORTED_DEVICES += archer-c60-v1
 endef
 TARGET_DEVICES += tplink_archer-c60-v1
@@ -131,7 +131,7 @@ define Device/tplink_archer-c60-v2
   DEVICE_MODEL := Archer C60
   DEVICE_VARIANT := v2
   TPLINK_BOARD_ID := ARCHER-C60-V2
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
   SUPPORTED_DEVICES += archer-c60-v2
 endef
 TARGET_DEVICES += tplink_archer-c60-v2
diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk
index 760d5be196..8a45fb09d1 100644
--- a/target/linux/ath79/image/generic-ubnt.mk
+++ b/target/linux/ath79/image/generic-ubnt.mk
@@ -122,7 +122,7 @@ define Device/ubnt_lap-120
   $(Device/ubnt-wa)
   DEVICE_MODEL := LiteAP ac
   DEVICE_VARIANT := LAP-120
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
 endef
 TARGET_DEVICES += ubnt_lap-120
 
@@ -130,28 +130,28 @@ define Device/ubnt_litebeam-ac-gen2
   $(Device/ubnt-wa)
   DEVICE_MODEL := LiteBeam AC
   DEVICE_VARIANT := Gen2
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
 endef
 TARGET_DEVICES += ubnt_litebeam-ac-gen2
 
 define Device/ubnt_nanobeam-ac
   $(Device/ubnt-wa)
   DEVICE_MODEL := NanoBeam AC
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct rssileds
+  DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
 endef
 TARGET_DEVICES += ubnt_nanobeam-ac
 
 define Device/ubnt_nanostation-ac
   $(Device/ubnt-wa)
   DEVICE_MODEL := Nanostation AC
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct rssileds
+  DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
 endef
 TARGET_DEVICES += ubnt_nanostation-ac
 
 define Device/ubnt_nanostation-ac-loco
   $(Device/ubnt-wa)
   DEVICE_MODEL := Nanostation AC loco
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
 endef
 TARGET_DEVICES += ubnt_nanostation-ac-loco
 
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 10bd40abc1..18dad80d5d 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -273,7 +273,7 @@ define Device/comfast_cf-e313ac
   SOC := qca9531
   DEVICE_VENDOR := COMFAST
   DEVICE_MODEL := CF-E313AC
-  DEVICE_PACKAGES := rssileds kmod-leds-gpio kmod-ath10k-ct \
+  DEVICE_PACKAGES := rssileds kmod-leds-gpio kmod-ath10k-ct-smallbuffers \
 	ath10k-firmware-qca9888-ct -swconfig -uboot-envtools
   IMAGE_SIZE := 7936k
 endef
@@ -473,7 +473,7 @@ define Device/dlink_dir-859-a1
   DEVICE_MODEL := DIR-859
   DEVICE_VARIANT := A1
   IMAGE_SIZE := 15872k
-  DEVICE_PACKAGES :=  kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES :=  kmod-usb2 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
   SEAMA_SIGNATURE := wrgac37_dlink.2013gui_dir859
   SUPPORTED_DEVICES += dir-859-a1
 endef
@@ -719,7 +719,7 @@ define Device/nec_wg800hp
   IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
 	append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
 	xor-image -p 6A57190601121E4C004C1E1201061957 -x | nec-fw LASER_ATERM
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct-htt
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct-htt
 endef
 TARGET_DEVICES += nec_wg800hp
 
@@ -917,7 +917,7 @@ define Device/phicomm_k2t
   IMAGE_SIZE := 15744k
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
 	append-metadata | check-size $$$$(IMAGE_SIZE)
-  DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct ath10k-firmware-qca9888-ct
+  DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
 endef
 TARGET_DEVICES += phicomm_k2t
 
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Sun Dec 22 15:50:52 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Sun, 22 Dec 2019 21:50:52 +0100
Subject: [OpenWrt-Devel] [PATCH v2 0/4] ath79: add support for QCA9563-based
 Netgear WNDR routers
Message-ID: <20191222215052.6901e39f@kosmio.komorska>

This patchset introduces support for two Netgear dual-band routers
based on the same PCB (29764821) with QCA9563 SoC, AR9580 5GHz chip,
128 MiB RAM, 2 MiB SPI-NOR + 128 MiB SPI-NAND flash:
* Netgear WNDR4300 v2
* Netgear WNDR4500 v3

WNDR4300v2 has been tested successfully with this patchset applied
to master branch. Since I have no access to 4500v3, configuration
for this device is based on information provided by various websites,
including abandoned ar71xx patch https://patchwork.ozlabs.org/patch/809227/

Note: technical wikis claim device is running CPU @ 750 MHz, while on my
WNDR4300v2 both u-boot and OpenWrt report CPU clock value of 775 MHz.

MAC address printed on device label is for LAN interface (ART offset 0x0).

Patch #1 is a prerequisite and allows to unmask certain pins for
ath9k-compatible wireless chips using Device Tree definition. Parameter
is labelled "qca,gpio-mask" and accepts u32 value (see *_GPIO_MASK
constants in ath9k/reg.h file). One of main reasons for blocking access
to these pins is that they provide only one-way communication (in or out).
Here - setting new mask to 0xf6ff (default one is 0xf4ff) enables RFKILL
button wired to input pin 9.

Changes v1->v2:
* kernel partition size increased from 2 MiB to 4 MiB for all Netgear WNDR
  routers with NAND flash, including AR9344 models (WNDR4300 and WNDR3700v4)
  already in master (patch 2/4 added)
* dropped 'firmware' overlay partition

Patch list (4):
  mac80211: ath9k: add GPIO mask dts property
  ath79: WNDR4300: increase kernel partition to 4M
  ath79: add support for Netgear WNDR4300 v2
  ath79: add support for Netgear WNDR4500 v3

 package/boot/uboot-envtools/files/ath79       |   2 +
 .../patches/ath/553-ath9k_of_gpio_mask.patch  |  25 ++
 .../linux/ath79/dts/ar9344_netgear_wndr.dtsi  |  10 +-
 .../linux/ath79/dts/qca9563_netgear_wndr.dtsi | 256 ++++++++++++++++++
 .../ath79/dts/qca9563_netgear_wndr4300-v2.dts |  19 ++
 .../ath79/dts/qca9563_netgear_wndr4500-v3.dts |  41 +++
 target/linux/ath79/image/nand.mk              |  24 +-
 .../ath79/nand/base-files/etc/board.d/01_leds |   4 +-
 .../nand/base-files/etc/board.d/02_network    |   8 +-
 .../etc/hotplug.d/firmware/10-ath9k-eeprom    |   8 +-
 10 files changed, 386 insertions(+), 11 deletions(-)
 create mode 100644 package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts

-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Sun Dec 22 15:51:48 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Sun, 22 Dec 2019 21:51:48 +0100
Subject: [OpenWrt-Devel] [PATCH v2 1/4] mac80211: ath9k: add GPIO mask dts
 property
In-Reply-To: <20191222215052.6901e39f@kosmio.komorska>
References: <20191222215052.6901e39f@kosmio.komorska>
Message-ID: <20191222215148.201c30d9@kosmio.komorska>

This patch adds 'qca,gpio-mask=<u32>' device tree property to ath9k node.
This optional setting is a hack and should only be used in very special
(and rare) cases when a button or LED is wired to a GPIO pin normally
masked out (due to being one-way etc). Netgear WNDR4300 v2 is one such
example - it uses GPI9 for RFKILL.

See ath9k/reg.h *_GPIO_MASK constants.

Use with caution and expect to see stream of kernel warnings if wrong
mask value is provided.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
---
 .../patches/ath/553-ath9k_of_gpio_mask.patch  | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch

diff --git a/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch b/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch
new file mode 100644
index 0000000000..72b99050c4
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch
@@ -0,0 +1,25 @@
+--- a/drivers/net/wireless/ath/ath9k/init.c
++++ b/drivers/net/wireless/ath/ath9k/init.c
+@@ -654,6 +654,12 @@ static int ath9k_of_init(struct ath_soft
+ 	return 0;
+ }
+ 
++static void ath9k_of_gpio_mask(struct ath_softc *sc)
++{
++	of_property_read_u32(sc->dev->of_node, "qca,gpio-mask",
++			     &sc->sc_ah->caps.gpio_mask);
++}
++
+ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
+ 			    const struct ath_bus_ops *bus_ops)
+ {
+@@ -758,6 +764,9 @@ static int ath9k_init_softc(u16 devid, s
+ 	if (ret)
+ 		goto err_hw;
+ 
++	/* GPIO mask quirk */
++	ath9k_of_gpio_mask(sc);
++
+ 	ret = ath9k_init_queues(sc);
+ 	if (ret)
+ 		goto err_queues;
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Sun Dec 22 15:53:29 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Sun, 22 Dec 2019 21:53:29 +0100
Subject: [OpenWrt-Devel] [PATCH v2 2/4] ath79: WNDR4300: increase kernel
 partition to 4M
In-Reply-To: <20191222215052.6901e39f@kosmio.komorska>
References: <20191222215052.6901e39f@kosmio.komorska>
Message-ID: <20191222215253.1538b661@kosmio.komorska>

Increase kernel partition from 2 MiB to 4 MiB for Netgear WNDR routers
with NAND flash. Change affects following devices:
 * Netgear WNDR3700 v4
 * Netgear WNDR4300

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
---
 target/linux/ath79/dts/ar9344_netgear_wndr.dtsi | 10 +++++-----
 target/linux/ath79/image/nand.mk                |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi
index 38dd052f5f..dd212c0d88 100644
--- a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi
+++ b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi
@@ -106,9 +106,9 @@
 			#address-cells = <1>;
 			#size-cells = <1>;
 
-			ubi at 8c0000 {
+			ubi at ac0000 {
 				label = "ubi";
-				reg = <0x0 0x7700000>;
+				reg = <0x0 0x7500000>;
 			};
 		};
 	};
@@ -167,12 +167,12 @@
 
 		kernel at 6c0000 {
 			label = "kernel";
-			reg = <0x6c0000 0x200000>;
+			reg = <0x6c0000 0x400000>;
 		};
 
-		ubipart0: partition at 8c0000 {
+		ubipart0: partition at ac0000 {
 			label = "ubipart0";
-			reg = <0x8c0000 0x1700000>;
+			reg = <0xac0000 0x1500000>;
 		};
 
 		partition at 6c0000 {
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index c6a1441ed9..5f893e0044 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -111,7 +111,7 @@ TARGET_DEVICES += glinet_gl-ar750s-nor
 define Device/netgear_ath79_nand
   DEVICE_VENDOR := NETGEAR
   DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
-  KERNEL_SIZE := 2048k
+  KERNEL_SIZE := 4096k
   BLOCKSIZE := 128k
   PAGESIZE := 2048
   IMAGE_SIZE := 25600k
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Sun Dec 22 15:54:33 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Sun, 22 Dec 2019 21:54:33 +0100
Subject: [OpenWrt-Devel] [PATCH v2 3/4] ath79: add support for Netgear
 WNDR4300 v2
In-Reply-To: <20191222215052.6901e39f@kosmio.komorska>
References: <20191222215052.6901e39f@kosmio.komorska>
Message-ID: <20191222215433.46177e8a@kosmio.komorska>

This patch introduces support for Netgear WNDR4300v2.

Specification
=============
  * Description: Netgear WNDR4300 v2
  * Loader: U-boot
  * SOC: Qualcomm Atheros QCA9563 (775 MHz)
  * RAM: 128 MiB
  * Flash: 2 MiB SPI-NOR + 128 MiB SPI-NAND
	- NOR: U-boot binary: 256 KiB
	- NOR: U-boot environment: 64 KiB
	- NOR: ART Backup: 64 KiB
 	- NOR: Config: 64 KiB
	- NOR: Traffic Meter: 64 KiB
	- NOR: POT: 64 KiB
	- NOR: Reserved: 1408 KiB
	- NOR: ART: 64 KiB
	- NAND: Firmware: 25600 KiB (see notes for OpenWrt)
	- NAND: Language: 2048 KiB
	- NAND: mtdoops Crash Dump: 128 KiB
	- NAND: Reserved: 103296 KiB
  * Ethernet: 5 x 10/100/1000 (4 x LAN, 1 x WAN) (AR8337)
  * Wireless:
	- 2.4 GHz b/g/n (internal)
	- 5 GHz a/n (AR9580)
  * USB: yes, 1 x USB 2.0
  * Buttons:
	- Reset
	- WiFi (rfkill)
	- WPS
  * LEDs:
	- Power (amber/green)
	- WAN (amber/green)
	- WLAN 2G (green)
	- WLAN 5G (blue)
	- 4 x LAN (amber/green)
	- USB (green)
	- WPS (green)
  * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1
  * Power supply: DC 12V 1.5A
  * MAC addresses: LAN=WLAN2G on case label, WAN +1, WLAN5G +2

Important Notes
===============
0. NOR Flash (2 MiB) is not touched by OpenWrt installation.
1. NAND Flash (128 MiB) layout under OpenWrt is changed as follows:
   all space is split between 4 MiB kernel and 124 MiB UBI areas;
   vendor partitions (language and mtdoops) are removed; kernel space
   size can be further expanded if needed; maximum image size is set
   to 25600k for compatibility reasons and can also be increased.
2. CPU clock is 775 MHz, not 750 MHz.
3. 5 GHz wireless radio chip is Atheros AR9580-AR1A with bogus PCI
   device ID 0xabcd. For ath9k driver to load successfully, this is
   overriden in DTS with correct value for this chip, 0x0033.
4. RFKILL button is wired to AR9580 pin 9 which is normally disabled
   by chip definition in ath9k code (0x0000F4FF gpio mask). Therefore
   'qca,gpio-mask=<0xf6ff>' hack must be used for button to work
   properly.
5. USB port is always on, no GPIO for 5V power control has been
   identified.

Installation
============
  * TFTP recovery
  * TFTP via U-boot prompt
  * sysupgrade
  * Web interface

Test build configuration
========================
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_nand=y
CONFIG_TARGET_ath79_nand_DEVICE_netgear_wndr4300-v2=y
CONFIG_ALL_KMODS=y
CONFIG_DEVEL=y
CONFIG_CCACHE=y
CONFIG_COLLECT_KERNEL_DEBUG=y
CONFIG_IMAGEOPT=y

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
---
 package/boot/uboot-envtools/files/ath79       |   1 +
 .../linux/ath79/dts/qca9563_netgear_wndr.dtsi | 256 ++++++++++++++++++
 .../ath79/dts/qca9563_netgear_wndr4300-v2.dts |  19 ++
 target/linux/ath79/image/nand.mk              |  11 +
 .../ath79/nand/base-files/etc/board.d/01_leds |   3 +-
 .../nand/base-files/etc/board.d/02_network    |   6 +-
 .../etc/hotplug.d/firmware/10-ath9k-eeprom    |   6 +-
 7 files changed, 297 insertions(+), 5 deletions(-)
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index f956cf4ed4..85a0342a60 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -26,6 +26,7 @@ glinet,gl-ar750s-nor-nand|\
 librerouter,librerouter-v1|\
 netgear,ex6400|\
 netgear,ex7300|\
+netgear,wndr4300-v2|\
 netgear,wnr1000-v2|\
 netgear,wnr2000-v3|\
 netgear,wnr2200-8m|\
diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
new file mode 100644
index 0000000000..2ab9b0b34a
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
@@ -0,0 +1,256 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "qca956x.dtsi"
+
+/ {
+	chosen {
+		bootargs = "console=ttyS0,115200n8";
+	};
+
+	aliases {
+		led-boot = &led_power_amber;
+		led-failsafe = &led_power_amber;
+		led-running = &led_power_green;
+		led-upgrade = &led_power_amber;
+		label-mac-device = &eth0;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	ath9k-keys {
+		compatible = "gpio-keys-polled";
+		poll-interval = <20>;
+
+		rfkill {
+			label = "rfkill";
+			linux,code = <KEY_RFKILL>;
+			gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds: leds {
+		compatible = "gpio-leds";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&jtag_disable_pins>;
+
+		led_power_green: power_green {
+			label = "netgear:green:power";
+			gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+		};
+
+		led_power_amber: power_amber {
+			label = "netgear:amber:power";
+			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+			default-state = "keep";
+		};
+
+		wan_green {
+			label = "netgear:green:wan";
+			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+		};
+
+		wan_amber {
+			label = "netgear:amber:wan";
+			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+		};
+
+		wlan2g_green {
+			label = "netgear:green:wlan2g";
+			gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		wps_green {
+			label = "netgear:green:wps";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	ath9k-leds {
+		compatible = "gpio-leds";
+
+		wlan5g_blue {
+			label = "netgear:blue:wlan5g";
+			gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
+		};
+	};
+};
+
+&spi {
+	status = "okay";
+
+	num-cs = <2>;
+	cs-gpios = <0>, <0>;
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x40000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "u-boot-env";
+				reg = <0x40000 0x10000>;
+			};
+
+			partition at 50000 {
+				label = "caldata_backup";
+				reg = <0x50000 0x10000>;
+				read-only;
+			};
+
+			partition at 60000 {
+				label = "config";
+				reg = <0x60000 0x10000>;
+			};
+
+			partition at 70000 {
+				label = "traffic_meter";
+				reg = <0x70000 0x10000>;
+			};
+
+			partition at 80000 {
+				label = "pot";
+				reg = <0x80000 0x10000>;
+			};
+
+			partition at 90000 {
+				label = "reserved";
+				reg = <0x90000 0x160000>;
+			};
+
+			art: partition at 1f0000 {
+				label = "caldata";
+				reg = <0x1f0000 0x10000>;
+				read-only;
+			};
+		};
+	};
+
+	flash at 1 {
+		compatible = "spi-nand";
+		reg = <1>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "kernel";
+				reg = <0x0 0x400000>;
+			};
+
+			partition at 400000 {
+				label = "ubi";
+				reg = <0x400000 0x7c00000>;
+			};
+		};
+	};
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy-mask = <0>;
+
+	phy0: ethernet-phy at 0 {
+		reg = <0>;
+		phy-mode = "sgmii";
+		qca,mib-poll-interval = <500>;
+
+		qca,ar8327-initvals = <
+			0x04 0x00000080	/* PORT0 PAD MODE CTRL */
+			0x10 0x81000080	/* POWER_ON_STRIP */
+			0x50 0xcc35cc35	/* LED_CTRL0 */
+			0x54 0xcb37cb37	/* LED_CTRL1 */
+			0x58 0x00000000	/* LED_CTRL2 */
+			0x5c 0x00f3cf00	/* LED_CTRL3 */
+			0x7c 0x0000007e	/* PORT0_STATUS */
+			0x94 0x00000200 /* PORT6_STATUS */
+			>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	pll-data = <0x03000101 0x00000101 0x00001919>;
+
+	mtd-mac-address = <&art 0x0>;
+
+	phy-mode = "sgmii";
+	phy-handle = <&phy0>;
+};
+
+&wmac {
+	status = "okay";
+
+	mtd-mac-address = <&art 0x0>;
+	qca,no-eeprom;
+};
+
+&pcie {
+	status = "okay";
+
+	ath9k: wifi at 0,0 {
+		/* chip is AR9580, override bogus PCI ID 168c:abcd */
+		compatible = "pci168c,0033";
+		reg = <0x0000 0 0 0 0>;
+		mtd-mac-address = <&art 0xc>;
+		qca,no-eeprom;
+		qca,gpio-mask=<0xf6ff>;	/* unmask pin 9 for RFKILL button */
+		#gpio-cells = <2>;
+		gpio-controller;
+	};
+};
+
+&usb_phy0 {
+	status = "okay";
+};
+
+&usb0 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	hub_port0: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+};
+
+&uart {
+	status = "okay";
+};
diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts b/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts
new file mode 100644
index 0000000000..e4b4ba2ac6
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr4300-v2.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include "qca9563_netgear_wndr.dtsi"
+
+/ {
+	compatible = "netgear,wndr4300-v2", "qca,qca9563";
+	model = "Netgear WNDR4300 v2";
+};
+
+&leds {
+	usb_green {
+		label = "netgear:green:usb";
+		gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+		trigger-sources = <&hub_port0>;
+		linux,default-trigger = "usbport";
+	};
+};
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index 5f893e0044..2094bd1d19 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -151,6 +151,17 @@ define Device/netgear_wndr4300
 endef
 TARGET_DEVICES += netgear_wndr4300
 
+define Device/netgear_wndr4300-v2
+  SOC := qca9563
+  DEVICE_MODEL := WNDR4300
+  DEVICE_VARIANT := v2
+  NETGEAR_KERNEL_MAGIC := 0x27051956
+  NETGEAR_BOARD_ID := WNDR4500series
+  NETGEAR_HW_ID := 29764821+2+128+128+3x3+3x3+5508012175
+  $(Device/netgear_ath79_nand)
+endef
+TARGET_DEVICES += netgear_wndr4300-v2
+
 define Device/zyxel_nbg6716
   SOC := qca9558
   DEVICE_VENDOR := ZyXEL
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
index 49d4005495..0376b7cfc6 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
@@ -13,7 +13,8 @@ glinet,gl-ar300m-nor)
 	ucidef_set_led_netdev "lan" "LAN" "gl-ar300m:green:lan" "eth0"
 	;;
 netgear,wndr3700-v4|\
-netgear,wndr4300)
+netgear,wndr4300|\
+netgear,wndr4300-v2)
 	ucidef_set_led_switch "wan-amber" "WAN (amber)" "netgear:amber:wan" "switch0" "0x20"
 	;;
 esac
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index f7e43addc1..135a06d44b 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -17,7 +17,8 @@ ath79_setup_interfaces()
 			"0 at eth0" "2:lan:2" "3:lan:1" "1:wan"
 		;;
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
 		;;
@@ -37,7 +38,8 @@ ath79_setup_macs()
 
 	case "$board" in
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		wan_mac=$(mtd_get_mac_binary caldata 0x6)
 		;;
 	zyxel,nbg6716)
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 25bafe67ac..7ee291d109 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -10,7 +10,8 @@ case "$FIRMWARE" in
 "ath9k-eeprom-ahb-18100000.wmac.bin")
 	case $board in
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		caldata_extract "caldata" 0x1000 0x440
 		;;
 	zyxel,nbg6716)
@@ -25,7 +26,8 @@ case "$FIRMWARE" in
 "ath9k-eeprom-pci-0000:00:00.0.bin")
 	case $board in
 	netgear,wndr3700-v4|\
-	netgear,wndr4300)
+	netgear,wndr4300|\
+	netgear,wndr4300-v2)
 		caldata_extract "caldata" 0x5000 0x440
 		;;
 	*)
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From michal.cieslakiewicz at wp.pl  Sun Dec 22 15:55:54 2019
From: michal.cieslakiewicz at wp.pl (Michal Cieslakiewicz)
Date: Sun, 22 Dec 2019 21:55:54 +0100
Subject: [OpenWrt-Devel] [PATCH v2 4/4] ath79: add support for Netgear
 WNDR4500 v3
In-Reply-To: <20191222215052.6901e39f@kosmio.komorska>
References: <20191222215052.6901e39f@kosmio.komorska>
Message-ID: <20191222215554.57c68fbc@kosmio.komorska>

This patch introduces support for Netgear WNDR4500v3. Router
is very similar to WNDR4300v2 and is based on the same PCB.

Information gathered from various Internet sources (including
https://patchwork.ozlabs.org/patch/809227/) shows following
differences to WNDR4300v2:

 * two USB 2.0 ports with separate LEDs
 * USB LEDs soldered to secondary pads
 * WPS and RFKILL buttons soldered to secondary pads
 * described as N900 device with 3x3:3 MIMO for 2.4GHz radio
 * power supply requirement is DC 12V 2.5A
 * vendor HW ID suffix differs in one digit
 * bigger chassis

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
---
 package/boot/uboot-envtools/files/ath79       |  1 +
 .../ath79/dts/qca9563_netgear_wndr4500-v3.dts | 41 +++++++++++++++++++
 target/linux/ath79/image/nand.mk              | 11 +++++
 .../ath79/nand/base-files/etc/board.d/01_leds |  3 +-
 .../nand/base-files/etc/board.d/02_network    |  6 ++-
 .../etc/hotplug.d/firmware/10-ath9k-eeprom    |  6 ++-
 6 files changed, 63 insertions(+), 5 deletions(-)
 create mode 100644 target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index 85a0342a60..aafced98db 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -27,6 +27,7 @@ librerouter,librerouter-v1|\
 netgear,ex6400|\
 netgear,ex7300|\
 netgear,wndr4300-v2|\
+netgear,wndr4500-v3|\
 netgear,wnr1000-v2|\
 netgear,wnr2000-v3|\
 netgear,wnr2200-8m|\
diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts b/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts
new file mode 100644
index 0000000000..95e30ea84b
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr4500-v3.dts
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include "qca9563_netgear_wndr.dtsi"
+
+/ {
+	compatible = "netgear,wndr4500-v3", "qca,qca9563";
+	model = "Netgear WNDR4500 v3";
+};
+
+&leds {
+	usb1_green {
+		label = "netgear:green:usb1";
+		gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+		trigger-sources = <&hub_port0>;
+		linux,default-trigger = "usbport";
+	};
+
+	usb2_green {
+		label = "netgear:green:usb2";
+		gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+		trigger-sources = <&hub_port1>;
+		linux,default-trigger = "usbport";
+	};
+};
+
+&usb_phy1 {
+	status = "okay";
+};
+
+&usb1 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	hub_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+};
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index 2094bd1d19..6e86843859 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -162,6 +162,17 @@ define Device/netgear_wndr4300-v2
 endef
 TARGET_DEVICES += netgear_wndr4300-v2
 
+define Device/netgear_wndr4500-v3
+  SOC := qca9563
+  DEVICE_MODEL := WNDR4500
+  DEVICE_VARIANT := v3
+  NETGEAR_KERNEL_MAGIC := 0x27051956
+  NETGEAR_BOARD_ID := WNDR4500series
+  NETGEAR_HW_ID := 29764821+2+128+128+3x3+3x3+5508012173
+  $(Device/netgear_ath79_nand)
+endef
+TARGET_DEVICES += netgear_wndr4500-v3
+
 define Device/zyxel_nbg6716
   SOC := qca9558
   DEVICE_VENDOR := ZyXEL
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
index 0376b7cfc6..d9989ec538 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
@@ -14,7 +14,8 @@ glinet,gl-ar300m-nor)
 	;;
 netgear,wndr3700-v4|\
 netgear,wndr4300|\
-netgear,wndr4300-v2)
+netgear,wndr4300-v2|\
+netgear,wndr4500-v3)
 	ucidef_set_led_switch "wan-amber" "WAN (amber)" "netgear:amber:wan" "switch0" "0x20"
 	;;
 esac
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index 135a06d44b..bd02a4b383 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -18,7 +18,8 @@ ath79_setup_interfaces()
 		;;
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
 		;;
@@ -39,7 +40,8 @@ ath79_setup_macs()
 	case "$board" in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		wan_mac=$(mtd_get_mac_binary caldata 0x6)
 		;;
 	zyxel,nbg6716)
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 7ee291d109..d2f8bae1ca 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -11,7 +11,8 @@ case "$FIRMWARE" in
 	case $board in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		caldata_extract "caldata" 0x1000 0x440
 		;;
 	zyxel,nbg6716)
@@ -27,7 +28,8 @@ case "$FIRMWARE" in
 	case $board in
 	netgear,wndr3700-v4|\
 	netgear,wndr4300|\
-	netgear,wndr4300-v2)
+	netgear,wndr4300-v2|\
+	netgear,wndr4500-v3)
 		caldata_extract "caldata" 0x5000 0x440
 		;;
 	*)
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 22 20:41:15 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 22 Dec 2019 17:41:15 -0800
Subject: [OpenWrt-Devel] [PATCH] libcxx: Depenency fixes
Message-ID: <20191223014115.475846-1-rosenp@gmail.com>

Don't build with uClibc-ng. It's totally unsupported as several functions
are missing.

Make the musl libc support conditional.

Fix hash with make check FIXUP=1. Apparently I based the Makefile off of
libedit and forgot to fix the hash.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 config/Config-build.in       | 1 +
 package/libs/libcxx/Makefile | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/config/Config-build.in b/config/Config-build.in
index bde5730e76..c0e4d869f8 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -199,6 +199,7 @@ menu "Global build settings"
 
 		config USE_LIBCXX
 			bool "libc++"
+			depends on !USE_UCLIBC
 
 		config USE_LIBSTDCXX
 			bool "libstdc++"
diff --git a/package/libs/libcxx/Makefile b/package/libs/libcxx/Makefile
index c1fa1d6b07..695b0398fe 100644
--- a/package/libs/libcxx/Makefile
+++ b/package/libs/libcxx/Makefile
@@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libcxx
 PKG_VERSION:=9.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.llvm.org/git/libcxx
 PKG_SOURCE_VERSION:=2076f539f410805ef88692b9c0ce0a0b882a7680
-PKG_MIRROR_HASH:=6dff036660d478bfaa14e407fc5de26d22da1087118c897b1a3ad2e90cb7bf39
+PKG_MIRROR_HASH:=d527880a18dec9109575c76717cf5288fb91c11381b9d261cae2e5bebcbdab2e
 
 PKG_MAINTAINER:=Rosen Penev <rosenp at gmail.com>
 PKG_LICENSE:=MIT
@@ -42,8 +42,8 @@ CMAKE_OPTIONS += \
 	-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
 	-DLIBCXX_INCLUDE_DOCS=OFF \
 	-DLIBCXX_INCLUDE_TESTS=OFF \
-	-DLIBCXX_HAS_MUSL_LIBC=ON \
-	-DLIBCXX_STANDALONE_BUILD=ON
+	-DLIBCXX_STANDALONE_BUILD=ON \
+	-DLIBCXX_HAS_MUSL_LIBC=$(if $(CONFIG_USE_MUSL),ON,OFF)
 
 TARGET_CXXFLAGS += -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -Wno-attributes -flto
 TARGET_LDFLAGS += -Wl,--as-needed
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From bjorn at mork.no  Mon Dec 23 04:17:11 2019
From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=)
Date: Mon, 23 Dec 2019 10:17:11 +0100
Subject: [OpenWrt-Devel] [PATCH v3] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <20191222182057.9805-1-fercerpav@gmail.com> (Paul Fertser's
 message of "Sun, 22 Dec 2019 21:20:57 +0300")
References: <20191215172522.26626-1-fercerpav@gmail.com>
 <20191222182057.9805-1-fercerpav@gmail.com>
Message-ID: <87fthb4d0o.fsf@miraculix.mork.no>

Paul Fertser <fercerpav at gmail.com> writes:

> --- /dev/null
> +++ b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
> @@ -0,0 +1,100 @@
> +--- a/ath10k-4.19/pci.c
> ++++ b/ath10k-4.19/pci.c
> +@@ -142,7 +142,11 @@ static struct ce_attr host_ce_config_wla
> + 		.flags = CE_ATTR_FLAGS,
> + 		.src_nentries = 0,
> + 		.src_sz_max = 2048,
> ++#ifndef CONFIG_ATH10K_SMALLBUFFERS
> + 		.dest_nentries = 512,
> ++#else
> ++		.dest_nentries = 128,
> ++#endif
> + 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
> + 	},
> + 

Why not replace the magic numbers with a macro?  Then you could get away
with *one* "if configx then this else that"?  And preferably put it in a
header file.

Or maybe these things even could be made runtime configurable?  Buffers
of this size really should be IMHO, as there is no way to make one size
fit all.  As demonstrated...


Bj?rn

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hauke at hauke-m.de  Mon Dec 23 14:45:55 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Mon, 23 Dec 2019 20:45:55 +0100
Subject: [OpenWrt-Devel] [PATCH v3] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <87fthb4d0o.fsf@miraculix.mork.no>
References: <20191215172522.26626-1-fercerpav@gmail.com>
 <20191222182057.9805-1-fercerpav@gmail.com>
 <87fthb4d0o.fsf@miraculix.mork.no>
Message-ID: <24753207-0799-99b3-2441-bf3410fea2f5@hauke-m.de>

On 12/23/19 10:17 AM, Bj?rn Mork wrote:
> Paul Fertser <fercerpav at gmail.com> writes:
> 
>> --- /dev/null
>> +++ b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
>> @@ -0,0 +1,100 @@
>> +--- a/ath10k-4.19/pci.c
>> ++++ b/ath10k-4.19/pci.c
>> +@@ -142,7 +142,11 @@ static struct ce_attr host_ce_config_wla
>> + 		.flags = CE_ATTR_FLAGS,
>> + 		.src_nentries = 0,
>> + 		.src_sz_max = 2048,
>> ++#ifndef CONFIG_ATH10K_SMALLBUFFERS
>> + 		.dest_nentries = 512,
>> ++#else
>> ++		.dest_nentries = 128,
>> ++#endif
>> + 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
>> + 	},
>> + 
> 
> Why not replace the magic numbers with a macro?  Then you could get away
> with *one* "if configx then this else that"?  And preferably put it in a
> header file.
> 
> Or maybe these things even could be made runtime configurable?  Buffers
> of this size really should be IMHO, as there is no way to make one size
> fit all.  As demonstrated...

Hi,

Runtime configuration would be nice, but as far as I know there is no
standard interface available.

Huake

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Mon Dec 23 14:57:02 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Mon, 23 Dec 2019 22:57:02 +0300
Subject: [OpenWrt-Devel] [PATCH v3] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <87fthb4d0o.fsf@miraculix.mork.no>
References: <20191215172522.26626-1-fercerpav@gmail.com>
 <20191222182057.9805-1-fercerpav@gmail.com>
 <87fthb4d0o.fsf@miraculix.mork.no>
Message-ID: <20191223195702.GE11377@home.paul.comp>

Hi Bj?rn,

On Mon, Dec 23, 2019 at 10:17:11AM +0100, Bj?rn Mork wrote:
> Paul Fertser <fercerpav at gmail.com> writes:
> > --- /dev/null
> > +++ b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
> > @@ -0,0 +1,100 @@
> > +--- a/ath10k-4.19/pci.c
> > ++++ b/ath10k-4.19/pci.c
> > +@@ -142,7 +142,11 @@ static struct ce_attr host_ce_config_wla
> > + 		.flags = CE_ATTR_FLAGS,
> > + 		.src_nentries = 0,
> > + 		.src_sz_max = 2048,
> > ++#ifndef CONFIG_ATH10K_SMALLBUFFERS
> > + 		.dest_nentries = 512,
> > ++#else
> > ++		.dest_nentries = 128,
> > ++#endif
> > + 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
> > + 	},
> > + 
> 
> Why not replace the magic numbers with a macro?  Then you could get away
> with *one* "if configx then this else that"?  And preferably put it in a
> header file.

There're different values for different buffers so there can't be a
single number to fit them all. And I do not see how adding 4 different
defines just for the sake of it would make sense there.

> Or maybe these things even could be made runtime configurable?  Buffers
> of this size really should be IMHO, as there is no way to make one size
> fit all.  As demonstrated...

This was already discussed, please see [0]. I think adding a kernel
module parameter would make sense for this but it's also much more
complicated than just adding two patches that were already used in
OpenWrt for many years. So far nobody volunteered to do that, and I
wanted to provide at least some semi-sane solution for the upcoming
release.

[0] https://patchwork.ozlabs.org/comment/2322701/
-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hauke at hauke-m.de  Mon Dec 23 19:16:48 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Tue, 24 Dec 2019 01:16:48 +0100
Subject: [OpenWrt-Devel] [PATCH v3] kernel: ath10k-ct: provide a build
 variant for small RAM devices
In-Reply-To: <20191223195702.GE11377@home.paul.comp>
References: <20191215172522.26626-1-fercerpav@gmail.com>
 <20191222182057.9805-1-fercerpav@gmail.com>
 <87fthb4d0o.fsf@miraculix.mork.no> <20191223195702.GE11377@home.paul.comp>
Message-ID: <4d6e1b57-d2f5-0f53-b118-4b999d4f15c8@hauke-m.de>

On 12/23/19 8:57 PM, Paul Fertser wrote:
> Hi Bj?rn,
> 
> On Mon, Dec 23, 2019 at 10:17:11AM +0100, Bj?rn Mork wrote:
>> Paul Fertser <fercerpav at gmail.com> writes:
>>> --- /dev/null
>>> +++ b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch
>>> @@ -0,0 +1,100 @@
>>> +--- a/ath10k-4.19/pci.c
>>> ++++ b/ath10k-4.19/pci.c
>>> +@@ -142,7 +142,11 @@ static struct ce_attr host_ce_config_wla
>>> + 		.flags = CE_ATTR_FLAGS,
>>> + 		.src_nentries = 0,
>>> + 		.src_sz_max = 2048,
>>> ++#ifndef CONFIG_ATH10K_SMALLBUFFERS
>>> + 		.dest_nentries = 512,
>>> ++#else
>>> ++		.dest_nentries = 128,
>>> ++#endif
>>> + 		.recv_cb = ath10k_pci_htt_htc_rx_cb,
>>> + 	},
>>> + 
>>
>> Why not replace the magic numbers with a macro?  Then you could get away
>> with *one* "if configx then this else that"?  And preferably put it in a
>> header file.
> 
> There're different values for different buffers so there can't be a
> single number to fit them all. And I do not see how adding 4 different
> defines just for the sake of it would make sense there.
> 
>> Or maybe these things even could be made runtime configurable?  Buffers
>> of this size really should be IMHO, as there is no way to make one size
>> fit all.  As demonstrated...
> 
> This was already discussed, please see [0]. I think adding a kernel
> module parameter would make sense for this but it's also much more
> complicated than just adding two patches that were already used in
> OpenWrt for many years. So far nobody volunteered to do that, and I
> wanted to provide at least some semi-sane solution for the upcoming
> release.
> 
> [0] https://patchwork.ozlabs.org/comment/2322701/
> 
Hi Paul,

Thank you for your patches, I applied both patches to master with some
small fixes and backported the first patch for 19.07 branch. The patch
adding the dependencies to the ath79 target is not applying on 19.07, it
would be nice if you could provide a version on top of 19.07 too.

Hauke

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Tue Dec 24 07:04:26 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Tue, 24 Dec 2019 15:04:26 +0300
Subject: [OpenWrt-Devel] [PATCH for-19.07] ath79: use ath10k-ct-smallbuffers
 for 64 MiB devices
In-Reply-To: <4d6e1b57-d2f5-0f53-b118-4b999d4f15c8@hauke-m.de>
References: <4d6e1b57-d2f5-0f53-b118-4b999d4f15c8@hauke-m.de>
Message-ID: <20191224120426.13595-1-fercerpav@gmail.com>

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
 target/linux/ath79/image/generic-tp-link.mk | 14 +++++++-------
 target/linux/ath79/image/generic-ubnt.mk    |  8 ++++----
 target/linux/ath79/image/generic.mk         |  6 +++---
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index 468117aad4..304304799d 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -17,7 +17,7 @@ define Device/tplink_archer-c2-v3
   ATH_SOC := qca9563
   IMAGE_SIZE := 7808k
   DEVICE_TITLE := TP-Link Archer C2 v3
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
   TPLINK_BOARD_ID := ARCHER-C2-V3
 endef
 TARGET_DEVICES += tplink_archer-c2-v3
@@ -28,7 +28,7 @@ define Device/tplink_archer-c25-v1
   IMAGE_SIZE := 7808k
   DEVICE_TITLE := TP-Link Archer C25 v1
   TPLINK_BOARD_ID := ARCHER-C25-V1
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct
   SUPPORTED_DEVICES += archer-c25-v1
 endef
 TARGET_DEVICES += tplink_archer-c25-v1
@@ -39,7 +39,7 @@ define Device/tplink_archer-c58-v1
   IMAGE_SIZE := 7936k
   DEVICE_TITLE := TP-Link Archer C58 v1
   TPLINK_BOARD_ID := ARCHER-C58-V1
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
   SUPPORTED_DEVICES += archer-c58-v1
 endef
 TARGET_DEVICES += tplink_archer-c58-v1
@@ -61,7 +61,7 @@ define Device/tplink_archer-c60-v1
   IMAGE_SIZE := 7936k
   DEVICE_TITLE := TP-Link Archer C60 v1
   TPLINK_BOARD_ID := ARCHER-C60-V1
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
   SUPPORTED_DEVICES += archer-c60-v1
 endef
 TARGET_DEVICES += tplink_archer-c60-v1
@@ -72,7 +72,7 @@ define Device/tplink_archer-c60-v2
   IMAGE_SIZE := 7808k
   DEVICE_TITLE := TP-Link Archer C60 v2
   TPLINK_BOARD_ID := ARCHER-C60-V2
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
   SUPPORTED_DEVICES += archer-c60-v2
 endef
 TARGET_DEVICES += tplink_archer-c60-v2
@@ -171,7 +171,7 @@ TARGET_DEVICES += tplink_cpe210-v3
 define Device/tplink_archer-d50-v1
   ATH_SOC := qca9531
   DEVICE_TITLE := TP-Link Archer D50 v1
-  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
   BOARDNAME := ARCHER-D50-V1
   IMAGE_SIZE := 7808k
   TPLINK_HWID := 0xC1200001
@@ -206,7 +206,7 @@ define Device/tplink_re450-v2
   ATH_SOC := qca9563
   IMAGE_SIZE := 6016k
   DEVICE_TITLE := TP-Link RE450 v2
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
   TPLINK_HWID := 0x0
   TPLINK_HWREV := 0
   TPLINK_BOARD_ID := RE450-V2
diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk
index 6601986e08..8bc4523f46 100644
--- a/target/linux/ath79/image/generic-ubnt.mk
+++ b/target/linux/ath79/image/generic-ubnt.mk
@@ -128,7 +128,7 @@ TARGET_DEVICES += ubnt_nanostation-m-xw
 define Device/ubnt_lap-120
   $(Device/ubnt-wa)
   DEVICE_TITLE := Ubiquiti LiteAP ac (LAP-120)
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
   IMAGE_SIZE := 15744k
   IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
 endef
@@ -137,7 +137,7 @@ TARGET_DEVICES += ubnt_lap-120
 define Device/ubnt_nanobeam-ac
   $(Device/ubnt-wa)
   DEVICE_TITLE := Ubiquiti NanoBeam AC
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct rssileds
+  DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
   IMAGE_SIZE := 15744k
   IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
 endef
@@ -146,7 +146,7 @@ TARGET_DEVICES += ubnt_nanobeam-ac
 define Device/ubnt_nanostation-ac
   $(Device/ubnt-wa)
   DEVICE_TITLE := Ubiquiti Nanostation AC
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct rssileds
+  DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
   IMAGE_SIZE := 15744k
   IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
 endef
@@ -155,7 +155,7 @@ TARGET_DEVICES += ubnt_nanostation-ac
 define Device/ubnt_nanostation-ac-loco
   $(Device/ubnt-wa)
   DEVICE_TITLE := Ubiquiti Nanostation AC loco
-  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
   IMAGE_SIZE := 15744k
   IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
 endef
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 29a67de816..430740e5d6 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -295,7 +295,7 @@ define Device/dlink_dir-859-a1
   ATH_SOC := qca9563
   DEVICE_TITLE := D-LINK DIR-859 A1
   IMAGE_SIZE := 15872k
-  DEVICE_PACKAGES :=  kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES :=  kmod-usb-core kmod-usb2 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
   SEAMA_SIGNATURE := wrgac37_dlink.2013gui_dir859
   SUPPORTED_DEVICES += dir-859-a1
 endef
@@ -519,7 +519,7 @@ define Device/nec_wg800hp
     append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
     xor-image -p 6A57190601121E4C004C1E1201061957 -x | \
     nec-fw LASER_ATERM
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct-htt
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct-htt
 endef
 TARGET_DEVICES += nec_wg800hp
 
@@ -662,7 +662,7 @@ define Device/phicomm_k2t
   DEVICE_TITLE := Phicomm K2T
   IMAGE_SIZE := 15744k
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
-  DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct ath10k-firmware-qca9888-ct
+  DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
 endef
 TARGET_DEVICES += phicomm_k2t
 
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From pedro at cas.cat  Tue Dec 24 09:03:10 2019
From: pedro at cas.cat (Pedro)
Date: Tue, 24 Dec 2019 15:03:10 +0100
Subject: [OpenWrt-Devel] petition: start an slightly frozen branch based on
 snapshot (future 20.x ? release)
Message-ID: <0f9883f5-598b-1a08-f4d9-d6dc9fc1ffaa@cas.cat>

Dear List,

Most of the new devices that are coming, or that are useful for us as
community networks are in the snapshot release [1] [2] [3]. I feel the
new 19.07 is not benefiting this new devices that will remain
unsupported by a stable branch (most of them, based on ath10k / 802.11ac).

We are between: (1) buying legacy devices (ath9k and 802.11n), for
example right now classic nanostation XW m5 is locked right now [4]),
(2) second hand devices or (3) buying new devices using ath10k and
802.11ac (using the wiki procedure still you can unlock them and install
openwrt)

Our use case requires stable releases because in a community network we
remotely upgrade firmwares. Based on previous experiences (releases 17,
18) it worked perfectly. I don't feel good introducing the usage of
snapshot for building our firmwares (image builder and so on). In that
circumstances, I think we prefer known bugs that new bugs approaching.

I thought of having my custom patches on top of 19.07 branch. Maybe
someone is already doing it. I'm sure more people have this need.

I don't feel confortable leading that proposed frozen branch that could
help as a pre-work/alpha for future 20.x openwrt release.

Anyone in the same situation?

But maybe is too much effort and we should continue focusing on the plan
right now (get 19.07 release done)

Cheers,
Pedro

[1] https://openwrt.org/toh/ubiquiti/ubiquiti_nanostation_ac_loco
[2] https://openwrt.org/toh/hwdata/ubiquiti/ubiquiti_liteap_ac_lap-120
[3] v2 and v3 https://openwrt.org/toh/tp-link/cpe510
[4]
https://forum.openwrt.org/t/hw-of-ubiquiti-nanostation-m5-has-changed/39225
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x9D64597C3A982DCA.asc
Type: application/pgp-keys
Size: 945 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191224/cd77a32b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191224/cd77a32b/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hauke at hauke-m.de  Tue Dec 24 10:48:10 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Tue, 24 Dec 2019 16:48:10 +0100
Subject: [OpenWrt-Devel] OpenWrt 19.07 final timeline
Message-ID: <a42e0ef1-b2b8-4f77-624d-2a8831fe073d@hauke-m.de>

Hi,

I would like to tag 18.06.6 release in the evening of Wednesday 1.
January and then start the builders.

I would like to tag 19.07 final release on Friday 3. January and the
start the builders on Saturday or Sunday.

Are there any objections to these dates?

Both releases should fix all known security problems, this is release
gating, but I think everything is fixed now.


We now have the ath10k-ct small buffers version in master and 19.07, for
the 19.07 branch it has to be selected, but Paul Fertser already
proposed a patch.

Here some people are complaining about bad 5GHz performance:
https://bugs.openwrt.org/index.php?do=details&task_id=2682
https://forum.openwrt.org/t/openwrt-19-07-0-second-release-candidate/49593/41
This should be related to the hostapd update from 2.7 to 2.9.
Does someone have time to debug this? It would be interesting which
commit exactly causes this, we also have hostapd 2.8 in between.

Hauke

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191224/c9ac9284/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Tue Dec 24 11:48:20 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Tue, 24 Dec 2019 19:48:20 +0300
Subject: [OpenWrt-Devel] [PATCH] ath79: tp-link: use ath10k-ct-smallbuffers
 for 64 MiB devices
In-Reply-To: <4d6e1b57-d2f5-0f53-b118-4b999d4f15c8@hauke-m.de>
References: <4d6e1b57-d2f5-0f53-b118-4b999d4f15c8@hauke-m.de>
Message-ID: <20191224164820.14245-1-fercerpav@gmail.com>

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
 target/linux/ath79/image/generic-tp-link.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index 8a030492c5..f4e16e6e43 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -195,8 +195,8 @@ define Device/tplink_archer-d50-v1
   DEVICE_VENDOR := TP-Link
   DEVICE_MODEL := Archer D50
   DEVICE_VARIANT := v1
-  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct \
-	ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport \
+	kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
   BOARDNAME := ARCHER-D50-V1
   IMAGE_SIZE := 7808k
   TPLINK_HWID := 0xC1200001
@@ -366,7 +366,7 @@ define Device/tplink_re450-v2
   IMAGE_SIZE := 6016k
   DEVICE_MODEL := RE450
   DEVICE_VARIANT := v2
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
   TPLINK_HWID := 0x0
   TPLINK_HWREV := 0
   TPLINK_BOARD_ID := RE450-V2
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Tue Dec 24 12:49:10 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Tue, 24 Dec 2019 20:49:10 +0300
Subject: [OpenWrt-Devel] [PATCH] ipq40xx: use ath10k-ct-smallbuffers for 128
 MiB devices
In-Reply-To: <4d6e1b57-d2f5-0f53-b118-4b999d4f15c8@hauke-m.de>
References: <4d6e1b57-d2f5-0f53-b118-4b999d4f15c8@hauke-m.de>
Message-ID: <20191224174910.14422-1-fercerpav@gmail.com>

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
 target/linux/ipq40xx/image/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
index fada35a49d..1fe563c7a5 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -128,7 +128,8 @@ define Device/asus_rt-ac58u
 #	string and call it a day.... Yeah, we do the latter!
 	UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC58U')
 	IMAGES := sysupgrade.bin
-	DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
+	DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
+		kmod-usb-ledtrig-usbport
 endef
 TARGET_DEVICES += asus_rt-ac58u
 
@@ -494,6 +495,7 @@ define Device/zyxel_wre6606
 	DEVICE_DTS := qcom-ipq4018-wre6606
 	IMAGES := sysupgrade.bin
 	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
+	DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
 endef
 TARGET_DEVICES += zyxel_wre6606
 
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From raj.khem at gmail.com  Tue Dec 24 13:02:13 2019
From: raj.khem at gmail.com (Khem Raj)
Date: Tue, 24 Dec 2019 10:02:13 -0800
Subject: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy
Message-ID: <20191224180213.3542623-1-raj.khem@gmail.com>

Fixes
error: '__builtin_strcpy' offset 6 from the object at 'attr' is out of the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 blobmsg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/blobmsg.c b/blobmsg.c
index a860483..63fada8 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -195,7 +195,8 @@ blobmsg_new(struct blob_buf *buf, int type, const char *name, int payload_len, v
 	attr->id_len |= be32_to_cpu(BLOB_ATTR_EXTENDED);
 	hdr = blob_data(attr);
 	hdr->namelen = cpu_to_be16(namelen);
-	strcpy((char *) hdr->name, (const char *)name);
+	hdr->name[strlen((char*)hdr->name)] = '\0';
+	strncpy((char *) hdr->name, (const char *)name, strlen((char*)hdr->name));
 	pad_end = *data = blobmsg_data(attr);
 	pad_start = (char *) &hdr->name[namelen];
 	if (pad_start < pad_end)
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Tue Dec 24 13:10:13 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Tue, 24 Dec 2019 21:10:13 +0300
Subject: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy
In-Reply-To: <20191224180213.3542623-1-raj.khem@gmail.com>
References: <20191224180213.3542623-1-raj.khem@gmail.com>
Message-ID: <20191224181013.GH11377@home.paul.comp>

Hi,

On Tue, Dec 24, 2019 at 10:02:13AM -0800, Khem Raj wrote:
> +	hdr->name[strlen((char*)hdr->name)] = '\0';
> +	strncpy((char *) hdr->name, (const char *)name, strlen((char*)hdr->name));

strlen((char*)hdr->name) doesn't seem to be meaningful in this
context, are you sure you were not meaning to do something like this instead?

+	strncpy((char *) hdr->name, (const char *)name, sizeof(hdr->name));
+	hdr->name[sizeof(hdr->name) - 1] = '\0';

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From pozega.tomislav at gmail.com  Tue Dec 24 14:50:03 2019
From: pozega.tomislav at gmail.com (Tom Psyborg)
Date: Tue, 24 Dec 2019 20:50:03 +0100
Subject: [OpenWrt-Devel] OpenWrt 19.07 final timeline
In-Reply-To: <a42e0ef1-b2b8-4f77-624d-2a8831fe073d@hauke-m.de>
References: <a42e0ef1-b2b8-4f77-624d-2a8831fe073d@hauke-m.de>
Message-ID: <CAKR_QVJ3bFbFpCy4vDx7g2R_8qjBJUva2EHo6AK8TvRuhVcuYQ@mail.gmail.com>

Hi

And what about this one?
https://bugs.openwrt.org/index.php?do=details&task_id=2593

Some regulatorty bugs?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From raj.khem at gmail.com  Tue Dec 24 15:14:11 2019
From: raj.khem at gmail.com (Khem Raj)
Date: Tue, 24 Dec 2019 12:14:11 -0800
Subject: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy
In-Reply-To: <20191224181013.GH11377@home.paul.comp>
References: <20191224180213.3542623-1-raj.khem@gmail.com>
 <20191224181013.GH11377@home.paul.comp>
Message-ID: <CAMKF1sro7v8Oj9am7f50h0huhL95LoGrkSU2brg9E-0WkXZJcg@mail.gmail.com>

On Tue, Dec 24, 2019 at 10:10 AM Paul Fertser <fercerpav at gmail.com> wrote:

> Hi,
>
> On Tue, Dec 24, 2019 at 10:02:13AM -0800, Khem Raj wrote:
> > +     hdr->name[strlen((char*)hdr->name)] = '\0';
> > +     strncpy((char *) hdr->name, (const char *)name,
> strlen((char*)hdr->name));
>
> strlen((char*)hdr->name) doesn't seem to be meaningful in this
> context, are you sure you were not meaning to do something like this
> instead?
>
> +       strncpy((char *) hdr->name, (const char *)name, sizeof(hdr->name));
> +       hdr->name[sizeof(hdr->name) - 1] = '\0';


Yes that is better I will send a v2 after tests

>
>
> --
> Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
> mailto:fercerpav at gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191224/2c86a00d/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From lech.perczak at gmail.com  Tue Dec 24 15:27:21 2019
From: lech.perczak at gmail.com (Lech Perczak)
Date: Tue, 24 Dec 2019 21:27:21 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: tp-link: use
 ath10k-ct-smallbuffers for 64 MiB devices
In-Reply-To: <20191224194709.GI11377@home.paul.comp>
References: <4d6e1b57-d2f5-0f53-b118-4b999d4f15c8@hauke-m.de>
 <20191224164820.14245-1-fercerpav@gmail.com>
 <82947a82-d7d0-7dc7-95ea-f3e623091d54@gmail.com>
 <20191224194709.GI11377@home.paul.comp>
Message-ID: <bb008c3d-eab0-2ca5-6a42-23c854e2c431@gmail.com>

Hi,
Answers inline.

W dniu 2019-12-24 o?20:47, Paul Fertser pisze:
> Hi Lech,
>
> Any reason you omit the list from Cc? This way nobody but me is going
> to comment on your message and I'm obviously biased :)
Just forgot to use "reply to all".
>
> On Tue, Dec 24, 2019 at 08:26:09PM +0100, Lech Perczak wrote:
>> I think that TL-WR902AC v1 should be included as well, as it is 64M device
>> and I also experienced issues with ath10k-ct on it while porting.
> Device like that requires the tweak, no doubt. But I'm not feeling
> like going through the whole ar71xx target since it's deprecated
> anyway and whoever cares should port the needed boards to ath79 AFAIK.
>
> So if one stays on ar71xx for the upcoming release the workaround
> would be to manually run
>
> opkg remove kmod-ath10k-ct && opkg install kmod-ath10k-ct-smallbuffers
>
> That said, I have no idea if patches to ar71xx are accepted or not.
>
This device was just ported to ath79 recently.
I think grepping by device trees could be used to determine devices 
which need the changes.

--
With kind regards,
Lech


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Tue Dec 24 15:47:31 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Tue, 24 Dec 2019 23:47:31 +0300
Subject: [OpenWrt-Devel] [PATCH] ath79: tp-link: use
 ath10k-ct-smallbuffers for 64 MiB devices
In-Reply-To: <bb008c3d-eab0-2ca5-6a42-23c854e2c431@gmail.com>
References: <4d6e1b57-d2f5-0f53-b118-4b999d4f15c8@hauke-m.de>
 <20191224164820.14245-1-fercerpav@gmail.com>
 <82947a82-d7d0-7dc7-95ea-f3e623091d54@gmail.com>
 <20191224194709.GI11377@home.paul.comp>
 <bb008c3d-eab0-2ca5-6a42-23c854e2c431@gmail.com>
Message-ID: <20191224204731.GJ11377@home.paul.comp>

On Tue, Dec 24, 2019 at 09:27:21PM +0100, Lech Perczak wrote:
> > On Tue, Dec 24, 2019 at 08:26:09PM +0100, Lech Perczak wrote:
> > > I think that TL-WR902AC v1 should be included as well, as it is 64M device
> > > and I also experienced issues with ath10k-ct on it while porting.
> > Device like that requires the tweak, no doubt. But I'm not feeling
> > like going through the whole ar71xx target since it's deprecated
> > anyway and whoever cares should port the needed boards to ath79 AFAIK.
> > 
> This device was just ported to ath79 recently.

Indeed, it got right in-between. I'll send an amendment to this
tp-link patch, thanks for noticing!

> I think grepping by device trees could be used to determine devices which
> need the changes.

I have an impression that RAM amount is autodetected, so grepping
through DTSes can't help here. In any case, I think it's all covered
by now.

Thank you!
-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Tue Dec 24 16:02:24 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Wed, 25 Dec 2019 00:02:24 +0300
Subject: [OpenWrt-Devel] [PATCH v2] ath79: tp-link: use
 ath10k-ct-smallbuffers for 64 MiB devices
In-Reply-To: <bb008c3d-eab0-2ca5-6a42-23c854e2c431@gmail.com>
References: <bb008c3d-eab0-2ca5-6a42-23c854e2c431@gmail.com>
Message-ID: <20191224210224.15245-1-fercerpav@gmail.com>

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
 target/linux/ath79/image/generic-tp-link.mk | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index 8a030492c5..97c4bb9441 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -195,8 +195,8 @@ define Device/tplink_archer-d50-v1
   DEVICE_VENDOR := TP-Link
   DEVICE_MODEL := Archer D50
   DEVICE_VARIANT := v1
-  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct \
-	ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport \
+	kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
   BOARDNAME := ARCHER-D50-V1
   IMAGE_SIZE := 7808k
   TPLINK_HWID := 0xC1200001
@@ -366,7 +366,7 @@ define Device/tplink_re450-v2
   IMAGE_SIZE := 6016k
   DEVICE_MODEL := RE450
   DEVICE_VARIANT := v2
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
   TPLINK_HWID := 0x0
   TPLINK_HWREV := 0
   TPLINK_BOARD_ID := RE450-V2
@@ -576,8 +576,9 @@ define Device/tplink_tl-wr902ac-v1
   SOC := qca9531
   DEVICE_MODEL := TL-WR902AC
   DEVICE_VARIANT := v1
-  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct \
-	ath10k-firmware-qca9887-ct -swconfig -uboot-envtools
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport \
+	kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct \
+	-swconfig -uboot-envtools
   TPLINK_BOARD_ID := TL-WR902AC-V1
   IMAGE_SIZE := 7360k
   TPLINK_HWID := 0x0
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ynezz at true.cz  Tue Dec 24 16:50:51 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Tue, 24 Dec 2019 22:50:51 +0100
Subject: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy
In-Reply-To: <20191224180213.3542623-1-raj.khem@gmail.com>
References: <20191224180213.3542623-1-raj.khem@gmail.com>
Message-ID: <20191224215051.GF70645@meh.true.cz>

Khem Raj <raj.khem at gmail.com> [2019-12-24 10:02:13]:

Hi,

use "PATCH libubox" subject prefix, because there is no blobmsg.c file in the
main tree.

> Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is out of
> the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka
> 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]

out of curiosity, which target/compiler is that? I'm not able to reproduce
it on any of the pre-selected CI targets[1].

1. https://gitlab.com/ynezz/openwrt-libubox/pipelines/105374045/builds

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From raj.khem at gmail.com  Tue Dec 24 17:15:26 2019
From: raj.khem at gmail.com (Khem Raj)
Date: Tue, 24 Dec 2019 14:15:26 -0800
Subject: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy
In-Reply-To: <20191224215051.GF70645@meh.true.cz>
References: <20191224180213.3542623-1-raj.khem@gmail.com>
 <20191224215051.GF70645@meh.true.cz>
Message-ID: <CAMKF1sqyKBm0Yz=rtgL9JnPPRzyxfcemnuLpfV-SEQYqgTiFOA@mail.gmail.com>

On Tue, Dec 24, 2019 at 1:51 PM Petr ?tetiar <ynezz at true.cz> wrote:

> Khem Raj <raj.khem at gmail.com> [2019-12-24 10:02:13]:
>
> Hi,
>
> use "PATCH libubox" subject prefix, because there is no blobmsg.c file in
> the
> main tree.
>
> > Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is
> out of
> > the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka
> > 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]
>
> out of curiosity, which target/compiler is that? I'm not able to reproduce
> it on any of the pre-selected CI targets[1].


This is gcc trunk

>
>
> 1. https://gitlab.com/ynezz/openwrt-libubox/pipelines/105374045/builds
>
> -- ynezz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191224/9e3eae80/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Wed Dec 25 04:48:11 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Wed, 25 Dec 2019 10:48:11 +0100
Subject: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy
In-Reply-To: <CAMKF1sqyKBm0Yz=rtgL9JnPPRzyxfcemnuLpfV-SEQYqgTiFOA@mail.gmail.com>
References: <20191224180213.3542623-1-raj.khem@gmail.com>
 <20191224215051.GF70645@meh.true.cz>
 <CAMKF1sqyKBm0Yz=rtgL9JnPPRzyxfcemnuLpfV-SEQYqgTiFOA@mail.gmail.com>
Message-ID: <20191225094811.GH70645@meh.true.cz>

Khem Raj <raj.khem at gmail.com> [2019-12-24 14:15:26]:

> On Tue, Dec 24, 2019 at 1:51 PM Petr ?tetiar <ynezz at true.cz> wrote:
> 
> > Khem Raj <raj.khem at gmail.com> [2019-12-24 10:02:13]:
> >
> > Hi,
> >
> > use "PATCH libubox" subject prefix, because there is no blobmsg.c file in
> > the
> > main tree.
> >
> > > Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is
> > out of
> > > the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka
> > > 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]

What about following fix[1]? The target hdr->name buffer has already the
terminating 0 included as blobmsg_hdrlen has strlen+1 and blob_new() memsets
the buffer to 0.

1. https://gitlab.com/ynezz/openwrt-libubox/commit/3775b3aa28de8c20d96b6f02786a327423b0748a

From 3775b3aa28de8c20d96b6f02786a327423b0748a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz at true.cz>
Date: Wed, 25 Dec 2019 10:27:59 +0100
Subject: [PATCH] blobmsg: fix array out of bounds GCC 10 warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes following warning reported by GCC 10.0.0 20191203:

 blobmsg.c:234:2: error: 'strcpy' offset 6 from the object at 'attr' is out of
the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka
'unsigned char[0]'} at offset 6 [-Werror=array-bounds]
   234 |  strcpy((char *) hdr->name, (const char *)name);
       |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 In file included from blobmsg.c:16:
 blobmsg.h:42:10: note: subobject 'name' declared here
    42 |  uint8_t name[];
       |          ^~~~

Reported-by: Khem Raj <raj.khem at gmail.com>
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 blobmsg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blobmsg.c b/blobmsg.c
index 48dba8156d58..ef68d8ae59f7 100644
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -240,7 +240,7 @@ blobmsg_new(struct blob_buf *buf, int type, const char
*name, int payload_len, v
 	attr->id_len |= be32_to_cpu(BLOB_ATTR_EXTENDED);
 	hdr = blob_data(attr);
 	hdr->namelen = cpu_to_be16(namelen);
-	strcpy((char *) hdr->name, (const char *)name);
+	memcpy(hdr->name, name, namelen);
 	pad_end = *data = blobmsg_data(attr);
 	pad_start = (char *) &hdr->name[namelen];
 	if (pad_start < pad_end)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Wed Dec 25 06:17:01 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Wed, 25 Dec 2019 12:17:01 +0100
Subject: [OpenWrt-Devel] [PATCHv2 1/3] tools/pkg-config: Replace with
 pkgconf
In-Reply-To: <20191128191933.5421-1-rosenp@gmail.com>
References: <20191128191933.5421-1-rosenp@gmail.com>
Message-ID: <20191225111701.GI70645@meh.true.cz>

Rosen Penev <rosenp at gmail.com> [2019-11-28 11:19:31]:

> pkgconf is a newer, actively maintained implementation of pkg-config

I'm wondering if that `actively maintained` part still holds true.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From foss at volatilesystems.org  Wed Dec 25 09:38:51 2019
From: foss at volatilesystems.org (Stijn Segers)
Date: Wed, 25 Dec 2019 15:38:51 +0100
Subject: [OpenWrt-Devel] [PATCH] [19.07] ramips: rename DIR-860L entries
 according to the new manufacturer / device spec
Message-ID: <20191225143851.12368-1-foss@volatilesystems.org>

Most images follow the openwrt-target-subtarget-manufacturer-device
naming specification, but the D-Link DIR-860L rev B1 does not. This
patch brings it in line.

Master had this updated a while ago, it's okay there.

Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 target/linux/ramips/base-files/etc/board.d/01_leds            | 2 +-
 target/linux/ramips/base-files/etc/board.d/02_network         | 4 ++--
 .../linux/ramips/base-files/etc/uci-defaults/09_fix-checksum  | 2 +-
 target/linux/ramips/image/mt7621.mk                           | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index e5706dd5ef..31f7220eee 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -160,7 +160,7 @@ dlink,dwr-922-e2)
 	ucidef_set_led_netdev "signalstrength" "signalstrength" "$boardname:green:sigstrength" "wwan0" "link"
 	ucidef_set_led_netdev "4g" "4g" "$boardname:green:4g" "wwan0" "tx rx"
 	;;
-dir-860l-b1)
+dlink,dir-860l-b1)
 	ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "eth0.2"
 	;;
 dlink,dir-878-a1)
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 465ee33434..c46b26e790 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -272,7 +272,7 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"1:lan:3" "2:lan:4" "3:lan:1" "4:lan:2" "0:wan" "6 at eth0"
 		;;
-	dir-860l-b1|\
+	dlink,dir-860l-b1|\
 	elecom,wrc-1167ghbk2-s|\
 	elecom,wrc-2533gst|\
 	elecom,wrc-1900gst|\
@@ -555,7 +555,7 @@ ramips_setup_macs()
 	dch-m225)
 		lan_mac=$(mtd_get_mac_ascii factory lanmac)
 		;;
-	dir-860l-b1)
+	dlink,dir-860l-b1)
 		lan_mac=$(mtd_get_mac_ascii factory lanmac)
 		wan_mac=$(mtd_get_mac_ascii factory wanmac)
 		;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum
index 54deb5b2e0..40746c6af4 100644
--- a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum
+++ b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum
@@ -17,7 +17,7 @@ case "$board" in
 cy-swr1100 | \
 dch-m225 | \
 dir-645 | \
-dir-860l-b1)
+dlink,dir-860l-b1)
 	fix_checksum seama
 	;;
 dlink,dap-1522-a1)
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 2af4b21622..53d00d31bd 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -115,7 +115,7 @@ define Device/asus_rt-ac57u
 endef
 TARGET_DEVICES += asus_rt-ac57u
 
-define Device/dir-860l-b1
+define Device/dlink_dir-860l-b1
   $(Device/seama)
   DTS := DIR-860L-B1
   BLOCKSIZE := 64k
@@ -125,7 +125,7 @@ define Device/dir-860l-b1
   DEVICE_TITLE := D-Link DIR-860L B1
   DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
 endef
-TARGET_DEVICES += dir-860l-b1
+TARGET_DEVICES += dlink_dir-860l-b1
 
 define Device/dlink_dir-878-a1
   DTS := DIR-878-A1
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From raj.khem at gmail.com  Wed Dec 25 10:46:20 2019
From: raj.khem at gmail.com (Khem Raj)
Date: Wed, 25 Dec 2019 07:46:20 -0800
Subject: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy
In-Reply-To: <20191225094811.GH70645@meh.true.cz>
References: <20191224180213.3542623-1-raj.khem@gmail.com>
 <20191224215051.GF70645@meh.true.cz>
 <CAMKF1sqyKBm0Yz=rtgL9JnPPRzyxfcemnuLpfV-SEQYqgTiFOA@mail.gmail.com>
 <20191225094811.GH70645@meh.true.cz>
Message-ID: <CAMKF1srWXkQb7ciK+4TfDeuTh5vuJ3sQ7Ww59S6yXiawWkTfAg@mail.gmail.com>

On Wed, Dec 25, 2019 at 1:48 AM Petr ?tetiar <ynezz at true.cz> wrote:

> Khem Raj <raj.khem at gmail.com> [2019-12-24 14:15:26]:
>
> > On Tue, Dec 24, 2019 at 1:51 PM Petr ?tetiar <ynezz at true.cz> wrote:
> >
> > > Khem Raj <raj.khem at gmail.com> [2019-12-24 10:02:13]:
> > >
> > > Hi,
> > >
> > > use "PATCH libubox" subject prefix, because there is no blobmsg.c file
> in
> > > the
> > > main tree.
> > >
> > > > Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is
> > > out of
> > > > the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka
> > > > 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]
>
> What about following fix[1]? The target hdr->name buffer has already the
> terminating 0 included as blobmsg_hdrlen has strlen+1 and blob_new()
> memsets
> the buffer to 0.
>
> 1.
> https://gitlab.com/ynezz/openwrt-libubox/commit/3775b3aa28de8c20d96b6f02786a327423b0748a
>
> From 3775b3aa28de8c20d96b6f02786a327423b0748a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz at true.cz>
> Date: Wed, 25 Dec 2019 10:27:59 +0100
> Subject: [PATCH] blobmsg: fix array out of bounds GCC 10 warning
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Fixes following warning reported by GCC 10.0.0 20191203:
>
>  blobmsg.c:234:2: error: 'strcpy' offset 6 from the object at 'attr' is
> out of
> the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka
> 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]
>    234 |  strcpy((char *) hdr->name, (const char *)name);
>        |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>  In file included from blobmsg.c:16:
>  blobmsg.h:42:10: note: subobject 'name' declared here
>     42 |  uint8_t name[];
>        |          ^~~~
>
> Reported-by: Khem Raj <raj.khem at gmail.com>
> Signed-off-by: Petr ?tetiar <ynezz at true.cz>
> ---
>  blobmsg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/blobmsg.c b/blobmsg.c
> index 48dba8156d58..ef68d8ae59f7 100644
> --- a/blobmsg.c
> +++ b/blobmsg.c
> @@ -240,7 +240,7 @@ blobmsg_new(struct blob_buf *buf, int type, const char
> *name, int payload_len, v
>         attr->id_len |= be32_to_cpu(BLOB_ATTR_EXTENDED);
>         hdr = blob_data(attr);
>         hdr->namelen = cpu_to_be16(namelen);
> -       strcpy((char *) hdr->name, (const char *)name);
> +       memcpy(hdr->name, name, namelen);


Yes if we are sure about terminating null then memcpy works too


>         pad_end = *data = blobmsg_data(attr);
>         pad_start = (char *) &hdr->name[namelen];
>         if (pad_start < pad_end)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191225/3f627271/attachment.htm>

From m.storchak at gmail.com  Wed Dec 25 10:46:27 2019
From: m.storchak at gmail.com (Maxim Storchak)
Date: Wed, 25 Dec 2019 17:46:27 +0200
Subject: [OpenWrt-Devel] [PATCH 19.07] ca-certificates: provide ca-certs by
 both ca-certificates and ca-bundle
In-Reply-To: <20191212100218.37783-1-m.storchak@gmail.com>
References: <20191212100218.37783-1-m.storchak@gmail.com>
Message-ID: <20191225154626.85567-1-m.storchak@gmail.com>

- both packages provide ca-certs
- make ca-bundle the default provider

This should allow easy transition between these two forms of CA certificates storage

Signed-off-by: Maxim Storchak <m.storchak at gmail.com>
(cherry picked from commit dd299805ad18472a8245b4524a25e4381e166057)
---
 package/system/ca-certificates/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile
index f449645c77..ea7d253fa2 100644
--- a/package/system/ca-certificates/Makefile
+++ b/package/system/ca-certificates/Makefile
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ca-certificates
 PKG_VERSION:=20190110
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
@@ -24,6 +24,7 @@ define Package/ca-certificates
   CATEGORY:=Base system
   TITLE:=System CA certificates
   PKGARCH:=all
+  PROVIDES:=ca-certs
 endef
 
 define Package/ca-bundle
@@ -31,6 +32,7 @@ define Package/ca-bundle
   CATEGORY:=Base system
   TITLE:=System CA certificates as a bundle
   PKGARCH:=all
+  PROVIDES:=ca-certs
 endef
 
 define Build/Install
@@ -59,5 +61,5 @@ define Package/ca-bundle/install
 	cat $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt >$(1)/etc/ssl/certs/ca-certificates.crt
 	$(LN) /etc/ssl/certs/ca-certificates.crt $(1)/etc/ssl/cert.pem
 endef
-$(eval $(call BuildPackage,ca-certificates))
 $(eval $(call BuildPackage,ca-bundle))
+$(eval $(call BuildPackage,ca-certificates))
-- 
2.24.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From raj.khem at gmail.com  Wed Dec 25 11:53:27 2019
From: raj.khem at gmail.com (Khem Raj)
Date: Wed, 25 Dec 2019 08:53:27 -0800
Subject: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy
In-Reply-To: <20191225094811.GH70645@meh.true.cz>
References: <20191224180213.3542623-1-raj.khem@gmail.com>
 <20191224215051.GF70645@meh.true.cz>
 <CAMKF1sqyKBm0Yz=rtgL9JnPPRzyxfcemnuLpfV-SEQYqgTiFOA@mail.gmail.com>
 <20191225094811.GH70645@meh.true.cz>
Message-ID: <CAMKF1sp1h+bx=0BuZ1SS7MTRHVWo-RY6PQa4c7UcZtNJqRN4dA@mail.gmail.com>

On Wed, Dec 25, 2019 at 1:48 AM Petr ?tetiar <ynezz at true.cz> wrote:
>
> Khem Raj <raj.khem at gmail.com> [2019-12-24 14:15:26]:
>
> > On Tue, Dec 24, 2019 at 1:51 PM Petr ?tetiar <ynezz at true.cz> wrote:
> >
> > > Khem Raj <raj.khem at gmail.com> [2019-12-24 10:02:13]:
> > >
> > > Hi,
> > >
> > > use "PATCH libubox" subject prefix, because there is no blobmsg.c file in
> > > the
> > > main tree.
> > >
> > > > Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is
> > > out of
> > > > the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka
> > > > 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]
>
> What about following fix[1]? The target hdr->name buffer has already the
> terminating 0 included as blobmsg_hdrlen has strlen+1 and blob_new() memsets
> the buffer to 0.
>
> 1. https://gitlab.com/ynezz/openwrt-libubox/commit/3775b3aa28de8c20d96b6f02786a327423b0748a
>

This works fine too. Lets go with this patch.

Tested-By: Khem Raj <raj.khem at gmail.com>

> From 3775b3aa28de8c20d96b6f02786a327423b0748a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz at true.cz>
> Date: Wed, 25 Dec 2019 10:27:59 +0100
> Subject: [PATCH] blobmsg: fix array out of bounds GCC 10 warning
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Fixes following warning reported by GCC 10.0.0 20191203:
>
>  blobmsg.c:234:2: error: 'strcpy' offset 6 from the object at 'attr' is out of
> the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka
> 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]
>    234 |  strcpy((char *) hdr->name, (const char *)name);
>        |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>  In file included from blobmsg.c:16:
>  blobmsg.h:42:10: note: subobject 'name' declared here
>     42 |  uint8_t name[];
>        |          ^~~~
>
> Reported-by: Khem Raj <raj.khem at gmail.com>
> Signed-off-by: Petr ?tetiar <ynezz at true.cz>
> ---
>  blobmsg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/blobmsg.c b/blobmsg.c
> index 48dba8156d58..ef68d8ae59f7 100644
> --- a/blobmsg.c
> +++ b/blobmsg.c
> @@ -240,7 +240,7 @@ blobmsg_new(struct blob_buf *buf, int type, const char
> *name, int payload_len, v
>         attr->id_len |= be32_to_cpu(BLOB_ATTR_EXTENDED);
>         hdr = blob_data(attr);
>         hdr->namelen = cpu_to_be16(namelen);
> -       strcpy((char *) hdr->name, (const char *)name);
> +       memcpy(hdr->name, name, namelen);
>         pad_end = *data = blobmsg_data(attr);
>         pad_start = (char *) &hdr->name[namelen];
>         if (pad_start < pad_end)

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From rosenp at gmail.com  Wed Dec 25 15:51:33 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Wed, 25 Dec 2019 12:51:33 -0800
Subject: [OpenWrt-Devel] [PATCHv2 1/3] tools/pkg-config: Replace with
 pkgconf
In-Reply-To: <20191225111701.GI70645@meh.true.cz>
References: <20191128191933.5421-1-rosenp@gmail.com>
 <20191225111701.GI70645@meh.true.cz>
Message-ID: <CAKxU2N9rckeK7LL2QvoEzghFLENtzNy3i-zFBW7a6RcH3OMcrw@mail.gmail.com>

On Wed, Dec 25, 2019 at 3:17 AM Petr ?tetiar <ynezz at true.cz> wrote:
>
> Rosen Penev <rosenp at gmail.com> [2019-11-28 11:19:31]:
>
> > pkgconf is a newer, actively maintained implementation of pkg-config
>
> I'm wondering if that `actively maintained` part still holds true.
It does. The team has management issues it seems. They've publicly
stated they want to move away from GitHub:
https://github.com/pkgconf/pkgconf.github.io/issues/1

So you would think based on the URL of the download that development
moved here: https://git.dereferenced.org/pkgconf/pkgconf#

But there's also a third place where development seems to have moved:
https://git.sr.ht/~kaniini/pkgconf/log

Seems it's a mess.
>
> -- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hauke at hauke-m.de  Thu Dec 26 07:49:46 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Thu, 26 Dec 2019 13:49:46 +0100
Subject: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy
In-Reply-To: <20191224215051.GF70645@meh.true.cz>
References: <20191224180213.3542623-1-raj.khem@gmail.com>
 <20191224215051.GF70645@meh.true.cz>
Message-ID: <b3d98fd9-34a0-31cc-c4ce-c311bcec3d38@hauke-m.de>

On 12/24/19 10:50 PM, Petr ?tetiar wrote:
> Khem Raj <raj.khem at gmail.com> [2019-12-24 10:02:13]:
> 
> Hi,
> 
> use "PATCH libubox" subject prefix, because there is no blobmsg.c file in the
> main tree.
> 
>> Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is out of
>> the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka
>> 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]
> 
> out of curiosity, which target/compiler is that? I'm not able to reproduce
> it on any of the pre-selected CI targets[1].

Hi Petr,

The fortify headers are preventing some of these warnings, I see them
when compiling without fortify header or when using glibc.

I started to look into this problem, but it looks more complicated to
change the fortify headers in a way, that the compile time buffer
overflow detection still works like expected for all functions which are
supported by gcc.

Please also use a toolchian with glibc when compiling in CI.

Hauke

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191226/8a952dfe/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jeffery.to at gmail.com  Thu Dec 26 07:50:43 2019
From: jeffery.to at gmail.com (Jeffery To)
Date: Thu, 26 Dec 2019 20:50:43 +0800
Subject: [OpenWrt-Devel] dev.archive.openwrt.org cert expired
Message-ID: <CAJXyS=ivRQx3D8kJ8p3eoN0CtzVu-Y1LvuPHb24CcHs2o3DWsw@mail.gmail.com>

Hi,

Apologies if this isn't the right place to mention this, but the Let's
Encrypt certificate for dev.archive.openwrt.org has expired (on 22 Dec 2019
21:44:43 GMT).

I tried sending this to openwrt-adm but the messages were stuck in the
moderator queue.

Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191226/45398cec/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hauke at hauke-m.de  Thu Dec 26 08:43:00 2019
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Thu, 26 Dec 2019 14:43:00 +0100
Subject: [OpenWrt-Devel] OpenWrt 19.07 final timeline
In-Reply-To: <CAKR_QVJ3bFbFpCy4vDx7g2R_8qjBJUva2EHo6AK8TvRuhVcuYQ@mail.gmail.com>
References: <a42e0ef1-b2b8-4f77-624d-2a8831fe073d@hauke-m.de>
 <CAKR_QVJ3bFbFpCy4vDx7g2R_8qjBJUva2EHo6AK8TvRuhVcuYQ@mail.gmail.com>
Message-ID: <9cce8066-8f7f-31e6-8f54-f4301a3e4f5c@hauke-m.de>

On 12/24/19 8:50 PM, Tom Psyborg wrote:
> Hi
> 
> And what about this one?
> https://bugs.openwrt.org/index.php?do=details&task_id=2593
> 
> Some regulatorty bugs?

Here is an other one related to ath10k:
https://bugs.openwrt.org/index.php?do=details&task_id=2614
The reporter says it works with an older ath10k FW.

@Tom: could you please check if it works better for you with an older
ath10k firmware.

Hauke

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191226/2fea1875/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 26 08:59:46 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Thu, 26 Dec 2019 14:59:46 +0100
Subject: [OpenWrt-Devel] OpenWrt GitLab CI details [Was: Re: [PATCH] use
 strncpy instead of strcpy]
In-Reply-To: <b3d98fd9-34a0-31cc-c4ce-c311bcec3d38@hauke-m.de>
References: <20191224180213.3542623-1-raj.khem@gmail.com>
 <20191224215051.GF70645@meh.true.cz>
 <b3d98fd9-34a0-31cc-c4ce-c311bcec3d38@hauke-m.de>
Message-ID: <20191226135946.GA70184@meh.true.cz>

Hauke Mehrtens <hauke at hauke-m.de> [2019-12-26 13:49:46]:

Hi,

I really needed to use latest GCC 10 in order to see that warning/error, I was
unable to get those warnings locally with glibc and clang-9/clang-10 and
gcc-9.

> Please also use a toolchian with glibc when compiling in CI.

I'm not sure if I understand this properly, but I'll try to shed some light
into the CI stuff.

Default CI pipeline[1] has currently following 5 jobs:

 1. build with Atheros ATH79 SDK (out of tree)
 2. build with Freescale i.MX 6 SDK (out of tree)
 3. build with MIPS Malta CoreLV BE SDK (out of tree)
 4. build with Marvell Armada Cortex A-53 SDK (out of tree)
 5. various native checks

where the first 4 jobs are using target SDK, so musl libc.

The 5th job is "various native checks" which is using Docker image[2] based on
Debian testing which comes with gcc-9 by default, then adds gcc-7 and gcc-8
and clang-9 from apt.llvm.org (clang-10 is currently unusable as it's still
missing libFuzzer dependencies[3]) to the compiler mix.

So the CI in this native checks[4] job runs `make ci-native-checks` which
translates into following[5]:

 * make ci-native-scan-build   (build with clang's static analyzer)
 * make ci-native-cppcheck     (build with cppcheck static analyzer)
 * make ci-native-build        (build with gcc 7 8 9 and clang 9)

So this should be using the standard and possibly some decent glibc. The last
`ci-native-build` make target also runs unit tests (under Valgrind and various
sanitizers) and libFuzzer based fuzzing where available (under Clang only).

I know, that it makes no sense to have CI if it's not available directly on
the developer's machine as well, so I've tried hard to make it as easy as
possible[6], so for example following steps allows running of the above
mentioned "native" CI checks in libubox locally inside Docker container:

 git clone git://git.openwrt.org/project/libubox.git && cd libubox
 wget -q https://gitlab.com/ynezz/openwrt-ci/raw/master/Makefile -O Makefile.ci
 make ci-prepare -f Makefile.ci
 docker run --rm --tty --interactive --volume $(pwd):/home/build/openwrt \
 	registry.gitlab.com/ynezz/openwrt-ci/native-testing:latest \
 	make ci-native-checks -f Makefile.ci

 (BTW this Docker container is not necessary, just convenient, otherwise one
  would need to provide all the build and compiler dependencies manually)

FYI I've also added short how-to "Example of adding CI support to fstools
project"[7] which should help anyone interested in adding CI support to the
remaining OpenWrt C projects.

As always, any questions/suggestions more then welcome.

1. https://gitlab.com/ynezz/openwrt-ci/blob/master/openwrt-ci/gitlab/pipeline.yml
2. https://gitlab.com/ynezz/openwrt-ci/blob/master/docker/Dockerfile
3. https://bugs.llvm.org/show_bug.cgi?id=44196
4. https://gitlab.com/ynezz/openwrt-ci/blob/master/openwrt-ci/gitlab/main.yml#L35
5. https://gitlab.com/ynezz/openwrt-ci/blob/master/openwrt-ci/native-build.mk#L26
6. https://gitlab.com/ynezz/openwrt-ci#usage-example
7. https://gitlab.com/ynezz/openwrt-ci/-/wikis/Example-of-adding-CI-support-to-fstools-project

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From pozega.tomislav at gmail.com  Thu Dec 26 10:40:33 2019
From: pozega.tomislav at gmail.com (Tom Psyborg)
Date: Thu, 26 Dec 2019 16:40:33 +0100
Subject: [OpenWrt-Devel] OpenWrt 19.07 final timeline
In-Reply-To: <9cce8066-8f7f-31e6-8f54-f4301a3e4f5c@hauke-m.de>
References: <a42e0ef1-b2b8-4f77-624d-2a8831fe073d@hauke-m.de>
 <CAKR_QVJ3bFbFpCy4vDx7g2R_8qjBJUva2EHo6AK8TvRuhVcuYQ@mail.gmail.com>
 <9cce8066-8f7f-31e6-8f54-f4301a3e4f5c@hauke-m.de>
Message-ID: <CAKR_QVJVcahMf0o-dCR1FGAOXixPSiGc_BEE559zMLFoEL5T-A@mail.gmail.com>

On 26/12/2019, Hauke Mehrtens <hauke at hauke-m.de> wrote:
> On 12/24/19 8:50 PM, Tom Psyborg wrote:
>> Hi
>>
>> And what about this one?
>> https://bugs.openwrt.org/index.php?do=details&task_id=2593
>>
>> Some regulatorty bugs?
>
> Here is an other one related to ath10k:
> https://bugs.openwrt.org/index.php?do=details&task_id=2614
> The reporter says it works with an older ath10k FW.
>
> @Tom: could you please check if it works better for you with an older
> ath10k firmware.
>
> Hauke
>
>

No it doesn't. 10.1-ct-8x-__fW-021-4fa9f30 is same as with 10.2.4.70.70
It appears to be mac80211 issue.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From cotequeiroz at gmail.com  Thu Dec 26 13:11:31 2019
From: cotequeiroz at gmail.com (Eneas U de Queiroz)
Date: Thu, 26 Dec 2019 15:11:31 -0300
Subject: [OpenWrt-Devel] [PATCH] wolfssl: bump to 4.3.0-stable
Message-ID: <20191226181131.15652-1-cotequeiroz@gmail.com>

This update fixes many bugs, and six security vulnerabilities, including
CVE-2019-18840.

Signed-off-by: Eneas U de Queiroz <cotequeiroz at gmail.com>
--
Compile-tested all dependents, and run-tested with wpad, uhttpd, and
curl on WRT3200ACM.

There has been an issue with WPA3 and wolfssl.  I am not able to test
it, but I am hoping this may fix the problem.

diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile
index 3d2a56a97f..cb1ab1b64c 100644
--- a/package/libs/wolfssl/Makefile
+++ b/package/libs/wolfssl/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wolfssl
-PKG_VERSION:=4.2.0-stable
+PKG_VERSION:=4.3.0-stable
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
-PKG_HASH:=3562af485c26cd7abe94d9404fbfc0c5c9bceb4aab29b81ebf5e6c2467507e12
+PKG_HASH:=6896f8ad6c44aff3e583006eeee839600848a0e37118ebbb7514eca9409ae08b
 
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
@@ -44,7 +44,7 @@ define Package/libwolfssl
   MENU:=1
   PROVIDES:=libcyassl
   DEPENDS:=+WOLFSSL_HAS_DEVCRYPTO:kmod-cryptodev +WOLFSSL_HAS_AFALG:kmod-crypto-user
-  ABI_VERSION:=23
+  ABI_VERSION:=24
 endef
 
 define Package/libwolfssl/description

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From cotequeiroz at gmail.com  Thu Dec 26 13:14:09 2019
From: cotequeiroz at gmail.com (Eneas U de Queiroz)
Date: Thu, 26 Dec 2019 15:14:09 -0300
Subject: [OpenWrt-Devel] [PATCH] curl: rename cyassl->wolfssl
Message-ID: <20191226181409.16135-1-cotequeiroz@gmail.com>

The old name was dropped and no longer works.

Signed-off-by: Eneas U de Queiroz <cotequeiroz at gmail.com>
--
While testing this with wolfssl, I noticed the package was built without
TLS support.  This was run-tested with wolfssl on WRT3200ACM

diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile
index 830d5a7192..8ccfaedc46 100644
--- a/package/network/utils/curl/Makefile
+++ b/package/network/utils/curl/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=curl
 PKG_VERSION:=7.67.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://dl.uxnr.de/mirror/curl/ \
@@ -118,7 +118,7 @@ CONFIGURE_ARGS += \
 	\
 	$(call autoconf_bool,CONFIG_IPV6,ipv6) \
 	\
-	$(if $(CONFIG_LIBCURL_WOLFSSL),--with-cyassl="$(STAGING_DIR)/usr",--without-cyassl) \
+	$(if $(CONFIG_LIBCURL_WOLFSSL),--with-wolfssl="$(STAGING_DIR)/usr",--without-wolfssl) \
 	$(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr",--without-gnutls) \
 	$(if $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr",--without-ssl) \
 	$(if $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr",--without-mbedtls) \

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From foss at volatilesystems.org  Thu Dec 26 14:12:11 2019
From: foss at volatilesystems.org (Stijn Segers)
Date: Thu, 26 Dec 2019 20:12:11 +0100
Subject: [OpenWrt-Devel] [PATCH v2] ramips: rename DIR-860L entries
 according to the new manufacturer / device spec
Message-ID: <20191226191211.5262-1-foss@volatilesystems.org>

Most images follow the openwrt-target-subtarget-manufacturer-device
naming specification, but the D-Link DIR-860L rev B1 does not. This
patch brings it in line.

Master had this updated a while ago, it's okay there.

Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 target/linux/ramips/base-files/etc/board.d/01_leds            | 2 +-
 target/linux/ramips/base-files/etc/board.d/02_network         | 4 ++--
 .../linux/ramips/base-files/etc/uci-defaults/09_fix-checksum  | 2 +-
 target/linux/ramips/image/mt7621.mk                           | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index fb74a2c87b..f08f6d7b1d 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -160,7 +160,7 @@ dlink,dwr-922-e2)
 	ucidef_set_led_netdev "signalstrength" "signalstrength" "$boardname:green:sigstrength" "wwan0" "link"
 	ucidef_set_led_netdev "4g" "4g" "$boardname:green:4g" "wwan0" "tx rx"
 	;;
-dir-860l-b1)
+dlink,dir-860l-b1)
 	ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "eth0.2"
 	;;
 ex2700|\
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 77cc8d63f9..38d2d38c2b 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -271,7 +271,7 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"1:lan:3" "2:lan:4" "3:lan:1" "4:lan:2" "0:wan" "6 at eth0"
 		;;
-	dir-860l-b1|\
+	dlink,dir-860l-b1|\
 	elecom,wrc-1167ghbk2-s|\
 	elecom,wrc-2533gst|\
 	elecom,wrc-1900gst|\
@@ -553,7 +553,7 @@ ramips_setup_macs()
 	dch-m225)
 		lan_mac=$(mtd_get_mac_ascii factory lanmac)
 		;;
-	dir-860l-b1)
+	dlink,dir-860l-b1)
 		lan_mac=$(mtd_get_mac_ascii factory lanmac)
 		wan_mac=$(mtd_get_mac_ascii factory wanmac)
 		;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum
index 54deb5b2e0..40746c6af4 100644
--- a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum
+++ b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum
@@ -17,7 +17,7 @@ case "$board" in
 cy-swr1100 | \
 dch-m225 | \
 dir-645 | \
-dir-860l-b1)
+dlink,dir-860l-b1)
 	fix_checksum seama
 	;;
 dlink,dap-1522-a1)
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 7eb59188fb..6507e40f86 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -110,7 +110,7 @@ define Device/asus_rt-ac57u
 endef
 TARGET_DEVICES += asus_rt-ac57u
 
-define Device/dir-860l-b1
+define Device/dlink_dir-860l-b1
   $(Device/seama)
   DTS := DIR-860L-B1
   BLOCKSIZE := 64k
@@ -120,7 +120,7 @@ define Device/dir-860l-b1
   DEVICE_TITLE := D-Link DIR-860L B1
   DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
 endef
-TARGET_DEVICES += dir-860l-b1
+TARGET_DEVICES += dlink_dir-860l-b1
 
 define Device/mediatek_ap-mt7621a-v60
   DTS := AP-MT7621A-V60
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hannu.nyman at welho.com  Thu Dec 26 15:37:31 2019
From: hannu.nyman at welho.com (Hannu Nyman)
Date: Thu, 26 Dec 2019 22:37:31 +0200
Subject: [OpenWrt-Devel] ubus and/or libubox upgrades today cause problems:
 some services do not start, logread hangs
Message-ID: <6cb3b640-8590-d083-e5c2-63df74c7e86b@welho.com>

I noticed today problems with new master builds, both with ipq806x/R7800 and 
ar71xx/WNDR3700:

* Some services do not start and their processes are not visible in the 
process list. Examples: collectd and nlbwmon
* logread command always hangs. Both from SSH console and luci

Looking at the recent changes, I suspected the ubus and/or libubox version 
bumps today that have apparently been discussed as?? "[PATCH ubus 00/16] 
GitLab CI, tests, fuzzing, fixes and improvements" and " [PATCH libubox 
00/20] tests, fuzzing, fixes and improvements" message series.

I reverted both ubus and libubox changes and the services start again 
(nlbwmon, collectd), and also logread works ;-)


Commits that I reverted:

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=7cb018c591453848a50ef7737bdbe5d90aa7a18a

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=b9f3af7c890e76baa9869f51384c0dbd96c3b704


I have done no further debugging so far.



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From foss at volatilesystems.org  Thu Dec 26 15:49:25 2019
From: foss at volatilesystems.org (Stijn Segers)
Date: Thu, 26 Dec 2019 21:49:25 +0100
Subject: [OpenWrt-Devel] [PATCH v2] ramips: rename DIR-860L entries
 according to the new manufacturer / device spec
In-Reply-To: <20191226191211.5262-1-foss@volatilesystems.org>
References: <20191226191211.5262-1-foss@volatilesystems.org>
Message-ID: <D9524DBE-985B-4A1B-95A3-6B5657A177A9@volatilesystems.org>

Stijn Segers <foss at volatilesystems.org> schreef op 26 december 2019 20:12:11 CET:
>Most images follow the openwrt-target-subtarget-manufacturer-device
>naming specification, but the D-Link DIR-860L rev B1 does not. This
>patch brings it in line.
>
>Master had this updated a while ago, it's okay there.
>
>Signed-off-by: Stijn Segers <foss at volatilesystems.org>
>---
> target/linux/ramips/base-files/etc/board.d/01_leds            | 2 +-
> target/linux/ramips/base-files/etc/board.d/02_network         | 4 ++--
> .../linux/ramips/base-files/etc/uci-defaults/09_fix-checksum  | 2 +-
> target/linux/ramips/image/mt7621.mk                           | 4 ++--
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
>diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
>b/target/linux/ramips/base-files/etc/board.d/01_leds
>index fb74a2c87b..f08f6d7b1d 100755
>--- a/target/linux/ramips/base-files/etc/board.d/01_leds
>+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
>@@ -160,7 +160,7 @@ dlink,dwr-922-e2)
>	ucidef_set_led_netdev "signalstrength" "signalstrength"
>"$boardname:green:sigstrength" "wwan0" "link"
> 	ucidef_set_led_netdev "4g" "4g" "$boardname:green:4g" "wwan0" "tx rx"
> 	;;
>-dir-860l-b1)
>+dlink,dir-860l-b1)
> 	ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "eth0.2"
> 	;;
> ex2700|\
>diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
>b/target/linux/ramips/base-files/etc/board.d/02_network
>index 77cc8d63f9..38d2d38c2b 100755
>--- a/target/linux/ramips/base-files/etc/board.d/02_network
>+++ b/target/linux/ramips/base-files/etc/board.d/02_network
>@@ -271,7 +271,7 @@ ramips_setup_interfaces()
> 		ucidef_add_switch "switch0" \
> 			"1:lan:3" "2:lan:4" "3:lan:1" "4:lan:2" "0:wan" "6 at eth0"
> 		;;
>-	dir-860l-b1|\
>+	dlink,dir-860l-b1|\
> 	elecom,wrc-1167ghbk2-s|\
> 	elecom,wrc-2533gst|\
> 	elecom,wrc-1900gst|\
>@@ -553,7 +553,7 @@ ramips_setup_macs()
> 	dch-m225)
> 		lan_mac=$(mtd_get_mac_ascii factory lanmac)
> 		;;
>-	dir-860l-b1)
>+	dlink,dir-860l-b1)
> 		lan_mac=$(mtd_get_mac_ascii factory lanmac)
> 		wan_mac=$(mtd_get_mac_ascii factory wanmac)
> 		;;
>diff --git
>a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum
>b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum
>index 54deb5b2e0..40746c6af4 100644
>--- a/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum
>+++ b/target/linux/ramips/base-files/etc/uci-defaults/09_fix-checksum
>@@ -17,7 +17,7 @@ case "$board" in
> cy-swr1100 | \
> dch-m225 | \
> dir-645 | \
>-dir-860l-b1)
>+dlink,dir-860l-b1)
> 	fix_checksum seama
> 	;;
> dlink,dap-1522-a1)
>diff --git a/target/linux/ramips/image/mt7621.mk
>b/target/linux/ramips/image/mt7621.mk
>index 7eb59188fb..6507e40f86 100644
>--- a/target/linux/ramips/image/mt7621.mk
>+++ b/target/linux/ramips/image/mt7621.mk
>@@ -110,7 +110,7 @@ define Device/asus_rt-ac57u
> endef
> TARGET_DEVICES += asus_rt-ac57u
> 
>-define Device/dir-860l-b1
>+define Device/dlink_dir-860l-b1
>   $(Device/seama)
>   DTS := DIR-860L-B1
>   BLOCKSIZE := 64k
>@@ -120,7 +120,7 @@ define Device/dir-860l-b1
>   DEVICE_TITLE := D-Link DIR-860L B1
>DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
>wpad-basic
> endef
>-TARGET_DEVICES += dir-860l-b1
>+TARGET_DEVICES += dlink_dir-860l-b1
> 
> define Device/mediatek_ap-mt7621a-v60
>   DTS := AP-MT7621A-V60
>-- 
>2.20.1
>
>
>_______________________________________________
>openwrt-devel mailing list
>openwrt-devel at lists.openwrt.org
>https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Sorry guys... A v2 for my previous patch, still for 19.07.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191226/1e8678b1/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From raj.khem at gmail.com  Thu Dec 26 17:31:22 2019
From: raj.khem at gmail.com (Khem Raj)
Date: Thu, 26 Dec 2019 14:31:22 -0800
Subject: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy
In-Reply-To: <b3d98fd9-34a0-31cc-c4ce-c311bcec3d38@hauke-m.de>
References: <20191224180213.3542623-1-raj.khem@gmail.com>
 <20191224215051.GF70645@meh.true.cz>
 <b3d98fd9-34a0-31cc-c4ce-c311bcec3d38@hauke-m.de>
Message-ID: <CAMKF1soqVxRsawUbHYmL1QFO-n6OXF_5Xh0WyxYuReOgv692uQ@mail.gmail.com>

On Thu, Dec 26, 2019 at 4:50 AM Hauke Mehrtens <hauke at hauke-m.de> wrote:
>
> On 12/24/19 10:50 PM, Petr ?tetiar wrote:
> > Khem Raj <raj.khem at gmail.com> [2019-12-24 10:02:13]:
> >
> > Hi,
> >
> > use "PATCH libubox" subject prefix, because there is no blobmsg.c file in the
> > main tree.
> >
> >> Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is out of
> >> the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka
> >> 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]
> >
> > out of curiosity, which target/compiler is that? I'm not able to reproduce
> > it on any of the pre-selected CI targets[1].
>
> Hi Petr,
>
> The fortify headers are preventing some of these warnings, I see them
> when compiling without fortify header or when using glibc.
>
> I started to look into this problem, but it looks more complicated to
> change the fortify headers in a way, that the compile time buffer
> overflow detection still works like expected for all functions which are
> supported by gcc.
>

I do use these flags
-fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat
-Wformat-security -Werror=format-security

and perhaps that combined with gcc10 exposes this issue.

> Please also use a toolchian with glibc when compiling in CI.
>
> Hauke
>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From rosenp at gmail.com  Thu Dec 26 17:49:54 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Thu, 26 Dec 2019 14:49:54 -0800
Subject: [OpenWrt-Devel] [PATCH] use strncpy instead of strcpy
In-Reply-To: <CAMKF1soqVxRsawUbHYmL1QFO-n6OXF_5Xh0WyxYuReOgv692uQ@mail.gmail.com>
References: <20191224180213.3542623-1-raj.khem@gmail.com>
 <20191224215051.GF70645@meh.true.cz>
 <b3d98fd9-34a0-31cc-c4ce-c311bcec3d38@hauke-m.de>
 <CAMKF1soqVxRsawUbHYmL1QFO-n6OXF_5Xh0WyxYuReOgv692uQ@mail.gmail.com>
Message-ID: <CAKxU2N-bi5=w-OefjJ3uD2mkwJwcZx+pwMDHP04XxRvrOpAu3Q@mail.gmail.com>

On Thu, Dec 26, 2019 at 2:32 PM Khem Raj <raj.khem at gmail.com> wrote:
>
> On Thu, Dec 26, 2019 at 4:50 AM Hauke Mehrtens <hauke at hauke-m.de> wrote:
> >
> > On 12/24/19 10:50 PM, Petr ?tetiar wrote:
> > > Khem Raj <raj.khem at gmail.com> [2019-12-24 10:02:13]:
> > >
> > > Hi,
> > >
> > > use "PATCH libubox" subject prefix, because there is no blobmsg.c file in the
> > > main tree.
> > >
> > >> Fixes error: '__builtin_strcpy' offset 6 from the object at 'attr' is out of
> > >> the bounds of referenced subobject 'name' with type 'uint8_t[0]' {aka
> > >> 'unsigned char[0]'} at offset 6 [-Werror=array-bounds]
> > >
> > > out of curiosity, which target/compiler is that? I'm not able to reproduce
> > > it on any of the pre-selected CI targets[1].
> >
> > Hi Petr,
> >
> > The fortify headers are preventing some of these warnings, I see them
> > when compiling without fortify header or when using glibc.
> >
> > I started to look into this problem, but it looks more complicated to
> > change the fortify headers in a way, that the compile time buffer
> > overflow detection still works like expected for all functions which are
> > supported by gcc.
I personally remove this line in my tree:
https://github.com/openwrt/openwrt/blob/master/rules.mk#L200

It's funny that fortify-headers expose a different bug as well.
limits.h ends up being implicitly included. When removing
fortify-headers, several packages end up needing limits.h (I've fixed
some of them).
> >
>
> I do use these flags
> -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat
> -Wformat-security -Werror=format-security
-Wformat=2 exposes more warnings

Note that fixing them helps with reducing compiled size.

>
> and perhaps that combined with gcc10 exposes this issue.
>
> > Please also use a toolchian with glibc when compiling in CI.
> >
> > Hauke
> >
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Thu Dec 26 17:59:36 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Thu, 26 Dec 2019 23:59:36 +0100
Subject: [OpenWrt-Devel] ubus and/or libubox upgrades today cause
 problems: some services do not start, logread hangs
In-Reply-To: <6cb3b640-8590-d083-e5c2-63df74c7e86b@welho.com>
References: <6cb3b640-8590-d083-e5c2-63df74c7e86b@welho.com>
Message-ID: <20191226225936.GB70184@meh.true.cz>

Hannu Nyman <hannu.nyman at welho.com> [2019-12-26 22:37:31]:

Hi,

> I noticed today problems with new master builds, both with ipq806x/R7800 and
> ar71xx/WNDR3700:
> 
> * Some services do not start and their processes are not visible in the
> process list. Examples: collectd and nlbwmon
> * logread command always hangs. Both from SSH console and luci

sorry for the breakage.

> I reverted both ubus and libubox changes and the services start again
> (nlbwmon, collectd), and also logread works ;-)

I've just looked at the logread issue and I've tracked it down to the following
commit[1]:

 commit 5d7ca8309d0a1614d829df9ecd72553bcd6b5ec6
 Author:     Petr ?tetiar <ynezz at true.cz>

    ubusd/libubus-io: fix variable sized struct position warning
    
    Fixes following clang-9 compiler warnings:
    
     ubusd.c:99:18: error: field 'h' with variable sized type 'struct cmsghdr' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
                    struct cmsghdr h;
                                   ^

I'll try to fix that tomorrow.

1. https://git.openwrt.org/5d7ca8309d0a1614d829df9ecd72553bcd6b5ec6

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at adrianschmutzler.de  Thu Dec 26 18:11:34 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Fri, 27 Dec 2019 00:11:34 +0100
Subject: [OpenWrt-Devel] [PATCH] [19.07] ramips: rename DIR-860L entries
 according to the new manufacturer / device spec
In-Reply-To: <20191225143851.12368-1-foss@volatilesystems.org>
References: <20191225143851.12368-1-foss@volatilesystems.org>
Message-ID: <00ce01d5bc41$d1e99520$75bcbf60$@adrianschmutzler.de>

Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Stijn Segers
> Sent: Mittwoch, 25. Dezember 2019 15:39
> To: openwrt-devel at lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH] [19.07] ramips: rename DIR-860L entries
> according to the new manufacturer / device spec
> 
> Most images follow the openwrt-target-subtarget-manufacturer-device
> naming specification, but the D-Link DIR-860L rev B1 does not. This patch
> brings it in line.
> 
> Master had this updated a while ago, it's okay there.

Though I'm a big fan of unification and made an effort to have this sorted out in master, I do not think backporting those device name changes is very helpful. This will create additional work, but effectively it will just move the "break" from 19.07/master to 18.06/19.07.

As a cosmetic issue, it wouldn't be a candidate for backporting under normal circumstances, too.

For further reasoning/discussion, refer to the following PR in GitHub, where the same question has already been discussed a month ago:

https://github.com/openwrt/openwrt/pull/2574#issuecomment-559460188

I will mark this PR as Rejected, I hope you accept my arguments and continue to submit contributions in the future.

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191227/0990e0f5/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From foss at volatilesystems.org  Thu Dec 26 23:07:54 2019
From: foss at volatilesystems.org (Stijn Segers)
Date: Fri, 27 Dec 2019 05:07:54 +0100
Subject: [OpenWrt-Devel] [PATCH] [19.07] ramips: rename DIR-860L entries
 according to the new manufacturer / device spec
In-Reply-To: <00ce01d5bc41$d1e99520$75bcbf60$@adrianschmutzler.de>
References: <20191225143851.12368-1-foss@volatilesystems.org>
 <00ce01d5bc41$d1e99520$75bcbf60$@adrianschmutzler.de>
Message-ID: <9339FD6D-FDED-4104-A6A4-9BE03124F192@volatilesystems.org>

mail at adrianschmutzler.de schreef op 27 december 2019 00:11:34 CET:
>Hi,
>
>> -----Original Message-----
>> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
>> On Behalf Of Stijn Segers
>> Sent: Mittwoch, 25. Dezember 2019 15:39
>> To: openwrt-devel at lists.openwrt.org
>> Subject: [OpenWrt-Devel] [PATCH] [19.07] ramips: rename DIR-860L
>entries
>> according to the new manufacturer / device spec
>> 
>> Most images follow the openwrt-target-subtarget-manufacturer-device
>> naming specification, but the D-Link DIR-860L rev B1 does not. This
>patch
>> brings it in line.
>> 
>> Master had this updated a while ago, it's okay there.
>
>Though I'm a big fan of unification and made an effort to have this
>sorted out in master, I do not think backporting those device name
>changes is very helpful. This will create additional work, but
>effectively it will just move the "break" from 19.07/master to
>18.06/19.07.
>
>As a cosmetic issue, it wouldn't be a candidate for backporting under
>normal circumstances, too.

Well it was worth trying ?

Stijn

>
>For further reasoning/discussion, refer to the following PR in GitHub,
>where the same question has already been discussed a month ago:
>
>https://github.com/openwrt/openwrt/pull/2574#issuecomment-559460188
>
>I will mark this PR as Rejected, I hope you accept my arguments and
>continue to submit contributions in the future.
>
>Best
>
>Adrian 


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Fri Dec 27 03:53:35 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Fri, 27 Dec 2019 09:53:35 +0100
Subject: [OpenWrt-Devel] [PATCH fstools] Revert "block: mount_action: handle
 mount/umount deps"
Message-ID: <20191227085335.10144-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

This reverts commit 32c3126b2f0464106d74317336b6aef1d7d5f82f.

Internal list of devices guarantees some basic sorting (by device type
and then a name) but nothing more. In particular it's not guaranteed
(and it's actually quite uncommon) that all preceding entries are parent
devices.

Mounting all preceding devices may easily result in unrelated mounts.
They can fail easily basically breaking original mounting attempt, e.g.:

daemon.err blockd: kernel is requesting a mount -> sda2
daemon.err block: /dev/sda1 is already mounted on /tmp/run/blockd/sda1
daemon.err block: autofs: "add" action has failed: -1
daemon.err blockd: failed to run block. add/sda2

If some dependency handling is required it should be implemented
explicitly as current solution isn't reliable and it breaks autofs when
using multiple devices (partitions).

Cc: Yousong Zhou <yszhou4tech at gmail.com>
Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 block.c | 43 +++++++++++++------------------------------
 1 file changed, 13 insertions(+), 30 deletions(-)

diff --git a/block.c b/block.c
index b6d49a8..e07cbc5 100644
--- a/block.c
+++ b/block.c
@@ -1199,47 +1199,30 @@ static int umount_device(char *path, int type, bool all)
 
 static int mount_action(char *action, char *device, int type)
 {
-	struct device *the_dev, *dev;
 	char path[32];
 
 	if (!action || !device)
 		return -1;
-
-	if (config_load(NULL))
-		return -1;
-	cache_load(0);
-
-	the_dev = find_block_device(NULL, NULL, device);
+	snprintf(path, sizeof(path), "/dev/%s", device);
 
 	if (!strcmp(action, "remove")) {
 		if (type == TYPE_HOTPLUG)
 			blockd_notify(device, NULL, NULL);
 
-		if (!the_dev || !the_dev->m || the_dev->m->type != TYPE_MOUNT) {
-			snprintf(path, sizeof(path), "/dev/%s", device);
-			umount_device(path, type, true);
-		} else
-			vlist_for_element_to_last_reverse(&devices, the_dev, dev, node)
-				if (dev->m && dev->m->type == TYPE_MOUNT)
-					umount_device(dev->pr->dev, type, true);
+		umount_device(path, type, true);
+
 		return 0;
-	} else if (!strcmp(action, "add")) {
-		if (!the_dev)
-			return -1;
-		if (the_dev->m && the_dev->m->type == TYPE_MOUNT) {
-			vlist_for_first_to_element(&devices, the_dev, dev, node) {
-				if (dev->m && dev->m->type == TYPE_MOUNT) {
-					int err = mount_device(dev, type);
-					if (err)
-						return err;
-				}
-			}
-			return 0;
-		} else
-			return mount_device(the_dev, type);
+	} else if (strcmp(action, "add")) {
+		ULOG_ERR("Unkown action %s\n", action);
+
+		return -1;
 	}
-	ULOG_ERR("Unkown action %s\n", action);
-	return -1;
+
+	if (config_load(NULL))
+		return -1;
+	cache_load(0);
+
+	return mount_device(find_block_device(NULL, NULL, path), type);
 }
 
 static int main_hotplug(int argc, char **argv)
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hannu.nyman at iki.fi  Fri Dec 27 04:33:46 2019
From: hannu.nyman at iki.fi (Hannu Nyman)
Date: Fri, 27 Dec 2019 11:33:46 +0200
Subject: [OpenWrt-Devel] ubus and/or libubox upgrades today cause
 problems: some services do not start, logread hangs
In-Reply-To: <20191226225936.GB70184@meh.true.cz>
References: <6cb3b640-8590-d083-e5c2-63df74c7e86b@welho.com>
 <20191226225936.GB70184@meh.true.cz>
Message-ID: <fa84e9a6-5b08-c680-b3ed-0ad1b3f00359@iki.fi>

Petr ?tetiar kirjoitti 27.12.2019 klo 0.59:
> Hannu Nyman <hannu.nyman at welho.com> [2019-12-26 22:37:31]:
>
> Hi,
>
>> I noticed today problems with new master builds, both with ipq806x/R7800 and
>> ar71xx/WNDR3700:
>>
>> * Some services do not start and their processes are not visible in the
>> process list. Examples: collectd and nlbwmon
>> * logread command always hangs. Both from SSH console and luci
> sorry for the breakage.
>
>> I reverted both ubus and libubox changes and the services start again
>> (nlbwmon, collectd), and also logread works ;-)
> I've just looked at the logread issue and I've tracked it down to the following
> commit[1]:
>
>   commit 5d7ca8309d0a1614d829df9ecd72553bcd6b5ec6
>   Author:     Petr ?tetiar <ynezz at true.cz>
>
>      ubusd/libubus-io: fix variable sized struct position warning
>      
>      Fixes following clang-9 compiler warnings:
>      
>       ubusd.c:99:18: error: field 'h' with variable sized type 'struct cmsghdr' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
>                      struct cmsghdr h;
>                                     ^
>
> I'll try to fix that tomorrow.


Hopefully you/somebody will revert the ubus changes in master until then.

ubus is so central to OpenWrt that silent breakage in its core functionality 
will cause lots of sneakily broken builds.


>
> 1. https://git.openwrt.org/5d7ca8309d0a1614d829df9ecd72553bcd6b5ec6
>
> -- ynezz



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Fri Dec 27 07:09:11 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Fri, 27 Dec 2019 13:09:11 +0100
Subject: [OpenWrt-Devel] [PATCH fstools] blockd: report "target" path as
 "mount" for autofs available mounts
Message-ID: <20191227120911.9236-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

Devices handled with autofs should be seen as available even if
currently unmounted. Mounting is handled on demand and transparently for
users.

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 blockd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/blockd.c b/blockd.c
index e07530c..ba4afdd 100644
--- a/blockd.c
+++ b/blockd.c
@@ -283,6 +283,8 @@ block_info(struct ubus_context *ctx, struct ubus_object *obj,
 		if (mp) {
 			blobmsg_add_string(&bb, "mount", mp);
 			free(mp);
+		} else if (device->autofs && device->target) {
+			blobmsg_add_string(&bb, "mount", device->target);
 		}
 		blobmsg_close_table(&bb, t);
 	}
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Fri Dec 27 07:25:41 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Fri, 27 Dec 2019 13:25:41 +0100
Subject: [OpenWrt-Devel] ubus and/or libubox upgrades today cause
 problems: some services do not start, logread hangs
In-Reply-To: <fa84e9a6-5b08-c680-b3ed-0ad1b3f00359@iki.fi>
References: <6cb3b640-8590-d083-e5c2-63df74c7e86b@welho.com>
 <20191226225936.GB70184@meh.true.cz>
 <fa84e9a6-5b08-c680-b3ed-0ad1b3f00359@iki.fi>
Message-ID: <20191227122541.GC70184@meh.true.cz>

Hannu Nyman <hannu.nyman at iki.fi> [2019-12-27 11:33:46]:

Hi,

> Hopefully you/somebody will revert the ubus changes in master until then.

can you confirm, that following fix[1] actually fixes the issues you're
seeing? Thanks.

1. https://gitlab.com/ynezz/openwrt-ubus/commit/184d756c70a3dd2cf5b21d0d5672f08091832cc1

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Fri Dec 27 07:25:54 2019
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 27 Dec 2019 20:25:54 +0800
Subject: [OpenWrt-Devel] [PATCH fstools] Revert "block: mount_action:
 handle mount/umount deps"
In-Reply-To: <20191227085335.10144-1-zajec5@gmail.com>
References: <20191227085335.10144-1-zajec5@gmail.com>
Message-ID: <CAECwjAjw7dkkgqSd47N55XC1JwLNWUMTQQHSJdJ5y4fEhnoYDw@mail.gmail.com>

On Fri, 27 Dec 2019 at 16:53, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
>
> From: Rafa? Mi?ecki <rafal at milecki.pl>
>
> This reverts commit 32c3126b2f0464106d74317336b6aef1d7d5f82f.
>
> Internal list of devices guarantees some basic sorting (by device type
> and then a name) but nothing more. In particular it's not guaranteed
> (and it's actually quite uncommon) that all preceding entries are parent
> devices.
>
> Mounting all preceding devices may easily result in unrelated mounts.
> They can fail easily basically breaking original mounting attempt, e.g.:
>
> daemon.err blockd: kernel is requesting a mount -> sda2
> daemon.err block: /dev/sda1 is already mounted on /tmp/run/blockd/sda1
> daemon.err block: autofs: "add" action has failed: -1
> daemon.err blockd: failed to run block. add/sda2

Sorry for the inconvenience.  But the error (regression) should be
caused by 2f2a09ad ("block: mount_device: err log only when mp
deviates from spec").  m->target is expected to match the actual mount
point only when it is not managed by blockd (m->autofs).

Please see if the following patch works.  We can also check if m is
managed by autofs and m->target a symlink whose target matches mp, but
that's a bit overkill.

--- a/block.c
+++ b/block.c
@@ -1100,7 +1100,7 @@ static int mount_device(struct device *dev, int type)

        mp = find_mount_point(pr->dev);
        if (mp) {
-               if (m && m->type == TYPE_MOUNT && strcmp(m->target, mp)) {
+               if (m && !m->autofs && m->type == TYPE_MOUNT &&
strcmp(m->target, mp)) {
                        ULOG_ERR("%s is already mounted on %s\n", pr->dev, mp);
                        err = -1;
                } else


>
> If some dependency handling is required it should be implemented
> explicitly as current solution isn't reliable and it breaks autofs when
> using multiple devices (partitions).
>

Dependencies are directly implied by mount target as specified in the
uci config file.  This relationship is inherently there.  E.g.

 1. mount target /mnt/a
 2. mount target /mnt/a/b

Then "1" must mount before "2".  "2" before "1" is not practically
useful in any way.

Regards,
                yousong

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Fri Dec 27 08:59:22 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Fri, 27 Dec 2019 14:59:22 +0100
Subject: [OpenWrt-Devel] [PATCH ubus] ubusd/libubus-io: fix socket
 descriptor passing
In-Reply-To: <fa84e9a6-5b08-c680-b3ed-0ad1b3f00359@iki.fi>
Message-ID: <20191227135922.13972-1-ynezz@true.cz>

In commit 5d7ca8309d0a ("ubusd/libubus-io: fix variable sized struct
position warning") the position of cmsghdr struct has been changed in
order to fix clang-9 compiler warning, but it has introduced regression
in at least `logread` which hanged indefinitely.

So this patch reworks the socket descriptor passing in a way recommended
in the `cmsg(3)` manual page.

Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020840.html
Fixes: 5d7ca8309d0a ("ubusd/libubus-io: fix variable sized struct position warning")
Reported-by: Hannu Nyman <hannu.nyman at welho.com>
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 libubus-io.c | 96 ++++++++++++++++++++++++++++------------------------
 ubusd.c      | 43 +++++++++++------------
 ubusd_main.c | 47 +++++++++++++------------
 3 files changed, 98 insertions(+), 88 deletions(-)

diff --git a/libubus-io.c b/libubus-io.c
index ba1016d0fa09..7668dc52e8d3 100644
--- a/libubus-io.c
+++ b/libubus-io.c
@@ -59,35 +59,36 @@ static void wait_data(int fd, bool write)
 
 static int writev_retry(int fd, struct iovec *iov, int iov_len, int sock_fd)
 {
-	static struct {
-		int fd;
-		struct cmsghdr h;
-	} fd_buf = {
-		.h = {
-			.cmsg_len = sizeof(fd_buf),
-			.cmsg_level = SOL_SOCKET,
-			.cmsg_type = SCM_RIGHTS,
-		}
-	};
-	struct msghdr msghdr = {
-		.msg_iov = iov,
-		.msg_iovlen = iov_len,
-		.msg_control = &fd_buf,
-		.msg_controllen = sizeof(fd_buf),
-	};
+	uint8_t fd_buf[CMSG_SPACE(sizeof(int))] = { 0 };
+	struct msghdr msg = { 0 };
+	struct cmsghdr *cmsg;
 	int len = 0;
+	int *pfd;
+
+	msg.msg_iov = iov,
+	msg.msg_iovlen = iov_len,
+	msg.msg_control = fd_buf;
+	msg.msg_controllen = sizeof(fd_buf);
+
+	cmsg = CMSG_FIRSTHDR(&msg);
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+
+	pfd = (int *) CMSG_DATA(cmsg);
+	msg.msg_controllen = cmsg->cmsg_len;
 
 	do {
 		ssize_t cur_len;
 
 		if (sock_fd < 0) {
-			msghdr.msg_control = NULL;
-			msghdr.msg_controllen = 0;
+			msg.msg_control = NULL;
+			msg.msg_controllen = 0;
 		} else {
-			fd_buf.fd = sock_fd;
+			*pfd = sock_fd;
 		}
 
-		cur_len = sendmsg(fd, &msghdr, 0);
+		cur_len = sendmsg(fd, &msg, 0);
 		if (cur_len < 0) {
 			switch(errno) {
 			case EAGAIN:
@@ -114,8 +115,8 @@ static int writev_retry(int fd, struct iovec *iov, int iov_len, int sock_fd)
 		}
 		iov->iov_base += cur_len;
 		iov->iov_len -= cur_len;
-		msghdr.msg_iov = iov;
-		msghdr.msg_iovlen = iov_len;
+		msg.msg_iov = iov;
+		msg.msg_iovlen = iov_len;
 	} while (1);
 
 	/* Should never reach here */
@@ -156,34 +157,39 @@ int __hidden ubus_send_msg(struct ubus_context *ctx, uint32_t seq,
 
 static int recv_retry(struct ubus_context *ctx, struct iovec *iov, bool wait, int *recv_fd)
 {
-	int bytes, total = 0;
-	int fd = ctx->sock.fd;
-	static struct {
-		int fd;
-		struct cmsghdr h;
-	} fd_buf = {
-		.h = {
-			.cmsg_type = SCM_RIGHTS,
-			.cmsg_level = SOL_SOCKET,
-			.cmsg_len = sizeof(fd_buf),
-		},
-	};
-	struct msghdr msghdr = {
-		.msg_iov = iov,
-		.msg_iovlen = 1,
-	};
+	uint8_t fd_buf[CMSG_SPACE(sizeof(int))] = { 0 };
+	struct msghdr msg = { 0 };
+	struct cmsghdr *cmsg;
+	int total = 0;
+	int bytes;
+	int *pfd;
+	int fd;
+
+	fd = ctx->sock.fd;
+
+	msg.msg_iov = iov,
+	msg.msg_iovlen = 1,
+	msg.msg_control = fd_buf;
+	msg.msg_controllen = sizeof(fd_buf);
+
+	cmsg = CMSG_FIRSTHDR(&msg);
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+
+	pfd = (int *) CMSG_DATA(cmsg);
 
 	while (iov->iov_len > 0) {
 		if (recv_fd) {
-			msghdr.msg_control = &fd_buf;
-			msghdr.msg_controllen = sizeof(fd_buf);
+			msg.msg_control = fd_buf;
+			msg.msg_controllen = cmsg->cmsg_len;
 		} else {
-			msghdr.msg_control = NULL;
-			msghdr.msg_controllen = 0;
+			msg.msg_control = NULL;
+			msg.msg_controllen = 0;
 		}
 
-		fd_buf.fd = -1;
-		bytes = recvmsg(fd, &msghdr, 0);
+		*pfd = -1;
+		bytes = recvmsg(fd, &msg, 0);
 		if (!bytes)
 			return -1;
 
@@ -199,7 +205,7 @@ static int recv_retry(struct ubus_context *ctx, struct iovec *iov, bool wait, in
 			return 0;
 
 		if (recv_fd)
-			*recv_fd = fd_buf.fd;
+			*recv_fd = *pfd;
 
 		recv_fd = NULL;
 
diff --git a/ubusd.c b/ubusd.c
index 0d43977c0bde..6f3a280cdf57 100644
--- a/ubusd.c
+++ b/ubusd.c
@@ -82,30 +82,31 @@ void ubus_msg_free(struct ubus_msg_buf *ub)
 
 ssize_t ubus_msg_writev(int fd, struct ubus_msg_buf *ub, size_t offset)
 {
+	uint8_t fd_buf[CMSG_SPACE(sizeof(int))] = { 0 };
 	static struct iovec iov[2];
-	static struct {
-		int fd;
-		struct cmsghdr h;
-	} fd_buf = {
-		.h = {
-			.cmsg_len = sizeof(fd_buf),
-			.cmsg_level = SOL_SOCKET,
-			.cmsg_type = SCM_RIGHTS,
-		},
-	};
-	struct msghdr msghdr = {
-		.msg_iov = iov,
-		.msg_iovlen = ARRAY_SIZE(iov),
-		.msg_control = &fd_buf,
-		.msg_controllen = sizeof(fd_buf),
-	};
+	struct msghdr msg = { 0 };
 	struct ubus_msghdr hdr;
+	struct cmsghdr *cmsg;
 	ssize_t ret;
+	int *pfd;
 
-	fd_buf.fd = ub->fd;
+	msg.msg_iov = iov;
+	msg.msg_iovlen = ARRAY_SIZE(iov);
+	msg.msg_control = fd_buf;
+	msg.msg_controllen = sizeof(fd_buf);
+
+	cmsg = CMSG_FIRSTHDR(&msg);
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+
+	pfd = (int *) CMSG_DATA(cmsg);
+	msg.msg_controllen = cmsg->cmsg_len;
+
+	*pfd = ub->fd;
 	if (ub->fd < 0 || offset) {
-		msghdr.msg_control = NULL;
-		msghdr.msg_controllen = 0;
+		msg.msg_control = NULL;
+		msg.msg_controllen = 0;
 	}
 
 	if (offset < sizeof(ub->hdr)) {
@@ -122,11 +123,11 @@ ssize_t ubus_msg_writev(int fd, struct ubus_msg_buf *ub, size_t offset)
 		offset -= sizeof(ub->hdr);
 		iov[0].iov_base = ((char *) ub->data) + offset;
 		iov[0].iov_len = ub->len - offset;
-		msghdr.msg_iovlen = 1;
+		msg.msg_iovlen = 1;
 	}
 
 	do {
-		ret = sendmsg(fd, &msghdr, 0);
+		ret = sendmsg(fd, &msg, 0);
 	} while (ret < 0 && errno == EINTR);
 
 	return ret;
diff --git a/ubusd_main.c b/ubusd_main.c
index 81868c1482bc..11cb2f99f7b6 100644
--- a/ubusd_main.c
+++ b/ubusd_main.c
@@ -50,22 +50,25 @@ static void handle_client_disconnect(struct ubus_client *cl)
 static void client_cb(struct uloop_fd *sock, unsigned int events)
 {
 	struct ubus_client *cl = container_of(sock, struct ubus_client, sock);
+	uint8_t fd_buf[CMSG_SPACE(sizeof(int))] = { 0 };
+	struct msghdr msg = { 0 };
 	struct ubus_msg_buf *ub;
 	static struct iovec iov;
-	static struct {
-		int fd;
-		struct cmsghdr h;
-	} fd_buf = {
-		.h = {
-			.cmsg_type = SCM_RIGHTS,
-			.cmsg_level = SOL_SOCKET,
-			.cmsg_len = sizeof(fd_buf),
-		}
-	};
-	struct msghdr msghdr = {
-		.msg_iov = &iov,
-		.msg_iovlen = 1,
-	};
+	struct cmsghdr *cmsg;
+	int *pfd;
+
+	msg.msg_iov = &iov,
+	msg.msg_iovlen = 1,
+	msg.msg_control = fd_buf;
+	msg.msg_controllen = sizeof(fd_buf);
+
+	cmsg = CMSG_FIRSTHDR(&msg);
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+
+	pfd = (int *) CMSG_DATA(cmsg);
+	msg.msg_controllen = cmsg->cmsg_len;
 
 	/* first try to tx more pending data */
 	while ((ub = ubus_msg_head(cl))) {
@@ -100,25 +103,25 @@ retry:
 		int offset = cl->pending_msg_offset;
 		int bytes;
 
-		fd_buf.fd = -1;
+		*pfd = -1;
 
 		iov.iov_base = ((char *) &cl->hdrbuf) + offset;
 		iov.iov_len = sizeof(cl->hdrbuf) - offset;
 
 		if (cl->pending_msg_fd < 0) {
-			msghdr.msg_control = &fd_buf;
-			msghdr.msg_controllen = sizeof(fd_buf);
+			msg.msg_control = fd_buf;
+			msg.msg_controllen = cmsg->cmsg_len;
 		} else {
-			msghdr.msg_control = NULL;
-			msghdr.msg_controllen = 0;
+			msg.msg_control = NULL;
+			msg.msg_controllen = 0;
 		}
 
-		bytes = recvmsg(sock->fd, &msghdr, 0);
+		bytes = recvmsg(sock->fd, &msg, 0);
 		if (bytes < 0)
 			goto out;
 
-		if (fd_buf.fd >= 0)
-			cl->pending_msg_fd = fd_buf.fd;
+		if (*pfd >= 0)
+			cl->pending_msg_fd = *pfd;
 
 		cl->pending_msg_offset += bytes;
 		if (cl->pending_msg_offset < (int) sizeof(cl->hdrbuf))

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Fri Dec 27 09:04:00 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Fri, 27 Dec 2019 15:04:00 +0100
Subject: [OpenWrt-Devel] ubus and/or libubox upgrades today cause
 problems: some services do not start, logread hangs
In-Reply-To: <20191227122541.GC70184@meh.true.cz>
References: <6cb3b640-8590-d083-e5c2-63df74c7e86b@welho.com>
 <20191226225936.GB70184@meh.true.cz>
 <fa84e9a6-5b08-c680-b3ed-0ad1b3f00359@iki.fi>
 <20191227122541.GC70184@meh.true.cz>
Message-ID: <20191227140400.GD70184@meh.true.cz>

Petr ?tetiar <ynezz at true.cz> [2019-12-27 13:25:41]:

> Hannu Nyman <hannu.nyman at iki.fi> [2019-12-27 11:33:46]:
> 
> > Hopefully you/somebody will revert the ubus changes in master until then.
> 
> can you confirm, that following fix[1] actually fixes the issues you're
> seeing? Thanks.

This should be hopefully proper fix https://patchwork.ozlabs.org/patch/1215719/

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Fri Dec 27 09:15:19 2019
From: ynezz at true.cz (=?UTF-8?q?Petr=20=C5=A0tetiar?=)
Date: Fri, 27 Dec 2019 15:15:19 +0100
Subject: [OpenWrt-Devel] [PATCH v2 ubus] ubusd/libubus-io: fix socket
 descriptor passing
In-Reply-To: <20191227135922.13972-1-ynezz@true.cz>
Message-ID: <20191227141519.15626-1-ynezz@true.cz>

In commit 5d7ca8309d0a ("ubusd/libubus-io: fix variable sized struct
position warning") the position of cmsghdr struct has been changed in
order to fix clang-9 compiler warning, but it has introduced regression
in at least `logread` which hanged indefinitely.

So this patch reworks the socket descriptor passing in a way recommended
in the `cmsg(3)` manual page.

Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020840.html
Fixes: 5d7ca8309d0a ("ubusd/libubus-io: fix variable sized struct position warning")
Reported-by: Hannu Nyman <hannu.nyman at welho.com>
Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---

 changes since v1:

  - removed unnecessary rename of the `msghdr` variable to new `msg` name

 libubus-io.c | 80 ++++++++++++++++++++++++++++------------------------
 ubusd.c      | 35 ++++++++++++-----------
 ubusd_main.c | 41 ++++++++++++++-------------
 3 files changed, 83 insertions(+), 73 deletions(-)

diff --git a/libubus-io.c b/libubus-io.c
index ba1016d0fa09..3561ac462eb9 100644
--- a/libubus-io.c
+++ b/libubus-io.c
@@ -59,23 +59,24 @@ static void wait_data(int fd, bool write)
 
 static int writev_retry(int fd, struct iovec *iov, int iov_len, int sock_fd)
 {
-	static struct {
-		int fd;
-		struct cmsghdr h;
-	} fd_buf = {
-		.h = {
-			.cmsg_len = sizeof(fd_buf),
-			.cmsg_level = SOL_SOCKET,
-			.cmsg_type = SCM_RIGHTS,
-		}
-	};
-	struct msghdr msghdr = {
-		.msg_iov = iov,
-		.msg_iovlen = iov_len,
-		.msg_control = &fd_buf,
-		.msg_controllen = sizeof(fd_buf),
-	};
+	uint8_t fd_buf[CMSG_SPACE(sizeof(int))] = { 0 };
+	struct msghdr msghdr = { 0 };
+	struct cmsghdr *cmsg;
 	int len = 0;
+	int *pfd;
+
+	msghdr.msg_iov = iov,
+	msghdr.msg_iovlen = iov_len,
+	msghdr.msg_control = fd_buf;
+	msghdr.msg_controllen = sizeof(fd_buf);
+
+	cmsg = CMSG_FIRSTHDR(&msghdr);
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+
+	pfd = (int *) CMSG_DATA(cmsg);
+	msghdr.msg_controllen = cmsg->cmsg_len;
 
 	do {
 		ssize_t cur_len;
@@ -84,7 +85,7 @@ static int writev_retry(int fd, struct iovec *iov, int iov_len, int sock_fd)
 			msghdr.msg_control = NULL;
 			msghdr.msg_controllen = 0;
 		} else {
-			fd_buf.fd = sock_fd;
+			*pfd = sock_fd;
 		}
 
 		cur_len = sendmsg(fd, &msghdr, 0);
@@ -156,33 +157,38 @@ int __hidden ubus_send_msg(struct ubus_context *ctx, uint32_t seq,
 
 static int recv_retry(struct ubus_context *ctx, struct iovec *iov, bool wait, int *recv_fd)
 {
-	int bytes, total = 0;
-	int fd = ctx->sock.fd;
-	static struct {
-		int fd;
-		struct cmsghdr h;
-	} fd_buf = {
-		.h = {
-			.cmsg_type = SCM_RIGHTS,
-			.cmsg_level = SOL_SOCKET,
-			.cmsg_len = sizeof(fd_buf),
-		},
-	};
-	struct msghdr msghdr = {
-		.msg_iov = iov,
-		.msg_iovlen = 1,
-	};
+	uint8_t fd_buf[CMSG_SPACE(sizeof(int))] = { 0 };
+	struct msghdr msghdr = { 0 };
+	struct cmsghdr *cmsg;
+	int total = 0;
+	int bytes;
+	int *pfd;
+	int fd;
+
+	fd = ctx->sock.fd;
+
+	msghdr.msg_iov = iov,
+	msghdr.msg_iovlen = 1,
+	msghdr.msg_control = fd_buf;
+	msghdr.msg_controllen = sizeof(fd_buf);
+
+	cmsg = CMSG_FIRSTHDR(&msghdr);
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+
+	pfd = (int *) CMSG_DATA(cmsg);
 
 	while (iov->iov_len > 0) {
 		if (recv_fd) {
-			msghdr.msg_control = &fd_buf;
-			msghdr.msg_controllen = sizeof(fd_buf);
+			msghdr.msg_control = fd_buf;
+			msghdr.msg_controllen = cmsg->cmsg_len;
 		} else {
 			msghdr.msg_control = NULL;
 			msghdr.msg_controllen = 0;
 		}
 
-		fd_buf.fd = -1;
+		*pfd = -1;
 		bytes = recvmsg(fd, &msghdr, 0);
 		if (!bytes)
 			return -1;
@@ -199,7 +205,7 @@ static int recv_retry(struct ubus_context *ctx, struct iovec *iov, bool wait, in
 			return 0;
 
 		if (recv_fd)
-			*recv_fd = fd_buf.fd;
+			*recv_fd = *pfd;
 
 		recv_fd = NULL;
 
diff --git a/ubusd.c b/ubusd.c
index 0d43977c0bde..5993653785e0 100644
--- a/ubusd.c
+++ b/ubusd.c
@@ -82,27 +82,28 @@ void ubus_msg_free(struct ubus_msg_buf *ub)
 
 ssize_t ubus_msg_writev(int fd, struct ubus_msg_buf *ub, size_t offset)
 {
+	uint8_t fd_buf[CMSG_SPACE(sizeof(int))] = { 0 };
 	static struct iovec iov[2];
-	static struct {
-		int fd;
-		struct cmsghdr h;
-	} fd_buf = {
-		.h = {
-			.cmsg_len = sizeof(fd_buf),
-			.cmsg_level = SOL_SOCKET,
-			.cmsg_type = SCM_RIGHTS,
-		},
-	};
-	struct msghdr msghdr = {
-		.msg_iov = iov,
-		.msg_iovlen = ARRAY_SIZE(iov),
-		.msg_control = &fd_buf,
-		.msg_controllen = sizeof(fd_buf),
-	};
+	struct msghdr msghdr = { 0 };
 	struct ubus_msghdr hdr;
+	struct cmsghdr *cmsg;
 	ssize_t ret;
+	int *pfd;
 
-	fd_buf.fd = ub->fd;
+	msghdr.msg_iov = iov;
+	msghdr.msg_iovlen = ARRAY_SIZE(iov);
+	msghdr.msg_control = fd_buf;
+	msghdr.msg_controllen = sizeof(fd_buf);
+
+	cmsg = CMSG_FIRSTHDR(&msghdr);
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+
+	pfd = (int *) CMSG_DATA(cmsg);
+	msghdr.msg_controllen = cmsg->cmsg_len;
+
+	*pfd = ub->fd;
 	if (ub->fd < 0 || offset) {
 		msghdr.msg_control = NULL;
 		msghdr.msg_controllen = 0;
diff --git a/ubusd_main.c b/ubusd_main.c
index 81868c1482bc..f977ff30d12d 100644
--- a/ubusd_main.c
+++ b/ubusd_main.c
@@ -50,22 +50,25 @@ static void handle_client_disconnect(struct ubus_client *cl)
 static void client_cb(struct uloop_fd *sock, unsigned int events)
 {
 	struct ubus_client *cl = container_of(sock, struct ubus_client, sock);
+	uint8_t fd_buf[CMSG_SPACE(sizeof(int))] = { 0 };
+	struct msghdr msghdr = { 0 };
 	struct ubus_msg_buf *ub;
 	static struct iovec iov;
-	static struct {
-		int fd;
-		struct cmsghdr h;
-	} fd_buf = {
-		.h = {
-			.cmsg_type = SCM_RIGHTS,
-			.cmsg_level = SOL_SOCKET,
-			.cmsg_len = sizeof(fd_buf),
-		}
-	};
-	struct msghdr msghdr = {
-		.msg_iov = &iov,
-		.msg_iovlen = 1,
-	};
+	struct cmsghdr *cmsg;
+	int *pfd;
+
+	msghdr.msg_iov = &iov,
+	msghdr.msg_iovlen = 1,
+	msghdr.msg_control = fd_buf;
+	msghdr.msg_controllen = sizeof(fd_buf);
+
+	cmsg = CMSG_FIRSTHDR(&msghdr);
+	cmsg->cmsg_type = SCM_RIGHTS;
+	cmsg->cmsg_level = SOL_SOCKET;
+	cmsg->cmsg_len = CMSG_LEN(sizeof(int));
+
+	pfd = (int *) CMSG_DATA(cmsg);
+	msghdr.msg_controllen = cmsg->cmsg_len;
 
 	/* first try to tx more pending data */
 	while ((ub = ubus_msg_head(cl))) {
@@ -100,14 +103,14 @@ retry:
 		int offset = cl->pending_msg_offset;
 		int bytes;
 
-		fd_buf.fd = -1;
+		*pfd = -1;
 
 		iov.iov_base = ((char *) &cl->hdrbuf) + offset;
 		iov.iov_len = sizeof(cl->hdrbuf) - offset;
 
 		if (cl->pending_msg_fd < 0) {
-			msghdr.msg_control = &fd_buf;
-			msghdr.msg_controllen = sizeof(fd_buf);
+			msghdr.msg_control = fd_buf;
+			msghdr.msg_controllen = cmsg->cmsg_len;
 		} else {
 			msghdr.msg_control = NULL;
 			msghdr.msg_controllen = 0;
@@ -117,8 +120,8 @@ retry:
 		if (bytes < 0)
 			goto out;
 
-		if (fd_buf.fd >= 0)
-			cl->pending_msg_fd = fd_buf.fd;
+		if (*pfd >= 0)
+			cl->pending_msg_fd = *pfd;
 
 		cl->pending_msg_offset += bytes;
 		if (cl->pending_msg_offset < (int) sizeof(cl->hdrbuf))

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From Jason at zx2c4.com  Fri Dec 27 09:41:12 2019
From: Jason at zx2c4.com (Jason A. Donenfeld)
Date: Fri, 27 Dec 2019 15:41:12 +0100
Subject: [OpenWrt-Devel] [PATCH] wireguard: bump to 20191226
Message-ID: <20191227144112.984987-1-Jason@zx2c4.com>

As announced on the mailing list, WireGuard will be in Linux 5.6. As a
result, the wg(8) tool, used by OpenWRT in the same manner as ip(8), is
moving to its own wireguard-tools repo. Meanwhile, the out-of-tree
kernel module for kernels 3.10 - 5.5 moved to its own wireguard-linux-
compat repo. Yesterday, releases were cut out of these repos, so this
commit bumps packages to match. Since wg(8) and the compat kernel module
are versioned and released separately, we create a wireguard-tools
Makefile to contain the source for the new tools repo. Later, when
OpenWRT moves permanently to Linux 5.6, we'll drop the original module
package, leaving only the tools. So this commit shuffles the build
definition around a bit but is basically the same idea as before.

Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
---
 package/network/services/wireguard/Makefile   | 41 +++-----------
 .../network/utils/wireguard-tools/Makefile    | 54 +++++++++++++++++++
 .../wireguard-tools}/files/wireguard.sh       |  0
 .../wireguard-tools}/files/wireguard_watchdog |  0
 4 files changed, 61 insertions(+), 34 deletions(-)
 create mode 100644 package/network/utils/wireguard-tools/Makefile
 rename package/network/{services/wireguard => utils/wireguard-tools}/files/wireguard.sh (100%)
 rename package/network/{services/wireguard => utils/wireguard-tools}/files/wireguard_watchdog (100%)

diff --git a/package/network/services/wireguard/Makefile b/package/network/services/wireguard/Makefile
index 2849361733..c379b712dd 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2016-2018 Jason A. Donenfeld <Jason at zx2c4.com>
+# Copyright (C) 2016-2019 Jason A. Donenfeld <Jason at zx2c4.com>
 # Copyright (C) 2016 Baptiste Jonglez <openwrt at bitsofnetworks.org>
 # Copyright (C) 2016-2017 Dan Luedtke <mail at danrl.com>
 #
@@ -11,17 +11,17 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=wireguard
 
-PKG_VERSION:=0.0.20191219
+PKG_VERSION:=0.0.20191226
 PKG_RELEASE:=1
 
-PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
-PKG_HASH:=5aba6f0c38e97faa0b155623ba594bb0e4bd5e29deacd8d5ed8bda8d8283b0e7
+PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/
+PKG_HASH:=7c0e576459c6337bcdea692bdbec561719a15da207dc739e0e3e60ff821a5491
 
-PKG_LICENSE:=GPL-2.0 Apache-2.0
+PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
-PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/WireGuard-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/wireguard-linux-compat-$(PKG_VERSION)
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
 
@@ -56,13 +56,8 @@ endef
 include $(INCLUDE_DIR)/kernel-defaults.mk
 include $(INCLUDE_DIR)/package-defaults.mk
 
-# Used by Build/Compile/Default
-MAKE_PATH:=src/tools
-MAKE_VARS += PLATFORM=linux
-
 define Build/Compile
 	$(MAKE) $(KERNEL_MAKEOPTS) M="$(PKG_BUILD_DIR)/src" modules
-	$(call Build/Compile/Default)
 endef
 
 define Package/wireguard/install
@@ -73,27 +68,6 @@ define Package/wireguard/description
   $(call Package/wireguard/Default/description)
 endef
 
-define Package/wireguard-tools
-  $(call Package/wireguard/Default)
-  TITLE:=WireGuard userspace control program (wg)
-  DEPENDS:=+libmnl +ip
-endef
-
-define Package/wireguard-tools/description
-  $(call Package/wireguard/Default/description)
-
-  This package provides the userspace control program for WireGuard,
-  `wg(8)`, a netifd protocol helper, and a re-resolve watchdog script.
-endef
-
-define Package/wireguard-tools/install
-	$(INSTALL_DIR) $(1)/usr/bin/
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/wg $(1)/usr/bin/
-	$(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
-	$(INSTALL_DIR) $(1)/lib/netifd/proto/
-	$(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
-endef
-
 define KernelPackage/wireguard
   SECTION:=kernel
   CATEGORY:=Kernel modules
@@ -111,5 +85,4 @@ define KernelPackage/wireguard/description
 endef
 
 $(eval $(call BuildPackage,wireguard))
-$(eval $(call BuildPackage,wireguard-tools))
 $(eval $(call KernelPackage,wireguard))
diff --git a/package/network/utils/wireguard-tools/Makefile b/package/network/utils/wireguard-tools/Makefile
new file mode 100644
index 0000000000..2f6d307094
--- /dev/null
+++ b/package/network/utils/wireguard-tools/Makefile
@@ -0,0 +1,54 @@
+#
+# Copyright (C) 2016-2019 Jason A. Donenfeld <Jason at zx2c4.com>
+# Copyright (C) 2016 Baptiste Jonglez <openwrt at bitsofnetworks.org>
+# Copyright (C) 2016-2017 Dan Luedtke <mail at danrl.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=wireguard-tools
+
+PKG_VERSION:=1.0.20191226
+PKG_RELEASE:=1
+
+PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
+PKG_HASH:=aa8af0fdc9872d369d8c890a84dbc2a2466b55795dccd5b47721b2d97644b04f
+
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/package-defaults.mk
+
+MAKE_PATH:=src
+MAKE_VARS += PLATFORM=linux
+
+define Package/wireguard-tools
+  $(call Package/wireguard/Default)
+  TITLE:=WireGuard userspace control program (wg)
+  DEPENDS:=+libmnl +ip
+endef
+
+define Package/wireguard-tools/description
+  $(call Package/wireguard/Default/description)
+
+  This package provides the userspace control program for WireGuard,
+  `wg(8)`, a netifd protocol helper, and a re-resolve watchdog script.
+endef
+
+define Package/wireguard-tools/install
+	$(INSTALL_DIR) $(1)/usr/bin/
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wg $(1)/usr/bin/
+	$(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
+	$(INSTALL_DIR) $(1)/lib/netifd/proto/
+	$(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
+endef
+
+$(eval $(call BuildPackage,wireguard-tools))
diff --git a/package/network/services/wireguard/files/wireguard.sh b/package/network/utils/wireguard-tools/files/wireguard.sh
similarity index 100%
rename from package/network/services/wireguard/files/wireguard.sh
rename to package/network/utils/wireguard-tools/files/wireguard.sh
diff --git a/package/network/services/wireguard/files/wireguard_watchdog b/package/network/utils/wireguard-tools/files/wireguard_watchdog
similarity index 100%
rename from package/network/services/wireguard/files/wireguard_watchdog
rename to package/network/utils/wireguard-tools/files/wireguard_watchdog
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From hannu.nyman at welho.com  Fri Dec 27 09:44:39 2019
From: hannu.nyman at welho.com (Hannu Nyman)
Date: Fri, 27 Dec 2019 16:44:39 +0200
Subject: [OpenWrt-Devel] [PATCH v2 ubus] ubusd/libubus-io: fix socket
 descriptor passing
In-Reply-To: <20191227141519.15626-1-ynezz@true.cz>
References: <20191227141519.15626-1-ynezz@true.cz>
Message-ID: <e6cf33a5-4716-290a-bb88-79fe8b3919a2@welho.com>

Petr ?tetiar kirjoitti 27.12.2019 klo 16.15:
> In commit 5d7ca8309d0a ("ubusd/libubus-io: fix variable sized struct
> position warning") the position of cmsghdr struct has been changed in
> order to fix clang-9 compiler warning, but it has introduced regression
> in at least `logread` which hanged indefinitely.
>
> So this patch reworks the socket descriptor passing in a way recommended
> in the `cmsg(3)` manual page.
>
> Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-December/020840.html
> Fixes: 5d7ca8309d0a ("ubusd/libubus-io: fix variable sized struct position warning")
> Reported-by: Hannu Nyman <hannu.nyman at welho.com>
> Signed-off-by: Petr ?tetiar <ynezz at true.cz>
> ---

That seems to take care of the logread problem. Thanks.

But neither collectd not nlbwmon starts. They are still broken with the 
current ubus.


Looking now at the (again working) system log reveals:

root at router2:~# logread | grep collectd
Fri Dec 27 16:23:37 2019 daemon.info procd: Not starting instance 
collectd::instance1, command not set
root at router2:~# logread | grep nlbwmon
Fri Dec 27 16:23:33 2019 daemon.info procd: Not starting instance 
nlbwmon::instance1, command not set



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From dedeckeh at gmail.com  Fri Dec 27 10:30:57 2019
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Fri, 27 Dec 2019 16:30:57 +0100
Subject: [OpenWrt-Devel] [OpenWrt-Devel, V3,
 2/2] kmodloader: added -a arg to modprobe
In-Reply-To: <CAKycSdBphp4zdRNM2xkMhSWawQDa5=703q_FN3+4_XvPJJXGLA@mail.gmail.com>
References: <20191022090743.1487-1-G.M0N3Y.2503@gmail.com>
 <CAKycSdBphp4zdRNM2xkMhSWawQDa5=703q_FN3+4_XvPJJXGLA@mail.gmail.com>
Message-ID: <CAJLcKsFUuH73vqSF-E-KQ8E=FW6fQ3e0xp60oXnKE1wiha3jqw@mail.gmail.com>

On Sat, Dec 21, 2019 at 2:32 AM Gerard Ryan <g.m0n3y.2503 at gmail.com> wrote:
>
> Does anyone have any tips on how to expedite the review of this patch?
> Am I missing something or is the patch malformed?
Patch looks fine; some style comments inline

Hans
>
> Thanks in advance,
> Gerard
>
> On Tue, Oct 22, 2019 at 7:08 PM Gerard Ryan <g.m0n3y.2503 at gmail.com> wrote:
> >
> > -a treats all non-op trailing arguments as module names
> > and attempts to load all of them. This behaviour mirrors the behaviour
> > of the respective -a in /tools/modprobe.c from https://git.kernel.org.
> >
> > This is primarily to satiate the multiple modules passed by
> > docker/libnetwork.
> >
> > Signed-off-by: Gerard Ryan <G.M0N3Y.2503 at gmail.com>
> > ---
> > Compile tested: x86_x64, Hyper-V, OpenWrt Master
> > Run tested: x86_x64, Hyper-V, OpenWrt Master
> >
> > You can also find this patch on GitHub if you prefer.
> > https://github.com/G-M0N3Y-2503/openwrt-ubox-mirror/tree/feature_extend_modprobe_options
> >
> > Since https://patchwork.ozlabs.org/patch/1175792/ I adjusted some whitespace to indent more consistently and split the patch by the args they implement.
> > Since https://patchwork.ozlabs.org/patch/1179955/ I reworded the commit message to explain the functionality of -a
> >
> >  kmodloader.c | 68 +++++++++++++++++++++++++++++-----------------------
> >  1 file changed, 38 insertions(+), 30 deletions(-)
> >
> > diff --git a/kmodloader.c b/kmodloader.c
> > index 07b6700..838bc8c 100644
> > --- a/kmodloader.c
> > +++ b/kmodloader.c
> > @@ -681,6 +681,7 @@ static int print_modprobe_usage(void)
> >         ULOG_INFO(
> >                 "Usage:\n"
> >                 "\tmodprobe [-q] [-v] filename\n"
> > +               "\tmodprobe -a [-q] [-v] filename [filename...]\n"
> >         );
> >
> >         return -1;
> > @@ -854,16 +855,20 @@ static int main_modinfo(int argc, char **argv)
> >
> >  static int main_modprobe(int argc, char **argv)
> >  {
> > +       int exit_code = EXIT_SUCCESS;
Group this line with the other int parameter declarations below; for
alignment with other functions like lsmod and rmmod I prefer to set
exit_code to 0.
Another alternative is to change this for all functions but then in a
separate patch.
> >         struct module_node *mn;
> >         struct module *m;
> > -       char *name;
> > -       char *mod = NULL;
> > +       int load_fail;
> >         int log_level = LOG_WARNING;
> >         int opt;
> >         bool quiet = false;
> > +       bool use_all = false;
> >
> > -       while ((opt = getopt(argc, argv, "qv")) != -1 ) {
> > +       while ((opt = getopt(argc, argv, "aqv")) != -1 ) {
> >                 switch (opt) {
> > +                       case 'a':
> > +                               use_all = true;
> > +                               break;
> >                         case 'q': /* shhhh! */
> >                                 quiet = true;
> >                                 break;
> > @@ -882,48 +887,51 @@ static int main_modprobe(int argc, char **argv)
> >         /* after print_modprobe_usage() so it won't be filtered out */
> >         ulog_threshold(log_level);
> >
> > -       mod = argv[optind];
> > -
> >         if (scan_module_folders())
> >                 return -1;
> >
> >         if (scan_loaded_modules())
> >                 return -1;
> >
> > -       name = get_module_name(mod);
> > -       m = find_module(name);
> > -       if (m && m->state == LOADED) {
> > -               if (!quiet)
> > -                       ULOG_ERR("%s is already loaded\n", name);
> > -               return 0;
> > -       } else if (!m) {
> > -               if (!quiet)
> > -                       ULOG_ERR("failed to find a module named %s\n", name);
> > -               return -1;
> > -       } else {
> > -               int fail;
> > +       do {
> > +               char *name;
> >
> > -               m->state = PROBE;
> > +               name = get_module_name(argv[optind]);
> > +               m = find_module(name);
> >
> > -               fail = load_modprobe(true);
> > +               if (m && m->state == LOADED) {
> > +                       if (!quiet)
> > +                               ULOG_INFO("%s is already loaded\n", name);
> > +               } else if (!m) {
> > +                       if (!quiet)
> > +                               ULOG_ERR("failed to find a module named %s\n", name);
> > +                       exit_code = EXIT_FAILURE;
Same as above use -1 for alignment with other functions
> > +               } else {
> > +                       m->state = PROBE;
> > +               }
> >
> > -               if (fail) {
> > -                       ULOG_ERR("%d module%s could not be probed\n",
> > -                                fail, (fail == 1) ? ("") : ("s"));
> > +               optind++;
> > +       } while (use_all && optind < argc);
> >
> > -                       avl_for_each_element(&modules, mn, avl) {
> > -                               if (mn->is_alias)
> > -                                       continue;
> > -                               m = mn->m;
> > -                               if ((m->state == PROBE) || m->error)
> > -                                       ULOG_ERR("- %s\n", m->name);
> > -                       }
> > +       load_fail = load_modprobe(true);
> > +       if (load_fail) {
> > +               ULOG_ERR("%d module%s could not be probed\n",
> > +                        load_fail, (load_fail == 1) ? ("") : ("s"));
> > +
> > +               avl_for_each_element(&modules, mn, avl) {
> > +                       if (mn->is_alias)
> > +                               continue;
> > +                       m = mn->m;
> > +                       if ((m->state == PROBE) || m->error)
> > +                               ULOG_ERR("- %s\n", m->name);
> >                 }
> > +
> > +               exit_code = EXIT_FAILURE;
Same as above use -1 for alignment with other functions
> >         }
> >
> >         free_modules();
> >
> > -       return 0;
> > +       return exit_code;
> >  }
> >
> >  static int main_loader(int argc, char **argv)
> > --
> > 2.17.1
> >
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Fri Dec 27 14:34:33 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Fri, 27 Dec 2019 20:34:33 +0100
Subject: [OpenWrt-Devel] [PATCH] [19.07] ramips: rename DIR-860L entries
 according to the new manufacturer / device spec
In-Reply-To: <9339FD6D-FDED-4104-A6A4-9BE03124F192@volatilesystems.org>
References: <20191225143851.12368-1-foss@volatilesystems.org>
 <00ce01d5bc41$d1e99520$75bcbf60$@adrianschmutzler.de>
 <9339FD6D-FDED-4104-A6A4-9BE03124F192@volatilesystems.org>
Message-ID: <03d001d5bcec$aa805ae0$ff8110a0$@adrianschmutzler.de>

Hi,

> >> Master had this updated a while ago, it's okay there.
> >
> >Though I'm a big fan of unification and made an effort to have this
> >sorted out in master, I do not think backporting those device name
> >changes is very helpful. This will create additional work, but
> >effectively it will just move the "break" from 19.07/master to
> >18.06/19.07.
> >
> >As a cosmetic issue, it wouldn't be a candidate for backporting under
> >normal circumstances, too.
> 
> Well it was worth trying ?
> 
> Stijn

Somebody marked it as "Accepted" in patchwork. So, either that was a mistake, or you are lucky and another committer had a different opinion on this. Let's see ...

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191227/b78ef720/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at adrianschmutzler.de  Fri Dec 27 14:59:56 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Fri, 27 Dec 2019 20:59:56 +0100
Subject: [OpenWrt-Devel] [PATCH v2] ramips: rename DIR-860L entries
 according to the new manufacturer / device spec
In-Reply-To: <20191226191211.5262-1-foss@volatilesystems.org>
References: <20191226191211.5262-1-foss@volatilesystems.org>
Message-ID: <04e401d5bcf0$36d83690$a488a3b0$@adrianschmutzler.de>

Hi again,

> -define Device/dir-860l-b1
> +define Device/dlink_dir-860l-b1

This would break sysupgrade, as SUPPORTED_DEVICES is derived from device definition name, and thus would change.
So, this shouldn't be applied if someone really plans to do it.

BTW That's a good example of why backporting this selectively is painful indeed ;-)

Best

Adrian

>    $(Device/seama)
>    DTS := DIR-860L-B1
>    BLOCKSIZE := 64k
> @@ -120,7 +120,7 @@ define Device/dir-860l-b1
>    DEVICE_TITLE := D-Link DIR-860L B1
>    DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport
> wpad-basic  endef -TARGET_DEVICES += dir-860l-b1
> +TARGET_DEVICES += dlink_dir-860l-b1
> 
>  define Device/mediatek_ap-mt7621a-v60
>    DTS := AP-MT7621A-V60
> --
> 2.20.1
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191227/b7571215/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at adrianschmutzler.de  Fri Dec 27 15:04:06 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Fri, 27 Dec 2019 21:04:06 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix port setup for Ubiquiti
 EdgeRouter X (and SFP)
In-Reply-To: <b3565dbd-88aa-2346-3f7c-7db8183af98b@universe-factory.net>
References: <20191216123110.22741-1-freifunk@adrianschmutzler.de>
 <b3565dbd-88aa-2346-3f7c-7db8183af98b@universe-factory.net>
Message-ID: <04f601d5bcf0$cbc02d80$63408880$@adrianschmutzler.de>

Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Matthias Schiffer
> Sent: Montag, 16. Dezember 2019 21:25
> To: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> Cc: openwrt-devel at lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] ramips: fix port setup for Ubiquiti
> EdgeRouter X (and SFP)
> 
> On 12/16/19 1:31 PM, Adrian Schmutzler wrote:
> > The EdgeRouter only has LAN ports labelled eth0 to eth4 (plus
> > unsupported eth5 for SFP version). Thus, there is no reason to set up
> > one of them as WAN.
> >
> > This patch sets all ports to "lan" and removes the unused wan_mac.
> >
> > Actually, stock firmware on the EdgeRouter X assigns a specific MAC
> > address to each port:
> >
> > eth0    *:f4 (label)
> > eth1    *:f5
> > eth2    *:f6
> > eth3    *:f7
> > eth4    *:f8
> > switch0 *:f9
> >
> > (No data for SFP version)
> >
> > Only the label MAC is stored on flash in factory 0x22.
> >
> > OpenWrt currently sets &ethernet to this address, so all ports will
> > use that one in OpenWrt.
> >
> > Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> 
> Having a WAN port by default is extremely useful (and necessary for easy
> automatic configuration by OpenWrt-based frameworks like Gluon without
> having to special-case many devices).
> 
> I would prefer if we could always make one port WAN as long as we have at
> least two independently configurable ports, regardless of labeling - at least
> that was my policy for creating new hardware support in the past.
> 
> Regards,
> Matthias

I received feedback from two people about this, and both were against merging this.

So I will not merge it and mark the patch as rejected.

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191227/e0bb8492/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at adrianschmutzler.de  Fri Dec 27 15:07:40 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Fri, 27 Dec 2019 21:07:40 +0100
Subject: [OpenWrt-Devel] [PATCH 19.07] ath79: add support for gl-ar750
In-Reply-To: <20191213195046.13358-1-devel-sven@geroedel.de>
References: <20191213195046.13358-1-devel-sven@geroedel.de>
Message-ID: <050601d5bcf1$4b43c350$e1cb49f0$@adrianschmutzler.de>

Hi Sven,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Sven Roederer
> Sent: Freitag, 13. Dezember 2019 20:51
> To: openwrt-devel at lists.openwrt.org
> Cc: Luochongjun <luochongjun at gl-inet.com>
> Subject: [OpenWrt-Devel] [PATCH 19.07] ath79: add support for gl-ar750

thanks for your work, but for the reasons I wrote earlier I do not think this should be backported.

Since nobody else volunteered to do it in the meantime, I will mark this patch as rejected.

Please do not feel repelled by that, and continue to contribute to OpenWrt!

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191227/5e20dea2/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From devel-sven at geroedel.de  Fri Dec 27 15:42:09 2019
From: devel-sven at geroedel.de (devel-sven at geroedel.de)
Date: Fri, 27 Dec 2019 21:42:09 +0100
Subject: [OpenWrt-Devel] [19.07] backport "build: have scripts/feeds honor
 all toplevel .mk-files of a feed"
Message-ID: <39ac86a1c93b970341364da9b19dbb7d@geroedel.de>

Hi,

can anyone cherry-pick b81cee86e63d4421072839ec8a3780d8afff9337 to 19.07 
?


Thanks, Sven

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From devel-sven at geroedel.de  Fri Dec 27 16:11:42 2019
From: devel-sven at geroedel.de (devel-sven at geroedel.de)
Date: Fri, 27 Dec 2019 22:11:42 +0100
Subject: [OpenWrt-Devel] [PATCH 19.07] ath79: add support for gl-ar750
In-Reply-To: <050601d5bcf1$4b43c350$e1cb49f0$@adrianschmutzler.de>
References: <20191213195046.13358-1-devel-sven@geroedel.de>
 <050601d5bcf1$4b43c350$e1cb49f0$@adrianschmutzler.de>
Message-ID: <311866a7bd8bb4be6cbc24fae358e9ad@geroedel.de>

Hi Adrian,

On 2019-12-27 21:07, mail at adrianschmutzler.de wrote:
> 
> thanks for your work, but for the reasons I wrote earlier I do not
> think this should be backported.
> 

Just for reference: I assume you are referencing to 
https://github.com/openwrt/openwrt/pull/2574#issuecomment-559460188,
which is quite the same situation.

> 
> Please do not feel repelled by that, and continue to contribute to 
> OpenWrt!
> 

I fully understand the decision and looking forward to the 19.07 
release.

Sven

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sat Dec 28 01:51:42 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Fri, 27 Dec 2019 22:51:42 -0800
Subject: [OpenWrt-Devel] [PATCH] nettle: Disable ARMEB assembly
Message-ID: <20191228065142.15666-1-rosenp@gmail.com>

It's broken for ARMv5, which is the only armeb target in OpenWrt.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/libs/nettle/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/libs/nettle/Makefile b/package/libs/nettle/Makefile
index 62c39702ed..b9324e4793 100644
--- a/package/libs/nettle/Makefile
+++ b/package/libs/nettle/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nettle
 PKG_VERSION:=3.5.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -55,6 +55,11 @@ CONFIGURE_ARGS += \
 	--enable-arm-neon
 endif
 
+ifeq ($(ARCH),armeb)
+CONFIGURE_ARGS += \
+	--disable-assembler
+endif
+
 define Build/Compile
 	$(call Build/Compile/Default, \
 		DESTDIR="$(PKG_INSTALL_DIR)" \
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Sat Dec 28 05:27:56 2019
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Sat, 28 Dec 2019 11:27:56 +0100
Subject: [OpenWrt-Devel] [PATCH fstools] Revert "block: mount_action:
 handle mount/umount deps"
In-Reply-To: <CAECwjAjw7dkkgqSd47N55XC1JwLNWUMTQQHSJdJ5y4fEhnoYDw@mail.gmail.com>
References: <20191227085335.10144-1-zajec5@gmail.com>
 <CAECwjAjw7dkkgqSd47N55XC1JwLNWUMTQQHSJdJ5y4fEhnoYDw@mail.gmail.com>
Message-ID: <f4eacae6-bfea-c9b5-4b00-f0a349639e93@gmail.com>

On 27.12.2019 13:25, Yousong Zhou wrote:
> On Fri, 27 Dec 2019 at 16:53, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
>>
>> From: Rafa? Mi?ecki <rafal at milecki.pl>
>>
>> This reverts commit 32c3126b2f0464106d74317336b6aef1d7d5f82f.
>>
>> Internal list of devices guarantees some basic sorting (by device type
>> and then a name) but nothing more. In particular it's not guaranteed
>> (and it's actually quite uncommon) that all preceding entries are parent
>> devices.
>>
>> Mounting all preceding devices may easily result in unrelated mounts.
>> They can fail easily basically breaking original mounting attempt, e.g.:
>>
>> daemon.err blockd: kernel is requesting a mount -> sda2
>> daemon.err block: /dev/sda1 is already mounted on /tmp/run/blockd/sda1
>> daemon.err block: autofs: "add" action has failed: -1
>> daemon.err blockd: failed to run block. add/sda2
> 
> Sorry for the inconvenience.  But the error (regression) should be
> caused by 2f2a09ad ("block: mount_device: err log only when mp
> deviates from spec").  m->target is expected to match the actual mount
> point only when it is not managed by blockd (m->autofs).
> 
> Please see if the following patch works.  We can also check if m is
> managed by autofs and m->target a symlink whose target matches mp, but
> that's a bit overkill.
> 
> --- a/block.c
> +++ b/block.c
> @@ -1100,7 +1100,7 @@ static int mount_device(struct device *dev, int type)
> 
>          mp = find_mount_point(pr->dev);
>          if (mp) {
> -               if (m && m->type == TYPE_MOUNT && strcmp(m->target, mp)) {
> +               if (m && !m->autofs && m->type == TYPE_MOUNT && strcmp(m->target, mp)) {
>                          ULOG_ERR("%s is already mounted on %s\n", pr->dev, mp);
>                          err = -1;
>                  } else
> 

You're right about that error and your diff indeed fixes that:
/dev/sda1 is already mounted on /tmp/run/blockd/sda1
for me. It still doesn't fix mounting unneeded devices though.


Please check this:

# mount | grep "/dev/sd"

# ls /var/run/blockd/sdb2
b.txt

# mount | grep "/dev/sd"
/dev/sda1 on /tmp/run/blockd/sda1 type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda2 on /tmp/run/blockd/sda2 type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sdb1 on /tmp/run/blockd/sdb1 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
/dev/sdb2 on /tmp/run/blockd/sdb2 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)

As you can see, accessing "sdb2" partition resulted in mounting 3 other
partitions that I don't need at all. Including spinning 1 unused disk!


>> If some dependency handling is required it should be implemented
>> explicitly as current solution isn't reliable and it breaks autofs when
>> using multiple devices (partitions).
>>
> 
> Dependencies are directly implied by mount target as specified in the
> uci config file.  This relationship is inherently there.  E.g.
> 
>   1. mount target /mnt/a
>   2. mount target /mnt/a/b
> 
> Then "1" must mount before "2".  "2" before "1" is not practically
> useful in any way.

That relationship/dependency isn't directly parsed by fstools in any
way. By making it explicit I thought of something like:

config 'mount' '/dev/vdc'
	option	target	'/mnt'
	option	uuid	'AAAA'
	option	enabled	'1'
	option	autofs	'1'

config 'mount' '/dev/vdb'
	option	parent	'/dev/vdc/
	option	target	'/mnt/s'
	option	uuid	'BBBB'
	option	enabled	'1'
	option	autofs	'1'

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hannu.nyman at iki.fi  Sat Dec 28 05:53:27 2019
From: hannu.nyman at iki.fi (Hannu Nyman)
Date: Sat, 28 Dec 2019 12:53:27 +0200
Subject: [OpenWrt-Devel] ubus and/or libubox upgrades today cause
 problems: some services do not start, logread hangs
In-Reply-To: <20191227140400.GD70184@meh.true.cz>
References: <6cb3b640-8590-d083-e5c2-63df74c7e86b@welho.com>
 <20191226225936.GB70184@meh.true.cz>
 <fa84e9a6-5b08-c680-b3ed-0ad1b3f00359@iki.fi>
 <20191227122541.GC70184@meh.true.cz> <20191227140400.GD70184@meh.true.cz>
Message-ID: <4befe9c3-419b-5903-9db5-bc0518634234@iki.fi>

Petr ?tetiar kirjoitti 27.12.2019 klo 16.04:
> Petr ?tetiar <ynezz at true.cz> [2019-12-27 13:25:41]:
>
>> Hannu Nyman <hannu.nyman at iki.fi> [2019-12-27 11:33:46]:
>>
>>> Hopefully you/somebody will revert the ubus changes in master until then.
>> can you confirm, that following fix[1] actually fixes the issues you're
>> seeing? Thanks.
> This should be hopefully proper fix https://patchwork.ozlabs.org/patch/1215719/
>
> -- ynezz


Your (now merged) patch fixes the logread problem, but does not fix the more 
serious bug of not starting all services.

Services not starting is pretty serious, so I really do think that a revert 
to the situation before these "tests, fuzzing, fixes and improvements" 
changes in ubus and libubox might be a proper solution until a real fix is 
found for the breakage.


For me, at least collectd and nlbwmon do not start. Based on forum 
discussion, also samba4 does not start (link below). I suspect that quite 
many services do not start, but those two are the ones that I recognise 
easily from my own build.? (Could it be that core services from the main 
OpenWrt sources (like hostad, odhcp6c, dropbear,..) do start, but the others 
from feeds do not start???? Strange if that is true, as everything is built 
in one run.)? Forum discussion: 
https://forum.openwrt.org/t/logread-blank-on-master/51224/5

I did a full rebuild of everything (after "make dirclean") at 
r11826-9941edc724, and still I have the same problem with ipq806x/R7800.


I suspect that somehow your changes on ubus have made procd and ubus to not 
be in sync.

Like I wrote yesterday, the (now fixed) system log shows the procd error for 
collectd:
Sat Dec 28 11:54:14 2019 daemon.info procd: Not starting instance 
collectd::instance1, command not set

I have compared the ubus debug output in "ubus monitor" before the ubus and 
libubox changes, and the situation after. Below is the comparison. In the 
current situation, two messages are missing, as apparently procd determines 
that there are no such instances/services/commands to be launched.

These two lines from ubus messaging are currently missing:

<- b3f2e7fd #6f8d7a5c???????? notify: 
{"objid":1871542876,"method":"instance.start","data":{"service":"collectd","instance":"instance1"},"no_reply":true}
<- b3f2e7fd #6f8d7a5c???????? notify: 
{"objid":1871542876,"method":"service.start","data":{"service":"collectd"},"no_reply":true}


Below is the result of "/etc/init.d/collectd start" command:


Before (ubus and libubox changes reverted yesterday):

OpenWrt SNAPSHOT, r11816-d5ede68f8b
 ?-----------------------------------------------------

 ?Collectd starts ok

root at OpenWrt:~# ubus monitor
-> 33c383da #00000003???????? status: {"status":0}
-> 8051051e #8051051e????????? hello: {}
<- 8051051e #00000000???????? lookup: {"objpath":"service"}
-> 8051051e #00000000?????????? data: 
{"objpath":"service","objid":1871542876,"objtype":-1561500561,"signature":{"set":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"add":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"list":{"name":3,"verbose":7},"delete":{"name":3,"instance":3},"signal":{"name":3,"instance":3,"signal":5},"update_start":{"name":3},"update_complete":{"name":3},"event":{"type":3,"data":2},"validate":{"package":3,"type":3,"service":3},"get_data":{"name":3,"instance":3,"type":3},"state":{"spawn":7,"name":3}}}
-> 8051051e #00000000???????? status: {"status":0}
<- 8051051e #6f8d7a5c???????? invoke: 
{"objid":1871542876,"method":"set","data":{"name":"collectd","script":"/etc/init.d/collectd","instances":{"instance1":{"command":["/usr/sbin/collectd","-C","/tmp/collectd.conf","-f"],"nice":5,"stderr":true,"respawn":["3600","5","5"]}},"triggers":[["config.change",["if",["eq","package","collectd"],["run_script","/etc/init.d/collectd","reload"]],1000]],"data":{}}}
-> b3f2e7fd #8051051e???????? invoke: 
{"objid":1871542876,"method":"set","data":{"name":"collectd","script":"/etc/init.d/collectd","instances":{"instance1":{"command":["/usr/sbin/collectd","-C","/tmp/collectd.conf","-f"],"nice":5,"stderr":true,"respawn":["3600","5","5"]}},"triggers":[["config.change",["if",["eq","package","collectd"],["run_script","/etc/init.d/collectd","reload"]],1000]],"data":{}},"user":"root","group":"root"}
<- b3f2e7fd #6f8d7a5c???????? notify: 
{"objid":1871542876,"method":"instance.start","data":{"service":"collectd","instance":"instance1"},"no_reply":true}
<- b3f2e7fd #6f8d7a5c???????? notify: 
{"objid":1871542876,"method":"service.start","data":{"service":"collectd"},"no_reply":true}
<- b3f2e7fd #8051051e???????? status: {"status":0,"objid":1871542876}
-> 8051051e #6f8d7a5c???????? status: {"status":0,"objid":1871542876}
-> 91c6d62e #91c6d62e????????? hello: {}
<- 91c6d62e #00000000???????? lookup: {"objpath":"service"}
-> 91c6d62e #00000000?????????? data: 
{"objpath":"service","objid":1871542876,"objtype":-1561500561,"signature":{"set":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"add":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"list":{"name":3,"verbose":7},"delete":{"name":3,"instance":3},"signal":{"name":3,"instance":3,"signal":5},"update_start":{"name":3},"update_complete":{"name":3},"event":{"type":3,"data":2},"validate":{"package":3,"type":3,"service":3},"get_data":{"name":3,"instance":3,"type":3},"state":{"spawn":7,"name":3}}}
-> 91c6d62e #00000000???????? status: {"status":0}
<- 91c6d62e #6f8d7a5c???????? invoke: 
{"objid":1871542876,"method":"list","data":{"name":"collectd"}}
-> b3f2e7fd #91c6d62e???????? invoke: 
{"objid":1871542876,"method":"list","data":{"name":"collectd"},"user":"root","group":"root"}
<- b3f2e7fd #91c6d62e?????????? data: 
{"objid":1871542876,"data":{"collectd":{"instances":{"instance1":{"running":true,"pid":9053,"command":["/usr/sbin/collectd","-C","/tmp/collectd.conf","-f"],"term_timeout":5,"respawn":{"threshold":3600,"timeout":5,"retry":5}}}}}}
-> 91c6d62e #6f8d7a5c?????????? data: 
{"objid":1871542876,"data":{"collectd":{"instances":{"instance1":{"running":true,"pid":9053,"command":["/usr/sbin/collectd","-C","/tmp/collectd.conf","-f"],"term_timeout":5,"respawn":{"threshold":3600,"timeout":5,"retry":5}}}}}}
<- b3f2e7fd #91c6d62e???????? status: {"status":0,"objid":1871542876}
-> 91c6d62e #6f8d7a5c???????? status: {"status":0,"objid":1871542876}


After (the current system):

 ?OpenWrt SNAPSHOT, r11826-9941edc724
 ?-----------------------------------------------------
root at OpenWrt:~# ubus monitor
-> 9fdc704a #00000003???????? status: {"status":0}
-> 7a865230 #7a865230????????? hello: {}
<- 7a865230 #00000000???????? lookup: {"objpath":"service"}
-> 7a865230 #00000000?????????? data: 
{"objpath":"service","objid":1565828036,"objtype":-1441295836,"signature":{"set":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"add":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"list":{"name":3,"verbose":7},"delete":{"name":3,"instance":3},"signal":{"name":3,"instance":3,"signal":5},"update_start":{"name":3},"update_complete":{"name":3},"event":{"type":3,"data":2},"validate":{"package":3,"type":3,"service":3},"get_data":{"name":3,"instance":3,"type":3},"state":{"spawn":7,"name":3}}}
-> 7a865230 #00000000???????? status: {"status":0}
<- 7a865230 #5d54a3c4???????? invoke: 
{"objid":1565828036,"method":"set","data":{"name":"collectd","script":"/etc/init.d/collectd","instances":{"instance1":{"command":["/usr/sbin/collectd","-C","/tmp/collectd.conf","-f"],"nice":5,"stderr":true,"respawn":["3600","5","5"]}},"triggers":[["config.change",["if",["eq","package","collectd"],["run_script","/etc/init.d/collectd","reload"]],1000]],"data":{}}}
-> 5a86d6d9 #7a865230???????? invoke: 
{"objid":1565828036,"method":"set","data":{"name":"collectd","script":"/etc/init.d/collectd","instances":{"instance1":{"command":["/usr/sbin/collectd","-C","/tmp/collectd.conf","-f"],"nice":5,"stderr":true,"respawn":["3600","5","5"]}},"triggers":[["config.change",["if",["eq","package","collectd"],["run_script","/etc/init.d/collectd","reload"]],1000]],"data":{}},"user":"root","group":"root"}
<- 5a86d6d9 #7a865230???????? status: {"status":0,"objid":1565828036}
-> 7a865230 #5d54a3c4???????? status: {"status":0,"objid":1565828036}
-> 5c5a8fe3 #5c5a8fe3????????? hello: {}
<- 5c5a8fe3 #00000000???????? lookup: {"objpath":"service"}
-> 5c5a8fe3 #00000000?????????? data: 
{"objpath":"service","objid":1565828036,"objtype":-1441295836,"signature":{"set":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"add":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"list":{"name":3,"verbose":7},"delete":{"name":3,"instance":3},"signal":{"name":3,"instance":3,"signal":5},"update_start":{"name":3},"update_complete":{"name":3},"event":{"type":3,"data":2},"validate":{"package":3,"type":3,"service":3},"get_data":{"name":3,"instance":3,"type":3},"state":{"spawn":7,"name":3}}}
-> 5c5a8fe3 #00000000???????? status: {"status":0}
<- 5c5a8fe3 #5d54a3c4???????? invoke: 
{"objid":1565828036,"method":"list","data":{"name":"collectd"}}
-> 5a86d6d9 #5c5a8fe3???????? invoke: 
{"objid":1565828036,"method":"list","data":{"name":"collectd"},"user":"root","group":"root"}
<- 5a86d6d9 #5c5a8fe3?????????? data: 
{"objid":1565828036,"data":{"collectd":{"instances":{}}}}
-> 5c5a8fe3 #5d54a3c4?????????? data: 
{"objid":1565828036,"data":{"collectd":{"instances":{}}}}
<- 5a86d6d9 #5c5a8fe3???????? status: {"status":0,"objid":1565828036}
-> 5c5a8fe3 #5d54a3c4???????? status: {"status":0,"objid":1565828036}


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Sat Dec 28 05:58:08 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Sat, 28 Dec 2019 11:58:08 +0100
Subject: [OpenWrt-Devel] [PATCH V2 fstools] Revert "block: mount_action:
 handle mount/umount deps"
In-Reply-To: <20191227085335.10144-1-zajec5@gmail.com>
References: <20191227085335.10144-1-zajec5@gmail.com>
Message-ID: <20191228105808.5432-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

This reverts commit 32c3126b2f0464106d74317336b6aef1d7d5f82f.

Internal list of devices guarantees some basic sorting (by device type
and then a name) but nothing more. In particular it cannot be guaranteed
that all preceding entries are parent devices. That would require a tree
struct instead of a flat list.

In most cases mounting all preceding devices results in unwanted mounts.

If there are 2 disks with 2 partitions each:
sda: /dev/sda1 /dev/sda2
sdb: /dev/sdb1 /dev/sdb2
Then using autofs and accessing sdb2 would result in mounting all 4
partitions and spinning unneeded sda.

If some dependency handling is required it should be implemented
explicitly as current solution isn't reliable and it breaks expected
autofs behavior.

Cc: Yousong Zhou <yszhou4tech at gmail.com>
Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
V2: Update commit message
---
 block.c | 43 +++++++++++++------------------------------
 1 file changed, 13 insertions(+), 30 deletions(-)

diff --git a/block.c b/block.c
index b6d49a8..e07cbc5 100644
--- a/block.c
+++ b/block.c
@@ -1199,47 +1199,30 @@ static int umount_device(char *path, int type, bool all)
 
 static int mount_action(char *action, char *device, int type)
 {
-	struct device *the_dev, *dev;
 	char path[32];
 
 	if (!action || !device)
 		return -1;
-
-	if (config_load(NULL))
-		return -1;
-	cache_load(0);
-
-	the_dev = find_block_device(NULL, NULL, device);
+	snprintf(path, sizeof(path), "/dev/%s", device);
 
 	if (!strcmp(action, "remove")) {
 		if (type == TYPE_HOTPLUG)
 			blockd_notify(device, NULL, NULL);
 
-		if (!the_dev || !the_dev->m || the_dev->m->type != TYPE_MOUNT) {
-			snprintf(path, sizeof(path), "/dev/%s", device);
-			umount_device(path, type, true);
-		} else
-			vlist_for_element_to_last_reverse(&devices, the_dev, dev, node)
-				if (dev->m && dev->m->type == TYPE_MOUNT)
-					umount_device(dev->pr->dev, type, true);
+		umount_device(path, type, true);
+
 		return 0;
-	} else if (!strcmp(action, "add")) {
-		if (!the_dev)
-			return -1;
-		if (the_dev->m && the_dev->m->type == TYPE_MOUNT) {
-			vlist_for_first_to_element(&devices, the_dev, dev, node) {
-				if (dev->m && dev->m->type == TYPE_MOUNT) {
-					int err = mount_device(dev, type);
-					if (err)
-						return err;
-				}
-			}
-			return 0;
-		} else
-			return mount_device(the_dev, type);
+	} else if (strcmp(action, "add")) {
+		ULOG_ERR("Unkown action %s\n", action);
+
+		return -1;
 	}
-	ULOG_ERR("Unkown action %s\n", action);
-	return -1;
+
+	if (config_load(NULL))
+		return -1;
+	cache_load(0);
+
+	return mount_device(find_block_device(NULL, NULL, path), type);
 }
 
 static int main_hotplug(int argc, char **argv)
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Sat Dec 28 09:00:49 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Sat, 28 Dec 2019 17:00:49 +0300
Subject: [OpenWrt-Devel] Preserving configs over sysupgrade on ath79/tiny
 broken for some boards (on 19.07 and master), possible solutions
Message-ID: <20191228140048.GO11377@home.paul.comp>

Hi,

Status quo summary:

Many ath79/tiny devices will lose configs (almost) each time
sysupgrading. This is easy to fix for most of the boards that
consistently have compatible flash memory ICs (some TP-Links are not
elements of this set). The only easy fix for all the boards is to
revert the 4K sectors patch.


Rationale for using 4K erase sectors:

OpenWrt uses jffs2 filesystem for storing ssh host key, config files
and other auxilary information across reboots. For that to work at
least 5 erase blocks are needed. With regular 64 KiB sectors that
means your rootfs_data partition needs to be at least 320 KiB
big. This is clearly much more than enough, and you'll have to
sacrifice some of the features when packing your rootfs. Some flash
memory chips allow using 4 KiB erase sectors so the minimal
rootfs_data partition size becomes 20 KiB (in theory).

An example of why I think that is useful: I built a regular image
(sans PPP and LuCI) for my 4 MiB ath79 device with dnsmasq DNSSEC, SQM,
6in4 and udpxy. The whole firmware partition is 3776 KiB, of which
1442350 bytes go to kernel, 2424274 to rootfs and 116 KiB to
rootfs_data. With regular configuration 40 KiB of it are used, and 76
are free. And the system still has opkg so that I can easily install
tcpdump-mini or other diagnostic utilities to /tmp. This wouldn't be
possible (at least not with SQM) if I was using 64 KiB erase blocks on
this device.


Sysupgrade problem description:

During the upgrade process the saved configuration files are written
to the flash starting from the erase marker added to the sysupgrade
image during the pad-rootfs build image stage. If there is a mismatch
between BLOCKSIZE specified in the Makefile for the specific board and
erase block size as determined by the kernel by reading the flash
memory JEDEC ID and checking its capabilities from a table in spi-nor
driver then the erase marker will likely be misaligned. I've compiled
the list of all the ath79/tiny devices so that proper BLOCKSIZE could
be specified but faced an issue with some TP-Link boards that
according to certain sources can have factory memory with different
capabilities. The full list is at the end of this mail.


Possible solutions that come to mind:

1. Revert to using 64 KiB erase sectors on all ath79/tiny devices;

2. Fix BLOCKSIZE for those boards that are consistent, document
possible config loss for the others;

3. Change sysupgrade in a way to either:

3.1. When seeing the erase marker automatically align it to the
nearest erase sector boundary and act accordingly;

3.2. Ignore erase markers not placed at the runtime-detected erase
sector boundaries; make build system emit those at both 4K and 64K
locations;

3.3. Port kernel squashfs splitter logic to sysupgrade to make it find
the right place for the erase marker (or jffs2 with configs) fully on
its own.


That's how I see it, please fix me where I am wrong.


List of the ath79/tiny boards with references:

Buffalo WHR-G301N
http://openwrtwlan.blogspot.com/2012/11/wzr-g301ntftp.html
mx25l3205d
SECT_4K

DIR-615 E4
https://forum.archive.openwrt.org/viewtopic.php?id=52823
mx25l3205d
SECT_4K

PQI Air-Pen
http://www.srchack.org/article.php?story=20180924234149309
s25fl064k 8 MiB
(not important since 4K sectors not used on 8 MiB)

Netgear WNR612 v2
https://openwrt.org/toh/netgear/wnr612v2
mx25l3205d
SECT_4K

On Networks N150R (rebranded Netgear WNR612v2)
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=b6e1cbd8dd5b8fe3833547480abdbd57edb3238c
mx25l3205d
SECT_4K

Netgear WNR1000 v2
https://gist.github.com/SaltwaterC/ef49c8a4df81c8896153
w25q32
SECT_4K

Netgear WNR2000 v3
https://oldwiki.archive.openwrt.org/toh/netgear/wnr2000
mx25l3206e (same JEDEC ID as mx25l3205d)
SECT_4K

TP-Link TL-MR10U
https://openwrt.org/toh/tp-link/tl-mr10u
Spansion FL032PIF 32Mbit or Eon EN25Q32B
64 KiB sectors

TP-Link TL-MR3020 v1
https://openwrt.org/toh/tp-link/tl-mr3020
S25FL032P
64 KiB sectors

TP-Link TL-MR3040 v2
https://openwrt.org/toh/tp-link/tl-mr3040
S25FL032P
64 KiB sectors

TP-Link TL-MR3220 v1
https://www.kaskus.co.id/show_post/58181950d9d77097618b4569/791/-
s25sl032p
64 KiB sectors

TP-Link TL-MR3420 v1
https://openwrt.org/toh/tp-link/tl-mr3420
v1: MX25L3206E; v1.1: F32-100HIP; v1.2: W25Q32BV/FL032PIF
v1: SECT_4K; v1.1: SECT_4K; v1.1: SECT_4/64 KiB

TP-Link TL-MR3420 v2
https://openwrt.org/toh/tp-link/tl-mr3420
v2.3 winbond or spansion?
???

TP-Link TL-WA901ND v2
https://openwrt.org/toh/tp-link/tl-wa901nd
s25sl032a
64 KiB sectors

TP-Link TL-WR703N
https://openwrt.org/toh/tp-link/tl-wr703n
s25sl032a
64 KiB sectors

TP-Link TL-WR740N v1/v2
https://openwrt.org/toh/tp-link/tl-wr740n
en25q32b
64 KiB sectors

TP-Link TL-WR740N v3
? https://eko.one.pl/forum/viewtopic.php?id=14257 ? en25f32 4k?
???
???

TP-Link TL-WR740N v4
http://bkil.blogspot.com/2014/12/tftp-secret-of-tl-wr740n-uncovered.html
s25sl032p
64 KiB sectors

TP-Link TL-WR741N/ND v1/v2
v1: ??? v2.4: https://openwrt.org/_media/media/tplink/tp-link-v2.4-serial-pins.jpg?cache= , 2.4: http://blog.hajma.cz/2014/02/tp-link-tl-wr741nd-unbricking.html
v1: ???; cFeon F32-100 en25f32, s25sl032p
???; SECT_4K, 64 KiB sectors

TP-Link TL-WR741N/ND v4
v4.3: https://openwrt.org/_media/media/tplink/tl-wr741/tl-wr741nd-v4_board.jpg?cache=
Spansion FL032P
64 KiB sectors

TP-Link TL-WR743ND v1
???
???
???

TP-Link TL-WR841N/ND v5/v6
???
???
???

TP-Link TL-WR841N/ND v7
https://openwrt.org/toh/tp-link/tl-wr841nd
Eon EN25F32
SECT_4K

TP-Link TL-WR841N/ND v8
https://openwrt.org/toh/tp-link/tl-wr841nd
Spansion FL032PIF
64 KiB sectors

TP-Link TL-WR841N/ND v9
https://openwrt.org/toh/tp-link/tl-wr841nd
Spansion FL032PIF
64 KiB sectors

TP-Link TL-WR841N/ND v10
https://openwrt.org/toh/tp-link/tl-wr841nd
Winbond 25Q32FVS1G
SECT_4K

TP-Link TL-WR841N/ND v11
https://openwrt.org/toh/tp-link/tl-wr841nd
Spansion FL032PIF
64 KiB sectors

TP-Link TL-WR841N/ND v12
https://openwrt.org/toh/tp-link/tl-wr841nd
Spansion FL032PIF
64 KiB sectors

TP-Link TL-WR940N v3
https://www.gargoyle-router.com/phpbb/viewtopic.php?t=8034
gd25q32
SECT_4K

TP-Link TL-WR940N v4
https://openwrt.org/_media/media/tplink/tl-wr940/tl-wr940n-v4_uart.jpg
gd25q32
SECT_4K

TP-Link TL-WR941ND v2/v3
https://openwrt.org/toh/tp-link/tl-wr941nd
the logs indicate that one of the v2.x devices mentioned has 8MB flash (prisma, RoundSparrow), while others had 4MB (juhosg (?), erreterr, sam.vanratt, _bbb_).
???

TP-Link TL-WR941ND v4
???
???
???

TP-Link TL-WR941ND v6
???
???
???

TP-Link TL-WR941ND v7 (CN)
???
???
???

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Sat Dec 28 10:29:06 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Sat, 28 Dec 2019 16:29:06 +0100
Subject: [OpenWrt-Devel] sysupgrade image identification in brcm63xx
Message-ID: <012501d5bd93$8b3535a0$a19fa0e0$@adrianschmutzler.de>

Hi,

I consider to do an image/DTS rename in brcm63xx target similar to what I did in ramips target, i.e.
- change image/Makefile device definitions to vendor_model names (based on compatible where possible)
- change DTS names to soc_vendor_model scheme
- use SOC variable for calculating DTS names
- get rid of additional board_name set in lib/brcm63xx.sh and use compatible-derived value instead for base-files.

What I do not understand yet is how sysupgrade works with this target: Normally, I would have expected a SUPPORTED_DEVICES variable set somewhere. However, I doesn't look like append-metadata is used there.

Can somebody explain to me how device identification in sysupgrade is done for brcm63xx so I can assess whether modernizing the target is possible/desirable?

Is somebody against doing those changes to the target in principle?

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191228/d113f9b6/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From freifunk at adrianschmutzler.de  Sat Dec 28 11:25:50 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sat, 28 Dec 2019 17:25:50 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] samsung: use soc_vendor_model scheme
 for DTS file name
Message-ID: <20191228162551.13270-1-freifunk@adrianschmutzler.de>

This patch changes the samsung target to calculate the DTS file name
from vendor and device name and the SOC (i.e. subtarget) following
the common scheme:

soc_vendor_model.dts

This also updates the device definition name to make compatible,
image name, menuconfig name and DTS name consistent.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../dts/{TQ210.dts => s5pv210_embedsky_tq210.dts}     |  0
 target/linux/samsung/image/Makefile                   | 11 ++++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)
 rename target/linux/samsung/dts/{TQ210.dts => s5pv210_embedsky_tq210.dts} (100%)

diff --git a/target/linux/samsung/dts/TQ210.dts b/target/linux/samsung/dts/s5pv210_embedsky_tq210.dts
similarity index 100%
rename from target/linux/samsung/dts/TQ210.dts
rename to target/linux/samsung/dts/s5pv210_embedsky_tq210.dts
diff --git a/target/linux/samsung/image/Makefile b/target/linux/samsung/image/Makefile
index 697d317c9f..53509ef137 100644
--- a/target/linux/samsung/image/Makefile
+++ b/target/linux/samsung/image/Makefile
@@ -13,14 +13,15 @@ define Device/Default
   PROFILES = Default
   KERNEL_NAME := zImage
   KERNEL := kernel-bin | append-dtb | uImage none
+  DEVICE_DTS_DIR := ../dts
+  DEVICE_DTS = $$(SOC)_$(1)
 endef
 
-define Device/tq210
-  DEVICE_VENDOR := Samsung
+define Device/embedsky_tq210
+  DEVICE_VENDOR := EmbedSky
   DEVICE_MODEL := TQ210
-  DEVICE_DTS_DIR := ../dts
-  DEVICE_DTS := TQ210
+  SOC := s5pv210
 endef
-TARGET_DEVICES += tq210
+TARGET_DEVICES += embedsky_tq210
 
 $(eval $(call BuildImage))
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Sat Dec 28 11:25:51 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Sat, 28 Dec 2019 17:25:51 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] samsung: add subtarget condition for
 device
In-Reply-To: <20191228162551.13270-1-freifunk@adrianschmutzler.de>
References: <20191228162551.13270-1-freifunk@adrianschmutzler.de>
Message-ID: <20191228162551.13270-2-freifunk@adrianschmutzler.de>

The only device in samsung target is meant to be built with s5pv210
subtarget. Thus, though this won't make a difference for a
one-subtarget target, already add the condition to the Makefile to
make the assignment obvious.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/samsung/image/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/linux/samsung/image/Makefile b/target/linux/samsung/image/Makefile
index 53509ef137..3648562704 100644
--- a/target/linux/samsung/image/Makefile
+++ b/target/linux/samsung/image/Makefile
@@ -17,6 +17,8 @@ define Device/Default
   DEVICE_DTS = $$(SOC)_$(1)
 endef
 
+ifeq ($(SUBTARGET),s5pv210)
+
 define Device/embedsky_tq210
   DEVICE_VENDOR := EmbedSky
   DEVICE_MODEL := TQ210
@@ -24,4 +26,6 @@ define Device/embedsky_tq210
 endef
 TARGET_DEVICES += embedsky_tq210
 
+endif
+
 $(eval $(call BuildImage))
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From luka.koznjak at sartura.hr  Sat Dec 28 14:30:53 2019
From: luka.koznjak at sartura.hr (=?UTF-8?q?Luka=20Ko=C5=BEnjak?=)
Date: Sat, 28 Dec 2019 20:30:53 +0100
Subject: [OpenWrt-Devel] [PATCH] file: fix segfault in uci_parse_option
Message-ID: <20191228193053.1112349-1-luka.koznjak@sartura.hr>

Fix a segmentation fault caused by using a pointer to a reallocated
address. The name pointer in the uci_parse_option function
becomes invalid if assert_eol calls uci_realloc down the line,
resulting in a segmentation fault when attempting to dereference
name in a strcmp check in uci_lookup_list. A simple fix is
to call assert_eol before retrieving the actual address for
the name and type pointers.

The segmentation fault has been found while fuzzing the
uci configuration system for various types of different crashes
and undefined behaviors, which resulted in multiple different
import files causing instability and segmentation faults.

Signed-off-by: Luka Ko?njak <luka.koznjak at sartura.hr>
Signed-off-by: Juraj Vijtiuk <juraj.vijtiuk at sartura.hr>
CC: Luka Perkov <luka.perkov at sartura.hr>
---
 file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/file.c b/file.c
index 3cd7702..3ac49c6 100644
--- a/file.c
+++ b/file.c
@@ -471,9 +471,9 @@ static void uci_parse_option(struct uci_context *ctx, bool list)
 
 	ofs_name = next_arg(ctx, true, true, false);
 	ofs_value = next_arg(ctx, false, false, false);
+	assert_eol(ctx);
 	name = pctx_str(pctx, ofs_name);
 	value = pctx_str(pctx, ofs_value);
-	assert_eol(ctx);
 
 	uci_fill_ptr(ctx, &ptr, &pctx->section->e);
 	e = uci_lookup_list(&pctx->section->options, name);
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Sat Dec 28 14:48:37 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Sat, 28 Dec 2019 20:48:37 +0100
Subject: [OpenWrt-Devel] [PATCH] file: fix segfault in uci_parse_option
In-Reply-To: <20191228193053.1112349-1-luka.koznjak@sartura.hr>
References: <20191228193053.1112349-1-luka.koznjak@sartura.hr>
Message-ID: <20191228194837.GF70184@meh.true.cz>

Luka Ko?njak <luka.koznjak at sartura.hr> [2019-12-28 20:30:53]:

Hi Luka,

> Fix a segmentation fault caused by using a pointer to a reallocated address.
> The name pointer in the uci_parse_option function becomes invalid if
> assert_eol calls uci_realloc down the line, resulting in a segmentation
> fault when attempting to dereference name in a strcmp check in
> uci_lookup_list. A simple fix is to call assert_eol before retrieving the
> actual address for the name and type pointers.

thanks for the fix.

> The segmentation fault has been found while fuzzing the
> uci configuration system for various types of different crashes
> and undefined behaviors, which resulted in multiple different
> import files causing instability and segmentation faults.

Can you share that uci configuration causing this crash as well? 

I would like to add it into unit tests which are run[1] on GitLab CI after
every push to Git repository so we can protect better ourselves against
possible re-introduction of the issue in the future during refactoring etc.

BTW I plan to add some libFuzzer based fuzzing to UCI soon (as done recently
in libubox[1] for example), so I'm wondering if you could share your fuzzing
setup/sources as well in order to save some time, thanks!

1. https://gitlab.com/openwrt/project/uci/-/jobs/385184198#L1687
2. https://git.openwrt.org/436d6363a10bbb41ab92602b4eb0030992bb1785

Cheers,

Petr

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From foss at volatilesystems.org  Sat Dec 28 14:54:18 2019
From: foss at volatilesystems.org (Stijn Segers)
Date: Sat, 28 Dec 2019 20:54:18 +0100
Subject: [OpenWrt-Devel] [PATCH] [19.07] ramips: rename DIR-860L entries
 according to the new manufacturer / device spec
In-Reply-To: <03d001d5bcec$aa805ae0$ff8110a0$@adrianschmutzler.de>
References: <20191225143851.12368-1-foss@volatilesystems.org>
 <00ce01d5bc41$d1e99520$75bcbf60$@adrianschmutzler.de>
 <9339FD6D-FDED-4104-A6A4-9BE03124F192@volatilesystems.org>
 <03d001d5bcec$aa805ae0$ff8110a0$@adrianschmutzler.de>
Message-ID: <1577562858.24588.0@mail.volatilesystems.org>



Op vrijdag 27 december 2019 om 20:34 schreef mail at adrianschmutzler.de:
> Hi,
> 
>>  >> Master had this updated a while ago, it's okay there.
>>  >
>>  >Though I'm a big fan of unification and made an effort to have this
>>  >sorted out in master, I do not think backporting those device name
>>  >changes is very helpful. This will create additional work, but
>>  >effectively it will just move the "break" from 19.07/master to
>>  >18.06/19.07.
>>  >
>>  >As a cosmetic issue, it wouldn't be a candidate for backporting 
>> under
>>  >normal circumstances, too.
>> 
>>  Well it was worth trying ?
>> 
>>  Stijn
> 
> Somebody marked it as "Accepted" in patchwork. So, either that was a 
> mistake, or you are lucky and another committer had a different 
> opinion on this. Let's see ...
> 
> Best
> 
> Adrian

Hi Adrian,

I got such a message, yes, but I assume it's a mixup somewhere. I 
haven't seen it in anyone's tree.

Cheers (and happy holidays)

Stijn


> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From luka.koznjak at sartura.hr  Sat Dec 28 15:07:27 2019
From: luka.koznjak at sartura.hr (=?UTF-8?q?Luka=20Ko=C5=BEnjak?=)
Date: Sat, 28 Dec 2019 21:07:27 +0100
Subject: [OpenWrt-Devel] [PATCH] file: fix segfault in uci_parse_config
Message-ID: <20191228200727.1117297-1-luka.koznjak@sartura.hr>

Fix a segmentation fault caused by using a pointer to a reallocated
address. The name pointer in the uci_parse_config function
becomes invalid if assert_eol calls uci_realloc down the line,
resulting in a segmentation fault when attempting to dereference
name. A simple fix is to call assert_eol before retrieving the
actual address for the name and type pointers.

The segmentation fault has been found while fuzzing the
uci configuration system for various types of different crashes
and undefined behaviors, which resulted in multiple different
import files causing instability and segmentation faults.

Signed-off-by: Luka Ko?njak <luka.koznjak at sartura.hr>
Signed-off-by: Juraj Vijtiuk <juraj.vijtiuk at sartura.hr>
CC: Luka Perkov <luka.perkov at sartura.hr>
---
 file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/file.c b/file.c
index f5032bd..3cd7702 100644
--- a/file.c
+++ b/file.c
@@ -425,9 +425,9 @@ static void uci_parse_config(struct uci_context *ctx)
 		uci_parse_error(ctx, "invalid character in type field");
 
 	ofs_name = next_arg(ctx, false, true, false);
+	assert_eol(ctx);
 	type = pctx_str(pctx, ofs_type);
 	name = pctx_str(pctx, ofs_name);
-	assert_eol(ctx);
 
 	if (!name || !name[0]) {
 		ctx->internal = !pctx->merge;
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Sat Dec 28 16:01:10 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Sat, 28 Dec 2019 22:01:10 +0100
Subject: [OpenWrt-Devel] ubus and/or libubox upgrades today cause
 problems: some services do not start, logread hangs
In-Reply-To: <4befe9c3-419b-5903-9db5-bc0518634234@iki.fi>
References: <6cb3b640-8590-d083-e5c2-63df74c7e86b@welho.com>
 <20191226225936.GB70184@meh.true.cz>
 <fa84e9a6-5b08-c680-b3ed-0ad1b3f00359@iki.fi>
 <20191227122541.GC70184@meh.true.cz>
 <20191227140400.GD70184@meh.true.cz>
 <4befe9c3-419b-5903-9db5-bc0518634234@iki.fi>
Message-ID: <20191228210110.GG70184@meh.true.cz>

Hannu Nyman <hannu.nyman at iki.fi> [2019-12-28 12:53:27]:

Hi,

> For me, at least collectd and nlbwmon do not start.

I've just pushed fix[1], thanks for the report.

1. https://git.openwrt.org/e3e939d8e624290d14471d913154f4febf3a160b

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Sat Dec 28 16:07:20 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Sat, 28 Dec 2019 22:07:20 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 0/2] block(d): remove remaining
 files if they exist
Message-ID: <20191228210722.1407-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

I noticed that rebooting with devices mounted can result in:
1) Leaving directories in /mnt/ when not using autofs
2) Leaving symlinks in /mnt/ when using autofs

They can cause mounting errors on further attempts.

With mountd this problem didn't exist due to using /tmp/mounts/ instead
of /mnt/. With block(d) we have to find some solution.

This patches takes care of removing files that can cause mounting or
symlink-ing errors. Worth implementing may be also a /mnt/ cleanup done
at boot/init time.

Rafa? Mi?ecki (2):
  block: remove mount target file if it's a link
  blockd: remove symlink linkpath file if it's a dir or link

 block.c  | 3 +++
 blockd.c | 7 +++++++
 2 files changed, 10 insertions(+)

-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Sat Dec 28 16:07:21 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Sat, 28 Dec 2019 22:07:21 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 1/2] block: remove mount target file
 if it's a link
In-Reply-To: <20191228210722.1407-1-zajec5@gmail.com>
References: <20191228210722.1407-1-zajec5@gmail.com>
Message-ID: <20191228210722.1407-2-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

Links like that can remain from using autofs and can cause mounting
errors after switching to non-autofs:

block: mounting /dev/sda1 (vfat) as /mnt/sda1 failed (2) - No such file or directory

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 block.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/block.c b/block.c
index e07cbc5..06f75d3 100644
--- a/block.c
+++ b/block.c
@@ -1072,6 +1072,7 @@ static int mount_device(struct device *dev, int type)
 {
 	struct mount *m;
 	struct probe_info *pr;
+	struct stat st;
 	char _target[32];
 	char *target;
 	char *device;
@@ -1154,6 +1155,8 @@ static int mount_device(struct device *dev, int type)
 		check_filesystem(pr);
 
 	mkdir_p(target);
+	if (!lstat(target, &st) && S_ISLNK(st.st_mode))
+		unlink(target);
 
 	err = handle_mount(pr->dev, target, pr->type, m);
 	if (err) {
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Sat Dec 28 16:07:22 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Sat, 28 Dec 2019 22:07:22 +0100
Subject: [OpenWrt-Devel] [PATCH fstools 2/2] blockd: remove symlink linkpath
 file if it's a dir or link
In-Reply-To: <20191228210722.1407-1-zajec5@gmail.com>
References: <20191228210722.1407-1-zajec5@gmail.com>
Message-ID: <20191228210722.1407-3-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

Files like that can remain from using non-autofs mounting and can cause
mounting errors after switching to autofs:
blockd: failed to symlink /mnt/sda1->/tmp/run/blockd/sda1

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 blockd.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/blockd.c b/blockd.c
index e07530c..f977fb7 100644
--- a/blockd.c
+++ b/blockd.c
@@ -131,12 +131,19 @@ device_free(struct device *device)
 static void
 device_add(struct device *device)
 {
+	struct stat st;
 	char path[64];
 
 	if (!device->autofs)
 		return;
 
 	snprintf(path, sizeof(path), "/tmp/run/blockd/%s", device->name);
+	if (!lstat(device->target, &st)) {
+		if (S_ISLNK(st.st_mode))
+			unlink(device->target);
+		else if (S_ISDIR(st.st_mode))
+			rmdir(device->target);
+	}
 	if (symlink(path, device->target))
 		ULOG_ERR("failed to symlink %s->%s\n", device->target, path);
 	else
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Sat Dec 28 16:29:03 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Sat, 28 Dec 2019 22:29:03 +0100
Subject: [OpenWrt-Devel] [PATCH fstools] blockd: print symlink error code
 and string message
Message-ID: <20191228212903.11660-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

It may help understanding failure reason, e.g.:
blockd: failed to symlink /mnt/sda1->/tmp/run/blockd/sda1 (17) - File exists

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 blockd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/blockd.c b/blockd.c
index e07530c..a04ea5b 100644
--- a/blockd.c
+++ b/blockd.c
@@ -138,7 +138,7 @@ device_add(struct device *device)
 
 	snprintf(path, sizeof(path), "/tmp/run/blockd/%s", device->name);
 	if (symlink(path, device->target))
-		ULOG_ERR("failed to symlink %s->%s\n", device->target, path);
+		ULOG_ERR("failed to symlink %s->%s (%d) - %m\n", device->target, path, errno);
 	else
 		block("autofs", "available", device->name);
 }
@@ -158,7 +158,7 @@ device_move(struct device *device_o, struct device *device_n)
 		unlink(device_o->target);
 		snprintf(path, sizeof(path), "/tmp/run/blockd/%s", device_n->name);
 		if (symlink(path, device_n->target))
-			ULOG_ERR("failed to symlink %s->%s\n", device_n->target, path);
+			ULOG_ERR("failed to symlink %s->%s (%d) - %m\n", device_n->target, path, errno);
 	} else {
 		mkdir(device_n->target, 0755);
 		if (mount(device_o->target, device_n->target, NULL, MS_MOVE, NULL))
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hannu.nyman at iki.fi  Sat Dec 28 16:41:44 2019
From: hannu.nyman at iki.fi (Hannu Nyman)
Date: Sat, 28 Dec 2019 23:41:44 +0200
Subject: [OpenWrt-Devel] ubus and/or libubox upgrades today cause
 problems: some services do not start, logread hangs
In-Reply-To: <20191228210110.GG70184@meh.true.cz>
References: <6cb3b640-8590-d083-e5c2-63df74c7e86b@welho.com>
 <20191226225936.GB70184@meh.true.cz>
 <fa84e9a6-5b08-c680-b3ed-0ad1b3f00359@iki.fi>
 <20191227122541.GC70184@meh.true.cz> <20191227140400.GD70184@meh.true.cz>
 <4befe9c3-419b-5903-9db5-bc0518634234@iki.fi>
 <20191228210110.GG70184@meh.true.cz>
Message-ID: <55fbff31-3aba-6f72-d95f-535dab1980da@iki.fi>

Petr ?tetiar kirjoitti 28.12.2019 klo 23.01:
> Hannu Nyman <hannu.nyman at iki.fi> [2019-12-28 12:53:27]:
>
> Hi,
>
>> For me, at least collectd and nlbwmon do not start.
> I've just pushed fix[1], thanks for the report.
>
> 1. https://git.openwrt.org/e3e939d8e624290d14471d913154f4febf3a160b
>
> -- ynezz


Thanks. After your libubox fix the services starts again normally.

I tested both ipq806x/R7800 and ath79/WNDR3700



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Sun Dec 29 05:49:36 2019
From: openwrt-devel at lists.openwrt.org (=?utf-8?q?Petr_Nov=C3=A1k_via_openwrt-devel?=)
Date: Sun, 29 Dec 2019 11:49:36 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent development
 snapshots: "message": "Firmware image couldn't be validated"
Message-ID: <mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: =?utf-8?Q?Petr_Nov=C3=A1k?= <petrn at me.com>
Subject: Sysupgrade possibly broken in recent development snapshots: "message": "Firmware image couldn't be validated" 
Date: Sun, 29 Dec 2019 11:49:36 +0100
Size: 7012
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191229/18079f65/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hannu.nyman at welho.com  Sun Dec 29 06:39:26 2019
From: hannu.nyman at welho.com (Hannu Nyman)
Date: Sun, 29 Dec 2019 13:39:26 +0200
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <5C8E2171-198A-49B9-8306-9A025BE15575@me.com>
References: <5C8E2171-198A-49B9-8306-9A025BE15575@me.com>
Message-ID: <dca2a586-f2e7-eb4a-5b4a-2a8d33264040@welho.com>

 > The problem does not seem to be with the image - older builds upgrade to 
the same image just fine, but the recent ones seem to fail.
 >
 > Example: taking the most recent rpi-4-squashfs-factory.img.gz from 
2019-12-28 and trying to upgrade to rpi-4-squashfs-sysupgrade.img.gz from the 
same date does fail as indicated above.


Pure guess, but your symptoms might be due to the broken ubus and/or libubox 
between 2019-12-26 and 2019-12-29.
(ubus was broken on 26th and was fixed on 28th, libubox was broken on 26th 
and was fixed on 29th evening)

As sysupgrade uses ubus messaging using blobmsg (from libubox) for image 
validation messaging, it is quite possible that your symptoms are caused by 
those. Your image of 28th has broken functionality.

I am not sure sure what is the easiest way to sysupgrade away from the broken 
firmwares.
Maybe using "sysupgrade -F"? (--force) to bypass validation?



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Sun Dec 29 06:49:24 2019
From: openwrt-devel at lists.openwrt.org (=?utf-8?q?Petr_Nov=C3=A1k_via_openwrt-devel?=)
Date: Sun, 29 Dec 2019 12:49:24 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <dca2a586-f2e7-eb4a-5b4a-2a8d33264040@welho.com>
References: <5C8E2171-198A-49B9-8306-9A025BE15575@me.com>
 <dca2a586-f2e7-eb4a-5b4a-2a8d33264040@welho.com>
Message-ID: <mailman.21101.1577620171.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: =?utf-8?Q?Petr_Nov=C3=A1k?= <petrn at me.com>
Subject: Re: Sysupgrade possibly broken in recent development snapshots: "message": "Firmware image couldn't be validated"
Date: Sun, 29 Dec 2019 12:49:24 +0100
Size: 3964
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191229/60195676/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From hannu.nyman at iki.fi  Sun Dec 29 07:13:05 2019
From: hannu.nyman at iki.fi (Hannu Nyman)
Date: Sun, 29 Dec 2019 14:13:05 +0200
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <37443D9C-A708-463C-A906-3E6A1B5F214E@me.com>
References: <5C8E2171-198A-49B9-8306-9A025BE15575@me.com>
 <dca2a586-f2e7-eb4a-5b4a-2a8d33264040@welho.com>
 <37443D9C-A708-463C-A906-3E6A1B5F214E@me.com>
Message-ID: <275940ab-bc14-b1b1-336a-509ddd73ea5b@iki.fi>

Petr Nov?k kirjoitti 29.12.2019 klo 13.49:
> I am normally building my own images, but to make sure this is easy to reproduce, I have recreated the problem with the most recent snapshot builds as well.
>

Can you be explicit with "most recent"?
You mean r11829-e3e939d8e6 images that contain the last fix for libubox?


Ps. Just as reference, so far I have not seen the sysupgrade problem myself. 
I have already successfully sysupgraded away from r11829-e3e939d8e6 to a 
19.07 build both on R7800 and on WNDR3700v2



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Sun Dec 29 07:17:06 2019
From: openwrt-devel at lists.openwrt.org (=?utf-8?q?Petr_Nov=C3=A1k_via_openwrt-devel?=)
Date: Sun, 29 Dec 2019 13:17:06 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <275940ab-bc14-b1b1-336a-509ddd73ea5b@iki.fi>
References: <5C8E2171-198A-49B9-8306-9A025BE15575@me.com>
 <dca2a586-f2e7-eb4a-5b4a-2a8d33264040@welho.com>
 <37443D9C-A708-463C-A906-3E6A1B5F214E@me.com>
 <275940ab-bc14-b1b1-336a-509ddd73ea5b@iki.fi>
Message-ID: <mailman.21105.1577621832.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: =?utf-8?Q?Petr_Nov=C3=A1k?= <petrn at me.com>
Subject: Re: Sysupgrade possibly broken in recent development snapshots: "message": "Firmware image couldn't be validated"
Date: Sun, 29 Dec 2019 13:17:06 +0100
Size: 4518
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191229/faa6b3d8/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Sun Dec 29 07:27:09 2019
From: openwrt-devel at lists.openwrt.org (=?utf-8?q?Petr_Nov=C3=A1k_via_openwrt-devel?=)
Date: Sun, 29 Dec 2019 13:27:09 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <275940ab-bc14-b1b1-336a-509ddd73ea5b@iki.fi>
References: <5C8E2171-198A-49B9-8306-9A025BE15575@me.com>
 <dca2a586-f2e7-eb4a-5b4a-2a8d33264040@welho.com>
 <37443D9C-A708-463C-A906-3E6A1B5F214E@me.com>
 <275940ab-bc14-b1b1-336a-509ddd73ea5b@iki.fi>
Message-ID: <mailman.21107.1577622435.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: =?utf-8?Q?Petr_Nov=C3=A1k?= <petrn at me.com>
Subject: Re: Sysupgrade possibly broken in recent development snapshots: "message": "Firmware image couldn't be validated"
Date: Sun, 29 Dec 2019 13:27:09 +0100
Size: 3449
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191229/b30c8dd9/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Sun Dec 29 07:58:36 2019
From: openwrt-devel at lists.openwrt.org (=?utf-8?q?Petr_Nov=C3=A1k_via_openwrt-devel?=)
Date: Sun, 29 Dec 2019 13:58:36 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <275940ab-bc14-b1b1-336a-509ddd73ea5b@iki.fi>
References: <5C8E2171-198A-49B9-8306-9A025BE15575@me.com>
 <dca2a586-f2e7-eb4a-5b4a-2a8d33264040@welho.com>
 <37443D9C-A708-463C-A906-3E6A1B5F214E@me.com>
 <275940ab-bc14-b1b1-336a-509ddd73ea5b@iki.fi>
Message-ID: <mailman.21112.1577624322.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: =?utf-8?Q?Petr_Nov=C3=A1k?= <petrn at me.com>
Subject: Re: Sysupgrade possibly broken in recent development snapshots: "message": "Firmware image couldn't be validated"
Date: Sun, 29 Dec 2019 13:58:36 +0100
Size: 4322
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191229/38b52f67/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From yszhou4tech at gmail.com  Sun Dec 29 08:53:06 2019
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sun, 29 Dec 2019 21:53:06 +0800
Subject: [OpenWrt-Devel] [PATCH fstools] Revert "block: mount_action:
 handle mount/umount deps"
In-Reply-To: <f4eacae6-bfea-c9b5-4b00-f0a349639e93@gmail.com>
References: <20191227085335.10144-1-zajec5@gmail.com>
 <CAECwjAjw7dkkgqSd47N55XC1JwLNWUMTQQHSJdJ5y4fEhnoYDw@mail.gmail.com>
 <f4eacae6-bfea-c9b5-4b00-f0a349639e93@gmail.com>
Message-ID: <CAECwjAhgiOGD2QJFfo7LgmN_UgvnCJTfOOp90ktnLKW-ju-V5Q@mail.gmail.com>

On Sat, 28 Dec 2019 at 18:27, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
>
> On 27.12.2019 13:25, Yousong Zhou wrote:
> > On Fri, 27 Dec 2019 at 16:53, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
> >>
> >> From: Rafa? Mi?ecki <rafal at milecki.pl>
> >>
> >> This reverts commit 32c3126b2f0464106d74317336b6aef1d7d5f82f.
> >>
> >> Internal list of devices guarantees some basic sorting (by device type
> >> and then a name) but nothing more. In particular it's not guaranteed
> >> (and it's actually quite uncommon) that all preceding entries are parent
> >> devices.
> >>
> >> Mounting all preceding devices may easily result in unrelated mounts.
> >> They can fail easily basically breaking original mounting attempt, e.g.:
> >>
> >> daemon.err blockd: kernel is requesting a mount -> sda2
> >> daemon.err block: /dev/sda1 is already mounted on /tmp/run/blockd/sda1
> >> daemon.err block: autofs: "add" action has failed: -1
> >> daemon.err blockd: failed to run block. add/sda2
> >
> > Sorry for the inconvenience.  But the error (regression) should be
> > caused by 2f2a09ad ("block: mount_device: err log only when mp
> > deviates from spec").  m->target is expected to match the actual mount
> > point only when it is not managed by blockd (m->autofs).
> >
> > Please see if the following patch works.  We can also check if m is
> > managed by autofs and m->target a symlink whose target matches mp, but
> > that's a bit overkill.
> >
> > --- a/block.c
> > +++ b/block.c
> > @@ -1100,7 +1100,7 @@ static int mount_device(struct device *dev, int type)
> >
> >          mp = find_mount_point(pr->dev);
> >          if (mp) {
> > -               if (m && m->type == TYPE_MOUNT && strcmp(m->target, mp)) {
> > +               if (m && !m->autofs && m->type == TYPE_MOUNT && strcmp(m->target, mp)) {
> >                          ULOG_ERR("%s is already mounted on %s\n", pr->dev, mp);
> >                          err = -1;
> >                  } else
> >
>
> You're right about that error and your diff indeed fixes that:
> /dev/sda1 is already mounted on /tmp/run/blockd/sda1
> for me. It still doesn't fix mounting unneeded devices though.
>
>
> Please check this:
>
> # mount | grep "/dev/sd"
>
> # ls /var/run/blockd/sdb2
> b.txt
>
> # mount | grep "/dev/sd"
> /dev/sda1 on /tmp/run/blockd/sda1 type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
> /dev/sda2 on /tmp/run/blockd/sda2 type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
> /dev/sdb1 on /tmp/run/blockd/sdb1 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
> /dev/sdb2 on /tmp/run/blockd/sdb2 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
>
> As you can see, accessing "sdb2" partition resulted in mounting 3 other
> partitions that I don't need at all. Including spinning 1 unused disk!
>
>
> >> If some dependency handling is required it should be implemented
> >> explicitly as current solution isn't reliable and it breaks autofs when
> >> using multiple devices (partitions).
> >>
> >
> > Dependencies are directly implied by mount target as specified in the
> > uci config file.  This relationship is inherently there.  E.g.
> >
> >   1. mount target /mnt/a
> >   2. mount target /mnt/a/b
> >
> > Then "1" must mount before "2".  "2" before "1" is not practically
> > useful in any way.
>
> That relationship/dependency isn't directly parsed by fstools in any
> way. By making it explicit I thought of something like:
>
> config 'mount' '/dev/vdc'
>         option  target  '/mnt'
>         option  uuid    'AAAA'
>         option  enabled '1'
>         option  autofs  '1'
>
> config 'mount' '/dev/vdb'
>         option  parent  '/dev/vdc/
>         option  target  '/mnt/s'

The point is that this "parent" relationship is already implied.  This
extra uci option does add more information.

> That relationship/dependency isn't directly parsed by fstools in any
> way.

That devces list was modified to be ordered primarily by length of
mount target was for this (fb0700f0 "block: support hierarchical
mount/umount").  But it's not tight/precise enough to only mount
direct dependencies, but all enabled mounts whose length smaller than
itself.

I made a patch [1] few days ago trying to amend that but didn't yet
have time to test it.  Now I checked it again, that "target" defaults
to "/mnt/<dev>"  and anon_mount=1 also need to be taken into
consideration.  Nevertheless, this dependency tracking mechanism still
needs to be handled by the program itself, not extra knobs.

[1] https://github.com/yousong/fstools/commit/0eab853a7857c967efbc6fb7a6e0ba20e5dd3aba

Regards,
                yousong

>         option  uuid    'BBBB'
>         option  enabled '1'
>         option  autofs  '1'

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Sun Dec 29 09:35:45 2019
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Sun, 29 Dec 2019 15:35:45 +0100
Subject: [OpenWrt-Devel] Problem with blockd starting after partitions
 mounting
Message-ID: <CACna6rz=BYYPVzFPdPU6qtr5+i56qA1POYUrbTCKsS1r0a8jrw@mail.gmail.com>

A year ago I introduced hotplug.d script meant to manage Samba shares
in a clever way by:
1) Using "mount" hotplug.d event
2) Getting mount info from blockd

Relevant commit ef1efa756e0d ("samba36: add package with hotplug.d
script for auto sharing"):
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=ef1efa756e0d0caef41216719dcc72c71b31d8ff

Today I realized it doesn't work for partitions mounted at boot time
as blockd isn't running then and "ubus call block info" simply fails.

"mount" hotplug.d events at boot time are generated by:
1) /etc/hotplug.d/block/10-mount calling /sbin/block hotplug
2) /sbin/block hotplug calling /sbin/hotplug-call mount

So it's not a matter of init.d order and adjusting START in
/etc/init.d/blockd (block devices appear EARLY).

Any idea how to solve this problem? Should we maybe postpone "mount"
events? E.g. until "blockd" start? Or should hotplug.d script somehow
wait until "blockd" starts?

-- 
Rafa?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From bobafetthotmail at gmail.com  Sun Dec 29 15:49:54 2019
From: bobafetthotmail at gmail.com (Alberto Bursi)
Date: Sun, 29 Dec 2019 21:49:54 +0100
Subject: [OpenWrt-Devel] Problem with blockd starting after partitions
 mounting
In-Reply-To: <CACna6rz=BYYPVzFPdPU6qtr5+i56qA1POYUrbTCKsS1r0a8jrw@mail.gmail.com>
References: <CACna6rz=BYYPVzFPdPU6qtr5+i56qA1POYUrbTCKsS1r0a8jrw@mail.gmail.com>
Message-ID: <a45b59bc-6cd7-d1f2-9c30-abdd67322970@gmail.com>



On 29/12/19 15:35, Rafa? Mi?ecki wrote:
> A year ago I introduced hotplug.d script meant to manage Samba shares
> in a clever way by:
> 1) Using "mount" hotplug.d event
> 2) Getting mount info from blockd
> 
> Relevant commit ef1efa756e0d ("samba36: add package with hotplug.d
> script for auto sharing"):
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=ef1efa756e0d0caef41216719dcc72c71b31d8ff
> 
> Today I realized it doesn't work for partitions mounted at boot time
> as blockd isn't running then and "ubus call block info" simply fails.
> 
> "mount" hotplug.d events at boot time are generated by:
> 1) /etc/hotplug.d/block/10-mount calling /sbin/block hotplug
> 2) /sbin/block hotplug calling /sbin/hotplug-call mount
> 
> So it's not a matter of init.d order and adjusting START in
> /etc/init.d/blockd (block devices appear EARLY).
> 
> Any idea how to solve this problem? Should we maybe postpone "mount"
> events? E.g. until "blockd" start? Or should hotplug.d script somehow
> wait until "blockd" starts?
> 

Either that or parsing the output of "block info"
The latter provides mount info (among others) and does not need blockd.

But it's not json so you will have to parse it differently, or add the 
ability to produce json to block.

-Alberto

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From noreply at github.com  Sun Dec 29 16:26:42 2019
From: noreply at github.com (Stephen Walker)
Date: Sun, 29 Dec 2019 13:26:42 -0800
Subject: [OpenWrt-Devel] [sdwalker/sdwalker.github.io] b52356: This week's
 update
Message-ID: <sdwalker/sdwalker.github.io/push/refs/heads/master/ac019b-b52356@github.com>

  Branch: refs/heads/master
  Home:   https://github.com/sdwalker/sdwalker.github.io
  Commit: b52356ed22538d192add9776624c48933490155f
      https://github.com/sdwalker/sdwalker.github.io/commit/b52356ed22538d192add9776624c48933490155f
  Author: Stephen Walker <stephendwalker+github at gmail.com>
  Date:   2019-12-29 (Sun, 29 Dec 2019)

  Changed paths:
    M uscan/index-18.06.html
    M uscan/index-19.07.html
    M uscan/index.html

  Log Message:
  -----------
  This week's update



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From ynezz at true.cz  Sun Dec 29 17:21:23 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Sun, 29 Dec 2019 23:21:23 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org>
References: <mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org>
Message-ID: <20191229222123.GH70184@meh.true.cz>

Petr Nov?k via openwrt-devel <openwrt-devel at lists.openwrt.org> [2019-12-29 11:49:36]:

Hi,

thanks for reporting it and sorry for the breakage.

> Reading partition table from bootdisk...
> Reading partition table from image...
> Saving config files...
> Commencing upgrade. Closing all shell sessions.
> {
> 	"error": {
> 		"message": "Firmware image couldn't be validated"
> 	}
> }
> Command failed: Unknown error

Although I dont own RPi4 (or anything else with Cortex-A72), I've just tried to
reproduce it on x86/64 QEMU as it should be poor man's "similar enough" target
(64-bit/little endian), but I've failed to reproduce it with following steps:

 1. I've copied target/linux/brcm2708/base-files/lib/upgrade/platform.sh to
    target/linux/x86/base-files/lib/upgrade/platform.sh in order to get same
    sysupgrade functionality of rpi-4 on x86/64
 2. build image and run it in QEMU
 3. inside QEMU I did following:

  ... snip ...
  OpenWrt SNAPSHOT, r11829+1-e3e939d8e624 (that +1 commit is my local CI staging tree build commit[1])
  ... snip ...

  root at OpenWrt:/# sysupgrade http://downloads.openwrt.org/snapshots/targets/brcm2708/bcm2711/openwrt-brcm2708-bcm2711-rpi-4-squashfs-sysupgrade.img.gz
  Downloading 'http://downloads.openwrt.org/snapshots/targets/brcm2708/bcm2711/openwrt-brcm2708-bcm2711-rpi-4-squashfs-sysupgrade.img.gz'
  Connecting to 176.9.48.73:80
  Writing to '/tmp/sysupgrade.img'
  /tmp/sysupgrade.img  100% |*******************************| 12067k  0:00:00 ETA
  Download completed (12357027 bytes)
  Device qemu-standard-pc-i440fx-piix-1996 not supported by this image
  Supported devices: raspberrypi,4-model-b
  Reading partition table from bootdisk...
  zcat: write error: Broken pipe
  zcat: write: Broken pipe
  Reading partition table from image...
  Partition layout has changed. Full image will be written.
  Image check failed.

  root at OpenWrt:/# cat /tmp/sysupgrade.meta 
  {  "metadata_version": "1.0", "supported_devices":["raspberrypi,4-model-b"], "version": { "dist": "OpenWrt", "version": "SNAPSHOT", "revision": "r11829-e3e939d8e6", "target": "brcm2708/bcm2711", "board": "rpi-4" } }

  root at OpenWrt:/# sha256sum /tmp/sysupgrade.img
  5f809879b0d9a0791cd9329997c944a1048cd6b5f0cf59aa5fc34b5381fefb1c  /tmp/sysupgrade.img

  root at OpenWrt:/# echo raspberrypi,4-model-b > /tmp/sysinfo/board_name 
 
  root at OpenWrt:/# sysupgrade /tmp/sysupgrade.img
  Reading partition table from bootdisk...
  zcat: write error: Broken pipe
  zcat: write: Broken pipe
  Reading partition table from image...
  Partition layout has changed. Full image will be written.
  Saving config files...
  Commencing upgrade. Closing all shell sessions.
  Failed to parse JSON: 4
  killall: telnetd: no process killed
  Sending TERM to remaining processes ... ubusd askfirst urngd logd netifd odhcpd ntpd dnsmasq 
  Sending KILL to remaining processes ...
  ... snip ...

  (BTW I've fix[2] for that "harmless" `Failed to parse JSON: 4` error message in my procd repo.)

So perhaps this is something Cortex-A72 related?

1. https://gitlab.com/ynezz/openwrt/commit/f0c4d73a9c36a54a36af019bd3b3e5aeb1bffcf4
2. https://gitlab.com/ynezz/openwrt-procd/commit/ff03f3ed9b6af8b209dae63f24790664c94bd916

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at david-bauer.net  Sun Dec 29 19:52:59 2019
From: mail at david-bauer.net (David Bauer)
Date: Mon, 30 Dec 2019 01:52:59 +0100
Subject: [OpenWrt-Devel] [PATCH] rt2x00: add throughput LED trigger
Message-ID: <20191230005259.175150-1-mail@david-bauer.net>

This adds a (currently missing) throughput LED trigger for the rt2x00
driver. Previously, LED triggers had to be assigned to the netdev, which
was limited to a single VAP.

Signed-off-by: David Bauer <mail at david-bauer.net>
Tested-by: Christoph Krapp <achterin at googlemail.com>
---
 .../612-rt2x00-led-tpt-trigger-support.patch  | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch

diff --git a/package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch b/package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch
new file mode 100644
index 0000000000..25d15b617f
--- /dev/null
+++ b/package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch
@@ -0,0 +1,44 @@
+From: David Bauer <mail at david-bauer.net>
+Date: Mon, 16 Dec 2019 20:47:06 +0100
+Subject: [PATCH] rt2x00: add throughput LED trigger
+
+This adds a (currently missing) throughput LED trigger for the rt2x00
+driver. Previously, LED triggers had to be assigned to the netdev, which
+was limited to a single VAP.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+Tested-by: Christoph Krapp <achterin at googlemail.com>
+
+--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+@@ -1129,6 +1129,19 @@ static void rt2x00lib_remove_hw(struct r
+ 	kfree(rt2x00dev->spec.channels_info);
+ }
+ 
++static const struct ieee80211_tpt_blink rt2x00_tpt_blink[] = {
++	{ .throughput = 0 * 1024, .blink_time = 334 },
++	{ .throughput = 1 * 1024, .blink_time = 260 },
++	{ .throughput = 2 * 1024, .blink_time = 220 },
++	{ .throughput = 5 * 1024, .blink_time = 190 },
++	{ .throughput = 10 * 1024, .blink_time = 170 },
++	{ .throughput = 25 * 1024, .blink_time = 150 },
++	{ .throughput = 54 * 1024, .blink_time = 130 },
++	{ .throughput = 120 * 1024, .blink_time = 110 },
++	{ .throughput = 265 * 1024, .blink_time = 80 },
++	{ .throughput = 586 * 1024, .blink_time = 50 },
++};
++
+ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
+ {
+ 	struct hw_mode_spec *spec = &rt2x00dev->spec;
+@@ -1211,6 +1225,10 @@ static int rt2x00lib_probe_hw(struct rt2
+ 
+ #undef RT2X00_TASKLET_INIT
+ 
++	ieee80211_create_tpt_led_trigger(rt2x00dev->hw,
++		IEEE80211_TPT_LEDTRIG_FL_RADIO, rt2x00_tpt_blink,
++		ARRAY_SIZE(rt2x00_tpt_blink));
++
+ 	/*
+ 	 * Register HW.
+ 	 */
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 29 22:41:16 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 19:41:16 -0800
Subject: [OpenWrt-Devel] [PATCH 1/3] toolchain/wrapper: Replace legacy ``
 with $()
Message-ID: <20191230034118.21718-1-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 target/toolchain/files/wrapper.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/toolchain/files/wrapper.sh b/target/toolchain/files/wrapper.sh
index 4452128382..bd4996cac2 100755
--- a/target/toolchain/files/wrapper.sh
+++ b/target/toolchain/files/wrapper.sh
@@ -15,10 +15,10 @@
 #
 
 PROGNAME=$0
-REALNAME=`readlink -f $0`
+REALNAME=$(readlink -f $0)
 
-REALNAME_BASE=`basename $REALNAME`
-REALNAME_DIR=`dirname $REALNAME`
+REALNAME_BASE=$(basename $REALNAME)
+REALNAME_DIR=$(dirname $REALNAME)
 
 TARGET_FUNDAMENTAL_ASFLAGS=''
 TARGET_FUNDAMENTAL_CFLAGS=''
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 29 22:41:17 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 19:41:17 -0800
Subject: [OpenWrt-Devel] [PATCH 2/3] toolchain/wrapper.sh: Replace read with
 read -r
In-Reply-To: <20191230034118.21718-1-rosenp@gmail.com>
References: <20191230034118.21718-1-rosenp@gmail.com>
Message-ID: <20191230034118.21718-2-rosenp@gmail.com>

Without -r, backslashes would get mangled.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 target/toolchain/files/wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/toolchain/files/wrapper.sh b/target/toolchain/files/wrapper.sh
index bd4996cac2..ba2b34778f 100755
--- a/target/toolchain/files/wrapper.sh
+++ b/target/toolchain/files/wrapper.sh
@@ -30,7 +30,7 @@ TARGET_TOOLCHAIN_TRIPLET=${REALNAME_BASE%-*}
 BINARY=${PROGNAME##*-}
 
 # Parse our tool name, splitting it at '-' characters.
-IFS=- read TOOLCHAIN_ARCH TOOLCHAIN_BUILDROOT TOOLCHAIN_OS TOOLCHAIN_PLATFORM PROGNAME << EOF
+IFS=- read -r TOOLCHAIN_ARCH TOOLCHAIN_BUILDROOT TOOLCHAIN_OS TOOLCHAIN_PLATFORM PROGNAME << EOF
 $REALNAME_BASE
 EOF
 
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 29 22:41:18 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 19:41:18 -0800
Subject: [OpenWrt-Devel] [PATCH 3/3] toolchain/wrapper.sh: Use /bin/sh
 instead of bash
In-Reply-To: <20191230034118.21718-1-rosenp@gmail.com>
References: <20191230034118.21718-1-rosenp@gmail.com>
Message-ID: <20191230034118.21718-3-rosenp@gmail.com>

No bash features are actually used here.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 target/toolchain/files/wrapper.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/toolchain/files/wrapper.sh b/target/toolchain/files/wrapper.sh
index ba2b34778f..d42c6a14d5 100755
--- a/target/toolchain/files/wrapper.sh
+++ b/target/toolchain/files/wrapper.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # 2009 (C) Copyright Industrie Dial Face S.p.A.
 #          Luigi 'Comio' Mantellini <luigi.mantellini at idf-hit.com>
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 29 22:42:48 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 19:42:48 -0800
Subject: [OpenWrt-Devel] [PATCH 1/4] scripts/gen_image_generic.sh: Replace
 -o with ||
Message-ID: <20191230034251.21873-1-rosenp@gmail.com>

-o is not well defined.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/gen_image_generic.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 2d2fb120ce..1e35b1b349 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -1,10 +1,10 @@
 #!/usr/bin/env bash
 # Copyright (C) 2006-2012 OpenWrt.org
 set -e -x
-[ $# == 5 -o $# == 6 ] || {
+if [ $# -ge 5 ] || [ $# -le 6 ]; then
     echo "SYNTAX: $0 <file> <kernel size> <kernel directory> <rootfs size> <rootfs image> [<align>]"
     exit 1
-}
+fi
 
 OUTPUT="$1"
 KERNELSIZE="$2"
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 29 22:42:49 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 19:42:49 -0800
Subject: [OpenWrt-Devel] [PATCH 2/4] scripts/gen_image_generic.sh: Remove $
 in arithmetic
In-Reply-To: <20191230034251.21873-1-rosenp@gmail.com>
References: <20191230034251.21873-1-rosenp@gmail.com>
Message-ID: <20191230034251.21873-2-rosenp@gmail.com>

Fixes shellcheck warning:

SC2004: $/${} is unnecessary on arithmetic variables.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/gen_image_generic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 1e35b1b349..9f3e4d024c 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -17,7 +17,7 @@ rm -f "$OUTPUT"
 
 head=16
 sect=63
-cyl=$(( ($KERNELSIZE + $ROOTFSSIZE) * 1024 * 1024 / ($head * $sect * 512)))
+cyl=$(( (KERNELSIZE + ROOTFSSIZE) * 1024 * 1024 / (head * sect * 512)))
 
 # create partition table
 set `ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE}`
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 29 22:42:50 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 19:42:50 -0800
Subject: [OpenWrt-Devel] [PATCH 3/4] scripts/gen_image_generic.sh: Replace
 deprecated `` with $()
In-Reply-To: <20191230034251.21873-1-rosenp@gmail.com>
References: <20191230034251.21873-1-rosenp@gmail.com>
Message-ID: <20191230034251.21873-3-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/gen_image_generic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 9f3e4d024c..0832bf91de 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -20,7 +20,7 @@ sect=63
 cyl=$(( (KERNELSIZE + ROOTFSSIZE) * 1024 * 1024 / (head * sect * 512)))
 
 # create partition table
-set `ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE}`
+set $(ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE})
 
 KERNELOFFSET="$(($1 / 512))"
 KERNELSIZE="$2"
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 29 22:42:51 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 19:42:51 -0800
Subject: [OpenWrt-Devel] [PATCH 4/4] scripts/gen_image_generic.sh: use
 /bin/sh
In-Reply-To: <20191230034251.21873-1-rosenp@gmail.com>
References: <20191230034251.21873-1-rosenp@gmail.com>
Message-ID: <20191230034251.21873-4-rosenp@gmail.com>

This has nothing bash specific.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/gen_image_generic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 0832bf91de..6a8065e15a 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
 # Copyright (C) 2006-2012 OpenWrt.org
 set -e -x
 if [ $# -ge 5 ] || [ $# -le 6 ]; then
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 29 22:48:24 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 19:48:24 -0800
Subject: [OpenWrt-Devel] [PATCH 1/4] scripts/clean-package.sh: exit in case
 cd fails
Message-ID: <20191230034827.22185-1-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/clean-package.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index 6dd9bf7306..987e6685a8 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -9,14 +9,14 @@ IFS=$'\n'
 	exit 1
 }
 cat "$1" | (
-	cd "$2"
+	cd "$2" || exit 1
 	while read entry; do
 		[ -n "$entry" ] || break
 		[ -f "$entry" ] && rm -f $entry
 	done
 )
 sort -r "$1" | (
-	cd "$2"
+	cd "$2" || exit 1
 	while read entry; do
 		[ -n "$entry" ] || break
 		[ -d "$entry" ] && rmdir "$entry" > /dev/null 2>&1
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 29 22:48:25 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 19:48:25 -0800
Subject: [OpenWrt-Devel] [PATCH 2/4] scripts/clean-package.sh: Use read -r
In-Reply-To: <20191230034827.22185-1-rosenp@gmail.com>
References: <20191230034827.22185-1-rosenp@gmail.com>
Message-ID: <20191230034827.22185-2-rosenp@gmail.com>

read will mangle backslashes.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/clean-package.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index 987e6685a8..e849c41afa 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -10,14 +10,14 @@ IFS=$'\n'
 }
 cat "$1" | (
 	cd "$2" || exit 1
-	while read entry; do
+	while read -r entry; do
 		[ -n "$entry" ] || break
 		[ -f "$entry" ] && rm -f $entry
 	done
 )
 sort -r "$1" | (
 	cd "$2" || exit 1
-	while read entry; do
+	while read -r entry; do
 		[ -n "$entry" ] || break
 		[ -d "$entry" ] && rmdir "$entry" > /dev/null 2>&1
 	done
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 29 22:48:26 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 19:48:26 -0800
Subject: [OpenWrt-Devel] [PATCH 3/4] scripts/clean-package.sh: Remove
 useless cat
In-Reply-To: <20191230034827.22185-1-rosenp@gmail.com>
References: <20191230034827.22185-1-rosenp@gmail.com>
Message-ID: <20191230034827.22185-3-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/clean-package.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index e849c41afa..b64d7ad21a 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -8,13 +8,13 @@ IFS=$'\n'
 	echo "File/directory not found"
 	exit 1
 }
-cat "$1" | (
+(
 	cd "$2" || exit 1
 	while read -r entry; do
 		[ -n "$entry" ] || break
 		[ -f "$entry" ] && rm -f $entry
 	done
-)
+) < "$1"
 sort -r "$1" | (
 	cd "$2" || exit 1
 	while read -r entry; do
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Sun Dec 29 22:48:27 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 19:48:27 -0800
Subject: [OpenWrt-Devel] [PATCH 4/4] scripts/clean-package.sh: Switch from
 -a in if to &&
In-Reply-To: <20191230034827.22185-1-rosenp@gmail.com>
References: <20191230034827.22185-1-rosenp@gmail.com>
Message-ID: <20191230034827.22185-4-rosenp@gmail.com>

-a is not well defined.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/clean-package.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh
index b64d7ad21a..2c9d4169ba 100755
--- a/scripts/clean-package.sh
+++ b/scripts/clean-package.sh
@@ -1,13 +1,14 @@
 #!/usr/bin/env bash
 IFS=$'\n'
-[ -n "$1" -a -n "$2" ] || {
+
+if [ -z "$1" ] || [ -z "$2" ]; then
 	echo "Usage: $0 <file> <directory>"
 	exit 1
-}
-[ -f "$1" -a -d "$2" ] || {
+fi
+if [ ! -f "$1" ] || [ ! -d "$2" ]; then
 	echo "File/directory not found"
 	exit 1
-}
+fi
 (
 	cd "$2" || exit 1
 	while read -r entry; do
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From lists at sumpfralle.de  Sun Dec 29 23:14:52 2019
From: lists at sumpfralle.de (Lars Kruse)
Date: Mon, 30 Dec 2019 05:14:52 +0100
Subject: [OpenWrt-Devel] [PATCH 4/4] scripts/gen_image_generic.sh: use
 /bin/sh
In-Reply-To: <20191230034251.21873-4-rosenp@gmail.com>
References: <20191230034251.21873-1-rosenp@gmail.com>
 <20191230034251.21873-4-rosenp@gmail.com>
Message-ID: <20191230051452.157fc811@erker.lan>

Hello Rosen,


Am Sun, 29 Dec 2019 19:42:51 -0800
schrieb Rosen Penev <rosenp at gmail.com>:

> This has nothing bash specific.
> [..]
> -#!/usr/bin/env bash
> +#!/bin/bash

I think, the commit message indicates that you switched from bash to sh.
Or did I misread it somehow?

Cheers,
Lars

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From s.l-h at gmx.de  Sun Dec 29 23:19:16 2019
From: s.l-h at gmx.de (Stefan Lippers-Hollmann)
Date: Mon, 30 Dec 2019 05:19:16 +0100
Subject: [OpenWrt-Devel] [PATCH 4/4] scripts/gen_image_generic.sh: use
 /bin/sh
In-Reply-To: <20191230034251.21873-4-rosenp@gmail.com>
References: <20191230034251.21873-1-rosenp@gmail.com>
 <20191230034251.21873-4-rosenp@gmail.com>
Message-ID: <20191230051916.54ac3a81@mir>

Hi

On 2019-12-29, Rosen Penev wrote:
> This has nothing bash specific.
[...]
> +++ b/scripts/gen_image_generic.sh
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env bash
> +#!/bin/bash

I assume this was supposed to become #!/bin/sh instead?

Regards
	Stefan Lippers-Hollmann

--
Thanks for looking into this, unecessary bashisms have bothered me quite
a bit as well.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 00:04:27 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 21:04:27 -0800
Subject: [OpenWrt-Devel] [PATCH 4/4] scripts/gen_image_generic.sh: use
 /bin/sh
In-Reply-To: <20191230051916.54ac3a81@mir>
References: <20191230034251.21873-1-rosenp@gmail.com>
 <20191230034251.21873-4-rosenp@gmail.com>
 <20191230051916.54ac3a81@mir>
Message-ID: <CAKxU2N94OHxcf6cdwTwi94YXuw5A3mBJoMKKhSQw3=r4dnbZvg@mail.gmail.com>

On Sun, Dec 29, 2019 at 8:19 PM Stefan Lippers-Hollmann <s.l-h at gmx.de> wrote:
>
> Hi
>
> On 2019-12-29, Rosen Penev wrote:
> > This has nothing bash specific.
> [...]
> > +++ b/scripts/gen_image_generic.sh
> > @@ -1,4 +1,4 @@
> > -#!/usr/bin/env bash
> > +#!/bin/bash
>
> I assume this was supposed to become #!/bin/sh instead?
Yes. Will resend.
>
> Regards
>         Stefan Lippers-Hollmann
>
> --
> Thanks for looking into this, unecessary bashisms have bothered me quite
> a bit as well.
The main benefit should be faster speed (hence why Ubuntu uses dash),

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 00:07:53 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 21:07:53 -0800
Subject: [OpenWrt-Devel] [PATCHv2 1/4] scripts/gen_image_generic.sh: Replace
 -o with ||
Message-ID: <20191230050756.3675-1-rosenp@gmail.com>

-o is not well defined.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/gen_image_generic.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 2d2fb120ce..1e35b1b349 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -1,10 +1,10 @@
 #!/usr/bin/env bash
 # Copyright (C) 2006-2012 OpenWrt.org
 set -e -x
-[ $# == 5 -o $# == 6 ] || {
+if [ $# -ge 5 ] || [ $# -le 6 ]; then
     echo "SYNTAX: $0 <file> <kernel size> <kernel directory> <rootfs size> <rootfs image> [<align>]"
     exit 1
-}
+fi
 
 OUTPUT="$1"
 KERNELSIZE="$2"
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 00:07:54 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 21:07:54 -0800
Subject: [OpenWrt-Devel] [PATCHv2 2/4] scripts/gen_image_generic.sh: Remove
 $ in arithmetic
In-Reply-To: <20191230050756.3675-1-rosenp@gmail.com>
References: <20191230050756.3675-1-rosenp@gmail.com>
Message-ID: <20191230050756.3675-2-rosenp@gmail.com>

Fixes shellcheck warning:

SC2004: $/${} is unnecessary on arithmetic variables.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/gen_image_generic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 1e35b1b349..9f3e4d024c 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -17,7 +17,7 @@ rm -f "$OUTPUT"
 
 head=16
 sect=63
-cyl=$(( ($KERNELSIZE + $ROOTFSSIZE) * 1024 * 1024 / ($head * $sect * 512)))
+cyl=$(( (KERNELSIZE + ROOTFSSIZE) * 1024 * 1024 / (head * sect * 512)))
 
 # create partition table
 set `ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE}`
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 00:07:55 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 21:07:55 -0800
Subject: [OpenWrt-Devel] [PATCHv2 3/4] scripts/gen_image_generic.sh: Replace
 deprecated `` with $()
In-Reply-To: <20191230050756.3675-1-rosenp@gmail.com>
References: <20191230050756.3675-1-rosenp@gmail.com>
Message-ID: <20191230050756.3675-3-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/gen_image_generic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 9f3e4d024c..0832bf91de 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -20,7 +20,7 @@ sect=63
 cyl=$(( (KERNELSIZE + ROOTFSSIZE) * 1024 * 1024 / (head * sect * 512)))
 
 # create partition table
-set `ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE}`
+set $(ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE})
 
 KERNELOFFSET="$(($1 / 512))"
 KERNELSIZE="$2"
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 00:07:56 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Sun, 29 Dec 2019 21:07:56 -0800
Subject: [OpenWrt-Devel] [PATCHv2 4/4] scripts/gen_image_generic.sh: use
 /bin/sh
In-Reply-To: <20191230050756.3675-1-rosenp@gmail.com>
References: <20191230050756.3675-1-rosenp@gmail.com>
Message-ID: <20191230050756.3675-4-rosenp@gmail.com>

This has nothing bash specific.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/gen_image_generic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 0832bf91de..6a8065e15a 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 # Copyright (C) 2006-2012 OpenWrt.org
 set -e -x
 if [ $# -ge 5 ] || [ $# -le 6 ]; then
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dengqf6 at mail2.sysu.edu.cn  Mon Dec 30 00:49:51 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Mon, 30 Dec 2019 13:49:51 +0800
Subject: [OpenWrt-Devel] [PATCH] iptables: update to 1.8.4
Message-ID: <20191230054951.23621-1-dengqf6@mail2.sysu.edu.cn>

Update iptables to 1.8.4

ChangeLog:
  https://netfilter.org/projects/iptables/files/changes-iptables-1.8.4.txt

Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
---
 package/network/utils/iptables/Makefile              |  6 +++---
 .../utils/iptables/patches/600-shared-libext.patch   | 12 ++++++------
 .../patches/700-disable-legacy-revisions.patch       | 10 +++++-----
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile
index 7e8e6f7eaa..12efa94355 100644
--- a/package/network/utils/iptables/Makefile
+++ b/package/network/utils/iptables/Makefile
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=iptables
-PKG_VERSION:=1.8.3
-PKG_RELEASE:=2
+PKG_VERSION:=1.8.4
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://netfilter.org/projects/iptables/files
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=a23cac034181206b4545f4e7e730e76e08b5f3dd78771ba9645a6756de9cdd80
+PKG_HASH:=993a3a5490a544c2cbf2ef15cf7e7ed21af1845baf228318d5c36ef8827e157c
 
 PKG_FIXUP:=autoreconf
 PKG_FLAGS:=nonshared
diff --git a/package/network/utils/iptables/patches/600-shared-libext.patch b/package/network/utils/iptables/patches/600-shared-libext.patch
index f5c9c9d779..7b798b7fda 100644
--- a/package/network/utils/iptables/patches/600-shared-libext.patch
+++ b/package/network/utils/iptables/patches/600-shared-libext.patch
@@ -54,7 +54,7 @@
  initextb_func := $(addprefix ebt_,${pfb_build_static})
 --- a/iptables/Makefile.am
 +++ b/iptables/Makefile.am
-@@ -8,19 +8,22 @@ BUILT_SOURCES =
+@@ -7,19 +7,22 @@ BUILT_SOURCES =
  
  xtables_legacy_multi_SOURCES  = xtables-legacy-multi.c iptables-xml.c
  xtables_legacy_multi_CFLAGS   = ${AM_CFLAGS}
@@ -80,8 +80,8 @@
  endif
  xtables_legacy_multi_SOURCES += xshared.c iptables-restore.c iptables-save.c
  xtables_legacy_multi_LDADD   += ../libxtables/libxtables.la -lm
-@@ -30,7 +33,8 @@ if ENABLE_NFTABLES
- BUILT_SOURCES += xtables-config-parser.h
+@@ -28,7 +31,8 @@ xtables_legacy_multi_LDADD   += ../libxt
+ if ENABLE_NFTABLES
  xtables_nft_multi_SOURCES  = xtables-nft-multi.c iptables-xml.c
  xtables_nft_multi_CFLAGS   = ${AM_CFLAGS}
 -xtables_nft_multi_LDADD    = ../extensions/libext.a ../extensions/libext_ebt.a
@@ -90,13 +90,13 @@
  if ENABLE_STATIC
  xtables_nft_multi_CFLAGS  += -DALL_INCLUSIVE
  endif
-@@ -45,7 +49,8 @@ xtables_nft_multi_SOURCES += xtables-sav
+@@ -42,7 +46,8 @@ xtables_nft_multi_SOURCES += xtables-sav
  				xtables-eb-standalone.c xtables-eb.c \
  				xtables-eb-translate.c \
  				xtables-translate.c
 -xtables_nft_multi_LDADD   += ${libmnl_LIBS} ${libnftnl_LIBS} ${libnetfilter_conntrack_LIBS} ../extensions/libext4.a ../extensions/libext6.a ../extensions/libext_ebt.a ../extensions/libext_arpt.a
 +xtables_nft_multi_LDADD   += ${libmnl_LIBS} ${libnftnl_LIBS} ${libnetfilter_conntrack_LIBS}
 +xtables_nft_multi_LDFLAGS += -liptext4 -liptext6 -liptext_arpt
- # yacc and lex generate dirty code
- xtables_nft_multi-xtables-config-parser.o xtables_nft_multi-xtables-config-syntax.o: AM_CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations -Wno-implicit-function-declaration -Wno-nested-externs -Wno-undef -Wno-redundant-decls
  xtables_nft_multi_SOURCES += xshared.c
+ xtables_nft_multi_LDADD   += ../libxtables/libxtables.la -lm
+ endif
diff --git a/package/network/utils/iptables/patches/700-disable-legacy-revisions.patch b/package/network/utils/iptables/patches/700-disable-legacy-revisions.patch
index 328f3af18d..86715fc8e7 100644
--- a/package/network/utils/iptables/patches/700-disable-legacy-revisions.patch
+++ b/package/network/utils/iptables/patches/700-disable-legacy-revisions.patch
@@ -1,6 +1,6 @@
 --- a/extensions/libxt_conntrack.c
 +++ b/extensions/libxt_conntrack.c
-@@ -1389,6 +1389,7 @@ static int conntrack3_mt6_xlate(struct x
+@@ -1387,6 +1387,7 @@ static int conntrack3_mt6_xlate(struct x
  }
  
  static struct xtables_match conntrack_mt_reg[] = {
@@ -8,7 +8,7 @@
  	{
  		.version       = XTABLES_VERSION,
  		.name          = "conntrack",
-@@ -1464,6 +1465,7 @@ static struct xtables_match conntrack_mt
+@@ -1462,6 +1463,7 @@ static struct xtables_match conntrack_mt
  		.alias	       = conntrack_print_name_alias,
  		.x6_options    = conntrack2_mt_opts,
  	},
@@ -16,7 +16,7 @@
  	{
  		.version       = XTABLES_VERSION,
  		.name          = "conntrack",
-@@ -1496,6 +1498,7 @@ static struct xtables_match conntrack_mt
+@@ -1494,6 +1496,7 @@ static struct xtables_match conntrack_mt
  		.x6_options    = conntrack3_mt_opts,
  		.xlate	       = conntrack3_mt6_xlate,
  	},
@@ -24,7 +24,7 @@
  	{
  		.family        = NFPROTO_UNSPEC,
  		.name          = "state",
-@@ -1526,6 +1529,8 @@ static struct xtables_match conntrack_mt
+@@ -1524,6 +1527,8 @@ static struct xtables_match conntrack_mt
  		.x6_parse      = state_ct23_parse,
  		.x6_options    = state_opts,
  	},
@@ -33,7 +33,7 @@
  	{
  		.family        = NFPROTO_UNSPEC,
  		.name          = "state",
-@@ -1555,6 +1560,7 @@ static struct xtables_match conntrack_mt
+@@ -1553,6 +1558,7 @@ static struct xtables_match conntrack_mt
  		.x6_parse      = state_parse,
  		.x6_options    = state_opts,
  	},
-- 
2.24.1





_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Mon Dec 30 01:54:53 2019
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Mon, 30 Dec 2019 07:54:53 +0100
Subject: [OpenWrt-Devel] [PATCH] samba36: log error if getting device info
 failed
Message-ID: <20191230065453.3067-1-zajec5@gmail.com>

From: Rafa? Mi?ecki <rafal at milecki.pl>

Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/network/services/samba36/Makefile            |  2 +-
 package/network/services/samba36/files/samba.hotplug | 12 +++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/package/network/services/samba36/Makefile b/package/network/services/samba36/Makefile
index a4392f62c5..161f6b45aa 100644
--- a/package/network/services/samba36/Makefile
+++ b/package/network/services/samba36/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=samba
 PKG_VERSION:=3.6.25
-PKG_RELEASE:=14
+PKG_RELEASE:=15
 
 PKG_SOURCE_URL:=https://download.samba.org/pub/samba \
 		https://download.samba.org/pub/samba/stable
diff --git a/package/network/services/samba36/files/samba.hotplug b/package/network/services/samba36/files/samba.hotplug
index e1ae64e655..abb4346af0 100644
--- a/package/network/services/samba36/files/samba.hotplug
+++ b/package/network/services/samba36/files/samba.hotplug
@@ -6,7 +6,7 @@ device_get_vars() {
 	json_init
 	json_load "$(ubus call block info)"
 
-	json_select devices
+	json_select devices || return 1
 
 	json_get_keys keys
 	for key in $keys
@@ -18,13 +18,16 @@ device_get_vars() {
 			shift
 			json_get_vars $@
 			json_select ..
-			break
+			json_select ..
+			return 0
 		}
 
 		json_select ..
 	done
 
 	json_select ..
+
+	return 2
 }
 
 [ -f /var/run/config/samba ] || {
@@ -32,7 +35,10 @@ device_get_vars() {
 }
 
 [ "$ACTION" = "add" ] && {
-	device_get_vars $DEVICE label mount
+	device_get_vars $DEVICE label mount || {
+		logger -t samba-hotplug "Failed to get $DEVICE info"
+		exit 1
+	}
 	[ -n "$mount" ] && {
 		uci -c /var/run/config batch <<-EOF
 			set samba.$DEVICE="sambashare"
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From jo at mein.io  Mon Dec 30 06:42:50 2019
From: jo at mein.io (Jo-Philipp Wich)
Date: Mon, 30 Dec 2019 12:42:50 +0100
Subject: [OpenWrt-Devel] Preserving configs over sysupgrade on
 ath79/tiny broken for some boards (on 19.07 and master), possible solutions
In-Reply-To: <20191228140048.GO11377@home.paul.comp>
References: <20191228140048.GO11377@home.paul.comp>
Message-ID: <9f716d9b-4230-b3e0-7e38-78c4c4781a78@wwsnet.net>

Hi,

given that (binary release) support for 4MB devices will end with 19.07,
I'd vote for reverting the 4K sector change in ath79 and stick with 64K
ones as common denominator across the entire target. That will be the
least invasive and most robust fix.

Regards,
Jo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191230/f2992730/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at david-bauer.net  Mon Dec 30 08:22:21 2019
From: mail at david-bauer.net (David Bauer)
Date: Mon, 30 Dec 2019 14:22:21 +0100
Subject: [OpenWrt-Devel] Preserving configs over sysupgrade on
 ath79/tiny broken for some boards (on 19.07 and master), possible solutions
In-Reply-To: <9f716d9b-4230-b3e0-7e38-78c4c4781a78@wwsnet.net>
References: <20191228140048.GO11377@home.paul.comp>
 <9f716d9b-4230-b3e0-7e38-78c4c4781a78@wwsnet.net>
Message-ID: <36732b2f-c95a-5749-e028-653a9f8ea4f8@david-bauer.net>

Hello,

On 12/30/19 12:42 PM, Jo-Philipp Wich wrote:
> Hi,
> 
> given that (binary release) support for 4MB devices will end with 19.07,
> I'd vote for reverting the 4K sector change in ath79 and stick with 64K
> ones as common denominator across the entire target. That will be the
> least invasive and most robust fix.

+1

IMHO this change is way to crucial to have it introduced this short before
the release is built. People who built images for their devices can introduce
4K sectors to their own images. This way, we do't risk breaking boards.

Best wishes
David

> 
> Regards,
> Jo
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From pepe2k at gmail.com  Mon Dec 30 08:41:12 2019
From: pepe2k at gmail.com (Piotr Dymacz)
Date: Mon, 30 Dec 2019 14:41:12 +0100
Subject: [OpenWrt-Devel] Preserving configs over sysupgrade on
 ath79/tiny broken for some boards (on 19.07 and master), possible solutions
In-Reply-To: <36732b2f-c95a-5749-e028-653a9f8ea4f8@david-bauer.net>
References: <20191228140048.GO11377@home.paul.comp>
 <9f716d9b-4230-b3e0-7e38-78c4c4781a78@wwsnet.net>
 <36732b2f-c95a-5749-e028-653a9f8ea4f8@david-bauer.net>
Message-ID: <bcd2f7e5-abad-3b9c-7a62-b79bd6b424a6@gmail.com>

Hi David, Jo,

On 30.12.2019 14:22, David Bauer wrote:
> Hello,
> 
> On 12/30/19 12:42 PM, Jo-Philipp Wich wrote:
>> Hi,
>> 
>> given that (binary release) support for 4MB devices will end with 19.07,
>> I'd vote for reverting the 4K sector change in ath79 and stick with 64K
>> ones as common denominator across the entire target. That will be the
>> least invasive and most robust fix.
> 
> +1
> 
> IMHO this change is way to crucial to have it introduced this short before
> the release is built. People who built images for their devices can introduce
> 4K sectors to their own images. This way, we do't risk breaking boards.

+1

-- 
Cheers,
Piotr

> 
> Best wishes
> David
> 
>> 
>> Regards,
>> Jo
>> 
>> 
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Mon Dec 30 10:10:22 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Mon, 30 Dec 2019 16:10:22 +0100
Subject: [OpenWrt-Devel] [PATCH] samba36: log error if getting device
 info failed
In-Reply-To: <20191230065453.3067-1-zajec5@gmail.com>
References: <20191230065453.3067-1-zajec5@gmail.com>
Message-ID: <01d301d5bf23$4231faf0$c695f0d0$@adrianschmutzler.de>

Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Rafal Milecki
> Sent: Montag, 30. Dezember 2019 07:55
> To: openwrt-devel at lists.openwrt.org
> Cc: Rafa? Mi?ecki <rafal at milecki.pl>
> Subject: [OpenWrt-Devel] [PATCH] samba36: log error if getting device info
> failed
> 

are you aware of https://github.com/openwrt/openwrt/pull/2368 or is this
just meant for backporting?

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191230/b1911e68/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From dengqf6 at mail2.sysu.edu.cn  Mon Dec 30 10:59:12 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Mon, 30 Dec 2019 23:59:12 +0800
Subject: [OpenWrt-Devel] [PATCH] ramips: mt7620: use throughput trigger on
 HiWiFi HC5x61
Message-ID: <20191230155912.2130-1-dengqf6@mail2.sysu.edu.cn>

Throughput trigger support for MT7620 has been added, so switch to it
Remove HC5661 non-existent 5GHz LED

Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
---
 target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts        | 6 +-----
 target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts        | 2 ++
 target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts        | 2 ++
 .../linux/ramips/mt7620/base-files/etc/board.d/01_leds   | 9 +--------
 4 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts
index 185e045de1..452541137a 100644
--- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts
@@ -29,11 +29,7 @@
 		wlan2g {
 			label = "hc5661:blue:wlan2g";
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
-		};
-
-		wlan5g {
-			label = "hc5661:blue:wlan5g";
-			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts
index 265f7d9bb1..33ef8dd2aa 100644
--- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts
@@ -29,11 +29,13 @@
 		wlan2g {
 			label = "hc5761:blue:wlan2g";
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
 		};
 
 		wlan5g {
 			label = "hc5761:blue:wlan5g";
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
index 73f1a4079a..83a3a67ed0 100644
--- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
@@ -24,6 +24,7 @@
 		wlan2g {
 			label = "hc5861:blue:wlan2g";
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
 		};
 
 		internet {
@@ -34,6 +35,7 @@
 		wlan5g {
 			label = "hc5861:blue:wlan5g";
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
 		};
 
 		turbo {
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
index d88fdfb043..c71333654a 100755
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
@@ -111,19 +111,12 @@ glinet,gl-mt300n|\
 glinet,gl-mt750)
 	set_wifi_led "$boardname:wlan"
 	;;
-hiwifi,hc5661)
-	ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x01"
-	set_wifi_led "$boardname:blue:wlan2g"
-	;;
+hiwifi,hc5661|\
 hiwifi,hc5761)
 	ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x01"
-	ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "wlan0"
-	ucidef_set_led_netdev "wifi2g" "wifi2g" "$boardname:blue:wlan2g" "wlan1"
 	;;
 hiwifi,hc5861)
 	ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x20"
-	ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "wlan0"
-	ucidef_set_led_netdev "wifi2g" "wifi2g" "$boardname:blue:wlan2g" "wlan1"
 	;;
 hnet,c108)
 	ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" "eth0"
-- 
2.24.1




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Mon Dec 30 11:29:39 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Mon, 30 Dec 2019 17:29:39 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: mt7620: use throughput trigger
 on HiWiFi HC5x61
In-Reply-To: <20191230155912.2130-1-dengqf6@mail2.sysu.edu.cn>
References: <20191230155912.2130-1-dengqf6@mail2.sysu.edu.cn>
Message-ID: <025701d5bf2e$562b5960$02820c20$@adrianschmutzler.de>

Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of DENG Qingfang
> Sent: Montag, 30. Dezember 2019 16:59
> To: openwrt-devel at lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH] ramips: mt7620: use throughput trigger
> on HiWiFi HC5x61
> 
> Throughput trigger support for MT7620 has been added, so switch to it
> Remove HC5661 non-existent 5GHz LED
> 
> Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
> ---
>  target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts        | 6 +-----
>  target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts        | 2 ++
>  target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts        | 2 ++
>  .../linux/ramips/mt7620/base-files/etc/board.d/01_leds   | 9 +--------
>  4 files changed, 6 insertions(+), 13 deletions(-)

thanks.

I'd prefer to have the LED removal as a separate patch (IMO best before the phyXtpt changes).

Have you tested on one of the devices?

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191230/9be03ebb/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Mon Dec 30 14:07:46 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Mon, 30 Dec 2019 20:07:46 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <20191229222123.GH70184@meh.true.cz>
References: <mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org>
 <20191229222123.GH70184@meh.true.cz>
Message-ID: <20191230190746.GI70184@meh.true.cz>

Petr ?tetiar <ynezz at true.cz> [2019-12-29 23:21:23]:

> So perhaps this is something Cortex-A72 related?

I've just tried it under QEMU 4.2.50 with:

 * machine: virt
 * cpu:     cortex-a72
 * rootfs:  http://downloads.openwrt.org/snapshots/targets/armvirt/64/openwrt-armvirt-64-rootfs-squashfs.img.gz
            (OpenWrt SNAPSHOT, r11829-e3e939d8e6)

and the result is same as on x86/64, I'm unable to reproduce the issue:

 root at OpenWrt:/# sysupgrade http://downloads.openwrt.org/snapshots/targets/brcm2708/bcm2711/openwrt-brcm2708-bcm2711-rpi-4-squashfs-sysupgrade.img.gz
 Downloading 'http://downloads.openwrt.org/snapshots/targets/brcm2708/bcm2711/openwrt-brcm2708-bcm2711-rpi-4-squashfs-sysupgrade.img.gz'
 Connecting to 176.9.48.73:80
 Writing to '/tmp/sysupgrade.img'
 /tmp/sysupgrade.img  100% |*******************************| 12067k  0:00:00 ETA
 Download completed (12357050 bytes)
 Device linux,dummy-virt not supported by this image
 Supported devices: raspberrypi,4-model-b
 Image check failed.

root at OpenWrt:/# echo raspberrypi,4-model-b > /tmp/sysinfo/board_name

root at OpenWrt:/# sysupgrade /tmp/sysupgrade.img 
 Saving config files...
 Commencing upgrade. Closing all shell sessions.
 killall: telnetd: no process killed
 Sending TERM to remaining processes ... dnsmasq netifd odhcpd ntpd ubusd urngd logd 
 Sending KILL to remaining processes ... 
 Switching to ramdisk...
 ...snip...

So I'm wondering what is going on there.

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Mon Dec 30 14:43:36 2019
From: openwrt-devel at lists.openwrt.org (=?utf-8?q?Petr_Nov=C3=A1k_via_openwrt-devel?=)
Date: Mon, 30 Dec 2019 20:43:36 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <20191230190746.GI70184@meh.true.cz>
References: <mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org>
 <20191229222123.GH70184@meh.true.cz> <20191230190746.GI70184@meh.true.cz>
Message-ID: <mailman.21390.1577735029.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: =?utf-8?Q?Petr_Nov=C3=A1k?= <petrn at me.com>
Subject: Re: [OpenWrt-Devel] Sysupgrade possibly broken in recent development snapshots: "message": "Firmware image couldn't be validated"
Date: Mon, 30 Dec 2019 20:43:36 +0100
Size: 5146
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191230/7d9521e1/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From bjorn at mork.no  Mon Dec 30 16:10:27 2019
From: bjorn at mork.no (=?UTF-8?q?Bj=C3=B8rn=20Mork?=)
Date: Mon, 30 Dec 2019 22:10:27 +0100
Subject: [OpenWrt-Devel] [PATCH] ath79: drop obsolete ehci hacks
Message-ID: <20191230211027.19005-1-bjorn@mork.no>

There's nothing enabling these hacks in ath79, so drop the redundant
patches.

Signed-off-by: Bj?rn Mork <bjorn at mork.no>
---
 ...490-usb-ehci-add-quirks-for-qca-socs.patch | 103 ------------------
 ...490-usb-ehci-add-quirks-for-qca-socs.patch | 103 ------------------
 2 files changed, 206 deletions(-)
 delete mode 100644 target/linux/ath79/patches-4.14/490-usb-ehci-add-quirks-for-qca-socs.patch
 delete mode 100644 target/linux/ath79/patches-4.19/490-usb-ehci-add-quirks-for-qca-socs.patch

diff --git a/target/linux/ath79/patches-4.14/490-usb-ehci-add-quirks-for-qca-socs.patch b/target/linux/ath79/patches-4.14/490-usb-ehci-add-quirks-for-qca-socs.patch
deleted file mode 100644
index 1d1979cd6eb8..000000000000
--- a/target/linux/ath79/patches-4.14/490-usb-ehci-add-quirks-for-qca-socs.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/drivers/usb/host/ehci-hcd.c
-+++ b/drivers/usb/host/ehci-hcd.c
-@@ -252,6 +252,37 @@ int ehci_reset(struct ehci_hcd *ehci)
- 	command |= CMD_RESET;
- 	dbg_cmd (ehci, "reset", command);
- 	ehci_writel(ehci, command, &ehci->regs->command);
-+
-+	if (ehci->qca_force_host_mode) {
-+		u32 usbmode;
-+
-+		udelay(1000);
-+
-+		usbmode = ehci_readl(ehci, &ehci->regs->usbmode);
-+		usbmode |= USBMODE_CM_HC | (1 << 4);
-+		ehci_writel(ehci, usbmode, &ehci->regs->usbmode);
-+
-+		ehci_dbg(ehci, "forced host mode, usbmode: %08x\n",
-+			 ehci_readl(ehci, &ehci->regs->usbmode));
-+	}
-+
-+	if (ehci->qca_force_16bit_ptw) {
-+		u32 port_status;
-+
-+		udelay(1000);
-+
-+		/* enable 16-bit UTMI interface */
-+		port_status = ehci_readl(ehci, &ehci->regs->port_status[0]);
-+		port_status |= BIT(28);
-+		ehci_writel(ehci, port_status, &ehci->regs->port_status[0]);
-+
-+		ehci_dbg(ehci, "16-bit UTMI interface enabled, status: %08x\n",
-+			 ehci_readl(ehci, &ehci->regs->port_status[0]));
-+	}
-+
-+	if (ehci->reset_notifier)
-+		ehci->reset_notifier(ehci_to_hcd(ehci));
-+
- 	ehci->rh_state = EHCI_RH_HALTED;
- 	ehci->next_statechange = jiffies;
- 	retval = ehci_handshake(ehci, &ehci->regs->command,
---- a/drivers/usb/host/ehci.h
-+++ b/drivers/usb/host/ehci.h
-@@ -232,6 +232,10 @@ struct ehci_hcd {			/* one per controlle
- 	unsigned		need_oc_pp_cycle:1; /* MPC834X port power */
- 	unsigned		imx28_write_fix:1; /* For Freescale i.MX28 */
- 	unsigned		ignore_oc:1;
-+	unsigned		qca_force_host_mode:1;
-+	unsigned		qca_force_16bit_ptw:1; /* force 16 bit UTMI */
-+
-+	void (*reset_notifier)(struct usb_hcd *hcd);
- 
- 	/* required for usb32 quirk */
- 	#define OHCI_CTRL_HCFS          (3 << 6)
---- a/include/linux/usb/ehci_pdriver.h
-+++ b/include/linux/usb/ehci_pdriver.h
-@@ -50,6 +50,8 @@ struct usb_ehci_pdata {
- 	unsigned	reset_on_resume:1;
- 	unsigned	dma_mask_64:1;
- 	unsigned	ignore_oc:1;
-+	unsigned	qca_force_host_mode:1;
-+	unsigned	qca_force_16bit_ptw:1;
- 
- 	/* Turn on all power and clocks */
- 	int (*power_on)(struct platform_device *pdev);
-@@ -59,6 +61,7 @@ struct usb_ehci_pdata {
- 	 * turn off everything else */
- 	void (*power_suspend)(struct platform_device *pdev);
- 	int (*pre_setup)(struct usb_hcd *hcd);
-+	void (*reset_notifier)(struct platform_device *pdev);
- };
- 
- #endif /* __USB_CORE_EHCI_PDRIVER_H */
---- a/drivers/usb/host/ehci-platform.c
-+++ b/drivers/usb/host/ehci-platform.c
-@@ -53,6 +53,14 @@ struct ehci_platform_priv {
- 
- static const char hcd_name[] = "ehci-platform";
- 
-+static void ehci_platform_reset_notifier(struct usb_hcd *hcd)
-+{
-+	struct platform_device *pdev = to_platform_device(hcd->self.controller);
-+	struct usb_ehci_pdata *pdata = pdev->dev.platform_data;
-+
-+	pdata->reset_notifier(pdev);
-+}
-+
- static int ehci_platform_reset(struct usb_hcd *hcd)
- {
- 	struct platform_device *pdev = to_platform_device(hcd->self.controller);
-@@ -270,6 +278,13 @@ static int ehci_platform_probe(struct pl
- 		priv->reset_on_resume = true;
- 	if (pdata->ignore_oc)
- 		ehci->ignore_oc = 1;
-+	if (pdata->qca_force_host_mode)
-+		ehci->qca_force_host_mode = 1;
-+	if (pdata->qca_force_16bit_ptw)
-+		ehci->qca_force_16bit_ptw = 1;
-+
-+	if (pdata->reset_notifier)
-+		ehci->reset_notifier = ehci_platform_reset_notifier;
- 
- #ifndef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
- 	if (ehci->big_endian_mmio) {
diff --git a/target/linux/ath79/patches-4.19/490-usb-ehci-add-quirks-for-qca-socs.patch b/target/linux/ath79/patches-4.19/490-usb-ehci-add-quirks-for-qca-socs.patch
deleted file mode 100644
index 4e2a6fecee73..000000000000
--- a/target/linux/ath79/patches-4.19/490-usb-ehci-add-quirks-for-qca-socs.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/drivers/usb/host/ehci-hcd.c
-+++ b/drivers/usb/host/ehci-hcd.c
-@@ -239,6 +239,37 @@ int ehci_reset(struct ehci_hcd *ehci)
- 	command |= CMD_RESET;
- 	dbg_cmd (ehci, "reset", command);
- 	ehci_writel(ehci, command, &ehci->regs->command);
-+
-+	if (ehci->qca_force_host_mode) {
-+		u32 usbmode;
-+
-+		udelay(1000);
-+
-+		usbmode = ehci_readl(ehci, &ehci->regs->usbmode);
-+		usbmode |= USBMODE_CM_HC | (1 << 4);
-+		ehci_writel(ehci, usbmode, &ehci->regs->usbmode);
-+
-+		ehci_dbg(ehci, "forced host mode, usbmode: %08x\n",
-+			 ehci_readl(ehci, &ehci->regs->usbmode));
-+	}
-+
-+	if (ehci->qca_force_16bit_ptw) {
-+		u32 port_status;
-+
-+		udelay(1000);
-+
-+		/* enable 16-bit UTMI interface */
-+		port_status = ehci_readl(ehci, &ehci->regs->port_status[0]);
-+		port_status |= BIT(28);
-+		ehci_writel(ehci, port_status, &ehci->regs->port_status[0]);
-+
-+		ehci_dbg(ehci, "16-bit UTMI interface enabled, status: %08x\n",
-+			 ehci_readl(ehci, &ehci->regs->port_status[0]));
-+	}
-+
-+	if (ehci->reset_notifier)
-+		ehci->reset_notifier(ehci_to_hcd(ehci));
-+
- 	ehci->rh_state = EHCI_RH_HALTED;
- 	ehci->next_statechange = jiffies;
- 	retval = ehci_handshake(ehci, &ehci->regs->command,
---- a/drivers/usb/host/ehci.h
-+++ b/drivers/usb/host/ehci.h
-@@ -219,6 +219,10 @@ struct ehci_hcd {			/* one per controlle
- 	unsigned		need_oc_pp_cycle:1; /* MPC834X port power */
- 	unsigned		imx28_write_fix:1; /* For Freescale i.MX28 */
- 	unsigned		ignore_oc:1;
-+	unsigned		qca_force_host_mode:1;
-+	unsigned		qca_force_16bit_ptw:1; /* force 16 bit UTMI */
-+
-+	void (*reset_notifier)(struct usb_hcd *hcd);
- 
- 	/* required for usb32 quirk */
- 	#define OHCI_CTRL_HCFS          (3 << 6)
---- a/include/linux/usb/ehci_pdriver.h
-+++ b/include/linux/usb/ehci_pdriver.h
-@@ -51,6 +51,8 @@ struct usb_ehci_pdata {
- 	unsigned	reset_on_resume:1;
- 	unsigned	dma_mask_64:1;
- 	unsigned	ignore_oc:1;
-+	unsigned	qca_force_host_mode:1;
-+	unsigned	qca_force_16bit_ptw:1;
- 
- 	/* Turn on all power and clocks */
- 	int (*power_on)(struct platform_device *pdev);
-@@ -60,6 +62,7 @@ struct usb_ehci_pdata {
- 	 * turn off everything else */
- 	void (*power_suspend)(struct platform_device *pdev);
- 	int (*pre_setup)(struct usb_hcd *hcd);
-+	void (*reset_notifier)(struct platform_device *pdev);
- };
- 
- #endif /* __USB_CORE_EHCI_PDRIVER_H */
---- a/drivers/usb/host/ehci-platform.c
-+++ b/drivers/usb/host/ehci-platform.c
-@@ -48,6 +48,14 @@ struct ehci_platform_priv {
- 
- static const char hcd_name[] = "ehci-platform";
- 
-+static void ehci_platform_reset_notifier(struct usb_hcd *hcd)
-+{
-+	struct platform_device *pdev = to_platform_device(hcd->self.controller);
-+	struct usb_ehci_pdata *pdata = pdev->dev.platform_data;
-+
-+	pdata->reset_notifier(pdev);
-+}
-+
- static int ehci_platform_reset(struct usb_hcd *hcd)
- {
- 	struct platform_device *pdev = to_platform_device(hcd->self.controller);
-@@ -215,6 +223,13 @@ static int ehci_platform_probe(struct pl
- 		priv->reset_on_resume = true;
- 	if (pdata->ignore_oc)
- 		ehci->ignore_oc = 1;
-+	if (pdata->qca_force_host_mode)
-+		ehci->qca_force_host_mode = 1;
-+	if (pdata->qca_force_16bit_ptw)
-+		ehci->qca_force_16bit_ptw = 1;
-+
-+	if (pdata->reset_notifier)
-+		ehci->reset_notifier = ehci_platform_reset_notifier;
- 
- #ifndef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
- 	if (ehci->big_endian_mmio) {
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Mon Dec 30 17:56:31 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Mon, 30 Dec 2019 23:56:31 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <357266D6-1E26-4066-AFE5-746C2407B0DF@me.com>
References: <mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org>
 <20191229222123.GH70184@meh.true.cz>
 <20191230190746.GI70184@meh.true.cz>
 <357266D6-1E26-4066-AFE5-746C2407B0DF@me.com>
Message-ID: <20191230225631.GJ70184@meh.true.cz>

Petr Nov?k <petrn at me.com> [2019-12-30 20:43:36]:

Hi,

> I will do my best to reproduce the issue giving more details, I will post
> any more details here tomorrow.

if I may, can you do following for the start:

1. add following change (changing it directly on device right before step 2.
   should be enough):

 diff --git a/package/base-files/files/usr/libexec/validate_firmware_image
 b/package/base-files/files/usr/libexec/validate_firmware_image
 index f85fb9e4b435..aed9cdfd64b5 100755
 --- a/package/base-files/files/usr/libexec/validate_firmware_image
 +++ b/package/base-files/files/usr/libexec/validate_firmware_image
 @@ -62,5 +62,6 @@ json_init
         json_add_boolean valid "$VALID"
         json_add_boolean forceable "$FORCEABLE"
         json_add_boolean allow_backup "$ALLOW_BACKUP"
 +json_dump -i >&2
  json_dump -i
  json_set_namespace $old_ns

2. run:

 $ ubus monitor &
 $ sysupgrade -v openwrt-brcm2708-bcm2711-rpi-4-squashfs-sysupgrade.img.gz

and send the output, thanks!

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From freifunk at adrianschmutzler.de  Mon Dec 30 18:27:43 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 31 Dec 2019 00:27:43 +0100
Subject: [OpenWrt-Devel] [PATCH 0/4] brcm63xx: soc_vendor_model scheme and
 board_name removal
Message-ID: <20191230232747.5357-1-freifunk@adrianschmutzler.de>

** Please test on device **

This changes brcm63xx target to achieve consistency between image
names, device nodes names, compatible, DTS name and device name
as much as possible. As with other targets, having consistent
names is supposed to make life easier for developers and reduces
the number of "variables" in the system. In particular, applying
the DTS scheme will make it easier to find the correct file and
architecture.

Despite, I took the chance to also remove the "old" board_name
variable and replace it by directly using the compatible. This
also resulted in fixing several wrong identifiers in base-files.

As with other similar projects, I cannot test this on device and
would be glad if someone could do that.

Adrian Schmutzler (4):
  brcm63xx: use soc_vendor_model scheme for image and DTS files
  brcm63xx: remove unneeded line break for DEVICE_PACKAGES
  brcm63xx: use compatible instead of manually setting board name
  brcm63xx: align DTS model with Makefile and compatible

 .../brcm63xx/base-files/etc/board.d/01_leds   |  90 +--
 .../base-files/etc/board.d/02_network         | 206 +++--
 target/linux/brcm63xx/base-files/etc/diag.sh  | 174 ++---
 .../etc/hotplug.d/firmware/10-rt2x00-eeprom   |   6 +-
 .../base-files/etc/uci-defaults/09_fix_crc    |  54 +-
 .../linux/brcm63xx/base-files/lib/brcm63xx.sh | 310 --------
 .../base-files/lib/preinit/01_do_brcm63xx.sh  |   9 -
 ...vg834g.dts => bcm3368_netgear_cvg834g.dts} |   0
 ....dts => bcm6318_brcm_bcm96318ref-p300.dts} |   2 +-
 ...18ref.dts => bcm6318_brcm_bcm96318ref.dts} |   0
 ...315u.dts => bcm6318_comtrend_ar-5315u.dts} |   0
 ...-d.dts => bcm6318_d-link_dsl-275xb-d1.dts} |   2 +-
 ...2704n.dts => bcm6318_sagem_fast-2704n.dts} |   4 +-
 ...dts => bcm63268_brcm_bcm963268bu-p300.dts} |   2 +-
 ...bhr.dts => bcm63268_brcm_bcm963269bhr.dts} |   0
 .../{vg50.dts => bcm63268_inteno_vg50.dts}    |   0
 .../dts/{sr102.dts => bcm63268_sky_sr102.dts} |   0
 .../{a4001n.dts => bcm6328_adb_a4001n.dts}    |   0
 .../{a4001n1.dts => bcm6328_adb_a4001n1.dts}  |   0
 ...1TAN.dts => bcm6328_brcm_bcm963281tan.dts} |   2 +-
 ...avng.dts => bcm6328_brcm_bcm96328avng.dts} |   0
 ...381u.dts => bcm6328_comtrend_ar-5381u.dts} |   0
 ...7un.dts => bcm6328_comtrend_ar-5387un.dts} |   0
 ...-f.dts => bcm6328_d-link_dsl-274xb-f1.dts} |   2 +-
 ...0unv2.dts => bcm6328_nucom_r5010un-v2.dts} |   2 +-
 ...4v2.dts => bcm6328_sagem_fast-2704-v2.dts} |   4 +-
 ...nor.dts => bcm6328_sercomm_ad1018-nor.dts} |   0
 ...6338GW.dts => bcm6338_brcm_bcm96338gw.dts} |   0
 ...m96338W.dts => bcm6338_brcm_bcm96338w.dts} |   0
 ...2640u.dts => bcm6338_d-link_dsl-2640u.dts} |   0
 ...a1320.dts => bcm6338_dynalink_rta1320.dts} |   0
 ...45GW2.dts => bcm6345_brcm_bcm96345gw2.dts} |   0
 ...70bw.dts => bcm6345_dynalink_rta770bw.dts} |   0
 ...a770w.dts => bcm6345_dynalink_rta770w.dts} |   0
 ...ar1004g.dts => bcm6348_asmax_ar-1004g.dts} |   2 +-
 ...f5d7633.dts => bcm6348_belkin_f5d7633.dts} |   0
 ...-10.dts => bcm6348_brcm_bcm96348gw-10.dts} |   0
 ...-11.dts => bcm6348_brcm_bcm96348gw-11.dts} |   0
 ...6348GW.dts => bcm6348_brcm_bcm96348gw.dts} |   0
 ...m96348R.dts => bcm6348_brcm_bcm96348r.dts} |   0
 ...{v2110.dts => bcm6348_bt_voyager-2110.dts} |   2 +-
 ...bb.dts => bcm6348_bt_voyager-2500v-bb.dts} |   4 +-
 ...-5365.dts => bcm6348_comtrend_ct-5365.dts} |   0
 ...us.dts => bcm6348_comtrend_ct-536plus.dts} |   2 +-
 ...b-b.dts => bcm6348_d-link_dsl-2640b-b.dts} |   0
 ...amr.dts => bcm6348_davolink_dv-201amr.dts} |   0
 ...025w.dts => bcm6348_dynalink_rta1025w.dts} |   0
 ...-5g.dts => bcm6348_inventel_livebox-1.dts} |   2 +-
 ...g_v4.dts => bcm6348_netgear_dg834g-v4.dts} |   0
 ...tpn.dts => bcm6348_netgear_dg834gt-pn.dts} |   2 +-
 ...st2404.dts => bcm6348_sagem_fast-2404.dts} |   4 +-
 ...st2604.dts => bcm6348_sagem_fast-2604.dts} |   4 +-
 ...dts => bcm6348_t-com_speedport-w-500v.dts} |   4 +-
 .../{gw6000.dts => bcm6348_tecom_gw6000.dts}  |   0
 .../{gw6200.dts => bcm6348_tecom_gw6200.dts}  |   0
 ...lus.dts => bcm6348_telsey_cpva502plus.dts} |   2 +-
 .../{magic.dts => bcm6348_telsey_magic.dts}   |   0
 ...0gb.dts => bcm6348_tp-link_td-w8900gb.dts} |   0
 ...108.dts => bcm6348_usrobotics_usr9108.dts} |   4 +-
 ...{rg100a.dts => bcm6358_alcatel_rg100a.dts} |   0
 ...6358VW.dts => bcm6358_brcm_bcm96358vw.dts} |   0
 ...58VW2.dts => bcm6358_brcm_bcm96358vw2.dts} |   0
 ...ehub2a.dts => bcm6358_bt_home-hub-2-a.dts} |   2 +-
 ...-6373.dts => bcm6358_comtrend_ct-6373.dts} |   0
 ...2650u.dts => bcm6358_d-link_dsl-2650u.dts} |   0
 ...-c.dts => bcm6358_d-link_dsl-274xb-c2.dts} |   0
 ....dts => bcm6358_d-link_dva-g3810bn-tl.dts} |   2 +-
 ...dts => bcm6358_huawei_echolife-hg520v.dts} |   2 +-
 ....dts => bcm6358_huawei_echolife-hg553.dts} |   2 +-
 ...s => bcm6358_huawei_echolife-hg556a-a.dts} |   2 +-
 ...s => bcm6358_huawei_echolife-hg556a-b.dts} |   2 +-
 ...s => bcm6358_huawei_echolife-hg556a-c.dts} |   2 +-
 .../{a226g.dts => bcm6358_pirelli_a226g.dts}  |   0
 ...-fwb.dts => bcm6358_pirelli_a226m-fwb.dts} |   0
 .../{a226m.dts => bcm6358_pirelli_a226m.dts}  |   0
 ...gpf-s0.dts => bcm6358_pirelli_agpf-s0.dts} |   0
 ...s => bcm6358_sfr_neufbox-4-foxconn-r1.dts} |   4 +-
 ...s => bcm6358_sfr_neufbox-4-sercomm-r0.dts} |   4 +-
 ...dts => bcm6358_t-com_speedport-w-303v.dts} |   4 +-
 ...cpva642.dts => bcm6358_telsey_cpva642.dts} |   0
 ...2504n.dts => bcm6362_sagem_fast-2504n.dts} |   4 +-
 ...s => bcm6362_sfr_neufbox-6-sercomm-r0.dts} |   4 +-
 ...1000h.dts => bcm6368_actiontec_r1000h.dts} |   0
 .../{av4202n.dts => bcm6368_adb_av4202n.dts}  |   0
 ...Ngr.dts => bcm6368_brcm_bcm96368mvngr.dts} |   0
 ...MVWG.dts => bcm6368_brcm_bcm96368mvwg.dts} |   0
 ...025u.dts => bcm6368_comtrend_vr-3025u.dts} |   0
 ...5un.dts => bcm6368_comtrend_vr-3025un.dts} |   0
 ...026e.dts => bcm6368_comtrend_vr-3026e.dts} |   0
 ...13n.dts => bcm6368_comtrend_wap-5813n.dts} |   0
 ....dts => bcm6368_huawei_echolife-hg622.dts} |   4 +-
 ...dts => bcm6368_huawei_echolife-hg655b.dts} |   4 +-
 ...v1.dts => bcm6368_netgear_dgnd3700-v1.dts} |   2 +-
 ...vg2000.dts => bcm6368_netgear_evg2000.dts} |   0
 ...h4032n.dts => bcm6368_observa_vh4032n.dts} |   0
 ...v2.dts => bcm6368_zyxel_p870hw-51a-v2.dts} |   0
 target/linux/brcm63xx/image/Makefile          |   2 +
 target/linux/brcm63xx/image/bcm63xx.mk        | 706 +++++++-----------
 98 files changed, 579 insertions(+), 1074 deletions(-)
 delete mode 100755 target/linux/brcm63xx/base-files/lib/brcm63xx.sh
 delete mode 100644 target/linux/brcm63xx/base-files/lib/preinit/01_do_brcm63xx.sh
 rename target/linux/brcm63xx/dts/{cvg834g.dts => bcm3368_netgear_cvg834g.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96318ref_p300.dts => bcm6318_brcm_bcm96318ref-p300.dts} (96%)
 rename target/linux/brcm63xx/dts/{bcm96318ref.dts => bcm6318_brcm_bcm96318ref.dts} (100%)
 rename target/linux/brcm63xx/dts/{ar-5315u.dts => bcm6318_comtrend_ar-5315u.dts} (100%)
 rename target/linux/brcm63xx/dts/{dsl-275xb-d.dts => bcm6318_d-link_dsl-275xb-d1.dts} (97%)
 rename target/linux/brcm63xx/dts/{fast2704n.dts => bcm6318_sagem_fast-2704n.dts} (96%)
 rename target/linux/brcm63xx/dts/{bcm963268bu_p300.dts => bcm63268_brcm_bcm963268bu-p300.dts} (94%)
 rename target/linux/brcm63xx/dts/{bcm963269bhr.dts => bcm63268_brcm_bcm963269bhr.dts} (100%)
 rename target/linux/brcm63xx/dts/{vg50.dts => bcm63268_inteno_vg50.dts} (100%)
 rename target/linux/brcm63xx/dts/{sr102.dts => bcm63268_sky_sr102.dts} (100%)
 rename target/linux/brcm63xx/dts/{a4001n.dts => bcm6328_adb_a4001n.dts} (100%)
 rename target/linux/brcm63xx/dts/{a4001n1.dts => bcm6328_adb_a4001n1.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm963281TAN.dts => bcm6328_brcm_bcm963281tan.dts} (95%)
 rename target/linux/brcm63xx/dts/{bcm96328avng.dts => bcm6328_brcm_bcm96328avng.dts} (100%)
 rename target/linux/brcm63xx/dts/{ar-5381u.dts => bcm6328_comtrend_ar-5381u.dts} (100%)
 rename target/linux/brcm63xx/dts/{ar-5387un.dts => bcm6328_comtrend_ar-5387un.dts} (100%)
 rename target/linux/brcm63xx/dts/{dsl-274xb-f.dts => bcm6328_d-link_dsl-274xb-f1.dts} (97%)
 rename target/linux/brcm63xx/dts/{r5010unv2.dts => bcm6328_nucom_r5010un-v2.dts} (97%)
 rename target/linux/brcm63xx/dts/{fast2704v2.dts => bcm6328_sagem_fast-2704-v2.dts} (95%)
 rename target/linux/brcm63xx/dts/{ad1018-nor.dts => bcm6328_sercomm_ad1018-nor.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96338GW.dts => bcm6338_brcm_bcm96338gw.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96338W.dts => bcm6338_brcm_bcm96338w.dts} (100%)
 rename target/linux/brcm63xx/dts/{dsl-2640u.dts => bcm6338_d-link_dsl-2640u.dts} (100%)
 rename target/linux/brcm63xx/dts/{rta1320.dts => bcm6338_dynalink_rta1320.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96345GW2.dts => bcm6345_brcm_bcm96345gw2.dts} (100%)
 rename target/linux/brcm63xx/dts/{rta770bw.dts => bcm6345_dynalink_rta770bw.dts} (100%)
 rename target/linux/brcm63xx/dts/{rta770w.dts => bcm6345_dynalink_rta770w.dts} (100%)
 rename target/linux/brcm63xx/dts/{ar1004g.dts => bcm6348_asmax_ar-1004g.dts} (96%)
 rename target/linux/brcm63xx/dts/{f5d7633.dts => bcm6348_belkin_f5d7633.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96348GW-10.dts => bcm6348_brcm_bcm96348gw-10.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96348GW-11.dts => bcm6348_brcm_bcm96348gw-11.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96348GW.dts => bcm6348_brcm_bcm96348gw.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96348R.dts => bcm6348_brcm_bcm96348r.dts} (100%)
 rename target/linux/brcm63xx/dts/{v2110.dts => bcm6348_bt_voyager-2110.dts} (96%)
 rename target/linux/brcm63xx/dts/{v2500v-bb.dts => bcm6348_bt_voyager-2500v-bb.dts} (94%)
 rename target/linux/brcm63xx/dts/{ct-5365.dts => bcm6348_comtrend_ct-5365.dts} (100%)
 rename target/linux/brcm63xx/dts/{ct536plus.dts => bcm6348_comtrend_ct-536plus.dts} (95%)
 rename target/linux/brcm63xx/dts/{dsl-2640b-b.dts => bcm6348_d-link_dsl-2640b-b.dts} (100%)
 rename target/linux/brcm63xx/dts/{dv-201amr.dts => bcm6348_davolink_dv-201amr.dts} (100%)
 rename target/linux/brcm63xx/dts/{rta1025w.dts => bcm6348_dynalink_rta1025w.dts} (100%)
 rename target/linux/brcm63xx/dts/{livebox-blue-5g.dts => bcm6348_inventel_livebox-1.dts} (95%)
 rename target/linux/brcm63xx/dts/{dg834g_v4.dts => bcm6348_netgear_dg834g-v4.dts} (100%)
 rename target/linux/brcm63xx/dts/{dg834gtpn.dts => bcm6348_netgear_dg834gt-pn.dts} (96%)
 rename target/linux/brcm63xx/dts/{fast2404.dts => bcm6348_sagem_fast-2404.dts} (90%)
 rename target/linux/brcm63xx/dts/{fast2604.dts => bcm6348_sagem_fast-2604.dts} (94%)
 rename target/linux/brcm63xx/dts/{spw500v.dts => bcm6348_t-com_speedport-w-500v.dts} (93%)
 rename target/linux/brcm63xx/dts/{gw6000.dts => bcm6348_tecom_gw6000.dts} (100%)
 rename target/linux/brcm63xx/dts/{gw6200.dts => bcm6348_tecom_gw6200.dts} (100%)
 rename target/linux/brcm63xx/dts/{cpva502plus.dts => bcm6348_telsey_cpva502plus.dts} (95%)
 rename target/linux/brcm63xx/dts/{magic.dts => bcm6348_telsey_magic.dts} (100%)
 rename target/linux/brcm63xx/dts/{td-w8900gb.dts => bcm6348_tp-link_td-w8900gb.dts} (100%)
 rename target/linux/brcm63xx/dts/{usr9108.dts => bcm6348_usrobotics_usr9108.dts} (91%)
 rename target/linux/brcm63xx/dts/{rg100a.dts => bcm6358_alcatel_rg100a.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96358VW.dts => bcm6358_brcm_bcm96358vw.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96358VW2.dts => bcm6358_brcm_bcm96358vw2.dts} (100%)
 rename target/linux/brcm63xx/dts/{homehub2a.dts => bcm6358_bt_home-hub-2-a.dts} (97%)
 rename target/linux/brcm63xx/dts/{ct-6373.dts => bcm6358_comtrend_ct-6373.dts} (100%)
 rename target/linux/brcm63xx/dts/{dsl-2650u.dts => bcm6358_d-link_dsl-2650u.dts} (100%)
 rename target/linux/brcm63xx/dts/{dsl-274xb-c.dts => bcm6358_d-link_dsl-274xb-c2.dts} (100%)
 rename target/linux/brcm63xx/dts/{dva-g3810bn_tl.dts => bcm6358_d-link_dva-g3810bn-tl.dts} (96%)
 rename target/linux/brcm63xx/dts/{hg520v.dts => bcm6358_huawei_echolife-hg520v.dts} (94%)
 rename target/linux/brcm63xx/dts/{hg553.dts => bcm6358_huawei_echolife-hg553.dts} (96%)
 rename target/linux/brcm63xx/dts/{hg556a-a.dts => bcm6358_huawei_echolife-hg556a-a.dts} (97%)
 rename target/linux/brcm63xx/dts/{hg556a-b.dts => bcm6358_huawei_echolife-hg556a-b.dts} (97%)
 rename target/linux/brcm63xx/dts/{hg556a-c.dts => bcm6358_huawei_echolife-hg556a-c.dts} (97%)
 rename target/linux/brcm63xx/dts/{a226g.dts => bcm6358_pirelli_a226g.dts} (100%)
 rename target/linux/brcm63xx/dts/{a226m-fwb.dts => bcm6358_pirelli_a226m-fwb.dts} (100%)
 rename target/linux/brcm63xx/dts/{a226m.dts => bcm6358_pirelli_a226m.dts} (100%)
 rename target/linux/brcm63xx/dts/{agpf-s0.dts => bcm6358_pirelli_agpf-s0.dts} (100%)
 rename target/linux/brcm63xx/dts/{nb4-fxc-r1.dts => bcm6358_sfr_neufbox-4-foxconn-r1.dts} (95%)
 rename target/linux/brcm63xx/dts/{nb4-ser-r0.dts => bcm6358_sfr_neufbox-4-sercomm-r0.dts} (95%)
 rename target/linux/brcm63xx/dts/{spw303v.dts => bcm6358_t-com_speedport-w-303v.dts} (94%)
 rename target/linux/brcm63xx/dts/{cpva642.dts => bcm6358_telsey_cpva642.dts} (100%)
 rename target/linux/brcm63xx/dts/{fast2504n.dts => bcm6362_sagem_fast-2504n.dts} (95%)
 rename target/linux/brcm63xx/dts/{nb6-ser-r0.dts => bcm6362_sfr_neufbox-6-sercomm-r0.dts} (94%)
 rename target/linux/brcm63xx/dts/{r1000h.dts => bcm6368_actiontec_r1000h.dts} (100%)
 rename target/linux/brcm63xx/dts/{av4202n.dts => bcm6368_adb_av4202n.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96368MVNgr.dts => bcm6368_brcm_bcm96368mvngr.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96368MVWG.dts => bcm6368_brcm_bcm96368mvwg.dts} (100%)
 rename target/linux/brcm63xx/dts/{vr-3025u.dts => bcm6368_comtrend_vr-3025u.dts} (100%)
 rename target/linux/brcm63xx/dts/{vr-3025un.dts => bcm6368_comtrend_vr-3025un.dts} (100%)
 rename target/linux/brcm63xx/dts/{vr-3026e.dts => bcm6368_comtrend_vr-3026e.dts} (100%)
 rename target/linux/brcm63xx/dts/{wap-5813n.dts => bcm6368_comtrend_wap-5813n.dts} (100%)
 rename target/linux/brcm63xx/dts/{hg622.dts => bcm6368_huawei_echolife-hg622.dts} (94%)
 rename target/linux/brcm63xx/dts/{hg655b.dts => bcm6368_huawei_echolife-hg655b.dts} (95%)
 rename target/linux/brcm63xx/dts/{dgnd3700v1.dts => bcm6368_netgear_dgnd3700-v1.dts} (98%)
 rename target/linux/brcm63xx/dts/{evg2000.dts => bcm6368_netgear_evg2000.dts} (100%)
 rename target/linux/brcm63xx/dts/{vh4032n.dts => bcm6368_observa_vh4032n.dts} (100%)
 rename target/linux/brcm63xx/dts/{p870hw-51a-v2.dts => bcm6368_zyxel_p870hw-51a-v2.dts} (100%)

-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Mon Dec 30 18:27:44 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 31 Dec 2019 00:27:44 +0100
Subject: [OpenWrt-Devel] [PATCH 1/4] brcm63xx: use soc_vendor_model scheme
 for image and DTS files
In-Reply-To: <20191230232747.5357-1-freifunk@adrianschmutzler.de>
References: <20191230232747.5357-1-freifunk@adrianschmutzler.de>
Message-ID: <20191230232747.5357-2-freifunk@adrianschmutzler.de>

This changes brcm63xx target to achieve consistency between image
names, device nodes names, compatible, DTS name and device name
as much as possible. As with other targets, having consistent
names is supposed to make life easier for developers and reduces
the number of "variables" in the system. In particular, applying
the DTS scheme will make it easier to find the correct file and
architecture.

DTS files are named based on the increasingly common
soc_vendor_model scheme. Since the compatible is not used at the
moment, I took the chance to also align them with this patch.

For the SOC, the already existing CFE_CHIP_ID can be exploiting
for all but two devices.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 ...vg834g.dts => bcm3368_netgear_cvg834g.dts} |   0
 ....dts => bcm6318_brcm_bcm96318ref-p300.dts} |   2 +-
 ...18ref.dts => bcm6318_brcm_bcm96318ref.dts} |   0
 ...315u.dts => bcm6318_comtrend_ar-5315u.dts} |   0
 ...-d.dts => bcm6318_d-link_dsl-275xb-d1.dts} |   2 +-
 ...2704n.dts => bcm6318_sagem_fast-2704n.dts} |   2 +-
 ...dts => bcm63268_brcm_bcm963268bu-p300.dts} |   2 +-
 ...bhr.dts => bcm63268_brcm_bcm963269bhr.dts} |   0
 .../{vg50.dts => bcm63268_inteno_vg50.dts}    |   0
 .../dts/{sr102.dts => bcm63268_sky_sr102.dts} |   0
 .../{a4001n.dts => bcm6328_adb_a4001n.dts}    |   0
 .../{a4001n1.dts => bcm6328_adb_a4001n1.dts}  |   0
 ...1TAN.dts => bcm6328_brcm_bcm963281tan.dts} |   2 +-
 ...avng.dts => bcm6328_brcm_bcm96328avng.dts} |   0
 ...381u.dts => bcm6328_comtrend_ar-5381u.dts} |   0
 ...7un.dts => bcm6328_comtrend_ar-5387un.dts} |   0
 ...-f.dts => bcm6328_d-link_dsl-274xb-f1.dts} |   2 +-
 ...0unv2.dts => bcm6328_nucom_r5010un-v2.dts} |   2 +-
 ...4v2.dts => bcm6328_sagem_fast-2704-v2.dts} |   2 +-
 ...nor.dts => bcm6328_sercomm_ad1018-nor.dts} |   0
 ...6338GW.dts => bcm6338_brcm_bcm96338gw.dts} |   0
 ...m96338W.dts => bcm6338_brcm_bcm96338w.dts} |   0
 ...2640u.dts => bcm6338_d-link_dsl-2640u.dts} |   0
 ...a1320.dts => bcm6338_dynalink_rta1320.dts} |   0
 ...45GW2.dts => bcm6345_brcm_bcm96345gw2.dts} |   0
 ...70bw.dts => bcm6345_dynalink_rta770bw.dts} |   0
 ...a770w.dts => bcm6345_dynalink_rta770w.dts} |   0
 ...ar1004g.dts => bcm6348_asmax_ar-1004g.dts} |   2 +-
 ...f5d7633.dts => bcm6348_belkin_f5d7633.dts} |   0
 ...-10.dts => bcm6348_brcm_bcm96348gw-10.dts} |   0
 ...-11.dts => bcm6348_brcm_bcm96348gw-11.dts} |   0
 ...6348GW.dts => bcm6348_brcm_bcm96348gw.dts} |   0
 ...m96348R.dts => bcm6348_brcm_bcm96348r.dts} |   0
 ...{v2110.dts => bcm6348_bt_voyager-2110.dts} |   2 +-
 ...bb.dts => bcm6348_bt_voyager-2500v-bb.dts} |   2 +-
 ...-5365.dts => bcm6348_comtrend_ct-5365.dts} |   0
 ...us.dts => bcm6348_comtrend_ct-536plus.dts} |   2 +-
 ...b-b.dts => bcm6348_d-link_dsl-2640b-b.dts} |   0
 ...amr.dts => bcm6348_davolink_dv-201amr.dts} |   0
 ...025w.dts => bcm6348_dynalink_rta1025w.dts} |   0
 ...-5g.dts => bcm6348_inventel_livebox-1.dts} |   2 +-
 ...g_v4.dts => bcm6348_netgear_dg834g-v4.dts} |   0
 ...tpn.dts => bcm6348_netgear_dg834gt-pn.dts} |   2 +-
 ...st2404.dts => bcm6348_sagem_fast-2404.dts} |   2 +-
 ...st2604.dts => bcm6348_sagem_fast-2604.dts} |   2 +-
 ...dts => bcm6348_t-com_speedport-w-500v.dts} |   2 +-
 .../{gw6000.dts => bcm6348_tecom_gw6000.dts}  |   0
 .../{gw6200.dts => bcm6348_tecom_gw6200.dts}  |   0
 ...lus.dts => bcm6348_telsey_cpva502plus.dts} |   2 +-
 .../{magic.dts => bcm6348_telsey_magic.dts}   |   0
 ...0gb.dts => bcm6348_tp-link_td-w8900gb.dts} |   0
 ...108.dts => bcm6348_usrobotics_usr9108.dts} |   2 +-
 ...{rg100a.dts => bcm6358_alcatel_rg100a.dts} |   0
 ...6358VW.dts => bcm6358_brcm_bcm96358vw.dts} |   0
 ...58VW2.dts => bcm6358_brcm_bcm96358vw2.dts} |   0
 ...ehub2a.dts => bcm6358_bt_home-hub-2-a.dts} |   2 +-
 ...-6373.dts => bcm6358_comtrend_ct-6373.dts} |   0
 ...2650u.dts => bcm6358_d-link_dsl-2650u.dts} |   0
 ...-c.dts => bcm6358_d-link_dsl-274xb-c2.dts} |   0
 ....dts => bcm6358_d-link_dva-g3810bn-tl.dts} |   2 +-
 ...dts => bcm6358_huawei_echolife-hg520v.dts} |   2 +-
 ....dts => bcm6358_huawei_echolife-hg553.dts} |   2 +-
 ...s => bcm6358_huawei_echolife-hg556a-a.dts} |   2 +-
 ...s => bcm6358_huawei_echolife-hg556a-b.dts} |   2 +-
 ...s => bcm6358_huawei_echolife-hg556a-c.dts} |   2 +-
 .../{a226g.dts => bcm6358_pirelli_a226g.dts}  |   0
 ...-fwb.dts => bcm6358_pirelli_a226m-fwb.dts} |   0
 .../{a226m.dts => bcm6358_pirelli_a226m.dts}  |   0
 ...gpf-s0.dts => bcm6358_pirelli_agpf-s0.dts} |   0
 ...s => bcm6358_sfr_neufbox-4-foxconn-r1.dts} |   2 +-
 ...s => bcm6358_sfr_neufbox-4-sercomm-r0.dts} |   2 +-
 ...dts => bcm6358_t-com_speedport-w-303v.dts} |   2 +-
 ...cpva642.dts => bcm6358_telsey_cpva642.dts} |   0
 ...2504n.dts => bcm6362_sagem_fast-2504n.dts} |   2 +-
 ...s => bcm6362_sfr_neufbox-6-sercomm-r0.dts} |   2 +-
 ...1000h.dts => bcm6368_actiontec_r1000h.dts} |   0
 .../{av4202n.dts => bcm6368_adb_av4202n.dts}  |   0
 ...Ngr.dts => bcm6368_brcm_bcm96368mvngr.dts} |   0
 ...MVWG.dts => bcm6368_brcm_bcm96368mvwg.dts} |   0
 ...025u.dts => bcm6368_comtrend_vr-3025u.dts} |   0
 ...5un.dts => bcm6368_comtrend_vr-3025un.dts} |   0
 ...026e.dts => bcm6368_comtrend_vr-3026e.dts} |   0
 ...13n.dts => bcm6368_comtrend_wap-5813n.dts} |   0
 ....dts => bcm6368_huawei_echolife-hg622.dts} |   2 +-
 ...dts => bcm6368_huawei_echolife-hg655b.dts} |   2 +-
 ...v1.dts => bcm6368_netgear_dgnd3700-v1.dts} |   2 +-
 ...vg2000.dts => bcm6368_netgear_evg2000.dts} |   0
 ...h4032n.dts => bcm6368_observa_vh4032n.dts} |   0
 ...v2.dts => bcm6368_zyxel_p870hw-51a-v2.dts} |   0
 target/linux/brcm63xx/image/Makefile          |   2 +
 target/linux/brcm63xx/image/bcm63xx.mk        | 466 +++++++-----------
 91 files changed, 226 insertions(+), 310 deletions(-)
 rename target/linux/brcm63xx/dts/{cvg834g.dts => bcm3368_netgear_cvg834g.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96318ref_p300.dts => bcm6318_brcm_bcm96318ref-p300.dts} (96%)
 rename target/linux/brcm63xx/dts/{bcm96318ref.dts => bcm6318_brcm_bcm96318ref.dts} (100%)
 rename target/linux/brcm63xx/dts/{ar-5315u.dts => bcm6318_comtrend_ar-5315u.dts} (100%)
 rename target/linux/brcm63xx/dts/{dsl-275xb-d.dts => bcm6318_d-link_dsl-275xb-d1.dts} (97%)
 rename target/linux/brcm63xx/dts/{fast2704n.dts => bcm6318_sagem_fast-2704n.dts} (97%)
 rename target/linux/brcm63xx/dts/{bcm963268bu_p300.dts => bcm63268_brcm_bcm963268bu-p300.dts} (94%)
 rename target/linux/brcm63xx/dts/{bcm963269bhr.dts => bcm63268_brcm_bcm963269bhr.dts} (100%)
 rename target/linux/brcm63xx/dts/{vg50.dts => bcm63268_inteno_vg50.dts} (100%)
 rename target/linux/brcm63xx/dts/{sr102.dts => bcm63268_sky_sr102.dts} (100%)
 rename target/linux/brcm63xx/dts/{a4001n.dts => bcm6328_adb_a4001n.dts} (100%)
 rename target/linux/brcm63xx/dts/{a4001n1.dts => bcm6328_adb_a4001n1.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm963281TAN.dts => bcm6328_brcm_bcm963281tan.dts} (95%)
 rename target/linux/brcm63xx/dts/{bcm96328avng.dts => bcm6328_brcm_bcm96328avng.dts} (100%)
 rename target/linux/brcm63xx/dts/{ar-5381u.dts => bcm6328_comtrend_ar-5381u.dts} (100%)
 rename target/linux/brcm63xx/dts/{ar-5387un.dts => bcm6328_comtrend_ar-5387un.dts} (100%)
 rename target/linux/brcm63xx/dts/{dsl-274xb-f.dts => bcm6328_d-link_dsl-274xb-f1.dts} (97%)
 rename target/linux/brcm63xx/dts/{r5010unv2.dts => bcm6328_nucom_r5010un-v2.dts} (97%)
 rename target/linux/brcm63xx/dts/{fast2704v2.dts => bcm6328_sagem_fast-2704-v2.dts} (97%)
 rename target/linux/brcm63xx/dts/{ad1018-nor.dts => bcm6328_sercomm_ad1018-nor.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96338GW.dts => bcm6338_brcm_bcm96338gw.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96338W.dts => bcm6338_brcm_bcm96338w.dts} (100%)
 rename target/linux/brcm63xx/dts/{dsl-2640u.dts => bcm6338_d-link_dsl-2640u.dts} (100%)
 rename target/linux/brcm63xx/dts/{rta1320.dts => bcm6338_dynalink_rta1320.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96345GW2.dts => bcm6345_brcm_bcm96345gw2.dts} (100%)
 rename target/linux/brcm63xx/dts/{rta770bw.dts => bcm6345_dynalink_rta770bw.dts} (100%)
 rename target/linux/brcm63xx/dts/{rta770w.dts => bcm6345_dynalink_rta770w.dts} (100%)
 rename target/linux/brcm63xx/dts/{ar1004g.dts => bcm6348_asmax_ar-1004g.dts} (96%)
 rename target/linux/brcm63xx/dts/{f5d7633.dts => bcm6348_belkin_f5d7633.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96348GW-10.dts => bcm6348_brcm_bcm96348gw-10.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96348GW-11.dts => bcm6348_brcm_bcm96348gw-11.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96348GW.dts => bcm6348_brcm_bcm96348gw.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96348R.dts => bcm6348_brcm_bcm96348r.dts} (100%)
 rename target/linux/brcm63xx/dts/{v2110.dts => bcm6348_bt_voyager-2110.dts} (96%)
 rename target/linux/brcm63xx/dts/{v2500v-bb.dts => bcm6348_bt_voyager-2500v-bb.dts} (96%)
 rename target/linux/brcm63xx/dts/{ct-5365.dts => bcm6348_comtrend_ct-5365.dts} (100%)
 rename target/linux/brcm63xx/dts/{ct536plus.dts => bcm6348_comtrend_ct-536plus.dts} (95%)
 rename target/linux/brcm63xx/dts/{dsl-2640b-b.dts => bcm6348_d-link_dsl-2640b-b.dts} (100%)
 rename target/linux/brcm63xx/dts/{dv-201amr.dts => bcm6348_davolink_dv-201amr.dts} (100%)
 rename target/linux/brcm63xx/dts/{rta1025w.dts => bcm6348_dynalink_rta1025w.dts} (100%)
 rename target/linux/brcm63xx/dts/{livebox-blue-5g.dts => bcm6348_inventel_livebox-1.dts} (95%)
 rename target/linux/brcm63xx/dts/{dg834g_v4.dts => bcm6348_netgear_dg834g-v4.dts} (100%)
 rename target/linux/brcm63xx/dts/{dg834gtpn.dts => bcm6348_netgear_dg834gt-pn.dts} (96%)
 rename target/linux/brcm63xx/dts/{fast2404.dts => bcm6348_sagem_fast-2404.dts} (93%)
 rename target/linux/brcm63xx/dts/{fast2604.dts => bcm6348_sagem_fast-2604.dts} (96%)
 rename target/linux/brcm63xx/dts/{spw500v.dts => bcm6348_t-com_speedport-w-500v.dts} (96%)
 rename target/linux/brcm63xx/dts/{gw6000.dts => bcm6348_tecom_gw6000.dts} (100%)
 rename target/linux/brcm63xx/dts/{gw6200.dts => bcm6348_tecom_gw6200.dts} (100%)
 rename target/linux/brcm63xx/dts/{cpva502plus.dts => bcm6348_telsey_cpva502plus.dts} (95%)
 rename target/linux/brcm63xx/dts/{magic.dts => bcm6348_telsey_magic.dts} (100%)
 rename target/linux/brcm63xx/dts/{td-w8900gb.dts => bcm6348_tp-link_td-w8900gb.dts} (100%)
 rename target/linux/brcm63xx/dts/{usr9108.dts => bcm6348_usrobotics_usr9108.dts} (94%)
 rename target/linux/brcm63xx/dts/{rg100a.dts => bcm6358_alcatel_rg100a.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96358VW.dts => bcm6358_brcm_bcm96358vw.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96358VW2.dts => bcm6358_brcm_bcm96358vw2.dts} (100%)
 rename target/linux/brcm63xx/dts/{homehub2a.dts => bcm6358_bt_home-hub-2-a.dts} (97%)
 rename target/linux/brcm63xx/dts/{ct-6373.dts => bcm6358_comtrend_ct-6373.dts} (100%)
 rename target/linux/brcm63xx/dts/{dsl-2650u.dts => bcm6358_d-link_dsl-2650u.dts} (100%)
 rename target/linux/brcm63xx/dts/{dsl-274xb-c.dts => bcm6358_d-link_dsl-274xb-c2.dts} (100%)
 rename target/linux/brcm63xx/dts/{dva-g3810bn_tl.dts => bcm6358_d-link_dva-g3810bn-tl.dts} (96%)
 rename target/linux/brcm63xx/dts/{hg520v.dts => bcm6358_huawei_echolife-hg520v.dts} (94%)
 rename target/linux/brcm63xx/dts/{hg553.dts => bcm6358_huawei_echolife-hg553.dts} (96%)
 rename target/linux/brcm63xx/dts/{hg556a-a.dts => bcm6358_huawei_echolife-hg556a-a.dts} (97%)
 rename target/linux/brcm63xx/dts/{hg556a-b.dts => bcm6358_huawei_echolife-hg556a-b.dts} (97%)
 rename target/linux/brcm63xx/dts/{hg556a-c.dts => bcm6358_huawei_echolife-hg556a-c.dts} (97%)
 rename target/linux/brcm63xx/dts/{a226g.dts => bcm6358_pirelli_a226g.dts} (100%)
 rename target/linux/brcm63xx/dts/{a226m-fwb.dts => bcm6358_pirelli_a226m-fwb.dts} (100%)
 rename target/linux/brcm63xx/dts/{a226m.dts => bcm6358_pirelli_a226m.dts} (100%)
 rename target/linux/brcm63xx/dts/{agpf-s0.dts => bcm6358_pirelli_agpf-s0.dts} (100%)
 rename target/linux/brcm63xx/dts/{nb4-fxc-r1.dts => bcm6358_sfr_neufbox-4-foxconn-r1.dts} (96%)
 rename target/linux/brcm63xx/dts/{nb4-ser-r0.dts => bcm6358_sfr_neufbox-4-sercomm-r0.dts} (96%)
 rename target/linux/brcm63xx/dts/{spw303v.dts => bcm6358_t-com_speedport-w-303v.dts} (96%)
 rename target/linux/brcm63xx/dts/{cpva642.dts => bcm6358_telsey_cpva642.dts} (100%)
 rename target/linux/brcm63xx/dts/{fast2504n.dts => bcm6362_sagem_fast-2504n.dts} (97%)
 rename target/linux/brcm63xx/dts/{nb6-ser-r0.dts => bcm6362_sfr_neufbox-6-sercomm-r0.dts} (96%)
 rename target/linux/brcm63xx/dts/{r1000h.dts => bcm6368_actiontec_r1000h.dts} (100%)
 rename target/linux/brcm63xx/dts/{av4202n.dts => bcm6368_adb_av4202n.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96368MVNgr.dts => bcm6368_brcm_bcm96368mvngr.dts} (100%)
 rename target/linux/brcm63xx/dts/{bcm96368MVWG.dts => bcm6368_brcm_bcm96368mvwg.dts} (100%)
 rename target/linux/brcm63xx/dts/{vr-3025u.dts => bcm6368_comtrend_vr-3025u.dts} (100%)
 rename target/linux/brcm63xx/dts/{vr-3025un.dts => bcm6368_comtrend_vr-3025un.dts} (100%)
 rename target/linux/brcm63xx/dts/{vr-3026e.dts => bcm6368_comtrend_vr-3026e.dts} (100%)
 rename target/linux/brcm63xx/dts/{wap-5813n.dts => bcm6368_comtrend_wap-5813n.dts} (100%)
 rename target/linux/brcm63xx/dts/{hg622.dts => bcm6368_huawei_echolife-hg622.dts} (96%)
 rename target/linux/brcm63xx/dts/{hg655b.dts => bcm6368_huawei_echolife-hg655b.dts} (97%)
 rename target/linux/brcm63xx/dts/{dgnd3700v1.dts => bcm6368_netgear_dgnd3700-v1.dts} (98%)
 rename target/linux/brcm63xx/dts/{evg2000.dts => bcm6368_netgear_evg2000.dts} (100%)
 rename target/linux/brcm63xx/dts/{vh4032n.dts => bcm6368_observa_vh4032n.dts} (100%)
 rename target/linux/brcm63xx/dts/{p870hw-51a-v2.dts => bcm6368_zyxel_p870hw-51a-v2.dts} (100%)

diff --git a/target/linux/brcm63xx/dts/cvg834g.dts b/target/linux/brcm63xx/dts/bcm3368_netgear_cvg834g.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/cvg834g.dts
rename to target/linux/brcm63xx/dts/bcm3368_netgear_cvg834g.dts
diff --git a/target/linux/brcm63xx/dts/bcm96318ref_p300.dts b/target/linux/brcm63xx/dts/bcm6318_brcm_bcm96318ref-p300.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/bcm96318ref_p300.dts
rename to target/linux/brcm63xx/dts/bcm6318_brcm_bcm96318ref-p300.dts
index 99f8af2189..4edab6418c 100644
--- a/target/linux/brcm63xx/dts/bcm96318ref_p300.dts
+++ b/target/linux/brcm63xx/dts/bcm6318_brcm_bcm96318ref-p300.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Broadcom BCM96318REF_P300 reference board";
-	compatible = "brcm,bcm96318ref_p300", "brcm,bcm6318";
+	compatible = "brcm,bcm96318ref-p300", "brcm,bcm6318";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/bcm96318ref.dts b/target/linux/brcm63xx/dts/bcm6318_brcm_bcm96318ref.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96318ref.dts
rename to target/linux/brcm63xx/dts/bcm6318_brcm_bcm96318ref.dts
diff --git a/target/linux/brcm63xx/dts/ar-5315u.dts b/target/linux/brcm63xx/dts/bcm6318_comtrend_ar-5315u.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/ar-5315u.dts
rename to target/linux/brcm63xx/dts/bcm6318_comtrend_ar-5315u.dts
diff --git a/target/linux/brcm63xx/dts/dsl-275xb-d.dts b/target/linux/brcm63xx/dts/bcm6318_d-link_dsl-275xb-d1.dts
similarity index 97%
rename from target/linux/brcm63xx/dts/dsl-275xb-d.dts
rename to target/linux/brcm63xx/dts/bcm6318_d-link_dsl-275xb-d1.dts
index 2052a6e305..cf5b296cb7 100644
--- a/target/linux/brcm63xx/dts/dsl-275xb-d.dts
+++ b/target/linux/brcm63xx/dts/bcm6318_d-link_dsl-275xb-d1.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "D-Link DSL-2750B/DSL-2751 rev D1";
-	compatible = "d-link,dsl-275xb-d", "brcm,bcm6318";
+	compatible = "d-link,dsl-275xb-d1", "brcm,bcm6318";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/fast2704n.dts b/target/linux/brcm63xx/dts/bcm6318_sagem_fast-2704n.dts
similarity index 97%
rename from target/linux/brcm63xx/dts/fast2704n.dts
rename to target/linux/brcm63xx/dts/bcm6318_sagem_fast-2704n.dts
index 33842cc646..3ceddd09a2 100644
--- a/target/linux/brcm63xx/dts/fast2704n.dts
+++ b/target/linux/brcm63xx/dts/bcm6318_sagem_fast-2704n.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Sagem F at ST2704N";
-	compatible = "sagem,f at st2704n", "brcm,bcm6318";
+	compatible = "sagem,fast-2704n", "brcm,bcm6318";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/bcm963268bu_p300.dts b/target/linux/brcm63xx/dts/bcm63268_brcm_bcm963268bu-p300.dts
similarity index 94%
rename from target/linux/brcm63xx/dts/bcm963268bu_p300.dts
rename to target/linux/brcm63xx/dts/bcm63268_brcm_bcm963268bu-p300.dts
index 57046a7878..b4176885ed 100644
--- a/target/linux/brcm63xx/dts/bcm963268bu_p300.dts
+++ b/target/linux/brcm63xx/dts/bcm63268_brcm_bcm963268bu-p300.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Broadcom BCM963268BU_P300 reference board";
-	compatible = "brcm,bcm963268bu_p300", "brcm,bcm63268";
+	compatible = "brcm,bcm963268bu-p300", "brcm,bcm63268";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/bcm963269bhr.dts b/target/linux/brcm63xx/dts/bcm63268_brcm_bcm963269bhr.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm963269bhr.dts
rename to target/linux/brcm63xx/dts/bcm63268_brcm_bcm963269bhr.dts
diff --git a/target/linux/brcm63xx/dts/vg50.dts b/target/linux/brcm63xx/dts/bcm63268_inteno_vg50.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/vg50.dts
rename to target/linux/brcm63xx/dts/bcm63268_inteno_vg50.dts
diff --git a/target/linux/brcm63xx/dts/sr102.dts b/target/linux/brcm63xx/dts/bcm63268_sky_sr102.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/sr102.dts
rename to target/linux/brcm63xx/dts/bcm63268_sky_sr102.dts
diff --git a/target/linux/brcm63xx/dts/a4001n.dts b/target/linux/brcm63xx/dts/bcm6328_adb_a4001n.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/a4001n.dts
rename to target/linux/brcm63xx/dts/bcm6328_adb_a4001n.dts
diff --git a/target/linux/brcm63xx/dts/a4001n1.dts b/target/linux/brcm63xx/dts/bcm6328_adb_a4001n1.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/a4001n1.dts
rename to target/linux/brcm63xx/dts/bcm6328_adb_a4001n1.dts
diff --git a/target/linux/brcm63xx/dts/bcm963281TAN.dts b/target/linux/brcm63xx/dts/bcm6328_brcm_bcm963281tan.dts
similarity index 95%
rename from target/linux/brcm63xx/dts/bcm963281TAN.dts
rename to target/linux/brcm63xx/dts/bcm6328_brcm_bcm963281tan.dts
index 956ca59d69..6fbac7d461 100644
--- a/target/linux/brcm63xx/dts/bcm963281TAN.dts
+++ b/target/linux/brcm63xx/dts/bcm6328_brcm_bcm963281tan.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Broadcom bcm963281TAN reference board";
-	compatible = "brcm,bcm963281TAN", "brcm,bcm6328";
+	compatible = "brcm,bcm963281tan", "brcm,bcm6328";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/bcm96328avng.dts b/target/linux/brcm63xx/dts/bcm6328_brcm_bcm96328avng.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96328avng.dts
rename to target/linux/brcm63xx/dts/bcm6328_brcm_bcm96328avng.dts
diff --git a/target/linux/brcm63xx/dts/ar-5381u.dts b/target/linux/brcm63xx/dts/bcm6328_comtrend_ar-5381u.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/ar-5381u.dts
rename to target/linux/brcm63xx/dts/bcm6328_comtrend_ar-5381u.dts
diff --git a/target/linux/brcm63xx/dts/ar-5387un.dts b/target/linux/brcm63xx/dts/bcm6328_comtrend_ar-5387un.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/ar-5387un.dts
rename to target/linux/brcm63xx/dts/bcm6328_comtrend_ar-5387un.dts
diff --git a/target/linux/brcm63xx/dts/dsl-274xb-f.dts b/target/linux/brcm63xx/dts/bcm6328_d-link_dsl-274xb-f1.dts
similarity index 97%
rename from target/linux/brcm63xx/dts/dsl-274xb-f.dts
rename to target/linux/brcm63xx/dts/bcm6328_d-link_dsl-274xb-f1.dts
index 1d09232ba5..f3fab05062 100644
--- a/target/linux/brcm63xx/dts/dsl-274xb-f.dts
+++ b/target/linux/brcm63xx/dts/bcm6328_d-link_dsl-274xb-f1.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "D-Link DSL-2740B/DSL-2741B rev F1";
-	compatible = "d-link,dsl-274xb-f", "brcm,bcm6328";
+	compatible = "d-link,dsl-274xb-f1", "brcm,bcm6328";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/r5010unv2.dts b/target/linux/brcm63xx/dts/bcm6328_nucom_r5010un-v2.dts
similarity index 97%
rename from target/linux/brcm63xx/dts/r5010unv2.dts
rename to target/linux/brcm63xx/dts/bcm6328_nucom_r5010un-v2.dts
index a782126300..5084bd8877 100644
--- a/target/linux/brcm63xx/dts/r5010unv2.dts
+++ b/target/linux/brcm63xx/dts/bcm6328_nucom_r5010un-v2.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "NuCom R5010UN v2";
-	compatible = "nucom,r5010unv2", "brcm,bcm6328";
+	compatible = "nucom,r5010un-v2", "brcm,bcm6328";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/fast2704v2.dts b/target/linux/brcm63xx/dts/bcm6328_sagem_fast-2704-v2.dts
similarity index 97%
rename from target/linux/brcm63xx/dts/fast2704v2.dts
rename to target/linux/brcm63xx/dts/bcm6328_sagem_fast-2704-v2.dts
index 1de853a025..1fe0d44810 100644
--- a/target/linux/brcm63xx/dts/fast2704v2.dts
+++ b/target/linux/brcm63xx/dts/bcm6328_sagem_fast-2704-v2.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Sagem F at ST2704V2";
-	compatible = "sagem,f at st2704v2", "brcm,bcm6328";
+	compatible = "sagem,fast-2704-v2", "brcm,bcm6328";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/ad1018-nor.dts b/target/linux/brcm63xx/dts/bcm6328_sercomm_ad1018-nor.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/ad1018-nor.dts
rename to target/linux/brcm63xx/dts/bcm6328_sercomm_ad1018-nor.dts
diff --git a/target/linux/brcm63xx/dts/bcm96338GW.dts b/target/linux/brcm63xx/dts/bcm6338_brcm_bcm96338gw.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96338GW.dts
rename to target/linux/brcm63xx/dts/bcm6338_brcm_bcm96338gw.dts
diff --git a/target/linux/brcm63xx/dts/bcm96338W.dts b/target/linux/brcm63xx/dts/bcm6338_brcm_bcm96338w.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96338W.dts
rename to target/linux/brcm63xx/dts/bcm6338_brcm_bcm96338w.dts
diff --git a/target/linux/brcm63xx/dts/dsl-2640u.dts b/target/linux/brcm63xx/dts/bcm6338_d-link_dsl-2640u.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/dsl-2640u.dts
rename to target/linux/brcm63xx/dts/bcm6338_d-link_dsl-2640u.dts
diff --git a/target/linux/brcm63xx/dts/rta1320.dts b/target/linux/brcm63xx/dts/bcm6338_dynalink_rta1320.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/rta1320.dts
rename to target/linux/brcm63xx/dts/bcm6338_dynalink_rta1320.dts
diff --git a/target/linux/brcm63xx/dts/bcm96345GW2.dts b/target/linux/brcm63xx/dts/bcm6345_brcm_bcm96345gw2.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96345GW2.dts
rename to target/linux/brcm63xx/dts/bcm6345_brcm_bcm96345gw2.dts
diff --git a/target/linux/brcm63xx/dts/rta770bw.dts b/target/linux/brcm63xx/dts/bcm6345_dynalink_rta770bw.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/rta770bw.dts
rename to target/linux/brcm63xx/dts/bcm6345_dynalink_rta770bw.dts
diff --git a/target/linux/brcm63xx/dts/rta770w.dts b/target/linux/brcm63xx/dts/bcm6345_dynalink_rta770w.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/rta770w.dts
rename to target/linux/brcm63xx/dts/bcm6345_dynalink_rta770w.dts
diff --git a/target/linux/brcm63xx/dts/ar1004g.dts b/target/linux/brcm63xx/dts/bcm6348_asmax_ar-1004g.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/ar1004g.dts
rename to target/linux/brcm63xx/dts/bcm6348_asmax_ar-1004g.dts
index ffda187fda..bf7b4a3ec4 100644
--- a/target/linux/brcm63xx/dts/ar1004g.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_asmax_ar-1004g.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "ASMAX AR 1004g";
-	compatible = "asmax,ar1004g", "brcm,bcm6348";
+	compatible = "asmax,ar-1004g", "brcm,bcm6348";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/f5d7633.dts b/target/linux/brcm63xx/dts/bcm6348_belkin_f5d7633.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/f5d7633.dts
rename to target/linux/brcm63xx/dts/bcm6348_belkin_f5d7633.dts
diff --git a/target/linux/brcm63xx/dts/bcm96348GW-10.dts b/target/linux/brcm63xx/dts/bcm6348_brcm_bcm96348gw-10.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96348GW-10.dts
rename to target/linux/brcm63xx/dts/bcm6348_brcm_bcm96348gw-10.dts
diff --git a/target/linux/brcm63xx/dts/bcm96348GW-11.dts b/target/linux/brcm63xx/dts/bcm6348_brcm_bcm96348gw-11.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96348GW-11.dts
rename to target/linux/brcm63xx/dts/bcm6348_brcm_bcm96348gw-11.dts
diff --git a/target/linux/brcm63xx/dts/bcm96348GW.dts b/target/linux/brcm63xx/dts/bcm6348_brcm_bcm96348gw.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96348GW.dts
rename to target/linux/brcm63xx/dts/bcm6348_brcm_bcm96348gw.dts
diff --git a/target/linux/brcm63xx/dts/bcm96348R.dts b/target/linux/brcm63xx/dts/bcm6348_brcm_bcm96348r.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96348R.dts
rename to target/linux/brcm63xx/dts/bcm6348_brcm_bcm96348r.dts
diff --git a/target/linux/brcm63xx/dts/v2110.dts b/target/linux/brcm63xx/dts/bcm6348_bt_voyager-2110.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/v2110.dts
rename to target/linux/brcm63xx/dts/bcm6348_bt_voyager-2110.dts
index a1b6c2177b..1eac7e3745 100644
--- a/target/linux/brcm63xx/dts/v2110.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_bt_voyager-2110.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "BT Voyager 2110";
-	compatible = "bt,v2110", "brcm,bcm6348";
+	compatible = "bt,voyager-2110", "brcm,bcm6348";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/v2500v-bb.dts b/target/linux/brcm63xx/dts/bcm6348_bt_voyager-2500v-bb.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/v2500v-bb.dts
rename to target/linux/brcm63xx/dts/bcm6348_bt_voyager-2500v-bb.dts
index 591d00d503..a77362f2f6 100644
--- a/target/linux/brcm63xx/dts/v2500v-bb.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_bt_voyager-2500v-bb.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "BT Voyager V2500V";
-	compatible = "bt,v2500v-bb", "brcm,bcm6348";
+	compatible = "bt,voyager-2500v-bb", "brcm,bcm6348";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/ct-5365.dts b/target/linux/brcm63xx/dts/bcm6348_comtrend_ct-5365.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/ct-5365.dts
rename to target/linux/brcm63xx/dts/bcm6348_comtrend_ct-5365.dts
diff --git a/target/linux/brcm63xx/dts/ct536plus.dts b/target/linux/brcm63xx/dts/bcm6348_comtrend_ct-536plus.dts
similarity index 95%
rename from target/linux/brcm63xx/dts/ct536plus.dts
rename to target/linux/brcm63xx/dts/bcm6348_comtrend_ct-536plus.dts
index d6664ab81c..ead9bc3a20 100644
--- a/target/linux/brcm63xx/dts/ct536plus.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_comtrend_ct-536plus.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Comtrend CT-536+/CT-5621T";
-	compatible = "comtrend,ct-536+", "brcm,bcm6348";
+	compatible = "comtrend,ct-536plus", "brcm,bcm6348";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/dsl-2640b-b.dts b/target/linux/brcm63xx/dts/bcm6348_d-link_dsl-2640b-b.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/dsl-2640b-b.dts
rename to target/linux/brcm63xx/dts/bcm6348_d-link_dsl-2640b-b.dts
diff --git a/target/linux/brcm63xx/dts/dv-201amr.dts b/target/linux/brcm63xx/dts/bcm6348_davolink_dv-201amr.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/dv-201amr.dts
rename to target/linux/brcm63xx/dts/bcm6348_davolink_dv-201amr.dts
diff --git a/target/linux/brcm63xx/dts/rta1025w.dts b/target/linux/brcm63xx/dts/bcm6348_dynalink_rta1025w.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/rta1025w.dts
rename to target/linux/brcm63xx/dts/bcm6348_dynalink_rta1025w.dts
diff --git a/target/linux/brcm63xx/dts/livebox-blue-5g.dts b/target/linux/brcm63xx/dts/bcm6348_inventel_livebox-1.dts
similarity index 95%
rename from target/linux/brcm63xx/dts/livebox-blue-5g.dts
rename to target/linux/brcm63xx/dts/bcm6348_inventel_livebox-1.dts
index 9d5c2e100b..6e80675ff7 100644
--- a/target/linux/brcm63xx/dts/livebox-blue-5g.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_inventel_livebox-1.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Inventel Livebox 1";
-	compatible = "inventel,livebox-blue-5g", "brcm,bcm6348";
+	compatible = "inventel,livebox-1", "brcm,bcm6348";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/dg834g_v4.dts b/target/linux/brcm63xx/dts/bcm6348_netgear_dg834g-v4.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/dg834g_v4.dts
rename to target/linux/brcm63xx/dts/bcm6348_netgear_dg834g-v4.dts
diff --git a/target/linux/brcm63xx/dts/dg834gtpn.dts b/target/linux/brcm63xx/dts/bcm6348_netgear_dg834gt-pn.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/dg834gtpn.dts
rename to target/linux/brcm63xx/dts/bcm6348_netgear_dg834gt-pn.dts
index 32ab365a8d..f7e203227c 100644
--- a/target/linux/brcm63xx/dts/dg834gtpn.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_netgear_dg834gt-pn.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Netgear DG834GT/PN";
-	compatible = "netgear,dg834gtpn", "brcm,bcm6348";
+	compatible = "netgear,dg834gt-pn", "brcm,bcm6348";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/fast2404.dts b/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2404.dts
similarity index 93%
rename from target/linux/brcm63xx/dts/fast2404.dts
rename to target/linux/brcm63xx/dts/bcm6348_sagem_fast-2404.dts
index c9f75f389f..60b945555b 100644
--- a/target/linux/brcm63xx/dts/fast2404.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2404.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Sagem F at ST2404";
-	compatible = "sagem,f at st2404", "brcm,bcm6348";
+	compatible = "sagem,fast-2404", "brcm,bcm6348";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/fast2604.dts b/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2604.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/fast2604.dts
rename to target/linux/brcm63xx/dts/bcm6348_sagem_fast-2604.dts
index 52458a253f..a3394dd70d 100644
--- a/target/linux/brcm63xx/dts/fast2604.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2604.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Sagem F at ST2604";
-	compatible = "sagem,f at st2604", "brcm,bcm6348";
+	compatible = "sagem,fast-2604", "brcm,bcm6348";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/spw500v.dts b/target/linux/brcm63xx/dts/bcm6348_t-com_speedport-w-500v.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/spw500v.dts
rename to target/linux/brcm63xx/dts/bcm6348_t-com_speedport-w-500v.dts
index 8ca6dddd10..aa2f337253 100644
--- a/target/linux/brcm63xx/dts/spw500v.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_t-com_speedport-w-500v.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "T-Com Speedport W500 V";
-	compatible = "t-com,spw500v", "brcm,bcm6348";
+	compatible = "t-com,speedport-w-500v", "brcm,bcm6348";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/gw6000.dts b/target/linux/brcm63xx/dts/bcm6348_tecom_gw6000.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/gw6000.dts
rename to target/linux/brcm63xx/dts/bcm6348_tecom_gw6000.dts
diff --git a/target/linux/brcm63xx/dts/gw6200.dts b/target/linux/brcm63xx/dts/bcm6348_tecom_gw6200.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/gw6200.dts
rename to target/linux/brcm63xx/dts/bcm6348_tecom_gw6200.dts
diff --git a/target/linux/brcm63xx/dts/cpva502plus.dts b/target/linux/brcm63xx/dts/bcm6348_telsey_cpva502plus.dts
similarity index 95%
rename from target/linux/brcm63xx/dts/cpva502plus.dts
rename to target/linux/brcm63xx/dts/bcm6348_telsey_cpva502plus.dts
index db08e7a97d..71620bc655 100644
--- a/target/linux/brcm63xx/dts/cpva502plus.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_telsey_cpva502plus.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Telsey CPVA502+";
-	compatible = "telsey,cpva502+", "brcm,bcm6348";
+	compatible = "telsey,cpva502plus", "brcm,bcm6348";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/magic.dts b/target/linux/brcm63xx/dts/bcm6348_telsey_magic.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/magic.dts
rename to target/linux/brcm63xx/dts/bcm6348_telsey_magic.dts
diff --git a/target/linux/brcm63xx/dts/td-w8900gb.dts b/target/linux/brcm63xx/dts/bcm6348_tp-link_td-w8900gb.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/td-w8900gb.dts
rename to target/linux/brcm63xx/dts/bcm6348_tp-link_td-w8900gb.dts
diff --git a/target/linux/brcm63xx/dts/usr9108.dts b/target/linux/brcm63xx/dts/bcm6348_usrobotics_usr9108.dts
similarity index 94%
rename from target/linux/brcm63xx/dts/usr9108.dts
rename to target/linux/brcm63xx/dts/bcm6348_usrobotics_usr9108.dts
index fd0d6d4bcd..35ce1b010d 100644
--- a/target/linux/brcm63xx/dts/usr9108.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_usrobotics_usr9108.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "USRobotics 9108";
-	compatible = "usr,9108", "brcm,bcm6348";
+	compatible = "usrobotics,usr9108", "brcm,bcm6348";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/rg100a.dts b/target/linux/brcm63xx/dts/bcm6358_alcatel_rg100a.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/rg100a.dts
rename to target/linux/brcm63xx/dts/bcm6358_alcatel_rg100a.dts
diff --git a/target/linux/brcm63xx/dts/bcm96358VW.dts b/target/linux/brcm63xx/dts/bcm6358_brcm_bcm96358vw.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96358VW.dts
rename to target/linux/brcm63xx/dts/bcm6358_brcm_bcm96358vw.dts
diff --git a/target/linux/brcm63xx/dts/bcm96358VW2.dts b/target/linux/brcm63xx/dts/bcm6358_brcm_bcm96358vw2.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96358VW2.dts
rename to target/linux/brcm63xx/dts/bcm6358_brcm_bcm96358vw2.dts
diff --git a/target/linux/brcm63xx/dts/homehub2a.dts b/target/linux/brcm63xx/dts/bcm6358_bt_home-hub-2-a.dts
similarity index 97%
rename from target/linux/brcm63xx/dts/homehub2a.dts
rename to target/linux/brcm63xx/dts/bcm6358_bt_home-hub-2-a.dts
index 836c43cae7..351b2945d3 100644
--- a/target/linux/brcm63xx/dts/homehub2a.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_bt_home-hub-2-a.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "BT Home Hub 2.0 Type A";
-	compatible = "thomson,homehub2a", "brcm,bcm6358";
+	compatible = "bt,home-hub-2-a", "brcm,bcm6358";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/ct-6373.dts b/target/linux/brcm63xx/dts/bcm6358_comtrend_ct-6373.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/ct-6373.dts
rename to target/linux/brcm63xx/dts/bcm6358_comtrend_ct-6373.dts
diff --git a/target/linux/brcm63xx/dts/dsl-2650u.dts b/target/linux/brcm63xx/dts/bcm6358_d-link_dsl-2650u.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/dsl-2650u.dts
rename to target/linux/brcm63xx/dts/bcm6358_d-link_dsl-2650u.dts
diff --git a/target/linux/brcm63xx/dts/dsl-274xb-c.dts b/target/linux/brcm63xx/dts/bcm6358_d-link_dsl-274xb-c2.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/dsl-274xb-c.dts
rename to target/linux/brcm63xx/dts/bcm6358_d-link_dsl-274xb-c2.dts
diff --git a/target/linux/brcm63xx/dts/dva-g3810bn_tl.dts b/target/linux/brcm63xx/dts/bcm6358_d-link_dva-g3810bn-tl.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/dva-g3810bn_tl.dts
rename to target/linux/brcm63xx/dts/bcm6358_d-link_dva-g3810bn-tl.dts
index 95a627dfb2..fcf112a7e0 100644
--- a/target/linux/brcm63xx/dts/dva-g3810bn_tl.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_d-link_dva-g3810bn-tl.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "D-Link DVA-G3810BN/TL";
-	compatible = "d-link,dva-g3810bn/tl", "brcm,bcm6358";
+	compatible = "d-link,dva-g3810bn-tl", "brcm,bcm6358";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/hg520v.dts b/target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg520v.dts
similarity index 94%
rename from target/linux/brcm63xx/dts/hg520v.dts
rename to target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg520v.dts
index ebbf1f3afe..2176ea88d2 100644
--- a/target/linux/brcm63xx/dts/hg520v.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg520v.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Huawei EchoLife HG520v";
-	compatible = "huawei,hg520v", "brcm,bcm6358";
+	compatible = "huawei,echolife-hg520v", "brcm,bcm6358";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/hg553.dts b/target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg553.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/hg553.dts
rename to target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg553.dts
index 92e5e48ac2..d23066866e 100644
--- a/target/linux/brcm63xx/dts/hg553.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg553.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Huawei EchoLife HG553";
-	compatible = "huawei,hg553", "brcm,bcm6358";
+	compatible = "huawei,echolife-hg553", "brcm,bcm6358";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/hg556a-a.dts b/target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg556a-a.dts
similarity index 97%
rename from target/linux/brcm63xx/dts/hg556a-a.dts
rename to target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg556a-a.dts
index 018b913a88..1827e8e235 100644
--- a/target/linux/brcm63xx/dts/hg556a-a.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg556a-a.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Huawei EchoLife HG556a (version A)";
-	compatible = "huawei,hg556a-a", "brcm,bcm6358";
+	compatible = "huawei,echolife-hg556a-a", "brcm,bcm6358";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/hg556a-b.dts b/target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg556a-b.dts
similarity index 97%
rename from target/linux/brcm63xx/dts/hg556a-b.dts
rename to target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg556a-b.dts
index 034e736f01..fa804bef9e 100644
--- a/target/linux/brcm63xx/dts/hg556a-b.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg556a-b.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Huawei EchoLife HG556a (version B)";
-	compatible = "huawei,hg556a-b", "brcm,bcm6358";
+	compatible = "huawei,echolife-hg556a-b", "brcm,bcm6358";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/hg556a-c.dts b/target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg556a-c.dts
similarity index 97%
rename from target/linux/brcm63xx/dts/hg556a-c.dts
rename to target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg556a-c.dts
index 2e5aeb86e1..5ed847baab 100644
--- a/target/linux/brcm63xx/dts/hg556a-c.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_huawei_echolife-hg556a-c.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Huawei EchoLife HG556a (version C)";
-	compatible = "huawei,hg556a-c", "brcm,bcm6358";
+	compatible = "huawei,echolife-hg556a-c", "brcm,bcm6358";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/a226g.dts b/target/linux/brcm63xx/dts/bcm6358_pirelli_a226g.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/a226g.dts
rename to target/linux/brcm63xx/dts/bcm6358_pirelli_a226g.dts
diff --git a/target/linux/brcm63xx/dts/a226m-fwb.dts b/target/linux/brcm63xx/dts/bcm6358_pirelli_a226m-fwb.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/a226m-fwb.dts
rename to target/linux/brcm63xx/dts/bcm6358_pirelli_a226m-fwb.dts
diff --git a/target/linux/brcm63xx/dts/a226m.dts b/target/linux/brcm63xx/dts/bcm6358_pirelli_a226m.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/a226m.dts
rename to target/linux/brcm63xx/dts/bcm6358_pirelli_a226m.dts
diff --git a/target/linux/brcm63xx/dts/agpf-s0.dts b/target/linux/brcm63xx/dts/bcm6358_pirelli_agpf-s0.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/agpf-s0.dts
rename to target/linux/brcm63xx/dts/bcm6358_pirelli_agpf-s0.dts
diff --git a/target/linux/brcm63xx/dts/nb4-fxc-r1.dts b/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-foxconn-r1.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/nb4-fxc-r1.dts
rename to target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-foxconn-r1.dts
index 33ad3ed82c..e1a3046c7f 100644
--- a/target/linux/brcm63xx/dts/nb4-fxc-r1.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-foxconn-r1.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "SFR Neuf Box 4 (Foxconn)";
-	compatible = "sfr,nb4-fxc-r1", "brcm,bcm6358";
+	compatible = "sfr,neufbox-4-foxconn-r1", "brcm,bcm6358";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/nb4-ser-r0.dts b/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-sercomm-r0.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/nb4-ser-r0.dts
rename to target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-sercomm-r0.dts
index 86cd31be60..b28aaa3fe7 100644
--- a/target/linux/brcm63xx/dts/nb4-ser-r0.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-sercomm-r0.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "SFR Neuf Box 4 (Sercomm)";
-	compatible = "sfr,nb4-ser-r0", "brcm,bcm6358";
+	compatible = "sfr,neufbox-4-sercomm-r0", "brcm,bcm6358";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/spw303v.dts b/target/linux/brcm63xx/dts/bcm6358_t-com_speedport-w-303v.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/spw303v.dts
rename to target/linux/brcm63xx/dts/bcm6358_t-com_speedport-w-303v.dts
index 04bbb5a112..68f8588f55 100644
--- a/target/linux/brcm63xx/dts/spw303v.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_t-com_speedport-w-303v.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "T-Com Speedport W303 V";
-	compatible = "t-com,spw303v", "brcm,bcm6358";
+	compatible = "t-com,speedport-w-303v", "brcm,bcm6358";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/cpva642.dts b/target/linux/brcm63xx/dts/bcm6358_telsey_cpva642.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/cpva642.dts
rename to target/linux/brcm63xx/dts/bcm6358_telsey_cpva642.dts
diff --git a/target/linux/brcm63xx/dts/fast2504n.dts b/target/linux/brcm63xx/dts/bcm6362_sagem_fast-2504n.dts
similarity index 97%
rename from target/linux/brcm63xx/dts/fast2504n.dts
rename to target/linux/brcm63xx/dts/bcm6362_sagem_fast-2504n.dts
index 293620664c..d1bf98a2b1 100644
--- a/target/linux/brcm63xx/dts/fast2504n.dts
+++ b/target/linux/brcm63xx/dts/bcm6362_sagem_fast-2504n.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Sagem F at ST2504n";
-	compatible = "sagem,f at st2504n", "brcm,bcm6362";
+	compatible = "sagem,fast-2504n", "brcm,bcm6362";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/nb6-ser-r0.dts b/target/linux/brcm63xx/dts/bcm6362_sfr_neufbox-6-sercomm-r0.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/nb6-ser-r0.dts
rename to target/linux/brcm63xx/dts/bcm6362_sfr_neufbox-6-sercomm-r0.dts
index 202386a770..a5184ff555 100644
--- a/target/linux/brcm63xx/dts/nb6-ser-r0.dts
+++ b/target/linux/brcm63xx/dts/bcm6362_sfr_neufbox-6-sercomm-r0.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "SFR neufbox 6 (Sercomm)";
-	compatible = "sfr,nb6-ser-r0", "brcm,bcm6362";
+	compatible = "sfr,neufbox-6-sercomm-r0", "brcm,bcm6362";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/r1000h.dts b/target/linux/brcm63xx/dts/bcm6368_actiontec_r1000h.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/r1000h.dts
rename to target/linux/brcm63xx/dts/bcm6368_actiontec_r1000h.dts
diff --git a/target/linux/brcm63xx/dts/av4202n.dts b/target/linux/brcm63xx/dts/bcm6368_adb_av4202n.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/av4202n.dts
rename to target/linux/brcm63xx/dts/bcm6368_adb_av4202n.dts
diff --git a/target/linux/brcm63xx/dts/bcm96368MVNgr.dts b/target/linux/brcm63xx/dts/bcm6368_brcm_bcm96368mvngr.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96368MVNgr.dts
rename to target/linux/brcm63xx/dts/bcm6368_brcm_bcm96368mvngr.dts
diff --git a/target/linux/brcm63xx/dts/bcm96368MVWG.dts b/target/linux/brcm63xx/dts/bcm6368_brcm_bcm96368mvwg.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/bcm96368MVWG.dts
rename to target/linux/brcm63xx/dts/bcm6368_brcm_bcm96368mvwg.dts
diff --git a/target/linux/brcm63xx/dts/vr-3025u.dts b/target/linux/brcm63xx/dts/bcm6368_comtrend_vr-3025u.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/vr-3025u.dts
rename to target/linux/brcm63xx/dts/bcm6368_comtrend_vr-3025u.dts
diff --git a/target/linux/brcm63xx/dts/vr-3025un.dts b/target/linux/brcm63xx/dts/bcm6368_comtrend_vr-3025un.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/vr-3025un.dts
rename to target/linux/brcm63xx/dts/bcm6368_comtrend_vr-3025un.dts
diff --git a/target/linux/brcm63xx/dts/vr-3026e.dts b/target/linux/brcm63xx/dts/bcm6368_comtrend_vr-3026e.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/vr-3026e.dts
rename to target/linux/brcm63xx/dts/bcm6368_comtrend_vr-3026e.dts
diff --git a/target/linux/brcm63xx/dts/wap-5813n.dts b/target/linux/brcm63xx/dts/bcm6368_comtrend_wap-5813n.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/wap-5813n.dts
rename to target/linux/brcm63xx/dts/bcm6368_comtrend_wap-5813n.dts
diff --git a/target/linux/brcm63xx/dts/hg622.dts b/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg622.dts
similarity index 96%
rename from target/linux/brcm63xx/dts/hg622.dts
rename to target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg622.dts
index a7569a7808..36598645a3 100644
--- a/target/linux/brcm63xx/dts/hg622.dts
+++ b/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg622.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Huawei HG622";
-	compatible = "huawei,hg622", "brcm,bcm6368";
+	compatible = "huawei,echolife-hg622", "brcm,bcm6368";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/hg655b.dts b/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg655b.dts
similarity index 97%
rename from target/linux/brcm63xx/dts/hg655b.dts
rename to target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg655b.dts
index f62f238510..10fdcc6fd1 100644
--- a/target/linux/brcm63xx/dts/hg655b.dts
+++ b/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg655b.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Huawei HG655b";
-	compatible = "huawei,hg655b", "brcm,bcm6368";
+	compatible = "huawei,echolife-hg655b", "brcm,bcm6368";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/dgnd3700v1.dts b/target/linux/brcm63xx/dts/bcm6368_netgear_dgnd3700-v1.dts
similarity index 98%
rename from target/linux/brcm63xx/dts/dgnd3700v1.dts
rename to target/linux/brcm63xx/dts/bcm6368_netgear_dgnd3700-v1.dts
index b6aec06e6b..0354d8eddd 100644
--- a/target/linux/brcm63xx/dts/dgnd3700v1.dts
+++ b/target/linux/brcm63xx/dts/bcm6368_netgear_dgnd3700-v1.dts
@@ -6,7 +6,7 @@
 
 / {
 	model = "Netgear DGND3700v1/DGND3800B";
-	compatible = "netgear,dgnd3700v1", "brcm,bcm6368";
+	compatible = "netgear,dgnd3700-v1", "brcm,bcm6368";
 
 	chosen {
 		bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
diff --git a/target/linux/brcm63xx/dts/evg2000.dts b/target/linux/brcm63xx/dts/bcm6368_netgear_evg2000.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/evg2000.dts
rename to target/linux/brcm63xx/dts/bcm6368_netgear_evg2000.dts
diff --git a/target/linux/brcm63xx/dts/vh4032n.dts b/target/linux/brcm63xx/dts/bcm6368_observa_vh4032n.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/vh4032n.dts
rename to target/linux/brcm63xx/dts/bcm6368_observa_vh4032n.dts
diff --git a/target/linux/brcm63xx/dts/p870hw-51a-v2.dts b/target/linux/brcm63xx/dts/bcm6368_zyxel_p870hw-51a-v2.dts
similarity index 100%
rename from target/linux/brcm63xx/dts/p870hw-51a-v2.dts
rename to target/linux/brcm63xx/dts/bcm6368_zyxel_p870hw-51a-v2.dts
diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile
index 1cf64bd8e7..3d5579a20a 100644
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -161,6 +161,8 @@ define Device/Default
   KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts)
   KERNEL_INITRAMFS_SUFFIX := .elf
   DEVICE_DTS_DIR := ../dts
+  SOC = bcm$$(CFE_CHIP_ID)
+  DEVICE_DTS = $$(SOC)_$(1)
 endef
 
 ATH5K_PACKAGES := kmod-ath5k wpad-basic
diff --git a/target/linux/brcm63xx/image/bcm63xx.mk b/target/linux/brcm63xx/image/bcm63xx.mk
index 2c8ac3e169..aa68befc13 100644
--- a/target/linux/brcm63xx/image/bcm63xx.mk
+++ b/target/linux/brcm63xx/image/bcm63xx.mk
@@ -55,148 +55,134 @@ endef
 DEVICE_VARS += REDBOOT_PREFIX
 
 ### Generic ###
-define Device/963281TAN-generic
+define Device/brcm_bcm963281tan
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 963281TAN
   IMAGES := cfe-4M.bin cfe-8M.bin cfe-16M.bin
-  DEVICE_DTS := bcm963281TAN
   CFE_BOARD_ID := 963281TAN
   CFE_CHIP_ID := 6328
 endef
-TARGET_DEVICES += 963281TAN-generic
+TARGET_DEVICES += brcm_bcm963281tan
 
-define Device/96328avng-generic
+define Device/brcm_bcm96328avng
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96328avng
   IMAGES := cfe-4M.bin cfe-8M.bin cfe-16M.bin
-  DEVICE_DTS := bcm96328avng
   CFE_BOARD_ID := 96328avng
   CFE_CHIP_ID := 6328
 endef
-TARGET_DEVICES += 96328avng-generic
+TARGET_DEVICES += brcm_bcm96328avng
 
-define Device/96338GW-generic
+define Device/brcm_bcm96338gw
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96338GW
-  DEVICE_DTS := bcm96338GW
   CFE_BOARD_ID := 6338GW
   CFE_CHIP_ID := 6338
 endef
-TARGET_DEVICES += 96338GW-generic
+TARGET_DEVICES += brcm_bcm96338gw
 
-define Device/96338W-generic
+define Device/brcm_bcm96338w
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96338W
-  DEVICE_DTS := bcm96338W
   CFE_BOARD_ID := 6338W
   CFE_CHIP_ID := 6338
 endef
-TARGET_DEVICES += 96338W-generic
+TARGET_DEVICES += brcm_bcm96338w
 
-define Device/96345GW2-generic
+define Device/brcm_bcm96345gw2
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96345GW2
   IMAGES += cfe-bc221.bin
-  DEVICE_DTS := bcm96345GW2
   CFE_BOARD_ID := 96345GW2
   CFE_CHIP_ID := 6345
   DEFAULT := n
 endef
-TARGET_DEVICES += 96345GW2-generic
+TARGET_DEVICES += brcm_bcm96345gw2
 
-define Device/96348GW-generic
+define Device/brcm_bcm96348gw
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96348GW
   IMAGES += cfe-bc221.bin
-  DEVICE_DTS := bcm96348GW
   CFE_BOARD_ID := 96348GW
   CFE_CHIP_ID := 6348
 endef
-TARGET_DEVICES += 96348GW-generic
+TARGET_DEVICES += brcm_bcm96348gw
 
-define Device/96348GW-10-generic
+define Device/brcm_bcm96348gw-10
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96348GW-10
-  DEVICE_DTS := bcm96348GW-10
   CFE_BOARD_ID := 96348GW-10
   CFE_CHIP_ID := 6348
 endef
-TARGET_DEVICES += 96348GW-10-generic
+TARGET_DEVICES += brcm_bcm96348gw-10
 
-define Device/96348GW-11-generic
+define Device/brcm_bcm96348gw-11
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96348GW-11
-  DEVICE_DTS := bcm96348GW-11
   CFE_BOARD_ID := 96348GW-11
   CFE_CHIP_ID := 6348
 endef
-TARGET_DEVICES += 96348GW-11-generic
+TARGET_DEVICES += brcm_bcm96348gw-11
 
-define Device/96348R-generic
+define Device/brcm_bcm96348r
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96348R
-  DEVICE_DTS := bcm96348R
   CFE_BOARD_ID := 96348R
   CFE_CHIP_ID := 6348
 endef
-TARGET_DEVICES += 96348R-generic
+TARGET_DEVICES += brcm_bcm96348r
 
-define Device/96358VW-generic
+define Device/brcm_bcm96358vw
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96358VW
-  DEVICE_DTS := bcm96358VW
   CFE_BOARD_ID := 96358VW
   CFE_CHIP_ID := 6358
 endef
-TARGET_DEVICES += 96358VW-generic
+TARGET_DEVICES += brcm_bcm96358vw
 
-define Device/96358VW2-generic
+define Device/brcm_bcm96358vw2
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96358VW2
-  DEVICE_DTS := bcm96358VW2
   CFE_BOARD_ID := 96358VW2
   CFE_CHIP_ID := 6358
 endef
-TARGET_DEVICES += 96358VW2-generic
+TARGET_DEVICES += brcm_bcm96358vw2
 
-define Device/96368MVNgr-generic
+define Device/brcm_bcm96368mvngr
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96368MVNgr
-  DEVICE_DTS := bcm96368MVNgr
   CFE_BOARD_ID := 96368MVNgr
   CFE_CHIP_ID := 6368
 endef
-TARGET_DEVICES += 96368MVNgr-generic
+TARGET_DEVICES += brcm_bcm96368mvngr
 
-define Device/96368MVWG-generic
+define Device/brcm_bcm96368mvwg
   $(Device/bcm63xx)
   DEVICE_VENDOR := Generic
   DEVICE_MODEL := 96368MVWG
-  DEVICE_DTS := bcm96368MVWG
   CFE_BOARD_ID := 96368MVWG
   CFE_CHIP_ID := 6368
 endef
-TARGET_DEVICES += 96368MVWG-generic
+TARGET_DEVICES += brcm_bcm96368mvwg
 
 ### Actiontec ###
-define Device/R1000H
+define Device/actiontec_r1000h
   $(Device/bcm63xx)
   DEVICE_VENDOR := Actiontec
   DEVICE_MODEL := R1000H
   FILESYSTEMS := squashfs
-  DEVICE_DTS := r1000h
   CFE_BOARD_ID := 96368MVWG
   CFE_CHIP_ID := 6368
   FLASH_MB := 32
@@ -204,83 +190,77 @@ define Device/R1000H
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES) $(BRCMWL_PACKAGES)
 endef
-TARGET_DEVICES += R1000H
+TARGET_DEVICES += actiontec_r1000h
 
 ### ADB ###
-define Device/A4001N
+define Device/adb_a4001n
   $(Device/bcm63xx)
   DEVICE_VENDOR := ADB
   DEVICE_MODEL := P.DG A4001N
-  DEVICE_DTS := a4001n
   CFE_BOARD_ID := 96328dg2x2
   CFE_CHIP_ID := 6328
   FLASH_MB := 8
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES) $(B43_PACKAGES)
 endef
-TARGET_DEVICES += A4001N
+TARGET_DEVICES += adb_a4001n
 
-define Device/A4001N1
+define Device/adb_a4001n1
   $(Device/bcm63xx)
   DEVICE_VENDOR := ADB
   DEVICE_MODEL := P.DG A4001N1
   IMAGES += sysupgrade.bin
-  DEVICE_DTS := a4001n1
   CFE_BOARD_ID := 963281T_TEF
   CFE_CHIP_ID := 6328
   FLASH_MB := 16
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES) $(B43_PACKAGES)
 endef
-TARGET_DEVICES += A4001N1
+TARGET_DEVICES += adb_a4001n1
 
-define Device/AV4202N
+define Device/adb_av4202n
   $(Device/bcm63xx)
   DEVICE_VENDOR := ADB
   DEVICE_MODEL := P.DG AV4202N
   IMAGE_OFFSET := 0x20000
-  DEVICE_DTS := av4202n
   CFE_BOARD_ID := 96368_Swiss_S1
   CFE_CHIP_ID := 6368
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES) $(B43_PACKAGES)
 endef
-TARGET_DEVICES += AV4202N
+TARGET_DEVICES += adb_av4202n
 
 ### Alcatel ###
-define Device/RG100A
+define Device/alcatel_rg100a
   $(Device/bcm63xx)
   DEVICE_VENDOR := Alcatel
   DEVICE_MODEL := RG100A
-  DEVICE_DTS := rg100a
   CFE_BOARD_ID := 96358VW2
   CFE_CHIP_ID := 6358
   BLOCK_SIZE := 0x20000
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES) $(B43_PACKAGES)
 endef
-TARGET_DEVICES += RG100A
+TARGET_DEVICES += alcatel_rg100a
 
 ### Asmax ###
-define Device/AR1004G
+define Device/asmax_ar-1004g
   $(Device/bcm63xx)
   DEVICE_VENDOR := Asmax
   DEVICE_MODEL := AR 1004g
-  DEVICE_DTS := ar1004g
   CFE_BOARD_ID := 96348GW-10
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += AR1004G
+TARGET_DEVICES += asmax_ar-1004g
 
 ### Belkin ###
-define Device/F5D7633
+define Device/belkin_f5d7633
   $(Device/bcm63xx)
   DEVICE_VENDOR := Belkin
   DEVICE_MODEL := F5D7633
-  DEVICE_DTS := f5d7633
   CFE_BOARD_ID := 96348GW-10
   CFE_CHIP_ID := 6348
   BLOCK_SIZE := 0x20000
@@ -288,85 +268,79 @@ define Device/F5D7633
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += F5D7633
+TARGET_DEVICES += belkin_f5d7633
 
 ### Broadcom ###
-define Device/BCM96318REF
+define Device/brcm_bcm96318ref
   $(Device/bcm63xx)
   DEVICE_VENDOR := Broadcom
   DEVICE_MODEL := BCM96318REF reference board
   IMAGES :=
-  DEVICE_DTS := bcm96318ref
   CFE_BOARD_ID := 96318REF
   CFE_CHIP_ID := 6318
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES) \
     kmod-bcm63xx-udc
 endef
-TARGET_DEVICES += BCM96318REF
+TARGET_DEVICES += brcm_bcm96318ref
 
-define Device/BCM96318REF_P300
+define Device/brcm_bcm96318ref-p300
   $(Device/bcm63xx)
   DEVICE_VENDOR := Broadcom
   DEVICE_MODEL := BCM96318REF_P300 reference board
   IMAGES :=
-  DEVICE_DTS := bcm96318ref_p300
   CFE_BOARD_ID := 96318REF_P300
   CFE_CHIP_ID := 6318
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES) \
     kmod-bcm63xx-udc
 endef
-TARGET_DEVICES += BCM96318REF_P300
+TARGET_DEVICES += brcm_bcm96318ref-p300
 
-define Device/BCM963268BU_P300
+define Device/brcm_bcm963268bu-p300
   $(Device/bcm63xx)
   DEVICE_VENDOR := Broadcom
   DEVICE_MODEL := BCM963268BU_P300 reference board
   IMAGES :=
-  DEVICE_DTS := bcm963268bu_p300
   CFE_BOARD_ID := 963268BU_P300
   CFE_CHIP_ID := 63268
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES) \
     kmod-bcm63xx-udc
 endef
-TARGET_DEVICES += BCM963268BU_P300
+TARGET_DEVICES += brcm_bcm963268bu-p300
 
-define Device/BCM963269BHR
+define Device/brcm_bcm963269bhr
   $(Device/bcm63xx)
   DEVICE_VENDOR := Broadcom
   DEVICE_MODEL := BCM963269BHR reference board
   IMAGES :=
-  DEVICE_DTS := bcm963269bhr
   CFE_BOARD_ID := 963269BHR
   CFE_CHIP_ID := 63268
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES) \
     kmod-bcm63xx-udc
 endef
-TARGET_DEVICES += BCM963269BHR
+TARGET_DEVICES += brcm_bcm963269bhr
 
 ### BT ###
-define Device/HomeHub2A
+define Device/bt_home-hub-2-a
   $(Device/bcm63xx)
   DEVICE_VENDOR := BT
   DEVICE_MODEL := Home Hub 2.0
   DEVICE_VARIANT := A
-  DEVICE_DTS := homehub2a
   CFE_BOARD_ID := HOMEHUB2A
   CFE_CHIP_ID := 6358
   BLOCK_SIZE := 0x20000
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += HomeHub2A
+TARGET_DEVICES += bt_home-hub-2-a
 
-define Device/BTV2110
+define Device/bt_voyager-2110
   $(Device/bcm63xx)
   DEVICE_VENDOR := BT
-  DEVICE_MODEL := Voyager V2110
-  DEVICE_DTS := v2110
+  DEVICE_MODEL := Voyager 2110
   CFE_BOARD_ID := V2110
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --layoutver 5
@@ -374,13 +348,12 @@ define Device/BTV2110
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += BTV2110
+TARGET_DEVICES += bt_voyager-2110
 
-define Device/BTV2500V
+define Device/bt_voyager-2500v-bb
   $(Device/bcm63xx)
   DEVICE_VENDOR := BT
-  DEVICE_MODEL := Voyager V2500V
-  DEVICE_DTS := v2500v-bb
+  DEVICE_MODEL := Voyager 2500V
   CFE_BOARD_ID := V2500V_BB
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --layoutver 5
@@ -388,97 +361,90 @@ define Device/BTV2500V
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += BTV2500V
+TARGET_DEVICES += bt_voyager-2500v-bb
 
 ### Comtrend ###
-define Device/AR5315u
+define Device/comtrend_ar-5315u
   $(Device/bcm63xx)
   DEVICE_VENDOR := Comtrend
   DEVICE_MODEL := AR-5315u
   IMAGES += sysupgrade.bin
-  DEVICE_DTS := ar-5315u
   CFE_BOARD_ID := 96318A-1441N1
   CFE_CHIP_ID := 6318
   FLASH_MB := 16
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += AR5315u
+TARGET_DEVICES += comtrend_ar-5315u
 
-define Device/AR5381u
+define Device/comtrend_ar-5381u
   $(Device/bcm63xx)
   DEVICE_VENDOR := Comtrend
   DEVICE_MODEL := AR-5381u
   IMAGES += sysupgrade.bin
-  DEVICE_DTS := ar-5381u
   CFE_BOARD_ID := 96328A-1241N
   CFE_CHIP_ID := 6328
   FLASH_MB := 16
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += AR5381u
+TARGET_DEVICES += comtrend_ar-5381u
 
-define Device/AR5387un
+define Device/comtrend_ar-5387un
   $(Device/bcm63xx)
   DEVICE_VENDOR := Comtrend
   DEVICE_MODEL := AR-5387un
   IMAGES += sysupgrade.bin
-  DEVICE_DTS := ar-5387un
   CFE_BOARD_ID := 96328A-1441N1
   CFE_CHIP_ID := 6328
   FLASH_MB := 16
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += AR5387un
+TARGET_DEVICES += comtrend_ar-5387un
 
-define Device/CT-536_CT-5621
+define Device/comtrend_ct-536plus
   $(Device/bcm63xx)
   DEVICE_VENDOR := Comtrend
   DEVICE_MODEL := CT-536+
   DEVICE_ALT0_VENDOR := Comtrend
   DEVICE_ALT0_MODEL := CT-5621
-  DEVICE_DTS := ct536plus
   CFE_BOARD_ID := 96348GW-11
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += CT-536_CT-5621
+TARGET_DEVICES += comtrend_ct-536plus
 
-define Device/CT-5365
+define Device/comtrend_ct-5365
   $(Device/bcm63xx)
   DEVICE_VENDOR := Comtrend
   DEVICE_MODEL := CT-5365
-  DEVICE_DTS := ct-5365
   CFE_BOARD_ID := 96348A-122
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += CT-5365
+TARGET_DEVICES += comtrend_ct-5365
 
-define Device/CT-6373
+define Device/comtrend_ct-6373
   $(Device/bcm63xx)
   DEVICE_VENDOR := Comtrend
   DEVICE_MODEL := CT-6373
-  DEVICE_DTS := ct-6373
   CFE_BOARD_ID := CT6373-1
   CFE_CHIP_ID := 6358
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += CT-6373
+TARGET_DEVICES += comtrend_ct-6373
 
-define Device/VR-3025u
+define Device/comtrend_vr-3025u
   $(Device/bcm63xx)
   DEVICE_VENDOR := Comtrend
   DEVICE_MODEL := VR-3025u
   IMAGES += sysupgrade.bin
-  DEVICE_DTS := vr-3025u
   CFE_BOARD_ID := 96368M-1541N
   CFE_CHIP_ID := 6368
   BLOCK_SIZE := 0x20000
@@ -486,91 +452,85 @@ define Device/VR-3025u
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += VR-3025u
+TARGET_DEVICES += comtrend_vr-3025u
 
-define Device/VR-3025un
+define Device/comtrend_vr-3025un
   $(Device/bcm63xx)
   DEVICE_VENDOR := Comtrend
   DEVICE_MODEL := VR-3025un
-  DEVICE_DTS := vr-3025un
   CFE_BOARD_ID := 96368M-1341N
   CFE_CHIP_ID := 6368
   FLASH_MB := 8
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += VR-3025un
+TARGET_DEVICES += comtrend_vr-3025un
 
-define Device/VR-3026e
+define Device/comtrend_vr-3026e
   $(Device/bcm63xx)
   DEVICE_VENDOR := Comtrend
   DEVICE_MODEL := VR-3026e
-  DEVICE_DTS := vr-3026e
   CFE_BOARD_ID := 96368MT-1341N1
   CFE_CHIP_ID := 6368
   FLASH_MB := 8
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
 endef
-TARGET_DEVICES += VR-3026e
+TARGET_DEVICES += comtrend_vr-3026e
 
-define Device/WAP-5813n
+define Device/comtrend_wap-5813n
   $(Device/bcm63xx)
   DEVICE_VENDOR := Comtrend
   DEVICE_MODEL := WAP-5813n
-  DEVICE_DTS := wap-5813n
   CFE_BOARD_ID := 96369R-1231N
   CFE_CHIP_ID := 6368
   FLASH_MB := 8
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += WAP-5813n
+TARGET_DEVICES += comtrend_wap-5813n
 
 ### D-Link ###
-define Device/DSL2640B-B
+define Device/d-link_dsl-2640b-b
   $(Device/bcm63xx)
   DEVICE_VENDOR := D-Link
   DEVICE_MODEL := DSL-2640B
   DEVICE_VARIANT := B2
-  DEVICE_DTS := dsl-2640b-b
   CFE_BOARD_ID := D-4P-W
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += DSL2640B-B
+TARGET_DEVICES += d-link_dsl-2640b-b
 
-define Device/DSL2640U
+define Device/d-link_dsl-2640u
   $(Device/bcm63xx)
   DEVICE_VENDOR := D-Link
   DEVICE_MODEL := DSL-2640U
   DEVICE_VARIANT := C1
   DEVICE_ALT0_VENDOR := D-Link
   DEVICE_ALT0_MODEL := DSL-2640U/BRU/C
-  DEVICE_DTS := dsl-2640u
   CFE_BOARD_ID := 96338W2_E7T
   CFE_CHIP_ID := 6338
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += DSL2640U
+TARGET_DEVICES += d-link_dsl-2640u
 
-define Device/DSL2650U
+define Device/d-link_dsl-2650u
   $(Device/bcm63xx)
   DEVICE_VENDOR := D-Link
   DEVICE_MODEL := DSL-2650U
-  DEVICE_DTS := dsl-2650u
   CFE_BOARD_ID := 96358VW2
   CFE_CHIP_ID := 6358
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += DSL2650U
+TARGET_DEVICES += d-link_dsl-2650u
 
-define Device/DSL274XB-C2
+define Device/d-link_dsl-274xb-c2
   $(Device/bcm63xx)
   DEVICE_VENDOR := D-Link
   DEVICE_MODEL := DSL-2740B
@@ -578,15 +538,14 @@ define Device/DSL274XB-C2
   DEVICE_ALT0_VENDOR := D-Link
   DEVICE_ALT0_MODEL := DSL-2741B
   DEVICE_ALT0_VARIANT := C2
-  DEVICE_DTS := dsl-274xb-c
   CFE_BOARD_ID := 96358GW
   CFE_CHIP_ID := 6358
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
 endef
-TARGET_DEVICES += DSL274XB-C2
+TARGET_DEVICES += d-link_dsl-274xb-c2
 
-define Device/DSL274XB-C3
+define Device/d-link_dsl-274xb-c3
   $(Device/bcm63xx)
   DEVICE_VENDOR := D-Link
   DEVICE_MODEL := DSL-2740B
@@ -594,15 +553,15 @@ define Device/DSL274XB-C3
   DEVICE_ALT0_VENDOR := D-Link
   DEVICE_ALT0_MODEL := DSL-2741B
   DEVICE_ALT0_VARIANT := C3
-  DEVICE_DTS := dsl-274xb-c
+  DEVICE_DTS := bcm6358_d-link_dsl-274xb-c2
   CFE_BOARD_ID := AW4139
   CFE_CHIP_ID := 6358
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
 endef
-TARGET_DEVICES += DSL274XB-C3
+TARGET_DEVICES += d-link_dsl-274xb-c3
 
-define Device/DSL274XB-F1
+define Device/d-link_dsl-274xb-f1
   $(Device/bcm63xx)
   DEVICE_VENDOR := D-Link
   DEVICE_MODEL := DSL-2740B
@@ -610,7 +569,6 @@ define Device/DSL274XB-F1
   DEVICE_ALT0_VENDOR := D-Link
   DEVICE_ALT0_MODEL := DSL-2741B
   DEVICE_ALT0_VARIANT := F1
-  DEVICE_DTS := dsl-274xb-f
   CFE_BOARD_ID := AW4339U
   CFE_CHIP_ID := 6328
   IMAGES := cfe-EU.bin cfe-AU.bin
@@ -619,9 +577,9 @@ define Device/DSL274XB-F1
   DEVICE_PACKAGES := \
     $(ATH9K_PACKAGES)
 endef
-TARGET_DEVICES += DSL274XB-F1
+TARGET_DEVICES += d-link_dsl-274xb-f1
 
-define Device/DSL275XB-D1
+define Device/d-link_dsl-275xb-d1
   $(Device/bcm63xx)
   DEVICE_VENDOR := D-Link
   DEVICE_MODEL := DSL-2750B
@@ -629,51 +587,47 @@ define Device/DSL275XB-D1
   DEVICE_ALT0_VENDOR := D-Link
   DEVICE_ALT0_MODEL := DSL-2751
   DEVICE_ALT0_VARIANT := D1
-  DEVICE_DTS := dsl-275xb-d
   CFE_BOARD_ID := AW5200B
   CFE_CHIP_ID := 6318
   FLASH_MB := 8
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += DSL275XB-D1
+TARGET_DEVICES += d-link_dsl-275xb-d1
 
-define Device/DVAG3810BN
+define Device/d-link_dva-g3810bn-tl
   $(Device/bcm63xx)
   DEVICE_VENDOR := D-Link
   DEVICE_MODEL := DVA-G3810BN/TL
-  DEVICE_DTS := dva-g3810bn_tl
   CFE_BOARD_ID := 96358VW
   CFE_CHIP_ID := 6358
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += DVAG3810BN
+TARGET_DEVICES += d-link_dva-g3810bn-tl
 
 ### Davolink ###
-define Device/DV-201AMR
+define Device/davolink_dv-201amr
   $(Device/bcm63xx)
   DEVICE_VENDOR := Davolink
   DEVICE_MODEL := DV-201AMR
   IMAGES := cfe-old.bin
-  DEVICE_DTS := dv-201amr
   CFE_BOARD_ID := DV201AMR
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += DV-201AMR
+TARGET_DEVICES += davolink_dv-201amr
 
 ### Dynalink ###
-define Device/RTA770BW
+define Device/dynalink_rta770bw
   $(Device/bcm63xx)
   DEVICE_VENDOR := Dynalink
   DEVICE_MODEL := RTA770BW
   DEVICE_ALT0_VENDOR := Siemens
   DEVICE_ALT0_MODEL := SE515
   IMAGES =
-  DEVICE_DTS := rta770bw
   CFE_BOARD_ID := RTA770BW
   CFE_CHIP_ID := 6345
   CFE_EXTRAS += --layoutver 5
@@ -681,14 +635,13 @@ define Device/RTA770BW
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += RTA770BW
+TARGET_DEVICES += dynalink_rta770bw
 
-define Device/RTA770W
+define Device/dynalink_rta770w
   $(Device/bcm63xx)
   DEVICE_VENDOR := Dynalink
   DEVICE_MODEL := RTA770W
   IMAGES =
-  DEVICE_DTS := rta770w
   CFE_BOARD_ID := RTA770W
   CFE_CHIP_ID := 6345
   CFE_EXTRAS += --layoutver 5
@@ -696,13 +649,12 @@ define Device/RTA770W
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += RTA770W
+TARGET_DEVICES += dynalink_rta770w
 
-define Device/RTA1025W_16
+define Device/dynalink_rta1025w
   $(Device/bcm63xx)
   DEVICE_VENDOR := Dynalink
   DEVICE_MODEL := RTA1025W
-  DEVICE_DTS := rta1025w
   CFE_BOARD_ID := RTA1025W_16
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --layoutver 5
@@ -710,39 +662,36 @@ define Device/RTA1025W_16
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += RTA1025W_16
+TARGET_DEVICES += dynalink_rta1025w
 
-define Device/RTA1320_16M
+define Device/dynalink_rta1320
   $(Device/bcm63xx)
   DEVICE_VENDOR := Dynalink
   DEVICE_MODEL := RTA1320
-  DEVICE_DTS := rta1320
   CFE_BOARD_ID := RTA1320_16M
   CFE_CHIP_ID := 6338
   CFE_EXTRAS += --layoutver 5
   DEFAULT := n
 endef
-TARGET_DEVICES += RTA1320_16M
+TARGET_DEVICES += dynalink_rta1320
 
 ### Huawei ###
-define Device/HG520v
+define Device/huawei_echolife-hg520v
   $(Device/bcm63xx)
   DEVICE_VENDOR := Huawei
   DEVICE_MODEL := EchoLife HG520v
-  DEVICE_DTS := hg520v
   CFE_BOARD_ID := HW6358GW_B
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "EchoLife_HG520v"
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
 endef
-TARGET_DEVICES += HG520v
+TARGET_DEVICES += huawei_echolife-hg520v
 
-define Device/HG553
+define Device/huawei_echolife-hg553
   $(Device/bcm63xx)
   DEVICE_VENDOR := Huawei
   DEVICE_MODEL := EchoLife HG553
-  DEVICE_DTS := hg553
   CFE_BOARD_ID := HW553
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "EchoLife_HG553" --tag-version 7
@@ -750,15 +699,14 @@ define Device/HG553
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += HG553
+TARGET_DEVICES += huawei_echolife-hg553
 
-define Device/HG556a-A
+define Device/huawei_echolife-hg556a-a
   $(Device/bcm63xx)
   DEVICE_VENDOR := Huawei
   DEVICE_MODEL := EchoLife HG556a
   DEVICE_VARIANT := A
   DEVICE_DESCRIPTION = Build firmware images for Huawei HG556a version A (Atheros)
-  DEVICE_DTS := hg556a-a
   CFE_BOARD_ID := HW556
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "EchoLife_HG556a" --tag-version 8
@@ -766,15 +714,14 @@ define Device/HG556a-A
   DEVICE_PACKAGES := \
     $(ATH9K_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += HG556a-A
+TARGET_DEVICES += huawei_echolife-hg556a-a
 
-define Device/HG556a-B
+define Device/huawei_echolife-hg556a-b
   $(Device/bcm63xx)
   DEVICE_VENDOR := Huawei
   DEVICE_MODEL := EchoLife HG556a
   DEVICE_VARIANT := B
   DEVICE_DESCRIPTION = Build firmware images for Huawei HG556a version B (Atheros)
-  DEVICE_DTS := hg556a-b
   CFE_BOARD_ID := HW556
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "EchoLife_HG556a" --tag-version 8
@@ -782,15 +729,14 @@ define Device/HG556a-B
   DEVICE_PACKAGES := \
     $(ATH9K_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += HG556a-B
+TARGET_DEVICES += huawei_echolife-hg556a-b
 
-define Device/HG556a-C
+define Device/huawei_echolife-hg556a-c
   $(Device/bcm63xx)
   DEVICE_VENDOR := Huawei
   DEVICE_MODEL := EchoLife HG556a
   DEVICE_VARIANT := C
   DEVICE_DESCRIPTION = Build firmware images for Huawei HG556a version C (Ralink)
-  DEVICE_DTS := hg556a-c
   CFE_BOARD_ID := HW556
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "EchoLife_HG556a" --tag-version 8
@@ -798,14 +744,13 @@ define Device/HG556a-C
   DEVICE_PACKAGES := \
     $(RT28_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += HG556a-C
+TARGET_DEVICES += huawei_echolife-hg556a-c
 
-define Device/HG622
+define Device/huawei_echolife-hg622
   $(Device/bcm63xx)
   DEVICE_VENDOR := Huawei
   DEVICE_MODEL := EchoLife HG622
   IMAGES += sysupgrade.bin
-  DEVICE_DTS := hg622
   CFE_BOARD_ID := 96368MVWG_hg622
   CFE_CHIP_ID := 6368
   CFE_EXTRAS += --tag-version 7
@@ -814,13 +759,12 @@ define Device/HG622
   DEVICE_PACKAGES := \
     $(RT28_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += HG622
+TARGET_DEVICES += huawei_echolife-hg622
 
-define Device/HG655b
+define Device/huawei_echolife-hg655b
   $(Device/bcm63xx)
   DEVICE_VENDOR := Huawei
   DEVICE_MODEL := EchoLife HG655b
-  DEVICE_DTS := hg655b
   CFE_BOARD_ID := HW65x
   CFE_CHIP_ID := 6368
   CFE_EXTRAS += --tag-version 7
@@ -829,81 +773,77 @@ define Device/HG655b
   DEVICE_PACKAGES := \
     $(RT28_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += HG655b
+TARGET_DEVICES += huawei_echolife-hg655b
 
 ### Inteno ###
-define Device/VG50
+define Device/inteno_vg50
   $(Device/bcm63xx)
   DEVICE_VENDOR := Inteno
   DEVICE_MODEL := VG50 Multi-WAN CPE
   IMAGES :=
-  DEVICE_DTS := vg50
   CFE_BOARD_ID := VW6339GU
   CFE_CHIP_ID := 63268
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += VG50
+TARGET_DEVICES += inteno_vg50
 
 ### Inventel ###
-define Device/livebox
+define Device/inventel_livebox-1
   $(Device/bcm63xx_redboot)
   DEVICE_VENDOR := Inventel
   DEVICE_MODEL := Livebox 1
-  DEVICE_DTS := livebox-blue-5g
+  SOC := bcm6348
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB1_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += livebox
+TARGET_DEVICES += inventel_livebox-1
 
 ### Netgear ###
-define Device/CVG834G
+define Device/netgear_cvg834g
   $(Device/bcm33xx)
   DEVICE_VENDOR := NETGEAR
   DEVICE_MODEL := CVG834G
-  DEVICE_DTS := cvg834g
+  SOC := bcm3368
   HCS_MAGIC_BYTES := 0xa020
   HCS_REV_MIN := 0001
   HCS_REV_MAJ := 0022
 endef
-TARGET_DEVICES += CVG834G
+TARGET_DEVICES += netgear_cvg834g
 
-define Device/DG834GT_PN
+define Device/netgear_dg834gt-pn
   $(Device/bcm63xx)
   DEVICE_VENDOR := NETGEAR
   DEVICE_MODEL := DG834GT
   DEVICE_ALT0_VENDOR := NETGEAR
   DEVICE_ALT0_MODEL := DG834PN
-  DEVICE_DTS := dg834gtpn
   CFE_BOARD_ID := 96348GW-10
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(ATH5K_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += DG834GT_PN
+TARGET_DEVICES += netgear_dg834gt-pn
 
-define Device/DG834GTv4
+define Device/netgear_dg834g-v4
   $(Device/bcm63xx)
   DEVICE_VENDOR := NETGEAR
   DEVICE_MODEL := DG834G
   DEVICE_VARIANT := v4
   IMAGES :=
-  DEVICE_DTS := dg834g_v4
   CFE_BOARD_ID := 96348W3
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += DG834GTv4
+TARGET_DEVICES += netgear_dg834g-v4
 
-define Device/DGND3700v1
+define Device/netgear_dgnd3700-v1
   $(Device/bcm63xx_netgear)
   DEVICE_MODEL := DGND3700
   DEVICE_VARIANT := v1
-  DEVICE_DTS := dgnd3700v1
   CFE_BOARD_ID := 96368MVWG
   CFE_CHIP_ID := 6368
   BLOCK_SIZE := 0x20000
@@ -912,12 +852,12 @@ define Device/DGND3700v1
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += DGND3700v1
+TARGET_DEVICES += netgear_dgnd3700-v1
 
-define Device/DGND3800B
+define Device/netgear_dgnd3800b
   $(Device/bcm63xx_netgear)
   DEVICE_MODEL := DGND3800B
-  DEVICE_DTS := dgnd3700v1
+  DEVICE_DTS := bcm6368_netgear_dgnd3700-v1
   CFE_BOARD_ID := 96368MVWG
   CFE_CHIP_ID := 6368
   BLOCK_SIZE := 0x20000
@@ -926,12 +866,11 @@ define Device/DGND3800B
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += DGND3800B
+TARGET_DEVICES += netgear_dgnd3800b
 
-define Device/EVG2000
+define Device/netgear_evg2000
   $(Device/bcm63xx_netgear)
   DEVICE_MODEL := EVG2000
-  DEVICE_DTS := evg2000
   CFE_BOARD_ID := 96369PVG
   CFE_CHIP_ID := 6368
   BLOCK_SIZE := 0x20000
@@ -940,31 +879,29 @@ define Device/EVG2000
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += EVG2000
+TARGET_DEVICES += netgear_evg2000
 
 ### NuCom ###
-define Device/R5010UNv2
+define Device/nucom_r5010un-v2
   $(Device/bcm63xx)
   DEVICE_VENDOR := NuCom
   DEVICE_MODEL := R5010UN
   DEVICE_VARIANT := v2
   IMAGES += sysupgrade.bin
-  DEVICE_DTS := r5010unv2
   CFE_BOARD_ID := 96328ang
   CFE_CHIP_ID := 6328
   FLASH_MB := 16
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
 endef
-TARGET_DEVICES += R5010UNv2
+TARGET_DEVICES += nucom_r5010un-v2
 
 ### Observa ###
-define Device/VH4032N
+define Device/observa_vh4032n
   $(Device/bcm63xx)
   DEVICE_VENDOR := Observa
   DEVICE_MODEL := VH4032N
   IMAGES += sysupgrade.bin
-  DEVICE_DTS := vh4032n
   CFE_BOARD_ID := 96368VVW
   CFE_CHIP_ID := 6368
   BLOCK_SIZE := 0x20000
@@ -972,40 +909,37 @@ define Device/VH4032N
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += VH4032N
+TARGET_DEVICES += observa_vh4032n
 
 ### Pirelli ###
-define Device/A226G
+define Device/pirelli_a226g
   $(Device/bcm63xx)
   DEVICE_VENDOR := Pirelli
   DEVICE_MODEL := A226G
-  DEVICE_DTS := a226g
   CFE_BOARD_ID := DWV-S0
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --signature2 IMAGE --tag-version 8
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += A226G
+TARGET_DEVICES += pirelli_a226g
 
-define Device/A226M
+define Device/pirelli_a226m
   $(Device/bcm63xx)
   DEVICE_VENDOR := Pirelli
   DEVICE_MODEL := A226M
-  DEVICE_DTS := a226m
   CFE_BOARD_ID := DWV-S0
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --signature2 IMAGE --tag-version 8
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += A226M
+TARGET_DEVICES += pirelli_a226m
 
-define Device/A226M-FWB
+define Device/pirelli_a226m-fwb
   $(Device/bcm63xx)
   DEVICE_VENDOR := Pirelli
   DEVICE_MODEL := A226M-FWB
-  DEVICE_DTS := a226m-fwb
   CFE_BOARD_ID := DWV-S0
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --signature2 IMAGE --tag-version 8
@@ -1013,13 +947,12 @@ define Device/A226M-FWB
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += A226M-FWB
+TARGET_DEVICES += pirelli_a226m-fwb
 
-define Device/AGPF-S0
+define Device/pirelli_agpf-s0
   $(Device/bcm63xx)
   DEVICE_VENDOR := Pirelli
   DEVICE_MODEL := Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
-  DEVICE_DTS := agpf-s0
   CFE_BOARD_ID := AGPF-S0
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --signature2 IMAGE --tag-version 8
@@ -1027,203 +960,189 @@ define Device/AGPF-S0
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += AGPF-S0
+TARGET_DEVICES += pirelli_agpf-s0
 
 ### Sagem ###
-define Device/FAST2404
+define Device/sagem_fast-2404
   $(Device/bcm63xx)
   DEVICE_VENDOR := Sagemcom
   DEVICE_MODEL := F at st 2404
-  DEVICE_DTS := fast2404
   CFE_BOARD_ID := F at ST2404
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += FAST2404
+TARGET_DEVICES += sagem_fast-2404
 
-define Device/FAST2504n
+define Device/sagem_fast-2504n
   $(Device/bcm63xx)
   DEVICE_VENDOR := Sagemcom
   DEVICE_MODEL := F at st 2504N
-  DEVICE_DTS := fast2504n
   CFE_BOARD_ID := F at ST2504n
   CFE_CHIP_ID := 6362
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
 endef
-TARGET_DEVICES += FAST2504n
+TARGET_DEVICES += sagem_fast-2504n
 
-define Device/FAST2604
+define Device/sagem_fast-2604
   $(Device/bcm63xx)
   DEVICE_VENDOR := Sagemcom
   DEVICE_MODEL := F at st 2604
-  DEVICE_DTS := fast2604
   CFE_BOARD_ID := F at ST2604
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += FAST2604
+TARGET_DEVICES += sagem_fast-2604
 
-define Device/FAST2704N
+define Device/sagem_fast-2704n
   $(Device/bcm63xx)
   DEVICE_VENDOR := Sagemcom
   DEVICE_MODEL := F at st 2704N
-  DEVICE_DTS := fast2704n
   CFE_BOARD_ID := F at ST2704N
   CFE_CHIP_ID := 6318
   FLASH_MB := 8
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += FAST2704N
+TARGET_DEVICES += sagem_fast-2704n
 
-define Device/FAST2704V2
+define Device/sagem_fast-2704-v2
   $(Device/bcm63xx)
   DEVICE_VENDOR := Sagemcom
-  DEVICE_MODEL := F at st 2704 V2
-  DEVICE_DTS := fast2704v2
+  DEVICE_MODEL := F at st 2704
+  DEVICE_VARIANT := V2
   CFE_BOARD_ID := F at ST2704V2
   CFE_CHIP_ID := 6328
   FLASH_MB := 8
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += FAST2704V2
+TARGET_DEVICES += sagem_fast-2704-v2
 
 ### Sercomm ###
-define Device/AD1018-SPI_flash
+define Device/sercomm_ad1018-nor
   $(Device/bcm63xx)
   DEVICE_VENDOR := Sercomm
   DEVICE_MODEL := AD1018
   DEVICE_VARIANT := SPI flash mod
-  DEVICE_DTS := ad1018-nor
   CFE_BOARD_ID := 96328avngr
   CFE_CHIP_ID := 6328
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += AD1018-SPI_flash
+TARGET_DEVICES += sercomm_ad1018-nor
 
 ### SFR ###
-define Device/NEUFBOX4-SER
+define Device/sfr_neufbox-4-sercomm-r0
   $(Device/bcm63xx)
   DEVICE_VENDOR := SFR
   DEVICE_MODEL := Neufbox4
   DEVICE_VARIANT := Sercomm
-  DEVICE_DTS := nb4-ser-r0
   CFE_BOARD_ID := 96358VW
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))"
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += NEUFBOX4-SER
+TARGET_DEVICES += sfr_neufbox-4-sercomm-r0
 
-define Device/NEUFBOX4-FXC
+define Device/sfr_neufbox-4-foxconn-r1
   $(Device/bcm63xx)
   DEVICE_VENDOR := SFR
   DEVICE_MODEL := Neufbox4
   DEVICE_VARIANT := Foxconn
-  DEVICE_DTS := nb4-fxc-r1
   CFE_BOARD_ID := 96358VW
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))"
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += NEUFBOX4-FXC
+TARGET_DEVICES += sfr_neufbox-4-foxconn-r1
 
-define Device/NEUFBOX6
+define Device/sfr_neufbox-6-sercomm-r0
   $(Device/bcm63xx)
   DEVICE_VENDOR := SFR
   DEVICE_MODEL := Neufbox6
-  DEVICE_DTS := nb6-ser-r0
   CFE_BOARD_ID := NB6-SER-r0
   CFE_CHIP_ID := 6362
   CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))"
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += NEUFBOX6
+TARGET_DEVICES += sfr_neufbox-6-sercomm-r0
 
-define Device/SR102
+define Device/sky_sr102
   $(Device/bcm63xx)
   DEVICE_VENDOR := SKY
   DEVICE_MODEL := SR102
-  DEVICE_DTS := sr102
   CFE_BOARD_ID := BSKYB_63168
   CFE_CHIP_ID := 63268
   CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))"
   DEVICE_PACKAGES := \
     $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += SR102
+TARGET_DEVICES += sky_sr102
 
 ### T-Com ###
-define Device/SPW303V
+define Device/t-com_speedport-w-303v
   $(Device/bcm63xx)
   DEVICE_VENDOR := T-Com
   DEVICE_MODEL := Speedport W 303V
   IMAGES := factory.bin sysupgrade.bin
   IMAGE/factory.bin := cfe-spw303v-bin --pad 4 | spw303v-bin | xor-image
   IMAGE/sysupgrade.bin := cfe-spw303v-bin | spw303v-bin
-  DEVICE_DTS := spw303v
   CFE_BOARD_ID := 96358-502V
   CFE_CHIP_ID := 6358
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
 endef
-TARGET_DEVICES += SPW303V
+TARGET_DEVICES += t-com_speedport-w-303v
 
-define Device/SPW500V
+define Device/t-com_speedport-w-500v
   $(Device/bcm63xx)
   DEVICE_VENDOR := T-Com
   DEVICE_MODEL := Speedport W 500V
-  DEVICE_DTS := spw500v
   CFE_BOARD_ID := 96348GW
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += SPW500V
+TARGET_DEVICES += t-com_speedport-w-500v
 
 ### Tecom ###
-define Device/GW6000
+define Device/tecom_gw6000
   $(Device/bcm63xx)
   DEVICE_VENDOR := Tecom
   DEVICE_MODEL := GW6000
-  DEVICE_DTS := gw6000
   CFE_BOARD_ID := 96348GW
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(BRCMWL_PACKAGES) $(USB1_PACKAGES)
 endef
-TARGET_DEVICES += GW6000
+TARGET_DEVICES += tecom_gw6000
 
-define Device/GW6200
+define Device/tecom_gw6200
   $(Device/bcm63xx)
   DEVICE_VENDOR := Tecom
   DEVICE_MODEL := GW6200
-  DEVICE_DTS := gw6200
   CFE_BOARD_ID := 96348GW
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --rsa-signature "$(shell printf '\x99')"
   DEVICE_PACKAGES := \
     $(BRCMWL_PACKAGES) $(USB1_PACKAGES)
 endef
-TARGET_DEVICES += GW6200
+TARGET_DEVICES += tecom_gw6200
 
 ### Telsey ###
-define Device/CPVA502PLUS
+define Device/telsey_cpva502plus
   $(Device/bcm63xx)
   DEVICE_VENDOR := Telsey
   DEVICE_MODEL := CPVA502+
-  DEVICE_DTS := cpva502plus
   CFE_BOARD_ID := CPVA502+
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --signature "Telsey Tlc" --signature2 "99.99.999"
@@ -1231,13 +1150,12 @@ define Device/CPVA502PLUS
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += CPVA502PLUS
+TARGET_DEVICES += telsey_cpva502plus
 
-define Device/CPA-ZNTE60T
+define Device/telsey_cpva642
   $(Device/bcm63xx)
   DEVICE_VENDOR := Telsey
   DEVICE_MODEL := CPVA642-type (CPA-ZNTE60T)
-  DEVICE_DTS := cpva642
   CFE_BOARD_ID := CPVA642
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --signature "Telsey Tlc" --signature2 "99.99.999" --second-image-flag "0"
@@ -1245,30 +1163,28 @@ define Device/CPA-ZNTE60T
   DEVICE_PACKAGES := \
     $(RT63_PACKAGES) $(USB2_PACKAGES)
 endef
-TARGET_DEVICES += CPA-ZNTE60T
+TARGET_DEVICES += telsey_cpva642
 
-define Device/MAGIC
+define Device/telsey_magic
   $(Device/bcm63xx)
   DEVICE_VENDOR := Alice
   DEVICE_MODEL := W-Gate
   DEVICE_ALT0_VENDOR := Telsey
   DEVICE_ALT0_MODEL := MAGIC
   IMAGES :=
-  DEVICE_DTS := magic
   CFE_BOARD_ID := MAGIC
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(RT63_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += MAGIC
+TARGET_DEVICES += telsey_magic
 
 ### TP-Link ###
-define Device/TD-W8900GB
+define Device/tp-link_td-w8900gb
   $(Device/bcm63xx)
   DEVICE_VENDOR := TP-Link
   DEVICE_MODEL := TD-W8900GB
-  DEVICE_DTS := td-w8900gb
   CFE_BOARD_ID := 96348GW-11
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --rsa-signature "$(shell printf 'PRID\x89\x10\x00\x02')"
@@ -1277,35 +1193,33 @@ define Device/TD-W8900GB
     $(B43_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += TD-W8900GB
+TARGET_DEVICES += tp-link_td-w8900gb
 
 ### USRobotics ###
-define Device/USR9108
+define Device/usrobotics_usr9108
   $(Device/bcm63xx)
   DEVICE_VENDOR := USRobotics
   DEVICE_MODEL := 9108
-  DEVICE_DTS := usr9108
   CFE_BOARD_ID := 96348GW-A
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := \
     $(B43_PACKAGES) $(USB1_PACKAGES)
   DEFAULT := n
 endef
-TARGET_DEVICES += USR9108
+TARGET_DEVICES += usrobotics_usr9108
 
 ### ZyXEL ###
-define Device/P870HW-51a_v2
+define Device/zyxel_p870hw-51a-v2
   $(Device/bcm63xx)
   DEVICE_VENDOR := ZyXEL
   DEVICE_MODEL := P870HW-51a
   DEVICE_VARIANT := v2
   IMAGES := factory.bin
   IMAGE/factory.bin := cfe-bin | zyxel-bin
-  DEVICE_DTS := p870hw-51a-v2
   CFE_BOARD_ID := 96368VVW
   CFE_CHIP_ID := 6368
   CFE_EXTRAS += --rsa-signature "ZyXEL" --signature "ZyXEL_0001"
   DEVICE_PACKAGES := \
     $(B43_PACKAGES)
 endef
-TARGET_DEVICES += P870HW-51a_v2
+TARGET_DEVICES += zyxel_p870hw-51a-v2
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Mon Dec 30 18:27:45 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 31 Dec 2019 00:27:45 +0100
Subject: [OpenWrt-Devel] [PATCH 2/4] brcm63xx: remove unneeded line break
 for DEVICE_PACKAGES
In-Reply-To: <20191230232747.5357-1-freifunk@adrianschmutzler.de>
References: <20191230232747.5357-1-freifunk@adrianschmutzler.de>
Message-ID: <20191230232747.5357-3-freifunk@adrianschmutzler.de>

In brcm63xx image Makefile DEVICE_PACKAGE definitions are split
into multiple lines with no apparent need.

Merge them into one line to increase readability and maintainability.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/brcm63xx/image/bcm63xx.mk | 232 ++++++++-----------------
 1 file changed, 76 insertions(+), 156 deletions(-)

diff --git a/target/linux/brcm63xx/image/bcm63xx.mk b/target/linux/brcm63xx/image/bcm63xx.mk
index aa68befc13..8c58c25617 100644
--- a/target/linux/brcm63xx/image/bcm63xx.mk
+++ b/target/linux/brcm63xx/image/bcm63xx.mk
@@ -187,8 +187,7 @@ define Device/actiontec_r1000h
   CFE_CHIP_ID := 6368
   FLASH_MB := 32
   IMAGE_OFFSET := 0x20000
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES) $(BRCMWL_PACKAGES)
+  DEVICE_PACKAGES := $(USB2_PACKAGES) $(BRCMWL_PACKAGES)
 endef
 TARGET_DEVICES += actiontec_r1000h
 
@@ -200,8 +199,7 @@ define Device/adb_a4001n
   CFE_BOARD_ID := 96328dg2x2
   CFE_CHIP_ID := 6328
   FLASH_MB := 8
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES) $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(USB2_PACKAGES) $(B43_PACKAGES)
 endef
 TARGET_DEVICES += adb_a4001n
 
@@ -213,8 +211,7 @@ define Device/adb_a4001n1
   CFE_BOARD_ID := 963281T_TEF
   CFE_CHIP_ID := 6328
   FLASH_MB := 16
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES) $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(USB2_PACKAGES) $(B43_PACKAGES)
 endef
 TARGET_DEVICES += adb_a4001n1
 
@@ -225,8 +222,7 @@ define Device/adb_av4202n
   IMAGE_OFFSET := 0x20000
   CFE_BOARD_ID := 96368_Swiss_S1
   CFE_CHIP_ID := 6368
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES) $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(USB2_PACKAGES) $(B43_PACKAGES)
 endef
 TARGET_DEVICES += adb_av4202n
 
@@ -238,8 +234,7 @@ define Device/alcatel_rg100a
   CFE_BOARD_ID := 96358VW2
   CFE_CHIP_ID := 6358
   BLOCK_SIZE := 0x20000
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES) $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(USB2_PACKAGES) $(B43_PACKAGES)
 endef
 TARGET_DEVICES += alcatel_rg100a
 
@@ -250,8 +245,7 @@ define Device/asmax_ar-1004g
   DEVICE_MODEL := AR 1004g
   CFE_BOARD_ID := 96348GW-10
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += asmax_ar-1004g
@@ -264,8 +258,7 @@ define Device/belkin_f5d7633
   CFE_BOARD_ID := 96348GW-10
   CFE_CHIP_ID := 6348
   BLOCK_SIZE := 0x20000
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += belkin_f5d7633
@@ -278,9 +271,7 @@ define Device/brcm_bcm96318ref
   IMAGES :=
   CFE_BOARD_ID := 96318REF
   CFE_CHIP_ID := 6318
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES) \
-    kmod-bcm63xx-udc
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES) kmod-bcm63xx-udc
 endef
 TARGET_DEVICES += brcm_bcm96318ref
 
@@ -291,9 +282,7 @@ define Device/brcm_bcm96318ref-p300
   IMAGES :=
   CFE_BOARD_ID := 96318REF_P300
   CFE_CHIP_ID := 6318
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES) \
-    kmod-bcm63xx-udc
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES) kmod-bcm63xx-udc
 endef
 TARGET_DEVICES += brcm_bcm96318ref-p300
 
@@ -304,9 +293,7 @@ define Device/brcm_bcm963268bu-p300
   IMAGES :=
   CFE_BOARD_ID := 963268BU_P300
   CFE_CHIP_ID := 63268
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES) \
-    kmod-bcm63xx-udc
+  DEVICE_PACKAGES := $(USB2_PACKAGES) kmod-bcm63xx-udc
 endef
 TARGET_DEVICES += brcm_bcm963268bu-p300
 
@@ -317,9 +304,7 @@ define Device/brcm_bcm963269bhr
   IMAGES :=
   CFE_BOARD_ID := 963269BHR
   CFE_CHIP_ID := 63268
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES) \
-    kmod-bcm63xx-udc
+  DEVICE_PACKAGES := $(USB2_PACKAGES) kmod-bcm63xx-udc
 endef
 TARGET_DEVICES += brcm_bcm963269bhr
 
@@ -332,8 +317,7 @@ define Device/bt_home-hub-2-a
   CFE_BOARD_ID := HOMEHUB2A
   CFE_CHIP_ID := 6358
   BLOCK_SIZE := 0x20000
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += bt_home-hub-2-a
 
@@ -344,8 +328,7 @@ define Device/bt_voyager-2110
   CFE_BOARD_ID := V2110
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --layoutver 5
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += bt_voyager-2110
@@ -357,8 +340,7 @@ define Device/bt_voyager-2500v-bb
   CFE_BOARD_ID := V2500V_BB
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --layoutver 5
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += bt_voyager-2500v-bb
@@ -372,8 +354,7 @@ define Device/comtrend_ar-5315u
   CFE_BOARD_ID := 96318A-1441N1
   CFE_CHIP_ID := 6318
   FLASH_MB := 16
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += comtrend_ar-5315u
 
@@ -385,8 +366,7 @@ define Device/comtrend_ar-5381u
   CFE_BOARD_ID := 96328A-1241N
   CFE_CHIP_ID := 6328
   FLASH_MB := 16
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += comtrend_ar-5381u
 
@@ -398,8 +378,7 @@ define Device/comtrend_ar-5387un
   CFE_BOARD_ID := 96328A-1441N1
   CFE_CHIP_ID := 6328
   FLASH_MB := 16
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += comtrend_ar-5387un
 
@@ -411,8 +390,7 @@ define Device/comtrend_ct-536plus
   DEVICE_ALT0_MODEL := CT-5621
   CFE_BOARD_ID := 96348GW-11
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += comtrend_ct-536plus
@@ -423,8 +401,7 @@ define Device/comtrend_ct-5365
   DEVICE_MODEL := CT-5365
   CFE_BOARD_ID := 96348A-122
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += comtrend_ct-5365
@@ -435,8 +412,7 @@ define Device/comtrend_ct-6373
   DEVICE_MODEL := CT-6373
   CFE_BOARD_ID := CT6373-1
   CFE_CHIP_ID := 6358
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += comtrend_ct-6373
 
@@ -449,8 +425,7 @@ define Device/comtrend_vr-3025u
   CFE_CHIP_ID := 6368
   BLOCK_SIZE := 0x20000
   FLASH_MB := 32
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += comtrend_vr-3025u
 
@@ -461,8 +436,7 @@ define Device/comtrend_vr-3025un
   CFE_BOARD_ID := 96368M-1341N
   CFE_CHIP_ID := 6368
   FLASH_MB := 8
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += comtrend_vr-3025un
 
@@ -473,8 +447,7 @@ define Device/comtrend_vr-3026e
   CFE_BOARD_ID := 96368MT-1341N1
   CFE_CHIP_ID := 6368
   FLASH_MB := 8
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
 endef
 TARGET_DEVICES += comtrend_vr-3026e
 
@@ -485,8 +458,7 @@ define Device/comtrend_wap-5813n
   CFE_BOARD_ID := 96369R-1231N
   CFE_CHIP_ID := 6368
   FLASH_MB := 8
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += comtrend_wap-5813n
 
@@ -498,8 +470,7 @@ define Device/d-link_dsl-2640b-b
   DEVICE_VARIANT := B2
   CFE_BOARD_ID := D-4P-W
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += d-link_dsl-2640b-b
@@ -513,8 +484,7 @@ define Device/d-link_dsl-2640u
   DEVICE_ALT0_MODEL := DSL-2640U/BRU/C
   CFE_BOARD_ID := 96338W2_E7T
   CFE_CHIP_ID := 6338
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += d-link_dsl-2640u
@@ -525,8 +495,7 @@ define Device/d-link_dsl-2650u
   DEVICE_MODEL := DSL-2650U
   CFE_BOARD_ID := 96358VW2
   CFE_CHIP_ID := 6358
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += d-link_dsl-2650u
 
@@ -540,8 +509,7 @@ define Device/d-link_dsl-274xb-c2
   DEVICE_ALT0_VARIANT := C2
   CFE_BOARD_ID := 96358GW
   CFE_CHIP_ID := 6358
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
 endef
 TARGET_DEVICES += d-link_dsl-274xb-c2
 
@@ -556,8 +524,7 @@ define Device/d-link_dsl-274xb-c3
   DEVICE_DTS := bcm6358_d-link_dsl-274xb-c2
   CFE_BOARD_ID := AW4139
   CFE_CHIP_ID := 6358
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
 endef
 TARGET_DEVICES += d-link_dsl-274xb-c3
 
@@ -574,8 +541,7 @@ define Device/d-link_dsl-274xb-f1
   IMAGES := cfe-EU.bin cfe-AU.bin
   IMAGE/cfe-AU.bin := cfe-bin --signature2 "4.06.01.AUF1" --pad 4
   IMAGE/cfe-EU.bin := cfe-bin --signature2 "4.06.01.EUF1" --pad 4
-  DEVICE_PACKAGES := \
-    $(ATH9K_PACKAGES)
+  DEVICE_PACKAGES := $(ATH9K_PACKAGES)
 endef
 TARGET_DEVICES += d-link_dsl-274xb-f1
 
@@ -590,8 +556,7 @@ define Device/d-link_dsl-275xb-d1
   CFE_BOARD_ID := AW5200B
   CFE_CHIP_ID := 6318
   FLASH_MB := 8
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += d-link_dsl-275xb-d1
 
@@ -601,8 +566,7 @@ define Device/d-link_dva-g3810bn-tl
   DEVICE_MODEL := DVA-G3810BN/TL
   CFE_BOARD_ID := 96358VW
   CFE_CHIP_ID := 6358
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += d-link_dva-g3810bn-tl
 
@@ -614,8 +578,7 @@ define Device/davolink_dv-201amr
   IMAGES := cfe-old.bin
   CFE_BOARD_ID := DV201AMR
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += davolink_dv-201amr
@@ -631,8 +594,7 @@ define Device/dynalink_rta770bw
   CFE_BOARD_ID := RTA770BW
   CFE_CHIP_ID := 6345
   CFE_EXTRAS += --layoutver 5
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += dynalink_rta770bw
@@ -645,8 +607,7 @@ define Device/dynalink_rta770w
   CFE_BOARD_ID := RTA770W
   CFE_CHIP_ID := 6345
   CFE_EXTRAS += --layoutver 5
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += dynalink_rta770w
@@ -658,8 +619,7 @@ define Device/dynalink_rta1025w
   CFE_BOARD_ID := RTA1025W_16
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --layoutver 5
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += dynalink_rta1025w
@@ -683,8 +643,7 @@ define Device/huawei_echolife-hg520v
   CFE_BOARD_ID := HW6358GW_B
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "EchoLife_HG520v"
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
 endef
 TARGET_DEVICES += huawei_echolife-hg520v
 
@@ -696,8 +655,7 @@ define Device/huawei_echolife-hg553
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "EchoLife_HG553" --tag-version 7
   BLOCK_SIZE := 0x20000
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += huawei_echolife-hg553
 
@@ -711,8 +669,7 @@ define Device/huawei_echolife-hg556a-a
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "EchoLife_HG556a" --tag-version 8
   IMAGE_OFFSET := 0x20000
-  DEVICE_PACKAGES := \
-    $(ATH9K_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(ATH9K_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += huawei_echolife-hg556a-a
 
@@ -726,8 +683,7 @@ define Device/huawei_echolife-hg556a-b
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "EchoLife_HG556a" --tag-version 8
   BLOCK_SIZE := 0x20000
-  DEVICE_PACKAGES := \
-    $(ATH9K_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(ATH9K_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += huawei_echolife-hg556a-b
 
@@ -741,8 +697,7 @@ define Device/huawei_echolife-hg556a-c
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "EchoLife_HG556a" --tag-version 8
   BLOCK_SIZE := 0x20000
-  DEVICE_PACKAGES := \
-    $(RT28_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(RT28_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += huawei_echolife-hg556a-c
 
@@ -756,8 +711,7 @@ define Device/huawei_echolife-hg622
   CFE_EXTRAS += --tag-version 7
   BLOCK_SIZE := 0x20000
   FLASH_MB := 16
-  DEVICE_PACKAGES := \
-    $(RT28_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(RT28_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += huawei_echolife-hg622
 
@@ -770,8 +724,7 @@ define Device/huawei_echolife-hg655b
   CFE_EXTRAS += --tag-version 7
   IMAGE_OFFSET := 0x20000
   FLASH_MB := 8
-  DEVICE_PACKAGES := \
-    $(RT28_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(RT28_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += huawei_echolife-hg655b
 
@@ -783,8 +736,7 @@ define Device/inteno_vg50
   IMAGES :=
   CFE_BOARD_ID := VW6339GU
   CFE_CHIP_ID := 63268
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += inteno_vg50
 
@@ -794,8 +746,7 @@ define Device/inventel_livebox-1
   DEVICE_VENDOR := Inventel
   DEVICE_MODEL := Livebox 1
   SOC := bcm6348
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB1_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB1_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += inventel_livebox-1
@@ -820,8 +771,7 @@ define Device/netgear_dg834gt-pn
   DEVICE_ALT0_MODEL := DG834PN
   CFE_BOARD_ID := 96348GW-10
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(ATH5K_PACKAGES)
+  DEVICE_PACKAGES := $(ATH5K_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += netgear_dg834gt-pn
@@ -834,8 +784,7 @@ define Device/netgear_dg834g-v4
   IMAGES :=
   CFE_BOARD_ID := 96348W3
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += netgear_dg834g-v4
@@ -849,8 +798,7 @@ define Device/netgear_dgnd3700-v1
   BLOCK_SIZE := 0x20000
   NETGEAR_BOARD_ID := U12L144T01_NETGEAR_NEWLED
   NETGEAR_REGION := 1
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += netgear_dgnd3700-v1
 
@@ -863,8 +811,7 @@ define Device/netgear_dgnd3800b
   BLOCK_SIZE := 0x20000
   NETGEAR_BOARD_ID := U12L144T11_NETGEAR_NEWLED
   NETGEAR_REGION := 1
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += netgear_dgnd3800b
 
@@ -876,8 +823,7 @@ define Device/netgear_evg2000
   BLOCK_SIZE := 0x20000
   NETGEAR_BOARD_ID := U12H154T90_NETGEAR
   NETGEAR_REGION := 1
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += netgear_evg2000
 
@@ -891,8 +837,7 @@ define Device/nucom_r5010un-v2
   CFE_BOARD_ID := 96328ang
   CFE_CHIP_ID := 6328
   FLASH_MB := 16
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
 endef
 TARGET_DEVICES += nucom_r5010un-v2
 
@@ -906,8 +851,7 @@ define Device/observa_vh4032n
   CFE_CHIP_ID := 6368
   BLOCK_SIZE := 0x20000
   FLASH_MB := 32
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += observa_vh4032n
 
@@ -919,8 +863,7 @@ define Device/pirelli_a226g
   CFE_BOARD_ID := DWV-S0
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --signature2 IMAGE --tag-version 8
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += pirelli_a226g
 
@@ -931,8 +874,7 @@ define Device/pirelli_a226m
   CFE_BOARD_ID := DWV-S0
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --signature2 IMAGE --tag-version 8
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += pirelli_a226m
 
@@ -944,8 +886,7 @@ define Device/pirelli_a226m-fwb
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --signature2 IMAGE --tag-version 8
   BLOCK_SIZE := 0x20000
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += pirelli_a226m-fwb
 
@@ -957,8 +898,7 @@ define Device/pirelli_agpf-s0
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --signature2 IMAGE --tag-version 8
   BLOCK_SIZE := 0x20000
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += pirelli_agpf-s0
 
@@ -969,8 +909,7 @@ define Device/sagem_fast-2404
   DEVICE_MODEL := F at st 2404
   CFE_BOARD_ID := F at ST2404
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += sagem_fast-2404
@@ -981,8 +920,7 @@ define Device/sagem_fast-2504n
   DEVICE_MODEL := F at st 2504N
   CFE_BOARD_ID := F at ST2504n
   CFE_CHIP_ID := 6362
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
 endef
 TARGET_DEVICES += sagem_fast-2504n
 
@@ -992,8 +930,7 @@ define Device/sagem_fast-2604
   DEVICE_MODEL := F at st 2604
   CFE_BOARD_ID := F at ST2604
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += sagem_fast-2604
@@ -1005,8 +942,7 @@ define Device/sagem_fast-2704n
   CFE_BOARD_ID := F at ST2704N
   CFE_CHIP_ID := 6318
   FLASH_MB := 8
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += sagem_fast-2704n
 
@@ -1018,8 +954,7 @@ define Device/sagem_fast-2704-v2
   CFE_BOARD_ID := F at ST2704V2
   CFE_CHIP_ID := 6328
   FLASH_MB := 8
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += sagem_fast-2704-v2
 
@@ -1031,8 +966,7 @@ define Device/sercomm_ad1018-nor
   DEVICE_VARIANT := SPI flash mod
   CFE_BOARD_ID := 96328avngr
   CFE_CHIP_ID := 6328
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += sercomm_ad1018-nor
 
@@ -1045,8 +979,7 @@ define Device/sfr_neufbox-4-sercomm-r0
   CFE_BOARD_ID := 96358VW
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))"
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += sfr_neufbox-4-sercomm-r0
 
@@ -1058,8 +991,7 @@ define Device/sfr_neufbox-4-foxconn-r1
   CFE_BOARD_ID := 96358VW
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))"
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += sfr_neufbox-4-foxconn-r1
 
@@ -1070,8 +1002,7 @@ define Device/sfr_neufbox-6-sercomm-r0
   CFE_BOARD_ID := NB6-SER-r0
   CFE_CHIP_ID := 6362
   CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))"
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += sfr_neufbox-6-sercomm-r0
 
@@ -1082,8 +1013,7 @@ define Device/sky_sr102
   CFE_BOARD_ID := BSKYB_63168
   CFE_CHIP_ID := 63268
   CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))"
-  DEVICE_PACKAGES := \
-    $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += sky_sr102
 
@@ -1097,8 +1027,7 @@ define Device/t-com_speedport-w-303v
   IMAGE/sysupgrade.bin := cfe-spw303v-bin | spw303v-bin
   CFE_BOARD_ID := 96358-502V
   CFE_CHIP_ID := 6358
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
 endef
 TARGET_DEVICES += t-com_speedport-w-303v
 
@@ -1108,8 +1037,7 @@ define Device/t-com_speedport-w-500v
   DEVICE_MODEL := Speedport W 500V
   CFE_BOARD_ID := 96348GW
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += t-com_speedport-w-500v
@@ -1121,8 +1049,7 @@ define Device/tecom_gw6000
   DEVICE_MODEL := GW6000
   CFE_BOARD_ID := 96348GW
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(BRCMWL_PACKAGES) $(USB1_PACKAGES)
+  DEVICE_PACKAGES := $(BRCMWL_PACKAGES) $(USB1_PACKAGES)
 endef
 TARGET_DEVICES += tecom_gw6000
 
@@ -1133,8 +1060,7 @@ define Device/tecom_gw6200
   CFE_BOARD_ID := 96348GW
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --rsa-signature "$(shell printf '\x99')"
-  DEVICE_PACKAGES := \
-    $(BRCMWL_PACKAGES) $(USB1_PACKAGES)
+  DEVICE_PACKAGES := $(BRCMWL_PACKAGES) $(USB1_PACKAGES)
 endef
 TARGET_DEVICES += tecom_gw6200
 
@@ -1146,8 +1072,7 @@ define Device/telsey_cpva502plus
   CFE_BOARD_ID := CPVA502+
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --signature "Telsey Tlc" --signature2 "99.99.999"
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += telsey_cpva502plus
@@ -1160,8 +1085,7 @@ define Device/telsey_cpva642
   CFE_CHIP_ID := 6358
   CFE_EXTRAS += --signature "Telsey Tlc" --signature2 "99.99.999" --second-image-flag "0"
   FLASH_MB := 8
-  DEVICE_PACKAGES := \
-    $(RT63_PACKAGES) $(USB2_PACKAGES)
+  DEVICE_PACKAGES := $(RT63_PACKAGES) $(USB2_PACKAGES)
 endef
 TARGET_DEVICES += telsey_cpva642
 
@@ -1174,8 +1098,7 @@ define Device/telsey_magic
   IMAGES :=
   CFE_BOARD_ID := MAGIC
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(RT63_PACKAGES)
+  DEVICE_PACKAGES := $(RT63_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += telsey_magic
@@ -1189,8 +1112,7 @@ define Device/tp-link_td-w8900gb
   CFE_CHIP_ID := 6348
   CFE_EXTRAS += --rsa-signature "$(shell printf 'PRID\x89\x10\x00\x02')"
   IMAGE_OFFSET := 0x20000
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += tp-link_td-w8900gb
@@ -1202,8 +1124,7 @@ define Device/usrobotics_usr9108
   DEVICE_MODEL := 9108
   CFE_BOARD_ID := 96348GW-A
   CFE_CHIP_ID := 6348
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES) $(USB1_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES) $(USB1_PACKAGES)
   DEFAULT := n
 endef
 TARGET_DEVICES += usrobotics_usr9108
@@ -1219,7 +1140,6 @@ define Device/zyxel_p870hw-51a-v2
   CFE_BOARD_ID := 96368VVW
   CFE_CHIP_ID := 6368
   CFE_EXTRAS += --rsa-signature "ZyXEL" --signature "ZyXEL_0001"
-  DEVICE_PACKAGES := \
-    $(B43_PACKAGES)
+  DEVICE_PACKAGES := $(B43_PACKAGES)
 endef
 TARGET_DEVICES += zyxel_p870hw-51a-v2
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Mon Dec 30 18:27:46 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 31 Dec 2019 00:27:46 +0100
Subject: [OpenWrt-Devel] [PATCH 3/4] brcm63xx: use compatible instead of
 manually setting board name
In-Reply-To: <20191230232747.5357-1-freifunk@adrianschmutzler.de>
References: <20191230232747.5357-1-freifunk@adrianschmutzler.de>
Message-ID: <20191230232747.5357-4-freifunk@adrianschmutzler.de>

This patch removes the translation of device model name into a
board name in lib/brcm63xx.sh. This is actually totally useless as
we have the compatible which can be used instead of the board name
(and actually is at other targets like ath79 or ramips).

The change requires updating the base-files with the new
identifiers based on compatible.

With all "board names" replaced by the compatible, we do not need
the old scripts to detect board name anymore and can also remove
the obsolete treatment of "legacy" devices without DTS, as there
are none of those left. So, this patch removes the target-specific
board detection and uses the standard procedure in
package/base-files/files/lib/preinit/02_sysinfo

This also fixes several cases where the board name was not set or
evaluated correctly:
- asmax,ar1004g in 02_network
- telsey,magic in 09_fix_crc/02_network
- brcm,bcm96338gw in 02_network
- brcm,bcm96338w in 02_network
- brcm,bcm96348gw in 02_network
- dynalink,rta1025w in 02_network
- huawei,echolife-hg520v in 02_network
- several cases in diag.sh

The following orphaned identifiers are removed from board.d files:
- dmv-s0

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../brcm63xx/base-files/etc/board.d/01_leds   |  90 ++---
 .../base-files/etc/board.d/02_network         | 206 ++++++------
 target/linux/brcm63xx/base-files/etc/diag.sh  | 174 +++++-----
 .../etc/hotplug.d/firmware/10-rt2x00-eeprom   |   6 +-
 .../base-files/etc/uci-defaults/09_fix_crc    |  54 +--
 .../linux/brcm63xx/base-files/lib/brcm63xx.sh | 310 ------------------
 .../base-files/lib/preinit/01_do_brcm63xx.sh  |   9 -
 7 files changed, 259 insertions(+), 590 deletions(-)
 delete mode 100755 target/linux/brcm63xx/base-files/lib/brcm63xx.sh
 delete mode 100644 target/linux/brcm63xx/base-files/lib/preinit/01_do_brcm63xx.sh

diff --git a/target/linux/brcm63xx/base-files/etc/board.d/01_leds b/target/linux/brcm63xx/base-files/etc/board.d/01_leds
index d25d37e847..dd1c565bb9 100755
--- a/target/linux/brcm63xx/base-files/etc/board.d/01_leds
+++ b/target/linux/brcm63xx/base-files/etc/board.d/01_leds
@@ -8,26 +8,51 @@
 board_config_update
 
 case "$(board_name)" in
-a4001n1)
+actiontec,r1000h)
+	ucidef_set_led_usbport "usb" "USB" "R1000H:green:usb" "usb1-port1" "usb2-port1"
+	;;
+adb,a4001n)
+	ucidef_set_led_usbdev "usb" "USB" "A4001N:green:usb" "1-1"
+	;;
+adb,a4001n1)
 	ucidef_set_led_netdev "lan" "LAN" "A4001N1:green:eth" "eth0"
 	ucidef_set_led_usbdev "usb" "USB" "A4001N1:green:3g" "1-1"
 	;;
-a4001n)
-	ucidef_set_led_usbdev "usb" "USB" "A4001N:green:usb" "1-1"
+adb,av4202n)
+	ucidef_set_led_netdev "wlan0" "WLAN" "AV4202N:blue:wifi" "wlan0"
 	;;
-ad1018-nor)
-	ucidef_set_led_netdev "wlan0" "WLAN" "AD1018:green:wifi" "wlan0"
+bt,home-hub-2-a)
+	ucidef_set_led_netdev "lan" "LAN" "HOMEHUB2A:blue:broadband" "eth0.1"
+	ucidef_set_led_netdev "wlan0" "WIFI" "HOMEHUB2A:green:wireless" "wlan0"
+	ucidef_set_led_usbdev "usb1" "USB1" "HOMEHUB2A:blue:phone" "1-1"
+	ucidef_set_led_usbdev "usb2" "USB2" "HOMEHUB2A:green:phone" "2-1"
 	;;
-ar-5315u)
+comtrend,ar-5315u)
 	ucidef_set_led_usbdev "usb" "USB" "AR-5315u:green:usb" "1-1"
 	;;
-av4202n)
-	ucidef_set_led_netdev "wlan0" "WLAN" "AV4202N:blue:wifi" "wlan0"
+huawei,echolife-hg553)
+	ucidef_set_led_netdev "lan" "LAN" "HW553:blue:lan" "eth0"
+	ucidef_set_led_usbdev "usb1" "USB1" "HW553:red:hspa" "1-1"
+	ucidef_set_led_usbdev "usb2" "USB2" "HW553:blue:hspa" "1-2"
 	;;
-cpva502p)
-	ucidef_set_led_netdev "lan" "LAN" "CPVA502+:amber:link" "eth0"
+huawei,echolife-hg556a-a|\
+huawei,echolife-hg556a-b|\
+huawei,echolife-hg556a-c)
+	ucidef_set_led_netdev "lan" "LAN" "HW556:red:dsl" "eth0"
+	ucidef_set_led_usbdev "usb" "USB" "HW556:red:hspa" "1-2"
+	;;
+huawei,echolife-hg622)
+	ucidef_set_led_usbdev "usb" "USB" "HG622:green:usb" "1-2"
+	;;
+huawei,echolife-hg655b)
+	ucidef_set_led_usbdev "usb" "USB" "HW65x:green:usb" "1-2"
+	;;
+inventel,livebox-1)
+	ucidef_set_led_netdev "lan" "LAN" "Livebox1:red:traffic" "eth0"
+	ucidef_set_led_netdev "wan" "WAN" "Livebox1:red:adsl" "eth1"
+	ucidef_set_led_netdev "wlan0" "WIFI" "Livebox1:red:wifi" "wlan0"
 	;;
-dgnd3700v1_dgnd3800b)
+netgear,dgnd3700-v1)
 	ucidef_set_led_netdev "lan" "LAN" "DGND3700v1_3800B:green:lan" "eth0.1"
 	ucidef_set_led_netdev "wan" "WAN" "DGND3700v1_3800B:green:inet" "eth0.2"
 	ucidef_set_led_netdev "wlan0" "WIFI2G" "DGND3700v1_3800B:green:wifi2g" "wlan0"
@@ -35,50 +60,27 @@ dgnd3700v1_dgnd3800b)
 	ucidef_set_led_usbdev "usb1" "USB1" "DGND3700v1_3800B:green:usb-back" "1-1"
 	ucidef_set_led_usbdev "usb2" "USB2" "DGND3700v1_3800B:green:usb-front" "1-2"
 	;;
-evg2000)
+netgear,evg2000)
 	ucidef_set_led_netdev "lan" "LAN" "EVG2000:green:lan" "eth0"
 	ucidef_set_led_netdev "wan" "WAN" "EVG2000:green:wan" "eth1"
 	ucidef_set_led_netdev "wlan0" "WIFI" "EVG2000:green:wireless" "wlan0"
 	ucidef_set_led_usbdev "usb1" "USB1" "EVG2000:green:voip1" "1-1"
 	ucidef_set_led_usbdev "usb2" "USB2" "EVG2000:green:voip2" "1-2"
 	;;
-fast2704n)
+nucom,r5010un-v2)
+	ucidef_set_led_usbdev "usb" "USB" "R5010UNv2:green:usb" "1-1"
+	;;
+sagem,fast-2704n)
 	ucidef_set_led_netdev "wan" "WAN" "F at ST2704N:green:inet" "eth0.2"
 	;;
-fast2704v2)
+sagem,fast-2704-v2)
 	ucidef_set_led_usbdev "usb" "USB" "F at ST2704V2:green:usb" "1-1"
 	;;
-hg553)
-	ucidef_set_led_netdev "lan" "LAN" "HW553:blue:lan" "eth0"
-	ucidef_set_led_usbdev "usb1" "USB1" "HW553:red:hspa" "1-1"
-	ucidef_set_led_usbdev "usb2" "USB2" "HW553:blue:hspa" "1-2"
-	;;
-hg556a_*)
-	ucidef_set_led_netdev "lan" "LAN" "HW556:red:dsl" "eth0"
-	ucidef_set_led_usbdev "usb" "USB" "HW556:red:hspa" "1-2"
-	;;
-hg622)
-	ucidef_set_led_usbdev "usb" "USB" "HG622:green:usb" "1-2"
-	;;
-hg655b)
-	ucidef_set_led_usbdev "usb" "USB" "HW65x:green:usb" "1-2"
-	;;
-homehub2a)
-	ucidef_set_led_netdev "lan" "LAN" "HOMEHUB2A:blue:broadband" "eth0.1"
-	ucidef_set_led_netdev "wlan0" "WIFI" "HOMEHUB2A:green:wireless" "wlan0"
-	ucidef_set_led_usbdev "usb1" "USB1" "HOMEHUB2A:blue:phone" "1-1"
-	ucidef_set_led_usbdev "usb2" "USB2" "HOMEHUB2A:green:phone" "2-1"
-	;;
-livebox1)
-	ucidef_set_led_netdev "lan" "LAN" "Livebox1:red:traffic" "eth0"
-	ucidef_set_led_netdev "wan" "WAN" "Livebox1:red:adsl" "eth1"
-	ucidef_set_led_netdev "wlan0" "WIFI" "Livebox1:red:wifi" "wlan0"
-	;;
-r1000h)
-	ucidef_set_led_usbport "usb" "USB" "R1000H:green:usb" "usb1-port1" "usb2-port1"
+sercomm,ad1018-nor)
+	ucidef_set_led_netdev "wlan0" "WLAN" "AD1018:green:wifi" "wlan0"
 	;;
-r5010un_v2)
-	ucidef_set_led_usbdev "usb" "USB" "R5010UNv2:green:usb" "1-1"
+telsey,cpva502plus)
+	ucidef_set_led_netdev "lan" "LAN" "CPVA502+:amber:link" "eth0"
 	;;
 esac
 
diff --git a/target/linux/brcm63xx/base-files/etc/board.d/02_network b/target/linux/brcm63xx/base-files/etc/board.d/02_network
index a2ca5a37b3..7fa1514b4f 100755
--- a/target/linux/brcm63xx/base-files/etc/board.d/02_network
+++ b/target/linux/brcm63xx/base-files/etc/board.d/02_network
@@ -8,153 +8,137 @@
 board_config_update
 
 case "$(board_name)" in
-
-cvg834g |\
-evg2000 |\
-r1000h |\
-rta770bw |\
-rta770w |\
-spw303v |\
-spw500v)
+actiontec,r1000h|\
+dynalink,rta770bw|\
+dynalink,rta770w|\
+netgear,cvg834g|\
+netgear,evg2000|\
+t-com,speedport-w-303v|\
+t-com,speedport-w-500v)
 	ucidef_set_interface_lan "eth0"
 	;;
-
-ar1004g |\
-bcm96338gw |\
-bcm96338w |\
-cpva642 |\
-ct-5365 |\
-ct-536p_5621t |\
-ct-6373 |\
-dg834g_v4 |\
-dsl-2640b-b |\
-dsl-2640u |\
-fast2604 |\
-rta1320 |\
-v2110)
+adb,a4001n1|\
+adb,a4001n|\
+adb,av4202n|\
+brcm,bcm963281tan|\
+brcm,bcm96328avng|\
+brcm,bcm96368mvngr|\
+comtrend,ar-5381u|\
+comtrend,ar-5387un|\
+comtrend,vr-3025u|\
+comtrend,vr-3025un|\
+comtrend,vr-3026e|\
+d-link,dsl-274xb-f1|\
+d-link,dsl-275xb-d1|\
+huawei,echolife-hg622|\
+huawei,echolife-hg655b|\
+nucom,r5010un-v2|\
+sagem,fast-2504n|\
+sagem,fast-2704-v2|\
+zyxel,p870hw-51a-v2)
 	ucidef_add_switch "switch0" \
-		"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u at eth0"
+		"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t at eth0"
 	;;
-
-agpf-s0 |\
-bcm96348gw |\
-bcm96348gw-10 |\
-bcm96348gw-11 |\
-bcm96358vw |\
-bcm96358vw2 |\
-dg834gt |\
-dmv-s0 |\
-dsl-2650u |\
-dv-201amr |\
-f5d7633 |\
-fast2404 |\
-magic |\
-rg100a |\
-rta1025W |\
-td-w8900gb |\
-usr9108 |\
-v2500v_bb)
+alcatel,rg100a|\
+belkin,f5d7633|\
+brcm,bcm96348gw|\
+brcm,bcm96348gw-10|\
+brcm,bcm96348gw-11|\
+brcm,bcm96358vw|\
+brcm,bcm96358vw2|\
+bt,voyager-2500v-bb|\
+davolink,dv-201amr|\
+d-link,dsl-2650u|\
+dynalink,rta1025w|\
+netgear,dg834gt-pn|\
+pirelli,agpf-s0|\
+sagem,fast-2404|\
+telsey,magic|\
+tp-link,td-w8900gb|\
+usrobotics,usr9108)
 	ucidef_set_interfaces_lan_wan "eth1" "eth0"
 	ucidef_add_switch "switch0" \
 		"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u at eth1"
 	;;
-
-dsl-274xb-c |\
-hg553 |\
-hg556a_* |\
-homehub2a)
+asmax,ar-1004g|\
+brcm,bcm96338gw|\
+brcm,bcm96338w|\
+bt,voyager-2110|\
+comtrend,ct-5365|\
+comtrend,ct-536plus|\
+comtrend,ct-6373|\
+d-link,dsl-2640b-b|\
+d-link,dsl-2640u|\
+dynalink,rta1320|\
+netgear,dg834g-v4|\
+sagem,fast-2604|\
+telsey,cpva642)
 	ucidef_add_switch "switch0" \
-		"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t at eth0"
+		"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u at eth0"
 	;;
-
-dva-g3810bn |\
-hg520 |\
-neufbox4)
-	ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
+brcm,bcm963268bu-p300)
 	ucidef_add_switch "switch0" \
-		"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t at eth1"
+		"0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t at eth0"
 	;;
-
-a4001n1 |\
-a4001n |\
-ar-5381u |\
-ar-5387un |\
-av4202n |\
-bcm963281tan |\
-bcm96328avng |\
-bcm96368mvngr |\
-dsl-274xb-f |\
-dsl-275xb-d |\
-fast2504n |\
-fast2704v2 |\
-hg622 |\
-hg655b |\
-p870hw-51a_v2 |\
-r5010un_v2 |\
-vr-3025un |\
-vr-3025u |\
-vr-3026e)
+brcm,bcm96368mvwg)
 	ucidef_add_switch "switch0" \
-		"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t at eth0"
+		"1:lan" "2:lan" "4:lan" "5:lan" "8t at eth0"
 	;;
-
-ar-5315u |\
-fast2704n |\
-vh4032n)
+bt,home-hub-2-a|\
+d-link,dsl-274xb-c2|\
+huawei,echolife-hg553|\
+huawei,echolife-hg556a-a|\
+huawei,echolife-hg556a-b|\
+huawei,echolife-hg556a-c)
+	ucidef_add_switch "switch0" \
+		"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t at eth0"
+	;;
+comtrend,ar-5315u|\
+observa,vh4032n|\
+sagem,fast-2704n)
 	ucidef_add_switch "switch0" \
 		"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t at eth0"
 	;;
-
-ad1018-nor)
+comtrend,wap-5813n)
 	ucidef_add_switch "switch0" \
-		"1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "8t at eth0"
+		"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t at eth0"
 	;;
-
-bcm96368mvwg)
+d-link,dva-g3810bn-tl|\
+huawei,echolife-hg520v|\
+sfr,neufbox-4-foxconn-r1|\
+sfr,neufbox-4-sercomm-r0)
+	ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
 	ucidef_add_switch "switch0" \
-		"1:lan" "2:lan" "4:lan" "5:lan" "8t at eth0"
+		"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t at eth1"
 	;;
-
-wap-5813n)
+inteno,vg50)
 	ucidef_add_switch "switch0" \
-		"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t at eth0"
+		"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t at eth0"
 	;;
-
-dgnd3700v1_dgnd3800b)
+inventel,livebox-1|\
+telsey,cpva502plus)
+	ucidef_set_interfaces_lan_wan "eth0" "eth1"
+	;;
+netgear,dgnd3700-v1)
 	ucidef_add_switch "switch0" \
 		"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "8t at eth0"
 	;;
-
-neufbox6)
+sercomm,ad1018-nor)
+	ucidef_add_switch "switch0" \
+		"1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "8t at eth0"
+	;;
+sfr,neufbox-6-sercomm-r0)
 	ucidef_add_switch "switch0" \
 		"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t at eth0"
 	;;
-
-sr102)
+sky,sr102)
 	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
 	ucidef_add_switch "switch0" \
 		"0:lan" "1:lan" "2:lan" "3:wan" "8t at eth0"
 	;;
-
-vg50)
-	ucidef_add_switch "switch0" \
-		"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t at eth0"
-	;;
-
-bcm963268bu_p300)
-	ucidef_add_switch "switch0" \
-		"0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t at eth0"
-	;;
-
-cpva502p |\
-livebox1)
-	ucidef_set_interfaces_lan_wan "eth0" "eth1"
-	;;
-
 *)
 	ucidef_set_interfaces_lan_wan "eth1" "eth0"
 	;;
-
 esac
 
 board_config_flush
diff --git a/target/linux/brcm63xx/base-files/etc/diag.sh b/target/linux/brcm63xx/base-files/etc/diag.sh
index 34464ec44a..4b6d8d6065 100644
--- a/target/linux/brcm63xx/base-files/etc/diag.sh
+++ b/target/linux/brcm63xx/base-files/etc/diag.sh
@@ -6,141 +6,143 @@
 
 set_state() {
 	case "$(board_name)" in
-	a4001n1)
-		status_led="A4001N1:green:power"
+	actiontec,r1000h)
+		status_led="R1000H:green:power"
 		;;
-	a4001n)
+	adb,a4001n)
 		status_led="A4001N:green:power"
 		;;
-	ad1018-nor)
-		status_led="AD1018:green:power"
-		;;
-	ar-5315u)
-		status_led="AR-5315u:green:power"
-		;;
-	ar-5381u)
-		status_led="AR-5381u:green:power"
-		;;
-	ar-5387un)
-		status_led="AR-5387un:green:power"
+	adb,a4001n1)
+		status_led="A4001N1:green:power"
 		;;
-	av4202n)
+	adb,av4202n)
 		status_led="AV4202N:white:power"
 		;;
-	bcm96348gw)
-		status_led="96348GW:green:power"
+	asmax,ar-1004g)
+		status_led="AR1004G:green:power"
 		;;
-	bcm963281tan)
+	brcm,bcm963281tan)
 		status_led="963281TAN::power"
 		;;
-	bcm96328avng)
+	brcm,bcm96328avng)
 		status_led="96328avng::power"
 		;;
-	bcm96348gw-11)
-		status_led="96348GW-11:green:power"
-		;;
-	spw303v)
-		status_led="spw303v:green:power+adsl"
+	brcm,bcm96348gw)
+		status_led="96348GW:green:power"
 		;;
-	vh4032n)
-		status_led="VH4032N:blue:power"
+	brcm,bcm96348gw-11)
+		status_led="96348GW-11:green:power"
 		;;
-	vr-3025un)
-		status_led="VR-3025un:green:power"
+	bt,home-hub-2-a)
+		status_led="HOMEHUB2A:green:upgrading"
+		status_led2="HOMEHUB2A:blue:upgrading"
 		;;
-	vr-3025u)
-		status_led="VR-3025u:green:power"
+	bt,voyager-2110)
+		status_led="V2110:power:green"
 		;;
-	vr-3026e)
-		status_led="VR-3026e:green:power"
+	comtrend,ar-5315u)
+		status_led="AR-5315u:green:power"
 		;;
-	wap-5813n)
-		status_led="WAP-5813n:green:power"
+	comtrend,ar-5381u)
+		status_led="AR-5381u:green:power"
 		;;
-	ar1004g)
-		status_led="AR1004G:green:power"
+	comtrend,ar-5387un)
+		status_led="AR-5387un:green:power"
 		;;
-	dsl-274xb-c|\
-	dsl-274xb-f)
-		status_led="dsl-274xb:green:power"
+	comtrend,ct-536plus)
+		status_led="CT536_CT5621:green:power"
 		;;
-	dsl-275xb-d)
-		status_led="dsl-275xb:green:power"
+	comtrend,vr-3025u)
+		status_led="VR-3025u:green:power"
 		;;
-	cpva642)
-		status_led="CPVA642:green:power:"
+	comtrend,vr-3025un)
+		status_led="VR-3025un:green:power"
 		;;
-	ct-536p_5621t)
-		status_led="CT536_CT5621:green:power"
+	comtrend,vr-3026e)
+		status_led="VR-3026e:green:power"
 		;;
-	cvg834g)
-		status_led="CVG834G:green:power"
+	comtrend,wap-5813n)
+		status_led="WAP-5813n:green:power"
 		;;
-	dsl-2640b-b)
+	d-link,dsl-2640b-b)
 		status_led="D-4P-W:green:power"
 		;;
-	dgnd3700v1_dgnd3800b)
-		status_led="DGND3700v1_3800B:green:power"
-		;;
-	evg2000)
-		status_led="EVG2000:green:power"
-		;;
-	fast2504n)
-		status_led="fast2504n:green:ok"
+	d-link,dsl-274xb-c2|\
+	d-link,dsl-274xb-f1)
+		status_led="dsl-274xb:green:power"
 		;;
-	fast2704n)
-		status_led2="F at ST2704N:red:power"
+	d-link,dsl-275xb-d1)
+		status_led="dsl-275xb:green:power"
 		;;
-	fast2704v2)
-		status_led="F at ST2704V2:green:power"
+	dynalink,rta770bw)
+		status_led="RTA770BW:green:diag"
 		;;
-	homehub2a)
-		status_led="HOMEHUB2A:green:upgrading"
-		status_led2="HOMEHUB2A:blue:upgrading"
+	dynalink,rta770w)
+		status_led="RTA770W:green:diag"
 		;;
-	gw6200)
-		status_led="GW6200:green:line1"
-		status_led2="GW6200:green:tel"
+	huawei,echolife-hg520v)
+		status_led="HW520:green:net"
 		;;
-	hg553)
+	huawei,echolife-hg553)
 		status_led="HW553:blue:power"
 		;;
-	hg556a_*)
+	huawei,echolife-hg556a-a|\
+	huawei,echolife-hg556a-b|\
+	huawei,echolife-hg556a-c)
 		status_led="HW556:red:power"
 		;;
-	hg520)
-		status_led="HW520:green:net"
-		;;
-	hg655b)
+	huawei,echolife-hg655b)
 		status_led="HW65x:green:power"
 		;;
-	livebox1)
+	inventel,livebox-1)
 		status_led="Livebox1:red:adsl-fail-power"
 		;;
-	p870hw-51a_v2)
-		status_led="P870HW-51a:green:power"
+	netgear,cvg834g)
+		status_led="CVG834G:green:power"
 		;;
-	r1000h)
-		status_led="R1000H:green:power"
+	netgear,dgnd3700-v1)
+		status_led="DGND3700v1_3800B:green:power"
 		;;
-	r5010un_v2)
+	netgear,evg2000)
+		status_led="EVG2000:green:power"
+		;;
+	nucom,r5010un-v2)
 		status_led="R5010UNv2:green:power"
 		;;
-	rta770bw)
-		status_led="RTA770BW:green:diag"
+	observa,vh4032n)
+		status_led="VH4032N:blue:power"
 		;;
-	rta770w)
-		status_led="RTA770W:green:diag"
+	sagem,fast-2504n)
+		status_led="fast2504n:green:ok"
+		;;
+	sagem,fast-2704n)
+		status_led2="F at ST2704N:red:power"
+		;;
+	sagem,fast-2704-v2)
+		status_led="F at ST2704V2:green:power"
+		;;
+	sercomm,ad1018-nor)
+		status_led="AD1018:green:power"
 		;;
-	sr102)
+	sky,sr102)
 		status_led="SR102:white:power"
 		status_led2="SR102:red:power"
 		;;
-	spw500v)
+	t-com,speedport-w-303v)
+		status_led="spw303v:green:power+adsl"
+		;;
+	t-com,speedport-w-500v)
 		status_led="SPW500V:green:power"
 		;;
-	v2110)
-		status_led="V2110:power:green"
+	tecom,gw6200)
+		status_led="GW6200:green:line1"
+		status_led2="GW6200:green:tel"
+		;;
+	telsey,cpva642)
+		status_led="CPVA642:green:power:"
+		;;
+	zyxel,p870hw-51a-v2)
+		status_led="P870HW-51a:green:power"
 		;;
 	esac
 
diff --git a/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index 2400eb998a..0e92481f08 100644
--- a/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -10,11 +10,11 @@ board=$(board_name)
 case "$FIRMWARE" in
 "rt2x00.eeprom" )
 	case $board in
-	hg556a_c)
+	huawei,echolife-hg556a-c)
 		caldata_extract "cal_data" 0x1fe00 0x200
 		;;
-	hg622 |\
-	hg655b)
+	huawei,echolife-hg622|\
+	huawei,echolife-hg655b)
 		caldata_extract "cal_data" 0x0 0x200
 		;;
 	*)
diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc b/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
index bfd485c27b..c33e56f28e 100644
--- a/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
+++ b/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
@@ -11,33 +11,33 @@ do_fixcrc() {
 }
 
 case "$(board_name)" in
-	a4001n |\
-	a4001n1 |\
-	ar-5315u |\
-	ar-5381u |\
-	ar-5387un |\
-	bcm96328avng |\
-	bcm963281tan |\
-	cpva502p |\
-	cpva642 |\
-	ct-6373 |\
-	dsl-274xb-f |\
-	evg2000 |\
-	hg622 |\
-	magic |\
-	p870hw-51a_v2 |\
-	r1000h |\
-	r5010un_v2 |\
-	rta770bw |\
-	rta770w |\
-	spw303v |\
-	v2110 |\
-	v2500v_bb |\
-	vh4032n |\
-	vr-3025u |\
-	vr-3025un |\
-	vr-3026e |\
-	wap-5813n)
+	actiontec,r1000h|\
+	adb,a4001n|\
+	adb,a4001n1|\
+	brcm,bcm96328avng|\
+	brcm,bcm963281tan|\
+	bt,voyager-2110|\
+	bt,voyager-2500v-bb|\
+	comtrend,ar-5315u|\
+	comtrend,ar-5381u|\
+	comtrend,ar-5387un|\
+	comtrend,vr-3025u|\
+	comtrend,vr-3025un|\
+	comtrend,vr-3026e|\
+	comtrend,wap-5813n|\
+	comtrend,ct-6373|\
+	d-link,dsl-274xb-f1|\
+	dynalink,rta770bw|\
+	dynalink,rta770w|\
+	huawei,echolife-hg622|\
+	netgear,evg2000|\
+	nucom,r5010un-v2|\
+	observa,vh4032n|\
+	t-com,speedport-w-303v|\
+	telsey,cpva502plus|\
+	telsey,cpva642|\
+	telsey,magic|\
+	zyxel,p870hw-51a-v2)
 		do_fixcrc
 		;;
 esac
diff --git a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
deleted file mode 100755
index 1676ae0abb..0000000000
--- a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
+++ /dev/null
@@ -1,310 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2007 OpenWrt.org
-#
-#
-
-board_id=""
-sys_mtd_part=""
-ifname=""
-
-brcm63xx_dt_detect() {
-	local board_name
-
-	case "$1" in
-	"ADB P.DG A4001N")
-		board_name="a4001n"
-		;;
-	"ADB P.DG A4001N1")
-		board_name="a4001n1"
-		;;
-	"ADB P.DG AV4202N")
-		board_name="av4202n"
-		;;
-	"Actiontec R1000H")
-		board_name="r1000h"
-		;;
-	"Alcatel RG100A")
-		board_name="rg100a"
-		;;
-	"ASMAX AR 1004g")
-		board_name="ar100g"
-		;;
-	"Belkin F5D7633")
-		board_name="f5d7633"
-		;;
-	"Broadcom 96348R reference board")
-		board_name="bcm96348r"
-		;;
-	"Broadcom BCM96318REF reference board")
-		board_name="bcm96318ref"
-		;;
-	"Broadcom BCM96318REF_P300 reference board")
-		board_name="bcm96318ref_p300"
-		;;
-	"Broadcom BCM963268BU_P300 reference board")
-		board_name="bcm963268bu_p300"
-		;;
-	"Broadcom BCM963269BHR reference board")
-		board_name="bcm963269bhr"
-		;;
-	"Broadcom bcm963281TAN reference board")
-		board_name="bcm963281tan"
-		;;
-	"Broadcom BCM96328avng reference board")
-		board_name="bcm96328avng"
-		;;
-	"Broadcom BCM96345GW2 reference board")
-		board_name="bcm96345gw2"
-		;;
-	"Broadcom BCM96348GW-10 reference board")
-		board_name="bcm96348gw-10"
-		;;
-	"Broadcom BCM96348GW-11 reference board")
-		board_name="bcm96348gw-11"
-		;;
-	"Broadcom BCM96348GW reference board")
-		board_name="bcm96358gw"
-		;;
-	"Broadcom BCM96358VW reference board")
-		board_name="bcm96358vw"
-		;;
-	"Broadcom BCM96358VW2 reference board")
-		board_name="bcm96358vw2"
-		;;
-	"Broadcom BCM96368MVNgr reference board")
-		board_name="bcm96368mvngr"
-		;;
-	"Broadcom BCM96368MVWG reference board")
-		board_name="bcm96368mvwg"
-		;;
-	"BT Home Hub 2.0 Type A")
-		board_name="homehub2a"
-		;;
-	"BT Voyager 2110")
-		board_name="v2110"
-		;;
-	"BT Voyager V2500V")
-		board_name="v2500v_bb"
-		;;
-	"Comtrend AR-5315u")
-		board_name="ar-5315u"
-		;;
-	"Comtrend AR-5381u")
-		board_name="ar-5381u"
-		;;
-	"Comtrend AR-5387un")
-		board_name="ar-5387un"
-		;;
-	"Comtrend CT-5365")
-		board_name="ct-5365"
-		;;
-	"Comtrend CT-536+/CT-5621T")
-		board_name="ct-536p_5621t"
-		;;
-	"Comtrend CT-6373")
-		board_name="ct-6373"
-		;;
-	"Comtrend VR-3025u")
-		board_name="vr-3025u"
-		;;
-	"Comtrend VR-3025un")
-		board_name="vr-3025un"
-		;;
-	"Comtrend VR-3026e")
-		board_name="vr-3026e"
-		;;
-	"Comtrend WAP-5813n")
-		board_name="wap-5813n"
-		;;
-	"Davolink DV-201AMR")
-		board_name="dv-201amr"
-		;;
-	"D-Link DSL-2640B rev B2")
-		board_name="dsl-2640b-b"
-		;;
-	"D-Link DSL-2640U/BRU/C")
-		board_name="dsl-2640u"
-		;;
-	"D-Link DSL-2650U")
-		board_name="dsl-2650u"
-		;;
-	"D-Link DSL-2740B/DSL-2741B rev C2/3")
-		board_name="dsl-274xb-c"
-		;;
-	"D-Link DSL-2740B/DSL-2741B rev F1")
-		board_name="dsl-274xb-f"
-		;;
-	"D-Link DSL-2750B/DSL-2751 rev D1")
-		board_name="dsl-275xb-d"
-		;;
-	"D-Link DVA-G3810BN/TL")
-		board_name="dva-g3810bn"
-		;;
-	"Dynalink RTA770BW")
-		board_name="rta770bw"
-		;;
-	"Dynalink RTA770W")
-		board_name="rta770w"
-		;;
-	"Dynalink RTA1025W")
-		board_name="rta1025w"
-		;;
-	"Dynalink RTA1320")
-		board_name="rta1320"
-		;;
-	"Huawei EchoLife HG520v")
-		board_name="hg520v"
-		;;
-	"Huawei EchoLife HG553")
-		board_name="hg553"
-		;;
-	"Huawei EchoLife HG556a (version A)")
-		board_name="hg556a_a"
-		;;
-	"Huawei EchoLife HG556a (version B)")
-		board_name="hg556a_b"
-		;;
-	"Huawei EchoLife HG556a (version C)")
-		board_name="hg556a_c"
-		;;
-	"Huawei HG622")
-		board_name="hg622"
-		;;
-	"Huawei HG655b")
-		board_name="hg655b"
-		;;
-	"Inteno VG50")
-		board_name="vg50"
-		;;
-	"Inventel Livebox 1")
-		board_name="livebox1"
-		;;
-	"Netgear CVG834G")
-		board_name="cvg834g"
-		;;
-	"Netgear DG834GT/PN")
-		board_name="dg834gt"
-		;;
-	"Netgear DG834G v4")
-		board_name="dg834g_v4"
-		;;
-	"Netgear DGND3700v1/DGND3800B")
-		board_name="dgnd3700v1_dgnd3800b"
-		;;
-	"Netgear EVG2000")
-		board_name="evg2000"
-		;;
-	"NuCom R5010UN v2")
-		board_name="r5010un_v2"
-		;;
-	"Observa VH4032N")
-		board_name="vh4032n"
-		;;
-	"Pirelli A226G")
-		board_name="a226g"
-		;;
-	"Pirelli A226M")
-		board_name="a226m"
-		;;
-	"Pirelli A226M-FWB")
-		board_name="a226m-fwb"
-		;;
-	"Pirelli Alice Gate AGPF-S0")
-		board_name="agpf-s0"
-		;;
-	"Sagem F at ST2404")
-		board_name="fast2404"
-		;;
-	"Sagem F at ST2504n")
-		board_name="fast2504n"
-		;;
-	"Sagem F at ST2604")
-		board_name="fast2604"
-		;;
-	"Sagem F at ST2704N")
-		board_name="fast2704n"
-		;;
-	"Sagem F at ST2704V2")
-		board_name="fast2704v2"
-		;;
-	"Sercomm AD1018 (SPI flash mod)")
-		board_name="ad1018-nor"
-		;;
-	"SFR Neuf Box 4"*)
-		board_name="neufbox4"
-		;;
-	"SFR neufbox 6 (Sercomm)")
-		board_name="neufbox6"
-		;;
-	"SKY SR102")
-		board_name="sr102"
-		;;
-	"T-Com Speedport W303 V")
-		board_name="spw303v"
-		;;
-	"T-Com Speedport W500 V")
-		board_name="spw500v"
-		;;
-	"TECOM GW6000")
-		board_name="g6000"
-		;;
-	"TECOM GW6200")
-		board_name="g6200"
-		;;
-	"Telsey CPVA502+")
-		board_name="cpva502p"
-		;;
-	"Telsey CPVA642-type (CPA-ZNTE60T)")
-		board_name="cpva642"
-		;;
-	"Telsey MAGIC")
-		board_name="magic"
-		;;
-	"TP-Link TD-W8900GB")
-		board_name="td-w8900gb"
-		;;
-	"USRobotics 9108")
-		board_name="usr9108"
-		;;
-	"Zyxel P870HW-51a v2")
-		board_name="p870hw-51a_v2"
-		;;
-	*)
-		board_name="unknown"
-		;;
-	esac
-
-	echo "$board_name"
-}
-
-brcm63xx_legacy_detect() {
-	local board_name
-
-	case "$1" in
-	*)
-		board_name="unknown"
-		;;
-	esac
-
-	echo "$board_name"
-}
-
-brcm63xx_detect() {
-	local board_name model
-
-	board_id=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
-
-	if [ -e /proc/device-tree ]; then
-		model=$(cat /proc/device-tree/model)
-		board_name=$(brcm63xx_dt_detect "$model")
-	else
-		model="Unknown bcm63xx board"
-		board_name=$(brcm63xx_legacy_detect "$board_id")
-	fi
-
-	[ -e "/tmp/sysinfo" ] || mkdir -p "/tmp/sysinfo"
-
-	echo "$board_name" > /tmp/sysinfo/board_name
-	echo "$model" > /tmp/sysinfo/model
-}
diff --git a/target/linux/brcm63xx/base-files/lib/preinit/01_do_brcm63xx.sh b/target/linux/brcm63xx/base-files/lib/preinit/01_do_brcm63xx.sh
deleted file mode 100644
index 4179695024..0000000000
--- a/target/linux/brcm63xx/base-files/lib/preinit/01_do_brcm63xx.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-do_brcm63xx() {
-	. /lib/brcm63xx.sh
-
-	brcm63xx_detect
-}
-
-boot_hook_add preinit_main do_brcm63xx
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Mon Dec 30 18:27:47 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 31 Dec 2019 00:27:47 +0100
Subject: [OpenWrt-Devel] [PATCH 4/4] brcm63xx: align DTS model with Makefile
 and compatible
In-Reply-To: <20191230232747.5357-1-freifunk@adrianschmutzler.de>
References: <20191230232747.5357-1-freifunk@adrianschmutzler.de>
Message-ID: <20191230232747.5357-5-freifunk@adrianschmutzler.de>

Since the model string in DTS is not required to derive board name
anymore, we can now align it with the model name in Makefile and
the compatible.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/brcm63xx/dts/bcm6318_sagem_fast-2704n.dts    | 2 +-
 target/linux/brcm63xx/dts/bcm6328_sagem_fast-2704-v2.dts  | 2 +-
 target/linux/brcm63xx/dts/bcm6348_bt_voyager-2500v-bb.dts | 2 +-
 target/linux/brcm63xx/dts/bcm6348_sagem_fast-2404.dts     | 2 +-
 target/linux/brcm63xx/dts/bcm6348_sagem_fast-2604.dts     | 2 +-
 .../linux/brcm63xx/dts/bcm6348_t-com_speedport-w-500v.dts | 2 +-
 target/linux/brcm63xx/dts/bcm6348_usrobotics_usr9108.dts  | 2 +-
 .../brcm63xx/dts/bcm6358_sfr_neufbox-4-foxconn-r1.dts     | 2 +-
 .../brcm63xx/dts/bcm6358_sfr_neufbox-4-sercomm-r0.dts     | 2 +-
 .../linux/brcm63xx/dts/bcm6358_t-com_speedport-w-303v.dts | 2 +-
 target/linux/brcm63xx/dts/bcm6362_sagem_fast-2504n.dts    | 2 +-
 .../brcm63xx/dts/bcm6362_sfr_neufbox-6-sercomm-r0.dts     | 2 +-
 .../linux/brcm63xx/dts/bcm6368_huawei_echolife-hg622.dts  | 2 +-
 .../linux/brcm63xx/dts/bcm6368_huawei_echolife-hg655b.dts | 2 +-
 target/linux/brcm63xx/image/bcm63xx.mk                    | 8 ++++----
 15 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/target/linux/brcm63xx/dts/bcm6318_sagem_fast-2704n.dts b/target/linux/brcm63xx/dts/bcm6318_sagem_fast-2704n.dts
index 3ceddd09a2..f09310e2bb 100644
--- a/target/linux/brcm63xx/dts/bcm6318_sagem_fast-2704n.dts
+++ b/target/linux/brcm63xx/dts/bcm6318_sagem_fast-2704n.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "Sagem F at ST2704N";
+	model = "Sagem F at st 2704N";
 	compatible = "sagem,fast-2704n", "brcm,bcm6318";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6328_sagem_fast-2704-v2.dts b/target/linux/brcm63xx/dts/bcm6328_sagem_fast-2704-v2.dts
index 1fe0d44810..d00d8fb4e5 100644
--- a/target/linux/brcm63xx/dts/bcm6328_sagem_fast-2704-v2.dts
+++ b/target/linux/brcm63xx/dts/bcm6328_sagem_fast-2704-v2.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "Sagem F at ST2704V2";
+	model = "Sagem F at st 2704 V2";
 	compatible = "sagem,fast-2704-v2", "brcm,bcm6328";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6348_bt_voyager-2500v-bb.dts b/target/linux/brcm63xx/dts/bcm6348_bt_voyager-2500v-bb.dts
index a77362f2f6..0975cffd65 100644
--- a/target/linux/brcm63xx/dts/bcm6348_bt_voyager-2500v-bb.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_bt_voyager-2500v-bb.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "BT Voyager V2500V";
+	model = "BT Voyager 2500V";
 	compatible = "bt,voyager-2500v-bb", "brcm,bcm6348";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2404.dts b/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2404.dts
index 60b945555b..945fcc1f18 100644
--- a/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2404.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2404.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "Sagem F at ST2404";
+	model = "Sagem F at st 2404";
 	compatible = "sagem,fast-2404", "brcm,bcm6348";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2604.dts b/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2604.dts
index a3394dd70d..a2d2717575 100644
--- a/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2604.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_sagem_fast-2604.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "Sagem F at ST2604";
+	model = "Sagem F at st 2604";
 	compatible = "sagem,fast-2604", "brcm,bcm6348";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6348_t-com_speedport-w-500v.dts b/target/linux/brcm63xx/dts/bcm6348_t-com_speedport-w-500v.dts
index aa2f337253..8b0d1cacfd 100644
--- a/target/linux/brcm63xx/dts/bcm6348_t-com_speedport-w-500v.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_t-com_speedport-w-500v.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "T-Com Speedport W500 V";
+	model = "T-Com Speedport W 500V";
 	compatible = "t-com,speedport-w-500v", "brcm,bcm6348";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6348_usrobotics_usr9108.dts b/target/linux/brcm63xx/dts/bcm6348_usrobotics_usr9108.dts
index 35ce1b010d..366eaf3bcd 100644
--- a/target/linux/brcm63xx/dts/bcm6348_usrobotics_usr9108.dts
+++ b/target/linux/brcm63xx/dts/bcm6348_usrobotics_usr9108.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "USRobotics 9108";
+	model = "USRobotics USR9108";
 	compatible = "usrobotics,usr9108", "brcm,bcm6348";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-foxconn-r1.dts b/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-foxconn-r1.dts
index e1a3046c7f..de22658843 100644
--- a/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-foxconn-r1.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-foxconn-r1.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "SFR Neuf Box 4 (Foxconn)";
+	model = "SFR Neufbox 4 (Foxconn)";
 	compatible = "sfr,neufbox-4-foxconn-r1", "brcm,bcm6358";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-sercomm-r0.dts b/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-sercomm-r0.dts
index b28aaa3fe7..db6c5f3306 100644
--- a/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-sercomm-r0.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_sfr_neufbox-4-sercomm-r0.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "SFR Neuf Box 4 (Sercomm)";
+	model = "SFR Neufbox 4 (Sercomm)";
 	compatible = "sfr,neufbox-4-sercomm-r0", "brcm,bcm6358";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6358_t-com_speedport-w-303v.dts b/target/linux/brcm63xx/dts/bcm6358_t-com_speedport-w-303v.dts
index 68f8588f55..4aed5f0eb6 100644
--- a/target/linux/brcm63xx/dts/bcm6358_t-com_speedport-w-303v.dts
+++ b/target/linux/brcm63xx/dts/bcm6358_t-com_speedport-w-303v.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "T-Com Speedport W303 V";
+	model = "T-Com Speedport W 303V";
 	compatible = "t-com,speedport-w-303v", "brcm,bcm6358";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6362_sagem_fast-2504n.dts b/target/linux/brcm63xx/dts/bcm6362_sagem_fast-2504n.dts
index d1bf98a2b1..db8ce7318f 100644
--- a/target/linux/brcm63xx/dts/bcm6362_sagem_fast-2504n.dts
+++ b/target/linux/brcm63xx/dts/bcm6362_sagem_fast-2504n.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "Sagem F at ST2504n";
+	model = "Sagem F at st 2504N";
 	compatible = "sagem,fast-2504n", "brcm,bcm6362";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6362_sfr_neufbox-6-sercomm-r0.dts b/target/linux/brcm63xx/dts/bcm6362_sfr_neufbox-6-sercomm-r0.dts
index a5184ff555..031aff0748 100644
--- a/target/linux/brcm63xx/dts/bcm6362_sfr_neufbox-6-sercomm-r0.dts
+++ b/target/linux/brcm63xx/dts/bcm6362_sfr_neufbox-6-sercomm-r0.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "SFR neufbox 6 (Sercomm)";
+	model = "SFR Neufbox 6 (Sercomm)";
 	compatible = "sfr,neufbox-6-sercomm-r0", "brcm,bcm6362";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg622.dts b/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg622.dts
index 36598645a3..77ecc62abd 100644
--- a/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg622.dts
+++ b/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg622.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "Huawei HG622";
+	model = "Huawei EchoLife HG622";
 	compatible = "huawei,echolife-hg622", "brcm,bcm6368";
 
 	chosen {
diff --git a/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg655b.dts b/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg655b.dts
index 10fdcc6fd1..3f855bf0c9 100644
--- a/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg655b.dts
+++ b/target/linux/brcm63xx/dts/bcm6368_huawei_echolife-hg655b.dts
@@ -5,7 +5,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "Huawei HG655b";
+	model = "Huawei EchoLife HG655b";
 	compatible = "huawei,echolife-hg655b", "brcm,bcm6368";
 
 	chosen {
diff --git a/target/linux/brcm63xx/image/bcm63xx.mk b/target/linux/brcm63xx/image/bcm63xx.mk
index 8c58c25617..f6937d6787 100644
--- a/target/linux/brcm63xx/image/bcm63xx.mk
+++ b/target/linux/brcm63xx/image/bcm63xx.mk
@@ -974,7 +974,7 @@ TARGET_DEVICES += sercomm_ad1018-nor
 define Device/sfr_neufbox-4-sercomm-r0
   $(Device/bcm63xx)
   DEVICE_VENDOR := SFR
-  DEVICE_MODEL := Neufbox4
+  DEVICE_MODEL := Neufbox 4
   DEVICE_VARIANT := Sercomm
   CFE_BOARD_ID := 96358VW
   CFE_CHIP_ID := 6358
@@ -986,7 +986,7 @@ TARGET_DEVICES += sfr_neufbox-4-sercomm-r0
 define Device/sfr_neufbox-4-foxconn-r1
   $(Device/bcm63xx)
   DEVICE_VENDOR := SFR
-  DEVICE_MODEL := Neufbox4
+  DEVICE_MODEL := Neufbox 4
   DEVICE_VARIANT := Foxconn
   CFE_BOARD_ID := 96358VW
   CFE_CHIP_ID := 6358
@@ -998,7 +998,7 @@ TARGET_DEVICES += sfr_neufbox-4-foxconn-r1
 define Device/sfr_neufbox-6-sercomm-r0
   $(Device/bcm63xx)
   DEVICE_VENDOR := SFR
-  DEVICE_MODEL := Neufbox6
+  DEVICE_MODEL := Neufbox 6
   CFE_BOARD_ID := NB6-SER-r0
   CFE_CHIP_ID := 6362
   CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))"
@@ -1121,7 +1121,7 @@ TARGET_DEVICES += tp-link_td-w8900gb
 define Device/usrobotics_usr9108
   $(Device/bcm63xx)
   DEVICE_VENDOR := USRobotics
-  DEVICE_MODEL := 9108
+  DEVICE_MODEL := USR9108
   CFE_BOARD_ID := 96348GW-A
   CFE_CHIP_ID := 6348
   DEVICE_PACKAGES := $(B43_PACKAGES) $(USB1_PACKAGES)
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From g.m0n3y.2503 at gmail.com  Mon Dec 30 21:01:35 2019
From: g.m0n3y.2503 at gmail.com (Gerard Ryan)
Date: Tue, 31 Dec 2019 12:01:35 +1000
Subject: [OpenWrt-Devel] [OpenWrt-Devel, OpenWrt-Devel, V3,
 2/2] kmodloader: added -a arg to modprobe
Message-ID: <20191231020135.2083-1-G.M0N3Y.2503@gmail.com>

-a treats all non-op trailing arguments as module names
and attempts to load all of them. This behaviour mirrors the behaviour
of the respective -a in /tools/modprobe.c from https://git.kernel.org.

This is primarily to satiate the multiple modules passed by
docker/libnetwork.

Signed-off-by: Gerard Ryan <G.M0N3Y.2503 at gmail.com>
---

Compile tested: x86_x64, Hyper-V, OpenWrt Master
Run tested: x86_x64, Hyper-V, OpenWrt Master

You can also find this patch on GitHub if you prefer.
https://github.com/G-M0N3Y-2503/openwrt-ubox-mirror/tree/feature_extend_modprobe_options

Since https://patchwork.ozlabs.org/patch/1175792/ I adjusted some whitespace to indent more consistently and split the patch by the args they implement.
Since https://patchwork.ozlabs.org/patch/1179955/ I reworded the commit message to explain the functionality of -a
Since https://patchwork.ozlabs.org/patch/1181166/ Stylistic changes to do with exit codes

 kmodloader.c | 68 +++++++++++++++++++++++++++++-----------------------
 1 file changed, 38 insertions(+), 30 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index 07b6700..d6d2910 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -681,6 +681,7 @@ static int print_modprobe_usage(void)
 	ULOG_INFO(
 		"Usage:\n"
 		"\tmodprobe [-q] [-v] filename\n"
+		"\tmodprobe -a [-q] [-v] filename [filename...]\n"
 	);

 	return -1;
@@ -856,14 +857,18 @@ static int main_modprobe(int argc, char **argv)
 {
 	struct module_node *mn;
 	struct module *m;
-	char *name;
-	char *mod = NULL;
+	int exit_code = 0;
+	int load_fail;
 	int log_level = LOG_WARNING;
 	int opt;
 	bool quiet = false;
+	bool use_all = false;

-	while ((opt = getopt(argc, argv, "qv")) != -1 ) {
+	while ((opt = getopt(argc, argv, "aqv")) != -1 ) {
 		switch (opt) {
+			case 'a':
+				use_all = true;
+				break;
 			case 'q': /* shhhh! */
 				quiet = true;
 				break;
@@ -882,48 +887,51 @@ static int main_modprobe(int argc, char **argv)
 	/* after print_modprobe_usage() so it won't be filtered out */
 	ulog_threshold(log_level);

-	mod = argv[optind];
-
 	if (scan_module_folders())
 		return -1;

 	if (scan_loaded_modules())
 		return -1;

-	name = get_module_name(mod);
-	m = find_module(name);
-	if (m && m->state == LOADED) {
-		if (!quiet)
-			ULOG_ERR("%s is already loaded\n", name);
-		return 0;
-	} else if (!m) {
-		if (!quiet)
-			ULOG_ERR("failed to find a module named %s\n", name);
-		return -1;
-	} else {
-		int fail;
+	do {
+		char *name;

-		m->state = PROBE;
+		name = get_module_name(argv[optind]);
+		m = find_module(name);

-		fail = load_modprobe(true);
+		if (m && m->state == LOADED) {
+			if (!quiet)
+				ULOG_INFO("%s is already loaded\n", name);
+		} else if (!m) {
+			if (!quiet)
+				ULOG_ERR("failed to find a module named %s\n", name);
+			exit_code = -1;
+		} else {
+			m->state = PROBE;
+		}

-		if (fail) {
-			ULOG_ERR("%d module%s could not be probed\n",
-			         fail, (fail == 1) ? ("") : ("s"));
+		optind++;
+	} while (use_all && optind < argc);

-			avl_for_each_element(&modules, mn, avl) {
-				if (mn->is_alias)
-					continue;
-				m = mn->m;
-				if ((m->state == PROBE) || m->error)
-					ULOG_ERR("- %s\n", m->name);
-			}
+	load_fail = load_modprobe(true);
+	if (load_fail) {
+		ULOG_ERR("%d module%s could not be probed\n",
+		         load_fail, (load_fail == 1) ? ("") : ("s"));
+
+		avl_for_each_element(&modules, mn, avl) {
+			if (mn->is_alias)
+				continue;
+			m = mn->m;
+			if ((m->state == PROBE) || m->error)
+				ULOG_ERR("- %s\n", m->name);
 		}
+
+		exit_code = -1;
 	}

 	free_modules();

-	return 0;
+	return exit_code;
 }

 static int main_loader(int argc, char **argv)
--
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 21:16:25 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 18:16:25 -0800
Subject: [OpenWrt-Devel] [PATCH 1/2] scripts/flashing: Switch from echo -en
 to printf
Message-ID: <20191231021626.47613-1-rosenp@gmail.com>

echo flags are an extension and not available with sh. printf does the
same as -en.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/flashing/flash.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/flashing/flash.sh b/scripts/flashing/flash.sh
index 7f2cdf5db9..aea1bf1568 100755
--- a/scripts/flashing/flash.sh
+++ b/scripts/flashing/flash.sh
@@ -51,16 +51,16 @@ EOF
 fi
 if [ "$2" = "asus" ]; then
 echo Confirming IP address setting...
-echo -en "get ASUSSPACELINK\x01\x01\xa8\xc0 /dev/null\nquit\n" | tftp 192.168.1.1
+printf "get ASUSSPACELINK\x01\x01\xa8\xc0 /dev/null\nquit\n" | tftp 192.168.1.1
 echo Flashing 192.168.1.1 using "$1"...
-echo -en "binary\nput $1 ASUSSPACELINK\nquit\n" | tftp 192.168.1.1
+printf "binary\nput %s ASUSSPACELINK\nquit\n" "$1" | tftp 192.168.1.1
 echo Please wait until leds stops flashing. 
 elif [ "$2" = "linksys" ]; then
 echo Flashing 192.168.1.1 using "$1"...
-echo -en "rexmt 1\ntrace\nbinary\nput $1\nquit\n" | tftp 192.168.1.1
+printf "rexmt 1\ntrace\nbinary\nput %s\nquit\n" "$1" | tftp 192.168.1.1
 echo Please wait until power led stops flashing. Do not poweroff! Then you can login via telnet 192.168.1.1.
 elif [ "$2" = "toshiba" ]; then
 echo Flashing 192.168.10.1 using "$1"...
-echo -en "rexmt 1\ntrace\nbinary\nput $1\nquit\n" | tftp 192.168.10.1
+printf "rexmt 1\ntrace\nbinary\nput %s\nquit\n" "$1" | tftp 192.168.10.1
 echo Unit will automatically reboot within 5 minutes.  Do not power off.  Then you can login via telnet 192.168.10.1.
 fi
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 21:16:26 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 18:16:26 -0800
Subject: [OpenWrt-Devel] [PATCH 2/2] scripts/flashing: Switch to /bin/sh
In-Reply-To: <20191231021626.47613-1-rosenp@gmail.com>
References: <20191231021626.47613-1-rosenp@gmail.com>
Message-ID: <20191231021626.47613-2-rosenp@gmail.com>

The script no longer uses any features that necessitate bash.

Also removed trailing whitespace.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/flashing/flash.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/flashing/flash.sh b/scripts/flashing/flash.sh
index aea1bf1568..6266a49dc1 100755
--- a/scripts/flashing/flash.sh
+++ b/scripts/flashing/flash.sh
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
 #
-# tftp flash script for wireless routers 
+# tftp flash script for wireless routers
 #
 # Copyright (C) 2004 by Oleg I. Vdovikin <oleg at cs.msu.su>
 # Copyright (C) 2005 by Waldemar Brodkorb <wbx at openwrt.org>
@@ -24,10 +24,10 @@ if [ -z "$1" ] || [ ! -f "$1" ] || [ -z "$2" ]; then
     echo Usage: "$0" firmware vendor
 cat << EOF
 IMPORTANT:
-Notes for Linksys / Asus WL500gx router: 
+Notes for Linksys / Asus WL500gx router:
    be sure you have set boot_wait to yes. Power on your router
    after executing this script.
- 
+
 Notes for Asus WL500g router:
    be sure POWER led is flashing (If this is not the case
    poweroff the device, push the reset button & power on
@@ -54,7 +54,7 @@ echo Confirming IP address setting...
 printf "get ASUSSPACELINK\x01\x01\xa8\xc0 /dev/null\nquit\n" | tftp 192.168.1.1
 echo Flashing 192.168.1.1 using "$1"...
 printf "binary\nput %s ASUSSPACELINK\nquit\n" "$1" | tftp 192.168.1.1
-echo Please wait until leds stops flashing. 
+echo Please wait until leds stops flashing.
 elif [ "$2" = "linksys" ]; then
 echo Flashing 192.168.1.1 using "$1"...
 printf "rexmt 1\ntrace\nbinary\nput %s\nquit\n" "$1" | tftp 192.168.1.1
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 21:18:03 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 18:18:03 -0800
Subject: [OpenWrt-Devel] [PATCH 1/2] scripts/strip-kmod.sh: Replace legacy
 `` with $()
Message-ID: <20191231021804.47805-1-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/strip-kmod.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/strip-kmod.sh b/scripts/strip-kmod.sh
index 313015b909..7886cd907f 100755
--- a/scripts/strip-kmod.sh
+++ b/scripts/strip-kmod.sh
@@ -50,6 +50,6 @@ $3 && $2 ~ /[brtd]/ && $3 !~ /\$LC/ && !def[$3] {
 }
 ' > "$MODULE.tmp1"
 
-${CROSS}objcopy `cat ${MODULE}.tmp1` ${MODULE}.tmp ${MODULE}.out
+${CROSS}objcopy $(cat ${MODULE}.tmp1) ${MODULE}.tmp ${MODULE}.out
 mv "${MODULE}.out" "${MODULE}"
 rm -f "${MODULE}".t*
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 21:18:04 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 18:18:04 -0800
Subject: [OpenWrt-Devel] [PATCH 2/2] scripts/strip-kmod.sh: Use sh instead
 of bash
In-Reply-To: <20191231021804.47805-1-rosenp@gmail.com>
References: <20191231021804.47805-1-rosenp@gmail.com>
Message-ID: <20191231021804.47805-2-rosenp@gmail.com>

There's nothing bash specific here.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/strip-kmod.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/strip-kmod.sh b/scripts/strip-kmod.sh
index 7886cd907f..28be35ea7c 100755
--- a/scripts/strip-kmod.sh
+++ b/scripts/strip-kmod.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 [ -n "$CROSS" ] || {
 	echo "The variable CROSS must be set to point to the cross-compiler prefix"
 	exit 1
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 21:19:08 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 18:19:08 -0800
Subject: [OpenWrt-Devel] [PATCH 1/2] scripts/strip-kmod.sh: Replace legacy
 `` with $()
Message-ID: <20191231021910.47929-1-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/strip-kmod.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/strip-kmod.sh b/scripts/strip-kmod.sh
index 313015b909..7886cd907f 100755
--- a/scripts/strip-kmod.sh
+++ b/scripts/strip-kmod.sh
@@ -50,6 +50,6 @@ $3 && $2 ~ /[brtd]/ && $3 !~ /\$LC/ && !def[$3] {
 }
 ' > "$MODULE.tmp1"
 
-${CROSS}objcopy `cat ${MODULE}.tmp1` ${MODULE}.tmp ${MODULE}.out
+${CROSS}objcopy $(cat ${MODULE}.tmp1) ${MODULE}.tmp ${MODULE}.out
 mv "${MODULE}.out" "${MODULE}"
 rm -f "${MODULE}".t*
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 21:19:29 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 18:19:29 -0800
Subject: [OpenWrt-Devel] [PATCH] scripts/symlink-tree.sh: Use /bin/sh
Message-ID: <20191231021929.48012-1-rosenp@gmail.com>

This uses nothing bash specific.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/symlink-tree.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/symlink-tree.sh b/scripts/symlink-tree.sh
index aa169e2455..6ed91dfb5a 100755
--- a/scripts/symlink-tree.sh
+++ b/scripts/symlink-tree.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 # Create a new openwrt tree with symlinks pointing at the current tree
 # Usage: ./scripts/symlink-tree.sh <destination>
 
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 21:21:36 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 18:21:36 -0800
Subject: [OpenWrt-Devel] [PATCH 1/5] scripts/mkits.sh: Replace legacy ``
 with $()
Message-ID: <20191231022140.48222-1-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/mkits.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index 93c8cedaed..32a978e18d 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -15,7 +15,7 @@
 #
 
 usage() {
-	echo "Usage: `basename $0` -A arch -C comp -a addr -e entry" \
+	echo "Usage: $(basename $0) -A arch -C comp -a addr -e entry" \
 		"-v version -k kernel [-D name -d dtb] -o its_file"
 	echo -e "\t-A ==> set architecture to 'arch'"
 	echo -e "\t-C ==> set compression type 'comp'"
@@ -55,7 +55,7 @@ if [ -z "${ARCH}" ] || [ -z "${COMPRESS}" ] || [ -z "${LOAD_ADDR}" ] || \
 	usage
 fi
 
-ARCH_UPPER=`echo $ARCH | tr '[:lower:]' '[:upper:]'`
+ARCH_UPPER=$(echo $ARCH | tr '[:lower:]' '[:upper:]')
 
 # Conditionally create fdt information
 if [ -n "${DTB}" ]; then
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 21:21:37 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 18:21:37 -0800
Subject: [OpenWrt-Devel] [PATCH 2/5] scripts/mkits.sh: replace echo -e with
 printf
In-Reply-To: <20191231022140.48222-1-rosenp@gmail.com>
References: <20191231022140.48222-1-rosenp@gmail.com>
Message-ID: <20191231022140.48222-2-rosenp@gmail.com>

echo flags are not POSIX. printf does the same with added \n.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/mkits.sh | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index 32a978e18d..def3d3c7c2 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -15,18 +15,18 @@
 #
 
 usage() {
-	echo "Usage: $(basename $0) -A arch -C comp -a addr -e entry" \
-		"-v version -k kernel [-D name -d dtb] -o its_file"
-	echo -e "\t-A ==> set architecture to 'arch'"
-	echo -e "\t-C ==> set compression type 'comp'"
-	echo -e "\t-c ==> set config name 'config'"
-	echo -e "\t-a ==> set load address to 'addr' (hex)"
-	echo -e "\t-e ==> set entry point to 'entry' (hex)"
-	echo -e "\t-v ==> set kernel version to 'version'"
-	echo -e "\t-k ==> include kernel image 'kernel'"
-	echo -e "\t-D ==> human friendly Device Tree Blob 'name'"
-	echo -e "\t-d ==> include Device Tree Blob 'dtb'"
-	echo -e "\t-o ==> create output file 'its_file'"
+	printf "Usage: %s -A arch -C comp -a addr -e entry -v version"\
+		 "-k kernel [-D name -d dtb] -o its_file" "$(basename $0)"
+	printf "\n\t-A ==> set architecture to 'arch'"
+	printf "\n\t-C ==> set compression type 'comp'"
+	printf "\n\t-c ==> set config name 'config'"
+	printf "\n\t-a ==> set load address to 'addr' (hex)"
+	printf "\n\t-e ==> set entry point to 'entry' (hex)"
+	printf "\n\t-v ==> set kernel version to 'version'"
+	printf "\n\t-k ==> include kernel image 'kernel'"
+	printf "\n\t-D ==> human friendly Device Tree Blob 'name'"
+	printf "\n\t-d ==> include Device Tree Blob 'dtb'"
+	printf "\n\t-o ==> create output file 'its_file'\n"
 	exit 1
 }
 
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 21:21:38 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 18:21:38 -0800
Subject: [OpenWrt-Devel] [PATCH 3/5] scripts/mkits.sh Add missing quotes
In-Reply-To: <20191231022140.48222-1-rosenp@gmail.com>
References: <20191231022140.48222-1-rosenp@gmail.com>
Message-ID: <20191231022140.48222-3-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/mkits.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index def3d3c7c2..53b9ec5f20 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -55,7 +55,7 @@ if [ -z "${ARCH}" ] || [ -z "${COMPRESS}" ] || [ -z "${LOAD_ADDR}" ] || \
 	usage
 fi
 
-ARCH_UPPER=$(echo $ARCH | tr '[:lower:]' '[:upper:]')
+ARCH_UPPER=$(echo "$ARCH" | tr '[:lower:]' '[:upper:]')
 
 # Conditionally create fdt information
 if [ -n "${DTB}" ]; then
@@ -115,4 +115,4 @@ ${FDT_NODE}
 };"
 
 # Write .its file to disk
-echo "$DATA" > ${OUTPUT}
+echo "$DATA" > "${OUTPUT}"
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 21:21:39 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 18:21:39 -0800
Subject: [OpenWrt-Devel] [PATCH 4/5] scripts/mkits.sh: Fix improper string
 and array concatenation
In-Reply-To: <20191231022140.48222-1-rosenp@gmail.com>
References: <20191231022140.48222-1-rosenp@gmail.com>
Message-ID: <20191231022140.48222-4-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/mkits.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index 53b9ec5f20..c09e537dbd 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -43,7 +43,7 @@ do
 		k ) KERNEL=$OPTARG;;
 		o ) OUTPUT=$OPTARG;;
 		v ) VERSION=$OPTARG;;
-		* ) echo "Invalid option passed to '$0' (options:$@)"
+		* ) echo "Invalid option passed to '$0' (options:$*)"
 		usage;;
 	esac
 done
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 21:21:40 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 18:21:40 -0800
Subject: [OpenWrt-Devel] [PATCH 5/5] scripts/mkits.sh: Switch from bash to sh
In-Reply-To: <20191231022140.48222-1-rosenp@gmail.com>
References: <20191231022140.48222-1-rosenp@gmail.com>
Message-ID: <20191231022140.48222-5-rosenp@gmail.com>

This no longer needs bash.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/mkits.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index c09e537dbd..62cfc21c6b 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 #
 # Licensed under the terms of the GNU GPL License version 2 or later.
 #
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 22:24:01 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 19:24:01 -0800
Subject: [OpenWrt-Devel] [PATCH] trace-cmd: Fix compilation without
 fortify-headers
Message-ID: <20191231032401.79465-1-rosenp@gmail.com>

Upstream backport.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/devel/trace-cmd/Makefile              |  2 +-
 .../devel/trace-cmd/patches/120-limits.patch  | 26 +++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 package/devel/trace-cmd/patches/120-limits.patch

diff --git a/package/devel/trace-cmd/Makefile b/package/devel/trace-cmd/Makefile
index 6d3fe53758..25831d8b1b 100644
--- a/package/devel/trace-cmd/Makefile
+++ b/package/devel/trace-cmd/Makefile
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=trace-cmd
 PKG_VERSION:=v2.6.1
-PKG_RELEASE=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/
diff --git a/package/devel/trace-cmd/patches/120-limits.patch b/package/devel/trace-cmd/patches/120-limits.patch
new file mode 100644
index 0000000000..66e26b8934
--- /dev/null
+++ b/package/devel/trace-cmd/patches/120-limits.patch
@@ -0,0 +1,26 @@
+From 293ff6d5bc9d3b8bfbc3c57d20d3d2d00986c168 Mon Sep 17 00:00:00 2001
+From: Alexander Couzens <lynxis at fe80.eu>
+Date: Sun, 26 Nov 2017 05:22:51 +0100
+Subject: [PATCH] trace-cmd listen: Include limits.h to define PATH_MAX
+
+PATH_MAX is defined by limits.h. On some system it's also
+defined by dirent.h but not on musl.
+
+Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
+Signed-off-by: Steven Rostedt (VMware) <rostedt at goodmis.org>
+---
+ trace-listen.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/trace-listen.c b/trace-listen.c
+index 871df0e7..8cc0c64b 100644
+--- a/trace-listen.c
++++ b/trace-listen.c
+@@ -23,6 +23,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <getopt.h>
++#include <limits.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/wait.h>
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Mon Dec 30 22:26:55 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Mon, 30 Dec 2019 19:26:55 -0800
Subject: [OpenWrt-Devel] [PATCH] lldpd: Fix compilation without
 fortify-headers
Message-ID: <20191231032655.79913-1-rosenp@gmail.com>

Upstream backport.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/network/services/lldpd/Makefile       |  2 +-
 .../services/lldpd/patches/010-limits.patch   | 21 +++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 package/network/services/lldpd/patches/010-limits.patch

diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile
index 5b36155b71..eb1fe6539d 100644
--- a/package/network/services/lldpd/Makefile
+++ b/package/network/services/lldpd/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lldpd
 PKG_VERSION:=1.0.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://media.luffy.cx/files/lldpd
diff --git a/package/network/services/lldpd/patches/010-limits.patch b/package/network/services/lldpd/patches/010-limits.patch
new file mode 100644
index 0000000000..26d5078669
--- /dev/null
+++ b/package/network/services/lldpd/patches/010-limits.patch
@@ -0,0 +1,21 @@
+From b2eebb31fc21b5ce12ef8944b50088119f1b9427 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git at soeren-tempel.net>
+Date: Mon, 25 Mar 2019 18:43:03 +0100
+Subject: [PATCH] priv: include limits.h for PATH_MAX
+
+---
+ src/daemon/priv.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/daemon/priv.c b/src/daemon/priv.c
+index f4d6bdf4..ba5ae58c 100644
+--- a/src/daemon/priv.c
++++ b/src/daemon/priv.c
+@@ -27,6 +27,7 @@
+ #include <unistd.h>
+ #include <signal.h>
+ #include <errno.h>
++#include <limits.h>
+ #include <sys/wait.h>
+ #include <sys/stat.h>
+ #include <sys/socket.h>
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From openwrt-devel at lists.openwrt.org  Tue Dec 31 03:42:53 2019
From: openwrt-devel at lists.openwrt.org (=?utf-8?q?Petr_Nov=C3=A1k_via_openwrt-devel?=)
Date: Tue, 31 Dec 2019 09:42:53 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <20191230225631.GJ70184@meh.true.cz>
References: <mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org>
 <20191229222123.GH70184@meh.true.cz> <20191230190746.GI70184@meh.true.cz>
 <357266D6-1E26-4066-AFE5-746C2407B0DF@me.com>
 <20191230225631.GJ70184@meh.true.cz>
Message-ID: <mailman.21498.1577781781.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: =?utf-8?Q?Petr_Nov=C3=A1k?= <petrn at me.com>
Subject: Re: [OpenWrt-Devel] Sysupgrade possibly broken in recent development snapshots: "message": "Firmware image couldn't be validated"
Date: Tue, 31 Dec 2019 09:42:53 +0100
Size: 7645
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191231/f829c7c5/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Tue Dec 31 04:58:01 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Tue, 31 Dec 2019 10:58:01 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <D18390C9-BACD-441C-BC1F-41CD9B01634E@me.com>
References: <mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org>
 <20191229222123.GH70184@meh.true.cz>
 <20191230190746.GI70184@meh.true.cz>
 <357266D6-1E26-4066-AFE5-746C2407B0DF@me.com>
 <20191230225631.GJ70184@meh.true.cz>
 <D18390C9-BACD-441C-BC1F-41CD9B01634E@me.com>
Message-ID: <20191231095801.GK70184@meh.true.cz>

Petr Nov?k <petrn at me.com> [2019-12-31 09:42:53]:

> root at OpenWrt:~# sysupgrade -v https://downloads.openwrt.org/snapshots/targets/brcm2708/bcm2711/openwrt-brcm2708-bcm2711-rpi-4-ext4-sysupgrade.img.gz
> wget: SSL support not available, please install one of the libustream-.*[ssl|tls] packages as well as the ca-bundle and ca-certificates packages.

use http:// or install the recommended packages in order to be able to use
https://

> Image metadata not found
> Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware
> Reading partition table from bootdisk...
> Reading partition table from image...
> Invalid partition table on /tmp/image.bs
> Failed to parse message data
> sh: out of range

The download of firmware image has failed, but the sysupgrade process
continues, so this errors are "expected", following patch[1] should fix some
of this.

1. https://git.openwrt.org/6dbaf71411e7f16cc1c920b6a63bbe33ef2b8921

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Tue Dec 31 05:03:23 2019
From: openwrt-devel at lists.openwrt.org (=?utf-8?q?Petr_Nov=C3=A1k_via_openwrt-devel?=)
Date: Tue, 31 Dec 2019 11:03:23 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <20191231095801.GK70184@meh.true.cz>
References: <mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org>
 <20191229222123.GH70184@meh.true.cz> <20191230190746.GI70184@meh.true.cz>
 <357266D6-1E26-4066-AFE5-746C2407B0DF@me.com>
 <20191230225631.GJ70184@meh.true.cz>
 <D18390C9-BACD-441C-BC1F-41CD9B01634E@me.com>
 <20191231095801.GK70184@meh.true.cz>
Message-ID: <mailman.21522.1577786613.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: =?utf-8?Q?Petr_Nov=C3=A1k?= <petrn at me.com>
Subject: Re: [OpenWrt-Devel] Sysupgrade possibly broken in recent development snapshots: "message": "Firmware image couldn't be validated"
Date: Tue, 31 Dec 2019 11:03:23 +0100
Size: 7321
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191231/1c0b46a9/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From mail at adrianschmutzler.de  Tue Dec 31 05:36:01 2019
From: mail at adrianschmutzler.de (mail at adrianschmutzler.de)
Date: Tue, 31 Dec 2019 11:36:01 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] scripts/strip-kmod.sh: Replace
 legacy `` with $()
In-Reply-To: <20191231021804.47805-1-rosenp@gmail.com>
References: <20191231021804.47805-1-rosenp@gmail.com>
Message-ID: <002c01d5bfc6$195665a0$4c0330e0$@adrianschmutzler.de>

Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Rosen Penev
> Sent: Dienstag, 31. Dezember 2019 03:18
> To: openwrt-devel at lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH 1/2] scripts/strip-kmod.sh: Replace legacy
> `` with $()

Thanks for taking care of those issues.

Some comments for future submissions:
- Based on the submitting-patches rules the first word after the prefix in commit title has to be lower case (for this patch "Replace" -> "replace")
- If you change something in a target folder, the first prefix should be the name of the target ("mvebu:", "ramips:", etc.; not applicable to this patch). Maybe have a quick look at the relevant section of submitting-patches; I changed that manually when applying your last set of patches
- Even with simple changes like this one, it would be nice to have a one-sentence description _why_ they are needed.
- Finally, personally, I tend to prevent having special characters in the commit title. Thus, I would prefer using the word "backticks" instead of putting "``" directly into the commit title.

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191231/63a04b52/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From ynezz at true.cz  Tue Dec 31 08:49:25 2019
From: ynezz at true.cz (Petr =?utf-8?Q?=C5=A0tetiar?=)
Date: Tue, 31 Dec 2019 14:49:25 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <46C7C775-CDBB-4E84-8C7F-A0F949F1F981@me.com>
References: <mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org>
 <20191229222123.GH70184@meh.true.cz>
 <20191230190746.GI70184@meh.true.cz>
 <357266D6-1E26-4066-AFE5-746C2407B0DF@me.com>
 <20191230225631.GJ70184@meh.true.cz>
 <D18390C9-BACD-441C-BC1F-41CD9B01634E@me.com>
 <20191231095801.GK70184@meh.true.cz>
 <46C7C775-CDBB-4E84-8C7F-A0F949F1F981@me.com>
Message-ID: <20191231134925.GL70184@meh.true.cz>

Petr Nov?k <petrn at me.com> [2019-12-31 11:03:23]:

> root at OpenWrt:/tmp# sysupgrade -v openwrt-brcm2708-bcm2711-rpi-4-ext4-sysupgrade.img.gz
> Reading partition table from bootdisk...
> Reading partition table from image...

This output is from /sbin/sysupgrade calling /usr/libexec/validate_firmware_image:

> {
> 	"tests": {
> 		"fwtool_signature": true,
> 		"fwtool_device_match": true
> 	},
> 	"valid": true,
> 	"forceable": true,
> 	"allow_backup": true
> }
> Saving config files...

...snip...

> Commencing upgrade. Closing all shell sessions.

and here should be same output from procd calling
/usr/libexec/validate_firmware_image, but it is missing as probably procd
consumes the stderr output, so probably something like this is needed:

 diff --git a/package/base-files/files/usr/libexec/validate_firmware_image
 b/package/base-files/files/usr/libexec/validate_firmware_image
 index f85fb9e4b435..754d53b2edfe 100755
 --- a/package/base-files/files/usr/libexec/validate_firmware_image
 +++ b/package/base-files/files/usr/libexec/validate_firmware_image
 @@ -62,5 +62,6 @@ json_init
 	json_add_boolean valid "$VALID"
 	json_add_boolean forceable "$FORCEABLE"
 	json_add_boolean allow_backup "$ALLOW_BACKUP"
 +json_dump -i >> /tmp/vfi-json.log
  json_dump -i
  json_set_namespace $old_ns

and then run:

 $ ubus monitor &
 $ sysupgrade -v openwrt-brcm2708-bcm2711-rpi-4-ext4-sysupgrade.img.gz
 $ cat /tmp/vfi-json.log

-- ynezz

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From openwrt-devel at lists.openwrt.org  Tue Dec 31 08:56:13 2019
From: openwrt-devel at lists.openwrt.org (=?utf-8?q?Petr_Nov=C3=A1k_via_openwrt-devel?=)
Date: Tue, 31 Dec 2019 14:56:13 +0100
Subject: [OpenWrt-Devel] Sysupgrade possibly broken in recent
 development snapshots: "message": "Firmware image couldn't be validated"
In-Reply-To: <20191231134925.GL70184@meh.true.cz>
References: <mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org>
 <20191229222123.GH70184@meh.true.cz> <20191230190746.GI70184@meh.true.cz>
 <357266D6-1E26-4066-AFE5-746C2407B0DF@me.com>
 <20191230225631.GJ70184@meh.true.cz>
 <D18390C9-BACD-441C-BC1F-41CD9B01634E@me.com>
 <20191231095801.GK70184@meh.true.cz>
 <46C7C775-CDBB-4E84-8C7F-A0F949F1F981@me.com>
 <20191231134925.GL70184@meh.true.cz>
Message-ID: <mailman.21567.1577800581.2486.openwrt-devel@lists.openwrt.org>

The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
-------------- next part --------------
An embedded message was scrubbed...
From: =?utf-8?Q?Petr_Nov=C3=A1k?= <petrn at me.com>
Subject: Re: [OpenWrt-Devel] Sysupgrade possibly broken in recent development snapshots: "message": "Firmware image couldn't be validated"
Date: Tue, 31 Dec 2019 14:56:13 +0100
Size: 9388
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191231/b0ea56bc/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From fercerpav at gmail.com  Tue Dec 31 09:15:59 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Tue, 31 Dec 2019 17:15:59 +0300
Subject: [OpenWrt-Devel] Preserving configs over sysupgrade on
 ath79/tiny broken for some boards (on 19.07 and master), possible solutions
In-Reply-To: <bcd2f7e5-abad-3b9c-7a62-b79bd6b424a6@gmail.com>
References: <20191228140048.GO11377@home.paul.comp>
 <9f716d9b-4230-b3e0-7e38-78c4c4781a78@wwsnet.net>
 <36732b2f-c95a-5749-e028-653a9f8ea4f8@david-bauer.net>
 <bcd2f7e5-abad-3b9c-7a62-b79bd6b424a6@gmail.com>
Message-ID: <20191231141559.GP11377@home.paul.comp>

Hello gents,

On Mon, Dec 30, 2019 at 02:41:12PM +0100, Piotr Dymacz wrote:
> > On 12/30/19 12:42 PM, Jo-Philipp Wich wrote:
> > > Hi,
> > > 
> > > given that (binary release) support for 4MB devices will end with 19.07,
> > > I'd vote for reverting the 4K sector change in ath79 and stick with 64K
> > > ones as common denominator across the entire target. That will be the
> > > least invasive and most robust fix.
> > 
> > +1
> > 
> > IMHO this change is way to crucial to have it introduced this short before
> > the release is built. People who built images for their devices can introduce
> > 4K sectors to their own images. This way, we do't risk breaking boards.
> 
> +1

Are any of you using the affected TP-Link boards or ath79/tiny or
4 MiB devices in general? What features do you actually pack in them?
Do you plan to continue doing so past 19.XX release?

If no users speak up probably it's better to remove all the support
code altogether to avoid wasting maintainers' time on it?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dengqf6 at mail2.sysu.edu.cn  Tue Dec 31 09:30:44 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Tue, 31 Dec 2019 22:30:44 +0800
Subject: [OpenWrt-Devel] [PATCH] ramips: remove HiWiFi HC5661 non-existent
 5GHz LED
Message-ID: <20191231143044.17304-1-dengqf6@mail2.sysu.edu.cn>

HC5661 does not have 5GHz WiFi or LED
Fixes: e6e373d3480e ("ramips: Add DTS files for HiWiFi HC5x61 models")

Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
---
 target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts
index 185e045de1..074257ab86 100644
--- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts
@@ -30,10 +30,5 @@
 			label = "hc5661:blue:wlan2g";
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 		};
-
-		wlan5g {
-			label = "hc5661:blue:wlan5g";
-			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
-		};
 	};
 };
-- 
2.24.1




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From dengqf6 at mail2.sysu.edu.cn  Tue Dec 31 09:35:41 2019
From: dengqf6 at mail2.sysu.edu.cn (DENG Qingfang)
Date: Tue, 31 Dec 2019 22:35:41 +0800
Subject: [OpenWrt-Devel] [PATCH v2] ramips: mt7620: use throughput trigger
 on HiWiFi HC5x61
Message-ID: <20191231143541.17846-1-dengqf6@mail2.sysu.edu.cn>

Throughput trigger support for MT7620 has been added, so switch to it

Signed-off-by: DENG Qingfang <dengqf6 at mail2.sysu.edu.cn>
---
Change since v1:
  Split out non-existent LED removal part

Tested on HC5761
---
 target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts        | 1 +
 target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts        | 2 ++
 target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts        | 2 ++
 .../linux/ramips/mt7620/base-files/etc/board.d/01_leds   | 9 +--------
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts
index 074257ab86..452541137a 100644
--- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5661.dts
@@ -29,6 +29,7 @@
 		wlan2g {
 			label = "hc5661:blue:wlan2g";
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts
index 265f7d9bb1..33ef8dd2aa 100644
--- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5761.dts
@@ -29,11 +29,13 @@
 		wlan2g {
 			label = "hc5761:blue:wlan2g";
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
 		};
 
 		wlan5g {
 			label = "hc5761:blue:wlan5g";
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
index 73f1a4079a..83a3a67ed0 100644
--- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
@@ -24,6 +24,7 @@
 		wlan2g {
 			label = "hc5861:blue:wlan2g";
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
 		};
 
 		internet {
@@ -34,6 +35,7 @@
 		wlan5g {
 			label = "hc5861:blue:wlan5g";
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
 		};
 
 		turbo {
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
index 77a98fa095..02899d646d 100755
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
@@ -111,19 +111,12 @@ glinet,gl-mt300n|\
 glinet,gl-mt750)
 	set_wifi_led "$boardname:wlan"
 	;;
-hiwifi,hc5661)
-	ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x01"
-	set_wifi_led "$boardname:blue:wlan2g"
-	;;
+hiwifi,hc5661|\
 hiwifi,hc5761)
 	ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x01"
-	ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "wlan0"
-	ucidef_set_led_netdev "wifi2g" "wifi2g" "$boardname:blue:wlan2g" "wlan1"
 	;;
 hiwifi,hc5861)
 	ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x20"
-	ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "wlan0"
-	ucidef_set_led_netdev "wifi2g" "wifi2g" "$boardname:blue:wlan2g" "wlan1"
 	;;
 hnet,c108)
 	ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" "eth0"
-- 
2.24.1




_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at david-bauer.net  Tue Dec 31 10:20:29 2019
From: mail at david-bauer.net (David Bauer)
Date: Tue, 31 Dec 2019 16:20:29 +0100
Subject: [OpenWrt-Devel] Preserving configs over sysupgrade on
 ath79/tiny broken for some boards (on 19.07 and master), possible solutions
In-Reply-To: <20191231141559.GP11377@home.paul.comp>
References: <20191228140048.GO11377@home.paul.comp>
 <9f716d9b-4230-b3e0-7e38-78c4c4781a78@wwsnet.net>
 <36732b2f-c95a-5749-e028-653a9f8ea4f8@david-bauer.net>
 <bcd2f7e5-abad-3b9c-7a62-b79bd6b424a6@gmail.com>
 <20191231141559.GP11377@home.paul.comp>
Message-ID: <3dd75d93-e74f-6831-51f0-d2100fdbc1db@david-bauer.net>

Hello Paul,

On 12/31/19 3:15 PM, Paul Fertser wrote:
> Are any of you using the affected TP-Link boards or ath79/tiny or
> 4 MiB devices in general? What features do you actually pack in them?
> Do you plan to continue doing so past 19.XX release?

I think most regular developers do not really use 4M devices, as debugging them
becomes more and more annoying (my opinion). Support is still ongoing, however
release images will not be built for most (if not all), as a full build with LuCI
will not fit into the flash (even with 4K sector size).

> If no users speak up probably it's better to remove all the support
> code altogether to avoid wasting maintainers' time on it?

The code is not really an issue, as there's not much code dedicated for 4M
devices. It's mostly their device-tree, which is maintainable compared to the previous
ar71xx boardfiles.

As many people still use these 4M devices (see, for example, the forum) - i would refrain
from dropping support altogether, but you will need additional effort in form of building
the images yourself (any maybe optimizing the kernel for the specific board building
the image for).

That's at least my personal view on the current situation.

Best wishes
David

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From karlsberg at softart-ge.com  Tue Dec 31 10:23:05 2019
From: karlsberg at softart-ge.com (Reiner Karlsberg)
Date: Tue, 31 Dec 2019 22:23:05 +0700
Subject: [OpenWrt-Devel] Preserving configs over sysupgrade on
 ath79/tiny broken for some boards (on 19.07 and master), possible solutions
In-Reply-To: <20191231141559.GP11377@home.paul.comp>
References: <20191228140048.GO11377@home.paul.comp>
 <9f716d9b-4230-b3e0-7e38-78c4c4781a78@wwsnet.net>
 <36732b2f-c95a-5749-e028-653a9f8ea4f8@david-bauer.net>
 <bcd2f7e5-abad-3b9c-7a62-b79bd6b424a6@gmail.com>
 <20191231141559.GP11377@home.paul.comp>
Message-ID: <a7471bca-f5d3-d0b1-042b-6c3eef7620b1@softart-ge.com>

Am 31.12.2019 um 21:15 schrieb Paul Fertser:
> Hello gents,
> 
> On Mon, Dec 30, 2019 at 02:41:12PM +0100, Piotr Dymacz wrote:
>>> On 12/30/19 12:42 PM, Jo-Philipp Wich wrote:
>>>> Hi,
>>>>
>>>> given that (binary release) support for 4MB devices will end with 19.07,
>>>> I'd vote for reverting the 4K sector change in ath79 and stick with 64K
>>>> ones as common denominator across the entire target. That will be the
>>>> least invasive and most robust fix.
>>>
>>> +1
>>>
>>> IMHO this change is way to crucial to have it introduced this short before
>>> the release is built. People who built images for their devices can introduce
>>> 4K sectors to their own images. This way, we do't risk breaking boards.
>>
>> +1
> 
> Are any of you using the affected TP-Link boards or ath79/tiny or
> 4 MiB devices in general? What features do you actually pack in them?
> Do you plan to continue doing so past 19.XX release?
> 
> If no users speak up probably it's better to remove all the support
> code altogether to avoid wasting maintainers' time on it?
> 

I am supporting lot of smallest/cheapest TP-Links, running custom built current "tiny" image, or even 15.05, heavily 
shrinked down for 4MB flash.
No special packages installed, besides wireguard or coova-chilli.

All these devices installed in Asia or South America.
Past 19.xx it seems be to OK to drop support.



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Tue Dec 31 10:29:22 2019
From: fercerpav at gmail.com (Paul Fertser)
Date: Tue, 31 Dec 2019 18:29:22 +0300
Subject: [OpenWrt-Devel] Preserving configs over sysupgrade on
 ath79/tiny broken for some boards (on 19.07 and master), possible solutions
In-Reply-To: <3dd75d93-e74f-6831-51f0-d2100fdbc1db@david-bauer.net>
References: <20191228140048.GO11377@home.paul.comp>
 <9f716d9b-4230-b3e0-7e38-78c4c4781a78@wwsnet.net>
 <36732b2f-c95a-5749-e028-653a9f8ea4f8@david-bauer.net>
 <bcd2f7e5-abad-3b9c-7a62-b79bd6b424a6@gmail.com>
 <20191231141559.GP11377@home.paul.comp>
 <3dd75d93-e74f-6831-51f0-d2100fdbc1db@david-bauer.net>
Message-ID: <20191231152922.GQ11377@home.paul.comp>

Hello David,

On Tue, Dec 31, 2019 at 04:20:29PM +0100, David Bauer wrote:
> > If no users speak up probably it's better to remove all the support
> > code altogether to avoid wasting maintainers' time on it?
> 
> The code is not really an issue, as there's not much code dedicated for 4M
> devices. It's mostly their device-tree, which is maintainable compared to the previous
> ar71xx boardfiles.

It's still an effort. People spend time writing patches, reviewers
spend time reviewing, maintainers spend time merging and we're now
spending time discussing.

> As many people still use these 4M devices

Judging by the amount of replies from active users to my mail
(apparently zero), not many. Probably those who're using do not plan
to upgrade firmware so can't care less. Probably they're perfectly
fine with sysupgrade not keeping configs on those odd inconsistent
tplink boards. If they are not speaking up, I'd say keeping the target
is actually harmful.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Tue Dec 31 12:04:53 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 31 Dec 2019 18:04:53 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] treewide: move mktplinkfw to
 tplink-v1-image in image-commands.mk
Message-ID: <20191231170454.31452-1-freifunk@adrianschmutzler.de>

This move the slightly different target-specific implementations of
mktplinkfw from the targets to include/image-commands.mk and renames
it to tplink-v1-image. Having a common version will increase
consistency between implementation and will complete the
tplink build command already present in the new location.

Due to the slight differences of the original implementations, this
also does some adjustments to the device build commands/variables.

Tested on:
- TL-WDR4300 v1 (ath79, factory)
- TL-WDR4900 v1 (mpc85xx, sysupgrade)

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 include/image-commands.mk                   | 18 ++++++++++++++
 target/linux/ath79/image/common-tp-link.mk  | 23 ++----------------
 target/linux/ath79/image/generic-tp-link.mk |  8 +++---
 target/linux/ath79/image/tiny-tp-link.mk    | 14 +++++------
 target/linux/mpc85xx/image/Makefile         | 27 +++------------------
 target/linux/ramips/image/mt7620.mk         | 21 ++--------------
 6 files changed, 37 insertions(+), 74 deletions(-)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index 5dfd6a2c2f..5c2126e7f7 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -335,6 +335,24 @@ define Build/tplink-v1-header
 	@mv $@.new $@
 endef
 
+# combine kernel and rootfs into one image
+# mktplinkfw <type> <optional extra arguments to mktplinkfw binary>
+# <type> is "sysupgrade" or "factory"
+#
+# -a align the rootfs start on an <align> bytes boundary
+# -j add jffs2 end-of-filesystem markers
+# -s strip padding from end of the image
+# -X reserve <size> bytes in the firmware image (hexval prefixed with 0x)
+define Build/tplink-v1-image
+	-$(STAGING_DIR_HOST)/bin/mktplinkfw \
+		-H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) \
+		-N "$(VERSION_DIST)" -V $(REVISION) -m $(TPLINK_HEADER_VERSION) \
+		-k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new -j -X 0x40000 \
+		-a $(call rootfs_align,$(FILESYSTEM)) \
+		$(wordlist 2,$(words $(1)),$(1)) \
+		$(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
+endef
+
 define Build/tplink-v2-header
 	$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
 		-c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk
index 0dc58191a8..87fc922b3b 100644
--- a/target/linux/ath79/image/common-tp-link.mk
+++ b/target/linux/ath79/image/common-tp-link.mk
@@ -5,24 +5,6 @@ define rootfs_align
 $(patsubst %-256k,0x40000,$(patsubst %-128k,0x20000,$(patsubst %-64k,0x10000,$(patsubst squashfs%,0x4,$(patsubst root.%,%,$(1))))))
 endef
 
-# combine kernel and rootfs into one image
-# mktplinkfw <type> <optional extra arguments to mktplinkfw binary>
-# <type> is "sysupgrade" or "factory"
-#
-# -a align the rootfs start on an <align> bytes boundary
-# -j add jffs2 end-of-filesystem markers
-# -s strip padding from end of the image
-# -X reserve <size> bytes in the firmware image (hexval prefixed with 0x)
-define Build/mktplinkfw
-	-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-		-H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) \
-		-N OpenWrt -V $(REVISION) -m $(TPLINK_HEADER_VERSION) \
-		-k $(IMAGE_KERNEL) -r $@ -o $@.new -j -X 0x40000 \
-		-a $(call rootfs_align,$(FILESYSTEM)) \
-		$(wordlist 2,$(words $(1)),$(1)) \
-		$(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
-endef
-
 # mktplinkfw-combined
 #
 # -c combined image
@@ -50,9 +32,8 @@ define Device/tplink
   KERNEL := kernel-bin | append-dtb | lzma
   KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-v1-header
   IMAGES += factory.bin
-  IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade | \
-	append-metadata
-  IMAGE/factory.bin := append-rootfs | mktplinkfw factory
+  IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade | append-metadata
+  IMAGE/factory.bin := tplink-v1-image factory
 endef
 
 define Device/tplink-nolzma
diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index 97c4bb9441..3d37b4105b 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -157,8 +157,8 @@ define Device/tplink_archer-c7-v2
   TPLINK_HWID := 0xc7000002
   SUPPORTED_DEVICES += archer-c7
   IMAGES += factory-us.bin factory-eu.bin
-  IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
-  IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
+  IMAGE/factory-us.bin := tplink-v1-image factory -C US
+  IMAGE/factory-eu.bin := tplink-v1-image factory -C EU
 endef
 TARGET_DEVICES += tplink_archer-c7-v2
 
@@ -502,9 +502,9 @@ define Device/tplink_tl-wr2543-v1
   DEVICE_VARIANT := v1
   DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
   TPLINK_HWID := 0x25430001
-  IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade -v 3.13.99 | \
+  IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade -v 3.13.99 | \
 	append-metadata | check-size $$$$(IMAGE_SIZE)
-  IMAGE/factory.bin := append-rootfs | mktplinkfw factory -v 3.13.99
+  IMAGE/factory.bin := tplink-v1-image factory -v 3.13.99
   SUPPORTED_DEVICES += tl-wr2543-v1
 endef
 TARGET_DEVICES += tplink_tl-wr2543-v1
diff --git a/target/linux/ath79/image/tiny-tp-link.mk b/target/linux/ath79/image/tiny-tp-link.mk
index 172f22f320..070ede9721 100644
--- a/target/linux/ath79/image/tiny-tp-link.mk
+++ b/target/linux/ath79/image/tiny-tp-link.mk
@@ -198,8 +198,8 @@ define Device/tplink_tl-wr841-v11
   TPLINK_HWID := 0x08410011
   SUPPORTED_DEVICES += tl-wr841n-v11
   IMAGES += factory-us.bin factory-eu.bin
-  IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
-  IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
+  IMAGE/factory-us.bin := tplink-v1-image factory -C US
+  IMAGE/factory-eu.bin := tplink-v1-image factory -C EU
 endef
 TARGET_DEVICES += tplink_tl-wr841-v11
 
@@ -211,8 +211,8 @@ define Device/tplink_tl-wr841-v12
   TPLINK_HWID := 0x08410012
   SUPPORTED_DEVICES += tl-wr841n-v11
   IMAGES += factory-us.bin factory-eu.bin
-  IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
-  IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
+  IMAGE/factory-us.bin := tplink-v1-image factory -C US
+  IMAGE/factory-eu.bin := tplink-v1-image factory -C EU
 endef
 TARGET_DEVICES += tplink_tl-wr841-v12
 
@@ -234,9 +234,9 @@ define Device/tplink_tl-wr940n-v4
   TPLINK_HWID := 0x09400004
   SUPPORTED_DEVICES += tl-wr940n-v4
   IMAGES += factory-us.bin factory-eu.bin factory-br.bin
-  IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
-  IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
-  IMAGE/factory-br.bin := append-rootfs | mktplinkfw factory -C BR
+  IMAGE/factory-us.bin := tplink-v1-image factory -C US
+  IMAGE/factory-eu.bin := tplink-v1-image factory -C EU
+  IMAGE/factory-br.bin := tplink-v1-image factory -C BR
 endef
 TARGET_DEVICES += tplink_tl-wr940n-v4
 
diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile
index 5ca16909e7..1fb0e28444 100644
--- a/target/linux/mpc85xx/image/Makefile
+++ b/target/linux/mpc85xx/image/Makefile
@@ -5,7 +5,7 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT
+DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT TPLINK_HEADER_VERSION
 
 define rootfs_align
 $(patsubst %-256k,0x40000,$(patsubst %-128k,0x20000,$(patsubst %-64k,0x10000,$(patsubst squashfs%,0x4,$(patsubst root.%,%,$(1))))))
@@ -15,26 +15,6 @@ define Build/copy-file
 	cat "$(1)" > "$@"
 endef
 
-# combine kernel and rootfs into one image
-# mktplinkfw <type> <optional extra arguments to mktplinkfw binary>
-# <type> is "sysupgrade" or "factory"
-#
-# -a align the rootfs start on an <align> bytes boundary
-# -j add jffs2 end-of-filesystem markers
-# -s strip padding from end of the image
-# -X reserve <size> bytes in the firmware image (hexval prefixed with 0x)
-define Build/mktplinkfw
-	-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-		-H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) \
-		-k $(IMAGE_KERNEL) \
-		-r $@ \
-		-o $@.new \
-		-j -X 0x40000 \
-		-a $(call rootfs_align,$(FILESYSTEM)) \
-		$(wordlist 2,$(words $(1)),$(1)) \
-		$(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
-endef
-
 define Device/Default
   PROFILES := Default
   DEVICE_DTS := $(lastword $(subst _, ,$(1)))
@@ -51,6 +31,7 @@ define Device/tplink_tl-wdr4900-v1
   DEVICE_VENDOR := TP-Link
   DEVICE_MODEL := TL-WDR4900
   DEVICE_VARIANT := v1
+  TPLINK_HEADER_VERSION := 1
   TPLINK_HWID := 0x49000001
   TPLINK_HWREV := 1
   TPLINK_FLASHLAYOUT := 16Mppc
@@ -64,8 +45,8 @@ define Device/tplink_tl-wdr4900-v1
   ARTIFACTS := fdt.bin
   ARTIFACT/fdt.bin := append-dtb
   IMAGES := fdt.bin factory.bin sysupgrade.bin
-  IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade | append-metadata
-  IMAGE/factory.bin := append-rootfs | mktplinkfw factory
+  IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade | append-metadata
+  IMAGE/factory.bin := tplink-v1-image factory
 endef
 TARGET_DEVICES += tplink_tl-wdr4900-v1
 
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index cbf35f804a..07f7607220 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -16,23 +16,6 @@ define Build/elecom-header
 		--owner=0 --group=0 -f $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
 endef
 
-# combine kernel and rootfs into one image
-# mktplinkfw <type> <optional extra arguments to mktplinkfw binary>
-# <type> is "sysupgrade" or "factory"
-#
-# -a align the rootfs start on an <align> bytes boundary
-# -j add jffs2 end-of-filesystem markers
-# -s strip padding from end of the image
-# -X reserve <size> bytes in the firmware image (hexval prefixed with 0x)
-define Build/mktplinkfw
-	-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-		-H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) \
-		-N OpenWrt -V $(REVISION) -m $(TPLINK_HEADER_VERSION) \
-		-k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new -j -X 0x40000 -a 0x4 \
-		$(wordlist 2,$(words $(1)),$(1)) \
-		$(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
-endef
-
 define Device/aigale_ai-br100
   SOC := mt7620a
   IMAGE_SIZE := 7936k
@@ -962,8 +945,8 @@ define Device/tplink_re200-v1
   DEVICE_VARIANT := v1
   DEVICE_PACKAGES := kmod-mt76x0e
   IMAGES += factory.bin
-  IMAGE/sysupgrade.bin := mktplinkfw sysupgrade -e -O
-  IMAGE/factory.bin := mktplinkfw factory -e -O
+  IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade -e -O
+  IMAGE/factory.bin := tplink-v1-image factory -e -O
   IMAGE_SIZE := 7936k
   KERNEL := $(KERNEL_DTB)
   KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v1-header -e -O
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From freifunk at adrianschmutzler.de  Tue Dec 31 12:04:54 2019
From: freifunk at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 31 Dec 2019 18:04:54 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] ath79: remove unused
 Build/mktplinkfw-combined
In-Reply-To: <20191231170454.31452-1-freifunk@adrianschmutzler.de>
References: <20191231170454.31452-1-freifunk@adrianschmutzler.de>
Message-ID: <20191231170454.31452-2-freifunk@adrianschmutzler.de>

Build/mktplinkfw-combined is not used anywhere, so remove it.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/ath79/image/common-tp-link.mk | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk
index 87fc922b3b..6d2c141a97 100644
--- a/target/linux/ath79/image/common-tp-link.mk
+++ b/target/linux/ath79/image/common-tp-link.mk
@@ -5,17 +5,6 @@ define rootfs_align
 $(patsubst %-256k,0x40000,$(patsubst %-128k,0x20000,$(patsubst %-64k,0x10000,$(patsubst squashfs%,0x4,$(patsubst root.%,%,$(1))))))
 endef
 
-# mktplinkfw-combined
-#
-# -c combined image
-define Build/mktplinkfw-combined
-	$(STAGING_DIR_HOST)/bin/mktplinkfw \
-		-H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) \
-		-N OpenWrt -V $(REVISION) $(1) -m $(TPLINK_HEADER_VERSION) \
-		-k $@ -o $@.new -s -S -c
-	@mv $@.new $@
-endef
-
 define Build/uImageArcher
 	mkimage -A $(LINUX_KARCH) \
 		-O linux -T kernel -C $(1) -a $(KERNEL_LOADADDR) \
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From mail at adrianschmutzler.de  Tue Dec 31 14:18:50 2019
From: mail at adrianschmutzler.de (Adrian Schmutzler)
Date: Tue, 31 Dec 2019 20:18:50 +0100
Subject: [OpenWrt-Devel] Dependency build error fix
Message-ID: <A1FAAEE6-7F9D-4556-8BEA-3C30FD156938@adrianschmutzler.de>

Since I've read similar reports five times already:

Problem:

Package luci-mCollected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for base-files:
* 	libubox20170601
* opkg_install_cmd: Cannot install package base-files.
* satisfy_dependencies_for: Cannot satisfy the following dependencies for odhcp6c:
* 	libubox20170601
* opkg_install_cmd: Cannot install package odhcp6c.
* satisfy_dependencies_for: Cannot satisfy the following dependencies for urngd:
* 	libubox20170601
* opkg_install_cmd: Cannot install package urngd.

Solution:

make clean

This should cover similar errors with other packages. 

Best

Adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191231/cff22a1f/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From knaack.h at gmx.de  Tue Dec 31 16:22:21 2019
From: knaack.h at gmx.de (Hartmut Knaack)
Date: Tue, 31 Dec 2019 22:22:21 +0100
Subject: [OpenWrt-Devel] [PATCHv2 1/4] scripts/gen_image_generic.sh:
 Replace -o with ||
In-Reply-To: <20191230050756.3675-1-rosenp@gmail.com>
References: <20191230050756.3675-1-rosenp@gmail.com>
Message-ID: <e01450cb-1ef1-dc8f-3d88-c7dd237fcbd1@gmx.de>

Rosen Penev schrieb am 30.12.2019 um 06:07:
> -o is not well defined.
>
> Found with shellcheck.
>
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
>  scripts/gen_image_generic.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
> index 2d2fb120ce..1e35b1b349 100755
> --- a/scripts/gen_image_generic.sh
> +++ b/scripts/gen_image_generic.sh
> @@ -1,10 +1,10 @@
>  #!/usr/bin/env bash
>  # Copyright (C) 2006-2012 OpenWrt.org
>  set -e -x
> -[ $# == 5 -o $# == 6 ] || {
> +if [ $# -ge 5 ] || [ $# -le 6 ]; then
>      echo "SYNTAX: $0 <file> <kernel size> <kernel directory> <rootfs size> <rootfs image> [<align>]"
>      exit 1
> -}
> +fi
>
>  OUTPUT="$1"
>  KERNELSIZE="$2"
>
Hi,
this does not look right. You changed it from reporting a failure in case there
was any other amount of options than 5 or 6 given, to reporting a failure if at
least 5 or at most 6 options are provided (in other words: every amount).

Regards,

Hartmut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x03684A18FAC89148.asc
Type: application/pgp-keys
Size: 3086 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191231/75616961/attachment.bin>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

From rosenp at gmail.com  Tue Dec 31 21:01:42 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:01:42 -0800
Subject: [OpenWrt-Devel] [PATCH 1/5] scripts/env: use explicit find location
Message-ID: <20200101020146.21043-1-rosenp@gmail.com>

Some find binaries do not imply the current directory.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/env b/scripts/env
index 69b63895b4..fd49e1c817 100755
--- a/scripts/env
+++ b/scripts/env
@@ -136,7 +136,7 @@ env_clear() {
 	env_init
 	[ -L "$BASEDIR/.config" ] && rm -f "$BASEDIR/.config"
 	[ -L "$BASEDIR/files" ] && rm -f "$BASEDIR/files"
-	[ -f "$ENVDIR/.config" ] || ( cd "$ENVDIR/files" && find | grep -vE '^\.$' > /dev/null )
+	[ -f "$ENVDIR/.config" ] || ( cd "$ENVDIR/files" && find . | grep -vE '^\.$' > /dev/null )
 	env_sync_data
 	if ask_bool 1 "Do you want to keep your current config and files"; then
 		mkdir -p "$BASEDIR/files"
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:01:43 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:01:43 -0800
Subject: [OpenWrt-Devel] [PATCH 2/5] scripts/env: replace -a and -o with
 &&/||
In-Reply-To: <20200101020146.21043-1-rosenp@gmail.com>
References: <20200101020146.21043-1-rosenp@gmail.com>
Message-ID: <20200101020146.21043-2-rosenp@gmail.com>

The former are not well defined.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/env | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/env b/scripts/env
index fd49e1c817..563f39c1cf 100755
--- a/scripts/env
+++ b/scripts/env
@@ -73,7 +73,7 @@ env_init() {
 }
 
 env_sync_data() {
-	[ \! -L "$BASEDIR/.config" -a -f "$BASEDIR/.config" ] && mv "$BASEDIR/.config" "$ENVDIR"
+	[ \! -L "$BASEDIR/.config" ] && [ -f "$BASEDIR/.config" ] && mv "$BASEDIR/.config" "$ENVDIR"
 	git add .
 	git add -u
 }
@@ -185,7 +185,7 @@ env_new() {
 	env_init 1
 	
 	branch="$(git branch | grep '^\* ' | awk '{print $2}')"
-	if [ -n "$branch" -a "$branch" != "master" ]; then
+	if [ -n "$branch" ] && [ "$branch" != "master" ]; then
 		env_ask_sync
 		if ask_bool 0 "Do you want to clone the current environment?"; then
 			from="$branch"
@@ -193,15 +193,15 @@ env_new() {
 		rm -f "$BASEDIR/.config" "$BASEDIR/files"
 	fi
 	git checkout -b "$1" "$from"
-	if [ -f "$BASEDIR/.config" -o -d "$BASEDIR/files" ]; then
+	if [ -f "$BASEDIR/.config" ] || [ -d "$BASEDIR/files" ]; then
 		if ask_bool 1 "Do you want to start your configuration repository with the current configuration?"; then
-			[ -d "$BASEDIR/files" -a \! -L "$BASEDIR/files" ] && {
+			if [ -d "$BASEDIR/files" ] && [ \! -L "$BASEDIR/files" ]; then
 				mkdir -p "$ENVDIR/files"
 				shopt -s dotglob
 				mv "$BASEDIR/files/"* "$ENVDIR/files/" 2>/dev/null
 				shopt -u dotglob
 				rmdir "$BASEDIR/files"
-			}
+			fi
 			env_sync
 		else
 			rm -rf "$BASEDIR/.config" "$BASEDIR/files"
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:01:44 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:01:44 -0800
Subject: [OpenWrt-Devel] [PATCH 3/5] scripts/env: replace \! with !
In-Reply-To: <20200101020146.21043-1-rosenp@gmail.com>
References: <20200101020146.21043-1-rosenp@gmail.com>
Message-ID: <20200101020146.21043-3-rosenp@gmail.com>

The latter is more standard. The former throws an error under
shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/env | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/env b/scripts/env
index 563f39c1cf..19cfa13841 100755
--- a/scripts/env
+++ b/scripts/env
@@ -73,7 +73,7 @@ env_init() {
 }
 
 env_sync_data() {
-	[ \! -L "$BASEDIR/.config" ] && [ -f "$BASEDIR/.config" ] && mv "$BASEDIR/.config" "$ENVDIR"
+	[ ! -L "$BASEDIR/.config" ] && [ -f "$BASEDIR/.config" ] && mv "$BASEDIR/.config" "$ENVDIR"
 	git add .
 	git add -u
 }
@@ -195,7 +195,7 @@ env_new() {
 	git checkout -b "$1" "$from"
 	if [ -f "$BASEDIR/.config" ] || [ -d "$BASEDIR/files" ]; then
 		if ask_bool 1 "Do you want to start your configuration repository with the current configuration?"; then
-			if [ -d "$BASEDIR/files" ] && [ \! -L "$BASEDIR/files" ]; then
+			if [ -d "$BASEDIR/files" ] && [ ! -L "$BASEDIR/files" ]; then
 				mkdir -p "$ENVDIR/files"
 				shopt -s dotglob
 				mv "$BASEDIR/files/"* "$ENVDIR/files/" 2>/dev/null
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:01:45 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:01:45 -0800
Subject: [OpenWrt-Devel] [PATCH 4/5] scripts/env: exit in case of failure to
 cd
In-Reply-To: <20200101020146.21043-1-rosenp@gmail.com>
References: <20200101020146.21043-1-rosenp@gmail.com>
Message-ID: <20200101020146.21043-4-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/env b/scripts/env
index 19cfa13841..848850a778 100755
--- a/scripts/env
+++ b/scripts/env
@@ -147,7 +147,7 @@ env_clear() {
 	else
 		rm -rf "$BASEDIR/files" "$BASEDIR/.config"
 	fi
-	cd "$BASEDIR"
+	cd "$BASEDIR" || exit 1
 	rm -rf "$ENVDIR"
 }
 
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:01:46 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:01:46 -0800
Subject: [OpenWrt-Devel] [PATCH 5/5] scripts/env: use read -r instead of read
In-Reply-To: <20200101020146.21043-1-rosenp@gmail.com>
References: <20200101020146.21043-1-rosenp@gmail.com>
Message-ID: <20200101020146.21043-5-rosenp@gmail.com>

read mangles backslashes.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/env b/scripts/env
index 848850a778..c81fbf8ddc 100755
--- a/scripts/env
+++ b/scripts/env
@@ -42,7 +42,7 @@ ask_bool() {
 		local VAL
 
 		echo -n "$* ($defstr): "
-		read VAL
+		read -r VAL
 		case "$VAL" in
 			y*|Y*) val=0;;
 			n*|N*) val=1;;
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:03:31 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:03:31 -0800
Subject: [OpenWrt-Devel] [PATCH] scripts/env: use command -v instead of which
Message-ID: <20200101020331.21280-1-rosenp@gmail.com>

Simpler and built in to the shell.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/env b/scripts/env
index 84166ae5fe..69b63895b4 100755
--- a/scripts/env
+++ b/scripts/env
@@ -57,7 +57,7 @@ env_init() {
 	if [ -z "$CREATE" ]; then
 		[ -d "$ENVDIR" ] || exit 0
 	fi
-	[ -x "$(which git 2>/dev/null)" ] || error "Git is not installed"
+	command -v git || error "Git is not installed"
 	mkdir -p "$ENVDIR" || error "Failed to create the environment directory"
 	cd "$ENVDIR" || error "Failed to switch to the environment directory"
 	[ -d .git ] || { 
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:06:27 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:06:27 -0800
Subject: [OpenWrt-Devel] [PATCH 1/2] scripts/gen-dependencies.sh: replace
 backticks with $()
Message-ID: <20200101020628.21503-1-rosenp@gmail.com>

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/gen-dependencies.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/gen-dependencies.sh b/scripts/gen-dependencies.sh
index 0aa01b78ec..01bb5ac037 100755
--- a/scripts/gen-dependencies.sh
+++ b/scripts/gen-dependencies.sh
@@ -24,8 +24,8 @@ find $TARGETS -type f -a -exec file {} \; | \
   awk '$2 ~ /NEEDED/ && $NF !~ /interpreter/ && $NF ~ /^\[?lib.*\.so/ { gsub(/[\[\]]/, "", $NF); print $NF }' | \
   sort -u
 
-tmp=`mktemp $TMP_DIR/dep.XXXXXXXX`
-for kmod in `find $TARGETS -type f -name \*.ko`; do
+tmp=$(mktemp $TMP_DIR/dep.XXXXXXXX)
+for kmod in $(find $TARGETS -type f -name \*.ko); do
 	$OBJCOPY -O binary -j .modinfo $kmod $tmp
 	sed -e 's,\x00,\n,g' $tmp | \
 		sed -ne '/^depends=.\+/ { s/^depends=//; s/,/.ko\n/g; s/$/.ko/p; q }'
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:06:28 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:06:28 -0800
Subject: [OpenWrt-Devel] [PATCH 2/2] scripts/gen-dependencies.sh: use /bin/sh
In-Reply-To: <20200101020628.21503-1-rosenp@gmail.com>
References: <20200101020628.21503-1-rosenp@gmail.com>
Message-ID: <20200101020628.21503-2-rosenp@gmail.com>

This uses no special bash stuff.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/gen-dependencies.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gen-dependencies.sh b/scripts/gen-dependencies.sh
index 01bb5ac037..4beff74bb0 100755
--- a/scripts/gen-dependencies.sh
+++ b/scripts/gen-dependencies.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 #
 # Copyright (C) 2012 OpenWrt.org
 #
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:07:05 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:07:05 -0800
Subject: [OpenWrt-Devel] [PATCH] scripts/arm-magic.sh: Switch to /bin/sh
Message-ID: <20200101020705.21644-1-rosenp@gmail.com>

This does not use any special bash stuff.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/arm-magic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/arm-magic.sh b/scripts/arm-magic.sh
index 29ec88ab2f..b4b0fa94f5 100755
--- a/scripts/arm-magic.sh
+++ b/scripts/arm-magic.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
 #
 #   Empty/wrong machtype-workaround generator
 #
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:08:21 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:08:21 -0800
Subject: [OpenWrt-Devel] [PATCH 1/2] wireguard.sh: Batch file writes
Message-ID: <20200101020822.21784-1-rosenp@gmail.com>

Speeds up config generation.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 .../utils/wireguard-tools/files/wireguard.sh  | 32 ++++++++-----------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/package/network/utils/wireguard-tools/files/wireguard.sh b/package/network/utils/wireguard-tools/files/wireguard.sh
index 4c811c6ba9..1e424e7959 100644
--- a/package/network/utils/wireguard-tools/files/wireguard.sh
+++ b/package/network/utils/wireguard-tools/files/wireguard.sh
@@ -42,13 +42,12 @@ proto_wireguard_setup_peer() {
 	config_get endpoint_port "${peer_config}" "endpoint_port"
 	config_get persistent_keepalive "${peer_config}" "persistent_keepalive"
 
-	echo "[Peer]" >> "${wg_cfg}"
-	echo "PublicKey=${public_key}" >> "${wg_cfg}"
-	if [ "${preshared_key}" ]; then
-		echo "PresharedKey=${preshared_key}" >> "${wg_cfg}"
-	fi
+	{
+	echo "[Peer]"
+	echo "PublicKey=${public_key}"
+	[ "${preshared_key}" ] && echo "PresharedKey=${preshared_key}"
 	for allowed_ip in $allowed_ips; do
-		echo "AllowedIPs=${allowed_ip}" >> "${wg_cfg}"
+		echo "AllowedIPs=${allowed_ip}"
 	done
 	if [ "${endpoint_host}" ]; then
 		case "${endpoint_host}" in
@@ -64,11 +63,10 @@ proto_wireguard_setup_peer() {
 		else
 			endpoint="${endpoint}:51820"
 		fi
-		echo "Endpoint=${endpoint}" >> "${wg_cfg}"
-	fi
-	if [ "${persistent_keepalive}" ]; then
-		echo "PersistentKeepalive=${persistent_keepalive}" >> "${wg_cfg}"
+		echo "Endpoint=${endpoint}"
 	fi
+	[ "${persistent_keepalive}" ] && echo "PersistentKeepalive=${persistent_keepalive}"
+	} >> "${wg_cfg}"
 
 	if [ ${route_allowed_ips} -ne 0 ]; then
 		for allowed_ip in ${allowed_ips}; do
@@ -119,14 +117,12 @@ proto_wireguard_setup() {
 
 	umask 077
 	mkdir -p "${wg_dir}"
-	echo "[Interface]" > "${wg_cfg}"
-	echo "PrivateKey=${private_key}" >> "${wg_cfg}"
-	if [ "${listen_port}" ]; then
-		echo "ListenPort=${listen_port}" >> "${wg_cfg}"
-	fi
-	if [ "${fwmark}" ]; then
-		echo "FwMark=${fwmark}" >> "${wg_cfg}"
-	fi
+	{
+		echo "[Interface]"
+		echo "PrivateKey=${private_key}"
+		[ "${listen_port}" ] && echo "ListenPort=${listen_port}"
+		[ "${fwmark}" ] && echo "FwMark=${fwmark}"
+	} > "${wg_cfg}"
 	config_foreach proto_wireguard_setup_peer "wireguard_${config}"
 
 	# apply configuration file
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:08:22 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:08:22 -0800
Subject: [OpenWrt-Devel] [PATCH 2/2] wireguard.sh: Run through shellcheck
In-Reply-To: <20200101020822.21784-1-rosenp@gmail.com>
References: <20200101020822.21784-1-rosenp@gmail.com>
Message-ID: <20200101020822.21784-2-rosenp@gmail.com>

Missing local variables and quoting fixes.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 .../network/utils/wireguard-tools/files/wireguard.sh   | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/package/network/utils/wireguard-tools/files/wireguard.sh b/package/network/utils/wireguard-tools/files/wireguard.sh
index 1e424e7959..561a304ef3 100644
--- a/package/network/utils/wireguard-tools/files/wireguard.sh
+++ b/package/network/utils/wireguard-tools/files/wireguard.sh
@@ -68,7 +68,7 @@ proto_wireguard_setup_peer() {
 	[ "${persistent_keepalive}" ] && echo "PersistentKeepalive=${persistent_keepalive}"
 	} >> "${wg_cfg}"
 
-	if [ ${route_allowed_ips} -ne 0 ]; then
+	if [ "${route_allowed_ips}" -ne 0 ]; then
 		for allowed_ip in ${allowed_ips}; do
 			case "${allowed_ip}" in
 				*:*/*)
@@ -95,7 +95,11 @@ proto_wireguard_setup() {
 
 	local private_key
 	local listen_port
+	local addresses
 	local mtu
+	local fwmark
+	local ip6prefix
+	local nohostroute
 
 	config_load network
 	config_get private_key "${config}" "private_key"
@@ -126,7 +130,7 @@ proto_wireguard_setup() {
 	config_foreach proto_wireguard_setup_peer "wireguard_${config}"
 
 	# apply configuration file
-	${WG} setconf ${config} "${wg_cfg}"
+	${WG} setconf "${config}" "${wg_cfg}"
 	WG_RETURN=$?
 
 	rm -f "${wg_cfg}"
@@ -162,7 +166,7 @@ proto_wireguard_setup() {
 	if [ "${nohostroute}" != "1" ]; then
 		wg show "${config}" endpoints | \
 		sed -E 's/\[?([0-9.:a-f]+)\]?:([0-9]+)/\1 \2/' | \
-		while IFS=$'\t ' read -r key address port; do
+		while IFS="$(printf '\t')" read -r address port; do
 			[ -n "${port}" ] || continue
 			proto_add_host_dependency "${config}" "${address}"
 		done
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:11:25 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:11:25 -0800
Subject: [OpenWrt-Devel] [PATCHv2 1/4] scripts/gen_image_generic.sh:
 Replace -o with ||
In-Reply-To: <e01450cb-1ef1-dc8f-3d88-c7dd237fcbd1@gmx.de>
References: <20191230050756.3675-1-rosenp@gmail.com>
 <e01450cb-1ef1-dc8f-3d88-c7dd237fcbd1@gmx.de>
Message-ID: <CAKxU2N8+bXZr++sX_TPjvDCQd99SuJNvQxgzwzLLyC6j1MDYfQ@mail.gmail.com>

On Tue, Dec 31, 2019 at 1:22 PM Hartmut Knaack <knaack.h at gmx.de> wrote:
>
> Rosen Penev schrieb am 30.12.2019 um 06:07:
> > -o is not well defined.
> >
> > Found with shellcheck.
> >
> > Signed-off-by: Rosen Penev <rosenp at gmail.com>
> > ---
> >  scripts/gen_image_generic.sh | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
> > index 2d2fb120ce..1e35b1b349 100755
> > --- a/scripts/gen_image_generic.sh
> > +++ b/scripts/gen_image_generic.sh
> > @@ -1,10 +1,10 @@
> >  #!/usr/bin/env bash
> >  # Copyright (C) 2006-2012 OpenWrt.org
> >  set -e -x
> > -[ $# == 5 -o $# == 6 ] || {
> > +if [ $# -ge 5 ] || [ $# -le 6 ]; then
> >      echo "SYNTAX: $0 <file> <kernel size> <kernel directory> <rootfs size> <rootfs image> [<align>]"
> >      exit 1
> > -}
> > +fi
> >
> >  OUTPUT="$1"
> >  KERNELSIZE="$2"
> >
> Hi,
> this does not look right. You changed it from reporting a failure in case there
> was any other amount of options than 5 or 6 given, to reporting a failure if at
> least 5 or at most 6 options are provided (in other words: every amount).
Will resend.
>
> Regards,
>
> Hartmut

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 21:13:09 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 18:13:09 -0800
Subject: [OpenWrt-Devel] [PATCH] scripts/gen_image_generic.sh: Replace -o
 with ||
Message-ID: <20200101021309.22847-1-rosenp@gmail.com>

-o is not well defined.

Found with shellcheck.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 scripts/gen_image_generic.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/gen_image_generic.sh b/scripts/gen_image_generic.sh
index 2c57d56f07..81feeaa7d7 100755
--- a/scripts/gen_image_generic.sh
+++ b/scripts/gen_image_generic.sh
@@ -1,10 +1,10 @@
 #!/usr/bin/env bash
 # Copyright (C) 2006-2012 OpenWrt.org
 set -e -x
-[ $# == 5 -o $# == 6 ] || {
+if [ ! $# -eq 5 ] || [ ! $# -eq 6 ]; then
     echo "SYNTAX: $0 <file> <kernel size> <kernel directory> <rootfs size> <rootfs image> [<align>]"
     exit 1
-}
+fi
 
 OUTPUT="$1"
 KERNELSIZE="$2"
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From bobafetthotmail at gmail.com  Tue Dec 31 21:30:34 2019
From: bobafetthotmail at gmail.com (Alberto Bursi)
Date: Wed, 1 Jan 2020 03:30:34 +0100
Subject: [OpenWrt-Devel] Preserving configs over sysupgrade on
 ath79/tiny broken for some boards (on 19.07 and master), possible solutions
In-Reply-To: <20191231152922.GQ11377@home.paul.comp>
References: <20191228140048.GO11377@home.paul.comp>
 <9f716d9b-4230-b3e0-7e38-78c4c4781a78@wwsnet.net>
 <36732b2f-c95a-5749-e028-653a9f8ea4f8@david-bauer.net>
 <bcd2f7e5-abad-3b9c-7a62-b79bd6b424a6@gmail.com>
 <20191231141559.GP11377@home.paul.comp>
 <3dd75d93-e74f-6831-51f0-d2100fdbc1db@david-bauer.net>
 <20191231152922.GQ11377@home.paul.comp>
Message-ID: <80fed589-f821-70f3-0337-24904f087351@gmail.com>



On 31/12/19 16:29, Paul Fertser wrote:
> Hello David,
> 
> On Tue, Dec 31, 2019 at 04:20:29PM +0100, David Bauer wrote:
>>> If no users speak up probably it's better to remove all the support
>>> code altogether to avoid wasting maintainers' time on it?
>>
>> The code is not really an issue, as there's not much code dedicated for 4M
>> devices. It's mostly their device-tree, which is maintainable compared to the previous
>> ar71xx boardfiles.
> 
> It's still an effort. People spend time writing patches, reviewers
> spend time reviewing, maintainers spend time merging and we're now
> spending time discussing.

People that want to drop something are always under the impression that 
people that are active on X will be just as active on Y when you drop X.
It's not usually the case.

In this case most of the complex work is writing patches and pretty much 
none of the core developers work on that.
Random contributors will be random, if you drop support they won't 
magically redirect their efforts to something else, they will fork 
OpenWrt and patch their own fork to support better their own devices.

> 
>> As many people still use these 4M devices
> 
> Judging by the amount of replies from active users to my mail
> (apparently zero), not many. 

He said that people that care about 4M devices are mostly on OpenWrt 
forum, and it's kind of rude to just cut that part out and not read it.

A LOT of OpenWrt userbase does not follow the mailing lists (or even 
know what a mailing list is), so if you want to have the full picture 
please visit the forum as well.

-Alberto


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 22:37:34 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 19:37:34 -0800
Subject: [OpenWrt-Devel] [PATCH 1/2] libcxx: Build with the libsupc++ ABI
Message-ID: <20200101033735.853371-1-rosenp@gmail.com>

Allows proper exception handling. This includes removing unimplemented
warnings.

File size increased as a result:

Before:

182874

After:

211006

On mipsel_24kc.

Note that this requires libsupc++ anyway. It's specified in g++-libcxx.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/libs/libcxx/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/libs/libcxx/Makefile b/package/libs/libcxx/Makefile
index 695b0398fe..60978bdc31 100644
--- a/package/libs/libcxx/Makefile
+++ b/package/libs/libcxx/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libcxx
 PKG_VERSION:=9.0.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.llvm.org/git/libcxx
@@ -37,6 +37,7 @@ define Package/libcxx/description
 endef
 
 CMAKE_OPTIONS += \
+	-DLIBCXX_CXX_ABI="libsupc++" \
 	-DLIBCXX_ENABLE_ASSERTIONS=OFF \
 	-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \
 	-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


From rosenp at gmail.com  Tue Dec 31 22:37:35 2019
From: rosenp at gmail.com (Rosen Penev)
Date: Tue, 31 Dec 2019 19:37:35 -0800
Subject: [OpenWrt-Devel] [PATCH 2/2] libcxx: Add size optimizations
In-Reply-To: <20200101033735.853371-1-rosenp@gmail.com>
References: <20200101033735.853371-1-rosenp@gmail.com>
Message-ID: <20200101033735.853371-2-rosenp@gmail.com>

Changed standard to 2a. 2a (as well as 17) contain more constexpr
functions, which are evaluated at compile time. This saves space.

Added --gc-sections. With the CXXABI change, this now makes the package
smaller.

With these, size went down to 210845 on mipsel_24kc.

Also fixed two small compiler warnings. No real change in behavior.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/libs/libcxx/Makefile                |  2 +-
 package/libs/libcxx/patches/010-cxx17.patch | 14 ++++++++++++
 package/libs/libcxx/patches/020-fixes.patch | 24 +++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 package/libs/libcxx/patches/010-cxx17.patch
 create mode 100644 package/libs/libcxx/patches/020-fixes.patch

diff --git a/package/libs/libcxx/Makefile b/package/libs/libcxx/Makefile
index 60978bdc31..1d8e502221 100644
--- a/package/libs/libcxx/Makefile
+++ b/package/libs/libcxx/Makefile
@@ -47,7 +47,7 @@ CMAKE_OPTIONS += \
 	-DLIBCXX_HAS_MUSL_LIBC=$(if $(CONFIG_USE_MUSL),ON,OFF)
 
 TARGET_CXXFLAGS += -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -Wno-attributes -flto
-TARGET_LDFLAGS += -Wl,--as-needed
+TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -flto=jobserver
 
 define Build/InstallDev
 	$(call Build/InstallDev/cmake,$(1))
diff --git a/package/libs/libcxx/patches/010-cxx17.patch b/package/libs/libcxx/patches/010-cxx17.patch
new file mode 100644
index 0000000000..c313c47611
--- /dev/null
+++ b/package/libs/libcxx/patches/010-cxx17.patch
@@ -0,0 +1,14 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -524,9 +524,9 @@ remove_flags(-Wno-pedantic -pedantic-errors -pedantic)
+ if (LIBCXX_HAS_MUSL_LIBC OR LIBCXX_TARGETING_CLANG_CL)
+   # musl's pthread implementations uses volatile types in their structs which is
+   # not a constexpr in C++11 but is in C++14, so we use C++14 with musl.
+-  set(LIBCXX_STANDARD_VER c++14 CACHE STRING "internal option to change build dialect")
++  set(LIBCXX_STANDARD_VER c++2a CACHE STRING "internal option to change build dialect")
+ else()
+-  set(LIBCXX_STANDARD_VER c++11 CACHE STRING "internal option to change build dialect")
++  set(LIBCXX_STANDARD_VER c++2a CACHE STRING "internal option to change build dialect")
+ endif()
+ add_compile_flags_if_supported(-std=${LIBCXX_STANDARD_VER})
+ add_compile_flags_if_supported("/std:${LIBCXX_STANDARD_VER}")
diff --git a/package/libs/libcxx/patches/020-fixes.patch b/package/libs/libcxx/patches/020-fixes.patch
new file mode 100644
index 0000000000..abc630d42f
--- /dev/null
+++ b/package/libs/libcxx/patches/020-fixes.patch
@@ -0,0 +1,24 @@
+--- a/include/memory
++++ b/include/memory
+@@ -1696,7 +1696,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
+             ptrdiff_t _Np = __end1 - __begin1;
+             __end2 -= _Np;
+             if (_Np > 0)
+-                _VSTD::memcpy(__end2, __begin1, _Np * sizeof(_Tp));
++                __end2 = __begin1;
+         }
+ 
+ private:
+--- a/src/filesystem/filesystem_common.h
++++ b/src/filesystem/filesystem_common.h
+@@ -197,8 +197,8 @@ private:
+ using chrono::duration;
+ using chrono::duration_cast;
+ 
+-using TimeSpec = struct ::timespec;
+-using StatT = struct ::stat;
++using TimeSpec = struct timespec;
++using StatT = struct stat;
+ 
+ template <class FileTimeT, class TimeT,
+           bool IsFloat = is_floating_point<typename FileTimeT::rep>::value>
-- 
2.24.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


