Commit graph

66939 commits

Author SHA1 Message Date
Yanase Yuki
ef6d7ba43f jansson: update project URL
Old website redirects to github.

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/21279
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 18:07:02 +01:00
Yanase Yuki
7772a958cd treewide: remove lantiq dot com URL
This website is offline.

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/21279
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 18:07:02 +01:00
Yanase Yuki
c95e03c7b7 treewide: use HTTPS URL for www.kernel.org
Avoids insecure plain HTTP.

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/21279
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 18:07:02 +01:00
Yanase Yuki
00f924abad treewide: use HTTPS URL for GNU websites
Avoids insecure plain HTTP.

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/21279
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 18:07:02 +01:00
Yanase Yuki
ac755f983a treewide: update u-boot URL
U-Boot website has been moved to docs.u-boot.org.

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/21279
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 18:07:02 +01:00
Markus Stockhausen
7bfa1fa83b realtek: rename smi-address dts property
The rtl9300,smi-address property was first developed for the RTL930x
targets. So it got a device specific prefix. Nowadays it is used for
RTL931x targets too. Convert it to our gerneric realtek prefix.

find ./realtek -type f -exec sed -i 's/rtl9300,smi-address/realtek,smi-address/g' {} +

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21343
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 18:05:02 +01:00
Markus Stockhausen
cd13ed6fcf realtek: rt-loader: allow piggy-backed uimage
Until now rt-loader expects a piggy-backed lzma compressed data
stream. Be more flexible and allow a piggy-backed uimage as well.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21332
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 18:03:45 +01:00
Markus Stockhausen
4491f1d233 realtek: rt-loader: rename flash loading function
The loading function searches the image on flash (or its memory
copy). Rename it to make clearer what the function does. Adapt
comments accordingly.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21332
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 18:03:45 +01:00
Markus Stockhausen
2e74ef5be1 realtek: rt-loader: make search_image() generic
Until now search_image() is used for searching a uImage on
flash (or the memory mapped equivalent). In a future commit
this will be reused to search for a piggy-backed uimage.
Make this function generic by

- replacing "flash" with "image" in variables
- Search bytewise and do not rely on 4 byte alignment
- remove 2 obsolete variables
- move console output to caller

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21332
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 18:03:45 +01:00
Markus Stockhausen
8f66b33503 realtek: rt-loader: enhance is_uimage()
Until now is_uimage() is only a crc check and the caller
still needs to check other bits of the uimage header. Make
this function what it is meant to be.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21332
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 18:03:45 +01:00
Eric Fahlgren
7a78dc4a5d package: ethtool: specify just one default variant
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Inadvertently defining 'DEFAULT_VARIANT' on both ethool and
ethtool-full variants resulted in

    $ make defconfig
    tmp/.config-package.in:121615:error: recursive dependency detected!
    tmp/.config-package.in:121615:  symbol PACKAGE_ethtool-full is selected by PACKAGE_ethtool
    tmp/.config-package.in:121605:  symbol PACKAGE_ethtool depends on PACKAGE_ethtool-full

Fix this by simply undefining 'DEFAULT_VARIANT' on the ethtool-full
variant, which is ugly, but expedient.

Fixes: https://github.com/openwrt/openwrt/commit/f4fdb996
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21363
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 17:49:56 +01:00
Eric Fahlgren
f4fdb9964a treewide: add explicit default variant
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Some packages with variants did not specify the default among the
alternatives, so were left without any apk 'provider_priority'
for that package.  This caused the apk solver to select the wrong
variant, silently changing the requested package list.

Notable among these were busybox, procd and the hostapd/wpad suite.
This behavior presented in the imagebuilders when creating the
image as follows, silently replacing packages even when explicitly
requested:

    $ make image PACKAGES=busybox
    ...
    ( 14/148) Installing busybox-selinux (1.37.0-r6)
    ...

We add 'DEFAULT_VARIANT:=1' to the packages that were missing one,
providing apk with sufficient information to choose the correct
package.

See link below for further examples and discussion.

Link: https://github.com/openwrt/openwrt/pull/21288#issuecomment-3704101422
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21358
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-02 14:46:30 +01:00
Wei-Ting Yang
c1281a501e util-linux: update to 2.41.3
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Waiting to run
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Release notes:
https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41.3-ReleaseNotes

