Commit Graph

69611 Commits

Author SHA1 Message Date
Shiji Yang ab40696d61 toolchain: gcc: update GCC 14 to 14.4
Changelog:
  https://gcc.gnu.org/gcc-14/changes.html

Remove upstreamed patches:
- patches-14.x/004-libcody-Make-it-buildable-by-C-11-to-C-26.patch[1]
- patches-14.x/005-include-memory.patch[2]
- patches-14.x/240-libsanitizer-fix-termio-glibc-2.40.patch[3]

All other patches are automatically refreshed.

[1] https://gcc.gnu.org/cgit/gcc/commit/?h=releases/gcc-14.4.0&id=daa3e1ead791bc58208043cfc4595ba1a78cdd34
[2] https://gcc.gnu.org/cgit/gcc/commit/?h=releases/gcc-14.4.0&id=046776dac7cc74bdbab36f450af80644a045858a
[3] https://gcc.gnu.org/cgit/gcc/commit/?h=releases/gcc-14.4.0&id=f0feb51ff40553643c582ec9c3ca7f293721ddc8
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/23950
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-06-29 11:40:20 +02:00
Dimitri Souza 002e7613e0 mediatek: acer-predator-w6x: add LED boot status support
Define led-boot, led-failsafe, led-running, and led-upgrade in the
Acer Predator W6X DTSI so the system LED reflects the standard OpenWrt
boot and runtime states.

Signed-off-by: Dimitri Souza <dimitri.souza@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23958
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-29 09:48:52 +02:00
David Yang 3392fd3513 ramips: timecloud: fix LED configs
The LED(s) does not have a label for status, ethernet, or whatsoever.

These two LEDs, are used to form one dual-color indicator. On vendor
firmware, the light is turned from orange to white, when external
storage is detected and ready to use. However, if we use white for any
other triggers (USB / SD card / ethernet), it is difficult to see while
the orange is on. Thus, we change led-running to white to indicate a
successful startup.

Also add the missing pinmux config for uart3 since LEDs take GPIO 7 and
8.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23182
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-29 09:36:35 +02:00
David Yang 6420c5f1e9 ramips: timecloud: add label-mac-device
The only MAC address of the device is labeled at the bottom.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23182
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-29 09:36:34 +02:00
David Yang f2f8b83fdc ramips: timecloud: fix eject button
The 'BTN_0' is actually for safe hard drive removal and activated high.
Fix it.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23182
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-29 09:36:34 +02:00
David Yang 1ab6f5506f ramips: timecloud: increase SPI flash speed
Thunder Timecloud uses MX25L12835FM2I-10G which supports fast read and
up to 133MHz. Increase its speed.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23182
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-29 09:36:34 +02:00
Florian Maurer 946b820856 wifi-scripts: ucode: check wpa_supplicant exists before mesh probe
The mesh capability check unconditionally ran wpa_supplicant -vmesh to
detect driver support. On devices where wpa_supplicant is not installed,
this produces a "/bin/sh: wpa_supplicant: not found" error in the logs
on every wifi reconfiguration even when no mesh interface is configured.

Guard the invocation with fs.access() so the binary is only executed
when it is actually present, and use its absolute path to avoid relying
on $PATH.

Signed-off-by: Florian Maurer <fmaurer@disroot.org>
Link: https://github.com/openwrt/openwrt/pull/23607
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-29 09:26:56 +02:00
Florian Maurer 010e8b731a wifi-scripts: ucode: remove trailing whitespace
Removes trailing whitespace from mac80211.sh

Signed-off-by: Florian Maurer <fmaurer@disroot.org>
Link: https://github.com/openwrt/openwrt/pull/23607
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-29 09:26:56 +02:00
Florian Maurer 0d747a8edb wifi-scripts: ucode: only set antenna when config changes
mac80211's ieee80211_set_antenna() rejects calls with -EOPNOTSUPP once
the radio is started (local->started == true). The spurious failure
triggers a wpa_supplicant invocation in the error path, producing both
a "command failed: Not supported (-122)" message and (where wpa_supplicant
is not installed) a "/bin/sh: wpa_supplicant: not found" message in the
log on every wifi reconfiguration.

In this code path, reset_config() tears down all interfaces before the
antenna is touched, so local->started is false exactly when the antenna
config has changed. Skip the iw phy set antenna call otherwise, matching
the behaviour of mainline OpenWrt's bash mac80211.sh. The trade-off is
that we no longer re-assert the antenna mask on warm reconf if it was
cleared out-of-band (e.g. by a driver reload); in practice drivers do
not clear it mid-life.

Also split the antenna details out of the generic "Configuring '${phy}'
distance: ..." log line so it isn't claimed when the call was skipped.

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Florian Maurer <fmaurer@disroot.org>
Link: https://github.com/openwrt/openwrt/pull/23607
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-29 09:26:56 +02:00
Fil Dunsky 673df8f6a9 mediatek: add support Livinet Li320
This commit adds support for Livinet Li320 wireless router.

