Port README to 21st century

2020-07-25 Thread Paul Spooren

Hi,

I created a pull request on GitHub[0] with a reworked and extended README.

Essentially it uses Markdown instead of plain text and embed the new 
logo and handy links to documentation and community resources.


Adrian requested to announce the idea on the lists as it's basically the 
"business card" or OpenWrt, so here we go.


Best,
Paul

[0]: https://github.com/openwrt/openwrt/pull/3217


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


Re: [RFC PATCH 5/5] ipq40xx: add target for Google WiFi (Gale)

2020-07-25 Thread computersforpeace
On Wed, Jul 22, 2020 at 03:58:34PM +0200, m...@adrianschmutzler.de wrote:
> > Thanks for the scrutiny! I do have some questions here: is the
> > VENDOR/MODEL supposed to match closer to a marketing-friendly/user-
> > friendly name, or a developer/low-level name?
> 
> I typically prefer something that the user can read on the device, as 
> everything else will add to the confusion.
> 
> > Or just some balance of both? Because there's several constraints
> > here:
> > * The bootloader recognizes compatible="google,gale-v2" -- I don't believe I
> > can reliably drop the "v2" there, but I suppose that doesn't require the 
> > file
> > names, etc., to include it
> > * There really is no v1 publicly-available; as noted in the commit message, 
> > I
> > believe that was pre-release hardware, and the revisions just stuck around
> > through development
> > * the "v2" here does *not* mean second generation, as in
> > https://en.wikipedia.org/wiki/Google_Nest_Wifi#Second_generation
> 
> I don't think we have to care too much about the v1 here; however, if
> there is a different "second generation" with the same name, then we
> should include a "1st-gen" in the name somewhere, maybe even instead
> of the v2 if there is no v3 to be expected for the "1st-gen".

The "second generation" is labeled as "Nest WiFi" or "Google Nest WiFi".
I don't know if that's considered the "same" name by the layperson. I
could toss in a "1st-gen", if that helps.

I doubt there's a "v3" to be expected for 1st-gen. I'll drop the "v2"
everywhere but the 'compatible' property.

> The Wiki article is not entirely precise here, so is the gale-v2 the
> "first generation" in the nest article

Yes.

> or is there actually a 1st and
> 2nd generation of that Nest devices and gale something even different?

No, Gale is the thing called "first generation" there.

Google is excellent at naming things :D

I believe the 2 products here are named "Google WiFi" and "Nest WiFi"
(where Nest is part of Google...) -- there's some shift to using the
"Nest" brand for this type of hardware, I guess. I presume the Wikipedia
authors have retroactivey renamed the page to "Google Nest WiFi" to
follow the latest branding, even if the first generation had no such
"Nest" marketing.

  1st generation = Gale = Google WiFi
  2nd generation = Nest WiFi (by Google!)

> > * "WiFi" doesn't really make for a good MODEL on its own, although it's OK
> > when paired with the VENDOR. But I still preferred sticking the codename
> > (Gale) around, since that's the unambiguous way hackers can recognize the
> > model.
> > 
> > What do you think? Should I try to keep the keywords "google", "wifi", and
> > "gale" in all of the config, image, and DTS name? And I'll avoid the "v2"
> > labeling (and DEVICE_VARIANT) outside of "compatible", because I think that
> > would be misleading.
> 
> If you call this gale, the question is how you proceed with the nest
> series then. Will you switch to marketing-based "nest" then, or will
> you use the internal name though the user will read something
> different on the device?

(I have no plans for Nest WiFi support, FWIW.)

I could see it going either way.

I guess one thing that trips me up: suppose I call this
"Device/google_wifi" (and Nest WiFi -> "Device/nest_wifi"), then the DTS
file comes out as
 Google WiFi -> qcom-ipq4019-wifi.dts
 Nest WiFi -> qcom-ipq-wifi.dts

That seems...pretty obtuse to me. Is that a case where I override the
auto-naming for the DTS, and call them "qcom-ipq4019-google-wifi.dts"
and "qcom-ipq-nest-wifi.dts"?

Or I could use hyphens, so the DTS derivation is nicer
(Device/google-wifi, or even Device/google_google-wifi -- either of
those should produce ...-google-wifi.dts)?

> Unfortunately, this stuff is never easy to decide. Personally, I
> always lean towards what's printed on the thing.

Brian

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


Re: [PATCH 3/3] treewide: switch to HTTPS by default

2020-07-25 Thread Paul Spooren


On 24.07.20 04:29, Petr Štetiar wrote:

As there is now WolfSSL included by default due to SAE/WPA3 we can
finally switch to TLS/SSL in other parts as well.

Signed-off-by: Petr Štetiar 
---
  README | 2 +-
  include/target.mk  | 6 +-
  include/version.mk | 2 +-
  3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/README b/README
index c867c1fa4da8..d5c4ae3ec8e0 100644
--- a/README
+++ b/README
@@ -29,6 +29,6 @@ chosen applications for your target system.
  
  Sunshine!

Your OpenWrt Community
-   http://www.openwrt.org
+   https://www.openwrt.org
  
  
diff --git a/include/target.mk b/include/target.mk

index 6ed6565bdaa2..3eae957cf75b 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -13,7 +13,11 @@ __target_inc=1
  DEVICE_TYPE?=router
  
  # Default packages - the really basic set

-DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd 
fstools uclient-fetch logd urandom-seed urngd
+DEFAULT_PACKAGES:= \
+   base-files libc libgcc busybox dropbear mtd uci opkg netifd \
+   fstools uclient-fetch logd urandom-seed urngd libustream-wolfssl \
+   ca-certificates
+
  # For the basic set
  DEFAULT_PACKAGES.basic:=
  # For nas targets
diff --git a/include/version.mk b/include/version.mk
index 7d3c1ad6400f..b7f42e13bb1b 100644
--- a/include/version.mk
+++ b/include/version.mk
@@ -32,7 +32,7 @@ VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
  VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
  
  VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))

-VERSION_REPO:=$(if 
$(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/snapshots)
+VERSION_REPO:=$(if 
$(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/snapshots)
  
  VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))

  VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)


Exciting! Encrypted opkg downloads per default!

Tested-by: Paul Spooren 


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


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


Re: [PATCH 4/4] lantiq: disable default build for devices with 4M flash

2020-07-25 Thread Paul Spooren



On 25.07.20 11:21, m...@adrianschmutzler.de wrote:

-Original Message-
From: Paul Spooren [mailto:m...@aparcar.org]
Sent: Samstag, 25. Juli 2020 23:19
To: Adrian Schmutzler ; openwrt-
de...@lists.openwrt.org
Subject: Re: [PATCH 4/4] lantiq: disable default build for devices with 4M
flash

On 25.07.20 08:29, Adrian Schmutzler wrote:

It has been decided that the 19.07 release will be last one to include
4/32 devices.

This disables default build for all devices with 4M flash on lantiq.
Note that this will affect _all_ devices for amazonse ("ase") and
xway_legacy subtarget.

Isn't it cleaner to add the "source-only" feature to xway_legacy/target.mk
and ase/target.mk? Or is it device specific because new devices for either
subtarget are expected?

I'm not sure what source-only exactly does. I'll look it up.

The aim is that users are still able to build those devices with adjusted 
settings, both with imagebuilder and make menuconfig, at least in principle.


The buildbot schedules builds on the targets determined via 
dumpinf.pl[0][1]. If a target/subtarget contains source-only it won't 
appear in the list.


As a consequence neither toolchain, ImageBuilder nor SDK are build.

[0]: 
https://patchwork.ozlabs.org/project/openwrt/patch/20200713031629.1716736-1-m...@aparcar.org/
[1]: 
https://git.openwrt.org/?p=buildbot.git;a=blob;f=phase1/master.cfg;h=792f9b3a55a2d8ebae1917c56716cc0d699f9172;hb=HEAD#l180



Best

Adrian


Signed-off-by: Adrian Schmutzler 

---

As this will effectively empty ase und xway_legacy subtarget, we
essentially can disable the buildbots on master for those right away.
---
   target/linux/lantiq/image/amazonse.mk| 4 +++-
   target/linux/lantiq/image/danube.mk  | 3 +++
   target/linux/lantiq/image/falcon.mk  | 2 ++
   target/linux/lantiq/image/xway_legacy.mk | 5 +
   4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/target/linux/lantiq/image/amazonse.mk
b/target/linux/lantiq/image/amazonse.mk
index 4a23a68e40..1fd714dee4 100644
--- a/target/linux/lantiq/image/amazonse.mk
+++ b/target/linux/lantiq/image/amazonse.mk
@@ -5,16 +5,18 @@ define Device/allnet_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
+  DEFAULT := n
   endef
   TARGET_DEVICES += allnet_all0333cj

   define Device/netgear_dgn1000b
 DEVICE_VENDOR := NETGEAR
 DEVICE_MODEL := DGN1000B
-  IMAGE_SIZE := 6000k
+  IMAGE_SIZE := 3712k
 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
+  DEFAULT := n
   endef
   TARGET_DEVICES += netgear_dgn1000b
diff --git a/target/linux/lantiq/image/danube.mk
b/target/linux/lantiq/image/danube.mk
index 2fb5ea061f..6ba9a91fb2 100644
--- a/target/linux/lantiq/image/danube.mk
+++ b/target/linux/lantiq/image/danube.mk
@@ -29,6 +29,7 @@ define Device/arcadyan_arv4519pw
kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
ltq-adsl-app ppp-mod-pppoa
 SUPPORTED_DEVICES += ARV4519PW
+  DEFAULT := n
   endef
   TARGET_DEVICES += arcadyan_arv4519pw

@@ -110,6 +111,7 @@ define Device/arcadyan_arv7525pw
kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
ltq-adsl-app ppp-mod-pppoa -swconfig
 SUPPORTED_DEVICES += ARV4510PW
+  DEFAULT := n
   endef
   TARGET_DEVICES += arcadyan_arv7525pw

@@ -201,6 +203,7 @@ define Device/lantiq_easy50712
 DEVICE_MODEL := Danube (EASY50712)
 SOC := danube
 IMAGE_SIZE := 3776k
+  DEFAULT := n
   endef
   TARGET_DEVICES += lantiq_easy50712

diff --git a/target/linux/lantiq/image/falcon.mk
b/target/linux/lantiq/image/falcon.mk
index a5490f6e68..6269cf6858 100644
--- a/target/linux/lantiq/image/falcon.mk
+++ b/target/linux/lantiq/image/falcon.mk
@@ -57,6 +57,7 @@ define Device/lantiq_easy98000-nand
 DEVICE_VARIANT := NAND
 IMAGE_SIZE := 3904k
 DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
+  DEFAULT := n
   endef
   TARGET_DEVICES += lantiq_easy98000-nand

@@ -66,6 +67,7 @@ define Device/lantiq_easy98000-nor
 DEVICE_VARIANT := NOR
 IMAGE_SIZE := 3904k
 DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
+  DEFAULT := n
   endef
   TARGET_DEVICES += lantiq_easy98000-nor

diff --git a/target/linux/lantiq/image/xway_legacy.mk
b/target/linux/lantiq/image/xway_legacy.mk
index 52a29ab2f0..2eaefd2cdd 100644
--- a/target/linux/lantiq/image/xway_legacy.mk
+++ b/target/linux/lantiq/image/xway_legacy.mk
@@ -8,6 +8,7 @@ define Device/arcadyan_arv4518pwr01
ltq-adsl-app ppp-mod-pppoa \
kmod-ath5k wpad-mini
 SUPPORTED_DEVICES += ARV4518PWR01
+  DEFAULT := n
   endef
   TARGET_DEVICES += arcadyan_arv4518pwr01

@@ -21,6 +22,7 @@ define Device/arcadyan_arv4518pwr01a
ltq-adsl-app ppp-mod-pppoa \
kmod-ath5k wpad-basic
 SUPPORTED_DEVICES += ARV4518PWR01A
+  DEFAULT := n
   

RE: [PATCH 4/4] lantiq: disable default build for devices with 4M flash

2020-07-25 Thread mail
> -Original Message-
> From: Paul Spooren [mailto:m...@aparcar.org]
> Sent: Samstag, 25. Juli 2020 23:19
> To: Adrian Schmutzler ; openwrt-
> de...@lists.openwrt.org
> Subject: Re: [PATCH 4/4] lantiq: disable default build for devices with 4M
> flash
> 
> On 25.07.20 08:29, Adrian Schmutzler wrote:
> > It has been decided that the 19.07 release will be last one to include
> > 4/32 devices.
> >
> > This disables default build for all devices with 4M flash on lantiq.
> > Note that this will affect _all_ devices for amazonse ("ase") and
> > xway_legacy subtarget.
> Isn't it cleaner to add the "source-only" feature to xway_legacy/target.mk
> and ase/target.mk? Or is it device specific because new devices for either
> subtarget are expected?

I'm not sure what source-only exactly does. I'll look it up.

The aim is that users are still able to build those devices with adjusted 
settings, both with imagebuilder and make menuconfig, at least in principle.

Best

Adrian

