]> git.ipfire.org Git - thirdparty/openwrt.git/log
thirdparty/openwrt.git
7 days agoelfutils: add $(FPIC) to LDFLAGS 24051/head
Anari Jalakas [Fri, 3 Jul 2026 09:10:02 +0000 (12:10 +0300)] 
elfutils: add $(FPIC) to LDFLAGS

Ensure -fPIC is passed during the linking stage to fix LTO build
failures (relocation errors) on MIPS and other architectures.

Signed-off-by: Anari Jalakas <anari.jalakas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24051
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
7 days agoqualcommbe: ipq9574: align USXGMII bring-up with SSDK 24033/head
Kenneth Kasilag [Thu, 2 Jul 2026 11:32:51 +0000 (11:32 +0000)] 
qualcommbe: ipq9574: align USXGMII bring-up with SSDK

Align the USXGMII configuration sequence with the vendor SSDK:

- Reset the PCS PLL by programming the whole reset register with the
  documented assert and release values and 100ms holds, instead of
  toggling a single bit for 1ms and relying on the power-on state of
  the remaining analog enables.

- Keep the uniphy port clocks disabled across the reconfiguration and
  re-enable them after calibration, before releasing the XPCS reset.

- Select in-band link detection explicitly rather than the SFP
  loss-of-signal input, which does not exist on non-SFP ports.

- Wait for the 10GBASE-R receiver to link before enabling the USXGMII
  adaptation layer. Best-effort, since the PHY SerDes may only come
  up later.

Other interface modes keep the previous behaviour.

Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/24033
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agoqualcommbe: ipq9574: fix MISC2 mode field and cover USXGMII
Kenneth Kasilag [Thu, 2 Jul 2026 11:31:11 +0000 (11:31 +0000)] 
qualcommbe: ipq9574: fix MISC2 mode field and cover USXGMII

The MISC2 phy mode field is modelled as two bits at the wrong offset:
the hardware field is three bits wide and starts one bit lower. The
SGMII and 2500BASE-X values only come out right because the power-on
default happens to keep the missed bit set, and USXGMII is not
programmed at all, leaving the uniphy in its power-on SGMII
personality.

Model the field at its documented position, add the USXGMII mode
value and write the rate field explicitly instead of relying on its
power-on default, matching the values the vendor SSDK programs.

Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/24033
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agoqualcommbe: ipq9574: pulse uniphy sys/soft resets during config
Kenneth Kasilag [Thu, 2 Jul 2026 11:30:18 +0000 (11:30 +0000)] 
qualcommbe: ipq9574: pulse uniphy sys/soft resets during config

The uniphy never receives a software reset pulse during interface mode
configuration. The vendor SSDK asserts the GCC system reset and the
NSSCC soft reset together for 100ms on every uniphy mode change;
without the pulse, parts of the uniphy analog block can remain in
their power-on state.

Pulse both resets, when the devicetree provides them, after the mode
is programmed. Both resets are optional so existing devicetrees keep
working.

Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/24033
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agoqualcommbe: ipq9574: enable uniphy 25MHz clock output
Kenneth Kasilag [Thu, 2 Jul 2026 11:29:30 +0000 (11:29 +0000)] 
qualcommbe: ipq9574: enable uniphy 25MHz clock output

Some board designs feed an external PHY its reference clock from the
uniphy 25MHz clock output instead of a local crystal. Enable the
output when the devicetree opts in with "qcom,uniphy-clkout-25mhz".

The clock output register only becomes writable once the PLL reset
and calibration have completed, so program it at the end of the mode
configuration rather than at probe time.

Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/24033
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agoqualcommbe: ipq9574: complete USXGMII in-band AN
Kenneth Kasilag [Thu, 2 Jul 2026 11:28:36 +0000 (11:28 +0000)] 
qualcommbe: ipq9574: complete USXGMII in-band AN

The XPCS signals USXGMII in-band autonegotiation completion through an
interrupt that is never enabled, waited for or acknowledged, so rate
adaptation never starts and the MAC receives nothing even though the
SerDes achieves block lock. The advertised speed and duplex are also
left at their reset values while autonegotiation runs.

Follow the vendor SSDK sequence: enable the completion interrupt and
advertise 10G/full duplex when configuring the PCS, and on link-up
restart the in-band autonegotiation, wait for completion and
acknowledge it before programming the negotiated speed. The wait is
best-effort, as in the vendor driver.

Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/24033
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agoqualcommbe: ipq9574: describe remaining uniphy resets
Kenneth Kasilag [Thu, 2 Jul 2026 11:26:43 +0000 (11:26 +0000)] 
qualcommbe: ipq9574: describe remaining uniphy resets

Each uniphy has, besides the XPCS reset, a system reset in the GCC and
a soft reset in the NSSCC. The vendor driver pulses both on every
interface mode change as part of the uniphy bring-up. Describe them,
and name the resets while at it, so the PCS driver can pick them up.

Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/24033
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 days agokernel-packages: video: remove path variables
Marius Dinu [Sat, 4 Jul 2026 20:28:33 +0000 (23:28 +0300)] 
kernel-packages: video: remove path variables

These path names are unlikely to change. There is no need for variables.

Tested on Turris Omnia, but not all of these drivers were tested. Variables
were replaced automatically (search-and-replace in text editor). There
shouldn't be any problems.

Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
7 days agokernel: minimize kmod-sched-connmark dependencies 24019/head
Andris PE [Wed, 1 Jul 2026 09:03:50 +0000 (09:03 +0000)] 
kernel: minimize kmod-sched-connmark dependencies

Remove iptables kmod dependency from kmod-sched-connmark.
Both dependents
package/network/config/qos-scripts
../packages/net/trafficshaper
Already pull in ipt kmods via iptables-mod-conntrack-extra
Permits "clean" nftables migration at
https://github.com/openwrt/packages/pull/29830

Signed-off-by: Andris PE <neandris@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24019
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
7 days agoapm821xx: wndr4700: merge ubi and ecos partitions 24098/head
Rosen Penev [Mon, 6 Jul 2026 01:25:51 +0000 (18:25 -0700)] 
apm821xx: wndr4700: merge ubi and ecos partitions

This concatenates the ubi partition (19.9 MiB) with the ecos partition
(96.1 MiB) into a single virtual MTD device for UBI, giving ~116 MiB
of usable flash space.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24098
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
7 days agonilfs-utils: update to 2.3.1 23995/head
Pavlo Samko [Mon, 29 Jun 2026 17:45:02 +0000 (20:45 +0300)] 
nilfs-utils: update to 2.3.1

Changelog: https://nilfs.sourceforge.io/download/ChangeLog-utils-v2

Signed-off-by: Pavlo Samko <bulldozerbsg@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23995
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
7 days agoapm821xx: move sensors to kmods 24040/head
Rosen Penev [Thu, 2 Jul 2026 01:59:18 +0000 (18:59 -0700)] 
apm821xx: move sensors to kmods

Only the WNDR4700 uses these. No need to bloat the kernel.