Specification
-------------
- SoC       : MediaTek MT7981B dual-core ARM Cortex-A53
- RAM       : 512MB
- Flash     : SPI-NAND Fudan Micro FM25S01BI3
- WLAN      : MediaTek MT7976 dual-band Wi-Fi 6
- Ethernet  : MediaTek MT7531 switch, 1x WAN + 3x LAN (2.5GbE uplink via gmac0)
- Buttons   : WPS, Reset
- LEDs      : 8xGreen, 1xRed
- Power     : Barrel DC 12v

Installation
------------
The factory firmware is a compatible OpenWrt-based fork, allowing
direct installation via the LuCI upgrade page using the sysupgrade image.

MAC addresses
-------------
| Interface | MAC source               |
|-----------|--------------------------|
| LAN       | Factory 0x4 (mac-base -1)|
| WAN       | Factory 0x4 (mac-base -2)|
| WLAN 2.4G | Factory 0x4 (mac-base)   |
| WLAN 5G   | Factory 0x4 (mac-base +1)|

Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23744
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-29 09:15:18 +02:00
Grische e54f0353c2 rockchip: add support for FriendlyARM NanoPi R2S Plus
The NanoPi R2S Plus is a NanoPi R2S with on-board eMMC added. The device
tree (rk3328-nanopi-r2s-plus.dts) is already present in kernel 6.12, and
U-Boot support has been present since v2025.01, so neither a kernel DTS
backport nor a U-Boot patch is required.

Hardware
--------
Rockchip RK3328 (4x Cortex-A53, up to 1.4 GHz)
1GB DDR4 RAM
32GB eMMC 5.1
microSD slot (up to 128GB)
1x 1000 Base-T (native, RTL8211F via GMAC) - WAN
1x 1000 Base-T (USB 3.0, RTL8153B) - LAN
Optional M.2 SDIO Wi-Fi
2x USB 2.0 Type-A host
1x USB-C (5V power input, USB device for Maskrom update)
1x USB-C (onboard USB-to-UART debug console, 1500000 bps)
1x serial debug header / UART0 (3.3V TTL, 3-pin 2.54mm)
2 Buttons (GPIO key, Maskrom)
3 LEDs (SYS red, WAN green, LAN green)
DC 5V/2A power
Operating temperature 0 to 70 C

The MAC addresses are derived from the eMMC CID, so they are stable
regardless of whether the device boots from microSD or eMMC.

Installation
------------

On RK3328 the BootROM boots the eMMC before the microSD slot, so the
Maskrom button must be held to boot from microSD while stock firmware is
still on the eMMC.

How to boot from eMMC:

1. Write the uncompressed sysupgrade image to sdcard
2. Hold the "Mask" button while powering on the device
3. Wait until OpenWrt is fully booted
4. Copy the compressed .gz sysupgrade image to the machine's /tmp folder using scp
5. Run: gunzip -c /tmp/openwrt-...-friendlyarm_nanopi-r2s-plus-squashfs-sysupgrade.img.gz | dd of=/dev/mmcblk1 bs=4M conv=fsync
6. Power the device off, remove the sdcard and power it back on

Tested:
- microSD boot (via Maskrom button) and native eMMC boot
- Both Ethernet ports (RTL8211F WAN, RTL8153B LAN)
- eMMC-derived MAC addresses

Signed-off-by: Grische <github@grische.xyz>
Assisted-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Link: https://github.com/openwrt/openwrt/pull/23854
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-29 09:13:34 +02:00
Mikhail Zhilkin a6ecb09985 airoha: add support for Nokia XG-040G-MD
This commit adds support for Nokia XG-040G-MD XG-PON ONU.

Specification
-------------
- SoC       : Airoha AN7581DT Quad-core ARM Cortex-A53 1.2 GHz
- RAM       : 512 MiB DDR4 (ESMT M16U4G16256A-QLB)
- Flash     : SPI-NAND 256 MiB (SkyHigh ML02G300WHI00)
- WLAN      : -
- Ethernet  : 1x 2500 Mbps (LAN1, Airoha EN8811HN)
              3x 10/100/1000 Mbps (LAN2-LAN4, Airoha AN7581 SoC switch)
- XG-PON    : ECONET EN7572AN, SLIC: MaxLinear PEF32001VSV12
- USB       : 1x USB 3.0 (with power control via gpio)
              1x USB 2.0 (with power control via gpio)
- Buttons   : Reset
- LEDs      : 1x Power (green, gpio-controlled)
              1x WAN (green, gpio-controlled)
              1x WAN (red, gpio-controlled)
              4x LAN (green, gpio-controlled)
              2x USB (green)
- Power     : 12 VDC, 1 A

Unsupported functions and limitations
-------------------------------------
1. XG-PON won't be available after installing OpenWrt.

Installation (stock layout, UART)
---------------------------------
1. Attach UART and run picocom:
   picocom -b 115200 --send-cmd "sb -vv" /dev/ttyUSB0
2. Interrupt boot process by pressing Enter key to enter u-boot
   Username: telecomadmin
   Password: nE7jA%5m
3. Start download firmware via ymodem protocol (via UART):
   loady 0x85000000
4. Press Ctrl + A then Ctrl + S in the picocom terminal (if you are using
   a different terminal, please refer to the documentation) to start
   upload OpenWrt initramfs image using ymodem protocol. Enter local path
   to the OpenWrt initramfs image and press Enter.
