openwrt/staging/blocktrron.git
3 days agoqualcommax: ipq5018: gl-b3000: fix uboot support
Scott Mercer [Mon, 21 Apr 2025 09:38:14 +0000 (05:38 -0400)]
qualcommax: ipq5018: gl-b3000: fix uboot support

The bootscript parameter in gl-qsdk-factory.sh was moved
from arg[4] to arg[2] (1 based index) This patch reflects
these changes

Fixes: 3307fe8ee4cf ("qualcommax: ipq50xx: add support for GL.iNET GL-B3000")
Signed-off-by: Scott Mercer <TheRootEd24@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18547
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 days agoramips: Add support for Xiaomi MiWiFi 3A
Olgun Demir [Sun, 20 Apr 2025 05:04:33 +0000 (07:04 +0200)]
ramips: Add support for Xiaomi MiWiFi 3A

The Xiaomi MiWiFi 3A wireless router has a similar system architecture as the Xiaomi Mi 4A router, which is already officially supported by OpenWrt.

Product website: https://www.mi.com/miwifi3a

Device specification
--------------------
SoC:      MT7628AN MIPS_24KEc @ 580 MHz 2.4G-bgn 2x2
WiFi:     MT7612EN 5G-an, ac 80 MHz 2T2R
Flash:    16 MB
DRAM:     64 MB
Switch:   MT7628AN (integrated in SoC)
Ethernet: 1 x 10 /100 Mbps
USB:      None
Antennas: 2 x 2,4 GHz and 2 x 5 GHz (all are external and non-detachable)
LEDs:     blue/red/amber
Buttons:  Reset
Serial:   115200,8n1

MAC addresses as verified by OEM firmware:
------------------------------------------
use address source
LAN *:DD factory 0x28
WAN *:DD factory 0x28
2g *:DE factory 0x4
5g *:DF factory 0x8004

OEM firmware uses VLAN's to create the network interface for WAN and LAN.

Bootloader info:
----------------
The stock bootloader uses a "Dual ROM Partition System".
OS1 is a deep copy of OS2.
The bootloader starts OS2 by default.
To force start OS1 it is needed to set "flag_try_sys2_failed=1".

How to install:
---------------
1- Use OpenWRTInvasion to gain Telnet, SSH and FTP access: https://github.com/acecilia/OpenWRTInvasion
[IP: 192.168.31.1 | Username: root | Password: root | FTP-Port: 21]
2- Connect to router using telnet or ssh.
3- Backup all partitions. Use command "dd if=/dev/mtd0 of=/tmp/mtd0". Copy /tmp/mtd0 to computer using ftp.
4- Copy openwrt-ramips-mt76x8-xiaomi_miwifi-3a-squashfs-sysupgrade.bin to /tmp in router using ftp.
5- Enable UART access and change start image to OS1.

nvram set uart_en=1
nvram set flag_last_success=1
nvram set boot_wait=on
nvram set flag_try_sys2_failed=1
nvram commit

6- Erase OS1 & OS2 and install OpenWrt

mtd erase OS1
mtd erase OS2
mtd -r write /tmp/openwrt-ramips-mt76x8-xiaomi_miwifi-3a-squashfs-sysupgrade.bin OS1

Credits:
--------
This PR is based on the work of Zehao Zhang (Github: @ZZH-Finalize) that he had published in the PR: #15698

Signed-off-by: Olgun Demir <olgun.demir@mail.com.tr>
Link: https://github.com/openwrt/openwrt/pull/18427
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 days agoutil-linux: add include linux/unistd.h patch
Mieczyslaw Nalewaj [Sat, 19 Apr 2025 21:37:57 +0000 (23:37 +0200)]
util-linux: add include linux/unistd.h patch

If SYS_statmount/SYS_listmount is not provided by the libc,
util-linux will fall back to __NR_statmount/__NR_listmount from the
kernel UAPI headers.
However it is not guaranteed that these symbols are actually visible in
mount-api-utils.

Include linux/unistd.h which provides syscall numbers.
While this header is specific to Linux, the code is already using
linux/mount.h.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18539
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 days agouqmi: update to latest HEAD
David Bauer [Sun, 20 Apr 2025 14:48:51 +0000 (16:48 +0200)]
uqmi: update to latest HEAD

a933061 uqmi nas: fix incorrect parameter order

Signed-off-by: David Bauer <mail@david-bauer.net>
4 days agonetifd dhcp: send DHCP client ID by default
David Bauer [Sat, 19 Apr 2025 12:41:37 +0000 (14:41 +0200)]
netifd dhcp: send DHCP client ID by default

Some ISPs require the client ID to be set in the DHCP and DHCPv6
requests. OpenWrt sets the client id for IPv6 but not for IPv4 by
default.

Align this behavior between DHCPv4 and DHCPv6.

ISPs that require this measure are Deutsche Glasfaser as well as some
Entega connections.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 days agoqualcommax: ipq50xx: add support for GL.iNET GL-B3000
Scott Mercer [Sat, 22 Mar 2025 16:46:18 +0000 (12:46 -0400)]
qualcommax: ipq50xx: add support for GL.iNET GL-B3000
Add support for GL.iNET (AX3000) B3000.

Speficiations:
* SoC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz)
* Memory: Winbond W634GU6NQB-11 (512 MiB DDR3-933)
* Serial Port: 3v3 TTL 115200n8
* Wi-Fi: IPQ5018 (2x2 2.4 Ghz 802.11b/g/n/ax)
* Wi-Fi: QCN6102 (2x2:2 5 Ghz 802.11an/ac/ax)
* Ethernet: IPQ5018 integrated virtual switch connected to an external
            QCA8337 switch (3 Ports 10/100/1000 GBASE-T)
* Flash: Winbond W25N01GWZEIG (128 MiB)
* LEDs: 1x single-color blue LED (GPIO 24 Active High)
        1x single-color white LED (GPIO 23 Active High)
* Buttons: 1x Reset (GPIO 27 Active Low)

Flash Instructions:

*** The .img files are now universal ! ***

Openwrt --> openwrt-qualcommax-ipq50xx-glinet_gl-b3000-squashfs-factory.img

GL.iNet OEM --> openwrt-b3000-4.5.18-0731-1722397535.img

Either file can be flashed, in any of the available upgrade options, in both Firmwares.

Pick a file .. pick a method .. and SEND IT !!

Signed-off-by: Scott Mercer <TheRootEd24@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17903
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 days agostm32: Add kmod-stm32-thermal
Thomas Richard [Wed, 26 Feb 2025 09:46:30 +0000 (10:46 +0100)]
stm32: Add kmod-stm32-thermal

This adds the Thermal framework support for STM32MP157.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agostm32: sort kernel module packages in alphabetical order
Thomas Richard [Wed, 26 Feb 2025 09:33:58 +0000 (10:33 +0100)]
stm32: sort kernel module packages in alphabetical order

In modules.mk, sort packages in alphabetical order.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agostm32: add missing SUBMENU for kmod-phy-stm32-usbphyc and kmod-stm32-timers
Thomas Richard [Tue, 14 Jan 2025 18:51:05 +0000 (19:51 +0100)]
stm32: add missing SUBMENU for kmod-phy-stm32-usbphyc and kmod-stm32-timers

Move kmod-phy-stm32-usbphyc in the "USB Support" menu and kmod-stm32-timers
in "Other modules" menu.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agostm32: add STM32MP157C-DK2 support
Thomas Richard [Wed, 15 Jan 2025 07:28:47 +0000 (08:28 +0100)]
stm32: add STM32MP157C-DK2 support

Add STM32MP157C-DK2 support. This profile also supports the STM32MP157F-DK2
board. The only difference between these two boards is the CPU frequency
(650MHz for 157C and 800MHz for 157F).

A SCMI variant is available. With this variant the reset and clock
resources are provided by OP-TEE and the associated SCMI services.
It is the configuration recommended by STMicroelectronics, with secured
system resources.

The specifications bellow only list supported features.

Specifications
--------------

SOC: STM32MP157C
RAM: 512 MiB
Storage: SD Card
Ethernet: 1x 1 Gbps
Wireless: 2.4GHz Cypress CYW43455 (802.11b/g/n)
LEDs: Heartbeat (Blue)
USB: 4x 2.0 Type-A

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agomurata-nvram: add symlink for STM32MP157C-DK2
Thomas Richard [Tue, 14 Jan 2025 18:58:46 +0000 (19:58 +0100)]
murata-nvram: add symlink for STM32MP157C-DK2

The nvram file is generic for all stm32 boards, add a symlink for
STM32MP157C-DK2 and the SCMI variant.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agoarm-trusted-firmware-stm32: add STM32MP157C-DK2 support
Thomas Richard [Wed, 15 Jan 2025 07:28:07 +0000 (08:28 +0100)]
arm-trusted-firmware-stm32: add STM32MP157C-DK2 support

Add entry for STM32MP157C-DK2 and the SCMI variant.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agouboot-stm32: add STM32MP157C-DK2 support
Thomas Richard [Wed, 15 Jan 2025 07:27:53 +0000 (08:27 +0100)]
uboot-stm32: add STM32MP157C-DK2 support

