Commit Graph

57730 Commits

Author SHA1 Message Date
Michael Pratt d87a8aa148
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>
2023-06-05 08:31:47 +02:00
Petr Štetiar 1bad93c426
WIP: ipq-wifi: use my fork temporarily until upstreamed
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-06-05 08:31:45 +02:00
Petr Štetiar 6845c53ec3
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>
2023-06-05 08:31:44 +02:00
Petr Štetiar 48603a271e
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>
2023-06-05 08:31:43 +02:00
Petr Štetiar a9be186466
ipq807x: image: factor out common eMMC bits
For better maintainability and reusability.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-06-05 08:31:40 +02:00
Petr Štetiar fdea7cb617
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>
2023-06-05 08:31:39 +02:00
Petr Štetiar 38c7cf0e69
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>
2023-06-05 08:31:36 +02:00
Felix Fietkau b6e0a24c49 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>
2023-06-04 18:38:03 +02:00
Felix Fietkau 20ce21866e 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>
2023-06-04 18:37:29 +02:00
Felix Fietkau 7b1e898336 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>
2023-06-04 16:54:52 +02:00
Robert Marko acde5271a6 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>
2023-06-04 12:50:31 +02:00
Robert Marko 84b5735b4c 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>
2023-06-04 12:50:25 +02:00
Robert Marko 5d2de00555 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>
2023-06-04 12:50:11 +02:00
Robert Marko 39e1adc841
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>
2023-06-04 03:14:30 +02:00
Robert Marko d1e452da92
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>
2023-06-04 03:14:27 +02:00
Tianling Shen a0d7193425 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: 0b70d55a64 ("openssl: make UCI config aware of built-in engines")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-03 21:15:11 +02:00
Philip Prindeville 1eb02ce325 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>
2023-06-03 21:15:11 +02:00
Marek Behún 7b31c2e9ed 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)
2023-06-03 21:15:11 +02:00
Olliver Schinagl d881f65da1 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>
2023-06-03 21:15:11 +02:00
Olliver Schinagl 9fb1dbb1df 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>
2023-06-03 21:15:11 +02:00
Andreas Böhler 46b51e9e99 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>
2023-06-03 21:14:37 +02:00
Hauke Mehrtens 21f713d5ab netifd: Fix PKG_MIRROR_HASH
Fix the PKG_MIRROR_HASH value for netifd.

Fixes: d2ecaaca34 ("netifd: update to version 2023-05-31")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-06-03 14:40:03 +02:00
Kevin Darbyshire-Bryant 191742eb8d 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>
2023-06-03 13:09:27 +01:00
Hauke Mehrtens d85013460d 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>
2023-06-03 11:28:49 +02:00
Robert Marko b81045a818 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>
2023-06-02 21:23:12 +02:00
Robert Marko effccdd444 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>
2023-06-02 21:20:53 +02:00
Tony Ambardar 3886ea9b87 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>
2023-06-02 20:59:05 +02:00
Tony Ambardar 04981c716a 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>
2023-06-02 20:59:05 +02:00
Tony Ambardar b3aaede2a7 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>
2023-06-02 20:53:49 +02:00
Daniel Golle 0580747ada 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>
2023-06-02 18:13:39 +01:00
Daniel Golle 7e93f520d6 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>
2023-06-02 18:11:23 +01:00
Mathew McBride abcb30d36c
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>
2023-06-02 11:36:41 +02:00
Mathew McBride 3a7c8fd15e
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>
2023-06-02 11:36:39 +02:00
Mathew McBride 214e94cddf
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>
2023-06-02 11:36:37 +02:00
Mathew McBride e41b82f619
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>
2023-06-02 11:36:36 +02:00
Mathew McBride 83f564f746
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>
2023-06-02 11:36:34 +02:00
Mathew McBride abbffe55dd
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>
2023-06-02 11:36:33 +02:00
Mathew McBride 847467a572
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>
2023-06-02 11:36:32 +02:00
Mathew McBride 2dbeb60725
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>
2023-06-02 11:36:31 +02:00
Mathew McBride 5d2a5f7398
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>
2023-06-02 11:36:29 +02:00
Anton Antonov 26905c9612
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
2023-06-02 11:36:28 +02:00
Anton Antonov 3efb3b801b
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]
2023-06-02 11:36:27 +02:00
Mathew McBride c3151b6f04
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>
2023-06-02 11:36:26 +02:00
Mathew McBride 61ec9a8154
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>
2023-06-02 11:36:23 +02:00
Mathew McBride 54bb95f879
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>
2023-06-02 11:36:22 +02:00
Mathew McBride cb3bbbf00c
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>
2023-06-02 11:36:21 +02:00
Mathew McBride f899e0e024
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>
2023-06-02 11:36:19 +02:00
Mathew McBride 71e56b2ff1
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>
2023-06-02 11:36:18 +02:00
Mathew McBride 3d99314569
armvirt: remove model name override
Now that armvirt has been expanded to boot on more generic
ARM machines, remove the board and model name override.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:16 +02:00
Mathew McBride 9a76b99c1b
armvirt: set kernel partition as the EFI system partition
U-Boot with EFI boot manager functionality will store
EFI boot order data on the ESP in the ubootefi.var file.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:15 +02:00