5. Load OpenWrt initramfs image from the memory:
   bootm 0x85000000
5. Sysupgrade with OpenWrt sysupgrade image

Alternative for the p.3-4. Load and boot OpenWrt initramfs from tftp IP
192.168.1.254:
   tftpboot 0x85000000 192.168.1.254:openwrt-initramfs-uImage.itb
   bootm 0x85000000
I was unable to download the file without errors, the bootloader network
driver is very unstable. Perhaps you will be more fortunate.

Backup and installation (stock layout, without UART)
----------------------------------------------------
1. Unplug Fiber
2. Make ONU Reset
3. Navigate: http://192.168.1.1
   Username: CMCCAdmin
   Password: aDm8H%MdA
4. Go to Apps -> Home Storage -> FTP and check Enable FTP
5. Go to Apps -> Home Storage -> SAMBA Sharing and check Enable Samba
6. Visit the following URL to open Telnet:
   http://192.168.1.1/system.cgi?telnet
7. Telnet account login:
   Username: user
   Password: <see ONU label>
8. Get root privileges:
   su user_ftp
   Password: <see ONU label>
9. Copy 'squashfs-factory-kernel.bin', 'squashfs-factory-rootfs.bin' and
   'OpenWrt.mtd2.u-boot-env.bin' (backup of 'u-boot-env' partition from
   the another Nokia XG-040G-MD with OpenWrt installed)
9. Attach USB flash drive and check the new dir in /mnt:
   ls /mnt
10. Change current dir to the flash drive (change D to your flash drive
   label):
   cd /mnt/D
11. Make backup:
   for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; \
   do cat /dev/mtd$i | gzip -9 > mtd$i.bin.gz; done
12. Check image sizes:
   ls -l | awk '{if(NR>1) {$5=sprintf("0x%x", $5); print}}'
13. Write images:
   mtd_debug erase /dev/mtd0 0x60000 0x20000
   mtd_debug write /dev/mtd0 0x60000 0x20000 OpenWrt.mtd2.u-boot-env.bin
   mtd_debug erase /dev/mtd14 0x0 0x2880000
   mtd_debug write /dev/mtd14 0x0 0x3e6cfc squashfs-factory-kernel.bin
   mtd_debug erase /dev/mtd11 0x0 0x80e0000
   mtd_debug write /dev/mtd11 0x0 0x440000 squashfs-factory-rootfs.bin
   0x3e6cfc - size of your 'squashfs-factory-kernel.bin'
   0x440000 - size of your 'squashfs-factory-rootfs.bin'
14. Reboot:
   reboot

Recovery (stock layout)
-----------------------
The same as described in Installation (UART).

Return to stock (stock layout)
------------------------------
1. Follow the steps 1-5 of the Installation (UART)
2. Once in OpenWrt upload you backup to the /tmp dir of the router:
   scp -O mtd16.bin.gz root@192.168.1.1:/tmp
5. Connect to the router using ssh and install kmod-mtd-rw:
   apk update && apk add kmod-mtd-rw
   insmod mtd-rw i_want_a_brick=1
6. Unlock bootloader:
   mtd unlock bootloader
7. Restore stock:
   zcat /tmp/mtd16.bin.gz | mtd write - all_flash
8. Reboot:
   reboot

Notes (OpenWrt U-Boot layout)
-----------------------------
1. Only devices with SkyHigh ML02G300WHI00 spi-nand are supported. Driver
   for FudanMicro FM25G02B is absent in current U-Boot.
2. A simple installation without serial console is also possible using a
   fork of @dangowrt's UBI Installer
Link: https://github.com/dangowrt/owrt-ubi-installer

Installation / recovery (OpenWrt U-Boot layout)
-----------------------------------------------
1.  Make sure that you have 'bosa' and 'ri' partitions mtd backups before
    you start
2.  Place OpenWrt images on the tftp server (IP: 192.168.1.254):
    openwrt-airoha-an7581-nokia_xg-040g-md-ubi-bl31-uboot.fip
    openwrt-airoha-an7581-nokia_xg-040g-md-ubi-initramfs-recovery.itb
    openwrt-airoha-an7581-nokia_xg-040g-md-ubi-preloader.bin
3.  Attach serial console and start terminal with XMODEM support:
    picocom -b 115200 --send-cmd "sx -vvX" /dev/ttyUSB0
4.  Push reset button and power on the router
5.  Press 'x', then 'Ctrl + A' and 'Ctrl + S'
6.  Paste full path to the bl2 image:
    'openwrt-airoha-an7581-nokia_xg-040g-md-ubi-preloader.bin'
7.  Wait until the file is downloaded and the following prompt appears:
    Press x to load BL31 + U-Boot FIP
8.  Press 'x', then 'Ctrl + A' and 'Ctrl + S'
9.  Paste full path to the fip image:
    'openwrt-airoha-an7581-nokia_xg-040g-md-ubi-bl31-uboot.fip'
10. Wait until the file is downloaded, u-boot will prepare ubi partition
    automatically