Add entry for STM32MP157C-DK2 and the SCMI variant.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agooptee-os-stm32: add STM32MP157C-DK2 support
Thomas Richard [Wed, 15 Jan 2025 07:27:44 +0000 (08:27 +0100)]
optee-os-stm32: add STM32MP157C-DK2 support

Add entry for STM32MP157C-DK2 and the SCMI variant.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 days agogeneric: move TCP fraglist GRO patch to separate file in pending
Mieczyslaw Nalewaj [Fri, 18 Apr 2025 10:24:54 +0000 (12:24 +0200)]
generic: move TCP fraglist GRO patch to separate file in pending

Patch 87cb0446b7da also applies to higher kernel versions.
To apply to them it has been moved to a separate file in pending.

Fixes: 87cb0446b7da ("generic: fix broken TCP fraglist GRO patch")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18511
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 days agogeneric: fix PATH_MAX macro redefined in exec-cmd.c on macOS 15.4
Georgi Valkov [Fri, 18 Apr 2025 13:37:33 +0000 (16:37 +0300)]
generic: fix PATH_MAX macro redefined in exec-cmd.c on macOS 15.4

Fix an error while building target/linux x64 on macOS 15.4 host,
due to the PATH_MAX macro being redefined:

mkdir -p /Volumes/test/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.86/tools/objtool && make O=/Volumes/test/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.86 subdir=tools/objtool --no-print-directory -C objtool
exec-cmd.c:15:9: error: 'PATH_MAX' macro redefined [-Werror,-Wmacro-redefined]
   15 | #define PATH_MAX        4096
      |         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/syslimits.h:103:9: note: previous definition is here
  103 | #define PATH_MAX                 1024   /* max bytes in pathname */
      |         ^

exec-cmd.c is compiled as part of objtool to run on the host, and
therefore host headers are used, where PATH_MAX is already defined.
Using an old OpenWRT snapshot from 2025-02-16, where linux-6.6.77
used to build correctly, does not help. Reverting from Xcode 16.3 to
16.2 does not help either.

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18530
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agomac80211: ath12k: fix regdb parsing for 6GHz
Mantas Pucka [Wed, 16 Apr 2025 13:47:30 +0000 (16:47 +0300)]
mac80211: ath12k: fix regdb parsing for 6GHz

Add backport patch that fixes ath12k regdomain parsing failure in
6GHz band triggered by the latest regdb/board-2.bin update.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18512
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agomac80211: refresh patches
Mantas Pucka [Wed, 16 Apr 2025 14:05:23 +0000 (17:05 +0300)]
mac80211: refresh patches

Previous commits missed some refreshing

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18512
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agojsonfilter: update to Git HEAD (2025-04-18)
Robert Marko [Fri, 18 Apr 2025 10:40:50 +0000 (12:40 +0200)]
jsonfilter: update to Git HEAD (2025-04-18)

8a86fb78235b build: set GNU17 for lemon compilation

Link: https://github.com/openwrt/openwrt/pull/18525
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agoutil-linux: update to v2.41
Thomas Weißschuh [Mon, 14 Apr 2025 21:39:43 +0000 (23:39 +0200)]
util-linux: update to v2.41

Release Notes:
https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41-ReleaseNotes

New:
0001-meson-add-feature-for-translated-documentation.patch
0001-meson-remove-tinfo-dependency-from-more.patch

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Link: https://github.com/openwrt/openwrt/pull/18493
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agotools: util-linux: update to v2.41
Thomas Weißschuh [Mon, 14 Apr 2025 20:34:53 +0000 (22:34 +0200)]
tools: util-linux: update to v2.41

Release Notes:
https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41-ReleaseNotes

Remove upstreamed:
0001-hexdump-allow-enabling-with-disable-all-programs.patch
110-pkgconfig-static.patch

Refresh:
101-macos-weak-aliases.patch

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Link: https://github.com/openwrt/openwrt/pull/18493
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agomediatek: filogic: add support for WAVLINK WL-WN573HX3
Sebastian Schaper [Sat, 2 Nov 2024 18:28:18 +0000 (19:28 +0100)]
mediatek: filogic: add support for WAVLINK WL-WN573HX3

The WL-WN573HX3 is an AX3000 outdoor Access Point by WAVLINK,
also sold in Europe as 7Links WLR-1300 (ZX-5612).

Specifications:

- MT7981B + MT7976 AX3000 2x2 DBDC (160 MHz)
- 16 MiB SPI NOR, 256 MiB RAM
- Gigabit ethernet port, 802.3af PoE
- IP67 outdoor case for wall or pole mounting with
    four single band RP-SMA fiberglass antennas (8 dBi)

Installation:

- OEM Web UI is at 192.168.30.1 which will forward to
    http://netlogin.link (using a captive portal)
- login with default password `admin`
- skip setup wizard by navigating directly to
    http://netlogin.link/html/meshUpgrade.html
- upload WN573HX3-sysupgrade.bin
- reset to factory defaults to discard OEM UCI settings

MAC address assignment:

LAN         80:xx:xx:76:xx:25  hw 0x44e
WLAN 2.4G   80:xx:xx:76:xx:27  factory 0x04 (label MAC)
WLAN 5G     82:xx:xx:46:xx:27
pair key    8a:xx:xx:76:xx:27  also on label, not used by OpenWrt

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
6 days agoramips: mt76x8: add support for Teltonika RUT200
Simonas Tamošaitis [Mon, 31 Mar 2025 15:30:07 +0000 (18:30 +0300)]
ramips: mt76x8: add support for Teltonika RUT200

Specification:
SoC: MediaTek MT7628AN
RAM: 128 MB EtronTech EM68C16CWQG-25IH
Flash: 16MB Winbond W25Q128 SPI
Switch: MediaTek MT7628AN, 2 ports 100 Mbps
WiFi: MediaTek MT7628AN 2.4 GHz 802.11n
Modem: Quectel EC200A 4G, cat 4
GPIO:
  - 1 button (Reset)
  - 8 LEDs (2G, 3G, 4G, RSSI 1,2,3,4,5)
  - 2 Modem control (power button, reset)
  - 1 Digital input
  - 1 Digital output

Flashing via OEM WebUI:
1. Download the firmware image *-squashfs-factory.bin
2. Upload firmware image via OEM WebUI firmware update, do not keep settings

To revert back to OEM firmware:
https://wiki.teltonika-networks.com/view/Bootloader_menu

To enable mobile data connection send command to modem:
  echo -ne 'AT+QNETDEVCTL=3,1\r\n' > /dev/ttyUSB2

Create DHCP interface with usb0 device.

Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
6 days agoramips: mt76x8: add support for Teltonika RUT241
Simonas Tamošaitis [Fri, 14 Mar 2025 13:42:07 +0000 (15:42 +0200)]
ramips: mt76x8: add support for Teltonika RUT241

Specification:
SoC: MediaTek MT7628AN
RAM: 128 MB EtronTech EM68C16CWQG-25IH
Flash: 16MB Winbond W25Q128 SPI
Switch: MediaTek MT7628AN, 2 ports 100 Mbps
WiFi: MediaTek MT7628AN 2.4 GHz 802.11n
Modem: MeigLink SLM750 4G, cat 4
GPIO:
 - 1 button (Reset)
 - 8 LEDs (2G, 3G, 4G, RSSI 1,2,3,4,5)
 - 2 Modem control (power button, reset)
 - 1 Digital input
 - 1 Digital output

Flashing via OEM WebUI:
1. Download the firmware image *-squashfs-factory.bin
2. Upload firmware image via OEM WebUI firmware update, do not keep settings

To revert back to OEM firmware:
https://wiki.teltonika-networks.com/view/Bootloader_menu

Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
6 days agobuild: include size-limits to device-metadata
David Bauer [Mon, 11 Dec 2023 13:46:12 +0000 (14:46 +0100)]
build: include size-limits to device-metadata

Include the image and kernel size limitations defined for each device to
the device metadata JSON.

These informations are only added if defined.

Signed-off-by: David Bauer <mail@david-bauer.net>
6 days agoramips: add support for Mofi 5500
Rick Mac Gillis [Thu, 20 Mar 2025 02:38:09 +0000 (19:38 -0700)]
ramips: add support for Mofi 5500

Specifications:

SoC: Mediatek MT7621AT (880 MHz MIPS dual-core, quad-thread, CPU)
512 Megabyte DDR3 SDRAM
32 Megabyte NOR Flash
4 Gigabit RJ45 PoE ports
2 MT7615N wifi chips (2.4GHz and 5GHz)
2 USB ports (1xUSB2 and 1xUSB3 - GL3510 chip)
RJ45 RS232 port on front panel (Max3232 chip)
2x mPCIe 2.0 slots for 4G/5G cards
2x SIM slot
1x SDCard Slot
Power via DC12V
4x Cell Antennae
4x Wifi Antennae