Nothing uses the GPIO_FAN sensor. Remove it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24040
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
7 days agotreewide: various fwnode conversions 24039/head
Rosen Penev [Thu, 2 Jul 2026 21:03:45 +0000 (14:03 -0700)] 
treewide: various fwnode conversions

Avoid having to use of_fwnode_handle and use fwnode_handle directly.

Upstream prefers fwnode to of anyway.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24039
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
7 days agomac80211: ath9k: call reset on init 24042/head
Rosen Penev [Thu, 2 Jul 2026 21:53:21 +0000 (14:53 -0700)] 
mac80211: ath9k: call reset on init

Even though external_reset() is handled elsewhere, it seems some devices
need it here.

Fixes: 0ccc336c56fc ("mac80211: ath9k: avoid a double reset")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24042
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
8 days agointel-microcode: fix build error on rebuild 24077/head
Rany Hany [Sat, 4 Jul 2026 23:58:34 +0000 (23:58 +0000)] 
intel-microcode: fix build error on rebuild

When rebuilding the package, iucode_tool fails with a "File exists"
error if the directory already contained firmware from the previous
build (incl. in the successful build case).

Fix this by removing the directory before invoking iucode_tool.

Fixes the following build error:
iucode_tool: 06-0f-02: cannot write to, or create file: File exists
make[2]: *** [Makefile:57: .../.built] Error 2

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/24077
Signed-off-by: Robert Marko <robimarko@gmail.com>
8 days agokernel: add qualcommax patches to generic 24013/head
Rosen Penev [Wed, 1 Jul 2026 02:44:12 +0000 (19:44 -0700)] 
kernel: add qualcommax patches to generic

Move upstreamed patches to backports.

Move the others to pending.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24013
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
8 days agohostapd: fix security advisory 2026-1 24043/head
Hauke Mehrtens [Thu, 2 Jul 2026 23:46:56 +0000 (01:46 +0200)] 
hostapd: fix security advisory 2026-1

Cherry pick the patches recommended in the hostapd security advisory
2026-1:
https://w1.fi/security/2026-1/missing-ml-parsing-validation.txt

Vulnerability

Vulnerabilities in parsing and use of received multi-link (MLO/EHT/IEEE
802.11be/Wi-Fi 7) information has been identified in hostapd and
wpa_supplicant. These issues show up in various cases where frames
including information on affiliated links are parsed and processed in
both AP and STA modes. The issues can result in process termination due
to buffer read overflow checks and memory corruption.

The issues for AP mode (hostapd or wpa_supplicant) can result in
denial-of-service attacks due to process termination and small memory
corruption that could theoretically cause other issues, but it does not
seem likely that those could be exploiting in practice. Affected areas
can be reached by sending invalid Management frames without needing
authentication or user action on the target device.

CVE-2026-58374

Link: https://github.com/openwrt/openwrt/pull/24043
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 days agomediatek: filogic: add USB VBUS regulator for Globitel BT-R320 24063/head
solodecode [Fri, 3 Jul 2026 20:01:42 +0000 (23:01 +0300)] 
mediatek: filogic: add USB VBUS regulator for Globitel BT-R320

USB VBUS on the BT-R320 is controlled by GPIO14.

Add a fixed regulator and hook it up to the xHCI controller.
GPIO_ACTIVE_HIGH was tested on the device: the dummy regulator warning is gone and a USB device enumerates.

Signed-off-by: solodecode <zikwarface134@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24063
Signed-off-by: Robert Marko <robimarko@gmail.com>
9 days agomediatek: filogic: fix Globitel BT-R320 recovery image name 24059/head
solodecode [Fri, 3 Jul 2026 18:33:18 +0000 (21:33 +0300)] 
mediatek: filogic: fix Globitel BT-R320 recovery image name

The initramfs image name already contains "-initramfs". Using "-initramfs-recovery.itb" as the suffix makes the BT-R320 recovery artifact contain it twice.

Use "-recovery.itb" instead.

Fixes: a3105d3f9573 ("mediatek: filogic: add support for Globitel BT-R320")
Signed-off-by: solodecode <zikwarface134@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24059
Signed-off-by: Robert Marko <robimarko@gmail.com>
9 days agoRevert "dnsmasq: migrate dhcpv4/dhcpv6 default on upgrade"
Robert Marko [Sat, 4 Jul 2026 11:28:46 +0000 (13:28 +0200)] 
Revert "dnsmasq: migrate dhcpv4/dhcpv6 default on upgrade"

This reverts commit d043c78bb53c4912a8778e3796999661ae1e14f3.

Signed-off-by: Robert Marko <robimarko@gmail.com>
9 days agodnsmasq: migrate dhcpv4/dhcpv6 default on upgrade 24068/head
John Audia [Sat, 4 Jul 2026 10:22:06 +0000 (06:22 -0400)] 
dnsmasq: migrate dhcpv4/dhcpv6 default on upgrade