Also update URL to use HTTPS.

Signed-off-by: Wei-Ting Yang <williamatcg@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21276
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-02 01:24:55 +01:00
Wei-Ting Yang
99fd5aa496 tools: util-linux: update to 2.41.3
Release notes:
https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41.3-ReleaseNotes

Remove upstreamed:
110-meson-fix-a-bug-in-posixipc_libs-configuration.patch

Signed-off-by: Wei-Ting Yang <williamatcg@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21276
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-01-02 01:24:55 +01:00
Hauke Mehrtens
2139360a78 libiwinfo: update to Git HEAD (2025-11-29)
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
2ebef3da84e8 iwinfo: Query hostapd for 'ssid2'

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/21347
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-01-01 17:12:23 +01:00
Markus Stockhausen
8e6cd2608a realtek: setup cpu port in soc_info structure
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
A lot of soc_info usage has been reorganized. Nevertheless there
are some consumers left. A very critical one is the dsa/qos coding.
It makes use of the cpu_port in this shared structure. This is
totally broken as that info is never properly initialized. Fill
the cpu_port according to the identified hardware.

Remark: Looking at the prom.c history soc_info.cpu_port was never
setup since the beginning of time. So no "fixes" tag here.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21327
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-31 21:55:32 +01:00
Markus Stockhausen
6b2e7ffd4b realtek: RTL930x: setup highmem registers during init
For some reason the highmem configuration of RTL930x
devices was totally missed until now. Take over the
setup from the SDK. This will avoid boot stalls on
switches with more than 256 MB RAM when switching
over to kernel 6.18.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21327
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-31 21:55:32 +01:00
Markus Stockhausen
88e79af543 realtek: determine memory size during initialization
For proper highmem initialization on RTL930x the size of the
installed memory is needed during early bootup. Enhance the
soc_info structure and fill the data from the registers.

While we are here remove the obsolete compatible variable from
the soc_info structure.

Adapt boot message to show the memory size.

old: SoC Type: Realtek RTL9301 rev B (6487)
new: Realtek RTL9301 rev B (6487) SoC with 512 MB

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21327
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-31 21:55:32 +01:00
Markus Stockhausen
8337573422 realtek: harmonize variables in prom.c
There is mix of variable naming in prom.c. Use a fixed
prefix of "rtl_" for all static variables. Additionally
remove the prefix from rtl83xx_set_system_type as it is
a generic function for all SoC types.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21327
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-31 21:55:32 +01:00
George Sapkin
2c81176f2b kernel/rtl8812au-ct: provide a virtual kmod
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Switch rtl8812au-ct to use the new virtual kmod provides semantic.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 18:16:48 +01:00
George Sapkin
8f4c64b930 kernel/ath10k: provide a virtual kmod
Switch ath10k and related kmods to use the new virtual kmod provides
semantic and mark ath10k as the default variant.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 18:16:48 +01:00
George Sapkin
01fa50b774 kernel/r8169: provide a virtual kmod
Switch r8169 and related kmods to use the new virtual kmod provides
semantic and mark r8169 as the default variant.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 18:16:48 +01:00
George Sapkin
d75a6bed7a ca-certificates: provide a virtual package
Switch ca-certs provides to use the new virtual provides semantic that
enables ca-bundle and ca-certificates to be installed side-by-side.

Provide the new format virtual ca-certificates-any in ca-bundle.

Fixes: https://github.com/openwrt/openwrt/issues/21257
Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 18:16:48 +01:00
George Sapkin
9b37b7185c build: provide virtual self in kmods
Add an implicit self-provide to kmods. apk can't handle self provides,
be it versioned or virtual, so opt for a prefix and a suffix instead.
Package name without a prefix/suffix is too generic and might conflict
with other packages, e.g. wireguard. This allows several variants to
provide the same virtual package without adding extra provides to the
default one, e.g. r8169 implicitly provides kmod-r8169-any and is marked
as default, so r8125 can explicitly provide @kmod-r8169-any as well.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 18:16:48 +01:00
George Sapkin
5ed650acbf build: add support for virtual provides
Allow defining virtual provides using the PROVIDES field by prefixing
them with @, e.g.:

PROVIDES:=@ca-certs