11. Wait for U-Boot menu
12. Run 'Load BL31+U-Boot FIP via TFTP then write to NAND'
13. Run 'Load BL2 preloader via TFTP then write to NAND'
14. Run 'Boot system via TFTP'
15. Once in OpenWrt perform standard sysupgrade
16. Once in OpenWrt upload 'bosa' and 'ri' partitions mtd backups to the
    /tmp dir using scp protocol
17. Check ID of the UBI volumes:
    ubinfo -d 0 -N bosa | grep "Volume ID"
    ubinfo -d 0 -N ri | grep "Volume ID"
18. Write backups according to the volume ID:
    ubiupdatevol /dev/ubi0_2 /tmp/bosa.bin
    ubiupdatevol /dev/ubi0_3 /tmp/ri.bin
19. Reboot:
    reboot

Stock layout
------------
+-------+------------+---------+---------+
| mtd   | label      | start   | size    |
+-------+------------+---------+---------+
| mtd0  | bootloader | 0       | 80000   |
| mtd1  | romfile    | 80000   | 40000   |
| mtd14 | nsb_master | c0000   | 2880000 |
| mtd15 | nsb_slave  | 2940000 | 2880000 |
| mtd6  | bosa       | 51c0000 | 40000   |
| mtd7  | ri         | 5200000 | 40000   |
| mtd8  | flag       | 5240000 | 40000   |
| mtd9  | flagback   | 5280000 | 40000   |
| mtd10 | config     | 52c0000 | a00000  |
| mtd11 | data       | 5cc0000 | 80e0000 |
| mtd12 | oopsfs     | dda0000 | 400000  |
| mtd13 | log        | e1a0000 | a00000  |
+-------+------------+---------+---------+

USB power control
-----------------
Disable (both ports):
   echo disabled > /sys/devices/platform/usb-power/state
Enable (both ports):
   echo enabled > /sys/devices/platform/usb-power/state

UART
----
A view from the back side of the PCB:
   ------------------------
   |       GND RX TX
   |        X  X  X
Connection parameters:
115200, 8N1, 3.3V

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| LAN     | 04:xx:xx:xx:xx:0d | label     |
| WAN     | 04:xx:xx:xx:xx:0e | label + 1 |
+---------+-------------------+-----------+
The LAN MAC (hex) was found in 'ri', 0x3e

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23569
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-29 02:01:29 +02:00
Mikhail Zhilkin 0277c8601e uboot-airoha: add support for Nokia XG-040G-MD
Add support for Nokia XG-040G-MD.

Known issues
------------
1. Reset button is currently doesn't work and cannot be used to start
tftp recovery:
   Button 'reset' not found (err=-19)
   LED 'green:power' not found (err=-19)

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23569
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-29 02:01:29 +02:00
Mikhail Zhilkin 0d807a16b1 uboot-airoha: add readmem command
This command is required to read and set device MAC address. The patch
was copied from mediatek target.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23569
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-29 02:01:29 +02:00
Mikhail Zhilkin 77ed809ce3 uboot-airoha: add custom title support
The patch was copied from mediatek target.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23569
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-29 02:01:29 +02:00
Mikhail Zhilkin 989ae157e0 uboot-airoha: fix sorting
This commit fixes sorting in Makefile.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23569
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-29 02:01:29 +02:00
Mikhail Zhilkin f79e66d996 airoha: an7581: enable mtd virtual concat support
This is required for upcoming Nokia XG-040G-MD support.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23569
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-29 02:01:29 +02:00
Markus Stockhausen 3a7595dcde realtek: pcs: simplify gray code to binary conversion
Gray conversion is b[i] = g[i] XOR g[i+1] XOR ... XOR g[n-1]
Make the code a 3 liner. For more details see [1].

[1] https://en.wikipedia.org/wiki/Gray_code#Converting_to_and_from_Gray_code

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23984
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-28 23:44:31 +02:00
Jonas Jelonek 8b0ce8e4e3 realtek: pcs: rtl930x: simplify DCVS/VTH/TAP calibration helpers
Reduce repetition in dcvs_manual, dcvs_get, vth_manual and tap_manual
by hoisting the per-channel enable bit write out of per-case branches
and encoding per-channel register/bit mappings as lookup tables where
the pattern is uniform across channels.

This also fixes two bugs in dcvs_get that were hidden in the switch:

- DCVS1 read never populated dcvs_sign_out; it wrote the sign bit read
  (0x14[4:4]) into dcvs_coef_bin and then immediately overwrote it with
  the coefficient read, leaving the sign always zero for that channel.

- DCVS3 assigned the manual bit read directly to a bool without the !!
  normalisation applied to all other cases.

Link: https://github.com/openwrt/openwrt/pull/23983
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-28 23:38:37 +02:00
Jonas Jelonek 393d5b01fb realtek: pcs: rtl930x: fix LEQ calibration to use media type
Replace the mode-based approximation in the LEQ adapt+lock step with
proper media-based logic using the newly stored sds->media field. Those
adjustments are based on SDK code and digging through some basics of
signal conditioning.

PCB connections route through an external PHY (PHY-attached); that PHY
handles its own equalization so the SerDes LEQ is left in free-running
auto-adapt with no correction offset. DAC and fiber SFP connect directly
to the SerDes without an intermediate PHY and require a calibrated lock.