> >
> > Signed-off-by: Adrian Schmutzler 
> >
> > ---
> >
> > As this will effectively empty ase und xway_legacy subtarget, we
> > essentially can disable the buildbots on master for those right away.
> > ---
> >   target/linux/lantiq/image/amazonse.mk| 4 +++-
> >   target/linux/lantiq/image/danube.mk  | 3 +++
> >   target/linux/lantiq/image/falcon.mk  | 2 ++
> >   target/linux/lantiq/image/xway_legacy.mk | 5 +
> >   4 files changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/target/linux/lantiq/image/amazonse.mk
> > b/target/linux/lantiq/image/amazonse.mk
> > index 4a23a68e40..1fd714dee4 100644
> > --- a/target/linux/lantiq/image/amazonse.mk
> > +++ b/target/linux/lantiq/image/amazonse.mk
> > @@ -5,16 +5,18 @@ define Device/allnet_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
> > +  DEFAULT := n
> >   endef
> >   TARGET_DEVICES += allnet_all0333cj
> >
> >   define Device/netgear_dgn1000b
> > DEVICE_VENDOR := NETGEAR
> > DEVICE_MODEL := DGN1000B
> > -  IMAGE_SIZE := 6000k
> > +  IMAGE_SIZE := 3712k
> > 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
> > +  DEFAULT := n
> >   endef
> >   TARGET_DEVICES += netgear_dgn1000b
> > diff --git a/target/linux/lantiq/image/danube.mk
> > b/target/linux/lantiq/image/danube.mk
> > index 2fb5ea061f..6ba9a91fb2 100644
> > --- a/target/linux/lantiq/image/danube.mk
> > +++ b/target/linux/lantiq/image/danube.mk
> > @@ -29,6 +29,7 @@ define Device/arcadyan_arv4519pw
> > kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
> > ltq-adsl-app ppp-mod-pppoa
> > SUPPORTED_DEVICES += ARV4519PW
> > +  DEFAULT := n
> >   endef
> >   TARGET_DEVICES += arcadyan_arv4519pw
> >
> > @@ -110,6 +111,7 @@ define Device/arcadyan_arv7525pw
> > kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
> > ltq-adsl-app ppp-mod-pppoa -swconfig
> > SUPPORTED_DEVICES += ARV4510PW
> > +  DEFAULT := n
> >   endef
> >   TARGET_DEVICES += arcadyan_arv7525pw
> >
> > @@ -201,6 +203,7 @@ define Device/lantiq_easy50712
> > DEVICE_MODEL := Danube (EASY50712)
> > SOC := danube
> > IMAGE_SIZE := 3776k
> > +  DEFAULT := n
> >   endef
> >   TARGET_DEVICES += lantiq_easy50712
> >
> > diff --git a/target/linux/lantiq/image/falcon.mk
> > b/target/linux/lantiq/image/falcon.mk
> > index a5490f6e68..6269cf6858 100644
> > --- a/target/linux/lantiq/image/falcon.mk
> > +++ b/target/linux/lantiq/image/falcon.mk
> > @@ -57,6 +57,7 @@ define Device/lantiq_easy98000-nand
> > DEVICE_VARIANT := NAND
> > IMAGE_SIZE := 3904k
> > DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
> > +  DEFAULT := n
> >   endef
> >   TARGET_DEVICES += lantiq_easy98000-nand
> >
> > @@ -66,6 +67,7 @@ define Device/lantiq_easy98000-nor
> > DEVICE_VARIANT := NOR
> > IMAGE_SIZE := 3904k
> > DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
> > +  DEFAULT := n
> >   endef
> >   TARGET_DEVICES += lantiq_easy98000-nor
> >
> > diff --git a/target/linux/lantiq/image/xway_legacy.mk
> > b/target/linux/lantiq/image/xway_legacy.mk
> > index 52a29ab2f0..2eaefd2cdd 100644
> > --- a/target/linux/lantiq/image/xway_legacy.mk
> > +++ b/target/linux/lantiq/image/xway_legacy.mk
> > @@ -8,6 +8,7 @@ define Device/arcadyan_arv4518pwr01
> > ltq-adsl-app ppp-mod-pppoa \
> > kmod-ath5k wpad-mini
> > SUPPORTED_DEVICES += ARV4518PWR01
> > +  DEFAULT := n
> >   endef
> >   TARGET_DEVICES += arcadyan_arv4518pwr01
> >
> > @@ -21,6 +22,7 @@ define Device/arcadyan_arv4518pwr01a
> > ltq-adsl-app ppp-mod-pppoa \
> > kmod-ath5k wpad-basic
> > SUPPORTED_DEVICES += ARV4518PWR01A
> > +  DEFAULT := n
> >   endef
> >   TARGET_DEVICES += arcadyan_arv4518pwr01a
> >
> > @@ -38,6 +40,7 @@ define Device/arcadyan_arv4520pw
> > ltq-adsl-app 

Re: [PATCH 4/4] lantiq: disable default build for devices with 4M flash

2020-07-25 Thread Paul Spooren

On 25.07.20 08:29, Adrian Schmutzler wrote:

It has been decided that the 19.07 release will be last one to include
4/32 devices.

This disables default build for all devices with 4M flash on lantiq.
Note that this will affect _all_ devices for amazonse ("ase") and
xway_legacy subtarget.
Isn't it cleaner to add the "source-only" feature to 
xway_legacy/target.mk and ase/target.mk? Or is it device specific 
because new devices for either subtarget are expected?


Signed-off-by: Adrian Schmutzler 

---

As this will effectively empty ase und xway_legacy subtarget, we
essentially can disable the buildbots on master for those right away.
---
  target/linux/lantiq/image/amazonse.mk| 4 +++-
  target/linux/lantiq/image/danube.mk  | 3 +++
  target/linux/lantiq/image/falcon.mk  | 2 ++
  target/linux/lantiq/image/xway_legacy.mk | 5 +
  4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/target/linux/lantiq/image/amazonse.mk 
b/target/linux/lantiq/image/amazonse.mk
index 4a23a68e40..1fd714dee4 100644
--- a/target/linux/lantiq/image/amazonse.mk
+++ b/target/linux/lantiq/image/amazonse.mk
@@ -5,16 +5,18 @@ define Device/allnet_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
+  DEFAULT := n
  endef
  TARGET_DEVICES += allnet_all0333cj
  
  define Device/netgear_dgn1000b

DEVICE_VENDOR := NETGEAR
DEVICE_MODEL := DGN1000B
-  IMAGE_SIZE := 6000k
+  IMAGE_SIZE := 3712k
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
+  DEFAULT := n
  endef
  TARGET_DEVICES += netgear_dgn1000b
diff --git a/target/linux/lantiq/image/danube.mk 
b/target/linux/lantiq/image/danube.mk
index 2fb5ea061f..6ba9a91fb2 100644
--- a/target/linux/lantiq/image/danube.mk
+++ b/target/linux/lantiq/image/danube.mk
@@ -29,6 +29,7 @@ define Device/arcadyan_arv4519pw
kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
ltq-adsl-app ppp-mod-pppoa
SUPPORTED_DEVICES += ARV4519PW
+  DEFAULT := n
  endef
  TARGET_DEVICES += arcadyan_arv4519pw
  
@@ -110,6 +111,7 @@ define Device/arcadyan_arv7525pw

kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
ltq-adsl-app ppp-mod-pppoa -swconfig
SUPPORTED_DEVICES += ARV4510PW
+  DEFAULT := n
  endef
  TARGET_DEVICES += arcadyan_arv7525pw
  
@@ -201,6 +203,7 @@ define Device/lantiq_easy50712

DEVICE_MODEL := Danube (EASY50712)
SOC := danube
IMAGE_SIZE := 3776k
+  DEFAULT := n
  endef
  TARGET_DEVICES += lantiq_easy50712
  
diff --git a/target/linux/lantiq/image/falcon.mk b/target/linux/lantiq/image/falcon.mk

index a5490f6e68..6269cf6858 100644
--- a/target/linux/lantiq/image/falcon.mk
+++ b/target/linux/lantiq/image/falcon.mk
@@ -57,6 +57,7 @@ define Device/lantiq_easy98000-nand
DEVICE_VARIANT := NAND
IMAGE_SIZE := 3904k
DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
+  DEFAULT := n
  endef
  TARGET_DEVICES += lantiq_easy98000-nand
  
@@ -66,6 +67,7 @@ define Device/lantiq_easy98000-nor

DEVICE_VARIANT := NOR
IMAGE_SIZE := 3904k
DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
+  DEFAULT := n
  endef
  TARGET_DEVICES += lantiq_easy98000-nor
  
diff --git a/target/linux/lantiq/image/xway_legacy.mk b/target/linux/lantiq/image/xway_legacy.mk

index 52a29ab2f0..2eaefd2cdd 100644
--- a/target/linux/lantiq/image/xway_legacy.mk
+++ b/target/linux/lantiq/image/xway_legacy.mk
@@ -8,6 +8,7 @@ define Device/arcadyan_arv4518pwr01
ltq-adsl-app ppp-mod-pppoa \
kmod-ath5k wpad-mini
SUPPORTED_DEVICES += ARV4518PWR01
+  DEFAULT := n
  endef
  TARGET_DEVICES += arcadyan_arv4518pwr01
  
@@ -21,6 +22,7 @@ define Device/arcadyan_arv4518pwr01a

ltq-adsl-app ppp-mod-pppoa \
kmod-ath5k wpad-basic
SUPPORTED_DEVICES += ARV4518PWR01A
+  DEFAULT := n
  endef
  TARGET_DEVICES += arcadyan_arv4518pwr01a
  
@@ -38,6 +40,7 @@ define Device/arcadyan_arv4520pw

ltq-adsl-app ppp-mod-pppoa \
kmod-rt61-pci wpad-mini
SUPPORTED_DEVICES += ARV4520PW
+  DEFAULT := n
  endef
  TARGET_DEVICES += arcadyan_arv4520pw
  
@@ -53,6 +56,7 @@ define Device/arcadyan_arv4525pw

kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
ltq-adsl-app ppp-mod-pppoa -swconfig
SUPPORTED_DEVICES += ARV4525PW
+  DEFAULT := n
  endef
  TARGET_DEVICES += arcadyan_arv4525pw
  
@@ -68,5 +72,6 @@ define Device/arcadyan_arv452cqw

kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
ltq-adsl-app ppp-mod-pppoa
SUPPORTED_DEVICES += ARV452CQW
+  DEFAULT := n
  endef
  TARGET_DEVICES += arcadyan_arv452cqw


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


[PATCH v2] dropbear: Enable Ed25519 for normal devices

2020-07-25 Thread Paul Spooren
The Ed25519 key pairs are much shorter than RSA pairs and are supported
by default in OpenSSH. Looking at websites explaining how to create new
SSH keys, many suggest using Ed25519 rather than RSA, however consider
the former as not yet widely established. OpenWrt likely has a positive
influence on that development.

As enabling Ed25519 is a compile time option, it is currently not
possible to install the feature via `opkg` nor select that option in an
ImageBuilder.

Due to the size impact of **12kB** the option should only be enabled for
devices with `!SMALL_FLASH`.

This approach seems cleaner than splitting `dropbear` into two packages
like `dropbear` and `dropbear-ed25519`.

Signed-off-by: Paul Spooren 
---
v2:
* Add storage impact to commit message
* Increase package release

 package/network/services/dropbear/Config.in | 2 +-
 package/network/services/dropbear/Makefile  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/dropbear/Config.in 
b/package/network/services/dropbear/Config.in
index 3de4189e08..2836229043 100644
--- a/package/network/services/dropbear/Config.in
+++ b/package/network/services/dropbear/Config.in
@@ -51,7 +51,7 @@ config DROPBEAR_ECC_FULL
 
 config DROPBEAR_ED25519
bool "Ed25519 support"
-   default n
+   default y if !SMALL_FLASH
help
This enables the following public key algorithm:
  ssh-ed25519
diff --git a/package/network/services/dropbear/Makefile 
b/package/network/services/dropbear/Makefile
index 0a9b5c0a99..e92ead2ff8 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dropbear
 PKG_VERSION:=2020.80
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
-- 
2.25.1


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


[PATCH 4/4] lantiq: disable default build for devices with 4M flash

2020-07-25 Thread Adrian Schmutzler
It has been decided that the 19.07 release will be last one to include
4/32 devices.

This disables default build for all devices with 4M flash on lantiq.
Note that this will affect _all_ devices for amazonse ("ase") and
xway_legacy subtarget.

Signed-off-by: Adrian Schmutzler 

---

As this will effectively empty ase und xway_legacy subtarget, we
essentially can disable the buildbots on master for those right away.
---
 target/linux/lantiq/image/amazonse.mk| 4 +++-
 target/linux/lantiq/image/danube.mk  | 3 +++
 target/linux/lantiq/image/falcon.mk  | 2 ++
 target/linux/lantiq/image/xway_legacy.mk | 5 +
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/target/linux/lantiq/image/amazonse.mk 
b/target/linux/lantiq/image/amazonse.mk
index 4a23a68e40..1fd714dee4 100644
--- a/target/linux/lantiq/image/amazonse.mk
+++ b/target/linux/lantiq/image/amazonse.mk
@@ -5,16 +5,18 @@ define Device/allnet_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
+  DEFAULT := n
 endef
 TARGET_DEVICES += allnet_all0333cj
 
 define Device/netgear_dgn1000b
   DEVICE_VENDOR := NETGEAR
   DEVICE_MODEL := DGN1000B
