63707 Commits

Author SHA1 Message Date
Felix Fietkau
bfb106e8ae mac80211: backport API change for sta rate control update
Helps stay in sync with mt76 upstream development

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-04-11 10:41:12 +02:00
Felix Fietkau
37c80e61ee cli: extend remove call to allow passing values directly
This simplifies script or API usage of this command to remove values directly
without having to calculate the index

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-04-11 10:41:12 +02:00
Yang Xiwen
c166cb9661 qualcommax: eap623od-hd-v1: fix phy node and LED config
The reason phy fails to probe without explicitly overrided phy id is
that the reset timing fails to match. Fix it with proper `reset-delay-us` and
`reset-post-delay-us`.

While at it, change LED settings to match EAP610-Outdoor.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18450
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-11 10:04:35 +02:00
Sergii Shcherbakov
b8eba75146 ramips: mt76x8: add support for MERCUSYS MB130-4G v1
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Specification:
SoC: MediaTek MT7628AN
RAM: 128 MB, Zentel A3R1GE40JBF-8E
Flash: 16MB, Winbond W25Q128JV
Switch: rt3050-esw, 2 ports 100 Mbps
WiFi: MediaTek mt7628-wmac 2.4GHz 802.11n and MediaTek MT7663 5GHz
  802.11ac (PCIe)
WWAN: Quectel EC200A-EL 4G modem (USB)
GPIO:
  * 1 button (Reset/WPS)
  * 6 LEDs (Power+WPS, LAN, 3xSignal)
  * USB port power controls
  * Modem reset
  * Modem programming switch
  * Internal/external antenna switch for 4G

Serial Interface:
  TP10 - 3.3V can be used for level shifter, if needed
  TP9 - TX
  TP8 - RX
  TP11 - GND
Interface properties: 115200, 8N1

Access to console using serial port for OEM firmware:
Username: admin
Password: 1234

Flashing via TFTP (no disassembling or soldering required):
1. Connect your PC and router to port LAN
2. Configure PC interface using static IP 192.168.1.225, mask
   255.255.255.0
3. Place OpenWRT firmware image (*-squashfs-tftp-recovery.bin) to TFTP
   root folder and renamed it to tp_recovery.bin
4. Unplug power from router
5. Press and hold Reset/WPS button
6. Power up the router
7. Wait until TFTP started uploading image (~10 seconds after power up)
   and release Reset/WPS button
8. Wait until image uploaded, i.e. until LAN LED start lighting
9. Enable DHCP address on PC interface and wait for assigning address
10. Use ssh (root@192.168.1.1) to configure router properties

Depends on patch for firmware-utils package:
https://github.com/openwrt/firmware-utils/commit/2051fe5b

Signed-off-by: Sergii Shcherbakov <shchers@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17819
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-10 23:12:35 +02:00
Álvaro Fernández Rojas
851ea69d8e package: add kmod-r8127 ethernet driver
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
r8127 is an out of tree driver provided by Realtek for RTL8127 devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-04-10 22:39:00 +02:00
Yujie Zhu
db3eff1022 mediatek: filogic: add Netcore N60 Pro support
Hardware specification:
SoC: MediaTek MT7986A 4x A53
Flash: ESMT F50L1G41LB 128MB
RAM: M16U4G16256A DDR4 512MB
Ethernet: 2x 2.5G + 3x 1G
USB: 1x USB 3.0
WiFi1: MT7975N 2.4GHz 4T4R
WiFi2: MT7975PN 5GHz 4T4R
Button: Reset, WPS
Power: DC 12V 2A

Flash instructions:

    Connect to the router using ssh or telnet,
    username: useradmin, password is the web
    login password of the router.
    Use scp to upload bl31-uboot.fip and flash:
    "mtd write xxx-bl31-uboot.fip FIP"
    "mtd erase ubi"
    Connect to the router via the Lan port,
    set a static ip of your PC.
    (ip 192.168.1.254, gateway 192.168.1.1)
    Download initramfs image, reboot router,
    waiting for tftp recovery to complete.
    After openwrt boots up, perform sysupgrade.

Note:

    Back up all mtd partitions before flashing.

Signed-off-by: Yujie Zhu <libriunc@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18138
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-10 22:19:33 +02:00
Christian Marangi
779f730914
qualcommbe: disable CONFIG_QCOM_IPA kernel config
CONFIG_QCOM_IPA kernel cofig was enabled by mistake and conflicts with
mac80211 as it indirectly selects QMI HELPERS. Backports project provid
his own version of QMI HELPERS hence it should not be built-in.

