openwrt/openwrt.git
11 months agogrub2: change armvirt reference to armsr
Mathew McBride [Tue, 6 Jun 2023 23:22:36 +0000 (23:22 +0000)]
grub2: change armvirt reference to armsr

The armvirt target has been renamed to armsr (Arm SystemReady),
so the GRUB configuration also needs to change.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
11 months agoconfig: change references from armvirt to armsr
Mathew McBride [Tue, 6 Jun 2023 23:22:01 +0000 (23:22 +0000)]
config: change references from armvirt to armsr

armvirt target has been renamed to armsr (Arm SystemReady),
so the config defaults need to be changed as well.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
11 months agoarmsr: rename from armvirt
Mathew McBride [Tue, 6 Jun 2023 23:19:16 +0000 (23:19 +0000)]
armsr: rename from armvirt

Now that the armvirt target supports real hardware, not just
VMs, thanks to the addition of EFI, rename it to something
more appropriate.

'armsr' (Arm SystemReady) was chosen after the name of
the Arm standards program.

The 32 and 64 bit targets have also been renamed
armv7 and armv8 respectively, to allow future profiles
where required (such as armv9).

See https://developer.arm.com/documentation/102858/0100/Introduction
for more information.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
11 months agoarmvirt: remove 5.15 configs
Mathew McBride [Wed, 7 Jun 2023 04:48:51 +0000 (04:48 +0000)]
armvirt: remove 5.15 configs

armvirt was migrated to 6.1 as part of the EFI implementation.
As we are renaming the target, there is no need to take the old
kernel configs with us.

See abcb30d ("armvirt: switch to kernel 6.1") for the previous
change.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
11 months agoipq807x: image: fix eMMC flashing/recovery from within initramfs
Petr Štetiar [Mon, 5 Jun 2023 12:10:44 +0000 (14:10 +0200)]
ipq807x: image: fix eMMC flashing/recovery from within initramfs

Having initramfs image built with same config as on buildbots:

 CONFIG_TARGET_MULTI_PROFILE=y
 CONFIG_TARGET_ALL_PROFILES=y
 CONFIG_TARGET_PER_DEVICE_ROOTFS=y

Its currently impossible to flash/recover the device using that image as
losetup is missing:

 root@OpenWrt:/# sysupgrade -v /tmp/openwrt-ipq807x-generic-prpl_haze-squashfs-sysupgrade.bin
 ...
 /lib/upgrade/do_stage2: line 38: losetup: not found
 Failed to detach all loop devices. Skip this try.

So lets fix it by including the needed utils for sysupgrade in
DEFAULT_PACKAGES set.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoipq807x: add initial support for prpl Foundation Haze board
Petr Štetiar [Mon, 5 Jun 2023 10:13:04 +0000 (12:13 +0200)]
ipq807x: add initial support for prpl Foundation Haze board

Haze is prpl Foundation's reference board (WNC LVRP).

Board info:

 - IPQ8072A SoC
 - 2 GiB RAM
 - 4 GiB eMMC
 - 8MiB SPI NOR (MX25U6435F)

 - 3x 1GigE ports (QCA8075)
 - 1x 10GigE port (AQR113C)
 - 1x SFP cage

 - WiFi 6GHz 160MHz (QCN9074)
 - WiFi 5GHz 80+80MHz (QCN5054)
 - WiFi 2.4G (QCN5024)

 - ARM Standard 20-pin 2.54mm/0.1" JTAG (1V8 !!!)
 - Bluetooth v5.0 + EDR with integrated Class 1 PA (CYW20704)
 - 1x M.2 B-key socket with PCIe 3.0
 - 1x USB 3.0 port
 - UART marked J6 is 4-pin 2.54mm/0.1" connector 3V3(arrow),RX,TX,GND (115200 8N1)
 - Reset and WPS buttons

Flashing instructions:

 1. From U-Boot boot OpenWrt using initramfs image:

    IPQ807x# tftpboot openwrt-ipq807x-generic-prpl_haze-initramfs-uImage.itb && bootm

 2. In OpenWrt running from initramfs execute sysupgrade:

    root@OpenWrt:/# sysupgrade -n /tmp/openwrt-ipq807x-generic-prpl_haze-squashfs-sysupgrade.bin

Work in progress/known issues:

 * SFP feature not implemented/tested
 * M.2 feature not implemented/tested
 * Bluetooth feature not implemented/tested
 * 6GHz wireless should be working, but not tested
 * MAC address assigments for LAN interfaces

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoipq-wifi: update to version 2023-06-03
Petr Štetiar [Mon, 5 Jun 2023 10:06:41 +0000 (12:06 +0200)]
ipq-wifi: update to version 2023-06-03

Contains following updates:

 * ipq8074: update RegDB in new submitted BDF
 * Revert "ipq8074: update RegDB in new submitted BDF"
 * qcn9074: update RegDB in new submitted BDF
 * ipq8074: update RegDB in new submitted BDF
 * qca-wireless: ipq40xx: add BDFs for ZTE MF287+
 * Add BDFs for prpl Foundation Haze board

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agokernel: qca-ssdk: renumber patches
Robert Marko [Wed, 7 Jun 2023 12:33:35 +0000 (14:33 +0200)]
kernel: qca-ssdk: renumber patches

Lets reexport the patches in order to have them renumbered from 0 again.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agokernel: qca-ssdk: drop 5.15 support
Robert Marko [Wed, 7 Jun 2023 12:31:58 +0000 (14:31 +0200)]
kernel: qca-ssdk: drop 5.15 support

There is no need for SSDK to support 5.15 anymore since the only user and
possible future ones are on 6.1.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agompc85xx: 5.15: refresh kernel patches
Christian Marangi [Sat, 10 Jun 2023 03:47:57 +0000 (05:47 +0200)]
mpc85xx: 5.15: refresh kernel patches

Refresh kernel patches for 5.15 kernel version for mpc85xx.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agogeneric: 5.15: refresh patches
Christian Marangi [Sat, 10 Jun 2023 03:47:14 +0000 (05:47 +0200)]
generic: 5.15: refresh patches

Refresh kernel patches for generic 5.15 kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agogeneric: 5.15: backport patch supporting "big" kernel symbols
Christian Marangi [Sat, 10 Jun 2023 03:33:44 +0000 (05:33 +0200)]
generic: 5.15: backport patch supporting "big" kernel symbols

Backport patch supporting "big" kernel symbols. This is needed for
powerpc arch that seems to suffer from this problem when
CONFIG_ALL_KMODS is selected and fail to compile with the error:
Inconsistent kallsyms data
Try make KALLSYMS_EXTRA_PASS=1 as a workaround