-  IMAGE_SIZE := 6000k
+  IMAGE_SIZE := 3712k
   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
+  DEFAULT := n
 endef
 TARGET_DEVICES += netgear_dgn1000b
diff --git a/target/linux/lantiq/image/danube.mk 
b/target/linux/lantiq/image/danube.mk
index 2fb5ea061f..6ba9a91fb2 100644
--- a/target/linux/lantiq/image/danube.mk
+++ b/target/linux/lantiq/image/danube.mk
@@ -29,6 +29,7 @@ define Device/arcadyan_arv4519pw
kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
ltq-adsl-app ppp-mod-pppoa
   SUPPORTED_DEVICES += ARV4519PW
+  DEFAULT := n
 endef
 TARGET_DEVICES += arcadyan_arv4519pw
 
@@ -110,6 +111,7 @@ define Device/arcadyan_arv7525pw
kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
ltq-adsl-app ppp-mod-pppoa -swconfig
   SUPPORTED_DEVICES += ARV4510PW
+  DEFAULT := n
 endef
 TARGET_DEVICES += arcadyan_arv7525pw
 
@@ -201,6 +203,7 @@ define Device/lantiq_easy50712
   DEVICE_MODEL := Danube (EASY50712)
   SOC := danube
   IMAGE_SIZE := 3776k
+  DEFAULT := n
 endef
 TARGET_DEVICES += lantiq_easy50712
 
diff --git a/target/linux/lantiq/image/falcon.mk 
b/target/linux/lantiq/image/falcon.mk
index a5490f6e68..6269cf6858 100644
--- a/target/linux/lantiq/image/falcon.mk
+++ b/target/linux/lantiq/image/falcon.mk
@@ -57,6 +57,7 @@ define Device/lantiq_easy98000-nand
   DEVICE_VARIANT := NAND
   IMAGE_SIZE := 3904k
   DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
+  DEFAULT := n
 endef
 TARGET_DEVICES += lantiq_easy98000-nand
 
@@ -66,6 +67,7 @@ define Device/lantiq_easy98000-nor
   DEVICE_VARIANT := NOR
   IMAGE_SIZE := 3904k
   DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24
+  DEFAULT := n
 endef
 TARGET_DEVICES += lantiq_easy98000-nor
 
diff --git a/target/linux/lantiq/image/xway_legacy.mk 
b/target/linux/lantiq/image/xway_legacy.mk
index 52a29ab2f0..2eaefd2cdd 100644
--- a/target/linux/lantiq/image/xway_legacy.mk
+++ b/target/linux/lantiq/image/xway_legacy.mk
@@ -8,6 +8,7 @@ define Device/arcadyan_arv4518pwr01
ltq-adsl-app ppp-mod-pppoa \
kmod-ath5k wpad-mini
   SUPPORTED_DEVICES += ARV4518PWR01
+  DEFAULT := n
 endef
 TARGET_DEVICES += arcadyan_arv4518pwr01
 
@@ -21,6 +22,7 @@ define Device/arcadyan_arv4518pwr01a
ltq-adsl-app ppp-mod-pppoa \
kmod-ath5k wpad-basic
   SUPPORTED_DEVICES += ARV4518PWR01A
+  DEFAULT := n
 endef
 TARGET_DEVICES += arcadyan_arv4518pwr01a
 
@@ -38,6 +40,7 @@ define Device/arcadyan_arv4520pw
ltq-adsl-app ppp-mod-pppoa \
kmod-rt61-pci wpad-mini
   SUPPORTED_DEVICES += ARV4520PW
+  DEFAULT := n
 endef
 TARGET_DEVICES += arcadyan_arv4520pw
 
@@ -53,6 +56,7 @@ define Device/arcadyan_arv4525pw
kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
ltq-adsl-app ppp-mod-pppoa -swconfig
   SUPPORTED_DEVICES += ARV4525PW
+  DEFAULT := n
 endef
 TARGET_DEVICES += arcadyan_arv4525pw
 
@@ -68,5 +72,6 @@ define Device/arcadyan_arv452cqw
kmod-ltq-adsl-danube-fw-b kmod-ltq-atm-danube \
ltq-adsl-app ppp-mod-pppoa
   SUPPORTED_DEVICES += ARV452CQW
+  DEFAULT := n
 endef
 TARGET_DEVICES += arcadyan_arv452cqw
-- 
2.20.1


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


[PATCH 2/4] ath79: disable default build for devices with 4M flash

2020-07-25 Thread Adrian Schmutzler
It has been decided that the 19.07 release will be last one to include
4/32 devices.

This disables default build for the remaining devices with 4M flash
on ath79. Note that this will leave exactly one enabled device for
ath79/tiny subtarget, PQI Air-Pen, which was moved there due to
kernel size restrictions.

All 4M TP-Link devices have already been disabled in
8819faff47ff ("ath79: do not build TP-Link tiny images by default")

Signed-off-by: Adrian Schmutzler 
---
 target/linux/ath79/image/tiny-netgear.mk | 4 
 1 file changed, 4 insertions(+)

diff --git a/target/linux/ath79/image/tiny-netgear.mk 
b/target/linux/ath79/image/tiny-netgear.mk
index 0127e5bd97..8561f91ab8 100644
--- a/target/linux/ath79/image/tiny-netgear.mk
+++ b/target/linux/ath79/image/tiny-netgear.mk
@@ -10,6 +10,7 @@ define Device/netgear_wnr612-v2
   NETGEAR_BOARD_ID := REALWNR612V2
   IMAGE_SIZE := 3712k
   SUPPORTED_DEVICES += wnr612-v2
+  DEFAULT := n
 endef
 TARGET_DEVICES += netgear_wnr612-v2
 
@@ -22,6 +23,7 @@ define Device/on_n150r
   NETGEAR_BOARD_ID := N150R
   IMAGE_SIZE := 3712k
   SUPPORTED_DEVICES += n150r
+  DEFAULT := n
 endef
 TARGET_DEVICES += on_n150r
 
@@ -35,6 +37,7 @@ define Device/netgear_wnr1000-v2
   NETGEAR_HW_ID := 29763331+4+32
   IMAGE_SIZE := 3712k
   SUPPORTED_DEVICES += wnr1000-v2
+  DEFAULT := n
 endef
 TARGET_DEVICES += netgear_wnr1000-v2
 
@@ -51,5 +54,6 @@ define Device/netgear_wnr2000-v3
   IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | \
check-size
   SUPPORTED_DEVICES += wnr2000-v3
+  DEFAULT := n
 endef
 TARGET_DEVICES += netgear_wnr2000-v3
-- 
2.20.1


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


[PATCH 1/4] ath79: reorganize common image definitions for Netgear

2020-07-25 Thread Adrian Schmutzler
Netgear currently has a special definition for tiny devices, which
is only used by two devices. Despite, it sets ups the IMAGE/default
definition individually for all devices, although there is actually
only one exception.

This merges the common parts into a single netgear_generic definition
(in contrast to netgear_ath79_nand), and adjusts the individual
defitions accordingly.

Signed-off-by: Adrian Schmutzler 
---
 target/linux/ath79/image/common-netgear.mk |  5 +++-
 target/linux/ath79/image/generic.mk| 14 +--
 target/linux/ath79/image/tiny-netgear.mk   | 28 --
 3 files changed, 21 insertions(+), 26 deletions(-)

diff --git a/target/linux/ath79/image/common-netgear.mk 
b/target/linux/ath79/image/common-netgear.mk
index 51808069e3..b41650c6e9 100644
--- a/target/linux/ath79/image/common-netgear.mk
+++ b/target/linux/ath79/image/common-netgear.mk
@@ -33,10 +33,13 @@ define Build/netgear-uImage
$(call Build/uImage,$(1) -M $(NETGEAR_KERNEL_MAGIC))
 endef
 
-define Device/netgear_ath79
+define Device/netgear_generic
   DEVICE_VENDOR := NETGEAR
   KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
   IMAGES += factory.img
+  IMAGE/default := append-kernel | pad-to (BLOCKSIZE) | netgear-squashfs | 
\
+   append-rootfs | pad-rootfs
   IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
check-size
   IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | \
diff --git a/target/linux/ath79/image/generic.mk 
b/target/linux/ath79/image/generic.mk
index 8dc16983e1..64e9410519 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -1030,6 +1030,7 @@ endef
 TARGET_DEVICES += nec_wg800hp
 
 define Device/netgear_ex6400_ex7300
+  $(Device/netgear_generic)
   SOC := qca9558
   NETGEAR_KERNEL_MAGIC := 0x27051956
   NETGEAR_BOARD_ID := EX7300series
@@ -1037,8 +1038,11 @@ define Device/netgear_ex6400_ex7300
   IMAGE_SIZE := 15552k
   IMAGE/default := append-kernel | pad-offset (BLOCKSIZE) 64 | \
netgear-rootfs | pad-rootfs
+  IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
+   check-size
+  IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | \
+   check-size
   DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca99x0-ct
-  $(Device/netgear_ath79)
 endef
 
 define Device/netgear_ex6400
@@ -1054,12 +1058,10 @@ endef
 TARGET_DEVICES += netgear_ex7300
 
 define Device/netgear_wndr3x00
+  $(Device/netgear_generic)
   SOC := ar7161
-  IMAGE/default := append-kernel | pad-to (BLOCKSIZE) | netgear-squashfs | 
\
-   append-rootfs | pad-rootfs
   DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
kmod-leds-reset kmod-owl-loader
-  $(Device/netgear_ath79)
 endef
 
 define Device/netgear_wndr3700
@@ -1135,14 +1137,12 @@ endef
 TARGET_DEVICES += netgear_wndrmac-v2
 
 define Device/netgear_wnr2200_common
+  $(Device/netgear_generic)
   SOC := ar7241
   DEVICE_MODEL := WNR2200
   DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
   NETGEAR_KERNEL_MAGIC := 0x32323030
   NETGEAR_BOARD_ID := wnr2200
-  IMAGE/default := append-kernel | pad-to (BLOCKSIZE) | netgear-squashfs | 
\
-   append-rootfs | pad-rootfs
-  $(Device/netgear_ath79)
 endef
 
 define Device/netgear_wnr2200-8m
diff --git a/target/linux/ath79/image/tiny-netgear.mk 
b/target/linux/ath79/image/tiny-netgear.mk
index 5c83a10e01..0127e5bd97 100644
--- a/target/linux/ath79/image/tiny-netgear.mk
+++ b/target/linux/ath79/image/tiny-netgear.mk
@@ -1,35 +1,32 @@
 include ./common-netgear.mk
 
-define Device/netgear_ar7240
-  SOC := ar7240
-  NETGEAR_KERNEL_MAGIC := 0x32303631
-  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
-  IMAGE_SIZE := 3712k
-  IMAGE/default := append-kernel | pad-to (BLOCKSIZE) | netgear-squashfs | 
\
-   append-rootfs | pad-rootfs
-  $(Device/netgear_ath79)
-endef
-
 define Device/netgear_wnr612-v2
-  $(Device/netgear_ar7240)
+  $(Device/netgear_generic)
+  SOC := ar7240
   DEVICE_MODEL := WNR612
   DEVICE_VARIANT := v2
   DEVICE_DTS := ar7240_netgear_wnr612-v2
+  NETGEAR_KERNEL_MAGIC := 0x32303631
   NETGEAR_BOARD_ID := REALWNR612V2
+  IMAGE_SIZE := 3712k
   SUPPORTED_DEVICES += wnr612-v2
 endef
 TARGET_DEVICES += netgear_wnr612-v2
 
 define Device/on_n150r
-  $(Device/netgear_ar7240)
+  $(Device/netgear_generic)
+  SOC := ar7240
   DEVICE_VENDOR := On Networks
   DEVICE_MODEL := N150R
+  NETGEAR_KERNEL_MAGIC := 0x32303631
   NETGEAR_BOARD_ID := N150R
+  IMAGE_SIZE := 3712k
   SUPPORTED_DEVICES += n150r
 endef
 TARGET_DEVICES += on_n150r
 
 define Device/netgear_wnr1000-v2
+  $(Device/netgear_generic)
   SOC := ar7240
   DEVICE_MODEL := WNR1000
   DEVICE_VARIANT := v2
@@ -37,14 +34,12 @@ define Device/netgear_wnr1000-v2
   NETGEAR_BOARD_ID := WNR1000V2
   NETGEAR_HW_ID := 29763331+4+32
   IMAGE_SIZE := 3712k
-  IMAGE/default := 

[PATCH 3/4] lantiq: fix cosmetic issues with partition offsets and sizes

2020-07-25 Thread Adrian Schmutzler
This fixes a few cosmetic issues with partition offset and size
that are inconsistent probably due to copy/pasting.

Signed-off-by: Adrian Schmutzler 
---
 .../arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts   | 4 ++--
 .../mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi| 2 +-
 .../arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts   | 2 +-
 .../arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts   | 2 +-
 .../arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts   | 2 +-
 .../arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi   | 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts
 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts
index 943b00f898..ca530e39d3 100644
--- 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts
+++ 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/amazonse_netgear_dgn1000b.dts
@@ -136,8 +136,8 @@
read-only;
};
 
