openwrt/openwrt.git
23 min agobuild: also generate the CycloneDX SBOM in imagebuilder main master
Florian Eckert [Wed, 24 Apr 2024 11:39:33 +0000 (13:39 +0200)]
build: also generate the CycloneDX SBOM in imagebuilder

The needed file '.packageinfo' for creating the CycloneDX SBOM in the
imagebuilder is available in the top directory of the imagebuilder and
not in the tmp directory.

For this reason, the creation of the CycloneDX SBOM file is not available
for the imagebuilder.

To fix this, it is now first checked whether the CycloneDX SBOM should be
built at all and then second decided by checking the IB variable where the
'.packageinfo' file is to be found.

With this change, it is now possible to create the CycloneDX SBOM also for
the imagebuilder as well.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
25 min agobuild: remove duplicate MAINTAINER from package-dumpinfo.mk
Florian Eckert [Wed, 17 Apr 2024 13:15:28 +0000 (15:15 +0200)]
build: remove duplicate MAINTAINER from package-dumpinfo.mk

This is an artifact and is not needed. We have already set the
information 'Maintainer:' in the '.packageinfo-*' files.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
46 min agoarm-trusted-firmware-mediatek: add ram-download bl2 images
Felix Fietkau [Tue, 7 May 2024 17:40:43 +0000 (19:40 +0200)]
arm-trusted-firmware-mediatek: add ram-download bl2 images

Support for MT7981-MT7988. Can be used for mtk_uartboot recovery

Signed-off-by: Felix Fietkau <nbd@nbd.name>
47 min agoinclude/trusted-firmware-a.mk: allow overriding package install template
Felix Fietkau [Tue, 7 May 2024 17:38:25 +0000 (19:38 +0200)]
include/trusted-firmware-a.mk: allow overriding package install template

Useful for special targets (e.g. RAM-only images)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 hours agoarmsr: armv8: enable serial console for Renesas platforms
Mathew McBride [Tue, 30 Apr 2024 02:34:37 +0000 (12:34 +1000)]
armsr: armv8: enable serial console for Renesas platforms

Support for Renesas Arm families was added in commit 1ff4f4df2301
("armsr: armv8: enable CONFIG_ARCH_RENESAS"), but this did not
enable the console/tty hardware for these SoCs, which is derived
from the SuperH family (CONFIG_SERIAL_SH_SCI).

Link: https://github.com/openwrt/openwrt/issues/15284
Signed-off-by: Mathew McBride <matt@traverse.com.au>
8 hours agobase-files: armsr: add script to migrate GPIO switches on Ten64 board
Mathew McBride [Mon, 1 Apr 2024 03:44:47 +0000 (14:44 +1100)]
base-files: armsr: add script to migrate GPIO switches on Ten64 board

Due to a change in kernel 6.2, the GPIO numbers on certain
architectures (including arm64) have changed. This script
will update any defined GPIO switches to the new numbering.

See https://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042448.html
for more information.

In the future, the GPIO switch mechanism will likely be
replaced with something using libgpiod.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
8 hours agobase-files: armsr: number Ten64 GPIOs according to kernel version
Mathew McBride [Mon, 18 Mar 2024 02:03:55 +0000 (13:03 +1100)]
base-files: armsr: number Ten64 GPIOs according to kernel version

A change in kernel 6.2[1] caused the base numbers of GPIOs to
change significantly on some architectures like aarch64.