Commit 6f30f08d0e ("dnsmasq: add fallback for default dhcpv4/dhcpv6
values") changed dnsmasq.init to default the 'dhcpv4'/'dhcpv6' UCI
options to 'disabled' when a 'config dhcp' section leaves them unset:

  - config_get dhcpv4 "$cfg" dhcpv4
  - config_get dhcpv6 "$cfg" dhcpv6
  + config_get dhcpv4 "$cfg" dhcpv4 disabled
  + config_get dhcpv6 "$cfg" dhcpv6 disabled

The intent was to match odhcpd, which already treats an unset value
as disabled, so both backends behave the same way for newly created
configs. Its companion commit 85767ac8fe added explicit
'option dhcpv4/dhcpv6 server' lines to the stock 'lan' section in the
packaged dhcp.conf template, which covers fresh installs.

Neither commit accounts for configs that predate the change. Before
it, an unset dhcpv4/dhcpv6 option was implicitly treated as enabled,
so it was common (and still is, on any router upgraded from before
this landed) to have 'config dhcp' sections for additional
interfaces/VLANs with no explicit dhcpv4/dhcpv6 option at all. After
the change, dnsmasq.init silently skips '--dhcp-range' for every one
of those sections:

if [ "$dhcpv4" != "disabled" ]; then
...
fi

The result: any interface whose dhcp section never needed the option
before stops handing out leases entirely, with nothing logged beyond
a normal dnsmasq startup, while sections that happen to already carry
an explicit 'server' value keep working. On a router with several
VLANs this looks exactly like "DHCP only works on one interface."

Fix by shipping a one-time /etc/uci-defaults migration, matching the
existing 50-dnsmasq-migrate-resolv-conf-auto.sh /
50-dnsmasq-migrate-ipset.sh pattern in this package: for every
'config dhcp' section, if dhcpv4/dhcpv6 is unset, explicitly set it
to 'server', preserving the pre-6f30f08d0e behavior for existing
configs. Sections that already set the option (or set 'disabled'
deliberately) are left untouched, and sections that never reach the
check (e.g. 'wan' with 'option ignore 1') are unaffected.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/24068
Signed-off-by: Robert Marko <robimarko@gmail.com>
9 days agouboot-at91: fix build failure with GCC 14.4 24058/head
Shiji Yang [Fri, 3 Jul 2026 14:56:39 +0000 (22:56 +0800)] 
uboot-at91: fix build failure with GCC 14.4

It seems that GCC 14.4 will generate larger binary compared to the
GCC 14.3 on ARM32 platforms. We have to increase the maximum allowed
SPL size to fix build errors.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24058
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agotools/expat: update to 2.8.2 24016/head
Wei-Ting Yang [Wed, 1 Jul 2026 04:32:09 +0000 (12:32 +0800)] 
tools/expat: update to 2.8.2

This version bump includes fixes for the following CVEs:
- CVE-2026-41080
- CVE-2026-45186
- CVE-2026-50219
- CVE-2026-56131
- CVE-2026-56132
- CVE-2026-56403
- CVE-2026-56404
- CVE-2026-56405
- CVE-2026-56406
- CVE-2026-56407
- CVE-2026-56408
- CVE-2026-56409
- CVE-2026-56410
- CVE-2026-56411
- CVE-2026-56412

Full release notes:
https://github.com/libexpat/libexpat/blob/master/expat/Changes

Signed-off-by: Wei-Ting Yang <williamatcg@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24016
Signed-off-by: Robert Marko <robimarko@gmail.com>
11 days agomicrochip: update TAS patch to pending one
Robert Marko [Thu, 2 Jul 2026 11:09:27 +0000 (13:09 +0200)] 
microchip: update TAS patch to pending one

Update the TAS patch to the one sent upstream, it adds SparX-5 registers.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
11 days agokernel: modules: mux-mmio: add missing regmap-mmio dependency 24028/head
Rosen Penev [Thu, 2 Jul 2026 03:01:40 +0000 (20:01 -0700)] 
kernel: modules: mux-mmio: add missing regmap-mmio dependency

mux-mmio.ko depends on regmap-mmio.ko at runtime, but the kmod package
was missing the dependency, causing build failures when the module is
included.

Fixes: ac3901689881 ("kernel: modules: package MMIO mux driver")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24028
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
11 days agotreewide: remove factory: 24008/head
Rosen Penev [Tue, 30 Jun 2026 04:03:14 +0000 (21:03 -0700)] 
treewide: remove factory:

For the most part, factory: remains as a hold over from nvmem-layout
conversion and no longer serves any purpose.

In the case of &factory sections, reduce identation slightly by
referencing the nvmem-layout node instead.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24008
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
11 days agoodhcp6c: Increase PKG_RELEASE
Hauke Mehrtens [Wed, 1 Jul 2026 21:10:44 +0000 (23:10 +0200)] 
odhcp6c: Increase PKG_RELEASE

Indicate that there are some changes. This should make sure that the
package gets updated.

Fixes: 257aee0cc030 ("scripts: dhcpv6: don't report custom ip6class if default")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agoead: Increase PKG_RELEASE
Hauke Mehrtens [Wed, 1 Jul 2026 21:08:05 +0000 (23:08 +0200)] 
ead: Increase PKG_RELEASE

Indicate that there are some changes. This should make sure that the
package gets updated.

Fixes: 63c0767f3d02 ("ead: fix integer underflow in handle_send_a()")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
11 days agomicrochipsw: configure TAS port link speed
Robert Marko [Wed, 1 Jul 2026 18:19:21 +0000 (20:19 +0200)] 
microchipsw: configure TAS port link speed

On the TSN and RED variants of SparX-5 and LAN969x TAS (Time-Aware Shaper)
is present in the silicon.

Currently, the driver does not use configure it at all, which means that
the TAS_PROFILE_CONFIG.LINK_SPEED[1] value is left at the default of 3
which means that its configured for 1 Gbps.

So, running iperf between two 10G switch ports will result in only 940-ish
Mbps while we should be getting around 9.3 Gbps.

Correctly populating the TAS_PROFILE_CONFIG.LINK_SPEED[1] with the current
port speed fixes this issue and we achieve around 9.4 Gbps between two 10G
switch ports.

So, port the TAS port link speed setting from the vendor BSP 6.18 kernel[2]

[1] https://microchip-ung.github.io/lan969x-industrial_reginfo/reginfo_LAN969x-Industrial.html?select=hsch,tas_profile_cfg,tas_profile_config,link_speed
[2] https://github.com/microchip-ung/linux/tree/bsp-6.18-2026

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
12 days agowireguard: add metric to routes 23280/head
Erik Conijn [Sun, 10 May 2026 09:01:10 +0000 (11:01 +0200)] 
wireguard: add metric to routes

maintainer: Felix Fietkau <nbd@nbd.name>

The metric field is not used when wireGuard routes are created.

See: https://github.com/openwrt/openwrt/issues/23199

This patch is aimed at adding the metric field in the config to the created routes for WireGuard if
the metric field is not empty and not 0

Compile tested: X86, Openwrt-main
Run tested: X86

Please have a look and consider implementing

Signed-off-by: Erik Conijn <egc112@msn.com>
Link: https://github.com/openwrt/openwrt/pull/23280
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 days agodnsmasq: add some default values of dhcp.conf 23445/head
Andy Chiang [Wed, 20 May 2026 05:34:45 +0000 (12:34 +0700)] 
dnsmasq: add some default values of dhcp.conf

add ra/dhcpv4/dhcpv6

dhcpv6 service provided by dnsmasq without odhcpd

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/23445
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 days agodnsmasq: add fallback for default dhcpv4/dhcpv6 values
Andy Chiang [Mon, 8 Jun 2026 00:58:47 +0000 (07:58 +0700)] 
dnsmasq: add fallback for default dhcpv4/dhcpv6 values

The default dhcpv4/dhcpv6 in odhcpd is disabled.
Add fallback for default values to keep consistency.

Link: https://github.com/openwrt/odhcpd/blob/master/README.md
Ref: https://github.com/openwrt/luci/pull/8642

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/23445
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 days agoimx: cortexa7: support camera on TechNexion PICO-PI-IMX7D 17606/head
Lech Perczak [Tue, 14 Nov 2023 18:44:43 +0000 (19:44 +0100)] 
imx: cortexa7: support camera on TechNexion PICO-PI-IMX7D

Enable device packages required for camera support and add relevant device
tree nodes.

The drivers probe and connect properly, but it currently only supports
uncompressed UYVY in 2592x1944, 1920x1080 and 1280x960 resolutions, so I
had to use ustreamer to get the stream over network:

ustreamer -r 1920x1080 -m UYVY -d /dev/video0 -s 0.0.0.0

To get the camera working, the following extra packages are needed:
kmod-mux-mmio kmod-video-imx7-csi kmod-video-imx-mipi-csis kmod-video-mux \
kmod-video-ov5645

To set up the capture, you need to set up the links and formats across
the pipeline, for example:

media-ctl -d /dev/media0 -l "'ov5645 3-003c':0 -> 'csis-30750000.mipi-csi':0[1]"
media-ctl -d /dev/media0 -l "'csis-30750000.mipi-csi':1 -> 'csi-mux':1[1]"
media-ctl -d /dev/media0 -l "'csi-mux':2 -> 'csi':0[1]"
media-ctl -d /dev/media0 -l "'csi':1 -> 'csi capture':0[1]"

media-ctl -d /dev/media0 -V "'ov5645 3-003c':0 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csis-30750000.mipi-csi':0 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csis-30750000.mipi-csi':1 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csi-mux':1 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csi-mux':2 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csi':0 [fmt:UYVY8_1X16/1920x1080 field:none]"
media-ctl -d /dev/media0 -V "'csi':1 [fmt:UYVY8_1X16/1920x1080 field:none]"

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17606
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
12 days agokernel: modules: video: package ov5645 driver
Lech Perczak [Tue, 14 Nov 2023 18:43:43 +0000 (19:43 +0100)] 
kernel: modules: video: package ov5645 driver

Create a package for ov5645 kernel module, required to support camera on
PICO-PI-IMX7D board.

Currently limit the visibility to imx_cortexa7 subtarget, but this can
be enabled on other platforms if needed.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17606
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
12 days agokernel: modules: video: package video-mux
Lech Perczak [Tue, 14 Nov 2023 18:42:45 +0000 (19:42 +0100)] 
kernel: modules: video: package video-mux

Package the video-mux module, required by PICO-PI-IMX7D board, to
support included OV5645 camera.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17606
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
12 days agokernel: modules: package MMIO mux driver
Lech Perczak [Mon, 18 Dec 2023 01:16:49 +0000 (02:16 +0100)] 
kernel: modules: package MMIO mux driver

Create a package for MMIO-based multiplexer driver, used as a backend by
video-mux on i.MX7 SoCs.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17606
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
12 days agokernel: modules: video: package i.MX7 CSI driver
Lech Perczak [Tue, 14 Nov 2023 18:42:28 +0000 (19:42 +0100)] 
kernel: modules: video: package i.MX7 CSI driver

Create a package for i.MX7 CSI driver module, together with it's common
code for i.MX family.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17606
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
12 days agowifi-scripts: add EHT beamforming options to hostapd config 22956/head
Richard Huynh [Thu, 16 Apr 2026 11:40:53 +0000 (21:40 +1000)] 
wifi-scripts: add EHT beamforming options to hostapd config

Some EHT options like beamformer/beamformee
are disabled by default in hostapd.conf

Read the EHT Phy Cap structure and enable/disable
switches within the hostapd.conf for capable hardware.

Without this EHT SU beamformer/beamformee and MU
beamformer capabilities are omitted from AP beacons,
even if the driver reports the hardware as capable.

Signed-off-by: Richard Huynh <voxlympha@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22956
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
12 days agoath79: add support for Ubiquiti NanoStation Loco M (XW v2) 23912/head
Matthias Urlichs [Mon, 22 Jun 2026 09:44:20 +0000 (11:44 +0200)] 
ath79: add support for Ubiquiti NanoStation Loco M (XW v2)

This commit adds support for the NanoStation Loco M2/M5 XW devices
on the ath79 target with test date (label on the packaging, not the
device) later than October 2017.

To discover whether you have the new version, open a console on the
stock web interface and run `dmesg | grep AR803`. New versions print
AR8035, v1 shows AR8032.

Specifications:

 - AR9342 (rev 3) SoC @ 535 MHz
 - 64 MB RAM
 - 8 MB SPI flash
 - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in
 - AR8035 switch
 - 2T2R 5 GHz radio, 22 dBm
 - 13 dBi built-in directional antenna
 - POWER/LAN green LEDs
 - 4x RSSI LEDs (red, orange, green, green)
 - UART (115200 8N1) on PCB

Flashing via TFTP:

 - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset
   button on the device pressed
 - Power on the device via PoE (keep reset button pressed)
 - Keep pressing until LEDs flash alternatively LED1+LED3 =>
   LED2+LED4 => LED1+LED3, etc.
 - Release reset button
 - The device starts a TFTP server at 192.168.1.20
 - Set a static IP on the computer (e.g., 192.168.1.21/24)
 - Upload via tftp the factory image:
   $ tftp 192.168.1.20
   tftp> bin
   tftp> put openwrt-ath79-generic-xxxxx-ubnt_nanostation-loco-m-xw-v2-squashfs-factory.bin

MAC addresses: stored on Flash, in the "art" partition.

Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Link: https://github.com/openwrt/openwrt/pull/23912
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
12 days agomediatek: filogic: fix Globitel BT-R320 FIT rootfs mapping 23895/head
solodecode [Sat, 20 Jun 2026 16:47:40 +0000 (19:47 +0300)] 
mediatek: filogic: fix Globitel BT-R320 FIT rootfs mapping

Globitel BT-R320 boots the sysupgrade FIT from the eMMC production
partition with root=/dev/fit0.

The device tree did not describe the production GPT partition and
/chosen/rootdisk did not point at the FIT container. fitblk then had no
rootdisk match and the board stopped at:

  Waiting for root device /dev/fit0...

Describe the eMMC GPT partitions, set /chosen/rootdisk to production,
and use the FIT sysupgrade path.

Fixes: a3105d3f9573 ("mediatek: filogic: add support for Globitel BT-R320")
Signed-off-by: solodecode <zikwarface134@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23895
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
12 days agoath79: fix Ethernet auto-negotiation on Ruckus ZoneFlex 7025 24022/head
Dhimant Thanki [Wed, 1 Jul 2026 13:12:55 +0000 (18:42 +0530)] 
ath79: fix Ethernet auto-negotiation on Ruckus ZoneFlex 7025

On the ZoneFlex 7025 the uplink port (eth0) is connected to PHY 4 of
the AR7240 built-in switch. This PHY erroneously advertises
1000baseT/Full capability, even though the AR7240 built-in switch only
supports 10/100 Mbps.

Because of the bogus gigabit capability, phylib performs 1000BASE-T
master/slave resolution against the PHY's non-functional gigabit
registers, which never completes. Auto-negotiation then fails: the
link flaps between speeds or never comes up at all, while a manually
forced fixed speed works fine.

Cap the PHY at 100 Mbps so the gigabit capability is removed and the
master/slave resolution path is skipped. eth0 then auto-negotiates
reliably to 100 Mbps full-duplex.

Signed-off-by: Dhimant Thanki <dhimant.thanki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24022
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
12 days agomvebu: MikroTik: add support for RB5009UPr+S+IN
Przemek Rudy [Mon, 23 Feb 2026 10:44:17 +0000 (11:44 +0100)] 
mvebu: MikroTik: add support for RB5009UPr+S+IN

The MikroTik RB5009UPr+S+IN is a multigig router based on the Marvell
Armada 7040 SoC, sharing the same hardware base as the RB5009UG+S+IN
with added PoE-out support on all ethernet ports.

Specification:

- SoC             : Marvell Armada 7040 (88F7040), 4x Cortex-A72
- CPU frequency   : 350-1400 MHz
- RAM             : 1 GB
- Flash           : 16 MB SPI NOR + 1 GB NAND
- Switch          : Marvell MV88E6393X
- Ethernet        : 1x 2.5G (p1, QCA8081), 7x 1G (p2-p8), 1x SFP+ 10G
- PoE-in          : 802.3af/at on p1, 24-57V
- PoE-out         : 802.3af/at on p1-p8, 130 W total
- Power           : DC jack / 2-pin terminal / PoE-in, 24-57V
- USB             : 1x USB 3.0 type A, max 1.5 A
- LEDs/Keys (GPIO): 4x/1x
- UART            : MikroTik SPI/UART combo header (10-pin, 2.0mm pitch)
  - assignment    : GND Vcc Rx ? GND / CLK DO /CS Tx DI (top view)
  - settings      : 115200n8

Flash instruction using initramfs image:

RouterBOOT cannot boot the OpenWrt kernel directly. A U-Boot loader
(u-boot.elf) is installed as an intermediary: RouterBOOT loads
u-boot.elf, which then loads the OpenWrt initramfs image.

1. Rename the downloaded initramfs image, removing the version number,
   to: openwrt-mvebu-cortexa72-mikrotik_rb5009-initramfs-uImage.itb
2. Set up a BOOTP/TFTP server serving u-boot.elf, with the renamed
   initramfs image in the same directory
3. Power off the router, hold the reset button (front panel), power on
   and keep holding until the initramfs image has been served, then
   release
4. The router boots the initramfs image, reachable at 192.168.1.1
5. Log in via SSH, install U-Boot, wipe NAND and flash OpenWrt:

     . /lib/functions.sh
     yafut -d /dev/mtd$(find_mtd_index "YAFFS") -w -i /tmp/u-boot.elf -o kernel -T
     ubiformat /dev/mtd$(find_mtd_index "ubi") -y
     sysupgrade /tmp/openwrt-mvebu-cortexa72-mikrotik_rb5009upr-squashfs-sysupgrade.bin

Recovery:

Hold the reset button while U-Boot is booting to load the initramfs
image again. To return to RouterOS, use MikroTik Netinstall.

MAC Addresses:

MAC addresses are read from the RouterBOOT hard_config in NOR via the
macaddr_hard nvmem cell:

offset +0 p1  (2.5G, label-mac-device)
offset +1 p2
offset +2 p3
offset +3 p4
offset +4 p5
offset +5 p6
offset +6 p7
offset +7 p8
offset +8 sfp

Tested-by: Sm00shed <sm00shed@posteo.de> (RB5009UPr+S+IN, OpenWrt v25.12.4,
kernel 6.12.87, mtpoe fw 65.21)
Signed-off-by: Przemek Rudy <prudy@protonmail.com>
[carlo@common-net.org: refactor RB5009UPr+S+IN support and fix sysupgrade path]
Signed-off-by: Carlo Filippi <carlo@common-net.org>
[sm00shed@posteo.de: fix compatible indentation, remove mikrotik,rb5009, expand commit message]
Signed-off-by: Sm00shed <sm00shed@posteo.de>
Link: https://github.com/openwrt/openwrt/pull/23698
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
12 days agomvebu: rename generic rb5009 to rb5009ug
Przemek Rudy [Mon, 23 Dec 2024 19:28:12 +0000 (20:28 +0100)] 
mvebu: rename generic rb5009 to rb5009ug

Specialize RB5009UG model from generic RB5009.

Signed-off-by: Przemek Rudy <prudy@protonmail.com>
[carlo@common-net.org: fixed model name and backward compatibility ]
Signed-off-by: Carlo Filippi <carlo@common-net.org>
Signed-off-by: Sm00shed <sm00shed@posteo.de>
Link: https://github.com/openwrt/openwrt/pull/23698
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
12 days agoairoha: remove KERNEL_LOADADDR from airoha_an7583-evb device definition 24000/head
YaleiZang [Tue, 30 Jun 2026 08:13:01 +0000 (16:13 +0800)] 
airoha: remove KERNEL_LOADADDR from airoha_an7583-evb device definition

Delete the KERNEL_LOADADDR assignment from the airoha_an7583-evb device definition.
The kernel load address is now centrally managed in image Makefile with, just using default load address:

    loadaddr-$(CONFIG_TARGET_airoha_an7583) := 0x80200000

This ensures the load address configuration is maintained in a single location.
Removing the duplicate assignment prevents confusion and potential misconfiguration.

Signed-off-by: YaleiZang <yalei.zang@airoha.com>
Link: https://github.com/openwrt/openwrt/pull/24000
Signed-off-by: Robert Marko <robimarko@gmail.com>
12 days agomt76: update to Git HEAD (2026-07-01)
Felix Fietkau [Wed, 1 Jul 2026 11:14:43 +0000 (13:14 +0200)] 
mt76: update to Git HEAD (2026-07-01)

50a0c3057575 firmware: update MT7986 firmware to version 20260515
6b7b98627bcc wifi: mt76: mt7915: HW ATF support for mt7986+
910db36ae5b1 wifi: mt76: mt7996: HW ATF support
f6cf5faff4b6 firmware: update MT7996 firmware to version 20260311
fe40221e05eb wifi: mt76: mt7996: fix EAPOL source BSS for non-MLD stations
59676919ea40 wifi: mt76: mt7996: fix non-MLD station num_sta leak

Signed-off-by: Felix Fietkau <nbd@nbd.name>
12 days agoqosify: update to Git HEAD (2026-06-22)
Felix Fietkau [Wed, 1 Jul 2026 08:35:29 +0000 (10:35 +0200)] 
qosify: update to Git HEAD (2026-06-22)

298754f6ded2 map: add NQB DiffServ codepoint
d26cc573f36c qosify: account for bytes in traffic class statistics
0edbc51af3b6 qosify: group traffic class stats under a "classes" table
fe8491da8daf qosify: add per-DSCP traffic statistics
181a691407ee dns: track cname cache hit/miss statistics
cece4e23a9df qosify: track per-DNS-pattern traffic statistics
6b4be193a6dd qosify: report eBPF map entry count and last reload time
e57b34046341 qosify: account for GSO segment count in packet statistics
c49e72a4a45d qosify-bpf: remove unused variable in classify()
44ce40f8e083 qosify: count all traffic in per-DSCP statistics
beeb87ec1f16 qosify: expose default traffic classes in statistics

Signed-off-by: Felix Fietkau <nbd@nbd.name>
12 days agoapm821xx: only install swconfig for needed devices 23985/head
Rosen Penev [Mon, 29 Jun 2026 23:49:00 +0000 (16:49 -0700)] 
apm821xx: only install swconfig for needed devices

Only the wndap6x0 devices need swconfig because of the realtek switch.
Place swconfig there instead of for every device.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23985
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
12 days agoapm821xx: move PHY/DSA drivers to DEVICE_PACKAGES on nand boards
Rosen Penev [Sun, 28 Jun 2026 21:09:06 +0000 (14:09 -0700)] 
apm821xx: move PHY/DSA drivers to DEVICE_PACKAGES on nand boards

Only the devices that actually have these PHYs and DSA switches
should carry the kernel modules, instead of baking them into the
kernel for all nand boards.

These devices have no space constraints, so any size increase is
meaningless.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23985
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
12 days agomediatek: remove extra space in bootargs cudy wr3000p/s/h/e v1 ubootmod 23274/head
Dmitry Mostovoy [Sun, 10 May 2026 06:52:08 +0000 (02:52 -0400)] 
mediatek: remove extra space in bootargs cudy wr3000p/s/h/e v1 ubootmod

Removes an extra space in "bootargs" property mistakenly added initially

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23274
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
12 days agomediatek: add cudy m3000-v2-yt8821 ubootmod
Dmitry Mostovoy [Sat, 9 May 2026 18:56:45 +0000 (14:56 -0400)] 
mediatek: add cudy m3000-v2-yt8821 ubootmod

RAM: ESMT M15T2G16128A-DEB DDR3 1866 MT/s

This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdinfo" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
  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":
  mtd -e BL2 write openwrt-mediatek-filogic-cudy_m3000-v2-yt8821-ubootmod-preloader.bin BL2
  mtd -e FIP write openwrt-mediatek-filogic-cudy_m3000-v2-yt8821-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_m3000-v2-yt8821-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:
  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
9. Perform sysupgrade.

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23274
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
12 days agomediatek: add cudy m3000-v1 ubootmod
Dmitry Mostovoy [Sat, 9 May 2026 15:56:40 +0000 (11:56 -0400)] 
mediatek: add cudy m3000-v1 ubootmod

RAM: ESMT M15T2G16128A-DEB DDR3 1866 MT/s

This allows us to use the full size of nand,
which extends ubi size from 64Mb to 122.25Mb.

1. Log in to the device and backup all the partitions,
especially unique "Factory" and "bdinfo" partitions
from System -> Backup / Flash Firmware -> Save mtdblock contents.
2. Install kmod-mtd-rw to unlock mtd partitions for writing
  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":
  mtd -e BL2 write openwrt-mediatek-filogic-cudy_m3000-v1-ubootmod-preloader.bin BL2
  mtd -e FIP write openwrt-mediatek-filogic-cudy_m3000-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_m3000-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:
  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
9. Perform sysupgrade.

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23274
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
12 days agoarm-trusted-firmware-mediatek: cudy-ddr3: reduce ram speed to 1866 MT/s
Dmitry Mostovoy [Sun, 17 May 2026 06:34:36 +0000 (02:34 -0400)] 
arm-trusted-firmware-mediatek: cudy-ddr3: reduce ram speed to 1866 MT/s

Add DDR3_FREQ_1866 for DDR3 Cudy devices
to reduce RAM speed to 1866 MT/s

All known Cudy devices with DDR3 256/512 MB RAM use
ESMT M15T2G16128A-DEB DDR3 1866 MT/s or
ESMT M15T2G16256A-DEB DDR3 1866 MT/s

Signed-off-by: Dmitry Mostovoy <stavultras@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23274
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
12 days agortl826x-firmware: ship rtl8261n and rtl8264b in single firmware package 23947/head
Sven Eckelmann [Mon, 22 Jun 2026 13:10:38 +0000 (15:10 +0200)] 
rtl826x-firmware: ship rtl8261n and rtl8264b in single firmware package

The firmware loading does not depend (solely) on the PHY id. The driver
needs to read out the vendor version id of the PHY before it can decide
which firmware file needs to be loaded.

A split in an RTL8261N and an RTL8264B firmware package is therefore
misleading. And it could even be that a product ships an RTL8264B but
switches the revision of the chip in the middle of its product lifetime. In
this case, the first identification based on the chip ID or the actual chip
ID for the OpenWrt porter might fail for another user with a later/earlier
produced device.

Shipping both files in the same package avoids this problem. Only the "low
power" firmware package is slightly misleading because there is only a
RTL8261N firmware binary for low power but no corresponding RTL8264B
version. It will ship simply the non-low power version for RTL8264B.

Suggested-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/23947
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
12 days agogeneric: net: phy: realtek: select rtl826x phy patch table by chip version
Carlo Szelinsky [Tue, 9 Jun 2026 19:42:40 +0000 (21:42 +0200)] 
generic: net: phy: realtek: select rtl826x phy patch table by chip version

The in-tree realtek 5G/10G driver picks the firmware patch table from the
PHY ID (RTL8264 -> rtl8264b.bin). The vendor driver instead picks it from
VEND1 0x104[2:0] (0 = RTL8264B, else RTL8261N-C), independent of PHY ID.

On the S1300WP the RTL8264 dies read 0x104=0xf802 ([2:0]=2), so they need
the RTL8261N-C table; the RTL8264B table leaves the PCS unlocked (0xA600
stuck 0x1000) and config_init fails with -ETIME. Read 0x104[2:0] and load
rtl8261n.bin when non-zero. Boards with such a die must ship rtl8261n.bin.

Fixes: 6369c9e5c799 ("generic: net: phy: realtek: add 5G and 10G PHY support")
Co-authored-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/23947
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
12 days agomvebu: switch to kernel 6.18 and drop 6.12 23962/head
Yanase Yuki [Sat, 27 Jun 2026 09:44:26 +0000 (18:44 +0900)] 
mvebu: switch to kernel 6.18 and drop 6.12

Use kernel 6.18 instead of 6.12.
Tested on Check Point V-80.

Signed-off-by: Yanase Yuki <dev@zpc.st>
Link: https://github.com/openwrt/openwrt/pull/23962
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
13 days agobuild: don't store timestamps in APK packages 24005/head
Paul Spooren [Tue, 30 Jun 2026 16:38:58 +0000 (18:38 +0200)] 
build: don't store timestamps in APK packages

This commit statically sets SOURCE_DATE_EPOCH to 0, which causes `apk mkpkg` to
drop the date from generated packages. This improves reproducibility while
leaving package specific SOURCE_DATE_EPOCH untouched. The latter can be
interesting for i.e. packages like busybox, which prominently show that date on
the login shell.

Without this commit, packages that live inside feed repositories (openwrt.git,
packages.git etc) like `mtd` or `attendedsysupgrade-common` would have random
timestamps since no "full" git log was available.

Below an example with different source dates (0, 1):

│  0755  root:wheel    -                           -  /
│  0755  root:wheel    -                           -  lib/
│  0755  root:wheel    -                           -  lib/apk/
│  0755  root:wheel    -                           -  lib/apk/packages/
│ -0644  root:wheel    1970-01-01T00:00:01Z       10  lib/apk/packages/mtd.list
│ +0644  root:wheel    -                          10  lib/apk/packages/mtd.list
│  0755  root:wheel    -                           -  sbin/
│ -0755  root:wheel    1970-01-01T00:00:01Z    24595  sbin/mtd
│ +0755  root:wheel    -                       24595  sbin/mtd

Link: https://github.com/openwrt/openwrt/pull/24005
Signed-off-by: Paul Spooren <mail@aparcar.org>
13 days agomac80211: notify driver on airtime weight changes
Felix Fietkau [Wed, 24 Jun 2026 10:57:55 +0000 (12:57 +0200)] 
mac80211: notify driver on airtime weight changes

Add a new sta_set_airtime_weight driver op so drivers can program the
airtime fairness weight into hardware.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
13 days agomediatek: qihoo: fix WMAC eeprom 23999/head
Rosen Penev [Tue, 30 Jun 2026 03:31:50 +0000 (20:31 -0700)] 
mediatek: qihoo: fix WMAC eeprom

Wrong factory partition was used.

Fixes: 53fa04d2619f ("mediatek: filogic: replace mtd-eeprom with nvmem")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23999
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agorealtek: l3: reorganize lock access 23979/head
Markus Stockhausen [Sun, 28 Jun 2026 17:25:43 +0000 (19:25 +0200)] 
realtek: l3: reorganize lock access

The layer 3 code shares the register access lock with the DSA driver.
It is currently unclear to which extent this is really needed. To
avoid permanent access to the DSA private structure reorganize the
locking as follows:

- create a lock pointer in the layer 3 control structure
- link it to the DSA lock during probing
- use the ctrl->lock pointer whenever needed.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agorealtek: l3: move route_use_bm to layer 3
Markus Stockhausen [Sun, 28 Jun 2026 16:45:08 +0000 (18:45 +0200)] 
realtek: l3: move route_use_bm to layer 3

This is another variable that belongs to the layer 3 code.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agorealtek: l3: move RTL930x setup to layer 3 code
Markus Stockhausen [Sun, 28 Jun 2026 10:10:00 +0000 (12:10 +0200)] 
realtek: l3: move RTL930x setup to layer 3 code

Move the setup where it belongs and drop the no longer used
l3_setup() callback in the DSA code.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agorealtek: l3: relocate RTL83xx setup
Markus Stockhausen [Sun, 28 Jun 2026 09:51:27 +0000 (11:51 +0200)] 
realtek: l3: relocate RTL83xx setup

Make use of the new layer 3 setup callback for RTL83xx.

- RTL838x had no setup. Drtop it completely
- RTL839x move the setup over to the layer 3 code.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agorealtek: l3: add setup callback
Markus Stockhausen [Sun, 28 Jun 2026 09:26:10 +0000 (11:26 +0200)] 
realtek: l3: add setup callback

The existin setup calls must be migrated from the DSA code into
the layer 3 code. Provide a new callback for that. Keep it empty
for now.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agorealtek: l3: cleanup headers
Markus Stockhausen [Sun, 28 Jun 2026 09:05:02 +0000 (11:05 +0200)] 
realtek: l3: cleanup headers

With all the code relocation it is time to clean the headers.

- otto_l3_route_ht_params is internal and can be moved to l3.c
- otto_l3_route is no longer needed in rtl-otto.h
- additionally reorder structures to avoid forward declarations

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agorealtek: l3: relocate find_slot()
Markus Stockhausen [Sun, 28 Jun 2026 08:46:49 +0000 (10:46 +0200)] 
realtek: l3: relocate find_slot()

Move find_slot() and its helpers into the new layer 3 ecosystem.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agorealtek: l3: relocate set_egress_intf()
Markus Stockhausen [Sun, 28 Jun 2026 08:18:04 +0000 (10:18 +0200)] 
realtek: l3: relocate set_egress_intf()

Relocate set_egress_intf() to layer 3 code. While we are here change
prefix of interface structure to otto_l3_ and move its definition
to the new code too.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agorealtek: l3: relocate get_egress_mac()
Markus Stockhausen [Sun, 28 Jun 2026 07:56:02 +0000 (09:56 +0200)] 
realtek: l3: relocate get_egress_mac()

Move get_egress_mac() from DSA to layer 3 code.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agorealtek: l3: move host_route_write to layer 3 source
Markus Stockhausen [Sun, 28 Jun 2026 07:36:35 +0000 (09:36 +0200)] 
realtek: l3: move host_route_write to layer 3 source

Move another function from DSA to layer 3 coding.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agorealtek: l3: move host_route_use_bm to layer 3
Markus Stockhausen [Sun, 28 Jun 2026 07:21:37 +0000 (09:21 +0200)] 
realtek: l3: move host_route_use_bm to layer 3

This is another layer 3 specific attribute. Move it to its new home.

Link: https://github.com/openwrt/openwrt/pull/23979
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agorealtek: irq: backport upstream patches 23679/head
Markus Stockhausen [Sat, 6 Jun 2026 06:45:54 +0000 (08:45 +0200)] 
realtek: irq: backport upstream patches

The interrupt driver downstream patches have been sent
upstream and got accepted. Backport them and make the
driver free of downstream hacks.

Link: https://github.com/openwrt/openwrt/pull/23679
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2 weeks agoramips: ethernet: ralink: add mediatek,no-swconfig property 23933/head
Mieczyslaw Nalewaj [Wed, 3 Jun 2026 14:51:29 +0000 (16:51 +0200)] 
ramips: ethernet: ralink: add mediatek,no-swconfig property

Skip swconfig registration and disable MAC learning when the
"mediatek,no-swconfig" property is set. This is needed for MT7620
devices using the internal switch as a transparent bridge to an
external RGMII switch, where ports 0-4 are unused.

The no-swconfig property itself is valid for both DSA and non-DSA
setups. However, disabling MAC learning is only required for DSA,
where multiple CPU-facing interfaces would otherwise cause an
incorrect ARL table to be built. Non-DSA setups work correctly
without disabling MAC learning.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/23933
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoramips: ethernet: ralink: fix offload with diff dsa tag
Luiz Angelo Daros de Luca [Tue, 25 Jan 2022 13:20:23 +0000 (10:20 -0300)] 
ramips: ethernet: ralink: fix offload with diff dsa tag

DSA copies the driver features to slave device, including offload
capabilites. Once a packet is sent though a DSA slave interface,
according to its features, the kernel does not calculate checksums,
expecting that the HW will fill the gaps. DSA adds the defined DSA
tag and sends the tagged packet through the master device.

Ethertype DSA tags expect the driver to calculate checksum based on the
csum_start/csum_offset. However, mtk_eth_soc does not use that info.
mtk_eth_soc checks the network header and decides if the HW can manage
that packet, unaware that mac layer now contains an extra DSA tag. When
that tag is the Mediatek CPU tag, offload will work as expected.
When it is an incompatible DSA tag (all but Mediatek) or if DSA is
stacking two incompatible DSA tags, the driver will still count on the
HW offload. In this case, packets go to the network with an incorrect
checksum.

This patch adds an extra check and disables offloading when DSA tag is
in use and it is not Mediatek. Offloading is also disabled even when DSA
tag is Mediatek but there is something else increasing the mac layer
region (possibly another stacked tag). Mediatek tag can encode 802.1Q info and
using vlan tags will still use offloading. Other mac layer protocols
that are not supported by Mediatek will disable HW offloading. PPPoE was
not tested but it is expected that it will disable offloading.

This code is heuristically trying to keep HW offload enable with DSA tags.
Anyway, in the worse case, offloading is disabled and there is an increase
in overhead, which is better than packet with wrong checksum.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23933
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoramips: ethernet: ralink: mtu change while interface is down
Luiz Angelo Daros de Luca [Fri, 7 Jan 2022 05:24:03 +0000 (02:24 -0300)] 
ramips: ethernet: ralink: mtu change while interface is down

fe_change_mtu didn't update the registers if the interface was down.

DSA increases the CPU port MTU to accommodate the CPU tag. As this
happens while the CPU port was still down, the chip regs didn't get
updated and larger frames were dropped.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23933
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoramips: ethernet: ralink: fix MT7620A_GDMA regs
Luiz Angelo Daros de Luca [Fri, 7 Jan 2022 04:47:06 +0000 (01:47 -0300)] 
ramips: ethernet: ralink: fix MT7620A_GDMA regs

Registers in MT7620A_GDMA_OFFSET range were incorrect, except for the
first one GDM_FWD_CFG (which is actually the only one in use).
The next and last register is GDM_SHPR_CFG. All others are not mentioned
in docs.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23933
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoramips: ethernet: ralink: mt7620 enable jumbo frames
Luiz Angelo Daros de Luca [Thu, 31 Mar 2022 04:15:44 +0000 (01:15 -0300)] 
ramips: ethernet: ralink: mt7620 enable jumbo frames

mt7620 can forward jumbo frames up to 2048. The fe_change_mtu() was
already compatible except for the GDM_FWD_CFG address.

An MTU greater than 1500 is required to use DSA tags with a stacked
switch chip.

This patch enables jumbo frame support by default.

Signed-off-by: Andrey Melnikov <temnota.am@gmail.com>
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23933
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoscripts: dhcpv6: don't report custom ip6class if default 23989/head
Shine [Mon, 29 Jun 2026 07:23:45 +0000 (09:23 +0200)] 
scripts: dhcpv6: don't report custom ip6class if default

odhcp6c returns delegated prefixes with a "class=<IAID>" tag if a custom
IAID was specified in the -P argument. This tag must then be used for any
prefix filter ("network.<interface>.ip6class") instead of the uplink i/f
name.

OpenWrt by default uses the first eight digits of the uplink i/f name's MD5
hash as IAID. Don't report a custom "class" tag for this default IAID.

Fixes: f08cd5ce5d66d76fa6e282d6e3f29bab9cdf8023
Signed-off-by: Shine <4c.fce2@proton.me>
Tested-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23989
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agotoolchain: gcc: update GCC 14 to 14.4 23950/head
Shiji Yang [Fri, 26 Jun 2026 15:20:56 +0000 (23:20 +0800)] 
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>
2 weeks agomediatek: acer-predator-w6x: add LED boot status support 23958/head
Dimitri Souza [Fri, 26 Jun 2026 22:59:43 +0000 (19:59 -0300)] 
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>
2 weeks agoramips: timecloud: fix LED configs 23182/head
David Yang [Fri, 1 May 2026 17:43:00 +0000 (01:43 +0800)] 
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>
2 weeks agoramips: timecloud: add label-mac-device
David Yang [Fri, 1 May 2026 17:21:08 +0000 (01:21 +0800)] 
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>
2 weeks agoramips: timecloud: fix eject button
David Yang [Fri, 1 May 2026 15:26:19 +0000 (23:26 +0800)] 
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>
2 weeks agoramips: timecloud: increase SPI flash speed
David Yang [Fri, 1 May 2026 15:23:52 +0000 (23:23 +0800)] 
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>
2 weeks agowifi-scripts: ucode: check wpa_supplicant exists before mesh probe 23607/head
Florian Maurer [Sun, 31 May 2026 21:04:41 +0000 (21:04 +0000)] 
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>
2 weeks agowifi-scripts: ucode: remove trailing whitespace
Florian Maurer [Sun, 31 May 2026 21:04:26 +0000 (21:04 +0000)] 
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>
2 weeks agowifi-scripts: ucode: only set antenna when config changes
Florian Maurer [Sun, 31 May 2026 20:14:38 +0000 (20:14 +0000)] 
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>
2 weeks agomediatek: add support Livinet Li320 23744/head
Fil Dunsky [Fri, 5 Jun 2026 14:53:45 +0000 (17:53 +0300)] 
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>
2 weeks agorockchip: add support for FriendlyARM NanoPi R2S Plus 23854/head
Grische [Wed, 17 Jun 2026 12:09:18 +0000 (14:09 +0200)] 
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>
2 weeks agoairoha: add support for Nokia XG-040G-MD 23569/head
Mikhail Zhilkin [Sat, 23 May 2026 14:42:33 +0000 (17:42 +0300)] 
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>
2 weeks agouboot-airoha: add support for Nokia XG-040G-MD
Mikhail Zhilkin [Sat, 6 Jun 2026 12:08:36 +0000 (15:08 +0300)] 
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>
2 weeks agouboot-airoha: add readmem command
Mikhail Zhilkin [Sat, 6 Jun 2026 13:43:36 +0000 (16:43 +0300)] 
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>
2 weeks agouboot-airoha: add custom title support
Mikhail Zhilkin [Sat, 6 Jun 2026 11:59:51 +0000 (14:59 +0300)] 
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>
2 weeks agouboot-airoha: fix sorting
Mikhail Zhilkin [Sat, 6 Jun 2026 11:52:30 +0000 (14:52 +0300)] 
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>
2 weeks agoairoha: an7581: enable mtd virtual concat support
Mikhail Zhilkin [Sat, 23 May 2026 14:02:19 +0000 (17:02 +0300)] 
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>
2 weeks agorealtek: pcs: simplify gray code to binary conversion 23984/head
Markus Stockhausen [Sun, 28 Jun 2026 20:24:29 +0000 (22:24 +0200)] 
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>
2 weeks agorealtek: pcs: rtl930x: simplify DCVS/VTH/TAP calibration helpers 23983/head
Jonas Jelonek [Sun, 28 Jun 2026 09:55:18 +0000 (09:55 +0000)] 
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>
2 weeks agorealtek: pcs: rtl930x: fix LEQ calibration to use media type
Jonas Jelonek [Sat, 27 Jun 2026 19:23:05 +0000 (19:23 +0000)] 
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>
2 weeks agorealtek: pcs: store active media type in SerDes state
Jonas Jelonek [Sat, 27 Jun 2026 17:50:12 +0000 (17:50 +0000)] 
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>
2 weeks agorealtek: pcs: rtl930x: give some calibration functions meaningful names
Jonas Jelonek [Sat, 27 Jun 2026 17:25:02 +0000 (17:25 +0000)] 
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>
2 weeks agorealtek: pcs: rtl930x: reduce calibration code nesting
Jonas Jelonek [Sat, 27 Jun 2026 13:54:02 +0000 (13:54 +0000)] 
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>
2 weeks agolantiq: vrx518_ep: use module_pci_driver macro 23976/head
Rosen Penev [Sat, 20 Jun 2026 21:40:59 +0000 (14:40 -0700)] 
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>