-   partition@50 {
-   reg = <0x5 0x003a>;
+   partition@5 {
+   reg = <0x5 0x3a>;
label = "kernel";
};
};
diff --git 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi
 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi
index dcae06d894..3ed49e4a62 100644
--- 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi
+++ 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi
@@ -155,7 +155,7 @@
reg = <0x2 0x3d>;
};
 
-   boardconfig: partition@40 {
+   boardconfig: partition@3f {
label = "boardconfig";
reg = <0x3f 0x1>;
read-only;
diff --git 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts
 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts
index cceb42164e..fb240b2ed8 100644
--- 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts
+++ 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts
@@ -126,7 +126,7 @@
reg = <0x2 0x3d>;
};
 
-   boardconfig: partition@40 {
+   boardconfig: partition@3f {
label = "boardconfig";
reg = <0x3f 0x1>;
read-only;
diff --git 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
index b5e8845576..5afc157036 100644
--- 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
+++ 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
@@ -181,7 +181,7 @@
reg = <0x2 0x7d>;
};
 
-   boardconfig: partition@40 {
+   boardconfig: partition@7f {
label = "boardconfig";
reg = <0x7f 0x1>;
read-only;
diff --git 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts
 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts
index d673c9b204..437fecec9d 100644
--- 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts
+++ 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts
@@ -119,7 +119,7 @@
reg = <0x2 0x3d>;
};
 
-   boardconfig: partition@40 {
+   boardconfig: partition@3f {
label = "board_config";
reg = <0x3f 0x1>;
read-only;
diff --git 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi
 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi
index f5ea12b7e2..223ff7dcf6 100644
--- 
a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi
+++ 
b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920.dtsi
@@ 

[PATCH 0/4] disable default build on remaining 4M devices

2020-07-25 Thread Adrian Schmutzler
This disables the remaining 4M flash devices not yet taken care of.

bcm63xx and ramips have already been covered in earlier patches.

I didn't do anything about bcm47xx and bcm53xx, as I'm not familiar
enough with these target. Somebody else should take care there.

Adrian Schmutzler (4):
  ath79: reorganize common image definitions for Netgear
  ath79: disable default build for devices with 4M flash
  lantiq: fix cosmetic issues with partition offsets and sizes
  lantiq: disable default build for devices with 4M flash

 target/linux/ath79/image/common-netgear.mk|  5 ++-
 target/linux/ath79/image/generic.mk   | 14 
 target/linux/ath79/image/tiny-netgear.mk  | 32 ---
 .../dts/lantiq/amazonse_netgear_dgn1000b.dts  |  4 +--
 .../lantiq/danube_arcadyan_arv4518pwr01.dtsi  |  2 +-
 .../dts/lantiq/danube_arcadyan_arv4525pw.dts  |  2 +-
 .../dts/lantiq/danube_arcadyan_arv7518pw.dts  |  2 +-
 .../dts/lantiq/danube_arcadyan_arv7525pw.dts  |  2 +-
 .../boot/dts/lantiq/vr9_lantiq_easy80920.dtsi |  4 +--
 target/linux/lantiq/image/amazonse.mk |  4 ++-
 target/linux/lantiq/image/danube.mk   |  3 ++
 target/linux/lantiq/image/falcon.mk   |  2 ++
 target/linux/lantiq/image/xway_legacy.mk  |  5 +++
 13 files changed, 46 insertions(+), 35 deletions(-)

-- 
2.20.1


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


RE: [PATCH 1/1] tools: add firmware utils for linksys-addfwhdr generation. Needed for openwrt-factory flashing over the stock WEB interface for Linksys E8350-v1(and other linksys devices) The tool sou

2020-07-25 Thread mail
Hi Todor,

> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org]
> On Behalf Of Todor Colov
> Sent: Samstag, 25. Juli 2020 18:30
> To: openwrt-devel@lists.openwrt.org
> Cc: Todor Colov 
> Subject: [PATCH 1/1] tools: add firmware utils for linksys-addfwhdr
> generation. Needed for openwrt-factory flashing over the stock WEB
> interface for Linksys E8350-v1(and other linksys devices) The tool source 
> files
> for "addfwhdr" are placed in a separate sub-direc

some formal advice for submitting patches, now that you have resubmitted some 
of yours a few times:

1. If you send the same patch with changes, please add a v2, v3 etc. to the 
[PATCH] prefix, so everyone can see which is the most recent version.
As some help for the reviewers, it is convenient to add the changes in each 
version below a line with "---" after the commit message.
This can be done automatically with "git format-patch -v2", where the "-v2" 
adds a "v2" to the patches.

2. Cover-letters are meant for patchsets with several changes. If you send a 
single patch, it is more convenient to include the information in the commit 
message of the patch; either before the "---" for relevant information that 
should be included when the patch is merged, or after the "---" for 
remotely/less important additional info that will be removed automatically when 
somebody picks that patch. The cover letter then is not necessary at all.
However, in your case, it appears that you should actually should send your 
patches together as a "patchset", as they depend on each other. In that case, a 
single cover letter for multiple patches actually makes sense, to explain the 
aim of the patchset as a whole, while the commit message describes the 
individual patches. This is achieved by running format-patch on a set of 
patches, e.g. "git format-patch @~3 -v2 --cover-letter" to format the last 
three patches relative to your current checkout.

3. Please format your commit message properly. In this patch, all you commit 
message is recognized as title, as you see by the mail subject. I never had 
this case myself, but I suspect it is created if you don't have an empty line 
after the commit title.

Best

Adrian


> 
> Signed-off-by: Todor Colov 
> ---
>  tools/firmware-utils/Makefile |   4 +-
>  tools/firmware-utils/src/linksys/addfwhdr.c   | 195 
>  tools/firmware-utils/src/linksys/bcmdefs.h| 318 +
>  .../firmware-utils/src/linksys/code_pattern.h | 396 
>  tools/firmware-utils/src/linksys/crc.c| 290 
>  tools/firmware-utils/src/linksys/crc.h|  69 +++
>  tools/firmware-utils/src/linksys/cyutils.h| 348 ++
>  tools/firmware-utils/src/linksys/typedefs.h   | 447 ++
>  8 files changed, 2066 insertions(+), 1 deletion(-)
>  create mode 100644 tools/firmware-utils/src/linksys/addfwhdr.c
>  create mode 100644 tools/firmware-utils/src/linksys/bcmdefs.h
>  create mode 100644 tools/firmware-utils/src/linksys/code_pattern.h
>  create mode 100644 tools/firmware-utils/src/linksys/crc.c
>  create mode 100644 tools/firmware-utils/src/linksys/crc.h
>  create mode 100644 tools/firmware-utils/src/linksys/cyutils.h
>  create mode 100644 tools/firmware-utils/src/linksys/typedefs.h
> 
> diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
> index 3dd9ac5c2c..0948e69013 100644
> --- a/tools/firmware-utils/Makefile
> +++ b/tools/firmware-utils/Makefile
> @@ -23,6 +23,8 @@ endef
> 
>  define Host/Compile
>   mkdir -p $(HOST_BUILD_DIR)/bin
> + mkdir -p $(HOST_BUILD_DIR)/bin/linksys
> + $(call cc,linksys/addfwhdr linksys/crc )
>   $(call cc,add_header)
>   $(call cc,addpattern)
>   $(call cc,asustrx)
> @@ -97,7 +99,7 @@ define Host/Compile
>  endef
> 
>  define Host/Install
> - $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/*
> $(STAGING_DIR_HOST)/bin/
> + $(CP) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
>  endef
> 
>  $(eval $(call HostBuild))
> diff --git a/tools/firmware-utils/src/linksys/addfwhdr.c b/tools/firmware-
> utils/src/linksys/addfwhdr.c
> new file mode 100644
> index 00..6e2896c62d
> --- /dev/null
> +++ b/tools/firmware-utils/src/linksys/addfwhdr.c
> @@ -0,0 +1,195 @@
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include "cyutils.h"
> +#include "code_pattern.h"
> +
> +#include "typedefs.h"
> +
> +#define MAX_BUF  1024
> +#define CRC32_INIT_VALUE 0x  /* Initial CRC32 checksum
> value */
> +
> +extern uint32 crc32(uint8 *pdata, uint nbytes, uint32 crc);
> +
> +int fd, fd_w;
> +
> +void die(const char * str, ...)
> +{
> + va_list args;
> + va_start(args, str);
> + vfprintf(stderr, str, args);
> + fputc('\n', stderr);
> + exit(1);
> +}
> +
> +int
> +fill_null0(int size)
> +{
> + unsigned char buf[1];
> + int i;
> +
> + 

[PATCH 1/1] tools: add firmware utils for linksys-addfwhdr

2020-07-25 Thread Todor Colov
Needed for openwrt-factory flashing over the stock WEB interface for Linksys 
E8350-v1(and other linksys devices) The tool source files for "addfwhdr" are 
placed in a separate sub-directory src/linksys - following naming convention 
for Manufacturer.

Signed-off-by: Todor Colov 
---
 tools/firmware-utils/Makefile |   4 +-
 tools/firmware-utils/src/linksys/addfwhdr.c   | 195 
 tools/firmware-utils/src/linksys/bcmdefs.h| 318 +
 .../firmware-utils/src/linksys/code_pattern.h | 396 
 tools/firmware-utils/src/linksys/crc.c| 290 
 tools/firmware-utils/src/linksys/crc.h|  69 +++
 tools/firmware-utils/src/linksys/cyutils.h| 348 ++
 tools/firmware-utils/src/linksys/typedefs.h   | 447 ++
 8 files changed, 2066 insertions(+), 1 deletion(-)
 create mode 100644 tools/firmware-utils/src/linksys/addfwhdr.c
 create mode 100644 tools/firmware-utils/src/linksys/bcmdefs.h
 create mode 100644 tools/firmware-utils/src/linksys/code_pattern.h
 create mode 100644 tools/firmware-utils/src/linksys/crc.c
 create mode 100644 tools/firmware-utils/src/linksys/crc.h
 create mode 100644 tools/firmware-utils/src/linksys/cyutils.h
 create mode 100644 tools/firmware-utils/src/linksys/typedefs.h

diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 3dd9ac5c2c..0948e69013 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -23,6 +23,8 @@ endef
 
 define Host/Compile
mkdir -p $(HOST_BUILD_DIR)/bin
+   mkdir -p $(HOST_BUILD_DIR)/bin/linksys
+   $(call cc,linksys/addfwhdr linksys/crc )
$(call cc,add_header)
$(call cc,addpattern)
$(call cc,asustrx)
@@ -97,7 +99,7 @@ define Host/Compile
 endef
 
 define Host/Install
-   $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
+   $(CP) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
 endef
 
 $(eval $(call HostBuild))
diff --git a/tools/firmware-utils/src/linksys/addfwhdr.c 
b/tools/firmware-utils/src/linksys/addfwhdr.c
new file mode 100644
index 00..6e2896c62d
--- /dev/null
+++ b/tools/firmware-utils/src/linksys/addfwhdr.c
@@ -0,0 +1,195 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "cyutils.h"
+#include "code_pattern.h"
+
+#include "typedefs.h"
+
+#define MAX_BUF1024
+#define CRC32_INIT_VALUE 0x/* Initial CRC32 checksum value */
+
+extern uint32 crc32(uint8 *pdata, uint nbytes, uint32 crc);
+
+int fd, fd_w;
+
+void die(const char * str, ...)
+{
+   va_list args;
+   va_start(args, str);
+   vfprintf(stderr, str, args);
+   fputc('\n', stderr);
+   exit(1);
+}
+
+int 
+fill_null0(int size)
+{
+   unsigned char buf[1];
+   int i;
+
+   fprintf(stderr,"Fill null\n");
+
+   buf[0] = 0xff;
+   for (i=0 ; i< size; i++ )
+   if (write(fd_w, buf, 1) != 1)
+   return 0;
+
+   return 1;
+}
+
+long
+file_open(const char *name)
+{
+   struct stat sb;
+   if ((fd = open(name, O_RDONLY, 0)) < 0){
+   die("Unable to open `%s' : %m", name);
+   }
+
+   if (fstat (fd, ))
+   die("Unable to stat `%s' : %m", name);
+
+   return sb.st_size;
+}
+
+void usage(void)
+{
+   die("Usage: addfwhdr [-i|--input] sysupgrade.o [-o|--output] 
code.bin\n");
+}
+
+int main(int argc, char ** argv)
+{
+   uint input_size,c;
+   char *input_file=NULL, *output_file=NULL;
+int opt;
+int option_index=0;
+   int garbage = 0;
+   char *buf = NULL;
+extern char *optarg;
+extern int optind, opterr, optopt;
+   
+   struct cbt_fw_header *fwhdr;
+   uint32 crc; 
+
+static struct option long_options[] =
+   {
+   {"input", 1, 0, 'i'},
+   {"output", 1, 0, 'o'},
+   {"garbage", 0, 0, 'g'},
+   {0, 0, 0, 0}
+   };
+
+   printf("\n-- add fw header \n");
+
+fwhdr  = malloc(sizeof(struct cbt_fw_header));
+   memset(fwhdr, 0, sizeof(struct cbt_fw_header)); 
+
+   while(1){
+   opt = getopt_long(argc, argv, "i:o:g",long_options, 
_index);
+   if(opt == -1)
+   break;
+   switch(opt){
+   case 'h' : 
+   usage(); break;
+   case 'i' :
+   input_file = optarg;
+   printf("input file is [%s]\n",input_file); 
break;
+   case 'o' :
+   output_file = optarg;
+   printf("output file is [%s]\n",output_file); 
break;
+   case 'g' :
+   garbage = 1; break;
+   default :
+   usage();
+   

[PATCH 0/1] tools: add firmware util linksys-addfwhdr

2020-07-25 Thread Todor Colov
tools: add firmware utils for linksys-addfwhdr generation. Needed for 
openwrt-factory flashing over the stock WEB interface for Linksys E8350-v1(and 
other linksys devices) The tool source files for "addfwhdr" are placed in a 
separate sub-directory src/linksys - following naming convention for 
Manufacturer.


Todor Colov (1):
  tools: add firmware utils for linksys-addfwhdr generation. Needed for
openwrt-factory flashing over the stock WEB interface for Linksys
E8350-v1(and other linksys devices) The tool source files for
"addfwhdr" are placed in a separate sub-directory src/linksys -
following naming convention for Manufacturer.

 tools/firmware-utils/Makefile |   4 +-
 tools/firmware-utils/src/linksys/addfwhdr.c   | 195 
 tools/firmware-utils/src/linksys/bcmdefs.h| 318 +
 .../firmware-utils/src/linksys/code_pattern.h | 396 
 tools/firmware-utils/src/linksys/crc.c| 290 
 tools/firmware-utils/src/linksys/crc.h|  69 +++
 tools/firmware-utils/src/linksys/cyutils.h| 348 ++
 tools/firmware-utils/src/linksys/typedefs.h   | 447 ++
 8 files changed, 2066 insertions(+), 1 deletion(-)
 create mode 100644 tools/firmware-utils/src/linksys/addfwhdr.c
 create mode 100644 tools/firmware-utils/src/linksys/bcmdefs.h
 create mode 100644 tools/firmware-utils/src/linksys/code_pattern.h
 create mode 100644 tools/firmware-utils/src/linksys/crc.c
 create mode 100644 tools/firmware-utils/src/linksys/crc.h
 create mode 100644 tools/firmware-utils/src/linksys/cyutils.h
 create mode 100644 tools/firmware-utils/src/linksys/typedefs.h

-- 
2.27.0


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


[PATCH 1/1] base-files: fix nand.sh to remove metadata before ubiformat

2020-07-25 Thread Todor Colov
Signed-off-by: Todor Colov 
---
 package/base-files/files/lib/upgrade/nand.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/base-files/files/lib/upgrade/nand.sh 
b/package/base-files/files/lib/upgrade/nand.sh
index e7d7bf8d13..923c01a72d 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -224,6 +224,7 @@ nand_upgrade_ubinized() {
local mtddev="/dev/mtd${mtdnum}"
ubidetach -p "${mtddev}" || true
sync
+   fwtool -q -t -i /dev/null "$1"
ubiformat "${mtddev}" -y -f "${ubi_file}"
ubiattach -p "${mtddev}"
nand_do_upgrade_success
-- 
2.27.0


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


[PATCH 0/1] base-files: fix nand.sh to remove metadata before ubiformat command

2020-07-25 Thread Todor Colov
Required for sysupgrade with KERNEL_IN_UBI ubinized volumes

Todor Colov (1):
  base-files: fix nand.sh to remove metadata before ubiformat command

 package/base-files/files/lib/upgrade/nand.sh | 1 +
 1 file changed, 1 insertion(+)

-- 
2.27.0


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


[PATCH 1/1] tools: add firmware utils for linksys-addfwhdr generation. Needed for openwrt-factory flashing over the stock WEB interface for Linksys E8350-v1(and other linksys devices) The tool source

2020-07-25 Thread Todor Colov
Signed-off-by: Todor Colov 
---
 tools/firmware-utils/Makefile |   4 +-
 tools/firmware-utils/src/linksys/addfwhdr.c   | 195 
 tools/firmware-utils/src/linksys/bcmdefs.h| 318 +
 .../firmware-utils/src/linksys/code_pattern.h | 396 
 tools/firmware-utils/src/linksys/crc.c| 290 
 tools/firmware-utils/src/linksys/crc.h|  69 +++
 tools/firmware-utils/src/linksys/cyutils.h| 348 ++
 tools/firmware-utils/src/linksys/typedefs.h   | 447 ++
 8 files changed, 2066 insertions(+), 1 deletion(-)
 create mode 100644 tools/firmware-utils/src/linksys/addfwhdr.c
 create mode 100644 tools/firmware-utils/src/linksys/bcmdefs.h
 create mode 100644 tools/firmware-utils/src/linksys/code_pattern.h
 create mode 100644 tools/firmware-utils/src/linksys/crc.c
 create mode 100644 tools/firmware-utils/src/linksys/crc.h
 create mode 100644 tools/firmware-utils/src/linksys/cyutils.h
 create mode 100644 tools/firmware-utils/src/linksys/typedefs.h

diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 3dd9ac5c2c..0948e69013 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -23,6 +23,8 @@ endef
 
 define Host/Compile
mkdir -p $(HOST_BUILD_DIR)/bin
+   mkdir -p $(HOST_BUILD_DIR)/bin/linksys
+   $(call cc,linksys/addfwhdr linksys/crc )
$(call cc,add_header)
$(call cc,addpattern)
$(call cc,asustrx)
@@ -97,7 +99,7 @@ define Host/Compile
 endef
 
 define Host/Install
-   $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
+   $(CP) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
 endef
 
 $(eval $(call HostBuild))
diff --git a/tools/firmware-utils/src/linksys/addfwhdr.c 
b/tools/firmware-utils/src/linksys/addfwhdr.c
new file mode 100644
index 00..6e2896c62d
--- /dev/null
+++ b/tools/firmware-utils/src/linksys/addfwhdr.c
@@ -0,0 +1,195 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "cyutils.h"
+#include "code_pattern.h"
+
+#include "typedefs.h"
+
+#define MAX_BUF1024
+#define CRC32_INIT_VALUE 0x/* Initial CRC32 checksum value */
+
+extern uint32 crc32(uint8 *pdata, uint nbytes, uint32 crc);
+
+int fd, fd_w;
+
+void die(const char * str, ...)
+{
+   va_list args;
+   va_start(args, str);
+   vfprintf(stderr, str, args);
+   fputc('\n', stderr);
+   exit(1);
+}
+
+int 
+fill_null0(int size)
+{
+   unsigned char buf[1];
+   int i;
+
+   fprintf(stderr,"Fill null\n");
+
+   buf[0] = 0xff;
+   for (i=0 ; i< size; i++ )
+   if (write(fd_w, buf, 1) != 1)
+   return 0;
+
+   return 1;
+}
+
+long
+file_open(const char *name)
+{
+   struct stat sb;
+   if ((fd = open(name, O_RDONLY, 0)) < 0){
+   die("Unable to open `%s' : %m", name);
+   }
+
+   if (fstat (fd, ))
+   die("Unable to stat `%s' : %m", name);
+
+   return sb.st_size;
+}
+
+void usage(void)
+{
+   die("Usage: addfwhdr [-i|--input] sysupgrade.o [-o|--output] 
code.bin\n");
+}
+
+int main(int argc, char ** argv)
+{
+   uint input_size,c;
+   char *input_file=NULL, *output_file=NULL;
+int opt;
+int option_index=0;
+   int garbage = 0;
+   char *buf = NULL;
+extern char *optarg;
+extern int optind, opterr, optopt;
+   
+   struct cbt_fw_header *fwhdr;
+   uint32 crc; 
+
+static struct option long_options[] =
+   {
+   {"input", 1, 0, 'i'},
+   {"output", 1, 0, 'o'},
+   {"garbage", 0, 0, 'g'},
+   {0, 0, 0, 0}
+   };
+
+   printf("\n-- add fw header \n");
+
+fwhdr  = malloc(sizeof(struct cbt_fw_header));
+   memset(fwhdr, 0, sizeof(struct cbt_fw_header)); 
+
+   while(1){
+   opt = getopt_long(argc, argv, "i:o:g",long_options, 
_index);
+   if(opt == -1)
+   break;
+   switch(opt){
+   case 'h' : 
+   usage(); break;
+   case 'i' :
+   input_file = optarg;
+   printf("input file is [%s]\n",input_file); 
break;
+   case 'o' :
+   output_file = optarg;
+   printf("output file is [%s]\n",output_file); 
break;
+   case 'g' :
+   garbage = 1; break;
+   default :
+   usage();
+   }
+   }
+
+   if(!input_file || !output_file)
+   {
+   printf("You must specify the input and output file!\n");
+   usage();
+   }
+
+   
+   unlink(output_file);
+   if ((fd_w = 

[PATCH 0/1] tools: add firmware util addfwhdr for linksys firmware header generation needed for Linksys E8350-v1.

2020-07-25 Thread Todor Colov
tools: add firmware utils for linksys-addfwhdr generation. Needed for 
openwrt-factory flashing over the stock WEB interface for Linksys E8350-v1(and 
other linksys devices) The tool source files for "addfwhdr" are placed in a 
separate sub-directory src/linksys - following naming convention for 
Manufacturer.


Todor Colov (1):
  tools: add firmware utils for linksys-addfwhdr generation. Needed for
openwrt-factory flashing over the stock WEB interface for Linksys
E8350-v1(and other linksys devices) The tool source files for
"addfwhdr" are placed in a separate sub-directory src/linksys -
following naming convention for Manufacturer.

 tools/firmware-utils/Makefile |   4 +-
 tools/firmware-utils/src/linksys/addfwhdr.c   | 195 
 tools/firmware-utils/src/linksys/bcmdefs.h| 318 +
 .../firmware-utils/src/linksys/code_pattern.h | 396 
 tools/firmware-utils/src/linksys/crc.c| 290 
 tools/firmware-utils/src/linksys/crc.h|  69 +++
 tools/firmware-utils/src/linksys/cyutils.h| 348 ++
 tools/firmware-utils/src/linksys/typedefs.h   | 447 ++
 8 files changed, 2066 insertions(+), 1 deletion(-)
 create mode 100644 tools/firmware-utils/src/linksys/addfwhdr.c
 create mode 100644 tools/firmware-utils/src/linksys/bcmdefs.h
 create mode 100644 tools/firmware-utils/src/linksys/code_pattern.h
 create mode 100644 tools/firmware-utils/src/linksys/crc.c
 create mode 100644 tools/firmware-utils/src/linksys/crc.h
 create mode 100644 tools/firmware-utils/src/linksys/cyutils.h
 create mode 100644 tools/firmware-utils/src/linksys/typedefs.h

-- 
2.27.0


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


[PATCH 1/1] ipq806x: Add support for Linksys E8350-v1

2020-07-25 Thread Todor Colov
Signed-off-by: Todor Colov 
---
 .../ipq806x/base-files/etc/board.d/01_leds|   3 +
 .../ipq806x/base-files/etc/board.d/02_network |   1 +
 .../base-files/lib/upgrade/platform.sh|   3 +-
 .../arm/boot/dts/qcom-ipq8064-e8350-v1.dts| 246 ++
 target/linux/ipq806x/image/Makefile   |  29 +++
 .../0069-arm-boot-add-dts-files.patch |   3 +-
 6 files changed, 283 insertions(+), 2 deletions(-)
 create mode 100644 
target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts

diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds 
b/target/linux/ipq806x/base-files/etc/board.d/01_leds
index f8b6c32358..802fb41d74 100755
--- a/target/linux/ipq806x/base-files/etc/board.d/01_leds
+++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds
@@ -19,6 +19,9 @@ compex,wpq864)
ucidef_set_led_usbport "usb" "USB" "wpq864:green:usb" "usb1-port1" 
"usb2-port1"
ucidef_set_led_usbport "pcie-usb" "PCIe USB" "wpq864:green:usb-pcie" 
"usb3-port1"
;;
+linksys,e8350-v1)
+ucidef_set_led_wlan "wlan" "WLAN" "${boardname}:green:wifi" "phy0tpt"
+;;
 nec,wg2600hp)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" 
"phy1tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" 
"phy0tpt"
diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network 
b/target/linux/ipq806x/base-files/etc/board.d/02_network
index 529a8d9f39..5e26fa2a8b 100755
--- a/target/linux/ipq806x/base-files/etc/board.d/02_network
+++ b/target/linux/ipq806x/base-files/etc/board.d/02_network
@@ -14,6 +14,7 @@ board=$(board_name)
 case "$board" in
 buffalo,wxr-2533dhp |\
 compex,wpq864 |\
+linksys,e8350-v1 |\
 netgear,d7800 |\
 netgear,r7500 |\
 netgear,r7500v2 |\
diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh 
b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
index 560e64af3a..4f4fb12ef0 100644
--- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
@@ -1,7 +1,7 @@
 PART_NAME=firmware
 REQUIRE_IMAGE_METADATA=1
 
-RAMFS_COPY_BIN='fw_printenv fw_setenv'
+RAMFS_COPY_BIN='fw_printenv fw_setenv fwtool'
 RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
 
 platform_check_image() {
@@ -16,6 +16,7 @@ platform_do_upgrade() {
nand_do_upgrade "$1"
;;
compex,wpq864|\
+   linksys,e8350-v1|\
netgear,d7800 |\
netgear,r7500 |\
netgear,r7500v2 |\
diff --git 
a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts 
b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts
new file mode 100644
index 00..5b8cdd205d
--- /dev/null
+++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts
@@ -0,0 +1,246 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+#include "qcom-ipq8064-v2.0.dtsi"
+
+#include 
+#include 
+
+/ {
+   model = "Linksys EA8350 V1 WiFi Router";
+   compatible = "linksys,e8350-v1", "qcom,ipq8064";
+
+   memory@0 {
+   reg = <0x4200 0x1e00>;
+   device_type = "memory";
+   };
+
+   aliases {
+   serial0 = _serial;
+
+   led-boot = _power;
+   led-failsafe = _power;
+   led-running = _power;
+   led-upgrade = _power;
+   };
+
+   keys {
+   compatible = "gpio-keys";
+   pinctrl-0 = <_pins>;
+   pinctrl-names = "default";
+
+   reset {
+   label = "reset";
+   gpios = <_pinmux 68 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   wps {
+   label = "wps";
+   gpios = <_pinmux 65 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+
+   wifi {
+   label = "wifi";
+   gpios = <_pinmux 67 GPIO_ACTIVE_LOW>;
+   linux,code = ;
+   };
+   };
+
+   nand-controller@1ac0 {
+   compatible = "qcom,ipq806x-nand";
+   reg = <0x1ac0 0x800>;
+   clocks = < EBI2_CLK>,
+   < EBI2_AON_CLK>;
+   clock-names = "core", "aon";
+   dmas = <_dma 3>;
+   dma-names = "rxtx";
+   qcom,cmd-crci = <15>;
+   qcom,data-crci = <3>;
+
+   nand@0 {
+   reg = <0>;
+
+   nand-ecc-strength = <4>;
+   nand-bus-width = <8>;
+
+   partitions {
+   compatible = "fixed-partitions";
+
+   partition@0 {
+   label = "ubi";
+   reg = <0 0x400>;
+   };
+ 

[PATCH 0/1] ipq806x: add support for Linksys E8350-v1

2020-07-25 Thread Todor Colov
Linksys E8350 is AC2350 (802.11ac Wave-2) router

Device specifications:
ArchitectureARM (armv7l cortex-a15+neon vfpv4)
Vendor  Linksys
Bootloader  U-Boot
System-On-Chip  Qualcomm IPQ8064 @ 1.4 GHz
CPU/Speed   2 x 1.4 GHz
Flash-Chips SPI MX25U3235F + NAND MT29F1G08ABBDAH4
Flash sizes 4 MiB SPI + 128 MiB NAND
RAM 512 MiB (491 MiB for the OS)
Wireless 1  Qualcomm QCA9880 2.4GHz 802.11bgn
Wireless 2  Quantenna QSR1000 5GHz 802.11ac ( driver not supported )
Ethernet4 x 10/100/1000 Mbit/s w/ vlan support
Switch  Qualcomm Atheros QCA8337
USB 1 x 3.0 + 1 x 2.0(combo with eSata port)
eSata   1 (combo with one of the USB ports)
Serial  Yes|Not populated
JTAGNot populated

https://openwrt.org/inbox/toh/linksys/linksys_ea8350_1

Flashing instructions:
* Upgrade with factory image via web interface

Debricking:

Get the original firmware: 
https://downloads.linksys.com/downloads/firmware/FW_E8350_1.0.03.003_20180929.bin
1. power off the device and disconnect the WAN port. (Only LAN port to be 
connected)
2. press & hold the “Reset” button
3. power on the deiece & wait for 10 seconds with pressed “Reset” button
- the Router will open Firmware Recovery “http” server on IP: 192.168.1.1
4. set IP on your PC from 192.168.1.0/24 network ( Router is on IP 192.168.1.1 )
5. open in browser URL:
http://192.168.1.1/index.shtml 

MAC addresses:
MAC address (as on device label) is stored in u-boot env
WLAN uses address incremented by 1.

Todor Colov (1):
  ipq806x: Add support for Linksys E8350-v1

 .../ipq806x/base-files/etc/board.d/01_leds|   3 +
 .../ipq806x/base-files/etc/board.d/02_network |   1 +
 .../base-files/lib/upgrade/platform.sh|   3 +-
 .../arm/boot/dts/qcom-ipq8064-e8350-v1.dts| 246 ++
 target/linux/ipq806x/image/Makefile   |  29 +++
 .../0069-arm-boot-add-dts-files.patch |   3 +-
 6 files changed, 283 insertions(+), 2 deletions(-)
 create mode 100644 
target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts

-- 
2.27.0


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


RE: [PATCH 2/3] treewide: use wpad-basic-wolfssl as default

2020-07-25 Thread mail
> Understandably so. But like you said, they already have limited functionality
> at this point: wpad-mini versus wpad-basic. At the same time, a lot of those
> devices are EOL with 19.07, as you pointed out. So it would make more sense
> to just keep them on wpad-mini - and maybe, to make the end of support
> crystal clear, to disable builds for 4/32 images altogether from 20.0x on.

That's mostly been done already; many if not the majority of at least 4 MB 
flash devices already have DEFAULT := n set.
This has been applied in bunches already as well, e.g.:

https://github.com/openwrt/openwrt/commit/d7d46da938e3f5c4ace815870c95f67d8b663ebe
https://github.com/openwrt/openwrt/commit/8819faff47ff20cfe81d58ef26c6a9054b142b74

This fact was the essence of my initial thought: if we have an entire subtarget 
like ath79/tiny that won't be built _by default_, we don't need to apply this 
patch there, as we won't built any images with these settings anyway.

However, I also see the point of the adverse argument that if it has to be 
altered by people for local builds anyway, there is no need to keep it 
inconsistent with recent changes (in contrast to ar71xx, which is not supposed 
to be built with master at all); people can just remove wpad-basic-wolfssl and 
switch back to wpad-mini again, as long as that's generally possible. (For a 
downstream project we have been switching to hostapd-mini already due to size 
constraints, so it won't matter much what exactly we remove there then.)

So, after all, 1. there won't be any 4 MB images build be default in 20.xx 
release, and 2. I personally can live with both options, keeping wpad-mini or 
replacing it for ath79/tiny and similar.

> devices like those in ath79/tiny, bcm47xx/legacy, lantiq/xway_legacy, 
> rt288x, rt305x,
> rt3883 and tegra (all those with wpad-mini).

Note that ramips/rt are still on 4.14 kernel, and if that's not changed 
soon they will be removed for 20.xx release entirely (i.e. deleted in stable 
branch, not just set to DEFAULT := n).

Best

Adrian 


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH] kernel: bump 5.4 to 5.4.53

2020-07-25 Thread Kevin Darbyshire-Bryant
Refresh patches.

Remove upstreamed patches:

bcm63xx/patches-5.4/022-v5.8-mtd-rawnand-brcmnand-correctly-verify-erased-pages.patch
bcm63xx/patches-5.4/024-v5.8-mtd-rawnand-brcmnand-fix-CS0-layout.patch

Drop the cake hack as upstream have backported the changes themselves,
but in a slightly different way.

generic/hack-5.4/641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch

Signed-off-by: Kevin Darbyshire-Bryant 
---
 include/kernel-version.mk |   4 +-
 .../910-unaligned_access_hacks.patch  |   2 +-
 ...ce-quirks-for-Freeway-Airmouse-T3-an.patch |   4 +-
 .../905-BCM53573-minor-hacks.patch|   2 +-
 ...-brcmnand-improve-hamming-oob-layout.patch |   2 +-
 ...cmnand-correctly-verify-erased-pages.patch |  63 --
 ...-mtd-rawnand-brcmnand-fix-CS0-layout.patch |  34 --
 ...antage-of-skb-hash-where-appropriate.patch |   2 +-
 ...ve-fwnode-parsing-into-sfp-bus-layer.patch |   2 +-
 5-net-sfp-rework-upstream-interface.patch |  12 +-
 ...fix-sfp_bus_put-kernel-documentation.patch |   2 +-
 ...et-sfp-add-support-for-module-quirks.patch |  43 ++-
 ...sfp-add-some-quirks-for-GPON-modules.patch |   6 +-
 ...protocol-handling-in-the-presence-of.patch | 114 --
 ...ng-with-source-address-failed-policy.patch |  22 ++--
 ...ncomplete-100BASE-FX-and-100BASE-LX-.patch |   2 +-
 ...nterface-mode-from-ethtool-link-mode.patch |   4 +-
 ...p-add-more-extended-compliance-codes.patch |   8 +-
 ...le-start-stop-upstream-notifications.patch |   2 +-
 ...y-MAC-configuration-for-copper-SFP-m.patch |   8 +-
 ...ma-calculate-the-real-count-for-slav.patch |   4 +-
 ...ma-Add-eDMA-support-for-QorIQ-LS1028.patch |   4 +-
 ...on-build_skb-in-mvneta_rx_swbm-poll-.patch |   2 +-
 ...013-net-mvneta-add-basic-XDP-support.patch |   2 +-
 ...DP-support-if-sw-bm-is-used-as-fallb.patch |   6 +-
 ...-mvebu-armada-38x-enable-libata-leds.patch |   2 +-
 .../0069-awake-rt305x-dwc2-controller.patch   |   2 +-
 27 files changed, 66 insertions(+), 294 deletions(-)
 delete mode 100644 
target/linux/bcm63xx/patches-5.4/022-v5.8-mtd-rawnand-brcmnand-correctly-verify-erased-pages.patch
 delete mode 100644 
target/linux/bcm63xx/patches-5.4/024-v5.8-mtd-rawnand-brcmnand-fix-CS0-layout.patch
 delete mode 100644 
target/linux/generic/hack-5.4/641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 8bfce3ecfe..08bde0efc6 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -8,11 +8,11 @@ endif
 
 LINUX_VERSION-4.14 = .187
 LINUX_VERSION-4.19 = .131
-LINUX_VERSION-5.4 = .52
+LINUX_VERSION-5.4 = .53
 
 LINUX_KERNEL_HASH-4.14.187 = 
5b223475eaeea196aa7e127d3f253bca5c35d8afdc72ca75230ce1ecdd1454bd
 LINUX_KERNEL_HASH-4.19.131 = 
19dfb9f6cc4ba30104b65dcce7d78240a4ae188cb366747d5f8eae35e98964ba
-LINUX_KERNEL_HASH-5.4.52 = 
037efa531120b1c20ff55e78cd3e17288b1804b3a57dc31de760837b3bea5d3a
+LINUX_KERNEL_HASH-5.4.53 = 
faa7b6f99220d5726f0eaee74a6394f0a3b89be1a75254f3804630211f3d6d21
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst 
-,_,$(subst /,_,$(1)))
diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch 
b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
index 053b72023f..da6f331f85 100644
--- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
@@ -556,7 +556,7 @@
  #include 
 --- a/include/net/inet_ecn.h
 +++ b/include/net/inet_ecn.h
-@@ -139,9 +139,9 @@ static inline int IP6_ECN_set_ce(struct
+@@ -140,9 +140,9 @@ static inline int IP6_ECN_set_ce(struct
if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
return 0;
  
diff --git 
a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
 
b/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
index 26a54c22c9..f265beb34e 100644
--- 
a/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
+++ 
b/target/linux/bcm27xx/patches-5.4/950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
@@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell 
  #define USB_VENDOR_ID_BELKIN  0x050d
  #define USB_DEVICE_ID_FLIP_KVM0x3201
  
-@@ -1234,6 +1237,9 @@
+@@ -1237,6 +1240,9 @@
  #define USB_VENDOR_ID_XAT 0x2505
  #define USB_DEVICE_ID_XAT_CSR 0x0220
  
@@ -53,7 +53,7 @@ Signed-off-by: Jonathan Bell 
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, 
USB_DEVICE_ID_CHICONY_MULTI_TOUCH), HID_QUIRK_MULTI_INPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, 
USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, 
USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE2), 

[PATCH] mbedtls: update to 2.16.7

2020-07-25 Thread Magnus Kroken
Mbed TLS 2.16.7 is a maintenance release of the Mbed TLS 2.16 branch,
and provides bug fixes and minor enhancements. This release includes
fixes for security issues and the most severe one is described in more
detail in a security advisory:
https://tls.mbed.org/tech-updates/security-advisories/mbedtls-security-advisory-2020-07

* Fix a side channel vulnerability in modular exponentiation that could
reveal an RSA private key used in a secure enclave.
* Fix side channel in mbedtls_ecp_check_pub_priv() and
mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a private
key that didn't include the uncompressed public key), as well as
mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL
f_rng argument. An attacker with access to precise enough timing and
memory access information (typically an untrusted operating system
attacking a secure enclave) could fully recover the ECC private key.
* Fix issue in Lucky 13 counter-measure that could make it ineffective when
hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT
macros).

Due to Mbed TLS moving from ARMmbed to the Trusted Firmware project, some
changes to the download URLs are required. For the time being, the
ARMmbed/mbedtls Github repository is the canonical source for Mbed TLS.

Signed-off-by: Magnus Kroken 
---
Tested on arm/cortexa9. Tested with openvpn-mbedtls as server, uhttpd
serving HTTPS and uclient-fetch HTTPS download.

 package/libs/mbedtls/Makefile | 10 ++--
 package/libs/mbedtls/patches/200-config.patch | 46 +--
 2 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index 04f80f4715..abc8789e01 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -8,19 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mbedtls
-PKG_VERSION:=2.16.6
+PKG_VERSION:=2.16.7
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
-PKG_SOURCE_URL:=https://tls.mbed.org/download/
-PKG_HASH:=80a484df42f32dbe95665cd4b18ce0dd14b6c67dfd561d36d1475802e41eb3ed
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/ARMmbed/mbedtls/archive/
+PKG_HASH:=4786b7d1676f5e4d248f3a7f2d28446876d64962634f060ff21b92c690cfbe86
 
 PKG_BUILD_PARALLEL:=1
 PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=gpl-2.0.txt
 PKG_CPE_ID:=cpe:/a:arm:mbed_tls
 
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
+
 PKG_CONFIG_DEPENDS:=CONFIG_LIBMBEDTLS_DEBUG_C
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/libs/mbedtls/patches/200-config.patch 
b/package/libs/mbedtls/patches/200-config.patch
index 298fa4aa79..70d178feb8 100644
--- a/package/libs/mbedtls/patches/200-config.patch
+++ b/package/libs/mbedtls/patches/200-config.patch
@@ -1,6 +1,6 @@
 --- a/include/mbedtls/config.h
 +++ b/include/mbedtls/config.h
-@@ -633,14 +633,14 @@
+@@ -658,14 +658,14 @@
   *
   * Enable Output Feedback mode (OFB) for symmetric ciphers.
   */
@@ -17,7 +17,7 @@
  
  /**
   * \def MBEDTLS_CIPHER_NULL_CIPHER
-@@ -757,19 +757,19 @@
+@@ -782,19 +782,19 @@
   *
   * Comment macros to disable the curve and functions for it
   */
@@ -46,7 +46,7 @@
  
  /**
   * \def MBEDTLS_ECP_NIST_OPTIM
-@@ -871,7 +871,7 @@
+@@ -918,7 +918,7 @@
   * See dhm.h for more details.
   *
   */
@@ -55,7 +55,7 @@
  
  /**
   * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
-@@ -891,7 +891,7 @@
+@@ -938,7 +938,7 @@
   *  MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
   *  MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
   */
@@ -64,7 +64,7 @@
  
  /**
   * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
-@@ -916,7 +916,7 @@
+@@ -963,7 +963,7 @@
   *  MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
   *  MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
   */
@@ -73,7 +73,7 @@
  
  /**
   * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
-@@ -1050,7 +1050,7 @@
+@@ -1097,7 +1097,7 @@
   *  MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
   *  MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
   */
@@ -82,7 +82,7 @@
  
  /**
   * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
-@@ -1074,7 +1074,7 @@
+@@ -1121,7 +1121,7 @@
   *  MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
   *  MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
   */
@@ -91,7 +91,7 @@
  
  /**
   * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
-@@ -1178,7 +1178,7 @@
+@@ -1225,7 +1225,7 @@
   * This option is only useful if both MBEDTLS_SHA256_C and
   * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
   */
@@ -100,7 +100,7 @@
  
  /**
   * \def MBEDTLS_ENTROPY_NV_SEED
-@@ -1273,14 +1273,14 @@
+@@ -1320,14 +1320,14 @@
   * Uncomment this macro to disable the use of CRT in RSA.
   *
   */
@@ -117,7 +117,7 @@
  
  /**
   * \def MBEDTLS_SHA256_SMALLER
-@@ -1434,7 +1434,7 @@
+@@ -1481,7 +1481,7 @@
   *  configuration of this extension).
   *
   */
@@ -126,7 +126,7 @@
  
  /**
   * \def 

Re: [PATCH 2/3] treewide: use wpad-basic-wolfssl as default

2020-07-25 Thread Stijn Segers

Hi,

Op zaterdag 25 juli 2020 om 11u28 schreef Petr Štetiar :

Stijn Segers  [2020-07-25 10:24:42]:

Hi,

 I read Adrian's reply as 'we'll keep ath79/tiny out of the wpad SSL 
push?'

 but I might be mistaken of course.


the idea of this patch series is to have the _same_ baseline in _all_ 
images,

so HTTPS and WPA3-Personal by default. It wouldn't make much sense to
announce, that OpenWrt release 20.09.0 (made that up) adds HTTPS and
WPA3-Personal security features, but they're missing on some devices 
like
those in ath79/tiny, bcm47xx/legacy, lantiq/xway_legacy, rt288x, 
rt305x,

rt3883 and tegra (all those with wpad-mini).


Understandably so. But like you said, they already have limited 
functionality
at this point: wpad-mini versus wpad-basic. At the same time, a lot of 
those
devices are EOL with 19.07, as you pointed out. So it would make more 
sense to
just keep them on wpad-mini - and maybe, to make the end of support 
crystal

clear, to disable builds for 4/32 images altogether from 20.0x on.

I think one would be spending way more time on disabling 4/32 devices 
one by
one, based on broken buildbot reports, than by just doing it in a 
one-off
operation. Disabling them all right from the start for 20.0x would send 
a clear
message: support has been ended. Keeping a few images here and there 
just makes
the whole 4/32 more protracted, increases support burden and will 
confuse a lot

of people.

Again: this is just as a user thinking out loud. I assume the playbook 
for 20.0x

has been finalised already.




It would be support and maintenance nightmare, probably like having 
release

with two different kernel versions.

 > I'm going to switch those to wpad-basic-wolfssl variant as well, 
since it
 > seems that the only difference is CONFIG_IEEE80211R=n in 
wpad-mini.

 >

 I think that will kill even more tiny images (master has been 
seeing a lot
 of those being disabled lately). On my TL-WR841ND v7, e.g., I have 
stripped
 some more stuff from master, after the 5.4 bump (which was to be 
expected).
 I was able to squeeze in wpad-basic again for the 802.11r (PPP 
removed
 though), but it's not like those tiny targets have 20 kB to spare, 
from what

 I can tell.


 "as we've dropped support for 4/32M devices officialy with 19.07 and 
it's
  time to move on and improve the default security features in 
official images."


TL-WR841ND v7 has `IMAGE_SIZE := 3904k`, so it's 4/32M device which 
we've
decided to not support anymore. It's an uphill battle, nobody has 
simply time

for this and we need to bite the bullet and move on.


To be clear: I was merely pointing that out as an example. Not as a 
request to keep

it (or 4/32 devices across the board) actively maintained.

Cheers

Stijn




 (I heard through the grapevine older flash/RAM constrained devices 
might

 just stick with kernel 4.19 btw? ath79/tiny is already on 5.4.)


Yep, 19.07 is the last release with official support for 4/32M 
devices.


 Since ath79/tiny is a separate subtarget altogether, it makes sense 
to offer

 them with fewer features. Unless I'm mistaken we'll see a lot of
 ramips/mt76{20,x8} stuff going the same route in the near future, 
they have

 similar flash constraints.


We simply disable image generation for devices which fall above the 
cliff, we
don't remove them from the tree so people should still be able to 
build images

for those devices with Image Builder for example.

 I don't think feature parity with more recent targets (or ones with 
more

 space) is what one should aim for, with a separate subtarget.


I consider HTTPS/WPA3-Personal as important _base_ feature in next 
release.



 P.S. Is there a way to use mbedtTLS with wpad?


 "wolfSSL and mbed TLS were pre-selected as possible crypto libraries 
due to
  the size. mbed TLS currently lacks support in hostapd so I went 
with wolfSSL

  for the start."

It would mean adding TLS crypto module for mbed TLS into hostapd. 
This is not

trivial timewise and would probably need some crypto person to do that
properly (or at least have that properly reviewed). This means it 
wouldn't be
possible to finish that task before 20.09.0 release in acceptable 
quality.


 That would be neat since one could have LuCI SSL and wpad lean on 
the same
 crypto library. I am now building images with mbedTLS for LuCI and 
wolfssl
 for wpad; it's still smaller than having both build with OpenSSL 
but a bit

 cumbersome nonetheless.


Yes, LuCI is going to benefit from the libustream-wolfssl package, as 
uhttpd
could use that library to perform SSL/TLS, so it could finally work 
over HTTPS

by default in next release. We're going to have fun with self-signed
certificate, but that's different story :-)

-- ynezz

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




___
openwrt-devel mailing list

Re: [PATCH 2/3] treewide: use wpad-basic-wolfssl as default

2020-07-25 Thread Daniel Golle
On Sat, Jul 25, 2020 at 10:24:42AM +0200, Stijn Segers wrote:
> ...
> P.S. Is there a way to use mbedtTLS with wpad? That would be neat since one
> could have
> LuCI SSL and wpad lean on the same crypto library. I am now building images
> with mbedTLS
> for LuCI and wolfssl for wpad; it's still smaller than having both build
> with OpenSSL
> but a bit cumbersome nonetheless.

...or at least have a px5g-wolfssl variant as well (that shouldn't be
too hard to do)

I've followed closely on how wolfSSL support was added to hostap.git
and even though wolfSSL's API is largely identical to OpenSSL's API, it
still took a large number of commits and almost two years (!) until
things are now working with wolfSSL as well as they do with OpenSSL.
Of course it'd be great to have wpad-mbedtls but I'm afraid it's far
from being doable for the 2020 relrease.

My original motivation to port the wolfSSL variants of hostapd was to
get 802.11s with SAE working on 4/32 devices which also run a routing
protocol (batman-adv) at the same time and still be able to generate
firmware for those devices using the released ImageBuilder.
For 19.07.4 this will finally be reality.

Regarding the 2020 release:
While I agree that release sysupgrade/factory images should have a
similar featureset (and hence should all come with wpad-basic-wolfssl,
libustream-wolfssl and tbd px5g-wolfssl installed), it'd be nice to
still offer ImageBuilder functional to generate images for 4/32 devices
without having to build everything from source.
Hence it makes sense exclude device images which are anyway not going
to be offered for download (ie. 4/32 devices) from this change and keep
them with wpad-mini. In the end it doesn't matter too much as anyone
using the IB for those devices is anyway likely to modify the default
package selection in order to make things fit into 4MB.

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


Re: [PATCH 2/3] treewide: use wpad-basic-wolfssl as default

2020-07-25 Thread Rosen Penev


> On Jul 25, 2020, at 1:36 AM, Stijn Segers  wrote:
> 
> Hi Petr,
> 
> Op zaterdag 25 juli 2020 om 10u08 schreef Petr Štetiar :
>> m...@adrianschmutzler.de  [2020-07-24 17:36:08]:
>> Hi,
>>> I would prefer to not touch ar71xx here, as this is essentially only used
>>> for backporting, and changing stuff would only make these backports more
>>> complicated, while not really providing a benefit. (I'm not sure whether it
>>> can be still built with master at all.)
>> ok, noted.
>>> Despite, is my impression correct that this patchset won't affect the size
>>> of pure "tiny" targets, like ath79/tiny?
>> Good catch. It was all just done with git grep & sed replacing wpad-basic 
>> with
>> wpad-basic-wolfssl, so this targets were missed as they're using wpad-mini.
> 
> I read Adrian's reply as 'we'll keep ath79/tiny out of the wpad SSL push?' 
> but I
> might be mistaken of course.
> 
>> I'm going to switch those to wpad-basic-wolfssl variant as well, since it
>> seems that the only difference is CONFIG_IEEE80211R=n in wpad-mini.
> 
> I think that will kill even more tiny images (master has been seeing a lot of 
> those
> being disabled lately). On my TL-WR841ND v7, e.g., I have stripped some more 
> stuff
> from master, after the 5.4 bump (which was to be expected). I was able to 
> squeeze
> in wpad-basic again for the 802.11r (PPP removed though), but it's not like 
> those tiny
> targets have 20 kB to spare, from what I can tell.
> 
> (I heard through the grapevine older flash/RAM constrained devices might just 
> stick
> with kernel 4.19 btw? ath79/tiny is already on 5.4.)
> 
> Since ath79/tiny is a separate subtarget altogether, it makes sense to offer 
> them with
> fewer features. Unless I'm mistaken we'll see a lot of ramips/mt76{20,x8} 
> stuff going
> the same route in the near future, they have similar flash constraints. I 
> don't think
> feature parity with more recent targets (or ones with more space) is what one 
> should
> aim for, with a separate subtarget.
> 
> 
> Just my 2 cents.
> 
> Stijn
> 
> P.S. Is there a way to use mbedtTLS with wpad? That would be neat since one 
> could have
> LuCI SSL and wpad lean on the same crypto library. I am now building images 
> with mbedTLS
> for LuCI and wolfssl for wpad; it's still smaller than having both build with 
> OpenSSL
> but a bit cumbersome nonetheless.
I will note that WolfSSL is based on OpenSSL, meaning it’s not too difficult to 
add wolfSSL support to OpenSSL packages.
> 
> 
>> Adding SAE (as all images should support WPA3-Personal from now on) is adding
>> way more to the images, so excluding 802.11r doesn't make sense as the size
>> difference would be probably negligible compared to the size of wolfSSL,
>> certificates etc.
>> -- ynezz
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
> 
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

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


Re: [PATCH 2/3] treewide: use wpad-basic-wolfssl as default

2020-07-25 Thread Petr Štetiar
Stijn Segers  [2020-07-25 10:24:42]:

Hi,

> I read Adrian's reply as 'we'll keep ath79/tiny out of the wpad SSL push?'
> but I might be mistaken of course.

the idea of this patch series is to have the _same_ baseline in _all_ images,
so HTTPS and WPA3-Personal by default. It wouldn't make much sense to
announce, that OpenWrt release 20.09.0 (made that up) adds HTTPS and
WPA3-Personal security features, but they're missing on some devices like
those in ath79/tiny, bcm47xx/legacy, lantiq/xway_legacy, rt288x, rt305x,
rt3883 and tegra (all those with wpad-mini).

It would be support and maintenance nightmare, probably like having release
with two different kernel versions.

> > I'm going to switch those to wpad-basic-wolfssl variant as well, since it
> > seems that the only difference is CONFIG_IEEE80211R=n in wpad-mini.
> > 
> 
> I think that will kill even more tiny images (master has been seeing a lot
> of those being disabled lately). On my TL-WR841ND v7, e.g., I have stripped
> some more stuff from master, after the 5.4 bump (which was to be expected).
> I was able to squeeze in wpad-basic again for the 802.11r (PPP removed
> though), but it's not like those tiny targets have 20 kB to spare, from what
> I can tell.

 "as we've dropped support for 4/32M devices officialy with 19.07 and it's
  time to move on and improve the default security features in official images."

TL-WR841ND v7 has `IMAGE_SIZE := 3904k`, so it's 4/32M device which we've
decided to not support anymore. It's an uphill battle, nobody has simply time
for this and we need to bite the bullet and move on.

> (I heard through the grapevine older flash/RAM constrained devices might
> just stick with kernel 4.19 btw? ath79/tiny is already on 5.4.)

Yep, 19.07 is the last release with official support for 4/32M devices.

> Since ath79/tiny is a separate subtarget altogether, it makes sense to offer
> them with fewer features. Unless I'm mistaken we'll see a lot of
> ramips/mt76{20,x8} stuff going the same route in the near future, they have
> similar flash constraints.

We simply disable image generation for devices which fall above the cliff, we
don't remove them from the tree so people should still be able to build images
for those devices with Image Builder for example.

> I don't think feature parity with more recent targets (or ones with more
> space) is what one should aim for, with a separate subtarget.

I consider HTTPS/WPA3-Personal as important _base_ feature in next release.

> P.S. Is there a way to use mbedtTLS with wpad? 

 "wolfSSL and mbed TLS were pre-selected as possible crypto libraries due to
  the size. mbed TLS currently lacks support in hostapd so I went with wolfSSL
  for the start."

It would mean adding TLS crypto module for mbed TLS into hostapd. This is not
trivial timewise and would probably need some crypto person to do that
properly (or at least have that properly reviewed). This means it wouldn't be
possible to finish that task before 20.09.0 release in acceptable quality.

> That would be neat since one could have LuCI SSL and wpad lean on the same
> crypto library. I am now building images with mbedTLS for LuCI and wolfssl
> for wpad; it's still smaller than having both build with OpenSSL but a bit
> cumbersome nonetheless.

Yes, LuCI is going to benefit from the libustream-wolfssl package, as uhttpd
could use that library to perform SSL/TLS, so it could finally work over HTTPS
by default in next release. We're going to have fun with self-signed
certificate, but that's different story :-)

-- ynezz

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


Re: [PATCH 1/3] hostapd: add wpad-basic-wolfssl variant

2020-07-25 Thread Daniel Golle
On Sat, Jul 25, 2020 at 10:44:46AM +0200, Petr Štetiar wrote:
> Daniel Golle  [2020-07-24 15:51:27]:
> 
> Hi,
> 
> > On Fri, Jul 24, 2020 at 04:29:38PM +0200, Petr Štetiar wrote:
> > > Add package which provides wpad with WPA-PSK, SAE (WPA3-Personal),
> > > 802.11r and 802.11w support.
> > 
> > I think this should be merged with wpad-mesh. It's almost the same, but
> > only adds support for 802.11s mesh in addition.
> 
> I don't think so, wpad-mesh is using full config which is noticeable:
> 
>  Measured on openwrt-ath79-nand-8dev_rambutan-squashfs-factory.bin 
> 
>5373952 bytes with wpad-basic-wolfssl
>5636096 bytes with wpad-mesh
>---
> 262144 bytes difference
> 
> seems quite a lot to me.

Oh, that's much more than I've expected.
Probably because CONFIG_AP pulls quite a lot of stuff and isn't
enabled in wpad-basic. I thought that'd be the same symbols as already
contained in hostapd and hence the multi-call wpad would not contain
them twice... Possibly my imagination of what actually comes out of
the linker and compiler was a bit naiiv in that regard.

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

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


Re: [PATCH 1/3] hostapd: add wpad-basic-wolfssl variant

2020-07-25 Thread Petr Štetiar
Daniel Golle  [2020-07-24 15:51:27]:

Hi,

> On Fri, Jul 24, 2020 at 04:29:38PM +0200, Petr Štetiar wrote:
> > Add package which provides wpad with WPA-PSK, SAE (WPA3-Personal),
> > 802.11r and 802.11w support.
> 
> I think this should be merged with wpad-mesh. It's almost the same, but
> only adds support for 802.11s mesh in addition.

I don't think so, wpad-mesh is using full config which is noticeable:

 Measured on openwrt-ath79-nand-8dev_rambutan-squashfs-factory.bin 

   5373952 bytes with wpad-basic-wolfssl
   5636096 bytes with wpad-mesh
   ---
262144 bytes difference

seems quite a lot to me.

-- ynezz

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


Re: [PATCH 2/3] treewide: use wpad-basic-wolfssl as default

2020-07-25 Thread Stijn Segers

Hi Petr,

Op zaterdag 25 juli 2020 om 10u08 schreef Petr Štetiar :
m...@adrianschmutzler.de  [2020-07-24 
17:36:08]:


Hi,

 I would prefer to not touch ar71xx here, as this is essentially 
only used
 for backporting, and changing stuff would only make these backports 
more
 complicated, while not really providing a benefit. (I'm not sure 
whether it

 can be still built with master at all.)


ok, noted.

 Despite, is my impression correct that this patchset won't affect 
the size

 of pure "tiny" targets, like ath79/tiny?


Good catch. It was all just done with git grep & sed replacing 
wpad-basic with
wpad-basic-wolfssl, so this targets were missed as they're using 
wpad-mini.


I read Adrian's reply as 'we'll keep ath79/tiny out of the wpad SSL 
push?' but I

might be mistaken of course.

I'm going to switch those to wpad-basic-wolfssl variant as well, 
since it

seems that the only difference is CONFIG_IEEE80211R=n in wpad-mini.



I think that will kill even more tiny images (master has been seeing a 
lot of those
being disabled lately). On my TL-WR841ND v7, e.g., I have stripped some 
more stuff
from master, after the 5.4 bump (which was to be expected). I was able 
to squeeze
in wpad-basic again for the 802.11r (PPP removed though), but it's not 
like those tiny

targets have 20 kB to spare, from what I can tell.

(I heard through the grapevine older flash/RAM constrained devices 
might just stick

with kernel 4.19 btw? ath79/tiny is already on 5.4.)

Since ath79/tiny is a separate subtarget altogether, it makes sense to 
offer them with
fewer features. Unless I'm mistaken we'll see a lot of 
ramips/mt76{20,x8} stuff going
the same route in the near future, they have similar flash constraints. 
I don't think
feature parity with more recent targets (or ones with more space) is 
what one should

aim for, with a separate subtarget.


Just my 2 cents.

Stijn

P.S. Is there a way to use mbedtTLS with wpad? That would be neat since 
one could have
LuCI SSL and wpad lean on the same crypto library. I am now building 
images with mbedTLS
for LuCI and wolfssl for wpad; it's still smaller than having both 
build with OpenSSL

but a bit cumbersome nonetheless.


Adding SAE (as all images should support WPA3-Personal from now on) 
is adding
way more to the images, so excluding 802.11r doesn't make sense as 
the size
difference would be probably negligible compared to the size of 
wolfSSL,

certificates etc.

-- ynezz

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




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


[PATCH uhttpd] ubus: drop unused "obj" arguments

2020-07-25 Thread Rafał Miłecki
From: Rafał Miłecki 

Both: uh_ubus_send_request() and uh_ubus_send_list() don't use it.
Signed-off-by: Rafał Miłecki 
---
 ubus.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ubus.c b/ubus.c
index 97cc1e2..51c58b5 100644
--- a/ubus.c
+++ b/ubus.c
@@ -288,7 +288,7 @@ static void uh_ubus_single_error(struct client *cl, enum 
rpc_error type)
ops->request_done(cl);
 }
 
-static void uh_ubus_send_request(struct client *cl, json_object *obj, const 
char *sid, struct blob_attr *args)
+static void uh_ubus_send_request(struct client *cl, const char *sid, struct 
blob_attr *args)
 {
struct dispatch *d = >dispatch;
struct dispatch_ubus *du = >ubus;
@@ -370,7 +370,7 @@ static void uh_ubus_list_cb(struct ubus_context *ctx, 
struct ubus_object_data *o
blobmsg_close_table(data->buf, o);
 }
 
-static void uh_ubus_send_list(struct client *cl, json_object *obj, struct 
blob_attr *params)
+static void uh_ubus_send_list(struct client *cl, struct blob_attr *params)
 {
struct blob_attr *cur, *dup;
struct list_data data = { .buf = >dispatch.ubus.buf, .verbose = 
false };
@@ -548,11 +548,11 @@ static void uh_ubus_handle_request_object(struct client 
*cl, struct json_object
goto error;
}
 
-   uh_ubus_send_request(cl, obj, data.sid, data.data);
+   uh_ubus_send_request(cl, data.sid, data.data);
goto out;
}
else if (!strcmp(data.method, "list")) {
-   uh_ubus_send_list(cl, obj, data.params);
+   uh_ubus_send_list(cl, data.params);
goto out;
}
else {
-- 
2.27.0


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


[PATCH uhttpd] ubus: use BLOBMSG_TYPE_UNSPEC for "params" JSON attribute

2020-07-25 Thread Rafał Miłecki
From: Rafał Miłecki 

According to the JSON-RPC 2.0 specification "params" value can be either
an Array or Object. This change makes parse_json_rpc() accept both.

Type validation should be handled by a function that actually reads
"params" depending on expected format. This doesn't change existing
behaviour but allows adding more methods (that expect Object) in the
future.

Signed-off-by: Rafał Miłecki 
---
 ubus.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ubus.c b/ubus.c
index 51c58b5..ddc2f05 100644
--- a/ubus.c
+++ b/ubus.c
@@ -48,7 +48,7 @@ enum {
 static const struct blobmsg_policy rpc_policy[__RPC_MAX] = {
[RPC_JSONRPC] = { .name = "jsonrpc", .type = BLOBMSG_TYPE_STRING },
[RPC_METHOD] = { .name = "method", .type = BLOBMSG_TYPE_STRING },
-   [RPC_PARAMS] = { .name = "params", .type = BLOBMSG_TYPE_ARRAY },
+   [RPC_PARAMS] = { .name = "params", .type = BLOBMSG_TYPE_UNSPEC },
[RPC_ID] = { .name = "id", .type = BLOBMSG_TYPE_UNSPEC },
 };
 
@@ -446,6 +446,9 @@ static void parse_call_params(struct rpc_data *d)
};
struct blob_attr *tb[4];
 
+   if (!d->params || blobmsg_type(d->params) != BLOBMSG_TYPE_ARRAY)
+   return;
+
blobmsg_parse_array(data_policy, ARRAY_SIZE(data_policy), tb,
blobmsg_data(d->params), 
blobmsg_data_len(d->params));
 
-- 
2.27.0


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


Re: [PATCH 2/3] treewide: use wpad-basic-wolfssl as default

2020-07-25 Thread Petr Štetiar
m...@adrianschmutzler.de  [2020-07-24 17:36:08]:

Hi,

> I would prefer to not touch ar71xx here, as this is essentially only used
> for backporting, and changing stuff would only make these backports more
> complicated, while not really providing a benefit. (I'm not sure whether it
> can be still built with master at all.)

ok, noted.

> Despite, is my impression correct that this patchset won't affect the size
> of pure "tiny" targets, like ath79/tiny?

Good catch. It was all just done with git grep & sed replacing wpad-basic with
wpad-basic-wolfssl, so this targets were missed as they're using wpad-mini.
I'm going to switch those to wpad-basic-wolfssl variant as well, since it
seems that the only difference is CONFIG_IEEE80211R=n in wpad-mini. 

Adding SAE (as all images should support WPA3-Personal from now on) is adding
way more to the images, so excluding 802.11r doesn't make sense as the size
difference would be probably negligible compared to the size of wolfSSL,
certificates etc.

-- ynezz

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