MAC Address Locations:
Purpose Ex. Partition Offset
2.4 Ghz *:01 factory 0x4
5 GHz *:02 factory 0x8004
LAN *:03 factory 0xe000
WAN *:04 factory 0xe006

MAC address prefix E4:3A:65 is registered to MofiNetwork Inc
and used as the prefix for all MAC addresses.

Manual: https://mofinetwork.com/files/MoFi_Network_MOFI5500_5GXeLTE_EM7690_SPECS.pdf
WiFi chip specs: https://www.mediatek.com/products/broadband-wifi/mt7615
CPU chip specs: https://www.mediatek.com/products/home-networking/mt7621
Teardown Pictures: https://fccid.io/2AE6X-MOFI5500/Internal-Photos/Internal-Photos-5591739

Installation:

Update Mofi 5500 to at least stock firmware version 4.8.6. (Available on the Mofi website.)
Previous versions are untested in the upgrade process. Log into the LuCI web interface,
usually at 192.168.10.1 and visit the 'System->Backup/Flash Firmware' page.
Upload and flash the firmware as usual.

Note to Maintainers: Do not remove SUPPORTED_DEVICES from the Makefile!
The customized Mofi version of OpenWRT (stock firmware) expects to see mofi5500 as the device
name. The stock firmware does not allow for forcing an installation.
Without this line, users cannot upload the new firmware through the stock Mofi firmware.

This device uses cell modems that could use QMI or MBIM.
Add LuCI Modem Manager to allow people to use these. Also, if they have
two cell network cards, ethernet, USB, or other kinds of networks, they may wish
to use MWAN3 to allow failover amongst their networks.

Please compile it with mwan3 for multiple WAN connections.

Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Rick Mac Gillis <noreply@rickmacgillis.com>
6 days agouboot-tools: remove uneeded syncconfig
Robert Marko [Thu, 17 Apr 2025 11:20:06 +0000 (13:20 +0200)]
uboot-tools: remove uneeded syncconfig

During envtools conversion to the generic uboot-tools package, a syncconfig
call was added to the configure step which was previously not there.

We received multiple spourious reports that now envtools were failing to
build [1], but it was not reproducible.

However, it seems that this could easily be reproduced on MacOS 15 and
somehow that syncconfig call is breaking build by Makefile.autoconf not
being executed and thus no "include/config.h" is generated.

So, since this call was not previously there and U-Boot will actually do
syncconfig on its own when needed lets drop it.

[1] https://github.com/openwrt/openwrt/commit/293d5f1366e099cc343a3fc8a6f936ab27bcad6a#commitcomment-154347516

Link: https://github.com/openwrt/openwrt/pull/18515
Signed-off-by: Robert Marko <robimarko@gmail.com>
6 days agouboot-tools: Honor the global verbose flag
Robert Marko [Thu, 17 Apr 2025 11:12:17 +0000 (13:12 +0200)]
uboot-tools: Honor the global verbose flag

Look for OPENWRT_VERBOSE and pass it down to the U-Boot so we actually
get verbose build info when needed for debugging.

Link: https://github.com/openwrt/openwrt/pull/18515
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agogdb: update to 16.2
Robert Marko [Wed, 16 Apr 2025 13:37:59 +0000 (15:37 +0200)]
gdb: update to 16.2

See news file for changes:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=gdb-16.2-release

It fixes compilation with GCC15.

Link: https://github.com/openwrt/openwrt/pull/18519
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agocomgt-ncm: fix modem manufacturer detection
Jakub Łabuz [Fri, 11 Apr 2025 16:33:49 +0000 (18:33 +0200)]
comgt-ncm: fix modem manufacturer detection

Fix an issue where NCM interface initialization fails because of wrong
modem manufacturer detection.

gcom call returns an output with Windows-style line breaks (containing \r)
what makes awk call return empty or malformed manufacturer name. Changing
awk RS variable to handle both \n and \r\n as line break fixes this issue.

Fixes #17448 and #17998 GitHub issues.

Signed-off-by: Jakub Łabuz <jakub@labuz.dev>
Link: https://github.com/openwrt/openwrt/pull/18460
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agouboot-ath79: update to v2025.04
INAGAKI Hiroshi [Thu, 9 Jan 2025 13:36:36 +0000 (22:36 +0900)]
uboot-ath79: update to v2025.04

Update uboot-ath79 package to v2025.04 for ath79 devices.

Additionally, new "CONFIG_NO_NET" option was introduced and replaced
disabled CONFIG_NET option ("# CONFIG_NET is not set"). So replace
that old options in the NEC Aterm devices as well.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18475
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agotools: gmp: fix compilation with GCC15
Robert Marko [Wed, 16 Apr 2025 12:04:26 +0000 (14:04 +0200)]
tools: gmp: fix compilation with GCC15

Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks GMP compilation by failing to find
a working compiler test.

Its been fixed upstream [2][3], so backport the fix to fix GCC15 compilation.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23
[2] https://gmplib.org/repo/gmp/rev/8e7bb4ae7a18
[3] https://gmplib.org/repo/gmp/rev/d66d66d82dbb

Link: https://github.com/openwrt/openwrt/pull/18506
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agotools: elfutils: set -std=gnu17
Robert Marko [Wed, 16 Apr 2025 11:59:14 +0000 (13:59 +0200)]
tools: elfutils: set -std=gnu17

Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks m4 compilation.

This looks like a gnulib issue, so until that is updated/fixed
lets simply set C language version back to GNU17.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23

Link: https://github.com/openwrt/openwrt/pull/18506
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agotools: cpio: fix compilation with GCC15
Robert Marko [Wed, 16 Apr 2025 11:56:22 +0000 (13:56 +0200)]
tools: cpio: fix compilation with GCC15

Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks cpio compilation.

Its been reported upstream [2], so import the patch attached to the bug
report that fixes compilation with GCC15.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23
[2] https://savannah.gnu.org/bugs/?66297

Link: https://github.com/openwrt/openwrt/pull/18506
Signed-off-by: Robert Marko <robimarko@gmail.com>
8 days agotoolchain: gcc: fix build error with Xcode 16.3
Georgi Valkov [Mon, 14 Apr 2025 13:07:25 +0000 (16:07 +0300)]
toolchain: gcc: fix build error with Xcode 16.3

Xcode 16.3 defines TARGET_OS_MAC, it was not defined in prior versions.
zutil.h conditionally defines fdopen as NULL when this macro is defined,
resulting in the following build error:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: e>
  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
      |          ^
./zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */

In Xcode 16.2 and earlier, TARGET_OS_MAC was not defined so this entire
block was ignored, gcc and gdb used to compile and work fine.

This may have been used for compatibility with older versions of macOS,
but is no longer needed. By pure luck, the build worked fine for a long
time, because it did not properly detect macOS.
Fixed by removing the check for TARGET_OS_MAC.

Note that since Xcode 16.3, an entire set of TARGET_OS macros
are now defined, most of which are set to 0:
TARGET_OS_LINUX 0
TARGET_OS_MAC 1
TARGET_OS_OSX 1

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18467
Signed-off-by: Robert Marko <robimarko@gmail.com>
8 days agotoolchain: gdb: fix build error with Xcode 16.3
Georgi Valkov [Mon, 14 Apr 2025 12:28:23 +0000 (15:28 +0300)]
toolchain: gdb: fix build error with Xcode 16.3

Xcode 16.3 defines TARGET_OS_MAC, it was not defined in prior versions.
zutil.h conditionally defines fdopen as NULL when this macro is defined,
resulting in the following build error:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_stdio.h:318:7: error: expected identifier or '('
  318 | FILE    *fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen));
      |          ^
./zutil.h:147:33: note: expanded from macro 'fdopen'
  147 | #        define fdopen(fd,mode) NULL /* No fdopen() */

In Xcode 16.2 and earlier, TARGET_OS_MAC was not defined so this entire
block was ignored, gcc and gdb used to compile and work fine.

This may have been used for compatibility with older versions of macOS,
but is no longer needed. By pure luck, the build worked fine for a long
time, because it did not properly detect macOS.
Fixed by removing the check for TARGET_OS_MAC.

Note that since Xcode 16.3, an entire set of TARGET_OS macros
are now defined, most of which are set to 0:
TARGET_OS_LINUX 0
TARGET_OS_MAC 1
TARGET_OS_OSX 1

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18467
Signed-off-by: Robert Marko <robimarko@gmail.com>
8 days agotools: m4: set -std=gnu17
Robert Marko [Wed, 16 Apr 2025 09:42:54 +0000 (11:42 +0200)]
tools: m4: set -std=gnu17

Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks m4 compilation.

Its been reported upstream [2], so until its fixed lets simply set C
language version back to GNU17.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23
[2] https://savannah.gnu.org/support/?111150

Link: https://github.com/openwrt/openwrt/pull/18505
Signed-off-by: Robert Marko <robimarko@gmail.com>
9 days agogeneric: fix broken ARM gc sections patch
Christian Marangi [Tue, 15 Apr 2025 21:21:19 +0000 (23:21 +0200)]
generic: fix broken ARM gc sections patch