Link: https://github.com/openwrt/openwrt/pull/17788
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-10 15:01:12 +02:00
Christian Marangi
692459dd4e
qualcommbe: ipq95xx: Make RPM partition read-only
Make the RPM partition read-only. This was a mistake and a leftover from
staging branch but I can take this mistake as an excuse to document the
current problem with RPM.

It might happen that a board ship with a broken RPM .mbn, broken not in
the sense that the board doesn't boot or it's a brick but broken in the
sense that it's outdaed and suffer from a bug fixed in new version.

This bug consist in a problem with the regulators between USB and NSS.
The old RPM mess with the NSS regulator (l2) and change the voltage for
it while configuring the USB regulator (l5).
This cause the ethernet subsystem to malfunction with the port not
working.

To workaround this, it's needed to disable RPM handling and CPUFreq.
With these 2 disabled, the old RPM doesn't touch regulators and Ethernet
works correctly.

New RPM correctly handle regulators for USB (l5) and doesn't suffer from
this problem. A solution for this is getting discussed with QCOM hoping
to get some good feedback for it.

Link: https://github.com/openwrt/openwrt/pull/17788
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-10 15:01:12 +02:00
Christian Marangi
9c6180e5f1
qualcommbe: ipq95xx: Add pending patch fixing NSSCC boot stall
Add pending patch fixing NSSCC boot stall. These patch are needed to
prevent the ICC to disable critical clock for NSSCC NOC.

Without these the system will stall and reboot with watchdog.

While at it also remove an extra clock from DTSI as it currently have no
use. Original patch is not modified to keep consistency with series
proposed upstream.

Link: https://github.com/openwrt/openwrt/pull/17788
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-10 15:01:11 +02:00
Christian Marangi
1d88859cd3
qualcommbe: ipq95xx: Drop redundant comment in NSSCC clock patch
Drop redundant comment in NSSCC clock patch. The problem has been
identified hence the comment doesn't apply anymore.

Link: https://github.com/openwrt/openwrt/pull/17788
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-10 15:01:11 +02:00
Christian Marangi
0a9dc5a6f4
qualcommbe: ipq95xx: Define default partition table for RFB SPI-NAND
Define default partition table for SPI-NAND mounted on reference board.
This is where is normally placed the rootfs UBI.

Link: https://github.com/openwrt/openwrt/pull/17788
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-10 15:01:11 +02:00
Christian Marangi
7fb8b48120
qualcommbe: ipq95xx: Refresh dts SPI-NAND patch to v14
Refresh dts SPI-NAND patch to to v14. This is to keep stuff synced with
current pending patch revision and make it easier to replace patch
later (and discover something broke in the meantime)

Link: https://github.com/openwrt/openwrt/pull/17788
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-10 15:01:10 +02:00
Christian Marangi
46fcb0056e
qualcommbe: ipq95xx: Refresh the NSSCC and PORT patch for new PCIe patches
Refresh the NSSCC patch for new PCIe patches. To keep track of fuzz
changes for the IPQ95xx patches, patch are not refreshed currently.

For the specific case of NSSCC patch, quilt gets confused and apply the
patch in the wrong node, putting it in the RPM node (causing all kind of
funny errors at runtime)

Correctly fix the patch to put the node right after the PCIe nodes.

Also the PORT patch need to be refreshed as the gpio header is added by
the PCIe patch.

Link: https://github.com/openwrt/openwrt/pull/17788
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-10 15:01:10 +02:00
Christian Marangi
8d081f48a6
qualcommbe: ipq95xx: Add PCIe upstream patch and related nodes
Add PCIe upstream patch and related nodes to enable PCIe on IPQ95xx.

Minimal change were required to backport the patch and apply on current
kernel. Refresh all affected patch.

Link: https://github.com/openwrt/openwrt/pull/17788
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-10 15:01:10 +02:00
Christian Marangi
e272eb4dbf
qualcommbe: ipq95xx: Add USB3 kmods and drop NSS-DP unneeded package
Add USB3 kmods to the default package list, USB3 correctly works on
IPQ95xx hence it can be enabled.

While at it drop the NSS-DP as it was added by mistake as the ethrnet
platform is handled differently on this SoC with pending upstream
drivers.

Link: https://github.com/openwrt/openwrt/pull/17788
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-10 15:01:09 +02:00
Christian Marangi
c21aaa7ec6
kernel: usb: add qualcommbe to the supported target of dwc3-qcom
Add qualcommbe to the supported target of dwc3-qcom kernel module. USB3
is correctly supported on IPQ95xx and can be enabled.

