openwrt/staging/nbd.git
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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]
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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)
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 months agoarmvirt: switch to kernel 6.1
Mathew McBride [Thu, 1 Jun 2023 05:55:22 +0000 (05:55 +0000)]
armvirt: switch to kernel 6.1

The EFI implementation changes have only been applied
to 6.1, so switch armvirt over to it.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agokernel: kmod-amazon-ena: move to top level netdevices
Mathew McBride [Wed, 5 Oct 2022 01:40:22 +0000 (12:40 +1100)]
kernel: kmod-amazon-ena: move to top level netdevices

The Amazon ENA network devices are also used on the
AWS Arm (Graviton) instance types, so move it from
the x86-only module file to the top level netdevices.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agoarmvirt: 64: disable CONFIG_SMC91X
Mathew McBride [Mon, 13 Feb 2023 06:51:26 +0000 (06:51 +0000)]
armvirt: 64: disable CONFIG_SMC91X

The SMC91X family is a ISA-age Ethernet controller.
I'm not particularly sure what it's doing in armvirt/64,
as it's unlikely there is a QEMU or real hardware configuration
that exists with it.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agoarmvirt: base-files: add tty0 to inittab
Mathew McBride [Mon, 5 Sep 2022 06:56:49 +0000 (16:56 +1000)]
armvirt: base-files: add tty0 to inittab

tty0 is the default console for devices with screens/framebuffers.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agoarmvirt: config changes required for framebuffer console
Mathew McBride [Mon, 5 Sep 2022 06:55:02 +0000 (16:55 +1000)]
armvirt: config changes required for framebuffer console

These Kconfig options are required to get a screen console
working with the VMware Fusion ARM (Apple Silicon) preview.
They are likely to be the same for other Arm standard
"desktop" hardware that may emerge.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agoarmvirt: package and select Rockchip DWMAC Ethernet driver
Mathew McBride [Tue, 18 Apr 2023 03:34:23 +0000 (03:34 +0000)]
armvirt: package and select Rockchip DWMAC Ethernet driver

For devices that implement the "rockchip,*-gmac" compatible controller,
including:
- RK3328
- RK3399
- RK3568
- RK3588
- PX30

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agoarmvirt: 64: add Allwinner A3/A83T/A64 (sun8i family) Ethernet
Mathew McBride [Mon, 20 Mar 2023 02:53:31 +0000 (02:53 +0000)]
armvirt: 64: add Allwinner A3/A83T/A64 (sun8i family) Ethernet

Add support for the dwmac (stmmac) variant used by Allwinner
Arm64 boards.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agokernel: add mdio-bus-mux support
Mathew McBride [Mon, 20 Mar 2023 04:16:04 +0000 (04:16 +0000)]
kernel: add mdio-bus-mux support

The MDIO bus multiplexing framework is used by some drivers
such as dwmac-sun8i.

As this is a per-driver requirement, set it to be hidden in the menu.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agoarmvirt: 64: add Marvell (formerly Cavium) ThunderX series network driver
Mathew McBride [Sat, 11 Feb 2023 03:58:09 +0000 (03:58 +0000)]
armvirt: 64: add Marvell (formerly Cavium) ThunderX series network driver

Based on working configuration supplied by Anton Antonov.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agoarmvirt: 64: Add storage support for qemu-sbsa platform
Anton Antonov [Thu, 22 Dec 2022 12:01:59 +0000 (12:01 +0000)]
armvirt: 64: Add storage support for qemu-sbsa platform

Enable SATA support, which is used by the Server Base
System Architecture reference board[1].

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Mathew McBride <matt@traverse.com.au>
[1] - https://qemu.readthedocs.io/en/latest/system/arm/sbsa.html

17 months agoarmvirt: 64: Add NXP i.MX 8M Mini/Nano/Quad/Plus EVK support
Anton Antonov [Tue, 30 May 2023 02:55:16 +0000 (02:55 +0000)]
armvirt: 64: Add NXP i.MX 8M Mini/Nano/Quad/Plus EVK support