Virtual provides don't own the provided name and multiple packages with
the same virtual provides can be installed side-by-side. Packages must
still take care not to override each other's files.

Add an implicit self-provide to packages. apk can't handle self
provides, be it versioned or virtual, so opt for a suffix instead. This
allows several variants to provide the same virtual package without
adding extra provides to the default one, e.g. wget implicitly provides
wget-any and is marked as default, so wget-ssl can explicitly provide
@wget-any as well.

Filter out virtual provides when generating metadata.

Filter out virtual provides prefix and self provide where appropriate.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 18:16:48 +01:00
George Sapkin
cefbf1184f build: refactor provides logic
Refactor provides logic into a helper define and use it for both apk and
control. Document the behavior.

Store preformatted provides in Package/$(1)/PROVIDES similar to defines.

Remove unnecessary logging.

Signed-off-by: George Sapkin <george@sapk.in>
Link: https://github.com/openwrt/openwrt/pull/21288
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 18:16:48 +01:00
John Audia
b638d886f0 kernel: bump 6.12 to 6.12.63
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.63

Manually rebased:
  qualcommax/patches-6.12/0113-remoteproc-qcom-Add-secure-PIL-support.patch
  qualcommax/patches-6.12/0116-remoteproc-qcom-Update-regmap-offsets-for-halt-regis.patch

Removed upstreamed:
  airoha/patches-6.12/029-14-spi-airoha-snfi-en7523-workaround-flash-damaging.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.63&id=7be679104357439ff6eab076975f5f74368acd69

Build system: x86/64
Build-tested: flogic/glinet_gl-mt6000, ramips/tplink_archer-a6-v3, x86/64-glibc
Run-tested: flogic/glinet_gl-mt6000, ramips/tplink_archer-a6-v3, x86/64-glibc

Co-authored-by: Goetz Goerisch <ggoerisch@gmail.com>
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21329
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 17:55:44 +01:00
John Audia
b3d1da9115 generic: add missing symbol
Set SND_SOC_NAU8325 to no

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21329
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-31 17:55:44 +01:00
Álvaro Fernández Rojas
8b93c563ad kernel: r8168: fix CFLAGS with linux 6.15+
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Fix r8168 module CFLAGS with kernels >= v6.15.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-12-31 09:43:02 +01:00
Álvaro Fernández Rojas
b3d27b0115 kernel: r8101: fix CFLAGS with linux 6.15+
Fix r8101 module CFLAGS with kernels >= v6.15.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-12-31 09:43:02 +01:00
Eric Fahlgren
b71f4665cd mediatek: filogic: fix supported_devices list for gl-mt2500
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
The SUPPORTED_DEVICES sets for both Maxlinear (v1) and Airoha (v2)
devices were identical, so sysupgrade was unable to detect when an
incorrect image was being installed.  This caused "soft bricking" of
devices when a v1 image was installed on a v2 device, and vice versa.

Fix this by making the supported_devices distinct for each device
version, by renaming the devices with a version-specific name.
This is reflected in the file name and the image metadata.

Fixes: https://github.com/openwrt/openwrt/issues/20566
Fixes: https://github.com/openwrt/asu/issues/1525
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20632
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-30 22:59:44 +01:00
Andrii Kuiukoff
3af16b2359 uboot-mediatek: comfast,cf-wr632ax: fix missing escape sequence
Add missing escape sequence to restore terminal coloring in the OpenWrt U-Boot boot menu.

Signed-off-by: Andrii Kuiukoff <andros.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21283
[Fix _bootmenu_update_title too]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-30 22:34:20 +01:00
Fil Dunsky
15df98f3b5 mediatek: add ubootmod layout for Cudy WBR3000UAX v1
This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