Backport this patch to handle these corner case.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agogeneric: backport PPC boot wrapper VDSO executable stack fix
Christian Marangi [Fri, 9 Jun 2023 20:09:42 +0000 (22:09 +0200)]
generic: backport PPC boot wrapper VDSO executable stack fix

Backport upstream fix for PowerPC that fix VDSO executable stack warning
for the boot wrapper.

Fix the compilation error:
powerpc-openwrt-linux-musl-ld.bin: warning: div64.o: missing .note.GNU-stack section implies executable stack
powerpc-openwrt-linux-musl-ld.bin: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
powerpc-openwrt-linux-musl-ld.bin: warning: arch/powerpc/boot/simpleImage.ws-ap3825i has a LOAD segment with RWX permissions

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agobmips: add support for Netgear DGND3700 v1, DGND3800B
Daniel González Cabanelas [Sat, 10 Jun 2023 09:54:59 +0000 (11:54 +0200)]
bmips: add support for Netgear DGND3700 v1, DGND3800B

The Netgear DGND3700 v1 and DGND3800B are the same device but with
different factory firmwares. It's an xDSL wifi router with a slim black
shiny casing and 4 PCB internal antennas connected via UFL to a miniPCI
detachable card.

Hardware:
 - SoC: Broadcom BCM6368
 - CPU: dual core BMIPS4350 V3.1 @400Mhz
 - RAM: 128 MB DDR
 - NOR Flash: 32 MB parallel (CFE and OS)
 - NAND flash: 128 MB (empty)
 - Ethernet LAN: 5x 1Gbit
 - Wifi 2.4 GHz: Broadcom BCM43222 802.11bgn
 - Wifi 5 GHz: Broadcom BCM43222 802.11abgn
 - USB: 2x 2.0
 - Buttons: 3x, 1 reset
 - LEDs: 11x
 - UART: yes

Installation via OEM web UI:
  1. Open the Netgear administration web interface, by default:
        http://192.168.0.1
user: admin
        password: password
  2. Look for "upgrade firmware" and proceed
  3. Wait some minutes until it finishes

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
11 months agolantiq: replace random_ether_addr with eth_random_addr
Aleksander Jan Bajkowski [Sat, 6 May 2023 18:39:59 +0000 (20:39 +0200)]
lantiq: replace random_ether_addr with eth_random_addr

Random_ether_addr() is a helper function which was kept for backward
compatibility. It is available in the kernel from version 3.6 to 5.16.
In newer kernel verions, it has been completely replaced by eth_random_addr().

There should be no functional changes.

Ref: https://github.com/torvalds/linux/commit/ba530fea8ca1b57ee71d4e62f287a5d7ed92f789
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
11 months agouboot-envtools: Add u-boot env config for GL-MT3000
Jianhui Zhao [Mon, 5 Jun 2023 03:02:07 +0000 (03:02 +0000)]
uboot-envtools: Add u-boot env config for GL-MT3000

This commit add u-boot env config for GL-MT3000, so
that we can use fw_printenv to print u-boot env and
use fw_setenv to set u-boot env in GL-MT3000.

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
11 months agoramips: fix first boot network configuration for TOZED ZLT S12 PRO
Arınç ÜNAL [Fri, 9 Jun 2023 08:55:21 +0000 (11:55 +0300)]
ramips: fix first boot network configuration for TOZED ZLT S12 PRO

The network configuration at first boot for TOZED ZLT S12 PRO lacks setting
up the LAN and WAN network interfaces. Address this. The WAN port is
advertised as WAN/LAN on the device and is put on LAN on stock firmware so
put it on LAN here as well.

Fixes: ce1f9fa625 ("ramips: add support for TOZED ZLT S12 PRO")
Reported-by: Andre Cruz <me@1conan.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
11 months agokernel: modules: fix mdio-bus-mux description
Luiz Angelo Daros de Luca [Fri, 9 Jun 2023 02:41:54 +0000 (23:41 -0300)]
kernel: modules: fix mdio-bus-mux description

Simple error during copy/paste

Fixes: 2dbeb607251b ("kernel: add mdio-bus-mux support")
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
11 months agoramips: fix button definitions for Zyxel WSM20
Thomas Schröder [Fri, 9 Jun 2023 10:03:31 +0000 (12:03 +0200)]
ramips: fix button definitions for Zyxel WSM20

Setting the events of the WPS and LED buttons to
the best matching values based from the documentation:
<https://openwrt.org/docs/guide-user/hardware/hardware.button#procd_buttons>

Signed-off-by: Thomas Schröder <tschroeder_github@outlook.com>
11 months agoapm821xx: switch over from DTB_SIZE to DEVICE_DTC_FLAGS
Christian Lamparter [Thu, 8 Jun 2023 16:12:05 +0000 (18:12 +0200)]
apm821xx: switch over from DTB_SIZE to DEVICE_DTC_FLAGS

DEVICE_DTC_FLAGS is more flexible and can be used in
place of APM821xx own DTB_SIZE.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
11 months agoapm821xx: add kmod-ata-dwc to sata target
Christian Lamparter [Thu, 8 Jun 2023 16:15:08 +0000 (18:15 +0200)]
apm821xx: add kmod-ata-dwc to sata target

though, ata-dwc is built-in on the target already.

Fixes: fd9dc10530ef ("apm821xx: make ata-dwc as a standalone module")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
11 months agobmips: bump LZMA Loader address
Álvaro Fernández Rojas [Fri, 9 Jun 2023 17:48:42 +0000 (19:48 +0200)]
bmips: bump LZMA Loader address

This allows booting bigger ramdisk images via TFTP at the cost of breaking 32M
RAM compatibility, but those devices have been unable to boot ramdisks on this
target for some time anyway due to not having enough RAM.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobmips: add support for Observa VH4032N
Daniel González Cabanelas [Thu, 8 Jun 2023 22:09:33 +0000 (00:09 +0200)]
bmips: add support for Observa VH4032N

The Observa VH4032N is an xDSL wifi router with a vertical white casing
and two internal antennas connected via UFL.

Hardware:
 - SoC: Broadcom BCM6368
 - CPU: dual core BMIPS4350 V3.1 @400MHz
 - RAM: 128 MB DDR
 - Flash: 32 MB parallel NOR
 - Ethernet LAN: 4x 100Mbit
 - Wifi 2.4/5 GHz: onboard Broadcom BCM43222 802.11abgn
 - USB: 3x 2.0
 - Buttons: 2x, 1 reset
 - LEDs: 8x, blue and red
 - UART: 1x