Upstream version of ARM gc sections skip eeping some section. It was
reported some kernel load hang hence restore what we original did and
introduce a new patch that add the additional entry on top of the
upstream version.

Fixes: #18500
Fixes: 7843f21c5120 ("generic: replace ARM gc sections patch with upstream version")
Tested-by: Stefan Kalscheuer <stefan@stklcode.de> (Turris Omnia)
Link: https://github.com/openwrt/openwrt/pull/18503
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
9 days agogeneric: fix broken TCP fraglist GRO patch
Christian Marangi [Tue, 15 Apr 2025 18:04:35 +0000 (20:04 +0200)]
generic: fix broken TCP fraglist GRO patch

Some regression were reported with the backported upstream version. Old
kernel require an additional flush in some case and this was handled in
the old downstream patch.

Reintroduce the flush to fix the regression and refresh affected patch.

Fixes: f63d64ede06b ("generic: move patch from pending to backport")
Link: https://github.com/openwrt/openwrt/pull/18501
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
9 days agogeneric: drop redundant ATS SFP GT-T quirk patch
Christian Marangi [Mon, 14 Apr 2025 13:30:05 +0000 (15:30 +0200)]
generic: drop redundant ATS SFP GT-T quirk patch

The ATS SFP GT-T quirk patch was backported to stable kernel 6.6 but
was not notice while bumping the kernel version as they listed the quirk
at the bottom of the SFP quirk table while our hack patch put it at the
top.

With migrating to the upstream version, the duplication was made more
apparent.

Drop the double entry for the SFP module as it's already there and not
needed and refresh patches.

Link: https://github.com/openwrt/openwrt/pull/18484
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
9 days agoipq-wifi: update to Git HEAD (2025-04-15)
Robert Marko [Tue, 15 Apr 2025 11:50:12 +0000 (13:50 +0200)]
ipq-wifi: update to Git HEAD (2025-04-15)

953ce37a3191 ipq40xx: Add TP-Link Deco M5 BDF
f818835c7633 ipq5018: add BDF for GL.iNET GL-B3000 Add IPQ5018 BDF for GL.iNET GL-B3000.
38a18dc26c9b qcn6122: add BDF for GL.iNET GL-B3000 Add QCN6122 BDF for GL.iNET GL-B3000.

Signed-off-by: Robert Marko <robimarko@gmail.com>
10 days agokernel: add missing submenu for diag modules
Chukun Pan [Tue, 4 Mar 2025 15:18:38 +0000 (23:18 +0800)]
kernel: add missing submenu for diag modules

The submenu of two diag modules is missing, fix it.

Fixes: 65de1e0 ("kernel: add missing symbols for lxc")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/18480
Signed-off-by: Robert Marko <robimarko@gmail.com>
10 days agoarmsr: drop GC sections ARMv7 patch
Christian Marangi [Sat, 12 Apr 2025 08:52:04 +0000 (10:52 +0200)]
armsr: drop GC sections ARMv7 patch

Drop GC sections ARMv7 patch as the new upstream version already handle
it by disabling the config in the specific EFI boot stub driver.

Link: https://github.com/openwrt/openwrt/pull/18464
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 days agogeneric: replace ARM gc sections patch with upstream version
Christian Marangi [Fri, 11 Apr 2025 23:01:43 +0000 (01:01 +0200)]
generic: replace ARM gc sections patch with upstream version

Replace ARM gc sections patch with upstream version. It seems this
feature is finally supported upstream with some minor difference.

In theory the upstream version should cut even more stuff, this really
needs to be evaluated if it's OK also to handle regression with the
kernel 6.12 update.

Link: https://github.com/openwrt/openwrt/pull/18464
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 days agogeneric: replace SFP ignore TX FAULT with upstream version
Christian Marangi [Fri, 11 Apr 2025 22:58:19 +0000 (00:58 +0200)]
generic: replace SFP ignore TX FAULT with upstream version

Replace SFP ignore TX FAULT with upstream version by backporting the 2
related upstream patch. Refresh SFP affected patch.

Link: https://github.com/openwrt/openwrt/pull/18464
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 days agogeneric: move patch from pending to backport
Christian Marangi [Fri, 11 Apr 2025 22:31:58 +0000 (00:31 +0200)]
generic: move patch from pending to backport

Move all patch that got merged upstream from pending to backport and add
related tag. This is to make it easier to update to kernel 6.12.

Patch 680 required some special care as the upstream version had to be
split in a series of 6 patch.

Referesh all affected patch.

Link: https://github.com/openwrt/openwrt/pull/18464
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 days agodnsmasq: bump release to 2.91
Rudy Andram [Thu, 27 Mar 2025 10:55:59 +0000 (10:55 +0000)]
dnsmasq: bump release to 2.91

updated 200-ubus_dns.patch
all remaining patches not required

Changelog for version 2.91 - https://thekelleys.org.uk/dnsmasq/CHANGELOG

version 2.91
Fix spurious "resource limit exceeded messages". Thanks to
Dominik Derigs for the bug report.

Fix out-of-bounds heap read in order_qsort().
We only need to order two server records on the ->serial field.
Literal address records are smaller and don't have
this field and don't need to be ordered on it.
To actually provoke this bug seems to need the same server-literal
to be repeated twice, e.g., --address=/a/1.1.1.1 --address-/a/1.1.1.1
which is clearly rare in the wild, but if it did exist it could
provoke a SIGSEGV. Thanks to Daniel Rhea for fuzzing this one.

Fix buffer overflow when configured lease-change script name
is too long.
Thanks to Daniel Rhea for finding this one.

Improve behaviour in the face of non-responsive upstream TCP DNS
servers. Without shorter timeouts, clients are blocked for too long
and fail with their own timeouts.

Set --fast-dns-retries by default when doing DNSSEC. A single
downstream query can trigger many upstream queries. On an
unreliable network, there may not be enough downstream retries
to ensure that all these queries complete.

Improve behaviour in the face of truncated answers to queries
for DNSSEC records. Getting these answers by TCP doesn't now
involve a faked truncated answer to the downstream client to
force it to move to TCP. This improves performance and robustness
in the face of broken clients which can't fall back to TCP.

No longer remove data from truncated upstream answers. If an
upstream replies with a truncated answer, but the answer has some
RRs included, return those RRs, rather than returning and
empty answer.

Fix handling of EDNS0 UDP packet sizes.
When talking upstream we always add a pseudo header, and set the
        UDP packet size to --edns-packet-max. Answering queries from
downstream, we get the answer (either from upstream or local
data) If local data won't fit the advertised size (or 512 if
there's not an EDNS0 header) return truncated. If upstream
        returns truncated, do likewise. If upstream is OK, but the
answer is too big for downstream, truncate the answer.

Modify the behaviour of --synth-domain for IPv6.
When deriving a domain name from an IPv6 address, an address
such as 1234:: would become 1234--.example.com, which is
not legal in IDNA2008. Stop using the :: compression method,
so 1234:: becomes
1234-0000-0000-0000-0000-0000-0000-0000.example.com

Fix broken dhcp-relay on *BSD. Thanks to Harold for finding
this problem.

Add --dhcp-option-pxe config. This acts almost exactly like
--dhcp-option except that the defined option is only sent when
replying to PXE clients. More importantly, these options are sent
in reply PXE clients when dnsmasq in acting in PXE proxy mode. In
PXE proxy mode, the set of options sent is defined by the PXE standard
and the normal set of options is not sent. This config allows arbitrary
options in PXE-proxy replies. A typical use-case is to send option
175 to iPXE. Thanks to Jason Berry for finding the requirement for
this.

Support PXE proxy-DHCP and DHCP-relay at the same time.
        When using PXE proxy-DHCP, dnsmasq supplies PXE information to
        the client, which also talks to another "normal" DHCP server
        for address allocation and similar. The normal DHCP server may
        be on the local network, but it may also be remote, and accessed via
        a DHCP relay. This change allows dnsmasq to act as both a
        PXE proxy-DHCP server AND a DHCP relay for the same network.

Fix erroneous "DNSSEC validated" state with non-DNSSEC
upstream servers.  Thanks to Dominik Derigs for the bug report.

Handle queries with EDNS client subnet fields better. If dnsmasq
is configured to add an EDNS client subnet to a query, it is careful
to suppress use of the cache, since a cached answer may not be valid
for a query with a different client subnet. Extend this behaviour
to queries which arrive a dnsmasq already carrying an EDNS client
subnet.

Handle DS queries to auth zones. When dnsmasq is configured to
act as an authoritative server and has an authoritative zone
configured, and receives a query for that zone _as_forwarder_
it answers the query directly rather than forwarding it. This
doesn't affect the answer, but it saves dnsmasq forwarding the
query to the recursor upstream, which then bounces it back to dnsmasq
in auth mode. The exception should be when the query is for the root
of zone, for a DS RR. The answer to that has to come from the parent,
via the recursor, and will typically be a proof-of-non-existence
since dnsmasq doesn't support signed zones. This patch suppresses
local answers and forces forwarding to the upstream recursor for such
queries. It stops breakage when a DNSSEC validating client makes
queries to dnsmasq acting as forwarder for a zone for which it is
authoritative.