Replace the SDK's dacLongCableOffset/eqHoldEnable variable pair with a
single direct_serdes bool and encode the full per-media LEQ correction
into one switch: fiber +3 (direct SerDes, no cable), DAC short +4
(base 3 + 1), DAC long +6 (base 3 + 3).

Fix the MAXHOLD_EN bit (0x17[7]) and the 0x0c[8] write to be gated on
direct_serdes; both were previously conditioned on PCB which is the
PHY-attached case and thus wrong. Fix the LEQ lock to apply to all
direct SerDes connections (DAC + fiber), not just PCB. Also drop the
spurious dead-code branch that was an artifact of the original
transplanting.

No behavioral change because this particular function of calibration is
not used right now but will be in the future.

Link: https://github.com/openwrt/openwrt/pull/23983
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-28 23:38:36 +02:00
Jonas Jelonek 8dd1c280ae realtek: pcs: store active media type in SerDes state
Track the resolved media type in struct rtpcs_serdes alongside hw_mode,
storing it as soon as rtpcs_sds_select_media() resolves it so all
subsequent ops (set_hw_mode, activate, post_config) can access it.

This is unused for now and will be used only in dead code in next
patches. Though, this dead code is going to be used with subsequent
patches.

Link: https://github.com/openwrt/openwrt/pull/23983
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-28 23:38:36 +02:00
Jonas Jelonek d5615c1df6 realtek: pcs: rtl930x: give some calibration functions meaningful names
Adapted from the SDK, the calibration functions are just named after
their sequential logic and with a numbering scheme. This doesn't help
understanding what the code is doing. Instead, give some of them
meaningful names where possible, revealing kind of a logical structure.

Link: https://github.com/openwrt/openwrt/pull/23983
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-28 23:38:36 +02:00
Jonas Jelonek f33b49d0a7 realtek: pcs: rtl930x: reduce calibration code nesting
The calibration code is deeply nested with multiple function using
numeric nesting. Though it tries to follow the SDK pattern, this makes
it just unnecessarily complex and confusing. Dissolve some of this
unneeded nesting, together with some minor cleanup here and there.

Link: https://github.com/openwrt/openwrt/pull/23983
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-28 23:38:35 +02:00
Rosen Penev c1ba308aa6 lantiq: vrx518_ep: use module_pci_driver macro
Use = {} to get rid of the memset so that init is just
pci_register_driver with extra prints.

Assisted-by: Opencode:Big-Pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23976
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-28 23:36:05 +02:00
John Audia 27ca0a3eef kernel: bump 6.18 to 6.18.37
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.18.37

All patches automatically rebased via update_kernel.sh

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/23971
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-28 22:29:48 +02:00
Mieczyslaw Nalewaj beb880855c rtl8367b: fix RTL8367S-VB vlan mc memory handling
The RTL8367S-VB (Family D) uses a software-emulated VLAN MC table
(emu_vlanmc) since it lacks hardware support for the VLAN MC registers
used by earlier chips.

- Add missing NULL check after kzalloc() in rtl8367b_init_regs() to
  prevent NULL pointer dereference on allocation failure.
- Add missing kfree(smi->emu_vlanmc) in rtl8367b_remove() to prevent
  memory leak on driver unload.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/23970
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-28 22:25:30 +02:00
Rosen Penev 0d892f17c9 fs: rpsec: add missing modules for CRYPTO_KRB5
Upstream selects these for CRYPTO_KRB5.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23794
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-28 22:09:37 +02:00
Hauke Mehrtens 3c26b9fd64 ubus: update to Git HEAD (2026-06-28)
24864e7840b3 ubusd_id: use GRND_INSECURE to avoid blocking boot on getrandom()