Link: https://github.com/openwrt/openwrt/pull/17788
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-10 15:01:09 +02:00
Christian Marangi
80244360ae
generic: move QCOM SPI NAND driver to generic backports
QCOM SPI NAND driver got merged upstream hence we can drop the special
patch from qualcommax and qualcommbe target and move them to the generic
backports directory to reduce patch maintenance.

While at it refresh any affected patch and target and also backport other
minor fixup for the SPI NAND driver merged upstream later.

Link: https://github.com/openwrt/openwrt/pull/17788
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-10 15:01:09 +02:00
Mieczyslaw Nalewaj
f7c0331c50 kernel: bump 6.6 to 6.6.86
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.86

Removed upstreamed:
        generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch[1]

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.86&id=2beb999f73b48f3cb04d7cb9c4b5400d59f80f89

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18443
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-04-10 13:42:22 +02:00
Álvaro Fernández Rojas
4618d09587 bcm27xx: pull 6.6 patches from RPi repo
Adds latest 6.6 patches from the Raspberry Pi repository.

These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.6.y/
With the following command:
git format-patch -N v6.6.85..HEAD
(HEAD -> bba53a117a4a5c29da892962332ff1605990e17a)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-04-10 10:36:23 +02:00
Linus Walleij
719f378bfb gemini: Activate serial USB console on the DNS-313
This brings up a serial console on the USB device port of
the DNS-313 by:

- Activating the usbgadget feature
- Selecting the usbgadget-acm package
- Adding an inittab that opens a console at ttyGS0 which is
  the device side of ttyACMn of a connected host

Link: http://patchwork.ozlabs.org/project/openwrt/patch/20250403-dns313-usb-serial-v2-4-d84de8e86931@linaro.org/
Cc: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-04-10 09:38:18 +02:00
Linus Walleij
cb650214ba package: usbgadget: Fix subpackage dependencies
Currently if a target wants to use acm or ncm gadget config,
they need to select both usbgadget and the config package
such as usbgadget-acm.

It's better if the target just select usbgadget-acm and get
all dependencies satisfied.

Adding a dependency using +usbgadget fixes this.

Link: http://patchwork.ozlabs.org/project/openwrt/patch/20250403-dns313-usb-serial-v2-3-d84de8e86931@linaro.org/
Reviewed-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-04-10 09:37:34 +02:00
Linus Walleij
a57bce987a package: usbgadget: Define conffile
The /etc/config/usbgadget file is a conffile, so specify
it as such.

Link: http://patchwork.ozlabs.org/project/openwrt/patch/20250403-dns313-usb-serial-v2-2-d84de8e86931@linaro.org/
Reviewed-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-04-10 09:36:51 +02:00
Linus Walleij
f0de73f912 package: usbgadget: Require kmod-fs-configfs
The usbgadget package tries to mount and use configfs so it
needs to require the kernel module instead of implying it.

There should be a newline at the end of the file as well.

Link: http://patchwork.ozlabs.org/project/openwrt/patch/20250403-dns313-usb-serial-v2-1-d84de8e86931@linaro.org/
Reviewed-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-04-10 09:36:18 +02:00
Linus Walleij
3edb06546b kernel: modules: Fix RTL8366RB title
The title of the RTL8366RB was wrong, probably a pure
copy/paste bug by me.

Link: http://patchwork.ozlabs.org/project/openwrt/patch/20250402-fix-rtl8366rb-title-v1-1-d3ced57a0e9c@linaro.org/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-04-10 09:33:22 +02:00
Shiji Yang
eec11fbbb6 generic: crypto: fix jitterentropy initialization failed issue
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: https://github.com/openwrt/openwrt/issues/16684
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18399
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-09 22:33:48 +02:00
Rosen Penev
4e18d224c8 mac80211: ath9k: simplify probe with devm
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Waiting to run
Upstream backport.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17445
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-09 12:43:30 +02:00
Rosen Penev
8534844847 mac80211: fix led-pin usage
ath9k uses a deprecated GPIO API that assumes a starting base of 0. This
is no longer the case and so must be fixed.

Upstream pending patch.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17445
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-09 12:43:30 +02:00
Rosen Penev
0ac79009dd ath79: fix GPIO numbering with ath9k
ath9k base starts at 512. This is a problem as it uses gpio_request_one
to request the GPIO, which is legacy API.

This upstream pending patch needs to also be ported to mac80211.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17445
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-09 12:43:30 +02:00
Rosen Penev
d70f8dea1e mac80211: ath9k: remove gpio buttons support
This is only used by mach files, which are no longer used in OpenWrt.

