Re: Automatic LAN Subnet Reassignment

2022-02-23 Thread Paul D

On 2022-02-21 22:38, Rich Brown wrote:

There is a new RFC on the OpenWrt forum proposing "Automatic LAN Subnet 
Reassignment" 
https://forum.openwrt.org/t/rfc-automatic-lan-subnet-reassignment-upon-conflict-with-wan/120938
 The RFC responds to the advice given at last week's OpenWrt-Adm meeting 
(https://etherpad.wikimedia.org/p/ZlZiTcud3wufcSX9-1jD)

The intent of the proposal is for the default configuration to assign a LAN 
subnet that avoids a conflict with the WAN subnet, and provide a mDNS name such 
at OpenWrt.lan for connections.

I have two requests:

1) Please make comments on the technical merits of the proposal on the OpenWrt 
forum at the link above.

2) If the proposal seems to make sense, please consider the process by which we 
would incorporate this into the main release (likely, not for 22.0x, but 
perhaps the next release?)



I think this regards only IPv4. I propose that the RFC1918 nets on 
either side be in the same block, to avoid NAT, and try to retain 
routing: performance. A NAT choice might present security advantages, 
however.



Ideally one would consider configured (static) routes such that any 
chosen (sub)net does not collide with one further up/downstream.



No preference either way for .home.arpa. or .lan: both are sane, but one 
more to type than the other, although both available is good.


4.3 and 4.4 have importance, however:

https://www.rfc-editor.org/rfc/rfc8375#section-4


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


[PATCH] bcm63xx: Fast 2704n: configure the WAN port

2022-02-23 Thread Daniel González Cabanelas
The Sagem/Plusnet F@ST2704N has a red label in ethernet port 4. Its purpose is 
to be used as Fibre/WAN with the stock firmware.

Configure the Eth4 as WAN.

Fixes: fbbb92 (brcm63xx: Tune the network configuration for several
routers)

Signed-off-by: Daniel González Cabanelas 
---
 - This patch superseeds: bcm63xx: delete Fast 2704n wan led config

 target/linux/bcm63xx/base-files/etc/board.d/02_network | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/bcm63xx/base-files/etc/board.d/02_network 
b/target/linux/bcm63xx/base-files/etc/board.d/02_network
index c594a9265f..b48aa57d2e 100644
--- a/target/linux/bcm63xx/base-files/etc/board.d/02_network
+++ b/target/linux/bcm63xx/base-files/etc/board.d/02_network
@@ -100,8 +100,7 @@ huawei,echolife-hg556a-c)
;;
 comtrend,ar-5315u|\
 innacomm,w3400v6|\
-observa,vh4032n|\
-sagem,fast-2704n)
+observa,vh4032n)
ucidef_add_switch "switch0" \
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t@eth0"
;;
@@ -141,6 +140,7 @@ netgear,dgnd3700-v1)
ucidef_add_switch "switch0" \
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "8t@eth0"
;;
+sagem,fast-2704n|\
 sercomm,ad1018|\
 sercomm,ad1018-nor)
ucidef_add_switch "switch0" \
-- 
2.35.1





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


[PATCH v2 4/4] at91: add support for sama7g5-ek board