Fixes: https://github.com/openwrt/ubus/issues/21
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-28 16:48:20 +02:00
John Audia b882cd76ec linux-firmware: update 20260622
% git log --no-merges --pretty=oneline --abbrev-commit 20260519...20260622
0798ed4d1dcd nxp: add firmware for IW61x WiFi device
431c5ea014f9 mediatek MT7922: update bluetooth firmware to 20260605203811
2d7053937558 mediatek MT7925: update bluetooth firmware to 20260605184935
bd1c66cfef5f linux-firmware: update firmware for MT7925 WiFi device
1a2f6aca3c9c linux-firmware: update firmware for MT7922 WiFi device
f0fcc1d248cb amdgpu: DMCUB updates for various ASICs
85780e744984 qcom: add LPAICP firmware for shikra platform
aa2c4a6cee7f qcom: Add qdsp6sw firmware for shikra platform
ddaa2620f48f linux-firmware: update firmware for MT7986
17485a680e53 linux-firmware: update firmware for MT7981
17ca86eb15f6 linux-firmware: update firmware for MT7996
1cccfa6b8073 linux-firmware: update firmware for MT7992
f8cd3f6faae7 linux-firmware: update firmware for MT7990
10bf07f6404f qcom: Update ADSP firmware for Kaanapali platform
c5774bd79997 qcom: update ADSP firmware for glymur platform
dd571d3fe15f qcom: update CDSP firmware for glymur platform
3dcf6778d29c QCA: Add bluetooth firmware nvm files for USI/NFA725B
aba75bb237b6 linux-firmware: Add firmware file for Intel BlazarIW
4a32fece257f linux-firmware: Update firmware file for Intel BlazarU core
7bf0edbf74a2 linux-firmware: Update firmware file for Intel BlazarI core
431e7f03d2c7 linux-firmware: Update firmware file for Intel Scorpius core
6ed5e5aa4a02 qcom: update ADSP firmware for qcs615 platform
8df26c69bbe9 cirrus: cs42l45: Update CS42L45 SDCA codec firmware for Dell laptops
ce8c0b7174fc rtl_bt: Update RTL8852A BT USB firmware to 0x244F_91B6
861ddef6ec1c realtek: rt1321: Update the patch code to v1.10
2d2d180a1cc0 amdgpu: DMCUB updates for various ASICs
ca254b03dc5b QCA: Update Bluetooth WCN3950 firmware 1.3.0-00108 to 1.3.0-00184
acb740a9bfaf qcom: update CDSP firmware for shikra platform
71f496945eb7 qcom: Update ADSP firmware for Glymur platform
1e6faaf837ae Remove any files with unknown licenses
7ad9f3aaa96b AGENTS.md, README: address second round of MR review
acda46b96b76 README: document AI assisted contribution convention
57ab6873b2fd AGENTS.md: clarify areas raised in MR review
45fb99aef1cd Add AGENTS.md for AI coding agents
e930d3975f23 LICENSES: update GPL-2.0 text and references
430c892e7460 LICENSES: rename GPL-3 to GPL-3.0-only
847ba27f6c18 LICENSES: rename Apache-2 to Apache-2.0
1221848f2376 Move firmware licenses to a LICENSES/ directory
72a012ee810d qcom: update ADSP firmware for sm8750 platform
5118abf637cb QCA: Update Bluetooth WCN6856 firmware 2.1.0-00666 to 2.1.0-00669
f7feff550c56 qcom: Update DSP firmware for qcs8300 platform
3bfa40aaa331 qcom: Update DSP firmware for sa8775p platform
4d575d919be3 amdgpu: Update DMCUB fw for DCN314
47bffda9bb89 amdgpu: revert yellow carp VCN firmware
268bb3d259a0 amdgpu: revert vangogh VCN firmware
8d5b020868c6 amdgpu: revert sienna cichlid VCN firmware
640aa1db8e7f amdgpu: revert navy flounder VCN firmware
4ade9cf51e4d amdgpu: revert dimgrey cavefish VCN firmware
f1ea993bb900 amdgpu: revert beige_goby VCN firmware
2110f8af357d qcom: update CDSP firmware for x1e80100 platform
e108a9ab7a94 cirrus: cs35l56: Add firmware for Cirrus Amps for a Dell laptop
5670228453b1 linux-firmware: Add RCA firmware files for tas257x projects
a329a4c520af intel_vpu: Update NPU firmware
075a812eca30 cirrus: cs35l63: Add Cirrus CS35L63 firmware mappings for various Dell laptops
d33a9c6d7661 cirrus: cs35l56: Update firmware for Cirrus Amps for a couple of Lenovo laptops
1a794cdf93cd cirrus: cs35l56: Add firmware for Cirrus Amps for a Lenovo laptop
282d83cf7a32 QCA: Add BCS calibration binary for QCC2072
5ce19c7bb06f QCA: Update Bluetooth firmware for QCC2072 UART interface
c8c796dcdd3b amdgpu: DMCUB updates for various ASICs
4f6efdd350e4 rtl_nic: add firmware rtl8261c.bin for RTL8261c
831ea4af30e1 cirrus: cs35l56: Add Cirrus CS35L56 firmware mappings for two Dell laptops
830ba56b93d3 i915: Xe3LPD DMC v2.36
563b533d4f56 i915: Xe3LPD_3002 DMC v2.31
9357f2b5010a i915: Xe3p_LPD DMC v2.37
df472a73b917 cirrus: cs35l56: Add firmware for Cirrus Amps for some Lenovo laptops
542ad48830f6 cirrus: cs42l45: Update CS42L45 SDCA codec firmware for Lenovo laptops
dd7b12f0d458 cirrus: cs42l45: Add CS42L45 SDCA codec firmware for Lenovo laptops
ef77d60eebba qcom: Add gpu firmwares for Shikra chipset
72a09795db65 cirrus: cs35l56: Update firmware for Cirrus Amps for some Dell laptops
f97831a28950 rtw89: 8852b: update fw to v0.29.29.18
d0bf0bc94f2d rtw89: 8852bt: update fw to v0.29.122.2
d531e213dea8 amdgpu: Update gc 11.0.1 microcode

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/23974
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-28 14:49:57 +02:00
John Audia 6e9fd1c3ba elfutils: update to 0.195
Patches rebased:
- 003-libintl-compatibility.patch
- 005-build_only_libs.patch
- 006-Fix-build-on-aarch64-musl.patch
- 101-no-fts.patch