Allows removing a custon ath9k_platform.h file.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17445
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-09 12:43:30 +02:00
Rosen Penev
baf73daaac mac80211: ath9k: remove platform leds
These only work with and are useful with mach files. Now that those are
gone, this can go too.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17445
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-09 12:43:30 +02:00
Rosen Penev
e78dc2eae4 mac80211: ath9k: clean up gpiochip
Simplify patch with gpiochip_add_data, struct reduction, new GPIO API,
and header cleanup.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17445
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-09 12:43:30 +02:00
Matthias Schiffer
89f1d56a7e build: bpf: fix LLVM tool paths with host toolchain
Do not assume that the various tools like llc can be found under the
same path as clang; instead, look them up through BPF_PATH (while still
preferring ones found next to clang).

This fixes build in common setups with ccache, where clang resolves to a
path like /usr/lib/ccache/bin/clang, but no other tools can be found at
that location.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Link: https://github.com/openwrt/openwrt/pull/18422
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-09 09:52:21 +02:00
Matthias Schiffer
45f0eb106b build: bpf: drop clang-11 lookup
CLANG_MIN_VER is 12, so there is no point in looking for clang-11.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Link: https://github.com/openwrt/openwrt/pull/18422
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-09 09:52:21 +02:00
Yang Xiwen
5dbf93c8c5 ipq60xx: add support for TP-Link EAP623-Outdoor HD v1
Specifications:
* SoC: Qualcomm IPQ6018 (64-bit Quad-core Arm Cortex-A53 @ 1800MHz)
* Memory: 1 GiB
* Serial Port: 3v3 TTL 115200n8
* Wi-Fi: QCN9074 (4x4 5 GHz 802.11ax)
* Wi-Fi: IPQ6018 (4x4 2.4 GHz 802.11b/g/n/ax)
* Ethernet: RTL8211F (10/100/1GBASE-T)
* Flash: ESMT F59D1G81MB (128 MiB)
* LEDs: 1x Green Status (GPIO 37 Active High), 1x Yellow Status (GPIO 32
  Active High) and an LED global control GPIO (GPIO 36 Active High, set
  up by U-Boot)
* Buttons: 1x Reset (GPIO 9 Active Low)

Installation Instructions (Serial+TFTP):
1. Solder 4 pin header to the pads near T32 and T31.
2. Connect 3V3 TTL port to TX, RX, and GND, which are pad T31, T32 and
   the pad near T31 respectively. Be sure not to connect VCC and
   crossover TX and RX.
3. Copy RAM firmware image
   openwrt-qualcommax-ipq60xx-tplink_eap623od-hd-v1-initramfs-uImage.itb
   to TFTP server root, available at 192.168.0.1.
4. Connect PoE ethernet cable to the RJ45 port and hold Ctrl+B in the
   serial console (115200 baud) until autoboot is halted.
5. Run the following commands in the U-boot prompt:
   # setenv serverip 192.168.0.1
   # setenv ipaddr 192.168.0.99
   # tftpboot 0x44000000 openwrt-qualcommax-ipq60xx-tplink_eap623od-hd-v1-initramfs-uImage.itb
   # bootm
   You may need to type Ctrl+C and Enter before running these commands
   to clear invisible characters from the buffer.
6. Run the following command in a terminal to copy the sysupgrade image
   to be installed (check IP address):
   $ scp openwrt-qualcommax-ipq60xx-tplink_eap623od-hd-v1-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/
7. Activate the OpenWrt serial console and run the following commands:
   # cd /tmp
   # sysupgrade -n openwrt-qualcommax-ipq60xx-tplink_eap623od-hd-v1-squashfs-sysupgrade.bin