Also includes Advantech RSB-3720 (iMX8 Plus) support.

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Mathew McBride <matt@traverse.com.au>
[Re-sort into kernel config, move network into modules]

17 months agoarmvirt: 64: add support for other SystemReady-compatible vendors
Mathew McBride [Fri, 15 Jul 2022 02:38:02 +0000 (02:38 +0000)]
armvirt: 64: add support for other SystemReady-compatible vendors

These changes are to support other vendors that have SystemReady/EFI
support, including:
* Marvell Armada
** (This is speculative as I don't have a machine of my own to test)
* Amazon Graviton (tested bare-metal and virtualized instances)
* VMware (Fusion for ARM Mac preview)
* NXP/Freescale (Layerscape series not already selected)
* HiSilicon
* Allwinner/sunxi
* Rockchip (untested, options taken from arm64 defconfig)

To give an idea of the hardware certified for SystemReady,
see
https://www.arm.com/architecture/system-architectures/systemready-certification-program/ir
and
https://www.arm.com/architecture/system-architectures/systemready-certification-program/es

Other vendors that _should_ work include Marvell Octeon 10
and Ampere. I understand these systems should work
"out of the box" in ACPI mode but may require other drivers
(e.g PCIe NICs and storage controllers).

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agoarmvirt: add SFP support patches for NXP Layerscape DPAA2 platforms
Mathew McBride [Fri, 2 Jun 2023 04:14:14 +0000 (04:14 +0000)]
armvirt: add SFP support patches for NXP Layerscape DPAA2 platforms

This series resolves a long term issue with Phylink and SFPs on
DPAA2 hardware (LS1088,LS2088,LX2160) where a locking problem
prevented the system from rebooting. Patches solving this
issue existed prior to 6.2 but were not accepted upstream.

See the original series on patchwork:
https://patchwork.kernel.org/project/netdevbpf/cover/20221129141221.872653-1-vladimir.oltean@nxp.com/

And this thread on the Traverse forum:
https://forum.traverse.com.au/t/reboot-command-regression-from-5-10-to-5-15-kernel/133/12

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agoarmvirt: add options and driver modules for NXP Layerscape DPAA2 platform
Mathew McBride [Wed, 31 May 2023 05:47:41 +0000 (05:47 +0000)]
armvirt: add options and driver modules for NXP Layerscape DPAA2 platform

Tested with a Traverse Technologies Ten64 (LS1088A) board.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agoarmvirt: add ACPI support
Mathew McBride [Thu, 9 Jun 2022 04:51:59 +0000 (04:51 +0000)]
armvirt: add ACPI support

ACPI support is required for Arm 'SystemReady' server and workstation
systems (and as an option on embedded platforms).

These config changes allow OpenWrt to boot in a QEMU virtual machine
with a UEFI/EDKII 'BIOS', but with no other hardware enabled yet.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agobuild: enable vmdk/vmware images for arm64 target
Mathew McBride [Wed, 12 Jan 2022 05:53:55 +0000 (05:53 +0000)]
build: enable vmdk/vmware images for arm64 target

This is useful for VMware's ARM64 products, e.g Fusion for M1/ARM Macs.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
17 months agobuild: use 128MiB as the boot/kernel partition size on armvirt target
Mathew McBride [Tue, 1 Jun 2021 01:48:25 +0000 (01:48 +0000)]
build: use 128MiB as the boot/kernel partition size on armvirt target

The nominal partition type for EFI boot partitions is FAT32,
which has a minimum size of 32MiB on a 512-byte-sector block device.

To ensure that the boot partition is created as FAT32 set a size
well above this minimum.

A useful discussion about EFI partition sizes can be found here:
https://superuser.com/questions/1310927/what-is-the-absolute-minimum-size-a-uefi-system-partition-can-be

I have found 128MiB works pretty consistently across both
tools (mkfs.fat) and firmwares (EDKII)

Signed-off-by: Mathew McBride <matt@traverse.com.au>