2022-02-23 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Add support for SAMA7G5-EK board.
Hardware:
- SoC: SAMA7G5
- RAM: Aliance Memory AS4C256M16D3LC (4 Gbit DDR3L)
- SD/MMC: 1 standard 4bit SD Card interface
- USB: 1 Micro-AB host/device, 1 Type-A host, 1 Type-C host
- CAN: 2 interfaces
- Ethernet: 10/100 port, 1Gbps port
- Wi-Fi/BT: 1 optional interface
- Audio: 1 SPDIF RX port, 1 SPDIF TX port, 4 digital microphones
- Camera: 1 RPi CSI camera interface
- Debug: 1 J-Link-OB + CDC, 1 JTAG
- LEDs: 1 RGB
- Buttons: 4 push buttons
- Expansions: 1 RPi Expansion connector, 2 mikroBUS connectors
- Power management: 1 power management IC, 1 power consumption
  measurement device

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile   |  9 ++-
 package/boot/uboot-at91/Makefile  |  9 ++-
 .../at91/base-files/etc/board.d/02_network|  2 +-
 target/linux/at91/image/sama7.mk  | 57 +++
 target/linux/at91/image/uboot-env.txt |  7 ++-
 5 files changed, 78 insertions(+), 6 deletions(-)
 create mode 100644 target/linux/at91/image/sama7.mk

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 92dbf27a1ef5..72afefd2 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -172,6 +172,12 @@ define AT91Bootstrap/sama5d2_ptc_eksd_uboot
   BUILD_DEVICES:=microchip_sama5d2-ptc-ek
 endef
 
+define AT91Bootstrap/sama7g5eksd_uboot
+  TITLE:=AT91Bootstrap for SAMA7G5-EK (SDCard)
+  BUILD_SUBTARGET:=sama7
+  BUILD_DEVICES:=microchip_sama7g5-ek
+endef
+
 AT91BOOTSTRAP_TARGETS := \
at91sam9x5eknf_uboot \
at91sam9x5eksd_uboot \
@@ -192,7 +198,8 @@ AT91BOOTSTRAP_TARGETS := \
sama5d27_wlsom1_eksd_uboot \
sama5d27_wlsom1_ekdf_qspi_uboot \
sama5d2_ptc_eknf_uboot \
-   sama5d2_ptc_eksd_uboot
+   sama5d2_ptc_eksd_uboot \
+   sama7g5eksd_uboot
 
 define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index 7052329ecd5e..ed69b8b06c8a 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -143,6 +143,12 @@ define U-Boot/sama5d2_ptc_ek_mmc
   BUILD_DEVICES:=microchip_sama5d2-ptc-ek
 endef
 
+define U-Boot/sama7g5ek_mmc1
+  NAME:=SAMA7G5-EK (SDCard)
+  BUILD_SUBTARGET:=sama7
+  BUILD_DEVICES:=microchip_sama7g5-ek
+endef
+
 UBOOT_TARGETS := \
at91sam9m10g45ek_nandflash \
at91sam9x5ek_nandflash \
@@ -162,7 +168,8 @@ UBOOT_TARGETS := \
sama5d27_wlsom1_ek_mmc \
sama5d27_wlsom1_ek_qspiflash \
sama5d2_ptc_ek_nandflash \
-   sama5d2_ptc_ek_mmc
+   sama5d2_ptc_ek_mmc \
+   sama7g5ek_mmc1
 
 define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
diff --git a/target/linux/at91/base-files/etc/board.d/02_network 
b/target/linux/at91/base-files/etc/board.d/02_network
index 3e11f40b325b..857417c7fddc 100644
--- a/target/linux/at91/base-files/etc/board.d/02_network
+++ b/target/linux/at91/base-files/etc/board.d/02_network
@@ -8,7 +8,7 @@ board_config_update
 
 case "$(board_name)" in
 
-atmel,sama5d3-xplained)
+atmel,sama5d3-xplained|microchip,sama7g5ek)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
 