8. The AP will reboot and OpenWrt will be successfully installed.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18389
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-09 09:50:31 +02:00
Robert Marko
1cb5297ac3 ipq-wifi: update to Git HEAD (2025-04-08)
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
5aa50e188feb ipq40xx: add BDF for Alibaba AP4220
7d2a86c01a52 ipq6018: add TP-Link EAP623-Outdoor HD v1 BDF
9591c9b7578a Remove executable permissions

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-08 17:40:06 +02:00
Andrew LaMarche
f44984f19c an7581: fix phy2 led1 function
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build Kernel / Build all affected Kernels (push) Has been cancelled
PHY2 led1 is configured to control PHY1's LED. Change it to PHY2.

Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18361
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-07 23:57:15 +02:00
Matthias Schiffer
af93874f4e
ipq40xx: qca8k: hook up IPQ4019 bridge flag offloading
Adds support for setting bridge port learning and isolation flags on
ipq40xx.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Link: https://github.com/openwrt/openwrt/pull/18375
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-07 23:13:25 +02:00
Matthias Schiffer
5d1dedd9f7
generic: qca8k: backport bridge port isolation support
Bridge port isolation offload support has been added to the bridge core
and many DSA drivers. mt7530 support was backported in OpenWrt commit
c4e6a147a6c0 ("generic: 6.6: mt7530: add support for bridge port
isolation").

Backport qca8k support as well.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Link: https://github.com/openwrt/openwrt/pull/18375
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-07 23:13:25 +02:00
Christian Steiner
d9f30b64ad realtek: add support for D-Link DGS-1210-26
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
This patch adds support for D-Link DGS-1210-26 rev. F1

Hardware specification
----------------------

* RTL8382M SoC, 1 MIPS 4KEc core @ 500MHz
* 128MB DRAM
* 32MB NOR Flash (MX25L25635E)
* 24 x 10/100/1000BASE-T ports
* 2 x SFP ports
* Power LED
* Reset button on front panel

Installation using OEM webinterface
-----------------------------------

1. Make sure you are running OEM firmware from secondary slot. If not, switch to image2 using the menus
     System > Firmware Information > Boot from image2
     Tools > reboot
2. Upload image squashfs-factory_image1.bin via Tools > Backup / Upgrade Firmware > image1
3. Toggle startup image via System > Firmware Information > Boot from image1
4. Tools > reboot

Known working firmware version for this procedure: 6.20.007

Installation using TFTP and serial console
------------------------------------------

1. Prepare a TFTP server with the OpenWrt *initramfs-kernel.bin and assign it an IP from 10.90.90.0/24 (except 10.90.90.90)
2. Connect the TFTP server to one of switch's ports
3. Connect to the serial console (115200 baud) and power on the switch
4. Press the ESC key once you see "Hit Esc key to stop autoboot" in the console output
5. Press CTRL+C keys to get into the real U-Boot prompt
6. Init the network with the command "rtk network on"
7. Load the OpenWrt image with the command "tftpboot 0x8f000000 <TFTP_SERVER_IP>:<IMAGE_FILE>"
   (<TFTP_SERVER_IP> is the TFTP server's IP, e.g. 10.90.90.100; <IMAGE_FILE> is the name of the image provided by the TFTP server)
8. Boot the OpenWrt image with the command "bootm"
9. Browse to https://192.168.1.1/cgi-bin/luci/admin/system/flash
10. Upload the the OpenWrt *squashfs-sysupgrade.bin to the switch
11. Wait for it to reboot

Signed-off-by: Christian Steiner <christian.steiner@outlook.de>
Link: https://github.com/openwrt/openwrt/pull/18378
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-04-07 12:22:00 +02:00
Matthias Franck
84e0900867 busybox: use external libtirpc when using glibc
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
In recent glibc versions rpc functionality has been moved to a separate
library instead of glibc itself.
Depend on this library when rpc functionality is needed and glibc is
used.

Signed-off-by: Matthias Franck <matthias.franck@softathome.com>
Link: https://github.com/openwrt/openwrt/pull/17796
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-07 01:00:45 +02:00
Ming Kuang
86eb1c0b5a wifi-scripts: mac80211.sh: add EHT and HE160 support to iw_htmode
For WIFI7 devices (such as mt7925e), the dev width is currently
always "20 MHz (no HT)" in monitor mode.

Add EHT and HE160 support to iw_htmode to fix this issue.
Additionally, the following changes are made:
1. Set iw_htmode to 160MHz for VHT160. The reason for the current
   VHT160 setting is unclear and seems to have been in place for
   over a decade (ibss_htmode [1]). If anyone knows its impact,
   please inform me so I can restore it.
2. Modify MHZ to MHz. The original matching table in the current
   iw tool uses MHz. Although the match is case-insensitive,
   correcting this won't hurt.

[1]: 768d09be87

Signed-off-by: Ming Kuang <ming@imkuang.com>
Link: https://github.com/openwrt/openwrt/pull/18319
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-07 00:53:54 +02:00
INAGAKI Hiroshi
f76185c3f3 ath79: add support for NEC Aterm WG2200HP
NEC Aterm WG2200HP is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based on
QCA9558.

Specification:

- SoC              : Qualcomm Atheros QCA9558
- RAM              : DDR2 128 MiB (2x ESMT M14D5121632A)
- Flash            : SPI-NOR 16 MiB (Macronix MX25L12835FM2I-10G)
- WLAN             : 2.4/5 GHz
  - 2.4 GHz        : 3T3R (Qualcomm Atheros QCA9558 (SoC))
  - 5 GHz          : 4T4R (Qualcomm Atheros QCA9984)
- Ethernet         : 5x 10/100/1000 Mbps
  - switch         : Qualcomm Atheros QCA8337
- LEDs/Keys (GPIO) : 12x/4x
- UART             : through-hole on PCB
  - assignment     : 3.3V, GND, NC, TX, RX from tri-angle marking
  - settings       : 9600n8
- USB              : 1x USB 2.0 Type-A
- Power            : 12 VDC, 1.5 A (Max: 20 W)
- Stock OS         : NetBSD based

Flash instruction using initramfs-factory.bin image:

 1. Connect and open serial console
 2. Power on WG2200HP and interrupt bootloader by ESC key
 3. Login to the bootloader CLI with a password "chiron"
 4. Start TFTP server by "tftpd" command
 5. Upload initramfs-factory.bin via tftp from your computer

    example (Windows): tftp -i 192.168.0.1 PUT initramfs-factory.bin

 6. Boot initramfs image by "boot" command
 7. On the initramfs image, back up the stock bootloader and firmware if
    needed
 8. Upload (or download) uboot.bin and sysupgrade.bin image to the device
 9. Rplace the bootloader with a uboot.bin image

    mtd write <uboot.bin image> bootloader

10. Perform sysupgrade with a sysupgrade.bin image
11. Wait ~120 seconds to complete flashing

Notes:

- All LEDs are connected to the Diodes PI4IOE5V9539LE I2C Expander chip.
  (compatible with NXP PCA9539)

- The stock bootloader requires an unknown filesystem on firmware area
  in the flash. Booting of OpenWrt from that filesystem cannot be
  handled, so the bootloader needs to be replaced to mainline U-Boot
  before OpenWrt installation.

- The data length of blocks in firmware image will be checked
  (4M < threshold < 6M) on the stock WebUI of all versions, and
  initramfs-factory.bin image of OpenWrt has the larger block data for
  initramfs image. So that image cannot be applied to the stock WebUI
  at all.

MAC addresses:

LAN    : 98:F1:99:xx:xx:7C (config, 0x6  (hex))
WAN    : 98:F1:99:xx:xx:7D (config, 0xc  (hex))
2.4 GHz: 98:F1:99:xx:xx:7E (config, 0x0  (hex))
5 GHz  : 98:F1:99:xx:xx:7F (config, 0x12 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17584
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-07 00:42:18 +02:00
INAGAKI Hiroshi
76e0338247 ath79: update dtsi/dts for NEC Aterm devices based on QCA9558
Add more DT labels and move a USB hub node to dts files of Aterm devices
as a preparation for adding support of Aterm WG2200HP.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17584
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-07 00:42:18 +02:00
INAGAKI Hiroshi
367e5c00bd uboot-ath79: build U-Boot/qca9558_nec_aterm for NEC Aterm WG2200HP
Enable building U-Boot/qca9558_nec_aterm profile for NEC Aterm WG2200HP.
This model has almost the same hardware as the other Aterm devices based
on Qualcomm Atheros QCA9558.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17584
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-07 00:42:18 +02:00
Mikhail Zhilkin
d8002cb627 mediatek: add support for netis NX31
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
This PR adds support for netis NX31 router.

Specification
-------------
- SoC       : MediaTek MT7981BA dual-core ARM Cortex-A53 1.3 GHz
- RAM       : 256 MiB DDR3
- Flash     : SPI-NAND 128 MiB (ESMT)
- WLAN      : MediaTek MT7976CN dual-band WiFi 6
  - 2.4 GHz : b/g/n/ax, MIMO 2x2
  - 5 GHz   : a/n/ac/ax, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x3 (LAN, MediaTek MT7531AE)
              10/100/1000 Mbps x1 (WAN, SoC internal phy)
- USB       : No
- Buttons   : Mesh, Reset
- LEDs      : 1x Power (blue), unmanaged
              1x Status (blue), gpio-controlled
              1x WiFi 2.4 GHz (blue), gpio-controlled
              1x WiFi 5 GHz (blue), gpio-controlled
              3x LAN activity (blue), switch-controlled
              1x WAN activity (blue), gpio-controlled
- Power     : 12 VDC, 1 A

Installation
------------
1. Connect to the router using ssh (user: admin, pass: web interface
   password)
2. Make mtd backup:
   cat /dev/mtd0 | gzip -1 -c > /tmp/mtd0_spi0.0.bin.gz
   cat /dev/mtd1 | gzip -1 -c > /tmp/mtd1_BL2.bin.gz
   cat /dev/mtd2 | gzip -1 -c > /tmp/mtd2_u-boot-env.bin.gz
   cat /dev/mtd3 | gzip -1 -c > /tmp/mtd3_Factory.bin.gz
   cat /dev/mtd4 | gzip -1 -c > /tmp/mtd4_FIP.bin.gz
   cat /dev/mtd5 | gzip -1 -c > /tmp/mtd5_ubi.bin.gz
3. Download mtd backup from the /tmp dir of the router to your PC using
   scp protocol
4. Upload OpenWrt 'bl31-uboot.fip', 'preloader.bin' images to the /tmp
   dir of the router using scp protocol
5. Write FIP and BL2 (replace bootloader):
   mtd write /tmp/openwrt-mediatek-filogic-netis_nx31-bl31-uboot.fip FIP
   mtd write /tmp/openwrt-mediatek-filogic-netis_nx31-preloader.bin BL2
6. Place OpenWrt
   'openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb' image on
   the tftp server (IP: 192.168.1.254)
7. Erase 'ubi' partition and reboot the router:
   mtd erase ubi
   reboot
8. U-Boot automatically boot OpenWrt recovery image from tftp server to
   the RAM
9. Upload OpenWrt 'sysupgrade.itb' image to the /tmp dir of the router
   (IP: 192.168.1.1) using scp protocol
10. Connect to the router using ssh and run:
    sysupgrade -n openwrt-mediatek-filogic-netis_nx31-squashfs-sysupgrade.itb

Return to stock
---------------
1. Unpack stock BL2 and FIP partitions backup
2. Upload stock BL2 and FIP partitions backup to the /tmp dir of the
   router using scp protocol
3. Connect to the router using ssh and run:
   apk update && apk add kmod-mtd-rw
   insmod mtd-rw i_want_a_brick=1
   mtd unlock BL2
   mtd unlock FIP
4. Restore backup:
   mtd write /tmp/mtd4_FIP.bin FIP
   mtd write /tmp/mtd1_BL2.bin BL2
5. Erase ubi and reboot:
   mtd erase ubi
   reboot
6. Power off the router
7. Press Reset button and power on the router. Release the button after
   ~10 sec
8. Navigate to U-Boot recovery web server (http://192.168.1.1/) and
   upload the OEM firmware

Recovery
--------
1. Place OpenWrt
   'openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb' image on
   the tftp server (IP: 192.168.1.254)
2. Press “Reset” button and power on the router. After ~10 sec release
   the button.
3. Use OpenWrt initramfs system for recovery

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| LAN     | dc:xx:xx:d1:xx:18 | label     |
| WAN     | dc:xx:xx:d1:xx:1a | label+2   |
| WLAN 2g | de:xx:xx:11:xx:19 |           |
| WLAN 5g | de:xx:xx:71:xx:19 |           |
+---------+-------------------+-----------+
The LAN MAC was found in 'Factory', 0x1fef20
The WAN MAC was found in 'Factory', 0x1fef26
The WLAN 2g/5g MAC prototype was found in 'Factory', 0x4

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18324
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-06 20:14:18 +02:00
George Sapkin
14a88ba520 tools/expat: bump to 2.7.1 to fix several CVEs
Addresses CVE-2024-8176 and CVE-2024-50602.

Changelog: https://github.com/libexpat/libexpat/blob/R_2_7_1/expat/Changes
Fixes: https://github.com/openwrt/packages/issues/26255
Fixes: https://github.com/advisories/GHSA-9hcv-xw76-m4h6
Fixes: https://github.com/advisories/GHSA-79wf-qgrg-2p6c
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/18421
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-06 20:01:46 +02:00
Fil Dunsky
99ea96c297 mediatek: filogic: add support for Huasifei WH3000
**Huasifei WH3000 eMMC / Fudy MT3000**
Portable Wi-Fi 6 travel router based on MediaTek MT7981A SoC.
MT7981B+MT7976CN+RTL8221B Dual Core 1.3GHZ

**Specifications**
SoC: Filogic 820 MT7981A (1.3GHz)
RAM: DDR4 1GB
Flash: eMMC 8GB
WiFi: 2.4GHz and 5GHz with 3 antennas
Ethernet:
1x WAN (10/100/1000M)
1x LAN (10/100/1000/2500M)
USB: 1x USB 3.0 port
Two buttons: power/reset and mode (BTN_0)
LEDS: blue, red, blue+red=pink
UART: 3.3V, TX, RX, GND / 115200 8N1

**Installation via U-Boot rescue**
1. Set static IP 192.168.1.2 on your computer and default route as 192.168.1.1
2. Connect to the WAN port and hold the reset button while booting the device.
3. Wait for the LED to blink 5 times, and release the reset button.
4. Open U-boot web page on your browser at http://192.168.1.1
5. Select the OpenWRT sysupgrade image, upload it, and start the upgrade.
6. Wait for the router to flash the new firmware.
7. Wait for the router to reboot itself.

**Installation via sysupgrade**
Just flash sysupgrade file via [LuCI upgrade page](http://192.168.1.1/cgi-bin/luci/admin/system/flash) without saving the settings.

**Installation via SSH**
Upload the file to the router `/tmp` directory, `ssh root@192.168.1.1` and issue a command:
```
sysupgrade -n /tmp/openwrt-mediatek-filogic-huasifei_wh3000-emmc-squashfs-sysupgrade.bin
```

**Factory MAC**
You can find your Factory MAC which is mentioned on the box at `/dev/mmcblck0p2` partition `factory` starting from `0x4`
```
dd if=/dev/mmcblk0p2 bs=1 skip=4 count=6 | hexdump -C
```

**Enlarging a partition**
Though device has 8GB eMMC, it uses only 2GB `/dev/mmcblck0p6` as `rootfs` for `/rom` and `/overlay` leaving `/dev/mmcblck0p7` as empty unused space.
```
sgdisk -p /dev/mmcblk0
```
```
Disk /dev/mmcblk0: 15269888 sectors, 7.3 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 2BD17853-102B-4500-AA1A-8A21D4D7984D
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 14942174
Partitions will be aligned on 1024-sector boundaries
Total free space is 11197 sectors (5.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            8192            9215   512.0 KiB   8300  u-boot-env
   2            9216           13311   2.0 MiB     8300  factory
   3           13312           21503   4.0 MiB     8300  fip
   4           21504           29695   4.0 MiB     8300  config
   5           29696           62463   16.0 MiB    8300  kernel
   6           62464         4256767   2.0 GiB     8300  rootfs
   7         4257792        14940159   5.1 GiB     8300
```

You can fix that by loading into `initramfs-kernel`, deleting empty `mmcblck0p7` partition and resizing `mmcblck0p6`
```
sysupgrade -F /tmp/openwrt-initramfs-kernel.bin
```
Install and run cfdisk
```
opkg update && opkg install cfdisk
cfdisk /dev/mmcblck0
```
- Select `mmcblck0p7` -> Delete
- Select `mmcblck0p6` -> Resize -> Write -> yes -> Quit

You will not see any difference in `cat /proc/partitions` after that but just flash a `sysupgrade` and you'll get the whole 7.3GB space for the `/overlay`.

Co-developed-by: hecatae <horus.ra@gmail.com>
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18220
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-06 19:22:09 +02:00
Stijn Tintel
c891ad99f8 arm-trusted-firmware-rockchip: support rk3588
ATF supports rk3588 since version 2.12, so let's enable it in
arm-trusted-firmware-rockchip.

We still need the TPL to initialize RAM, but keeping rk3588 in rkbin
would cause a duplicate package name, so rename rk3588 to rk3588-tpl in
rkbin.

Finally, point uboot-rockchip for rk3588 to bl31 built by this package,
and add a dependency on the new trusted-firmware-a-rk3588-tpl pacakge.

While this doesn't necessarily add features, we now no longer rely on
the rk3588_bl31_v1.45.elf blob provided by Rockchip, which is always a
good thing.

Tested on Radxa ROCK 5B+.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2025-04-06 14:22:19 +03:00
Stijn Tintel
b1a2ebbd43 arm-trusted-firmware-rockchip: bump to 2.12.1 LTS
And remove no-warn-rwx-segments hack, as this is no longer needed and
actually causes build to fail. See also commit c117d7a37a74
("include/trusted-firmware-a.mk: remove the no-warn-rwx-segments hack").

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2025-04-06 14:22:19 +03:00
Stijn Tintel
06c4e8a262 include/trusted-firmware-a.mk: support LTS releases
TF-A LTS releases have an lts- prefix in their version tag. Introduce a
PKG_LTS variable to support these.

As the non-LTS tarbals do not contain the version prefix in the
directory, we need different PKG_BUILD_DIR for each variant:

➜ tar --list --file dl/trusted-firmware-a-v2.12.tar.gz  | head -n1
trusted-firmware-a-2.12/
➜ tar --list --file dl/trusted-firmware-a-lts-v2.12.1.tar.gz  | head -n1
trusted-firmware-a-lts-v2.12.1/

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2025-04-06 14:21:07 +03:00