Implement "DNS-0x20 encoding", for extra protection against
reply-spoof attacks. Since DNS queries are case-insensitive,
it's possible to randomly flip the case of letters in a query
and still get the correct answer back.
This adds an extra dimension for a cache-poisoning attacker
to guess when sending replies in-the-blind since it's expected
that the legitimate answer will have the same  pattern of upper
and lower case as the query, so any replies which don't can be
ignored as malicious. The amount of extra entropy clearly depends
on the number of a-z and A-Z characters in the query, and this
implementation puts a hard limit of 32 bits to make resource
allocation easy. This about doubles entropy over the standard
random ID and random port combination. This technique can interact
badly with rare broken DNS servers which don't preserve the case
of the query in their reply. The first time a reply is returned
which matches the query in all respects except case, a warning
will be logged. In this release, 0x020-encoding is default-off
and must be explicitly enabled with --do-0x20-encoding. In future
releases it may default on. You can avoid a future release
changing the behaviour of an installation with --no-x20-encode.

Fix a long-standing problem when two queries which are identical
in every repect _except_ case, get combined by dnsmasq. If
dnsmasq gets eg, two queries for example.com and Example.com
in quick succession it will get the answer for example.com from
upstream and send that answer to both requestors. This means that
the query for Example.com will get an answer for example.com, and
in the modern DNS, that answer may not be accepted.

Signed-off-by: Rudy Andram <rmandrad@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18357
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agoca-certificates: Update to 20241223
Hannu Nyman [Sat, 12 Apr 2025 16:47:28 +0000 (19:47 +0300)]
ca-certificates: Update to 20241223