diff --git a/target/linux/at91/image/sama7.mk b/target/linux/at91/image/sama7.mk
new file mode 100644
index ..bf1704dfb337
--- /dev/null
+++ b/target/linux/at91/image/sama7.mk
@@ -0,0 +1,57 @@
+
+define Device/default-nand
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  SUBPAGESIZE := 2048
+  MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 2048
+endef
+
+define Build/at91-sdcard
+  $(if $(findstring ext4,$@), \
+  rm -f $@.boot
+  mkfs.fat -C $@.boot $(FAT32_BLOCKS)
+
+  mcopy -i $@.boot \
+   $(KDIR)/$(DEVICE_NAME)-fit-zImage.itb \
+   ::$(DEVICE_NAME)-fit.itb
+
+  mcopy -i $@.boot \
+   $(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc1/u-boot.bin \
+   ::u-boot.bin
+
+  mcopy -i $@.boot \
+   
$(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd_uboot/at91bootstrap.bin \
+   ::BOOT.bin
+
+  $(CP) uboot-env.txt $@-uboot-env.txt
+  sed -i '2d;3d' $@-uboot-env.txt
+  sed -i '2i board='"$(DEVICE_NAME)"'' $@-uboot-env.txt
+  sed -i '3i board_name='"$(firstword $(SUPPORTED_DEVICES))"'' $@-uboot-env.txt
+
+  mkenvimage -s 0x4000 -o $@-uboot.env $@-uboot-env.txt
+
+  mcopy -i $@.boot $@-uboot.env ::uboot.env
+
+  ./gen_at91_sdcard_img.sh \
+   $@.img \
+   $@.boot \
+   $(KDIR)/root.ext4 \
+   $(AT91_SD_BOOT_PARTSIZE) \
+   $(CONFIG_TARGET_ROOTFS_PARTSIZE)
+
+  gzip -nc9 $@.img > $@
+
+  rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
+endef
+
+define Device/microchip_sama7g5-ek
+  

[PATCH v2 2/4] uboot-at91: update to linux4sam-2021.10

2022-02-23 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Update uboot-at91 to linux4sam-2021.10 version.

Signed-off-by: Claudiu Beznea 
---
 package/boot/uboot-at91/Makefile  |  6 +--
 .../patches/001-fix-Wformat-security.patch| 49 +--
 ...10-fix_dtc_compilation_on_host_gcc10.patch | 46 -
 3 files changed, 38 insertions(+), 63 deletions(-)
 delete mode 100644 
package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch

diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index ad65247e3e53..7052329ecd5e 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -7,13 +7,13 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_VERSION:=linux4sam-2020.04
+PKG_VERSION:=linux4sam-2021.10
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/linux4sam/u-boot-at91.git
-PKG_MIRROR_HASH:=4f106d215c01c4d024c4612bbd3ef189188d19abc1ab2cc316b257d308534feb
-PKG_SOURCE_VERSION:=0e1d1b6efb7f8e27c372279a906fcd2524df09da
+PKG_MIRROR_HASH:=f1190062f2012b182b45b78263a4cce4ada9b7b8d6f5a66d68fa51437105fc8c
+PKG_SOURCE_VERSION:=39854ce82232cdc05c20158d0439bdbc40991e4a
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch 
b/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
index 4c968a2448ae..d39a91aaf04a 100644
--- a/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
+++ b/package/boot/uboot-at91/patches/001-fix-Wformat-security.patch
@@ -1,17 +1,46 @@
+From 3b05406c02070df3e7f19399d81ebd35ed6deae5 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea 
+Date: Tue, 12 Oct 2021 17:43:28 +0300
+Subject: [PATCH] fix -Wformat-security
+
+Signed-off-by: Claudiu Beznea 
+---
+ cmd/panic.c  | 2 +-
+ cmd/version.c| 2 +-
+ drivers/pinctrl/pinctrl-uclass.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/cmd/panic.c b/cmd/panic.c
+index f13b3f094fab..197e2d0870ff 100644
+--- a/cmd/panic.c
 b/cmd/panic.c
+@@ -11,7 +11,7 @@ static int do_panic(struct cmd_tbl *cmdtp, int flag, int 
argc,
+ {
+   char *text = (argc < 2) ? "" : argv[1];
+ 
+-  panic(text);
++  panic("%s\n", text);
+ 
+   return CMD_RET_SUCCESS;
+ }
+diff --git a/cmd/version.c b/cmd/version.c
+index 3686b8733249..35b52c48171d 100644
 --- a/cmd/version.c
 +++ b/cmd/version.c
-@@ -18,7 +18,7 @@ static int do_version(cmd_tbl_t *cmdtp,
+@@ -19,7 +19,7 @@ static int do_version(struct cmd_tbl *cmdtp, int flag, int 
argc,
  {
char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
  
 -  printf(display_options_get_banner(false, buf, sizeof(buf)));
-+  printf("%s",display_options_get_banner(false, buf, sizeof(buf)));
++  printf("%s", display_options_get_banner(false, buf, sizeof(buf)));
  #ifdef CC_VERSION_STRING
puts(CC_VERSION_STRING "\n");
  #endif
+diff --git a/drivers/pinctrl/pinctrl-uclass.c 
b/drivers/pinctrl/pinctrl-uclass.c
+index b0f30aa1f758..aa62a890609a 100644
 --- a/drivers/pinctrl/pinctrl-uclass.c
 +++ b/drivers/pinctrl/pinctrl-uclass.c
-@@ -368,7 +368,7 @@ int pinctrl_get_pin_name(struct udevice
+@@ -371,7 +371,7 @@ int pinctrl_get_pin_name(struct udevice *dev, int 
selector, char *buf,
if (!ops->get_pin_name)
return -ENOSYS;
  
@@ -20,14 +49,6 @@
  
return 0;
  }
 a/lib/efi_loader/efi_variable.c
-+++ b/lib/efi_loader/efi_variable.c
-@@ -522,7 +522,7 @@ efi_status_t EFIAPI efi_set_variable(u16
- 
-   if (old_size)
-   /* APPEND_WRITE */
--  s += sprintf(s, old_val);
-+  s += sprintf(s, "%s", old_val);
-   else
-   s += sprintf(s, "(blob)");
- 
+-- 
+2.33.0
+
diff --git 
a/package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch 
b/package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch
deleted file mode 100644
index 6abb15160812..
--- 
a/package/boot/uboot-at91/patches/010-fix_dtc_compilation_on_host_gcc10.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From e33a814e772cdc36436c8c188d8c42d019fda639 Mon Sep 17 00:00:00 2001
-From: Dirk Mueller 
-Date: Tue, 14 Jan 2020 18:53:41 +0100
-Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration
-
-gcc 10 will default to -fno-common, which causes this error at link
-time:
-
-  (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from 
plugin):(.text+0x0): first defined here
-
-This is because both dtc-lexer as well as dtc-parser define the same
-global symbol yyloc. Before with -fcommon those were merged into one
-defintion. The proper solution would be to to mark this as "extern",
-however that leads to:
-
-  

[PATCH v2 1/4] at91bootstrap: update to v3.10.4, v4.0.1

2022-02-23 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
AT91Bootstrap version 4 is available only for SAM9X60, SAMA5D2, SAMA5D3,
SAMA5D4 (except sama5d4_xplaineddf_uboot_secure_defconfig for the
moment), SAMA7G5. Thus use v4.0.1 for the above targets and v3.10.4 for
the rest of them. With the switch to v4 AT91Bootstrap binaries are now
on build/binaries. Take also this into account. Also, patches directory
is not needed anymore with the version update.

Signed-off-by: Claudiu Beznea 
---
 package/boot/at91bootstrap/Makefile   | 24 ++--
 package/boot/at91bootstrap/at91bootstrap.mk   |  2 +-
 ...ile-Remove-nostartfiles-from-LDFLAGS.patch | 38 ---
 3 files changed, 22 insertions(+), 42 deletions(-)
 delete mode 04 package/boot/at91bootstrap/patches
 delete mode 100644 
package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch

diff --git a/package/boot/at91bootstrap/Makefile 
b/package/boot/at91bootstrap/Makefile
index 2d77f7099721..92dbf27a1ef5 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -9,13 +9,31 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=at91bootstrap
-PKG_VERSION:=v3.9.3
+PKG_VERSION:=v4.0.1
+PKG_MIRROR_HASH:=3d45a4bcb52162097d4cdf042b8fe1ccf53e88b512e7541f42a23f2a73692a69
+PKG_SOURCE_VERSION:=4d41296e9ae12379555fb46a941897e7264600a2
+BINARIES_DIR:=build/binaries
+
+AT91BOOTSTRAP_V4=y
+ifdef CONFIG_PACKAGE_at91bootstrap-sama5d4_xplaineddf_uboot_secure
+  AT91BOOTSTRAP_V4=n
+else ifdef CONFIG_TARGET_at91_sam9x
+  ifndef CONFIG_TARGET_at91_sam9x_DEVICE_microchip_sam9x60ek
+AT91BOOTSTRAP_V4=n
+  endif
+endif
+
+ifeq ($(AT91BOOTSTRAP_V4),n)
+  PKG_VERSION=v3.10.4
+  
PKG_MIRROR_HASH=6fe61fe90838e785917383bb9e887fa05e1bd061a6725954242f504e38b5c426
+  PKG_SOURCE_VERSION=404846dd283894367a015ca59189bcf927d92e11
+  BINARIES_DIR=binaries
+endif
+
 PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/linux4sam/at91bootstrap.git
-PKG_MIRROR_HASH:=06753d673756edc9753932db00f4e5b8c1f9fa7708337c4d6ce280573efb86b4
-PKG_SOURCE_VERSION:=d96833a4b6680b237708eb4dc9f10708b9e709d8
 PKG_BUILD_DIR = \
$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
diff --git a/package/boot/at91bootstrap/at91bootstrap.mk 
b/package/boot/at91bootstrap/at91bootstrap.mk
index fe6577f58927..d4e807d9a219 100644
--- a/package/boot/at91bootstrap/at91bootstrap.mk
+++ b/package/boot/at91bootstrap/at91bootstrap.mk
@@ -5,7 +5,7 @@ PKG_FLAGS:=nonshared
 export GCC_HONOUR_COPTS=s
 
 define Package/at91bootstrap/install/default
-   $(CP) -avL $(PKG_BUILD_DIR)/binaries/at91bootstrap.bin $(1)/
+   $(CP) -avL $(PKG_BUILD_DIR)/$(BINARIES_DIR)/at91bootstrap.bin $(1)/
 endef
 
 Package/at91bootstrap/install = $(Package/at91bootstrap/install/default)
diff --git 
a/package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch
 
b/package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch
deleted file mode 100644
index 9d48758bdad2..
--- 
a/package/boot/at91bootstrap/patches/001-Makefile-Remove-nostartfiles-from-LDFLAGS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 59c8963d8e6a08222616d1b384e1009ba05e6b82 Mon Sep 17 00:00:00 2001
-From: Chris Elledge 
-Date: Tue, 8 Jun 2021 14:01:14 -0400
-Subject: Makefile: Remove -nostartfiles from LDFLAGS
-
-Binutils linker ld does not support the flag -nostartfiles.
-This is interpreted as "-n -o startfiles" which fortunately has no impact
-on the build process. Removing -nostartfiles has no impact on the build.
-
-Binutils 2.36 and later ld has improved flag parsing and throws an error if
--nostartfiles is passed as an argument. Removing the flag fixes the problem.
-
-Details on the Binutils ML:
-https://sourceware.org/pipermail/binutils/2021-June/116826.html
-
-In our ld command line there are explicit
--n -o $(BINDIR)/$(BOOT_NAME).elf options,
-hence removing -nostartfiles will not alter the build.
-
-Signed-off-by: Chris Elledge 
-Reviewed-by: Aubin Constans 
-[eugen.hris...@microchip.com: ported to at91bootstrap4]
-Signed-off-by: Eugen Hristev 

- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
 a/Makefile
-+++ b/Makefile
-@@ -275,7 +275,7 @@ endif
- #--cref:add cross reference to map file
- #  -lc   :tells the linker to tie in newlib
- #  -lgcc   :  tells the linker to tie in newlib
--LDFLAGS=-nostartfiles -Map=$(BINDIR)/$(BOOT_NAME).map --cref -static
-+LDFLAGS=-Map=$(BINDIR)/$(BOOT_NAME).map --cref -static
- LDFLAGS+=-T $(link_script) $(GC_SECTIONS) -Ttext $(LINK_ADDR)
- 
- ifneq ($(DATA_SECTION_ADDR),)
-- 
2.33.0


--- End Message ---
___
openwrt-devel mailing list

[PATCH v2 0/4] at91: add support for sama7g5 SoC and sama7g5-ek board

2022-02-23 Thread Claudiu Beznea via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hi,

The following patches add support for Microchip SAMA7G5 SoC by
backporting the remaining patches from mainline kernel. Along with SoC
support board support has been added (board is called SAMA7G5-EK).

Patches 1/4, 2/4 are preparatory patches to update AT91Bootstrap and
U-Boot AT91.

Please note that patch 3/4 of this series is bigger than expected by
OpenWrt mailing list, thus it needs approval from admin. 

Thank you,
Claudiu Beznea

Changes in v2:
- fix compilation of sama5d4_xplaineddf_uboot_secure_defconfig in
  AT91Bootstrap project: the specified config hasn't been ported to
  AT91Bootstrap v4.x, thus we build it at the moment with
  AT91Bootstrap v3.x
- refreshed at91 kernel configs 

Claudiu Beznea (4):
  at91bootstrap: update to v3.10.4, v4.0.1
  uboot-at91: update to linux4sam-2021.10
  at91: add kernel support for sama7g5 soc
  at91: add support for sama7g5-ek board

 package/boot/at91bootstrap/Makefile   |   33 +-
 package/boot/at91bootstrap/at91bootstrap.mk   |2 +-
 ...ile-Remove-nostartfiles-from-LDFLAGS.patch |   38 -
 package/boot/uboot-at91/Makefile  |   15 +-
 .../patches/001-fix-Wformat-security.patch|   49 +-
 ...10-fix_dtc_compilation_on_host_gcc10.patch |   46 -
 target/linux/at91/Makefile|2 +-
 .../at91/base-files/etc/board.d/02_network|2 +-
 target/linux/at91/image/sama7.mk  |   57 +
 target/linux/at91/image/uboot-env.txt |7 +-
 ...s-clock-at91-add-sama7g5-pll-defines.patch |   72 +
 ...-allow-SYS-and-CPU-PLLs-to-be-export.patch |   46 +
 ...aster-add-5th-divisor-for-mck-master.patch |   49 +
 ...-add-5th-divisor-for-mck0-layout-and.patch |   41 +
 ...9x60-pll-allow-runtime-changes-for-p.patch |  521 
 ...-remove-mck0-from-parent-list-of-oth.patch |  201 ++
 ...5-decrease-lower-limit-for-MCK0-rate.patch |   35 +
 ...-do-not-allow-cpu-pll-to-go-higher-t.patch |  226 ++
 ...91-clk-master-re-factor-master-clock.patch | 1261 ++
 ...-clk-at91-sama7g5-register-cpu-clock.patch |   72 +
 ...91-Fix-the-declaration-of-the-clocks.patch |  202 ++
 ...ial-typo-fixes-in-the-file-sama7g5.c.patch |   50 +
 ...-remove-all-kernel-doc-kernel-doc-wa.patch |   95 +
 ...serio-bits-as-platform-configuration.patch |  186 ++
 ...capability-to-not-set-the-clock-rate.patch |   92 +
 ...-function-to-disable-all-macb-clocks.patch |   87 +
 ...-unprepare-clocks-in-case-of-failure.patch |   65 +
 ...dd-support-for-sama7g5-gem-interface.patch |   59 +
 ...d-support-for-sama7g5-emac-interface.patch |   44 +
 ...-ASoC-pcm5102a-Make-codec-selectable.patch |   33 +
 ...i2s-do-not-warn-if-muxclk-is-missing.patch |   35 +
 ...egulator-mcp16502-add-linear_min_sel.patch |   30 +
 ...02-adapt-for-get-set-on-other-regist.patch |  122 +
 ...-mcp16502-add-support-for-ramp-delay.patch |  146 ++
 ...02-remove-void-documentation-of-stru.patch |   32 +
 ...alidate-selector-against-linear_min_.patch |   71 +
 ...re-do-not-continue-if-selector-match.patch |   31 +
 ...eturn-zero-for-selectors-lower-than-.patch |   71 +
 ...02-lpm-pin-can-be-optional-on-some-p.patch |   35 +
 ...4-add-support-for-fewer-lines-on-las.patch |   75 +
 ...ac-adapt-perid-for-mem2mem-operation.patch |   55 +
 ...ac-add-support-for-sama7g5-based-at_.patch |  285 +++
 ...ac-add-AXI-priority-support-and-reco.patch |  118 +
 ...t-usage-of-MACB_CAPS_CLK_HW_CHG-flag.patch |   50 +
 ...0-SiP-types-added-to-soc-description.patch |   50 +
 .../137-drivers-soc-atmel-use-GENMASK.patch   |   30 +
 ...l-fix-__initconst-should-be-placed-a.patch |   31 +
 ...l-add-per-soc-id-and-version-match-m.patch |  355 +++
 ...rs-soc-atmel-add-support-for-sama7g5.patch |   94 +
 ...oc-atmel-add-spdx-license-identifier.patch |   56 +
 ...drivers-soc-atmel-fix-type-for-same7.patch |   33 +
 ...ers-timer-microchip-pit64b-Add-clock.patch |  178 ++
 ...dc-Use-managed-DMA-buffer-allocation.patch |  140 ++
 ...-sama5d2_shdwc-add-support-for-sama7.patch |  146 ++
 ...-at91-pio4-add-support-for-slew-rate.patch |  126 +
 ...4-fix-Prefer-unsigned-int-to-bare-us.patch |  345 +++
 ...ault-usrio-config-to-default-gem-con.patch |   63 +
 ...-prototypes-to-mutually-included-hea.patch |  118 +
 ...p-i2s-mcc-Add-compatible-for-SAMA7G5.patch |   53 +
 ...c-Add-multi-channel-support-for-I2S-.patch |  118 +
 ...s-mcc-Add-support-to-select-TDM-pins.patch |  113 +
 ...-ASoC-mchp-i2s-mcc-Add-FIFOs-support.patch |  192 ++
 ...-at91-pio4-Fix-slew-rate-disablement.patch |   54 +
 ...-media-atmel-properly-get-pm_runtime.patch |  166 ++
 ...l-isc-Remove-redundant-assignment-to.patch |   37 +
 ...l-isc-specialize-gamma-table-into-pr.patch |  196 ++
 ...l-isc-specialize-driver-name-constan.patch |   79 +
 ...l-isc-add-checks-for-limiting-frame-.patch | 

Re: [PATCH] tplink-safeloader: add WPA8631P v3 support

2022-02-23 Thread Piotr Dymacz

Hi Joe,

On 23.02.2022 00:59, jwmulla...@gmail.com wrote:

From: Joe Mullally 

Enable creating images compatible with TP-Link's WPA8631P powerline router.

This matches all current firmwares for all revisions and regions.

Users with older EU "Build 20200314 Rel.3608" & EU "Build 20200508 Rel.41814"
should first upgrade to EU "Build 20200927 Rel.61199" or later before flashing.


[...]

Thanks, merged!

--
Cheers,
Piotr

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


[PATCH] bcm63xx: delete Fast 2704n wan led config

2022-02-23 Thread Daniel González Cabanelas
The Sagem F@ST2704N has no WAN ethernet port, but there is a configured
WAN LED that shouldn't be there.

It comes from a custom configuration made with the original support,
partially fixed in commit fbbb92.

Delete this unused LED config.

Signed-off-by: Daniel González Cabanelas 
---
 target/linux/bcm63xx/base-files/etc/board.d/01_leds | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/target/linux/bcm63xx/base-files/etc/board.d/01_leds 
b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
index 75e8afef9d..d94c051de2 100644
--- a/target/linux/bcm63xx/base-files/etc/board.d/01_leds
+++ b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
@@ -80,9 +80,6 @@ netgear,evg2000)
ucidef_set_led_usbdev "usb1" "USB1" "green:voip1" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "green:voip2" "1-2"
;;
-sagem,fast-2704n)
-   ucidef_set_led_netdev "wan" "WAN" "green:inet" "eth0.2"
-   ;;
 sercomm,ad1018|\
 sercomm,ad1018-nor)
ucidef_set_led_netdev "wlan0" "WLAN" "green:wifi" "wlan0"
-- 
2.35.1





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


[PATCH ustream-ssl] ustream-openssl: wolfSSL: provide detailed information in debug builds

2022-02-23 Thread Petr Štetiar
Show detailed information about the session/peer in debug builds:

 $ wget https://letsencrypt.org

 Alternate cert chain used
  issuer : /C=US/O=Let's Encrypt/CN=R3
  subject: /CN=lencr.org
  altname = lencr.org
  altname = letsencrypt.com
  altname = letsencrypt.org
  altname = www.lencr.org
  altname = www.letsencrypt.com
  altname = www.letsencrypt.org
  serial number:03:4e:29:5a:d6:74:ae:fd:51:cd:0d:61:11:f9:e3:e3:bd:88
 Certificate:

  ...snip...

 our cert info: No Cert
 Peer verify result = 39
 SSL version is TLSv1.3
 SSL cipher suite is TLS_AES_256_GCM_SHA384
 SSL curve name is SECP256R1
 Alternate cert chain used

As it makes debugging issues like #9283 easier.

Signed-off-by: Petr Štetiar 
---
 CMakeLists.txt| 2 ++
 ustream-openssl.c | 8 
 2 files changed, 10 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f53e726aa866..2de65905a40d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,6 +42,8 @@ TARGET_LINK_LIBRARIES(ustream-example-server ustream-ssl)
 ADD_EXECUTABLE(ustream-example-client ustream-example-client.c)
 TARGET_LINK_LIBRARIES(ustream-example-client ustream-ssl)
 
+TARGET_COMPILE_DEFINITIONS(ustream-ssl PRIVATE $<$:DEBUG>)
+
 INSTALL(FILES ustream-ssl.h
DESTINATION include/libubox
 )
diff --git a/ustream-openssl.c b/ustream-openssl.c
index 894dddb5afb1..6dae4aedb752 100644
--- a/ustream-openssl.c
+++ b/ustream-openssl.c
@@ -25,6 +25,10 @@
 #include 
 #endif
 
+#if defined(HAVE_WOLFSSL) && defined(DEBUG)
+#include 
+#endif
+
 /* Ciphersuite preference:
  * - for server, no weak ciphers are used if you use an ECDSA key.
  * - forward-secret (pfs), authenticated (AEAD) ciphers are at the top:
@@ -268,6 +272,10 @@ static void ustream_ssl_verify_cert(struct ustream_ssl *us)
X509 *cert;
int res;
 
+#if defined(HAVE_WOLFSSL) && defined(DEBUG)
+   showPeer(ssl);
+#endif
+
res = SSL_get_verify_result(ssl);
if (res != X509_V_OK) {
if (us->notify_verify_error)

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