We have to number our GPIOs accordingly.
Ideally the board.d scripts should look through sysfs
to find the basenum (like cat "/sys/devices/platform/soc/2000000.i2c/
i2c-0/0-0076/gpio/gpiochip640/base"), but the problem is
that this occurs before modules are loaded, meaning I2C and other
runtime devices may be missing.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
[1] https://lore.kernel.org/lkml/cover.1662116601.git.christophe.leroy@csgroup.eu/T/

8 hours agoarmsr: armv8: add new fsl-enetc-core module for kernel 6.6
Mathew McBride [Wed, 13 Mar 2024 01:26:12 +0000 (12:26 +1100)]
armsr: armv8: add new fsl-enetc-core module for kernel 6.6

From kernel 6.3 onwards, the fsl-enetc driver has restructured
it's common code into a 'core' module[1].

Signed-off-by: Mathew McBride <matt@traverse.com.au>
[1] https://patchwork.kernel.org/project/netdevbpf/patch/20230119160431.295833-2-vladimir.oltean@nxp.com/

8 hours agoarmsr: add kernel 6.6 as a testing target
Mathew McBride [Wed, 13 Mar 2024 01:34:03 +0000 (12:34 +1100)]
armsr: add kernel 6.6 as a testing target

Add kernel 6.6 for testing.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
8 hours agokernel/armsr: add config stubs and changes needed for 6.6
Mathew McBride [Sun, 17 Mar 2024 23:51:21 +0000 (10:51 +1100)]
kernel/armsr: add config stubs and changes needed for 6.6

Introduce new configuration options prompted by 6.6 (relative to 6.1).
The kernel arm64 defconfig is used as guide for 'core' options, while
video/camera/other media drivers are turned off by default.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
8 hours agokernel/armsr: Restore kernel files for v6.1
Mathew McBride [Sun, 17 Mar 2024 23:48:13 +0000 (10:48 +1100)]
kernel/armsr: Restore kernel files for v6.1

This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
8 hours agokernel/armsr: Add configuration files and patches for v6.6
Mathew McBride [Sun, 17 Mar 2024 23:48:13 +0000 (10:48 +1100)]
kernel/armsr: Add configuration files and patches for v6.6

Based on the 6.1 files, but without any 6.6 additions.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
9 hours agoipq806x: swap lan leds for Meraki MR52
Mieczyslaw Nalewaj [Tue, 7 May 2024 06:46:07 +0000 (08:46 +0200)]
ipq806x: swap lan leds for Meraki MR52

LAN Leds on Meraki MR52 are wrong and needs to be swapped to actually
reflect real ports (lan1<->lan2).

Fixes: #15388
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15410
[ wrap commit to 80 columns and improve commit title ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
9 hours agogeneric: 6.1, 6.6: move accepted patches to backport folders
Daniel Golle [Tue, 7 May 2024 11:00:58 +0000 (12:00 +0100)]
generic: 6.1, 6.6: move accepted patches to backport folders

Move two accepted patches for the mt7530 DSA driver from pending to
accepted.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 hours agokernel: fix tools build breakage on macos with x86
Felix Fietkau [Tue, 7 May 2024 10:22:15 +0000 (12:22 +0200)]
kernel: fix tools build breakage on macos with x86

Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 hours agotools: add more linux include files to fix x86 build on macos
Felix Fietkau [Tue, 7 May 2024 10:18:08 +0000 (12:18 +0200)]
tools: add more linux include files to fix x86 build on macos

Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 hours agomediatek: fix mt7988a pmu interrupt dts property
Felix Fietkau [Tue, 7 May 2024 10:13:00 +0000 (12:13 +0200)]
mediatek: fix mt7988a pmu interrupt dts property

Fixes profiling using perf

Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 hours agombedtls: export cmake files
Felix Fietkau [Thu, 18 Apr 2024 19:56:56 +0000 (21:56 +0200)]
mbedtls: export cmake files

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 hours agorealtek: add RTL821X_CHIP_ID
Stijn Tintel [Fri, 26 Apr 2024 22:40:08 +0000 (01:40 +0300)]
realtek: add RTL821X_CHIP_ID

According to the Realtek SDK code, the RTL8214FC, RTL8218B and RTL8218FB
all have the same chip ID 0x6276. Let's add a constant for it, as we're
using it in more than one location.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
11 hours agorealtek/rtl839x: respect phy-is-integrated property
Stijn Tintel [Fri, 26 Apr 2024 22:40:07 +0000 (01:40 +0300)]
realtek/rtl839x: respect phy-is-integrated property

Respect the phy-is-integrated property on ethernet-phy nodes.

There are RTL8393M switches where the PHYs at address 48 and 49 are
provided by an external RTL8214FC. Hardcoding them to use the internal
SerDes makes it impossible to use the ports connected to such an
external PHY. Respect the phy-is-integrated property on ethernet-phy
nodes as a first step to support such ports.

The potential impact for this should be limited to RTL8393 based
switches, and looking at the commit messages and device tree files of
the supported switches based on this SoC, the SFP and/or combo ports are
either not working (D-Link DGS-1210-52, Netgear GS750E, TP-Link
SG2452P/T1600G-52PS), use PHYs at a different address (Panasonic
SwitchM48EG PN28480K), or already have the phy-is-integrated property
set on the PHYs at address 48 and 49.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Daniel Golle <daniel@makrotopia.org>
11 hours agomediatek: bpi-r4: fix uci-default script for mac storage
Martin Schiller [Tue, 7 May 2024 06:32:42 +0000 (08:32 +0200)]
mediatek: bpi-r4: fix uci-default script for mac storage

There was a typo in commit 5709254690cb ("mediatek: bpi-r4: store random
MAC addresses for the BPi-R4"). Let's fix it and also add support for
the bpi-r4-poe variant.

Fixes: 5709254690cb ("mediatek: bpi-r4: store random MAC addresses for the BPi-R4")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
11 hours agomediatek: bpi-r4: add rootwait to bootargs
Martin Schiller [Tue, 7 May 2024 06:31:24 +0000 (08:31 +0200)]
mediatek: bpi-r4: add rootwait to bootargs

In commit cd4de3251c1f ("mediatek: wait for fitblk rootfs"), the linux
6.6 files and patches has been forgotton to be fixed.

Fixes: cd4de3251c1f ("mediatek: wait for fitblk rootfs")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
11 hours agomediatek: bpi-r2: add rootwait to bootargs
Martin Schiller [Tue, 7 May 2024 06:27:32 +0000 (08:27 +0200)]
mediatek: bpi-r2: add rootwait to bootargs

In commit cd4de3251c1f ("mediatek: wait for fitblk rootfs"), the linux
6.6 files and patches has been forgotton to be fixed.

Fixes: cd4de3251c1f ("mediatek: wait for fitblk rootfs")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
12 hours agokernel: qca-nss-dp: update to 12.5.r2 for kernel 6.6
Kristian Skramstad [Sun, 5 May 2024 10:36:20 +0000 (12:36 +0200)]
kernel: qca-nss-dp: update to 12.5.r2 for kernel 6.6

There is a new branch 12.5.r2 for kernel 6.6, so refresh
and update patches.

Delete patch 0010-nss-dp-include-net-netdev_rx_queue.h.patch

Changes:
2024-04-04 -5bf8b91 [qca-nss-dp] Adding support for port ID 3 & 4 in MHT switch
2024-03-28 -ce1e4cf [qca-nss-dp] Use skb_queue_head_init instead of __skb_queue_head_init.
2024-03-11 -0d26366 [qca-nss-dp] Read MHT LAN port status for ErP phase2
2024-03-22 -8382f14 [qca-nss-dp] Fix compilation issues seen on ginger branch for Miami profile
2023-05-02 -09b0983 [qca-nss-dp] vp list processing for capwap
2024-02-22 -bc09a01 [qca-nss-dp] EDMA ring reset for PPE-DS
2024-03-12 -2fcb586 [qca-nss-dp] Fix the EDMA clock frequency for the mitigation timer configuration
2024-02-23 -44ba1be [qca-nss-dp] Add API to retrieve ethernet netdevs for ErP
2024-02-09 -a5979b7 [qca-nss-dp] send napi and ip checksum for VP handler
2024-01-12 -1b9cb5d qca-nss-dp: User netdev_alloc_skb_fast instead of dev_alloc_skb
2024-01-08 -a859b48 [qca-nss-dp] NAPI Budget and EDMA Rx size change for KPI improvement.
2024-01-06 -8935523 [qca-nss-dp] Offload L3, L4 checksum to hardware for ppe-vp.
2023-12-07 -bbd9547 [qca-nss-dp] Fix Compilation issues on kernel6.6
2023-10-12 -bc55f75 [qca-nss-dp]: Enable legacy SCS for PPE-VP.
2023-09-08 -6bd771f [qca-nss-dp] Invalidate secondary descriptor before use.
2023-12-19 -b143df8 [qca-nss-dp] Fixed nss_dp_hal_hw_reset functionality for ipq53xx.
2023-12-16 -7cfde1d [qca-nss-dp] Added nss_dp_hal_hw_reset functionality for ipq53xx.
2023-11-02 -70af6c2 [qca-nss-dp] Implement EDMA hang recovery support
2023-11-27 -2202b29 [qca-nss-dp] Add support for adding the link speed for the Miami's port connected to the internal Switch.
2023-12-06 -bef68a8 [qca-nss-dp] Resolve ring utilization reporting issue in EDMA driver
2023-12-06 -eaa7627 [qca-nss-dp] Add/Delete static fdb entries only for physical ports
2023-10-16 -4551d0f [qca-nss-dp]: Support HLOST_TID_override from PPE_VP path.
2023-11-09 -42ad3f3 [qca-nss-dp] Correct the NAPI poll implementation for DS Rx fill handling
2023-10-16 -dfeb7d3 [qca-nss-dp] Check for disabled ethernet port in ErP functions
2023-11-09 -42ad3f3 [qca-nss-dp] Correct the NAPI poll implementation for DS Rx fill handling
2023-10-16 -dfeb7d3 [qca-nss-dp] Check for disabled ethernet port in ErP functions
2023-09-22 -03f83d6 [qca-nss-dp] Correct the mht device flag
2023-08-18 -5efd7f4 [qca-nss-dp] Add EDMA Tx rings for MHT ports
2023-09-11 -7808ba2 [qca-nss-dp] Move DP standby code to new file and use new SSDK API
2023-09-28 -22ade1e [qca-nss-dp] : enable PPE-DS support in 6.x kernel
2023-08-28 -1943922 [qca-nss-dp] Support for bitmap based CPU selection.
2023-08-16 -dcb82a7 qca-nss-dp: 512M profile changes for Miami+Pebble
2023-09-01 -18e51f3 [qca-nss-dp] Fix tx descriptor completion error.
2023-08-28 -0bfde2d [qca-nss-dp] Changes to enable ErP mode
2023-09-05 -f1d635a [qca-nss-dp] Enable fast recycled changes in dp for kernel 6.1
2023-06-15 -55d35bd [qca-nss-dp] Tracking the full utilization of EDMA rings
2023-08-25 -89b9c19 [qca-nss-dp] Restricting the MTU as 9216 for all interfaces in DP
2023-01-03 -5098a4f [qca-nss-dp] Requeue Tx packet in case of Tx-failure.
2023-04-06 -3576dbb [qca-nss-dp] Adding tx napi with four queue per interface.
2023-08-10 -d2b6921 [qca-nss-dp] : changes to support ppe-qdisc for linux 6.x
2023-08-08 -a1941fb [qca-nss-dp] moving SET_NETDEV_DEV for all netdev to set.
2023-07-18 -74d3178 [qca-nss-dp] Reordering the CPU code and ACL index processing.
2023-06-30 -ab03139 [qca-nss-dp] Configure port level PPE offload flag in PPE
2023-06-06 -e9bb8c5 [qca-nss-dp] Rate limit the debug logs.
2023-07-18 -43afb9b [qca-nss-dp] Support Core selection for PPE mirrored packets.
2023-07-11 -92edcfd [qca-nss-dp] Add sysctl to invalidate RX secondary descriptor.

Tested and working on WAX620.

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
Link: https://github.com/openwrt/openwrt/pull/15383
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 hours agokernel: qca-ssdk: update to 12.5 for kernel 6.6
Sean Khan [Sat, 4 May 2024 21:09:08 +0000 (17:09 -0400)]
kernel: qca-ssdk: update to 12.5 for kernel 6.6

Qualcomm recently committed a new branch (12.5.r2) targeting kernel
6.6. This lets us clean up a few patches particularly the one for
"C22/C45" mdio.

A quick way to see what changed for IPQ807x/6018 was to list the files produced
during build (**/*.o), replace the extension with ".c", and doing a
`git log`.

Filtering from those commits, ones of particular interest are listed
below:

```
2024-04-16 - 0d8f30aa - fix compile issue on hk with linux style build
2024-01-29 - 636464f7 - update the check for port link notify
2024-01-24 - 30c10e7f - enable and disable loopback for xgmac to fix qm stuck issue
2024-01-15 - b6ea10aa - update the the APIs to access switch
2024-01-08 - a1687502 - Disable Tx bridge mac before power off the PHY
2024-01-07 - 3eafb613 - support led configure for malibu phy
2024-01-07 - 5c1af60d - remove phy type check from mac reset when mode switch
2023-12-17 - 79d0b1e8 - remove the PHY access APIs in ssdk_plat.c
2023-12-16 - b2953740 - Update mii read/write functions
2023-12-11 - 37f2eac3 - add port id check for fdb entry
2023-12-11 - d040ca4d - support mdio clause45 on kernel6.6
2023-12-07 - 11494fbc - use barrier mw() during access fdb entry table
2023-12-03 - 8e40a284 - fix build warnings on kernel6.6
2023-11-10 - 10aa0a02 - change speed value when call ssdk_port_link_notify
2023-11-06 - ee4c4a60 - Update mac bitmap value of L3 table on MAC delete
2023-11-03 - 7cd27d39 - support 10G phy common feature
2023-10-30 - 383cc0d2 - fix mactype and mux select issue
2023-10-24 - decf534a - support autoneg status query on force port
2023-10-11 - 111d574e - move ssdk_led_init to regi_init
2023-10-08 - 6b14c142 - the combo port also need to parse SFP pins
2023-10-03 - fb2e0401 - fix port5 interface mode switch issue in erp case
```

Verified with users on QNAP 301W, NBG7815, and myself on Dynalink
DL-WRX36 that everything is functional, including LEDS.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/15379
Signed-off-by: Robert Marko <robimarko@gmail.com>
22 hours agorockchip: add kernel 6.6 as testing kernel
Antonio Flores [Fri, 19 Apr 2024 17:44:18 +0000 (13:44 -0400)]
rockchip: add kernel 6.6 as testing kernel

Add kernel 6.6 as testing kernel

Signed-off-by: Antonio Flores <antflores627@gmail.com>
22 hours agokernel: add missing kernel 6.6 symbols
Antonio Flores [Fri, 19 Apr 2024 17:41:26 +0000 (13:41 -0400)]
kernel: add missing kernel 6.6 symbols

Add missing kernel 6.6 symbols

Signed-off-by: Antonio Flores <antflores627@gmail.com>
22 hours agorockchip: refresh config 6.6
Antonio Flores [Fri, 19 Apr 2024 17:38:57 +0000 (13:38 -0400)]
rockchip: refresh config 6.6

Refresh config 6.6 (make kernel_oldconfig).

Signed-off-by: Antonio Flores <antflores627@gmail.com>
22 hours agorockchip: refresh 6.6 patches
Antonio Flores [Fri, 19 Apr 2024 17:12:01 +0000 (13:12 -0400)]
rockchip: refresh 6.6 patches

Refresh kernel 6.6 patches.
Removed backpored patches.

Signed-off-by: Antonio Flores <antflores627@gmail.com>
22 hours agokernel/rockchip: Restore kernel files for v6.1
Antonio Flores [Fri, 19 Apr 2024 16:49:23 +0000 (12:49 -0400)]
kernel/rockchip: Restore kernel files for v6.1

This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.

Signed-off-by: Antonio Flores <antflores627@gmail.com>
22 hours agokernel/rockchip: Create kernel files for v6.6 (from v6.1)
Antonio Flores [Fri, 19 Apr 2024 16:49:23 +0000 (12:49 -0400)]
kernel/rockchip: Create kernel files for v6.6 (from v6.1)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Antonio Flores <antflores627@gmail.com>
24 hours agolibbpf: Update to v1.4.1
Tony Ambardar [Wed, 3 Apr 2024 22:31:29 +0000 (15:31 -0700)]
libbpf: Update to v1.4.1

Update to the latest upstream release to include recent improvements and
bugfixes.

Link: https://github.com/libbpf/libbpf/releases/tag/v1.4.1
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
24 hours agokselftests-bpf: update for kernel 6.6
Tony Ambardar [Sun, 5 May 2024 23:11:02 +0000 (16:11 -0700)]
kselftests-bpf: update for kernel 6.6

Enable building multiple test programs and related kernel modules, with
initial support for the bpf_testmod.ko module required since kernel 6.4.
Explicitly disable LTO and clean up makefile variables and formatting.

Fix a musl-related build failure by adding a kernel 6.6 patch:

     360-selftests-bpf-portability-of-unprivileged-tests.patch

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
29 hours agomediatek: bpi-r4: add ethernet aliases to DT
Daniel Golle [Mon, 6 May 2024 15:37:24 +0000 (16:37 +0100)]
mediatek: bpi-r4: add ethernet aliases to DT

Adding the aliases also for Linux 6.6 was forgotten and is required for
U-Boot to hand down persistent MAC addresses to Linux.

Fixes: 5709254690 ("mediatek: bpi-r4: store random MAC addresses for the BPi-R4")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
33 hours agouboot-envtools: add env settings for ubnt,unifi-6-lr-v2
Joel Low [Tue, 7 Nov 2023 14:05:14 +0000 (22:05 +0800)]
uboot-envtools: add env settings for ubnt,unifi-6-lr-v2

This has been tested on two of my Unifi 6 LR v2s:

```bash
$ fw_printenv # before
Cannot parse config file '/etc/fw_env.config': No such file or directory
$ cat /etc/fw_env.config
/dev/mtd3 0x0000 0x1000 0x1000 1
$ fw_printenv
arch=arm
baudrate=115200
board=mt7622_evb
board_name=mt7622_evb
bootcmd=bootubnt
bootdelay=3
bootfile=uImage
cpu=armv7
device_model=U6-LR
ethact=mtk_eth
ethaddr=<redacted>
ethcard=AQR112C
ipaddr=<redacted>
is_default=true
loadaddr=0x5007FF28
macaddr=<redacted>
serverip=<redacted>
soc=mt7622
stderr=serial
stdin=serial
stdout=serial
vendor=mediatek
is_ble_stp=true
```

I had to reverse-engineer the working settings above to the UCI script.

Signed-off-by: Joel Low <joel@joelsplace.sg>
Link: https://github.com/openwrt/openwrt/pull/13897
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
33 hours agodropbear: use ssh-keygen as an alias for dropbearkey
Sergey Ponomarev [Sun, 3 Dec 2023 16:11:38 +0000 (18:11 +0200)]
dropbear: use ssh-keygen  as an alias for dropbearkey

The DropBear's dropbearkey supports limited set of arguments of
OpenSSH ssh-keygen:  -t, -q -N -Y
After the change you can generate a key with the same command.
Still many features of the original OpenSSH ssh-keygen are absent in
the dropbearkey.
If it's needed then users should install openssh-keygen package that
will replace the /usr/bin/ssh-keygen with the full version.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14174
[ wrap commit description to 80 columns ]
Link: https://github.com/openwrt/openwrt/pull/14174
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
34 hours agoipq40xx: Enable the Engenius EAP1300
Corey Minyard [Fri, 3 May 2024 13:14:31 +0000 (08:14 -0500)]
ipq40xx: Enable the Engenius EAP1300

Now that DSA is enabled and the MAC addresses are set properly, we can
use it.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
34 hours agoipq40xx: Properly set MAC addresses for the EAP1300
Corey Minyard [Fri, 3 May 2024 13:12:38 +0000 (08:12 -0500)]
ipq40xx: Properly set MAC addresses for the EAP1300

The code that was there was just taking whatever was left in the
registers, which was just wrong.  Set the addresses using the value from
the u-boot environment, the same way the OEM firmware does.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
34 hours agoipq40xx: convert Engenius EAP1300 to DSA
Corey Minyard [Wed, 1 May 2024 20:43:16 +0000 (15:43 -0500)]
ipq40xx: convert Engenius EAP1300 to DSA

This commit converts the EAP1300 to DSA setup.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
34 hours agoipq40xx: Enable NVMEM_U_BOOT_ENV config
Corey Minyard [Thu, 2 May 2024 19:11:04 +0000 (14:11 -0500)]
ipq40xx: Enable NVMEM_U_BOOT_ENV config

It's needed to get the MAC addresses for the Engenius EAP1300.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
34 hours agoipq4019: fix even more wrong reference to USB node
Christian Marangi [Sun, 5 May 2024 17:42:52 +0000 (19:42 +0200)]
ipq4019: fix even more wrong reference to USB node

Commit 6136ebabc5cb ("ipq40xx: 6.6: fix DTS to use reference for usb
node") fixed only some of the reference to USB node but many others were
still using the old broken usb3/usb2. Fix every reference to those node
and move them on using the tag name.

Fixes: 6136ebabc5cb ("ipq40xx: 6.6: fix DTS to use reference for usb node")
Link: https://github.com/openwrt/openwrt/pull/15392
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
35 hours agomediatek: fix broken PCIe caused by update to 6.6.30
Rany Hany [Sun, 5 May 2024 22:39:58 +0000 (01:39 +0300)]
mediatek: fix broken PCIe caused by update to 6.6.30

The patch "710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch"
makes use of "syscon_regmap_lookup_by_phandle" which requires that
"syscon" be in the compatible list.

Without this patch, PCIe probe will fail with the following error:

[    1.287467] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[    1.294019] mtk-pcie 1a143000.pcie: Parsing ranges property...
[    1.299901] mtk-pcie 1a143000.pcie:      MEM 0x0020000000..0x0027ffffff -> 0x0020000000
[    1.307954] mtk-pcie 1a143000.pcie: missing hifsys node
[    1.313185] mtk-pcie: probe of 1a143000.pcie failed with error -22

Fixes: 4c6e9a9943 ("kernel: bump 6.6 to 6.6.30")
Signed-off-by: Rany Hany <rany_hany@riseup.net>
37 hours agouboot-envtools: filogic: add support for BananaPi R4 PoE
Martin Schiller [Thu, 2 May 2024 07:00:58 +0000 (09:00 +0200)]
uboot-envtools: filogic: add support for BananaPi R4 PoE

This adds support for the bpi-r4 variant with internal 2.5G PHY and
additional ethernet port instead of second sfp.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
37 hours agouboot-mediatek: bpi-r4: add support for 2.5GE PoE variant
Martin Schiller [Tue, 30 Apr 2024 12:55:28 +0000 (14:55 +0200)]
uboot-mediatek: bpi-r4: add support for 2.5GE PoE variant

This adds support for the bpi-r4 variant with internal 2.5G PHY and
additional ethernet port instead of second sfp.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
37 hours agomediatek: bpi-r4: add support for 2.5GE PoE variant
Martin Schiller [Tue, 30 Apr 2024 08:50:51 +0000 (10:50 +0200)]
mediatek: bpi-r4: add support for 2.5GE PoE variant

This adds support for the bpi-r4 variant with internal 2.5G PHY and
additional ethernet port instead of second sfp.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
37 hours agomediatek: bpi-r4: dts: move common parts to dtsi file
Martin Schiller [Tue, 30 Apr 2024 08:16:21 +0000 (10:16 +0200)]
mediatek: bpi-r4: dts: move common parts to dtsi file

Move the common parts of the mt7988a-bananapi-bpi-r4.dts to a dtsi file.
This is done to prepare support for the 2.5G Ethernet Variant.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2 days agolibxml2: update to 2.12.6
Pascal Ernster [Wed, 1 May 2024 19:04:18 +0000 (21:04 +0200)]
libxml2: update to 2.12.6

Release Notes:
https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.6

Changelog (taken from the release notes):
- Regressions
  - parser: Fix detection of duplicate attributes in XML namespace
  - xmlreader: Fix xmlTextReaderConstEncoding
  - html: Fix htmlCreatePushParserCtxt with encoding
  - xmllint: Return error code if XPath returns empty nodeset

Compile-tested: x86_x64, Q35 VM, OpenWRT SNAPSHOT r26135-a8bfdf2ed4d9
Run-tested: x86_x64, Q35 VM, OpenWRT SNAPSHOT r26135-a8bfdf2ed4d9
Signed-off-by: Pascal Ernster <git@hardfalcon.net>
2 days agox86: generic: config-6.6: add/remove default syms
John Audia [Thu, 2 May 2024 20:05:41 +0000 (16:05 -0400)]
x86: generic: config-6.6: add/remove default syms

Add new default and remove deprecated symbol introduced by 6.6.30[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.30&id2=v6.6.29

Signed-off-by: John Audia <therealgraysky@proton.me>
2 days agokernel: bump 6.6 to 6.6.30
John Audia [Thu, 2 May 2024 19:40:57 +0000 (15:40 -0400)]
kernel: bump 6.6 to 6.6.30

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.30

Removed upstreamed:
ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch[1]

Manually rebased:
generic/pending-6.6/760-net-core-add-optional-threading-for-backlog-processi.patch
mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.30&id=87fc30db0a2bb300de289dae7c5579cc27a3cbbd

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000

Signed-off-by: John Audia <therealgraysky@proton.me>
2 days agokernel: fix corrupted ethernet header on bridge multicast-to-unicast
Felix Fietkau [Sun, 5 May 2024 18:48:23 +0000 (20:48 +0200)]
kernel: fix corrupted ethernet header on bridge multicast-to-unicast

Fixes: 45a8e962a591 ("kernel: fix crash with multicast-to-unicast and fraglist GRO")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 days agotools: pkgconf: provide prefix for host and hostpkg stagind directory
Christian Marangi [Thu, 11 Apr 2024 15:02:45 +0000 (17:02 +0200)]
tools: pkgconf: provide prefix for host and hostpkg stagind directory

Some package might require to fix their pkg-config file to point to host
or hostpkg file. This is the case for glib2 library that provides with
pkg-config variables, tools to generates files from xml. Those tools
should use the host binary instead of the targets one to correctly build
packages that makes use of such tools.

Link: https://github.com/openwrt/openwrt/pull/15134
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 days agoath79: refresh patches
Robert Marko [Sun, 5 May 2024 08:38:37 +0000 (10:38 +0200)]
ath79: refresh patches

CI is telling us that we need to refresh the patches, so lets do so.

Link: https://github.com/openwrt/openwrt/pull/15382
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 days agoipq40xx: merge DTS for Linksys WHW03 V1 and V2
Rodrigo Balerdi [Fri, 3 May 2024 05:34:53 +0000 (02:34 -0300)]
ipq40xx: merge DTS for Linksys WHW03 V1 and V2

No changes other than the merging itself are intended in this commit.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15345
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 days agoipq40xx: clean up Linksys WHW03 V2 DTS
Rodrigo Balerdi [Tue, 30 Apr 2024 23:47:10 +0000 (20:47 -0300)]
ipq40xx: clean up Linksys WHW03 V2 DTS

Apply stylistic changes to facilitate DTS merging with WHW03 V1.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15345
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 days agoipq40xx: add support for Linksys WHW03 V1
Rodrigo Balerdi [Thu, 11 Apr 2024 15:14:19 +0000 (12:14 -0300)]
ipq40xx: add support for Linksys WHW03 V1

Hardware:
=========
SOC:             Qualcomm IPQ4019
WiFi 1:          QCA4019 IEEE 802.11b/g/n
WiFi 2:          QCA4019 IEEE 802.11a/n/ac
WiFi 3:          QCA9886 IEEE 802.11a/n/ac
Bluetooth:       Qualcomm CSR8510 (A10)
Zigbee:          Silicon Labs EM3581 NCP + Skyworks SE2432L
Ethernet:        Qualcomm Atheros QCA8072 (2-port)
Flash:           Samsung KLM4G1FEPD (4GB eMMC)
RAM (NAND):      512MB
LED Controller:  NXP PCA9633 (I2C)
Buttons:         Single reset button (GPIO).

Ethernet:
=========
The device has 2 ethernet ports, configured as follows by default:
- left port: WAN
- right port: LAN

Wifi:
=====
The Wifi radios are turned off by default. To configure the router,
you will need to connect your computer to the LAN port of the device.

Bluetooth and Zigbee:
=====================
Configuration included but not tested.

Storage:
========
For compatibility with stock firmware, all of OpenWrt runs in a 136 MiB
eMMC partition (of which there are two copies, see below). You can also
use partition /dev/mmcblk0p19 "syscfg" (3.4 GiB) any way you see fit.
During very limited tests, stock firmware did not mount this partition.
However, backing up its stock content before use is recommended anyway.

Firmware:
=========
The device uses a dual firmware mechanism: it automatically reverts to
the previous firmware after 3 failed boot attempts.

You can switch to the inactive firmware copy by changing the "boot_part"
U-Boot environment variable. You can also do it by turning on the device
for a couple of seconds and then back off, 3 times in a row.

Installation:
=============
OpenWrt's "factory" image can be installed via the stock web UI:
1. Login to the UI. (The default password is printed on the label.)
2. Enter support mode by clicking on the "CA" link at the bottom.
3. Click "Connectivity", "Choose file", "Start", and ignore warnings.

This port is based on work done by flipy (https://github.com/flipy).

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15345
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 days agorockchip: add Bananapi-R2 Pro board support
Antonio Flores [Thu, 11 Apr 2024 16:35:00 +0000 (12:35 -0400)]
rockchip: add Bananapi-R2 Pro board support

Hardware spec:

- Rockchip RK3568 Quad-core ARM Cortex-A55 CPU 2GHz
- GPU Mali-G52 1-Core-2EE OpenGL ES3.2 Vu1kn 1.1 OpenCL 2.0
- Memory2G DDR3 SDRAM (option 4G)
- Storage Onboard 16GB eMMC Flash, Micro SD-Card slot, SATA 3.0 Port,SPI flash
- Network 5 x 10/100/1000 Mbit/s Ethernet MT7531
- Display 1 HDMI port, 2 DSI interface(1 DSI can change to LVDS by software)
- Camera 1 CSI camera interface
- Audio Output HDMI & I2S & Speaker & Headphone
- USB port USB 3.0 PORT (x2), micro USB OTG (x1)
- PCIE 1 mini pcie interface & 1 M.2 key-e interface
- Remote IR Receiver (x1)
- GPIO 40 Pin Header : GPIO (x28) and Power (+5V, +3.3V and GND).
- Switches Reset button, Power button, U-boot button
- LED Power Status
- Power Source 12 volt 2A via DC Power

Installation:

Uncompress the OpenWrt sysupgrade and write image to the SD card using dd (dd if=*.img of=/*)
Boot from the SD card
1-hold down the MaskRom button
2-Connect DC power
3-Wait 5 seconds, release the button.

eMMC Installation:

1-Uncompress the OpenWrt sysupgrade image
2-fash to eMMC
dd if=openwrt-rockchip-armv8-sinovoip_bpi-r2-pro-squashfs-sysupgrade.img of=/dev/mmcblk1
sync
3-remove SD card
reboot

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2 days agokernel: add kmod-ata-ahci-dwc
Antonio Flores [Thu, 11 Apr 2024 18:43:06 +0000 (14:43 -0400)]
kernel: add kmod-ata-ahci-dwc

Add kmod-ata-ahci-dwc for the rockchip target.

https://github.com/torvalds/linux/commit/33629d35090f5ce2b1b4ce78aa39954c603536d5

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2 days agorockchip: enable MT7531 and RTC drivers
Antonio Flores [Thu, 11 Apr 2024 18:51:37 +0000 (14:51 -0400)]
rockchip: enable MT7531 and RTC drivers

This patch enable MT7531 switch and RTC drivers for BPI-R2 Pro.

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2 days agouboot-rockchip: add Bananapi-R2 Pro support
Antonio Flores [Thu, 11 Apr 2024 15:10:40 +0000 (11:10 -0400)]
uboot-rockchip: add Bananapi-R2 Pro support

add uboot support for Bananapi-R2 Pro

Signed-off-by: Antonio Flores <antflores627@gmail.com>
3 days agotoolchain: glibc: Update glibc 2.38 to recent HEAD
Hauke Mehrtens [Sun, 28 Apr 2024 20:05:23 +0000 (22:05 +0200)]
toolchain: glibc: Update glibc 2.38 to recent HEAD

23514c72b7 syslog: Fix heap buffer overflow in __vsyslog_internal (CVE-2023-6246)
d0338312aa syslog: Fix heap buffer overflow in __vsyslog_internal (CVE-2023-6779)
d37c2b20a4 syslog: Fix integer overflow in __vsyslog_internal (CVE-2023-6780)
30e546d76e x86_64: Optimize ffsll function code size.
18876c9ff5 S390: Fix building with --disable-mutli-arch [BZ #31196]
6f68075869 sparc: Fix broken memset for sparc32 [BZ #31068]
0e383d2d4e sparc64: Remove unwind information from signal return stubs [BZ#31244]
aac57faf54 sparc: Fix sparc64 memmove length comparison (BZ 31266)
0c5e5bace5 sparc: Remove unwind information from signal return stubs [BZ #31244]
b09073e631 arm: Remove wrong ldr from _dl_start_user (BZ 31339)
506e47da1d malloc: Use __get_nprocs on arena_get2 (BZ 30945)
ee4806e978 S390: Do not clobber r7 in clone [BZ #31402]
5753cda1ca linux: Use rseq area unconditionally in sched_getcpu (bug 31479)
0518bb0c16 LoongArch: Correct {__ieee754, _}_scalb -> {__ieee754, _}_scalbf
5456ff5d80 Add HWCAP2_MOPS from Linux 6.5 to AArch64 bits/hwcap.h
d8a2b56b4f AArch64: Add support for MOPS memcpy/memmove/memset
25b66e8c4a AArch64: Cleanup ifuncs
1521237c32 AArch64: Cleanup emag memset
156e44845f AArch64: Add memset_zva64
a08ff92294 AArch64: Remove Falkor memcpy
168ae58e6e aarch64: correct CFI in rawmemchr (bug 31113)
1bf17ce978 aarch64: fix check for SVE support in assembler
92da7c2cfe AArch64: Check kernel version for SVE ifuncs
20534f8176 powerpc: Fix ld.so address determination for PCREL mode (bug 31640)
e1135387de iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961)
61484011e7 sparc: Remove 64 bit check on sparc32 wordsize (BZ 27574)
78d9f91da6 login: Check default sizes of structs utmp, utmpx, lastlog
68bff88592 login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701)
decc9f504a nptl: Fix tst-cancel30 on kernels without ppoll_time64 support
29e20bd122 i386: ulp update for SSE2 --disable-multi-arch configurations
5968aebb86 CVE-2024-33599: nscd: Stack-based buffer overflow in netgroup cache (bug 31677)
541ea5172a CVE-2024-33600: nscd: Do not send missing not-found response in addgetnetgrentX (bug 31678)
2ae9446c1b CVE-2024-33600: nscd: Avoid null pointer crashes after notfound response (bug 31678)
71af8ca864 CVE-2024-33601, CVE-2024-33602: nscd: netgroup: Use two buffers in addgetnetgrentX (bug 31680)
e9f05fa1c6 elf: Also compile dl-misc.os with $(rtld-early-cflags)

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 days agorockchip: add driver for hardware RNG
Daniel Golle [Sat, 4 May 2024 02:01:39 +0000 (03:01 +0100)]
rockchip: add driver for hardware RNG

Rockchip SoCs used to have a random number generator as part of their
crypto device, and support for it has to be added to the corresponding
driver.

Newer Rockchip SoCs like the RK3568 have an independent True Random
Number Generator device. Import pending patchset which adds a driver for
it, include it in Kconfig and enable it in the device tree.

Doing so significantly reduces the time needed to boot devices based on
those SoCs, from about 27 seconds until Ethernet is up and running to
less than 13 seconds with a minimal snapshot image.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 days agolibunwind: add support for loongarch64
Weijie Gao [Thu, 14 Mar 2024 16:44:06 +0000 (00:44 +0800)]
libunwind: add support for loongarch64

Modify package depends to allow building for loongarch64.
Also fix for building with musl.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
3 days agoopenssl: add linux64-loongarch64 into the targets list
Weijie Gao [Tue, 9 Jan 2024 07:54:50 +0000 (15:54 +0800)]
openssl: add linux64-loongarch64 into the targets list

Add "linux64-loongarch64-openwrt" into openssl configurations to enable
building on loongarch64 machines.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
3 days agogrub2: add EFI support for loongarch64
Weijie Gao [Sat, 6 Jan 2024 19:37:34 +0000 (03:37 +0800)]
grub2: add EFI support for loongarch64

Add a new package for loongarch64 which only supports EFI.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
3 days agokernel: modules: video: adapt for loongarch64
Weijie Gao [Sat, 6 Jan 2024 19:27:57 +0000 (03:27 +0800)]
kernel: modules: video: adapt for loongarch64

* Allow kmod-acpi-video to be built for loongarch64:
The x86-specific CONFIG_ACPI_WMI will be split from default
kmod-acpi-video as a board-specific addition.

* Allow kmod-drm-amdgpu to be built for loongarch64:
Also add loongarch64-specific configs and modules.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
3 days agokernel: modules: netdevices: add depedency required for loongarch64
Weijie Gao [Sat, 6 Jan 2024 19:26:00 +0000 (03:26 +0800)]
kernel: modules: netdevices: add depedency required for loongarch64

Add TARGET_loongarch64 as dependency for kmod-mdio-devres,
kmod-mdio-gpio and kmod-switch-rtl8366-smi

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
3 days agotoolchain: Disable libtsan and liblsan sanitizer on loongarch64
Weijie Gao [Sun, 7 Jan 2024 04:50:51 +0000 (12:50 +0800)]
toolchain: Disable libtsan and liblsan sanitizer on loongarch64

libtsan and liblsan are not supported by glibc on loongarch64

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
3 days agoloongarch64: new target
Weijie Gao [Sat, 6 Jan 2024 19:10:45 +0000 (03:10 +0800)]
loongarch64: new target

Add target for Loongson LoongArch64-based boards.

LoongArch is a new RISC ISA developed by Loongson. It's a bit like
MIPS or RISC-V. LoongArch includes both 32-bit and 64-bit versions
(LoongArch32/LoongArch64).

Loongson 3A5000 and 3A6000 are the two existing CPUs of LoongArch64
and is used for PC products. It's BIOS supports ACPI and UEFI-only
boot. These CPUs supports SMP and SMT.

At present only LoongArch64 is supported by linux kernel.

Toolchain requirement:
binutils >= 2.40
gcc >= 13.1

For details, please check the following links:
https://lwn.net/Articles/861951/
https://loongson.github.io/LoongArch-Documentation/README-EN.html

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
3 days agotoolchain/musl: fix loongarch64 ldso file name
Weijie Gao [Wed, 17 Apr 2024 16:08:24 +0000 (00:08 +0800)]
toolchain/musl: fix loongarch64 ldso file name

GCC has changed musl dynamic linker name from
ld-musl-loongarch-lp64d.so.1 to ld-musl-loongarch64.so.1 recently [1].

This means there are two dynamic linker names will be used across different
ersions of GCC. But musl 1.2.5 only supports the new name while the GCC
we're currently using uses the old name.

To maintain compatibility with all versions of GCC, the musl is then patched
to generate two symbolic links to libc.so with both old and new names.

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=8bccee51f0deac64b79cd9ad75df599422f4c8ff

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
3 days agotoolchain/gcc: fix loongarch64 ldso file name
Weijie Gao [Thu, 18 Apr 2024 10:58:18 +0000 (18:58 +0800)]
toolchain/gcc: fix loongarch64 ldso file name

GCC has changed musl dynamic linker name from
ld-musl-loongarch-lp64d.so.1 to ld-musl-loongarch64.so.1 recently [1].

Meanwhile musl 1.2.5 only supports the new name. So it's better to follow
the new name.

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=8bccee51f0deac64b79cd9ad75df599422f4c8ff

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
3 days agoRevert "mediatek: backport mt7622 dts fix for mt7531 switch id to 6.1"
Daniel Golle [Fri, 3 May 2024 23:14:48 +0000 (00:14 +0100)]
Revert "mediatek: backport mt7622 dts fix for mt7531 switch id to 6.1"

This reverts commit 3fe239fcf8d0ea91b947af25fd28a6133aba93c6.
Now that we switched to Linux 6.6 this is no longer needed, and resulted
in a left-over file because it's removal was not included in the commit
removing all the other files intended for Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 days agosunxi: add support for Lichee Pi Zero Dock (V3s) board
Zoltan HERPAI [Fri, 27 Oct 2023 16:23:57 +0000 (18:23 +0200)]
sunxi: add support for Lichee Pi Zero Dock (V3s) board

CPU:     Allwinner V3s single-core Cortex-A7 @ 1.2GHz
Memory:  64Mb DDR2 integrated into SoC package
Storage: 1x SDcard on board, 1x SDcard on dock
Network: 10/100M ethernet
Other:   4x buttons via LRADC, CSI

Flashing instructions:
  Standard sunxi SD card installation procedure - copy image to SD card,
  insert into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 days agoramips: remove unnecessary macros for previous kernel versions
Mieczyslaw Nalewaj [Fri, 3 May 2024 17:35:11 +0000 (19:35 +0200)]
ramips: remove unnecessary macros for previous kernel versions

Remove unnecessary 'if' macros for previous kernel versions.
After removing kernel 6.1 the kernel is always >= 6.6 so the conditions
are unnecessary.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
[removed some more and also no longer include version.h]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 days agoramips: switch to Linux 6.6
Daniel Golle [Fri, 3 May 2024 01:25:09 +0000 (02:25 +0100)]
ramips: switch to Linux 6.6

Switch to Linux kernel version 6.6 and drop configs, files and patches
for Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 days agomediatek: remove macros for previous kernel versions
Daniel Golle [Fri, 3 May 2024 20:33:41 +0000 (21:33 +0100)]
mediatek: remove macros for previous kernel versions

Remove unnecessary 'if' macros for previous kernel versions.
After removing kernel 6.1 the kernel is always >= 6.6 so the conditions
are unnecessary.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 days agomediatek: switch to Linux 6.6
Daniel Golle [Fri, 3 May 2024 01:24:12 +0000 (02:24 +0100)]
mediatek: switch to Linux 6.6

Switch to Linux kernel version 6.6 and drop configs, files and patches
for Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 days agogeneric: 6.6: fix and simplify blkdevparts= cmdline parsing
Daniel Golle [Fri, 3 May 2024 20:27:37 +0000 (21:27 +0100)]
generic: 6.6: fix and simplify blkdevparts= cmdline parsing

Import pending patch to fix the cmdline parsing of the "blkdevparts="
parameter which has been broken somewhen between Linux 6.1 and Linux 6.6.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 days agokernel: add missing check for TCP GRO
Felix Fietkau [Fri, 3 May 2024 16:44:57 +0000 (18:44 +0200)]
kernel: add missing check for TCP GRO

Need to check if the skb data buffer is linear up to (and including) the TCP
header.

Fixes: https://github.com/openwrt/openwrt/issues/15359
Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 days agokernel: backport upstream GRO fixes
Felix Fietkau [Fri, 3 May 2024 16:19:56 +0000 (18:19 +0200)]
kernel: backport upstream GRO fixes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 days agomediatek: backport mt7622 dts fix for mt7531 switch id to 6.1
Felix Fietkau [Fri, 3 May 2024 16:19:20 +0000 (18:19 +0200)]
mediatek: backport mt7622 dts fix for mt7531 switch id to 6.1

Fixes: ac8bfe316b81 ("generic: 6.1, 6.6: mt7530: import accepted patches")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 days agobpf: fix broken inclusion of system include
Christian Marangi [Fri, 3 May 2024 12:49:58 +0000 (14:49 +0200)]
bpf: fix broken inclusion of system include

Commit d82c5884c616 ("treewide: make use of new toolchain define")
changed $(TOOLCHAIN_DIR)/include to the new variable
$(TOOLCHAIN_INC_DIRS) that now can contain multiple entry.

Because of this only the first include in $(TOOLCHAIN_INC_DIRS) was
actually included with -isystem, making the other producing warning with
ignored inputs.

Fix this by parsing each entry in $(TOOLCHAIN_INC_DIRS) and adding the
-isystem prefix to correctly include them in the BPF_KERNEL_INCLUDE.

Fixes: d82c5884c616 ("treewide: make use of new toolchain define")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agoxdp-tools: fix wrong matching for OPENWRT_VERBOSE
Christian Marangi [Fri, 3 May 2024 12:46:33 +0000 (14:46 +0200)]
xdp-tools: fix wrong matching for OPENWRT_VERBOSE

To enable verbose log for xdp-tools compilation, we check for "c" in
the OPENWRT_VERBOSE, but verbose.mk supports only "w" and "s" for V=1
and V=99.

Fix the wrong matching and correctly enable verbose output matching for
"s".

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agoxdp-tools: refresh patches
Christian Marangi [Fri, 3 May 2024 12:32:36 +0000 (14:32 +0200)]
xdp-tools: refresh patches

Refresh xdp-tools patches with make package/xdp-tools/refresh

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 days agosunxi: drop 6.1 support
Zoltan HERPAI [Fri, 3 May 2024 08:24:29 +0000 (10:24 +0200)]
sunxi: drop 6.1 support

Now that 6.6 is the default, remove the 6.1 config and the hack that
was required for the arm32 DTS dir change.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 days agosunxi: switch default to 6.6
Zoltan HERPAI [Fri, 3 May 2024 08:23:09 +0000 (10:23 +0200)]
sunxi: switch default to 6.6

Switch the default kernel to 6.6.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
4 days agoopensbi: bump to 1.4
Zoltan HERPAI [Mon, 29 Apr 2024 13:09:01 +0000 (13:09 +0000)]
opensbi: bump to 1.4

Upgrade the OpenSBI firmware used by RISC-V CPUs to 1.4.

Runtime-tested:
 - d1 (Lichee RV)
 - sifiveu (SiFive Unleashed)

Updates since last release:

1.4:
Synopsys DesignWare APB GPIO driver
Zicntr and Zihpm support
Console print improvements
Smepmp support
Simple FDT based syscon regmap driver
Syscon based reboot and poweroff driver
Non-contiguous hpm counters
Smcntrpmf support
Full sparse hartid support
IPI improvements
RFENCE improvements
Zkr support
Andes custom PMU support

1.3.1:
ACLINT driver fix for disabled CPUs
SBI PMU fix for out-of-bound access
Designware GPIO driver

1.3:
Allow platform to influence cold boot HART selection
Starfive JH7110 platform support
Split RX and RW firmware regions
Advertise non-retentive suspend for allwinner D1 platform
Byteorder/endianness conversion macros
SBI debug console extension (Experimental)
Configure the PMA regions for RZ/Five platform
SBI system suspend extension (Experimental)
SBI PMU platform firmware events (Experimental)
SBI CPPC extension (Experimental)
Optimized remote TLB flushes
Simple heap for boot time memory allocations
Bring back no-map DT property for reserved memory nodes

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
5 days agoipq40xx: fritzrepeater-1200: fix MDIO and PHY probing
Robert Marko [Thu, 2 May 2024 09:37:34 +0000 (11:37 +0200)]
ipq40xx: fritzrepeater-1200: fix MDIO and PHY probing

AVM FRITZ!Repeater 1200 does not use QCA807x PHY at all and thus it
disables all of the individual PHY nodes, however this is not enough
anymore since the conversion to PHY package.

Now its now enough to disable the PHY-s in the package alone, but the PHY
package node itself must also be disabled.

Fixes: 1b931c33a28e ("ipq40xx: adapt to new Upstream QCA807x PHY driver")
Fixes: #15355
Link: https://github.com/openwrt/openwrt/pull/15365
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agomediatek: increase size of the sdcard image to 512 MiB
Daniel Golle [Tue, 30 Apr 2024 21:21:16 +0000 (22:21 +0100)]
mediatek: increase size of the sdcard image to 512 MiB

Increasing the size of the rootfs_data filesystem has become a ever
repeating discussion and seems to be the most important thing for
users of the MediaTek-based BananaPi boards.

Using the whole remaining size of a microSD or the eMMC for rootfs_data
doesn't make sense for many reasons, but neither does the current
default of 104 MiB for the 'rootfs' partition size.

Increase the 'rootfs' partition size to 448 MiB which will result in
the sdcard image being exactly 512 MiB. Finding a microSD card smaller
than 512 MiB and still working could anyway be difficult in 2024.

That will allow users to install even bloatware written in Go or other
space-hungry languages while still leaving most of the space unallocated
for additional partitions or volumes to be used for persistent user
data.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 days agobmips: Build U-Boot into the XG6846 target
Linus Walleij [Sat, 5 Aug 2023 07:02:20 +0000 (09:02 +0200)]
bmips: Build U-Boot into the XG6846 target

It appears that the CFE boot loader found in the XG6846
cannot load kernels over a certain size, and the old
relocate hack is not working.

What to do? We can build a small U-Boot into the image,
make CFE boot that, place the kernel immediately after
U-Boot, and use U-Boot to boot the system instead.

The compiled u-boot.bin becomes around ~300KB and with
LZMA compression it will swiftly fit into 128KB, so
we use two 64KB erase blocks right after the CFE to
store an imagetag:ed U-Boot.

Reviewed-by: Paul Donald <newtwen+github@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 days agouboot-bmips: Add U-Boot for the BMIPS target
Linus Walleij [Fri, 19 Jan 2024 20:45:15 +0000 (21:45 +0100)]
uboot-bmips: Add U-Boot for the BMIPS target

This is needed to boot the BCM6238-based Inteno XG6846.
Currently this is restricted to the XG6846 board.

Reviewed-by: Paul Donald <newtwen+github@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 days agobmips: Add Inteno XG6846 target
Linus Walleij [Fri, 30 Jun 2023 20:22:17 +0000 (22:22 +0200)]
bmips: Add Inteno XG6846 target

This adds a device tree and build options for the XG6846
switch/router to the BMIPS target.

Hardware:
 - SoC: Broadcom BCM6328
 - CPU: BMIPS4350 V7.5
 - RAM: 64 MB DDR
 - NOR Flash: 16 MB parallel (CFE and OS)
 - Ethernet LAN: 4x 1Gbit
 - Ethernet WAN: 2x 1Gbit, fiber and TP
 - Buttons: reset
 - LEDs: 7 or 8, power and USB LEDs are GPIO-based, the
   LAN LEDs are controlled by the Marvell DSA Switch.
 - USB: on some versions
 - UART: yes

The device ODM (original device manufacturer) is XAVi
http://www.xavi.com.tw/

It is possible to boot the initramfs version
openwrt-bmips-bcm6328-inteno_xg6846-initramfs.elf from
CFE by interrupting the boot on the UART console and downloading
it from a TFTP server e.g.:
CFE> r 192.168.1.2:openwrt-bmips-bcm6328-inteno_xg6846-initramfs.elf

Installation to target flash is not possible using CFE because
the image becomes too big for the CFE version found in these
devices. A separate U-Boot two-stage solution exists for
actually booting the device.

This device is called a "managed ethernet switch" by the vendor
and "media converter" or "fiber modem" by some of the ISPs
using it: the main purpose is to convert fiber connections to
ethernet, most devices just act as switches bridging the
fiber SFP to ethernet TP.

The device has a Marvell MV88E6352 DSA switch managed by
a BCM6328 BMIPS SoC.

This port makes it possible to use the XG6846 to grab an IP
number from the fiber connection and use all four LAN
connections out, turning it into a proper router.

This support is based mostly on the observations by the people on
the forum thread "Help with Inteno XG6846" where users NPeca75,
mrhaav, systemcrash and csom helped out to reverse engineer the
device. Then I made it work on the BMIPS target, figured out
the two-level switch hierarchy and settings.

Link: https://forum.openwrt.org/t/help-with-inteno-xg6846/68276/14
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 days agobmips: bcm6328: Compile in uImage splitter
Linus Walleij [Sun, 17 Sep 2023 20:16:30 +0000 (22:16 +0200)]
bmips: bcm6328: Compile in uImage splitter

Since we split the Inteno XG6846 "firmware" partition with the
uImage MTD splitter, we need to compile in support for this
splitting method into the BCM6328.

Reviewed-by: Paul Donald <newtwen+github@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 days agobcm27xx: correct cmdline.txt consoles for procd
Elbert Mai [Mon, 29 Apr 2024 21:05:27 +0000 (14:05 -0700)]
bcm27xx: correct cmdline.txt consoles for procd

Commit [ca8c30208d5e][1] updates procd to handle muliple "console=" on the
kernel command line. This affects Raspberry Pi builds because cmdline.txt
specifies a UART console and a virtual console on HDMI, in that order.

When procd finds multiple consoles on the command line, it attempts to
open /dev/console. Linux uses the [last console][2] for /dev/console, so
procd opens the virtual console on Raspberry Pi. This completely disables
the UART console and causes [strange behavior][3] on the virtual console.
Prior to ca8c30208d5e, procd would always open the first console, which is
the UART console.

The simplest fix without reverting ca8c30208d5e is to swap the order of
console options in cmdline.txt. By putting the UART console last, procd
handles the serial console correctly as before.

[1]: https://git.openwrt.org/?p=project/procd.git;a=commit;h=ca8c30208d5e1aaa2c0e3f732c4c9944735e9850
[2]: https://www.kernel.org/doc/html/latest/admin-guide/serial-console.html
[3]: https://forum.openwrt.org/t/rasberry-pi-4-model-b-keyboards-gone-wild/195594

Signed-off-by: Elbert Mai <code@elbertmai.com>
6 days agoxdp-tools: fix compilation wrongly using host header
Christian Marangi [Wed, 18 Jan 2023 19:50:58 +0000 (20:50 +0100)]
xdp-tools: fix compilation wrongly using host header

Currently it's needed to have gcc-multilib on the host to correctly
compile xdp-tools. This is wrong and means that we are using host header
to compile a tool.

By some searching in how the makefile works it was discovered that
BPF_CFLAGS were not used and required to be appended to config.mk

Only one single header was added but we should include each BPF_CFLAGS
from bpf.mk. To make this some patching to bpf-header were required and
some patches to xdp-tools were required.
Also it's needed to pass the correct target to BPF_CFLAGS.

With the following changes xdp-tools can correctly compile with each
header from bpf-headers and should not use any host header.

Co-Developed-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/11825
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 days agobpf-headers: fix use of netlink.h header
Christian Marangi [Wed, 18 Jan 2023 19:44:56 +0000 (20:44 +0100)]
bpf-headers: fix use of netlink.h header

netlink.h header have NL_SET_ERR_MSG_MOD that is tied to kmods. We don't
need kmods on bpf tools and this cause compilation error if the header
is included. Fix it by dropping NL_SET_ERR_MSG_MOD.

Link: https://github.com/openwrt/openwrt/pull/11825
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 days agoucode: fix ubus defer when running from within eloop (integrated with uloop)
Felix Fietkau [Wed, 1 May 2024 17:00:10 +0000 (19:00 +0200)]
ucode: fix ubus defer when running from within eloop (integrated with uloop)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 days agohostapd: fix a null pointer dereference in wpa_supplicant on teardown
Felix Fietkau [Wed, 1 May 2024 16:57:00 +0000 (18:57 +0200)]
hostapd: fix a null pointer dereference in wpa_supplicant on teardown

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 days agogengetopt: backport patch fixing support for c++17
Christian Marangi [Wed, 1 May 2024 13:42:57 +0000 (15:42 +0200)]
gengetopt: backport patch fixing support for c++17

Backport patch fixing support for c++17 that got merged upstream in
gengetopt.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 days agoramips: mt7621-dts: describe switch PHYs and adjust PHY muxing
Arınç ÜNAL [Sun, 28 Apr 2024 19:52:51 +0000 (22:52 +0300)]
ramips: mt7621-dts: describe switch PHYs and adjust PHY muxing

Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
bus the switch listens on. The PHY muxing feature makes use of this.

This is problematic as the PHY may be attached before the switch is
initialised, in which case, the PHY will fail to be attached.

Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
of switch MDIO bus") on mainline Linux, we can describe the switch PHYs on
the MDIO bus of the switch on the device tree.

When the PHY is described this way, the switch will be initialised first,
then the switch MDIO bus will be registered. Only after these steps, the
PHY will be attached.

Describe the switch PHYs on mt7621.dtsi and remove defining the switch PHY
on the SoC's mdio bus node. When the PHY muxing is in use, the interrupts
for the muxed PHY won't work, therefore delete the "interrupts" property on
the devices where the PHY muxing feature is in use.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
6 days agogeneric: 6.1, 6.6: mt7530: import pending PHY muxing detection patch
Arınç ÜNAL [Wed, 1 May 2024 03:33:51 +0000 (06:33 +0300)]
generic: 6.1, 6.6: mt7530: import pending PHY muxing detection patch

net: dsa: mt7530: detect PHY muxing when PHY is defined on switch MDIO bus

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>