Update ca-certificates to version 20241223

  * Update Mozilla certificate authority bundle to version 2.70.
    The following certificate authorities were added (+):
    + Telekom Security TLS ECC Root 2020
    + Telekom Security TLS RSA Root 2023
    + FIRMAPROFESIONAL CA ROOT-A WEB
    + TWCA CYBER Root CA
    + SecureSign Root CA12
    + SecureSign Root CA14
    + SecureSign Root CA15
    The following certificate authorities were removed (-):
    - Security Communication Root CA (closes: #1063093)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/18468
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agoath79: fix initramfs execution for NEC Aterm devices
INAGAKI Hiroshi [Sun, 13 Apr 2025 10:41:19 +0000 (19:41 +0900)]
ath79: fix initramfs execution for NEC Aterm devices

Fix execution of initramfs image on NEC Aterm devices by increasing
available memory for lzma extraction of lzma-loader.

The size of initramfs image of v24.10.0 exceeds available memory
(LZMA_TEXT_START - LOADADDR) and loader data running at LZMA_TEXT_START
will be overwritten by extracted data. As a result, LZMA extraction will
be broken and stuck (or unexpectedly reset).
Fix that issue by setting higher LZMA_TEXT_START address to increase
available memory for LZMA extraction by lzma-loader.

log (v24.10.0):

boot> tftpd
tftpd start 192.168.0.1
boot> start tftp load openwrt-24.10.0-ath79-generic-ne
end tftp load length = 6569768
start memory load ...
memory load complete
  begin  : 0x80040000
  length : 6567044
  startup: 0x80040000

boot> boot
begin  : 0x80040000
length : 6567044
startup: 0x80040000
option: 0x0
NEC Aterm series (QCA9558)

Calibrating SGMII
SGMII cal value = 0xe

Configuring SGMII force mode
  SGMII_CONFIG : 0x000000a2
  MR_AN_CONTROL: 0x00008140
  MR_AN_CONTROL: 0x00000140

OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... [:<syntax:value>]');retu  <--- (stuck)
IPL:SOFT-RESET                    <--- (reset by WDT)
memory test ... ok
flinstall OK

boot version: 1.0.0
...

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18476
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agoinclude: move generic riscv64 ISA to rv64gc
Zoltan HERPAI [Mon, 24 Feb 2025 12:18:01 +0000 (12:18 +0000)]
include: move generic riscv64 ISA to rv64gc

The current CFLAGS (rv64imafdc) for the riscv64 targets do not contain
the full generic compute extension (g), as that also includes the
zicsr and zifencei extensions/instructions. Rename the default ISA to
'generic' to add distinction to the current binaries (although it's very
minimal), and use rv64gc for CFLAGS.

This is also a prep step for the upcoming gcv (vector-extension supporting)
targets like the Spacemit K1, and the thead-cores like the TH1520.

Compile-tested: all riscv64 targets
Runtime-tested:
 - SiFive Unleashed (FU540)
 - SiFive Unmatched (FU740)
 - Nezha D1 (D1)
 - VisionFive2 (JH7110)

Link: https://github.com/openwrt/openwrt/pull/18094
Tested-by: Chuanhong Guo <gch981213@gmail.com> # siflower target
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
11 days agolayerscape: armv7: drop skipped packages
Robert Marko [Fri, 11 Apr 2025 22:07:16 +0000 (00:07 +0200)]
layerscape: armv7: drop skipped packages

Now that all packages that relied on the skip mechanism are selected
via BUILD_DEVICES or by defaulting for the subtarget drop them from
individual DEVICE_PACKAGES so that Image Builder works again for armv7.

Fixes: #18411
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agols-rcw: select by default for layerscape/armv7
Robert Marko [Fri, 11 Apr 2025 22:06:02 +0000 (00:06 +0200)]
ls-rcw: select by default for layerscape/armv7

Currently, ls-rcw package is being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~ls-rcw' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the ls-rcw package in DEVICE_PACKAGES lets select it when
layerscape/armv7 target is selected.

Fixes: #18411
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agolayerscape: armv8_64b: drop skipped packages
Robert Marko [Fri, 11 Apr 2025 19:06:18 +0000 (21:06 +0200)]
layerscape: armv8_64b: drop skipped packages

Now that all packages that relied on the skip mechanism are selected
via BUILD_DEVICES or by defaulting for the subtarget drop them from
individual DEVICE_PACKAGES so that Image Builder works again for armv8_64b.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agols-ddr-phy: select by default for layerscape/armv8_64b
Robert Marko [Fri, 11 Apr 2025 21:33:57 +0000 (23:33 +0200)]
ls-ddr-phy: select by default for layerscape/armv8_64b

Currently, ls-ddr-phy package is being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~ls-ddr-phy' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the ls-ddr-phy package in DEVICE_PACKAGES lets select it when
layerscape/armv8_64b target is selected.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agols-dpl: select by default for layerscape/armv8_64b
Robert Marko [Fri, 11 Apr 2025 21:33:24 +0000 (23:33 +0200)]
ls-dpl: select by default for layerscape/armv8_64b

Currently, ls-dpl package is being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~ls-dpl' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the ls-dpl package in DEVICE_PACKAGES lets select it when
layerscape/armv8_64b target is selected.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agols-mc: select by default for layerscape/armv8_64b
Robert Marko [Fri, 11 Apr 2025 21:32:41 +0000 (23:32 +0200)]
ls-mc: select by default for layerscape/armv8_64b

Currently, ls-mc package is being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~ls-mc' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the ls-mc package in DEVICE_PACKAGES lets select it when
layerscape/armv8_64b target is selected.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agofman-ucode: select by default for layerscape/armv8_64b
Robert Marko [Fri, 11 Apr 2025 21:18:30 +0000 (23:18 +0200)]
fman-ucode: select by default for layerscape/armv8_64b

Currently, fman-ucode package is being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~fman-ucode' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the fman-ucode package in DEVICE_PACKAGES lets select it when
layerscape/armv8_64b target is selected.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agotfa-layerscape: set BUILD_DEVICES
Robert Marko [Fri, 11 Apr 2025 20:57:27 +0000 (22:57 +0200)]
tfa-layerscape: set BUILD_DEVICES

Currently, tfa-layerscape packages are being included in the individual
profile DEVICE_PACKAGES but using the feature that allows skipping their
inclusion in the end image package list if prefixed with a tilde(~) which
was added in:
377b66990b97 ("build: introduce support to declare skip package")

But it not added to Image Builder so currently trying to build layerscape
device images in Image Builder will fail with:
ERROR: '~trusted-firmware-a-ls1012a-frdm' is not a valid world dependency, format is name(@tag)([<>~=]version)

So, instead of having to rely on support for skipping package installation
and declaring the individual TFA packages in DEVICE_PACKAGES we can just
do what other targets do and set BUILD_DEVICES so that TFA packages are
automatically set.

Fixes: #18412
Link: https://github.com/openwrt/openwrt/pull/18462
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agobcm63xx-cfe: install into image staging dir
Robert Marko [Fri, 11 Apr 2025 22:32:23 +0000 (00:32 +0200)]
bcm63xx-cfe: install into image staging dir

Currently, bcm63xx-cfe is being installed into kernel build dir, however
that does not work for Image Builder as only certain artifacts from kernel
build dir are included in Image Builder.

So, simply install bcm63xx-cfe into image staging dir so its artifacts can
be used in Image Builder as well.

Fixes: #18408
Fixes: #18409
Link: https://github.com/openwrt/openwrt/pull/18463
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 days agorockchip: Add support for Radxa ROCK 4SE
FUKAUMI Naoki [Wed, 29 Jan 2025 07:35:43 +0000 (07:35 +0000)]
rockchip: Add support for Radxa ROCK 4SE

The Radxa ROCK 4SE[1] is a single board computer using the Rockchip
RK3399-T.

Hardware
--------

- Dual-core Cortex-A72 and quad-core Cortex-A53 CPU
- Mali-T860MP4 GPU
- LPDDR4 4GB RAM
- M.2 M Key slot (PCIe 2.1 x4)
- eMMC connector
- microSD card slot
- Wi-Fi 5 (not supported)
- Gigabit Ethernet with PoE support (additional PoE HAT required)
- USB 3.0 Type-A OTG port
- USB 3.0 Type-A HOST port
- 2x USB 2.0 Type-A HOST ports
- USB Type-C power port (5V only)
- 40 Pin GPIO header

[1] https://radxa.com/products/rock4/4se

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to the micro SD card or
internal eMMC using dd.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/17554
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 days agorockchip: Add support for Radxa ROCK 4C+
FUKAUMI Naoki [Wed, 29 Jan 2025 07:33:59 +0000 (07:33 +0000)]
rockchip: Add support for Radxa ROCK 4C+

The Radxa ROCK 4C+[1] is a single board computer with dual HDMI using
the Rockchip RK3399-T.

Hardware
--------

- Dual-core Cortex-A72 and quad-core Cortex-A53 CPU
- Mali-T860MP4 GPU
- LPDDR4 4GB RAM
- eMMC connector
- microSD card slot
- Wi-Fi 5 (not supported)
- Gigabit Ethernet with PoE support (additional PoE HAT required)
- USB 3.0 Type-A OTG port
- USB 3.0 Type-A HOST port
- 2x USB 2.0 Type-A HOST ports
- USB Type-C power port (5V only)
- 40 Pin GPIO header

[1] https://radxa.com/products/rock4/4cp

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to the micro SD card or
internal eMMC using dd.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://github.com/openwrt/openwrt/pull/17554
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 days agomediatek: add support for Mercusys MR80X v3
Schneider Azima [Mon, 10 Mar 2025 01:42:51 +0000 (18:42 -0700)]
mediatek: add support for Mercusys MR80X v3

This commit adds support for Mercusys MR80X(EU) v3 router.

Device specification:
 - SoC: Mediatek MT7981b, Cortex-A53, 64-bit
 - RAM: 512MB
 - Flash: SPI NAND GigaDevice GD5F1GQ5UEYIGY (128 MB)
 - Ethernet: 4x 100/1000 Mbps LAN1,LAN2,LAN3 & WAN
 - Wireless: 2.4GHz (802.11 b/g/n/ax)
 - Wireless: 5GHz (802.11 a/n/ac/ax)
 - LEDs: 1 orange and 1 green status LEDs, 4 green gpio-controlled LEDs
   on ethernet ports
 - Buttons: 1 (Reset)
 - Bootloader: Main U-Boot - U-Boot 2022.01-rc4. Additionally, both UBI
   slots contain "seconduboot" (also U-Boot 2022.01-rc4)

Installation (UART):
 - Place OpenWrt initramfs-kernel image on tftp server with IP 192.168.1.2
 - Attach UART, switch on the router and interrupt the boot process by
   pressing 'Ctrl-C'.
 - Set the uboot environment for startup.
   setenv tp_boot_idx 0; setenv bootcmd bootm 0x46000000; saveenv
   If the bootarg is set to boot from ubi1, also change it to ubi0.
 - Load and run OpenWrt initramfs image.
   setenv serverip 192.168.1.2; setenv ipaddr 192.168.1.1; tftpboot initramfs-kernel.bin; bootm
 - Browse IP 192.168.1.1, upload the 'sysupgrade' image and do upgrade.

Recovery:
 - Press Reset button and power on the router.
 - Navigate to U-Boot recovery web server (http://192.168.1.1/) and
   upload the OEM firmware.

Stock layout:
0x000000000000-0x000000200000 : "boot"
0x000000200000-0x000000300000 : "u-boot-env"
0x000000300000-0x000003500000 : "ubi0"
0x000003500000-0x000006700000 : "ubi1"
0x000006700000-0x000006f00000 : "userconfig"
0x000006f00000-0x000007300000 : "tp_data"

ubi0/ubi1 format:
U-Boot at boot checks that all volumes are in place:
+-------------------------------+
| Volume Name: uboot   Vol ID: 0|
| Volume Name: kernel  Vol ID: 1|
| Volume Name: rootfs  Vol ID: 2|
+-------------------------------+

MAC addresses:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| label   | 94:0C:xx:xx:xx:12 | label     |
| WAN     | 94:0C:xx:xx:xx:13 | label+1   |
| LAN     | 94:0C:xx:xx:xx:12 | label     |
| WLAN 2g | 94:0C:xx:xx:xx:11 | label-1   |
| WLAN 5g | 94:0C:xx:xx:xx:10 | label-2   |
+---------+-------------------+-----------+
label MAC address was found in UBI partition "tp_data", file
"default-mac".

Signed-off-by: Schneider Azima <Schneider-Azima12@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18181
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 days agokernel: bump 6.6 to 6.6.87
John Audia [Fri, 11 Apr 2025 13:52:08 +0000 (09:52 -0400)]
kernel: bump 6.6 to 6.6.87

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

Manually rebased:
generic-hack/781-usb-net-rndis-support-asr.patch

All other patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18457
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
12 days agowifi-scripts: add hotplug handler for slow-to-initialize ath12k radios
Mantas Pucka [Fri, 4 Apr 2025 09:46:58 +0000 (12:46 +0300)]
wifi-scripts: add hotplug handler for slow-to-initialize ath12k radios

Some ath12k radios can take long time to initialize and register a
phy. This can cause netifd to fail to detect them during initial scan.
To address this issue, a hotplug script has been added to retry
configuration once they have registered their phy.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 days agolinux-firmware: ath12k: package firmware for QCN9274
Mantas Pucka [Thu, 27 Mar 2025 15:20:07 +0000 (17:20 +0200)]
linux-firmware: ath12k: package firmware for QCN9274

Package wireless firmware for Qualcomm QCN9274.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 days agomac80211: ath12k: add patches for 160MHz support
Mantas Pucka [Fri, 4 Apr 2025 12:02:17 +0000 (15:02 +0300)]
mac80211: ath12k: add patches for 160MHz support

Add series enabling 160MHz channels on ath12k

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 days agomac80211: ath12k: fix wideband operation on QCN9274
Mantas Pucka [Tue, 1 Apr 2025 12:04:35 +0000 (15:04 +0300)]
mac80211: ath12k: fix wideband operation on QCN9274

Add patches to enable QCN9274 radios that support both 5GHz and 6GHz
bands.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 days agomac80211: ath12k: support fetching regdb from board-2.bin
Mantas Pucka [Thu, 27 Mar 2025 15:28:46 +0000 (17:28 +0200)]
mac80211: ath12k: support fetching regdb from board-2.bin

In board-2.bin available at linux-firmare regdb is stored with
board-id=255. This change is needed to properly use it.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 days agoqualcommbe: ipq95xx: pcs: fix USXGMII link-up failure
Mantas Pucka [Wed, 9 Apr 2025 08:24:23 +0000 (11:24 +0300)]
qualcommbe: ipq95xx: pcs: fix USXGMII link-up failure

USXGMII link-up may fail due to too short delay after PLL reset.
Increase the delay to fix this.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 days agoqualcommbe: ipq95xx: pcs: support 2.5G PHY
Mantas Pucka [Fri, 28 Mar 2025 08:42:00 +0000 (10:42 +0200)]
qualcommbe: ipq95xx: pcs: support 2.5G PHY

Fixes to PCS driver to support 2.5G PHY

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 days agoqualcommbe: ipq95xx: nsscc: fix port5 clock parent
Mantas Pucka [Fri, 28 Mar 2025 08:40:44 +0000 (10:40 +0200)]
qualcommbe: ipq95xx: nsscc: fix port5 clock parent

Fix incorrect port5 clock management

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 days agoqualcommbe: ipq95xx: add bus clock for NSSCC
Mantas Pucka [Fri, 11 Apr 2025 14:38:28 +0000 (17:38 +0300)]
qualcommbe: ipq95xx: add bus clock for NSSCC

Missing bus clock prevent access to NSSCC registers and thus it is
impossible change clock configuration, when ethernet connection speed
changes.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 days agoqualcommbe: ipq95xx: fix PCIe operation
Mantas Pucka [Thu, 27 Mar 2025 10:02:51 +0000 (12:02 +0200)]
qualcommbe: ipq95xx: fix PCIe operation

Add patches that fix:
 * Wrong MSI interrups for PCIe3
 * Hang during reboot due to stopped clocks

Signed-off-by: Mantas Pucka <mantas@8devices.com>
Link: https://github.com/openwrt/openwrt/pull/18459
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agolldpd: enable hardware inventory information (TLV) management
Paul Donald [Wed, 26 Mar 2025 17:43:45 +0000 (18:43 +0100)]
lldpd: enable hardware inventory information (TLV) management

lldpd can send several hardware inventory TLV fields. Extend the init
script to provide these when the existing flag 'lldpmed_no_inventory' is
disabled. Five new methods provide default values for some of them,
taken from /etc/os-release and /etc/board.json.

There is no homogeneous method to determine the hardware serial number,
so it can be provided manually, as can asset ID.

Note: properties >= 32 characters are truncated at send time (by lldpd),
and some (Cisco) equipment displays junk after strings >= 32 characters.
So truncate to 31.

Tested on: 24.10.0 (known compatible with 22 and 23 also)

===
Example
===

The following lldpd config lines:

 configure inventory hardware-revision "v0"
 configure inventory software-revision "r28427-6df0e3d02a"
 configure inventory firmware-revision "OpenWrt 24.10.0"
 configure inventory serial-number "ABCDEF-123456"
 configure inventory manufacturer "glinet"
 configure inventory model "GL.iNet GL-MT6000"
 # 32 characters:
 configure inventory asset "abcdefghijklmnopqrstuvwxyz 12345"

Produce the following TLV (decoded by Wireshark):

Telecommunications Industry Association TR-41 Committee - Inventory - Hardware Revision
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0000 0110 = TLV Length: 6
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Hardware Revision (0x05)
    Hardware Revision: v0
Telecommunications Industry Association TR-41 Committee - Inventory - Firmware Revision
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0011 = TLV Length: 19
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Firmware Revision (0x06)
    Firmware Revision: OpenWrt 24.10.0
Telecommunications Industry Association TR-41 Committee - Inventory - Software Revision
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0101 = TLV Length: 21
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Software Revision (0x07)
    Software Revision: r28427-6df0e3d02a
Telecommunications Industry Association TR-41 Committee - Inventory - Serial Number
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0100 = TLV Length: 20
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Serial Number (0x08)
    Serial Number: ABCDEF-123456
Telecommunications Industry Association TR-41 Committee - Inventory - Manufacturer Name
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0000 1010 = TLV Length: 10
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Manufacturer Name (0x09)
    Manufacturer Name: glinet
Telecommunications Industry Association TR-41 Committee - Inventory - Model Name
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0101 = TLV Length: 21
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Model Name (0x0a)
    Model Name: GL.iNet GL-MT6000
Telecommunications Industry Association TR-41 Committee - Inventory - Asset ID
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0010 0011 = TLV Length: 35
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Asset ID (0x0b)
    Asset ID: abcdefghijklmnopqrstuvwxyz 1234

The Cisco DUT displays:

Hardware Revision:  v0
Firmware Revision:  OpenWrt 24.10.0
Software Revision:  r28427-6df0e3d02a
Serial Number:  ABCDEF-123456
Manufacturer Name:  glinet
Model Name:  GL.iNet GL-MT6000
Asset ID:  abcdefghijklmnopqrstuvwxyz 1234

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18354
Signed-off-by: Robert Marko <robimarko@gmail.com>
13 days agoath10k-ct: partially revert removal of 003 patch
Christian Marangi [Fri, 11 Apr 2025 19:40:31 +0000 (21:40 +0200)]
ath10k-ct: partially revert removal of 003 patch

Partially revert removal of 003 patch to fix compilation error with
kernel 6.6.

In 6.6 .remove still require int and .remove_new needs to be used.

Fixes: bfb106e8ae73 ("mac80211: backport API change for sta rate control update")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agogeneric: fix kernel warning no previous prototype for ...
Christian Marangi [Fri, 11 Apr 2025 09:45:13 +0000 (11:45 +0200)]
generic: fix kernel warning no previous prototype for ...

It seems new kernel version introduced -Wmissing-prototypes. This new
warning reported drivers that define non static function that are used
statically in the driver.

Fix this by declaring making those function actually static if not
defined in any header and not used outside of the single driver.

Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18455
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agogeneric: add missing of.h header to ar8327
Christian Marangi [Fri, 11 Apr 2025 09:38:55 +0000 (11:38 +0200)]
generic: add missing of.h header to ar8327

It seems new kernel linux version reorganized the header include and now
of.h needs to be explicitly included. This should have been done from
when the driver was introduced.

Add the missing of.h header to fix compilation error in later kernel
version.

Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18455
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agounetmsg: allow communication between hosts if no service is defined
Felix Fietkau [Fri, 11 Apr 2025 11:02:19 +0000 (13:02 +0200)]
unetmsg: allow communication between hosts if no service is defined

Simplifies unet setup

Signed-off-by: Felix Fietkau <nbd@nbd.name>
13 days agoubootenv-nvram: convert driver to .remove_new
Christian Marangi [Thu, 10 Apr 2025 19:35:25 +0000 (21:35 +0200)]
ubootenv-nvram: convert driver to .remove_new

Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agoltq-ptm: convert driver to .remove_new
Christian Marangi [Thu, 10 Apr 2025 19:34:41 +0000 (21:34 +0200)]
ltq-ptm: convert driver to .remove_new

Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agoltq-deu: convert driver to .remove_new
Christian Marangi [Thu, 10 Apr 2025 19:33:53 +0000 (21:33 +0200)]
ltq-deu: convert driver to .remove_new

Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agoltq-atm: convert driver to .remove_new
Christian Marangi [Thu, 10 Apr 2025 19:33:05 +0000 (21:33 +0200)]
ltq-atm: convert driver to .remove_new

Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agoltq-adsl-mei: convert driver to .remove_new
Christian Marangi [Thu, 10 Apr 2025 19:32:19 +0000 (21:32 +0200)]
ltq-adsl-mei: convert driver to .remove_new

Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agogpio-button-hotplug: convert to .remove_new
Christian Marangi [Thu, 10 Apr 2025 19:31:02 +0000 (21:31 +0200)]
gpio-button-hotplug: convert to .remove_new

Convert package to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agogeneric: convert driver to .remove_new
Christian Marangi [Thu, 10 Apr 2025 19:29:11 +0000 (21:29 +0200)]
generic: convert driver to .remove_new

Convert driver to .remove_new in preparation for kernel 6.12 support.

Link: https://github.com/openwrt/openwrt/pull/18454
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
13 days agomt76: update to Git HEAD (2025-04-11)
Felix Fietkau [Fri, 11 Apr 2025 09:09:33 +0000 (11:09 +0200)]
mt76: update to Git HEAD (2025-04-11)

3e25f2bc33af wifi: mt76: mt7925: introduce MLO capability control
ce3622257026 wifi: mt76: mt7925: fix fails to enter low power mode in suspend state
dfdb8e975718 wifi: mt76: mt7915: fix possible integer overflows in mt7915_muru_stats_show()
29f0ad5a439a wifi: mt76: mt7925: ensure wow pattern command align fw format
5eab65bb5473 wifi: mt76: mt7925: fix country count limitation for CLC
d6a197dbc9a2 wifi: mt76: Add check for devm_kstrdup()
901492c4621a wifi: mt76: mt7925: Remove unnecessary if-check
24062ce4fa0f wifi: mt76: mt7925: Simplify HIF suspend handling to avoid suspend fail
56c0beddbed8 wifi: mt76: mt7921: fix kernel panic due to null pointer dereference
11bacfcce3b9 Revert "wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO"
2823c50b1c15 wifi: mt76: mt7925: fix the wrong link_idx when has p2p_device
f54ff3cabab6 wifi: mt76: mt7925: fix the wrong simultaneous cap for MLO
aa7d366ccf40 wifi: mt76: mt7925: adjust rm BSS flow to prevent next connection failure
d25359e8bb83 wifi: mt76: mt7925: integrate *mlo_sta_cmd and *sta_cmd
25a0285d8ee3 wifi: mt76: mt7925: update the power-saving flow
5910f0806c05 wifi: mt76: mt7925: load the appropriate CLC data based on hardware type
454a69cbb718 wifi: mt76: mt7925: add EHT control support based on the CLC data
bdc09b8f2321 wifi: mt76: mt7925: update the channel usage when the regd domain changed
772dcb4b4e61 wifi: mt76: mt7925: remove unused acpi function for clc
b94b025490ef wifi: mt76: mt792x: extend MTCL of APCI to version3 for EHT control
9ff2afce5fef wifi: mt76: mt7925: add MTCL support to enhance the regulatory compliance
f11807364258 wifi: mt76: add mt76_get_power_bound helper function
ffd1cbfc485e wifi: mt76: mt7921: fix returned txpower
687e2fdfbf40 wifi: mt76: mt7925: fix returned txpower
43aaa62fbc55 wifi: mt76: mt7915: cleanup mt7915_get_power_bound
a4be3fc9ed4b wifi: mt76: mt7996: cleanup mt7996_get_power_bound
0ba7a69f8927 wifi: mt76: move napi_enable() from under BH
1b370c689a2f wifi: mt76: mt7921: avoid undesired changes of the preset regulatory domain
e931cecc45de mt76: mt792x: fix unused variable warning
539e7e711a15 Revert "wifi: mt76: mt7925: fix returned txpower"
67c724cc60b1 Revert "wifi: mt76: mt7921: fix returned txpower"
52f51a398e7e wifi: mt76: mt7996: Add change_vif_links stub
b3b61abd733f wifi: mt76: mt7996: Introduce mt7996_sta_link container
915938e83c35 wifi: mt76: mt7996: Add mt7996_sta_link struct in mt7996_vif_link
3e06380a43a4 wifi: mt76: mt7996: Add vif_cfg_changed callback
f419c62e9198 wifi: mt76: mt7996: Add link_info_changed callback
3082c9edbe35 wifi: mt76: mt7996: Add mt7996_sta_state routine
46e20e5d7455 wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks
1de180821525 wifi: mt76: mt7996: Add mt7996_mac_sta_change_links callback
2efb26f1fc10 wifi: mt76: mt7996: Support MLO in mt7996_mac_sta_event()
2e249744bc12 wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()
0eee20d3e388 wifi: mt76: mt7996: Update mt7996_mcu_add_sta to MLO support
200ce414fe61 wifi: mt76: mt7996: Rely on mt7996_vif_link in mt7996_mcu_twt_agrt_update signature
d195324131ba wifi: mt76: mt7996: Rely on mt7996_vif/sta_link in twt teardown
7757e7c140f7 wifi: mac80211: call rate_control_rate_update() for link STA
a3b651aeb551 wifi: mt76: mt7996: Update mt7996_mcu_add_rate_ctrl to MLO
2a005953dc49 wifi: mt76: mt7996: Add mt7996_mcu_sta_mld_setup_tlv() and mt7996_mcu_sta_eht_mld_tlv()
58e8b71782fc wifi: mt76: mt7996: Add mt7996_mcu_teardown_mld_sta rouine
e0b422f2acaf wifi: mt76: mt7996: rework mt7996_mac_write_txwi() for MLO support
21aa0c288470 wifi: mt76: mt7996: Rely on wcid_to_sta in mt7996_mac_add_txs_skb()
87c437fa8b43 wifi: mt76: mt7996: rework mt7996_rx_get_wcid to support MLO
9b4de3ce7fc7 wifi: mt76: mt7996: rework mt7996_sta_set_4addr and mt7996_sta_set_decap_offload to support MLO
a369b0c14d25 wifi: mt76: mt7996: Add mt7996_sta_link to mt7996_mcu_add_bss_info signature
9c6ec015afbb wifi: mt76: mt7996: rework mt7996_set_hw_key to support MLO
60967d28a5e0 wifi: mt76: mt7996: rework mt7996_sta_hw_queue_read to support MLO
3668d57795e3 wifi: mt76: mt7996: remove mt7996_mac_enable_rtscts()
275e6a681bac wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO
057822770ca5 wifi: mt76: mt7996: rework mt7996_mac_sta_poll to support MLO
b9682a51c109 wifi: mt76: mt7996: rework mt7996_update_mu_group to support MLO
d1a5a0afa6d6 wifi: mt76: mt7996: rework mt7996_net_fill_forward_path to support MLO
56529041b364 wifi: mt76: mt7996: rework mt7996_mcu_add_obss_spr to support MLO
c788d5748dc8 wifi: mt76: mt7996: rework mt7996_mcu_beacon_inband_discov to support MLO
974e6c2df98b wifi: mt76: mt7996: set vif default link_id adding/removing vif links
70717b761af2 wifi: mt76: mt7996: rework set/get_tsf callabcks to support MLO
d01b9d300eaa wifi: mt76: mt7996: rework mt7996_ampdu_action to support MLO
d5cddf65f7a7 wifi: mt76: mt7996: Update mt7996_tx to MLO support
a1ed21a66913 wifi: mt76: mt792x: re-register CHANCTX_STA_CSA only for the mt7921 series
a826fc287483 wifi: mt76: mt7925: update MLO cleanup flow during disconnection
0994f0af632e wifi: mt76: mt7925: fix the incomplete revert of [tx,rx]_ba for MLO
5169d4e8669b wifi: mt76: mt76x2u: add TP-Link TL-WDN6200 ID to device table
46f3a10a9f0f mt76: mt7925: sync with upstream cleanups
de635e1e3adc wifi: mt76: mt7996: fix locking in mt7996_mac_sta_rc_work()
63a4edf1cb74 wifi: mt76: mt7996: add macros for pci decive id
a2dd2f7896f7 wifi: mt76: connac: add support to load firmware for mt7990
3908cf04aa39 wifi: mt76: mt7996: rework WA mcu command for mt7990
6243414a4e80 wifi: mt76: mt7996: rework DMA configuration for mt7990
a8def214d736 wifi: mt76: mt7996: rework register mapping for mt7990
51db7a2d57f6 wifi: mt76: mt7996: add eeprom support for mt7990
d0799f3303e9 wifi: mt76: mt7996: adjust HW capabilities for mt7990
10c3ea97a86d wifi: mt76: connac: rework TX descriptor and TX free for mt7990
bc588ac3d104 wifi: mt76: mt7996: rework background radar check for mt7990
f8c3dd3677dd wifi: mt76: mt7996: add PCI device id for mt7990
3cec186474c4 wifi: mt76: mt7915: set correct background radar capability
9bacdb2bf2c3 wifi: mt76: mt7915: rework radar HWRDD idx
a19543c7e05e wifi: mt76: mt7996: rework radar HWRDD idx
b0cf33e76a3a wifi: mt76: mt7925: Fix logical vs bitwise typo
0433adc883c9 wifi: mt76: mt7925: add EHT preamble puncturing
be28ef77e330 wifi: mt76: mt7996: Add NULL check in mt7996_thermal_init

Signed-off-by: Felix Fietkau <nbd@nbd.name>
13 days agomac80211: backport API change for sta rate control update
Felix Fietkau [Wed, 19 Mar 2025 11:40:50 +0000 (12:40 +0100)]
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>
13 days agocli: extend remove call to allow passing values directly
Felix Fietkau [Thu, 3 Apr 2025 09:51:41 +0000 (11:51 +0200)]
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>
13 days agoqualcommax: eap623od-hd-v1: fix phy node and LED config
Yang Xiwen [Thu, 10 Apr 2025 11:09:42 +0000 (19:09 +0800)]
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>
2 weeks agoramips: mt76x8: add support for MERCUSYS MB130-4G v1
Sergii Shcherbakov [Sat, 1 Feb 2025 01:24:28 +0000 (02:24 +0100)]
ramips: mt76x8: add support for MERCUSYS MB130-4G v1

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>
2 weeks agopackage: add kmod-r8127 ethernet driver
Álvaro Fernández Rojas [Thu, 10 Apr 2025 12:01:33 +0000 (14:01 +0200)]
package: add kmod-r8127 ethernet driver

r8127 is an out of tree driver provided by Realtek for RTL8127 devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2 weeks agomediatek: filogic: add Netcore N60 Pro support
Yujie Zhu [Tue, 8 Apr 2025 14:51:55 +0000 (22:51 +0800)]
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>
2 weeks agoqualcommbe: disable CONFIG_QCOM_IPA kernel config
Christian Marangi [Thu, 10 Apr 2025 10:23:34 +0000 (12:23 +0200)]
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>
2 weeks agoqualcommbe: ipq95xx: Make RPM partition read-only
Christian Marangi [Thu, 30 Jan 2025 15:55:57 +0000 (16:55 +0100)]
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>
2 weeks agoqualcommbe: ipq95xx: Add pending patch fixing NSSCC boot stall
Christian Marangi [Thu, 30 Jan 2025 15:54:02 +0000 (16:54 +0100)]
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>
2 weeks agoqualcommbe: ipq95xx: Drop redundant comment in NSSCC clock patch
Christian Marangi [Thu, 30 Jan 2025 15:47:04 +0000 (16:47 +0100)]
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>
2 weeks agoqualcommbe: ipq95xx: Define default partition table for RFB SPI-NAND
Christian Marangi [Thu, 30 Jan 2025 15:45:16 +0000 (16:45 +0100)]
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>
2 weeks agoqualcommbe: ipq95xx: Refresh dts SPI-NAND patch to v14
Christian Marangi [Thu, 30 Jan 2025 15:41:51 +0000 (16:41 +0100)]
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>
2 weeks agoqualcommbe: ipq95xx: Refresh the NSSCC and PORT patch for new PCIe patches
Christian Marangi [Thu, 30 Jan 2025 15:49:03 +0000 (16:49 +0100)]
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>
2 weeks agoqualcommbe: ipq95xx: Add PCIe upstream patch and related nodes
Christian Marangi [Thu, 30 Jan 2025 15:39:12 +0000 (16:39 +0100)]
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>