Installation via OEM web UI:
  1. Use the admin credentials to login via web UI
  2. Go to Managament->Update firmware and select the OpenWrt CFE firmware
  3. Press "Update Firmware" button and wait some minutes until it finish

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
11 months agobcm27xx: remove kernel v5.15 support
Álvaro Fernández Rojas [Thu, 8 Jun 2023 17:52:16 +0000 (19:52 +0200)]
bcm27xx: remove kernel v5.15 support

Due to the amount of patches from the RPi foundation, maintaining two kernels
version is an insane effort.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobcm27xx: switch to kernel v6.1
Álvaro Fernández Rojas [Thu, 8 Jun 2023 17:50:35 +0000 (19:50 +0200)]
bcm27xx: switch to kernel v6.1

Enable kernel v6.1 as the default kernel for bcm27xx.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobcm27xx: 6.1: refresh config and add missing symbols
Álvaro Fernández Rojas [Thu, 8 Jun 2023 17:50:04 +0000 (19:50 +0200)]
bcm27xx: 6.1: refresh config and add missing symbols

Refresh config for kernel 6.1 and add missing symbols.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobcm27xx: 6.1: add kernel patches
Álvaro Fernández Rojas [Thu, 8 Jun 2023 17:49:36 +0000 (19:49 +0200)]
bcm27xx: 6.1: add kernel patches

Add kernel patches for version 6.1.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobcm27xx: 6.1: copy config from 5.15
Álvaro Fernández Rojas [Thu, 8 Jun 2023 17:48:19 +0000 (19:48 +0200)]
bcm27xx: 6.1: copy config from 5.15

Copy config from 5.15 kernel version.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agokernel: 6.1: add missing Kconfig symbols
Álvaro Fernández Rojas [Thu, 8 Jun 2023 17:46:37 +0000 (19:46 +0200)]
kernel: 6.1: add missing Kconfig symbols

Add missing symbol found during refreshing bcm27xx Kconfigs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agoopenssl: update to 3.0.9
Ivan Pavlov [Sun, 4 Jun 2023 19:34:39 +0000 (22:34 +0300)]
openssl: update to 3.0.9

CVE-2023-2650 fix
Remove upstreamed patches

Major changes between OpenSSL 3.0.8 and OpenSSL 3.0.9 [30 May 2023]
 * Mitigate for very slow OBJ_obj2txt() performance with gigantic OBJECT IDENTIFIER sub-identities. (CVE-2023-2650)
 * Fixed buffer overread in AES-XTS decryption on ARM 64 bit platforms (CVE-2023-1255)
 * Fixed documentation of X509_VERIFY_PARAM_add0_policy() (CVE-2023-0466)
 * Fixed handling of invalid certificate policies in leaf certificates (CVE-2023-0465)
 * Limited the number of nodes created in a policy tree (CVE-2023-0464)

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
11 months agoipq807x: remove critical trips from AC/HK DTSI
Robert Marko [Wed, 7 Jun 2023 18:53:31 +0000 (20:53 +0200)]
ipq807x: remove critical trips from AC/HK DTSI

Now that critical trips are defined for all thermal zones in the SOC DTSI
there is no need to duplicate them in AC and HK DTSI.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoipq807x: add critical thermal trips to all thermal zones
Robert Marko [Wed, 7 Jun 2023 18:49:47 +0000 (20:49 +0200)]
ipq807x: add critical thermal trips to all thermal zones

Kernel 6.1 has started actually enforcing the bindings requirment that
thermal zones must have associated trips described as well, otherwise they
will fail during probing with:
[    0.865494] thermal_sys: Failed to find 'trips' node
[    0.867254] thermal_sys: Failed to find trip points for thermal-sensor id=4
[    0.872271] thermal_sys: Failed to find 'trips' node
[    0.878898] thermal_sys: Failed to find trip points for thermal-sensor id=5
[    0.884222] thermal_sys: Failed to find 'trips' node
[    0.890775] thermal_sys: Failed to find trip points for thermal-sensor id=6
[    0.896073] thermal_sys: Failed to find 'trips' node
[    0.902668] thermal_sys: Failed to find trip points for thermal-sensor id=7
[    0.907964] thermal_sys: Failed to find 'trips' node
[    0.914569] thermal_sys: Failed to find trip points for thermal-sensor id=8
[    0.921203] thermal_sys: Failed to find 'trips' node
[    0.926469] thermal_sys: Failed to find trip points for thermal-sensor id=14
[    0.931759] thermal_sys: Failed to find 'trips' node
[    0.938703] thermal_sys: Failed to find trip points for thermal-sensor id=15

So, since CPUFreq support isnt yet upstream we can start by adding critical
trips to all of the thermal zones to protect the devices against severely
overheating.
Qualcomm has set the overheat trip at 120 C but lets be conservative and
set it at 110 C.

This patch has been sent upstream as well.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agogeneric: 6.1: move Qualcomm SoC ID bindings to generic
Robert Marko [Thu, 8 Jun 2023 16:03:05 +0000 (18:03 +0200)]
generic: 6.1: move Qualcomm SoC ID bindings to generic

Move the Qualcomm SoC ID bindings that are used by the CPUFreq NVMEM
driver that was recently backported to generic from ipq807x as that series
depends on SoC ID bindings but they were forgotten.

Due to that IPQ806x builds would fail as the backport was still in ipq807x.

Fixes: d44279 ("generic: 6.1: backport Qualcomm CPUFreq NVMEM changes")
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agogeneric: 5.15: backport PPC VDSO executable stack fix
Robert Marko [Wed, 7 Jun 2023 07:58:22 +0000 (09:58 +0200)]
generic: 5.15: backport PPC VDSO executable stack fix

Recent binutils will warn if there is no .note.GNU-stack section and will
interpret that as that stack is executable.

So, lets modify the upstream 6.1 fix as in 5.15 VDSO32 and VDSO64 are still
separate but later they were merged to resolve:
/external-toolchain/openwrt-toolchain-mpc85xx-p1020_gcc-12.3.0_musl.Linux-x86_64/toolchain-powerpc_8548_gcc-12.3.0_musl/bin/../lib/gcc/powerpc-openwrt-linux-musl/12.3.0/../../../../powerpc-openwrt-linux-musl/bin/ld: warning: arch/powerpc/kernel/vdso32/getcpu.o: missing .note.GNU-stack section implies executable stack
/external-toolchain/openwrt-toolchain-mpc85xx-p1020_gcc-12.3.0_musl.Linux-x86_64/toolchain-powerpc_8548_gcc-12.3.0_musl/bin/../lib/gcc/powerpc-openwrt-linux-musl/12.3.0/../../../../powerpc-openwrt-linux-musl/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agogeneric: drop useless binfmt patch fixing compilation warning
Christian Marangi [Thu, 8 Jun 2023 01:23:53 +0000 (03:23 +0200)]
generic: drop useless binfmt patch fixing compilation warning