Patches removed due being upstreamed:
- 007-add-libeu-symbols-to-libelf.patch
- 008-fix-autoconf-ENABLE_IMA_VERIFICATION.patch
- 009-fix-null-dereference-with-lto.patch
- 102-fix-potential-deref-of-null-error.patch

Note that this release is needed in order to build against GCC 16.1
https://github.com/openwrt/openwrt/pull/23194

Release notes from 0.192 to 0.195:
https://inbox.sourceware.org/elfutils-devel/CAJDtP-RjuT13zehLgSvz9TnwQZ1VYPOS=q_kuut5a2g+KLamgw@mail.gmail.com/T/
https://inbox.sourceware.org/elfutils-devel/CAJDtP-S0rYAOZQeDZvMtPkQztgK9RboWtYwpqNLCNGNdaSGn-A@mail.gmail.com/T/
https://inbox.sourceware.org/elfutils-devel/CAJDtP-Qok4ViNzvrr28WgkCCqrFH0iAZStiD8C7nbpDhrPzLWA@mail.gmail.com/T/

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/23468
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-28 11:54:12 +02:00
Markus Stockhausen 23e5161399 realtek: l3: move router MAC helpers to layer 3 ecosystem
The router MAC helpers and their structures belong to layer 3.
Move them over to the new source file.

Link: https://github.com/openwrt/openwrt/pull/23963
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-28 08:46:37 +02:00
Markus Stockhausen 0738b151eb realtek: l3: move route_lookup_hw over to layer 3 structure
Another layer 3 function that needs a new home. As always convert
the code to dev_...() logging.

Link: https://github.com/openwrt/openwrt/pull/23963
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-28 08:46:37 +02:00
Markus Stockhausen b440cd00d1 realtek: l3: move nexthop helper to new struture
Another two layer 3 functions that do not belong into the DSA
space. Move them over to the L3 configuration structure.

Link: https://github.com/openwrt/openwrt/pull/23963
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-28 08:46:37 +02:00
Markus Stockhausen a74b29731c realtek: l3: move route read/write into new structure
Reading and writing routes is part of the layer 3 code.
Move it to where it belongs. While we are here convert
pr_...() logging to dev_...() logging.

Link: https://github.com/openwrt/openwrt/pull/23963
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-28 08:46:37 +02:00
Markus Stockhausen c6df98aecb realtek: l3: add device specific configuration
All the layer 3 device specific functions and attributes currently
live in the DSA driver. Add a configuration structure to the layer
3 code. For now provide and fill a dummy value. It will be replaced
with meaningful data with the next patches.

Link: https://github.com/openwrt/openwrt/pull/23963
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-28 08:46:37 +02:00
Markus Stockhausen fa45a65423 realtek: l3: convert function signatures from priv to ctrl
Get rid of the priv pointer in the function signatures.
Hand over the new layer 3 control structure instead.

Link: https://github.com/openwrt/openwrt/pull/23963
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-28 08:46:36 +02:00
Markus Stockhausen 885345b268 realtek: l3: convert to device based logging
Make device logging consistent. For this

- add a device attribute to the new layer 3 control structure
- convert pr_...() logging to dev_...() logging.

Link: https://github.com/openwrt/openwrt/pull/23963
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-28 08:46:36 +02:00
Markus Stockhausen dc753e2d32 realtek: l3: convert otto_l3_walk_data to control structure
Use new control structure in walk data.

Link: https://github.com/openwrt/openwrt/pull/23963
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-28 08:46:36 +02:00
Markus Stockhausen 1f0b80a53c realtek: l3: replace priv with ctrl in work structures
Use layer 3 control structure as attribute in work structures.

Link: https://github.com/openwrt/openwrt/pull/23963
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-28 08:46:36 +02:00
Markus Stockhausen 5bffee2b4a realtek: l3: move routes to l3 structure
Make routes an attribute of the new layer 3 control structure.

Link: https://github.com/openwrt/openwrt/pull/23963
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-28 08:46:36 +02:00
Hauke Mehrtens 313ad4789b odhcpd: update to Git HEAD (2026-06-28)
68f382690bfa statefiles: escape client hostnames in the lease state file

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-28 00:46:48 +02:00
Hauke Mehrtens f5d928e52a umdns: update to Git HEAD (2026-06-27)
dbee55098c2e Change domain variable to const char* for gcc 15 compatibility

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-27 17:30:10 +02:00
Carsten Schuette cdf9158508 dtc: update to 1.8.1
Changelog:
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tag/?h=v1.8.1
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tag/?h=v1.8.0

This also fixes #23671

Signed-off-by: Carsten Schuette <schuettecarsten@googlemail.com>
Link: https://github.com/openwrt/openwrt/pull/23677
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-27 16:24:14 +02:00
Hauke Mehrtens f1a41ccb3d odhcp6c: update to Git HEAD (2026-06-27)
10a52220aec9 config: drop misleading const from option-parsing input strings

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-27 16:12:46 +02:00
Rosen Penev 8ff69df2e0 irq-ath79-intc: move irq_chip to private struct
For whatever reason, the static array change is causing massive dmesg
spam. Revert it for now.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23884
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-27 12:07:34 +02:00
Rosen Penev dcbb2f58dc irq-ath79-intc: use of_irq_get
Modern version of irq_of_map_and_parse() that does not require
irq_dispose_mapping() to be called.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23884
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-27 12:07:34 +02:00
Aleksander Jan Bajkowski 91fa75d7f4 airoha: an7581: fix GPS support on Gemtek W1700k
This commit removes unnecessary pinctrl nodes for the PHY LEDs. The LEDs are
controlled directly via GPIO pins. Alternate function of gpio33/34 is CTS/RTS
for UART2. It looks like this pinctrl is somehow conflicting with HSUART. This
is likely an errata in the early silicon revision. HSUART is connected to GPS.
The comment incorrectly states that the PHY driver doesn't attach. The driver
attaches correctly, the only drawback is a warning in the log.