If you are at factory firmware, please refer
to [PR](https://github.com/openwrt/openwrt/pull/21141)
to boot into OpenWrt first.

1. Log in to the device and backup all the partitions,
especially unique `Factory` and `bdata` partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing:
```bash
apk update && apk add kmod-mtd-rw && insmod mtd-rw i_want_a_brick=1
```
3. Write new OpenWrt (U-Boot Layout) `BL2` and `FIP`:
```bash
mtd write openwrt-mediatek-filogic-cudy_wbr3000uax-v1-ubootmod-preloader.bin BL2
mtd write openwrt-mediatek-filogic-cudy_wbr3000uax-v1-ubootmod-bl31-uboot.fip FIP
```
4. Set static IP on your PC: `192.168.1.254`, gateway `192.168.1.1`
5. Serve openwrt-mediatek-filogic-cudy_wbr3000uax-v1-ubootmod-initramfs-recovery.itb
using TFTP server.
6. Connect Router LAN with PC LAN.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt initramfs recovery has booted,
clean `/dev/mtd5` ubi partition to utilize maximum of free space & create ubootenvs:
```bash
ubidetach -p /dev/mtd5; ubiformat /dev/mtd5 -y; ubiattach -p /dev/mtd5
ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
```
4. Perform sysupgrade.

Tested-by: 4pda users
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21225
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-30 22:20:33 +01:00
Fil Dunsky
d7d6faf26f mediatek: add support for Cudy WBR3000UAX v1
Another OEM variation of a Cudy WR3000 series device made for Russian market.

Hardware:
 - SoC: MediaTek MT7981B
 - CPU: 2x 1.3 GHz Cortex-A53
 - Flash: 128 MiB GigaDevice SPI NAND. Flash Model: F50L1G41LB, ID: C801
 - RAM: DDR3, 512 MiB
 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
 - 1x WAN MT7531 (JXD 2531Z) 10/100/1000 Mbps
 - 4x LAN 2x MT7530 (JXD 2529S) 10/100/1000 Mbps
 - USB 3.0 port
 - Buttons: Reset, WPS
 - 8x LEDs: 2x Red, 6x Blue
 - Serial console: no need to solder, just open the case and unskrew the radiator, TX-RX, RX-TX, GND-GND, VCC do not connect, 115200 8n1
 - Power: 12 VDC, 1.5 A

+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 80:AF:CA:xx:xx:x1 | label+1   |
| LAN     | 80:AF:CA:xx:xx:x0 | label     |
| WLAN 2g | 80:AF:CA:xx:xx:x0 | label     |
| WLAN 5g | 82:AF:CA:xx:xx:x1 | label+1   |
+---------+-------------------+-----------+

Based on a factory layout with only 64mb partition for easier transition from factory to OpenWrt for users if the "intermediate" RSA signed firmware will be provided by Cudy.

**Installation**
The installation must be done via UART & TFTP by disassembling the router. On other occasions Cudy has distributed intermediate firmware and dts to make installation easier, but since this router is OEM special WB order for local RU market there is a possibility they will not provide it.

**Install using UART & TFTP**
1. Connect to UART.
2. Since the factory BL is locked and the boot process can not be stopped, you have to use mtkuartboot, hold reset, engage the power, boot into your payloaded bl2 & fip.
3. Connect to LAN and set your IP to 192.168.1.254.
4. Configure a TFTP server to serve openwrt-mediatek-filogic-cudy_wbr3000uax-v1-initramfs-kernel.bin file.
5. Run these steps in u-boot using the name of your file:

```
setenv bootfile openwrt-mediatek-filogic-cudy_wbr3000uax-v1-initramfs-kernel.bin
setenv ipaddr 192.168.1.1
setenv serverip 192.168.1.254
tftpboot
bootm
```

6. Router will boot into OpenWrt initramfs recovery, just open your browser `192.168.1.1` and sysupgrade with the `Keep settings` option turned off.

Tested-by: many 4pda users
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21225
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-30 22:20:30 +01:00
Fil Dunsky
f4c9ab6591 arm-trusted-firmware-mediatek: add Cudy DDR3 target
Since there are many similar devices from Cudy (TR3000 / WR3000E / WR3000P / WR3000S / WBR3000UAX) this will allow to create OpenWrt U-Boot layout for all of them using same DDR3 target.

Tested-by: 4pda users
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21225
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-30 22:19:09 +01:00
Hauke Mehrtens
01a87f4bd0 wifi-scripts: use OWE + country for 6GHz
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Wifi on the 6GHz band does not support open networks, configure owe by
default. 6GHz wifi also needs a country code, configure a broken country
code '00' by default to hint the user to change it.

Link: https://github.com/openwrt/openwrt/pull/21313
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-12-30 14:43:08 +01:00
John Audia
ed836b1a9d package: gpio-nct5104d: adapt to kernel 6.18
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
- Changing return type from void to int
- Returning error code instead of void on superio_enter() failure
- Returning 0 on success

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21218
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-30 10:44:05 +01:00
Leon M. Busch-George
bc4e7fd38e wifi-scripts: don't set wpa_pairwise for wpa=0
Without this patch, the

    if (!config.wpa)
	  	config.wpa_pairwise = null;

is overwritten immediately.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Link: https://github.com/openwrt/openwrt/pull/21215
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-30 10:39:06 +01:00
Álvaro Fernández Rojas
fb15ef4b23 odhcp6c: update to Git HEAD (2025-12-29)
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
8abb45065f5e dhcpv6: omit IA_NA on Request
988d5fb306b3 dhcpv6: dhcpv6_send: convert whitespaces to tabs
5e1ab3bc1be8 ra: convert if block to switch
2e6682bfcaff odhcp6c: do cleanup at exit
610e4bddb8d7 config: fix potential memory leaks in error paths
bfd7597cada1 all: add log helpers
0bb93c26d14b dhcpv6: clarifying comments
65f9ee25e5eb dhcpv6: offload FQDN construction to init_dhcpv6
48dbd38122e4 dhcpv6: migrate dhcpv6_response_is_valid to switch case

9a4d6fe802...8abb45065f

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-12-30 09:42:50 +01:00
Hal Martin
5578eb69c2 ipq40xx: add support for Cisco Meraki MR20
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
This commit adds support for the Cisco Meraki MR20/Go GR10.

The Meraki MR20 is a Cisco 802.11ac/WiFi 5 AP with 1 Ethernet port.
It can be powered by a 12V DC barrel jack (5.5x2.5mm, center positive)
or via 802.3af POE.

The Meraki Go GR10 (codename: Maggot) is identical to the MR20
(codename: Grub), so this document will refer to both devices as the MR20.

MR20 hardware info:
* CPU: Qualcomm IPQ4029
* RAM: 256MB DDR3
* Storage: 128 MB (MX30LF1G18AC)
* Networking: 1 Gigabit Ethernet
* WiFi: QCA4019 802.11b/g/n/ac
* Serial: Internal header (J10, 2.54mm, unpopulated)

This device ships with secure boot, and cannot be flashed without
external programmers (TSOP48 NAND and I2C EEEPROM)!

Disassembly:

Remove the four rubber feet on the rear of the AP and the four
Torx T8 screws under the feet.

Using a guitar pick or similar plastic tool, insert it on the side
along the seam around the edge. Push in gently while gently lifting
the front of the housing to release the plastic retention clips.

There are 15 clips in total.

Once you have removed the plastic front (shown above already removed
so you know where the clips are), remove the 4 Philips screws holding
down the two metal WiFi antennas.

Lift the PCB gently while pushing the Ethernet port into the housing
to release it. The PCB should come free from the metal heat spreader.

The TSOP48 NAND flash (U9, Macronix/MXIC MX30LF1G18AC) is located on
the opposite side of the PCB.

To flash, you need to desolder the TSOP48 or use a 360 clip.

You also need to reprogram the I2C EEPROM (U20, Atmel 24c64).

Installation:

The dumps to flash can be found in this repository:
https://github.com/halmartin/meraki-openwrt-docs/tree/main/mr20_gr10

The device has the following flash layout (offsets with OOB data):
```
0x000000000000-0x000000100000 : "sbl1"
0x000000100000-0x000000200000 : "mibib"
0x000000200000-0x000000300000 : "bootconfig"
0x000000300000-0x000000400000 : "qsee"
0x000000400000-0x000000500000 : "qsee_alt"
0x000000500000-0x000000580000 : "cdt"
0x000000580000-0x000000600000 : "cdt_alt"
0x000000600000-0x000000680000 : "ddrparams"
0x000000700000-0x000000900000 : "u-boot"
0x000000900000-0x000000b00000 : "u-boot-backup"
0x000000b00000-0x000000b80000 : "ART"
0x000000c00000-0x000007c00000 : "ubi"
```

* Dump your original NAND (if using nanddump, include OOB data).

* Decompress `u-boot.bin.gz` dump from the GitHub repository above (dump
contains OOB data) and overwrite the `u-boot` portion of NAND from
`0x738000`-`0x948000` (length `0x210000`). Offsets here include OOB data.

* Decompress `ubi.bin.gz` dump from the GitHub repository above (dump
contains OOB data) and overwrite the `ubi` portion of NAND from
`0xc60000`-`0x8400000` (length `0x77a0000`). Offsets here include OOB data.

* Dump your original EEPROM. Change the byte at offset `0x49` to `0x1e`
(originally `0x2c` or `0x25`). Remember to re-write the EEPROM with the
modified data.
    * This can be done on Linux via the following command:
    `printf "\x1e" | dd of=/tmp/eeprom.bin bs=1 seek=$((0x49)) conv=notrunc`

**Note**: the device will not boot if you modify the board major number and
have not yet overwritten the `ubi` and `u-boot` regions of NAND.

* Resolder the NAND after overwriting the `u-boot` and `ubi` regions.

OpenWrt Installation:

* After flashing NAND and EEPROM with external programmers. Plug in an
Ethernet cable and power up the device.

* The new U-Boot build uses the space character `" "` (without quotes) to
interrupt boot.

* Interrupt U-Boot and `tftpboot` the OpenWrt initramfs image from your
tftp server
```
dhcp
setenv serverip <your_tftp>
tftpboot openwrt-ipq40xx-generic-meraki_mr20-initramfs-uImage.itb
```

* Once booted into the OpenWrt initramfs, created the `ART` ubivol with
the WiFi radio calibration from the mtd partition:
```
cat /dev/mtd10 > /tmp/ART.bin
ubiupdatevol /dev/ubi0_1 /tmp/ART.bin
```

* `scp` the `sysupgrade` image to
the device and run the normal `sysupgrade` procedure:
```
scp -O openwrt-ipq40xx-generic-meraki_mr20-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/
ssh root@192.168.1.1 "sysupgrade -n /tmp/openwrt-ipq40xx-generic-meraki_mr20-squashfs-sysupgrade.bin"
```

* OpenWrt should now be installed on the device.

Signed-off-by: Hal Martin <hal.martin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20646
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-29 19:41:24 +01:00
Hal Martin
593e399568 ipq40xx/meraki: refactor common device tree
qcom-ipq4029-insect-common.dtsi was common to the MR33 and MR74, but was no
longer common with the other supported Meraki devices. I have refactored
insect-common and wired-qca-common into qcom-ipq4029-meraki-common.dtsi
which contains the actual common components (e.g. NAND partitions, ART nvmem).

Individual devices reference qcom-ipq4029-meraki-insect.dtsi
plus their own individual configuration.

Signed-off-by: Hal Martin <hal.martin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20646
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-29 19:41:24 +01:00
Jonas Jelonek
a0805af66c realtek: pcs: rtl931x: fix SerDes mode application
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
The SerDes mode setting at the end of rtpcs_931x_setup_serdes is
currently broken although it is mostly similar to what the SDK does [1].
It prevents several modes from being set, especially fiber modes. This
seems to be one (if not the only) issue for currently missing SFP
support.

Add a small helper function which takes cares of setting the mode, to
keep the still valid different procedure when using XSGMII mode. Only
this helper is called in rtpcs_931x_setup_serdes to keep it clean there.

As a functional change, call mode application in every case, not just
for SGMII, QSGMII and USXGMII. We can assume the SDK is misleading in
this case, either accidentially or on purpose. This makes SFP modules
work in theory. In practice, there still seem to be device-specific
issues which need to be fixed later. These issues may include no link
detection or link flapping.

[1] f7f85ffc14/sources/rtk-dms1250/src/dal/mango/dal_mango_construct.c (L2266)

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20736
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-29 17:06:19 +01:00
Jonas Jelonek
9efcc52a7b realtek: pcs: rtl931x: streamline hardware mode setting
The SDK and our code for finally applying the hardware mode are quite
confusing. There are two different "places" where a mode can be set,
in a SerDes register and in a global SerDes mode register. Neither the
SDK nor any of the datasheet/documentation serve any explanation for
that. The functions are just named "fiber_mode_set" and "mii_mode_set"
which is basically as useless as it can be to understand it.

Try to get rid off this confusion by naming the functions
'sds_set_mac_mode' and 'sds_set_ip_mode' to make clear where the mode
is set. While at it, also clarify the naming of 'config_mode' by
renaming it to 'config_hw_mode'.

The naming is based on the following assumption:

> Realtek uses an SerDes IP core design (probably from another vendor)
> in their switch. This supports a variety of modes and must be
> configured properly for each mode. Usually, changing the mode in the
> MAC's registers triggers a proper configuration of the SerDes IP block
> in the background.

> However, for some modes this seems to be incomplete, at least missing
> important parts so it doesn't work on its own in the end. In this
> case, the SerDes IP block needs to be configured manually with the
> missing bits to make it work.

There are several places in the SDK that support this assumption, both
for RTL931X and RTL930X (as they are somewhat similar), e.g. [1].

[1] f7f85ffc14/sources/rtk-dms1250/src/dal/longan/dal_longan_sds.c (L1746)

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20736
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-29 17:06:19 +01:00
Jonas Jelonek
d5a4387ac5 realtek: pcs: rtl931x: improve mode setting functions
Improve the current mode setting functions to address a few issues:
- add missing mode from SDK reference (instead of using the
  corresponding value as a default value)
- use and return error values
- give internal variable a more meaningful name
- consistently use lowercase letters in hex values

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20736
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-29 17:06:19 +01:00
Jonas Jelonek
75493a812f realtek: pcs: rtl931x: merge and drop unused helper
Merge the unused helper 'rtpcs_931x_sds_fiber_disable' into Fiber mode
setting, and drop the helper itself. As with the MII helper in a
previous commit, functionality is basically the same just with a value
for OFF mode. If functionality is required later, Fiber mode setting can
be used with the OFF mode instead of carrying the unused helper until
it's used.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20736
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-29 17:06:19 +01:00
Jonas Jelonek
65dc1ecf49 realtek: pcs: rtl931x: use hardware mode for mode setting
Use the hardware mode instead of PHY_INTERFACE_MODE_* mode for mode
setting. Adjust all affected functions and switch cases accordingly.

In MII mode setting, drop the case for 2500Base-X as this is a mistake.
In the SDK reference code, this doesn't exist [1].

[1] 69d2890a2e/sources/rtk-dms1250/src/hal/phy/phy_rtl9310.c (L817)

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20736
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-29 17:06:19 +01:00
Jonas Jelonek
f67d9ed9b4 realtek: pcs: rtl931x: merge helper into mode setting
Merge the 'rtpcs_931x_sds_disable' helper into the MII mode setting and
use that instead. The helper was essentially doing same just with a
value for OFF state.

Moreover, the name of the helper was confusing. It implied it disables
the whole SerDes. However, this is used in Fiber mode setting and thus,
cannot completely disable the SerDes.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20736
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-29 17:06:19 +01:00
Jonas Jelonek
6614fcb95e realtek: pcs: rtl931x: fix MII mode setting
The function 'rtpcs_931x_sds_mii_mode_set' does not correctly write the
register. It just write a plain value at the determined register
address. While this works for SerDes with (id mod 4 == 0), it doesn't
for the other SerDes.

Fix that by using a corresponding shift and writing only some bits
instead of the whole register.

While at it, drop an unneeded blank line, add comment to explain a bit
that is set and use the BIT(..) helper for that instead of manual shift.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20736
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-29 17:06:19 +01:00
Jonas Jelonek
90cddeb75e realtek: pcs: rtl931x: reorder functions
Bring the RTL931X functions into a proper order for two purposes:
- be able to reuse code
- have blocks of logically connected functions

This just moves code, no functional changes.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20736
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-29 17:06:19 +01:00
Jonas Jelonek
19585a7966 realtek: pcs: rtl931x: fix clearing symbol errors
Fix the implementation to clear symbol errors. Up to now, it was barely
functional because important modes weren't handled. Add another function
(which is needed in the future anyway) and pick to missing bits from
that function into the symbol clearing function to handle the modes
1000Base-X and 10GBaseR too. All that is based on [1].

While at it, rename the function to adhere to a common naming scheme and
fix some minor style issues.

[1] 69d2890a2e/sources/rtk-dms1250/src/hal/phy/phy_rtl9310.c (L703)

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20736
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-29 17:06:19 +01:00