The compilation warning was triggered by wrongly set FRAME_WARN to 1024
even for 64bit. This was recently fix by correctly setting the
FRAME_WARN to 2048 for 64bit systems.

The compilation warning would still be triggered on 32bit system but the
actual code is never reached as ARCH_USE_GNU_PROPERTY is only set on
arm64 arch.

Drop the patch as kmalloc cause perf regression as suggested by upstream
maintainers.

Fixes: fa79baf4a6e2 ("generic: copy backport, hack, pending patch and config from 5.15 to 6.1")
Fixes: 5913ea1ba2fa ("generic: 5.15: add pending patch fixing binfmt compilation warning")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agokernel: use struct group to wipe psb6970 volatile priv data
Aleksander Jan Bajkowski [Thu, 25 May 2023 20:20:15 +0000 (22:20 +0200)]
kernel: use struct group to wipe psb6970 volatile priv data

Instead of reference vlan and do strange subtraction, use the handy
struct_group() to create a virtual struct of the same size of the
members. This permits to have a more secure memset and fix compilation
warning in 6.1 where additional checks are done.

Fix compilation warning:
| inlined from 'psb6970_reset_switch' at drivers/net/phy/psb6970.c:275:2:
| ./include/linux/fortify-string.h:314:25: error: call to '__write_overflow_field'
| declared with attribute warning: detected write beyond size of field
| (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
|  314 |                         __write_overflow_field(p_size_field, size);
|      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|cc1: all warnings being treated as errors

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
11 months agooxnas: Enable CONFIG_CRYPTO_LZ4
Jitao Lu [Sun, 4 Jun 2023 05:54:01 +0000 (13:54 +0800)]
oxnas: Enable CONFIG_CRYPTO_LZ4

Previously, CONFIG_LZ4_DECOMPRESS=y was selected by CONFIG_RD_LZ4 only.

When building kernel for initramfs, CONFIG_RD_LZ4 will be unset by
Kernel/SetInitramfs if the chosen compression method is not lz4, then
CONFIG_LZ4_DECOMPRESS will become a *module* in the newly generated
kernel config.

However, the newly added module won't be built after
38c150612cc9be488527e342db92d5c74093213f, so packaging kmod-lib-lz4
fails due to missing lz4_decompress.ko.

CONFIG_CRYPTO_LZ4=y makes CONFIG_LZ4_DECOMPRESS=y being selected w/o
CONFIG_RD_LZ4, so that the modules of the default kernel and initramfs
kernel are consistent.

Fixes: #12766
Fixes: 38c150612cc ("build: revert 54070a1 (all kernels are >= 5.10)")
Signed-off-by: Jitao Lu <dianlujitao@gmail.com>
11 months agoramips: enable LED button for TP-Link EC330-G5u v1
Mikhail Zhilkin [Sat, 3 Jun 2023 08:37:54 +0000 (08:37 +0000)]
ramips: enable LED button for TP-Link EC330-G5u v1

The device already has LED push button (KEY_LIGHTS_TOGGLE)
and exported GPIO control "led-light". This commit adds
button handler script for switching on/off all device LEDs.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
11 months agoipq807x: use updated CPUFreq NVMEM support
Robert Marko [Wed, 7 Jun 2023 11:16:32 +0000 (13:16 +0200)]
ipq807x: use updated CPUFreq NVMEM support

Most of the CPUFreq NVMEM patches have been upstreamed in an improved way.
IPQ8074 support itself is being reviewed upstream currently.

Upstreamed patches have been moved to generic backports so that ipq806x can
use them as well, so lets just use the latest version of IPQ8074 support
that is being reviewed upstream.

Runtime tested on Qnap 301W (IPQ8072A) and Xiaomi AX3600 (IPQ8071A).

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agogeneric: 6.1: backport Qualcomm CPUFreq NVMEM changes
Robert Marko [Wed, 7 Jun 2023 11:12:26 +0000 (13:12 +0200)]
generic: 6.1: backport Qualcomm CPUFreq NVMEM changes

Currently, IPQ807x is using CPUFreq NVMEM for dealing with different SoC
SKU-s having different frequency limits, and we are keeping the patches
for it in ipq807x target.

However, we managed to upstream a big cleanup of the driver in order to
make it possible for other SMEM based targets to be added to CPUFreq NVMEM.

IPQ806x will be using CPUFreq NVMEM and depends on these changes as well,
so lets put them in generic backport to avoid code duplication.

This replaces the older patches in ipq807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agokernel: ltq-ptm: do not write directly to dev->addr
Aleksander Jan Bajkowski [Sat, 6 May 2023 21:14:16 +0000 (23:14 +0200)]
kernel: ltq-ptm: do not write directly to dev->addr

One is never to write to dev->addr directly. In 6.1 it will be a const and
with the newly enabled WERROR, we get a failing grade.

Lets fix this ahead of time.

Ref: https://github.com/torvalds/linux/commit/adeef3e32146a8d2a73c399dc6f5d76a449131b1
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
11 months agokernel: bump 6.1 to 6.1.32
Robert Marko [Tue, 6 Jun 2023 09:36:06 +0000 (11:36 +0200)]
kernel: bump 6.1 to 6.1.32

Removed upstreamed:
generic-backport/610-v6.3-net-page_pool-use-in_softirq-instead.patch[1]

All other patches automatically rebased.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/net?h=v6.1.32&id=7dccd5fa7edb9562da61af820bb9d0346447baf1

Build system: x86_64/Fedora 38
Build-tested: ipq807x/Dynalink DL-WRX36
Runtime-tested: ipq807x/Dynalink DL-WRX36

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoipq807x: mark MDT loader fix as backport
Robert Marko [Tue, 6 Jun 2023 10:25:27 +0000 (12:25 +0200)]
ipq807x: mark MDT loader fix as backport

MDT loader fix for remoteproc was already merged, so mark it as a backport
with the future 6.5 kernel version.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoipq807x: refresh kernel config
Robert Marko [Tue, 6 Jun 2023 10:22:50 +0000 (12:22 +0200)]
ipq807x: refresh kernel config

Refresh the kernel config as multiple options were disabled in the generic
config since 6.1 was added to ipq807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoipq807x: renumber upstreamed patches
Robert Marko [Tue, 6 Jun 2023 10:18:37 +0000 (12:18 +0200)]
ipq807x: renumber upstreamed patches

We are running out of 00xx numbers to put backports into, so lets just
renumber all of the upstreamed patches back to 0000 and onwards.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agomediatek: use DEVICE_DTC_FLAGS and drop DTC_FLAGS where not needed
Daniel Golle [Tue, 6 Jun 2023 12:05:50 +0000 (13:05 +0100)]
mediatek: use DEVICE_DTC_FLAGS and drop DTC_FLAGS where not needed

The MT7986 RFB was intended to use device tree overlays and for that
reason modified DTC_FLAGS. zyxel_ex5601-t0-stock later on probably
copied it from there. Both boards do not actually use device tree
overlays, so remove setting DTC_FLAGS from both.

The BPi-R3 does use device tree overlays, use DEVICE_DTC_FLAGS to give
it an extra 4kb of padding for overlays to be applied.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: use DEVICE_DTC_FLAGS for BPi-R64
Daniel Golle [Tue, 6 Jun 2023 12:04:08 +0000 (13:04 +0100)]
mediatek: use DEVICE_DTC_FLAGS for BPi-R64

Make sure there is an extra 4kb of padding to apply device tree overlays
on the BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agoimage: introduce DEVICE_DTC_FLAGS and DEVICE_DTCO_FLAGS
Daniel Golle [Tue, 6 Jun 2023 12:01:15 +0000 (13:01 +0100)]
image: introduce DEVICE_DTC_FLAGS and DEVICE_DTCO_FLAGS

Handle compiling device tree overlay blobs separate to allow for
overlays being compiled with different parameters, mostly to safe
space.
Allow defining DEVICE_DTC_FLAGS and DEVICE_DTCO_FLAGS as per-device
parameters to be passed to dtc. Previously some boards directly used
DTC_FLAGS in their build recipe which then also affected other boards.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agogeneric: backport initial LEDs hw control support
Christian Marangi [Sun, 4 Jun 2023 02:26:59 +0000 (04:26 +0200)]
generic: backport initial LEDs hw control support

Backport initial LEDs hw control support. Currently this is limited to
only rx/tx and link events for the netdev trigger but the API got
accepted and the additional modes are working on and will be backported
later.

Refresh every patch and add the additional config flag for QCA8K new
LEDs support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agomediatek: set new compat version if booted on R64 and R3
Daniel Golle [Tue, 6 Jun 2023 00:14:27 +0000 (01:14 +0100)]
mediatek: set new compat version if booted on R64 and R3

If the board comes up with OpenWrt that means that the bootloader is
recent enough and knows about the new device tree overlays.

Using /etc/board.d/ is not enough in this case because it doesn't
overwrite existing configuration which may exist (and is fine to exist)
if the user updated with 'sysupgrade -F *.itb' and has kept
configuration. They would still need to manually set compat_version
even though the fact that the bootloader env has been updated can be
implied by the fact that the system has started.

Hence we can always set compat_version=1.1 for those two boards using
uci-defaults.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: sync MT7986 device trees with upstream
Daniel Golle [Sun, 4 Jun 2023 14:56:15 +0000 (15:56 +0100)]
mediatek: sync MT7986 device trees with upstream

Sync device tree files for MT7986 boards with what landed in upstream
Linux tree to easy maintainance and also allow for a smooth update to
Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: use updated device tree overlay mechanism for BPi-R64
Daniel Golle [Sun, 4 Jun 2023 18:55:11 +0000 (19:55 +0100)]
mediatek: use updated device tree overlay mechanism for BPi-R64

Use new device tree overlay mechanism for the BananaPi BPi-R64 board.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agouboot-mediatek: adapt BPi-R3 and BPi-R64 to new device tree overlay
Daniel Golle [Sun, 4 Jun 2023 17:55:17 +0000 (18:55 +0100)]
uboot-mediatek: adapt BPi-R3 and BPi-R64 to new device tree overlay

Update bootloader environment for BPi-R3 and BPi-R64 to adapt to new
device tree overlay mechanism now that support for multiple device
tree overlays has been added.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agogeneric: use only first element in bootconf for uImage.FIT
Daniel Golle [Sun, 4 Jun 2023 17:21:29 +0000 (18:21 +0100)]
generic: use only first element in bootconf for uImage.FIT

Now that it is possible to load several device tree overlays by
appending their config names to bootconf the uImage.FIT partition
parser need to discard everything after the first '#' character in
bootconf when looking up the config node to be used.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agoimage: improve uImage.FIT device tree overlay support
Daniel Golle [Sun, 4 Jun 2023 14:57:25 +0000 (15:57 +0100)]
image: improve uImage.FIT device tree overlay support

Instead of generating full config nodes incl. kernel, generate minimal
config nodes for device tree overlays to be applied to the main config.
In this way, multiple device tree overlays can be applied more easily.
While at it change filenames to upstream style, ie. use dtso and dtbo
suffix for device tree overlays.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: convert mt7986a-zyxel-ex5601-t0-stock.dts to UNIX
Daniel Golle [Sun, 4 Jun 2023 15:05:29 +0000 (16:05 +0100)]
mediatek: convert mt7986a-zyxel-ex5601-t0-stock.dts to UNIX

The device tree file was in DOS format (CR-LF). Convert it to UNIX style.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agoRevert "ipq807x: add initial support for prpl Foundation Haze board"
Petr Štetiar [Mon, 5 Jun 2023 09:45:30 +0000 (11:45 +0200)]
Revert "ipq807x: add initial support for prpl Foundation Haze board"

This reverts commit 48603a271e6ff9e5cd851e873429893115e00c94 as this
was commited by accident, its still work in progress.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoRevert "ipq-wifi: add board files for prpl Foundation Haze board"
Petr Štetiar [Mon, 5 Jun 2023 09:45:27 +0000 (11:45 +0200)]
Revert "ipq-wifi: add board files for prpl Foundation Haze board"

This reverts commit 6845c53ec3bb25dbbb0e8bbcf435fc380502fc56.  as this
was commited by accident, its still work in progress.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoRevert "WIP: ipq-wifi: use my fork temporarily until upstreamed"
Petr Štetiar [Mon, 5 Jun 2023 09:45:24 +0000 (11:45 +0200)]
Revert "WIP: ipq-wifi: use my fork temporarily until upstreamed"

This reverts commit 1bad93c42669061b0248ca5cff1d83e399a2ef1a as this was
commited by accident, its still work in progress.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoRevert "ath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1"
Robert Marko [Mon, 5 Jun 2023 08:52:55 +0000 (10:52 +0200)]
Revert "ath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1"

This reverts commit 5d2de0055504727503a050731c3ca8c75b51f185.

I received multiple reports that in various configurations this FW version
is not stable and crashes, so lets revert to 01385 revision which works.

Fixes #12815
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [fixes tag]
11 months agoramips: fix lzma-loader for ASIARF boards
Daniel Danzberger [Fri, 2 Jun 2023 17:36:28 +0000 (19:36 +0200)]
ramips: fix lzma-loader for ASIARF boards

This fixes a well known "LZMA ERROR 1" error, reported previously on
numerous of similar devices.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
11 months agosdk: Expose CCACHE_DIR option
Jeffery To [Mon, 5 Jun 2023 04:57:51 +0000 (12:57 +0800)]
sdk: Expose CCACHE_DIR option

As the CCACHE option is already exposed, it would be helpful to also
make the ccache directory easily customizable.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
11 months agotools/coreutils: rename list of installed programs
Michael Pratt [Tue, 30 May 2023 09:22:54 +0000 (05:22 -0400)]
tools/coreutils: rename list of installed programs

Rename the list of programs installed by coreutils
to PKG_PROGRAMS, which will create a stampfile for each
through a new feature in host-build.mk.

Also, cleanup a bit to save lines
regarding the usage of this list.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agotools/findutils: define list of installed programs
Michael Pratt [Tue, 30 May 2023 09:43:00 +0000 (05:43 -0400)]
tools/findutils: define list of installed programs

Define the variable PKG_PROGRAMS for the list
of programs installed by findutils,
which will create a stampfile for each
through a new feature in host-build.mk.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agohost-build: add support for a stampfile per installed binary
Michael Pratt [Tue, 30 May 2023 11:20:19 +0000 (07:20 -0400)]
host-build: add support for a stampfile per installed binary

Some individual build items install a group of programs
instead of a program matching the name of the build item.

Add support for installing stampfiles for each of the
programs installed by that build item,
which will allow more control and awareness
of what is installed by the rest of the build system,
if, for example, prereq symlink checks are looking
for the same program which is built already.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agoprereq-build: replace relative symlinks only if broken
Michael Pratt [Mon, 29 May 2023 09:38:33 +0000 (05:38 -0400)]
prereq-build: replace relative symlinks only if broken

Some programs installed to staging_dir/host/bin
also install some symlinks to itself
for an alternative name.

Some of those new symlinks are overwriting
symlinks that were installed by prereq stage.

If prereq stage were to somehow be run again,
it should not be overwriting symlinks
that point to programs that are already built.

To filter that out, catch all symlinks
after first catching all symlinks
that have an absolute target
after all other cases in the case statement,
make sure it is not broken, and if so exit successfully.

Suggested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agoprereq-build: do not replace binaries with symlinks
Michael Pratt [Sat, 27 May 2023 21:11:47 +0000 (17:11 -0400)]
prereq-build: do not replace binaries with symlinks

Some programs, like bash and patch, are checked by prereq stage
and have a symlink installed, but then is later built from source.

Now that the prereq-build checks are not successful
just by finding the file alone, it is possible for
a new symlink to overwrite the installed binary.

If a normal file is found in staging_dir/host/bin,
let the check look for the associated stampfile, and if found,
skip creation of a symlink and exit successfully.

Suggested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agoRevert "prereq: SetupHostCommand: fix wrong check result"
Michael Pratt [Thu, 25 May 2023 07:00:57 +0000 (03:00 -0400)]
Revert "prereq: SetupHostCommand: fix wrong check result"

This reverts commit 7855378fcd7ed7cb0a223238a99bac0b8e46c380.

The return "exit 1" was intentional and actually just
makes the symlink checks much more strict.

This new level of strictness added to the checks revealed
what was a confusing regression with prereq stage that
already existed but was not presenting itself
because of the simple way that checks used to be done before.

Either way, reverting to "exit 0" was a nice workaround
until the true root cause was discovered, so as to not interfere
with others' pull requests and builds in the meantime.

It turns out that this problem was the inconsistent value of $PATH
between different commands within the SetupHostCommand recipe,
now fixed in the parent commit, using the variable created
in the parent of the parent commit.

Ref: f75204036c ("prereq-build: allow host command symlinks to update")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agoprereq-build: fix inconsistent value of $PATH
Michael Pratt [Thu, 25 May 2023 06:31:52 +0000 (02:31 -0400)]
prereq-build: fix inconsistent value of $PATH

In the recipe SetupHostCommand for checking
and creating symlinks, $PATH was only overridden
for one of several commands.

This causes the symlinks to be included
in the paths to pick a program from
when the check was repeated, because
staging_dir/host/bin was included in $PATH,
but only *sometimes*.

When the check ran again, the command succeded
with a $PATH including the symlink,
(eval "$$$$$$$$cmd")
while the path to the program was evaluated
with a $PATH NOT including the symlink,
(bin=...)
causing the symlink to be relinked incorrectly,
instead of passing as exactly the same.

Coincidentally, this was only a problem
if the symlink targeted the alternative
program with a different name.

By overriding the value of $PATH at the invocation of Make,
it will apply to the entire environment of the checks.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agotreewide: add ORIG_PATH variable
Michael Pratt [Thu, 25 May 2023 06:31:17 +0000 (02:31 -0400)]
treewide: add ORIG_PATH variable

Add a variable that stores the original value of $PATH
in the host system's shell, before Make alters it.

This can be useful for when it is necessary
to ignore symlinks and programs made by the build system.

Define this new variable before all instances of
'export PATH:=' or similar.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
11 months agoWIP: ipq-wifi: use my fork temporarily until upstreamed
Petr Štetiar [Tue, 30 May 2023 13:36:00 +0000 (15:36 +0200)]
WIP: ipq-wifi: use my fork temporarily until upstreamed

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoipq-wifi: add board files for prpl Foundation Haze board
Petr Štetiar [Tue, 30 May 2023 09:07:29 +0000 (11:07 +0200)]
ipq-wifi: add board files for prpl Foundation Haze board

QSDK based factory firmware was setting following board_ids in DTS:

 ath11k_pci 0001:01:00.0: chip_id 0x0 chip_family 0x0 board_id 0xa4 soc_id 0xffffffff
 ath11k c000000.wifi1: chip_id 0x0 chip_family 0x0 board_id 0x294 soc_id 0xffffffff

Thus board-prpl_haze.qcn9074` was extracted from `bus=...qmi-board-id=164.bin`
file and `board-prpl_haze.ipq8074` from `bus=...qmi-board-id=660.bin` file.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoipq807x: add initial support for prpl Foundation Haze board
Petr Štetiar [Mon, 29 May 2023 20:11:45 +0000 (22:11 +0200)]
ipq807x: add initial support for prpl Foundation Haze board

Haze is prpl Foundation's reference board (WNC LVRP).

Board info:

 - IPQ8072A SoC
 - 2 GiB RAM
 - 4 GiB eMMC
 - 8MiB SPI NOR (MX25U6435F)

 - 3x 1GigE ports (QCA8075)
 - 1x 10GigE port (AQR113C)
 - 1x SFP cage

 - WiFi 6GHz 160MHz (QCN9074)
 - WiFi 5GHz 80+80MHz (QCN5054)
 - WiFi 2.4G (QCN5024)

 - ARM Standard 20-pin 2.54mm/0.1" JTAG (1V8 !!!)
 - Bluetooth v5.0 + EDR with integrated Class 1 PA (CYW20704)
 - 1x M.2 B-key socket with PCIe 3.0
 - 1x USB 3.0 port
 - UART 4-pin 3V3(arrow),RX,TX,GND (115200 8N1)
 - Reset and WPS buttons

Flashing instructions:

 1. From U-Boot boot OpenWrt using initramfs image:

    IPQ807x# tftpboot openwrt-ipq807x-generic-prpl_haze-initramfs-uImage.itb && bootm

 2. In OpenWrt running from initramfs execute sysupgrade:

    root@OpenWrt:/# sysupgrade -n /tmp/openwrt-ipq807x-generic-prpl_haze-squashfs-sysupgrade.bin

Work in progress/known issues:

 * SFP feature not implemented/tested
 * M.2 feature not implemented/tested
 * Bluetooth feature not implemented/tested
 * 6GHz wireless should be working, but not tested
 * MAC address assigments for LAN interfaces

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoipq807x: image: factor out common eMMC bits
Petr Štetiar [Tue, 30 May 2023 14:36:05 +0000 (16:36 +0200)]
ipq807x: image: factor out common eMMC bits

For better maintainability and reusability.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoipq807x: image: cleanup unused variables
Petr Štetiar [Tue, 30 May 2023 14:31:39 +0000 (16:31 +0200)]
ipq807x: image: cleanup unused variables

BLOCKSIZE and PAGESIZE seems to be unused on qnap_301w and zyxel_nbg7815
device which use eMMC storage.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agoqca-nss-dp: fix oops in nss_dp_probe
Petr Štetiar [Mon, 29 May 2023 17:27:15 +0000 (19:27 +0200)]
qca-nss-dp: fix oops in nss_dp_probe

Currently kernel crashes when of_phy_connect has issues:

 Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000000000000308
 ...
 pc : phy_attached_print+0x28/0x1b0
 lr : phy_attached_info+0x14/0x20
 ...
 Call trace:
  phy_attached_print+0x28/0x1b0
  phy_attached_info+0x14/0x20
  nss_dp_adjust_link+0x544/0x6c4 [qca_nss_dp]

of_phy_connect returns either pointer or NULL, so can't be checked with
IS_ERR macro.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
11 months agolibubox: update to the latest version
Felix Fietkau [Wed, 24 May 2023 08:21:23 +0000 (10:21 +0200)]
libubox: update to the latest version

b09b316aeaf6 blobmsg: add blobmsg_parse_attr function
eac92a4d5d82 blobmsg: add blobmsg_parse_array_attr
ef5e8e38bd38 usock: fix poll return code check
6fc29d1c4292 jshn.sh: Add pretty-printing to json_dump
5893cf78da40 blobmsg: Don't do at run-time what can be done at compile-time
362951a2d96e uloop: fix uloop_run_timeout
75a3b870cace uloop: add support for integrating with a different event loop

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agonetifd: update to the latest version
Felix Fietkau [Sun, 4 Jun 2023 16:37:21 +0000 (18:37 +0200)]
netifd: update to the latest version

ec9dba721245 system-linux: fix memory leak in system_bridge_vlan_check

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agounetd: update to the latest version
Felix Fietkau [Sun, 4 Jun 2023 14:54:19 +0000 (16:54 +0200)]
unetd: update to the latest version

412d03012f13 network: prevent adding endpoint routes for addresses on the network
faaf9cee6ef4 utils: fix ipv4 checksum issue
0e1c2fad3540 pex-msg: fix memory leak on fread fail in pex_msg_update_request_init
51be0ed659d0 host: fix crash parsing gateway when no endpoint is specified
ca17601dc24e wg-linux: add support for splitting netlink messages for allowed ips
7d3986b7a5a2 wg-linux: increase default messages size

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agomac80211: ath11k: sync with ath-next
Robert Marko [Fri, 2 Jun 2023 12:12:01 +0000 (14:12 +0200)]
mac80211: ath11k: sync with ath-next

Synchronize the ath11k backports with the current ath-next tree.

This introduces support for MBSSID and EMA, adds factory test mode and
some new HTT stats.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agomac80211: backport EMA beacon support
Robert Marko [Fri, 2 Jun 2023 12:08:31 +0000 (14:08 +0200)]
mac80211: backport EMA beacon support

Backport EMA beacon support from kernel 6.4.
It is required for MBSSID/EMA suport in ath11k that will follow.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1
Robert Marko [Fri, 2 Jun 2023 09:30:11 +0000 (11:30 +0200)]
ath11k-firmware: update to WLAN.HK.2.9.0.1-01713-QCAHKSWPL_SILICONZ-1

QCA released a point update for the 2.9.0.1 firmware, so lets update to it.

Runtime tested on Dynalink DL-WRX36.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoipq807x: remove 5.15 support
Robert Marko [Sat, 3 Jun 2023 16:10:03 +0000 (18:10 +0200)]
ipq807x: remove 5.15 support

Now that 6.1 is the default kernel, there is no reason to keep 5.15 around
as I dont plan to maintain it anymore so lets remove it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoipq807x: switch to kernel 6.1
Robert Marko [Sat, 3 Jun 2023 16:08:03 +0000 (18:08 +0200)]
ipq807x: switch to kernel 6.1

Now that 6.1 kernel is working fine on ipq807x , lets switch to 6.1 as the
default kernel as its increasingly hard to keep backporting upstreamed
changes to 5.15.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoopenssl: fix uci config for built-in engines
Tianling Shen [Thu, 1 Jun 2023 07:22:26 +0000 (15:22 +0800)]
openssl: fix uci config for built-in engines

Built-in engine configs are added in libopenssl-conf/install stage
already, postinst/add_engine_config is just duplicating them, and
due to the lack of `config` header it results a broken uci config:

> uci: Parse error (invalid command) at line 3, byte 0

```
config engine 'devcrypto'
        option enabled '1'
engine 'devcrypto'
        option enabled '1'
        option builtin '1'
```

Add `builtin` option in libopenssl-conf/install stage and remove
duplicate engine configuration in postinst/add_engine_config to
fix this issue.

Fixes: 0b70d55a64c39d ("openssl: make UCI config aware of built-in engines")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agox86/64: Enable IOMMU_V2 support for later CPUs
Philip Prindeville [Wed, 17 May 2023 23:12:18 +0000 (17:12 -0600)]
x86/64: Enable IOMMU_V2 support for later CPUs

Support newer IOMMU_V2 on AMD platforms, useful for DPDK and KVM.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
11 months agokernel: Backport mvneta crash fix to 5.15
Marek Behún [Wed, 12 Apr 2023 11:01:25 +0000 (13:01 +0200)]
kernel: Backport mvneta crash fix to 5.15

Backport Russell King's series [1]
  net: mvneta: reduce size of TSO header allocation
to pending-5.15 to fix random crashes on Turris Omnia.

This also backports two patches that are dependencies to this series:
  net: mvneta: Delete unused variable
  net: mvneta: fix potential double-frees in mvneta_txq_sw_deinit()

[1] https://lore.kernel.org/netdev/ZCsbJ4nG+So%2Fn9qY@shell.armlinux.org.uk/

Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (squashed)
11 months agorealtek: eth: Do not write directly to dev->addr
Olliver Schinagl [Wed, 24 May 2023 10:58:37 +0000 (12:58 +0200)]
realtek: eth: Do not write directly to dev->addr

One is never to write to dev->addr directly. In 6.1 it will be a const and
with the newly enabled WERROR, we get a failing grade.

Lets fix this ahead of time.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
11 months agorealtek: Add missing headers
Olliver Schinagl [Thu, 25 May 2023 11:38:47 +0000 (13:38 +0200)]
realtek: Add missing headers

We are missing a bunch of headers, which trigger errors on 6.1, probably
due to changed header-in-header dependencies. Best add them now.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
11 months agoramips: tplink,mr600v2: fix image generation for sysupgrade image
Andreas Böhler [Sun, 2 Apr 2023 08:40:47 +0000 (10:40 +0200)]
ramips: tplink,mr600v2: fix image generation for sysupgrade image

The MR600v2 does not find its rootfs if it is neither directly after the
kernel or aligned to an erase block boundary (64k).

This aligns the rootfs to 0x10000 allowing the device to boot again. Based
on investigation by forum user relghuar.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
11 months agonetifd: Fix PKG_MIRROR_HASH
Hauke Mehrtens [Sat, 3 Jun 2023 12:37:37 +0000 (14:37 +0200)]
netifd: Fix PKG_MIRROR_HASH

Fix the PKG_MIRROR_HASH value for netifd.

Fixes: d2ecaaca3404 ("netifd: update to version 2023-05-31")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 months agonetfilter: fix typo in kmod-nft-dup-inet
Kevin Darbyshire-Bryant [Mon, 29 May 2023 17:17:38 +0000 (18:17 +0100)]
netfilter: fix typo in kmod-nft-dup-inet

Fix typo of 'family' in a7e9445975

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
11 months agovalgrind: update to 3.21.0
Hauke Mehrtens [Wed, 31 May 2023 20:51:12 +0000 (22:51 +0200)]
valgrind: update to 3.21.0

Release Notes:
https://valgrind.org/docs/manual/dist.news.html

This improves support for the memory allocator used in musl libc 1.2.2
and later which is currently used by OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 months agokernel: bump 6.1 to 6.1.31
Robert Marko [Wed, 31 May 2023 19:02:52 +0000 (21:02 +0200)]
kernel: bump 6.1 to 6.1.31

All patches automatically rebased.

Build system: x86_64/Fedora 38
Build-tested: ipq807x/Qnap 301W, ipq807x/Dynalink DL-WRX36
Run-tested: ipq807x/Qnap 301W, ipq807x/Dynalink DL-WRX36

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agogeneric: b53: rename exported symbols to avoid upstream conflict
Robert Marko [Fri, 2 Jun 2023 10:27:19 +0000 (12:27 +0200)]
generic: b53: rename exported symbols to avoid upstream conflict

Upstream DSA driver is exporting symbols with the same name as our
downstream swconfig driver, so lets rename the downstream symbols to make
them unique and avoid the conflict on 6.1 kernel.

Without this change, building 6.1 with kmod-switch-bcm53xx would conflict
with the B53 DSA driver and CI would fail.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agokselftests-bpf: add kernel BPF tests
Tony Ambardar [Mon, 17 May 2021 18:57:40 +0000 (11:57 -0700)]
kselftests-bpf: add kernel BPF tests

Build and package kernel self-tests used for BPF testing, program and JIT
development. This package, together with the existing 'kmod-bpf-test', was
extensively used for past upstream Linux JIT submissions [1].

Currently this includes only 'test_verifier'; building 'test_progs' will
fail due to known endian limitations with bpftool skeletons.

[1]:https://lore.kernel.org/bpf/cover.1633392335.git.Tony.Ambardar@gmail.com

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agokernel: backport libcap workaround for BPF selftests
Tony Ambardar [Tue, 29 Nov 2022 04:43:19 +0000 (20:43 -0800)]
kernel: backport libcap workaround for BPF selftests

Recent libcap versions (>= 2.60) cause problems with BPF kselftests, so
backport an upstream patch that replaces libcap and drops the dependency.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agobase-files: enable BPF JIT kallsyms by default
Tony Ambardar [Fri, 26 May 2023 08:41:18 +0000 (01:41 -0700)]
base-files: enable BPF JIT kallsyms by default

Set net.core.bpf_jit_kallsyms=1 in /etc/sysctl.d/10-default.conf.

For privileged users, this exports addresses of JIT-compiled programs to
appear in /proc/kallsyms when present, allowing their use for debugging
and in traces.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
11 months agomediatek: use existing I2C clock names
Daniel Golle [Thu, 1 Jun 2023 09:32:19 +0000 (10:32 +0100)]
mediatek: use existing I2C clock names

PCK and MCK should really be P=PMIC and M=MEM, which means that they
should effectively be CLK_PMIC and CLK_ARB.

Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: use cpufreq fix suggested by MediaTek
Daniel Golle [Fri, 26 May 2023 12:31:26 +0000 (13:31 +0100)]
mediatek: use cpufreq fix suggested by MediaTek

Use suggested fix for mediatek-cpufreq, patch will also be sent
upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>