Warning:
[   10.463371] mdio_bus mt7530-0: Failed to setup PHY LED pinctrl
[   10.494230] mdio_bus mt7530-0: Failed to setup PHY LED pinctrl
[   10.926028] mt7530-mmio 1fb58000.switch: configuring for fixed/internal link mode
[   10.933640] mt7530-mmio 1fb58000.switch lan3 (uninitialized): PHY [mt7530-0:09] driver [Airoha AN7581 PHY] (irq=50)
[   10.944890] mt7530-mmio 1fb58000.switch lan4 (uninitialized): PHY [mt7530-0:0a] driver [Airoha AN7581 PHY] (irq=51)

GPS test:
root@OpenWrt:~# minicom -D /dev/ttyS2 -b 460800
...
$GNGGA,000106.012,,,,,0,0,,,M,,M,,*52
$GNGLL,,,,,000106.012,V,N*60
$GNGSA,A,1,,,,,,,,,,,,,,,,1*1D
$GNGSA,A,1,,,,,,,,,,,,,,,,2*1E
$GNGSA,A,1,,,,,,,,,,,,,,,,3*1F
$GNGSA,A,1,,,,,,,,,,,,,,,,4*18
$GPGSV,1,1,00,1*64
...

Fixes: 99307582de ("airoha: add support for Gemtek W1700K")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/23936
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-27 12:03:13 +02:00
Konstantin Demin 97424f9c86 toolchain: gcc: update GCC 15 to 15.3.0
Release Notes: https://gcc.gnu.org/gcc-15/changes.html

Removed upstreamed:
 toolchain/gcc/patches-15.x/004-libcody-Make-it-buildable-by-C-11-to-C-26.patch [1]

[1] https://github.com/gcc-mirror/gcc/commit/1f0224e8ddb3d3d0bf4c7a11769b193a4df5cc37

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23771
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-27 11:54:03 +02:00
Hauke Mehrtens 0161349c1b ead: fix compilation with GCC 15
GCC 15 defaults to C23, where an empty parameter list "()" means
"(void)" instead of an unspecified argument list. This broke two spots
in the bundled tinysrp sources:

  - The interrupt() signal handler in t_truerand.c was declared with
    "()", so its type became "void (*)(void)" and no longer matched the
    "void (*)(int)" expected by signal():

      t_truerand.c:100:32: error: passing argument 2 of 'signal' from
      incompatible pointer type [-Wincompatible-pointer-types]

    Give it the proper signal handler signature instead.

  - The pre-ANSI fallback in t_defines.h declared strchr(), strrchr()
    and strtok() with "()". ead.c is compiled without -DHAVE_CONFIG_H,
    so STDC_HEADERS is undefined and that legacy branch is taken, where
    the zero-argument prototypes now conflict with the declarations in
    the standard headers:

      tinysrp/t_defines.h:90:30: error: conflicting types for 'strtok';
      have 'char *(void)'

    Drop the dead K&R branch and include <stdlib.h> and <string.h>
    unconditionally; the library's own objects already take this path
    via config.h.

Assisted-by: Claude:claude-opus-4-8
Link: https://github.com/openwrt/openwrt/pull/23955
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-27 11:50:10 +02:00
Hauke Mehrtens 4a5642413b thc-ipv6: fix compilation with GCC 15
GCC 15 defaults to C23, where an empty parameter list "()" means
"(void)" instead of an unspecified argument list. This broke thc-ipv6 in
two ways:

 - thc-ipv6.h declared thc_open_ipv6() with an empty argument list, so
   its prototype became "int(void)" and conflicted with the actual
   definition "int thc_open_ipv6(char *interface)" and all of its
   callers:

     thc-ipv6-lib.c:127:36: error: too many arguments to function
     'thc_open_ipv6'; expected 0, have 1
     thc-ipv6-lib.c:2555:5: error: conflicting types for 'thc_open_ipv6';
     have 'int(char *)'

 - The alarming() SIGALRM handlers in detect_sniffer6.c and thcping6.c
   were declared with "()", so their type became "void (*)(void)" and no
   longer matched the "void (*)(int)" expected by signal():

     detect_sniffer6.c:140:19: error: passing argument 2 of 'signal'
     from incompatible pointer type [-Wincompatible-pointer-types]

Add patches giving the prototype and the signal handlers their proper
signatures.

Assisted-by: Claude:claude-opus-4-8
Link: https://github.com/openwrt/openwrt/pull/23956
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-27 11:48:27 +02:00