Commit Graph

69019 Commits

Author SHA1 Message Date
Keno Fischer 9a143bf7ff x86: onie-installer: wire up sysupgrade via ONIE install mode
This adds support for sysupgrade on ONIE-installed systems.
The install is chained through ONIE (using the ONIE installer image),
rather than attempting to manually upgrade the partition.
The idea is to allow future OpenWRT installs flexibility to use
a different partition table. By putting the installer in charge
of setting up the file system partition, the upgrade process needs
to have no knowledge of the internals of the image.

Config preservation is accomplished by appending the sysupgrade .tar.gz
to the ONIE installer image. Of course this also works for a clean
install using a sysupgrade.tar.gz created via `sysupgrade -b`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Keno Fischer <keno@juliahub.com>
Link: https://github.com/openwrt/openwrt/pull/23062
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-05-23 17:23:54 +02:00
Keno Fischer c7e8cffcb2 x86: add onie-installer image type
The current documentation for using OpenWRT on Mellanox Spectrum
switches (https://openwrt.org/toh/mellanox/spectrum) suggests
reflashing the entire harddrive from the recovery USB. This is not
the most friendly way to install a new OS on these switches. From
factory, they come with ONIE (Open Network Install Environment),
which is a linux-based preboot environment for fetching an OS
image from the network and installing it on disk. The installer
is a self-executing bash script that executes inside the ONIE
environment. The installer is expected to preserve the ONIE partition
for use as recovery environement. To be a better citizen on
these platforms, it would be preferrable to provide OpenWRT as
an ONIE-compatible installer.

This PR adds an ONIE_INSTALLER_IMAGES build option that produces
an ONIE compatible .bin. The generated .bin follows the ONIE demo
installer pattern [1]: it creates a new GPT partition
labelled OPENWRT-ROOT on the ONIE install device, formats ext4, extracts
the OpenWrt rootfs and kernel into it, installs GRUB into the existing
UEFI ESP under bootloader-id "OpenWrt", and adds a NVRAM boot entry via
efibootmgr.  ONIE-BOOT is preserved so ONIE rescue remains available.

Tested with the config at [2] on a Mellanox Spectrum SN3800 to produce
a booting OpenWRT install.

[1] https://github.com/opencomputeproject/onie/demo/installer/grub-arch/install.sh
[2] https://gist.github.com/Keno/abc8c5b72645e73fadd1ff0d9616b23d

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Keno Fischer <keno@juliahub.com>
Link: https://github.com/openwrt/openwrt/pull/23062
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-05-23 17:23:53 +02:00
Jonas Jelonek 15593de376 realtek: pcs: derive SerDes link count from DT at probe time
Previously, sds->num_of_links was incremented from rtpcs_create() as
each DSA port bound its phylink_pcs. The count therefore relied on a
temporal contract (DSA must finish enumerating before pcs_config runs)
and on rtpcs_create() being the single chokepoint for all consumers.

Replace this with a probe-time scan of pcs-handle references in the
live OF tree: for every available consumer node carrying a pcs-handle
property pointing at one of our SerDes subnodes, bump that SerDes'
num_of_links. After the scan, the count is final regardless of when
or whether DSA later calls in.

To allow of_parse_phandle_with_args() to walk the property correctly,
add #pcs-cells = <0> to every serdes@N node in the 838x/839x/930x/931x
.dtsi files. A future cell-bearing form remains possible without
touching the scan.

Over-references (DT pointing more consumers at one SerDes than the
hardware can carry) are clamped at RTPCS_MAX_LINKS_PER_SDS and warned
about, but do not fail probe — the correctly-wired ports on that
SerDes still come up, and only the surplus reference is dropped.

The bounds check and the bare ++ in rtpcs_create() become redundant
under the scan-driven count and are removed.

This decouples num_of_links from DSA call ordering and is a prereq
for migrating to fwnode_pcs providers, where rtpcs_create() goes away
as the centralised counter.

Link: https://github.com/openwrt/openwrt/pull/23484
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-05-23 11:02:15 +02:00
Hauke Mehrtens a7bd3b147e uhttpd: update to Git HEAD (2026-05-21)
1b624f8f814e auth: classify $p$ lookups by account state

Link: https://github.com/openwrt/openwrt/pull/23476
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-23 01:52:39 +02:00
Daniel Golle f2aa412733 rtl826x-firmware: depend on kmod-phy-realtek
Follow the established pattern and let the firmware package select
the driver which uses it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-05-22 20:53:04 +01:00
Felix Fietkau 74da669505 umdns: update to Git HEAD (2026-05-22)
bd7599d02157 fix calloc_a size argument type

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-22 14:56:09 +02:00
Felix Fietkau 4136443864 unetd: update to Git HEAD (2026-05-22)
090abf9a5521 host: fix type mismatch on calloc_a calls

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-22 14:54:34 +02:00
Felix Fietkau e7530a287a build: fix apk_package_files wildcard for packages without ABI version
The wildcard combined an apk_package_files pattern of $(pkg)-*.apk with a
gen_package_wildcard that ends in [^a-z]*, so the full glob required two
dashes. Files for packages without an ABI version (e.g. ubbf-0~....apk)
only contain one dash and never matched, so ipkg-remove was never called
on them and stale .apk files accumulated in the bin directory.

Drop the explicit dash from apk_package_files. The [^a-z] in
gen_package_wildcard already serves as the dash matcher, and
scripts/ipkg-remove filters precisely by reading apk metadata.

Fixes: 642d568b0f ("build: fix ipkg-remove: add support for removing apk files")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-22 14:54:34 +02:00
John Crispin 0c2fb39c5a wifi-scripts: iwinfo scan() must not abort the interpreter on failure
Replace exit(1) on every failure path with return null so callers that
iterate over multiple radios can collect results from the radios that
did succeed instead of aborting on the first one that refuses an
off-channel scan.

Route diagnostics to stderr via warn() so stdout stays clean for
callers parsing JSON output, and include the device name in each
message to disambiguate per-radio failures.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-22 14:54:34 +02:00
John Crispin cb7414055c wifi-scripts: iwinfo: guard assoclist against unknown device
Signed-off-by: John Crispin <john@phrozen.org>
2026-05-22 14:54:34 +02:00
Robert Marko 920a382cb6 fstools: update to Git HEAD (2026-03-17)
1bf2d490484e libfstools: make get_var_from_file() reusable
0b6022439cad mount_root: add kernel parameter to specify the overlay storage name
e600d842ce81 mount_root: add kernel parameter to specify the overlay fileystem type

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-05-22 13:10:42 +02:00
Christian Marangi 5b25d4235d airoha: backport GDM2 loopback fixup for Ethernet driver
Backport GDM2 loopback fixup for Ethernet driver. This should be the last
patch before introduction of Multi-Serdes support series.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-05-22 12:43:00 +02:00
Shiji Yang de769c6d66 uboot-mediatek: fix malformed patch
The chunk length is not correct.

Fixes: d2fabb974c ("mediatek: add support for Wavlink WL-WNT100X3 ubootmod")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
2026-05-22 01:47:47 +01:00
Daniel Golle 539f09ade0 rtl8261n-firmware: set PKGARCH:=all
The generated firmware patches for RealTek's PHYs are host architecture
agnostic. Express this with PKGARCH:=all.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-05-21 23:45:07 +01:00
Eric Fahlgren f1e4aaf7b4 imagebuilder: suppress rootfs image when filesystem specified
When using imagebuilder to create images, ROOTFS_FILESYSTEM may be
defined to create just the desired images, but the '*-rootfs.tar.gz'
and '*-rootfs.cpio.gz' images are being created unconditionally
for many targets.

By making generation of these images conditional on the state of
ROOTFS_FILESYSTEM, we can save significant space (measured 3-7 MB
depending on length of package list) and time.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
2026-05-21 18:29:28 +02:00
Daniel Golle 8c264cf222 generic: 6.18: drop downstream RTL8261N driver
Now that the upstream RealTek PHY driver is patched to support also
the new 5G and 10G PHYs we can start to phase-out the messy downstream
driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-05-21 17:04:55 +01:00
Balázs Triszka 6369c9e5c7 generic: net: phy: realtek: add 5G and 10G PHY support
The functionality/support for 5G and 10G PHYs was extracted from the
realtek-phy driver and ported to the upstream Linux realtek PHY driver.
These PHY chips need a sequence of register writes (and similar operations)
for initialization. These sequences are provided as firmware files which
are interpreted/applied by a new register patch engine.

By switching to the upstream driver, it should be possible to get rid of a
large chunk of (from OpenWrt perspective) unmaintained code from Realtek.
The actual Linux phy-core infrastructure from Linux can be mostly used and
only the Realtek specific quirks need to be handled.

The files which need to be provided are depending on the PHY:

* rtl8261n.bin (package "rtl8261n-firmware" or "rtl8261n-lp-firmware")
  - RTL8251L 5Gbps PHY
  - RTL8261BE 10Gbps PHY
  - RTL8261N 10Gbps PHY
* rtl8264b.bin (package "rtl8264b-firmware")
  - RTL8254B 5Gbps PHY
  - RTL8264 10Gbps PHY
  - RTL8264B 10Gbps PHY

Files which are affected by this change (DEVICE_PACKAGES dependencies,
hwmon paths, default kernel configurations, refresh of patches, ...) are
updated at the same times.

Signed-off-by: Balázs Triszka <info@balika011.hu>
Co-authored-by: Semih Baskan <strst.gs@gmail.com>
Co-authored-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Co-authored-by: Gilly1970 <gilroyscott@hotmail.com>
Co-authored-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Co-authored-by: Carlo Szelinsky <github@szelinsky.de>
[sven: rebase, integrate suggestions from PR, add device packages, split]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
[daniel: stripped to Linux 6.18 only, dropped unrelated changes]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-05-21 17:04:55 +01:00
Balázs Triszka a3395c60ba firmware: add Realtek RTL826X firmware package
This is required by the realtek PHY driver for:

* rtl8261n.bin (package "rtl8261n-firmware" or "rtl8261n-lp-firmware")
  - RTL8251L 5Gbps PHY
  - RTL8261BE 10Gbps PHY
  - RTL8261N 10Gbps PHY
* rtl8264b.bin (package "rtl8264b-firmware")
  - RTL8254B 5Gbps PHY
  - RTL8264 10Gbps PHY
  - RTL8264B 10Gbps PHY

These PHY chips need a sequence of register writes for initialization.
These are provided as firmware files which are interpreted/applied by a
new register patch engine.

For the moment, the patch instructions in rtl8261-firmware and
rtl8264b-firmware are the same as from the rtl8261n driver. This should
make it possible to first evaluate the patch engine and driver development
for switching over in adjusting the patch instructions.

Signed-off-by: Balázs Triszka <info@balika011.hu>
[sven: rebase, split, fix package version/release, use conf from rtl8261n
driver]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
[daniel: define VERSION matching source date for the resulting packages]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2026-05-21 17:04:55 +01:00
Paul Spooren a7b5926bba scripts: add --user-network to qemustart
qemustart is a handy script to quickly test OpenWrt firmware using
qemu.  Bringing up networking currently requires a bridge-helper
setup with privileged IP and bridge assignment.  To simplify
testing scenarios like the package manager, which need both shell
access and outbound internet, add a user-mode networking option
backed by SLIRP that requires no privileges.

To stay backward compatible, the defaults don't change.  The new
flag --user-network attaches two NICs (LAN + WAN) and forwards
three host ports to the guest LAN interface (192.168.1.1):
2222 -> 22 (ssh), 8080 -> 80 (http) and 8443 -> 443 (https).  The
host-side ports can be overridden with --ssh-port, --http-port
and --https-port.

Link: https://github.com/openwrt/openwrt/pull/23424
Signed-off-by: Paul Spooren <mail@aparcar.org>
2026-05-21 16:06:25 +02:00
Paul Spooren b8a67fa8d5 scripts: fix lan/wan order of malta in qemustart
OpenWrt's 99-default_network assigns eth0 to lan and eth1 to wan
when no target-specific 02_network is present, which is the case
for malta.  The qemustart bridge block however placed the wan
-device before the lan -device, so the guest's eth0 (lan) ended
up attached to $BR_WAN and eth1 (wan) to $BR_LAN.

Swap the order to match the guest's actual role assignment.

Link: https://github.com/openwrt/openwrt/pull/23424
Signed-off-by: Paul Spooren <mail@aparcar.org>
2026-05-21 16:06:25 +02:00
Markus Stockhausen c27f9b3ba0 realtek: eth: rename netdev/ndev variables to dev
Right now the driver uses variable names netdev/ndev/dev to access
a net_device structure. Align this with most of the other upstream
drivers and convert everything to dev.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23420
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:19:47 +02:00
Markus Stockhausen d3577dfbf3 realtek: eth: get rid of struct device
In the network context there might be confusion between "struct netdev"
and "struct device". The driver should avoid variables of type device
and name "dev" where possible. Remove all variables that point to the
device and use pdev->dev instead. This is like other network drivers
do it.

While we are here modernize logging during probing. Remove messages
from helpers and log errors during probing with dev_err_probe().

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23420
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:19:47 +02:00
Markus Stockhausen 04433b4e75 realtek: eth: better error handling in init_mac()
The function init_mac() can produce errors for the RTL931x devices.
When this happens it throws a message but continues. That can
leave the hardware in a wrong state.

Cleanup the error handling. Remove all messages from the function
and simply return an error value. In the probe() consumer evaluate
this error and abort probing if needed. As there were no reported
issues in the past it is ok to drop the detailed messages and
aggregate them in a single one.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23420
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:19:47 +02:00
Markus Stockhausen a1a4b09076 realtek: eth: reorganize control structure setup
Early assign pdev and netdev to the control structure during probing.
This way it can be used at any time later.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23420
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:19:47 +02:00
Markus Stockhausen 76e47b4421 realtek: mdio: convert to scoped_guard()
Upstream netdev does not like big guards. Especially
around debugging functions. Convert to scoped_guard()
and only lock the really needed code parts. This way
all debugging can run outside of the lock.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23411
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:10:27 +02:00
Markus Stockhausen b8fc512a05 realtek: mdio: convert to consistent a_to_b() helpers
Majority of kernel uses a_to_b(a) instead of b_from_a(a).
Convert to that to be consistent with all helpers in the
driver. Additionally drop inline function definitions.
Let the compiler decide what is best.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23411
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:10:27 +02:00
Markus Stockhausen 57dbfa0a9c realtek: mdio: checkpatch & documentation cleanup
checkpatch is complaining. Fix that. Additionally adapt the
documentation and move it up to the beginning of the driver.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23411
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:10:27 +02:00
Jonas Jelonek c166c20cf6 realtek: add hog for PHY reset for XS1930-10 and -12HP
Add a GPIO hog for those two switches to avoid having a dangling GPIO
which might be pulled accidentally breaking all PHYs, and to have that
GPIO documented.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:42 +02:00
Jonas Jelonek 8d9103a420 realtek: improve DTS readability for XS1930 switches
Improve the readability of the DTS files for XS1930 switches by mostly
making nodes with only a single property a one-liner. This wastes less
visual space and makes it more fluent to read.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:42 +02:00
Jonas Jelonek ce7a5037f3 realtek: make LED set config for XS1930 more generic
The led_set node was previously duplicated in the per-device DTS for
-10/-12HP and -12F, even though all three share the same Base-T LED
encoding. Move the shared led_set with the Base-T mapping into the
common DTSI as set 0, and have XS1930-12F append its SFP-port mapping
as led_set1 via a property override. Swap the led-set index on the
-12F ports accordingly so SFP ports use set 1 and the two Base-T
ports use set 0.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:42 +02:00
Jonas Jelonek 50185c8708 realtek: add additional LED for XS1930-12HP
The -12HP variant has a dedicated red LED on GPIO 3 that lights up
when the PoE budget is exhausted. Add it as led_poe_max with
function = "poe-usage" so userspace can drive it from the PoE stack.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:42 +02:00
Jonas Jelonek 9114f49446 realtek: fix LED function for XS1930 switches
The cloud and locator LEDs were declared with no function (cloud) or
with the generic LED_FUNCTION_INDICATOR (locator), which doesn't
match what the hardware actually exposes. Use the descriptive
function strings "cloud" and "locator" instead so the LEDs end up
with sensible names in sysfs.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:42 +02:00
Jonas Jelonek 15ff65e522 realtek: fix SYS LED for XS1930-12HP
The XS1930-12HP model from Zyxel doesn't actually use the same GPIOs for
the SYS LED. This was assumed first but proved wrong now. Instead, the
green part of the SYS LED is on another GPIO and the red part of the SYS
LED is on GPIO 0 instead of the green part. Adjust that accordingly in
the device tree.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:41 +02:00
Jonas Jelonek d750f5f454 realtek: free restore button of XS1930 switches
The support addition for those switches defined the restore button as a
button to trigger a restart. However, those switches also have a reset
button which is wired to the SoC's reset line, causing a reset upon
pressing. Thus, using the restore button for basically the same purpose
doesn't make sense. Change the 'linux,code' property to 'BTN_0' to
assign no real function to that button, allowing it to be used for
different purposes.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:41 +02:00
Jonas Jelonek 161a871edd realtek: wire up GPIO fan for Zyxel XS1930 switches
The switches from Zyxels XS1930 have one or two fans in the case. They
might be controlled in a limited fashion. There's a single GPIO which -
depending on the state - drives the fan in slow or fast mode. Wire that
up as a device tree node to be able to control that in userspace.

XS1930-10 and XS1930-12HP use the same GPIO while XS1930-12F moves that
to one of its GPIO expanders. Also add 'kmod-hwmon-gpiofan' for all
three devices to be selected by default.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:41 +02:00
Jonas Jelonek 0c50884201 realtek: reorganize DTS for Zyxel XS1930
XS1930-10 and XS1930-12HP share most of their layout: the same
8-port AQR813 Base-T block, the same SFP+ GPIO mux, identical I2C
master config and serdes polarity. Carve those shared pieces out
into a new intermediate rtl9313_zyxel_xs1930-aqr813.dtsi and have both
device DTS files include it, leaving only their device-specific
differences (LED-set masks, extra PoE bits on -12HP, extra AQR113C
PHYs on -12HP) in the per-device files. XS1930-12F continues to
include the common DTSI directly since its layout differs too much
to share usefully.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:41 +02:00
Jonas Jelonek d349945f82 realtek: move XS1930 LED definitions to common DTSI
The power, cloud and locator LEDs exist on all three XS1930 variants
with the same colors and roles, only the GPIOs differ. Declare them
once in the common DTSI with the -10/-12HP pinout and let -12F
override the gpios properties via phandle references. This removes
three near-identical led-node blocks from the device DTS files.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:08:41 +02:00
Markus Stockhausen 3c4a547eb2 realtek: thermal: separate initialization/operation
The driver uses lazy initialization - during first temperature
get. Checking enabled status over and over again does not make
sense. Provide separate setup functions for this. With this split
the error handling will be improved. If initialization fails, the
sensor will not be registered at all.

While we are here fix some minor typos.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23405
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-21 12:07:57 +02:00
Andy Chiang 6eead121ee uhttpd: update to Git HEAD (2026-05-20)
6ab9abb56bcb cgi, file: fix crash due to field_len type mismatch with libubox

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/23446
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-20 23:37:23 +02:00
Lorenzo Bianconi 9e512f7f0b airoha: Do not allow to disable LRO if the QDMA is shared
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/23439
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-05-20 19:45:11 +02:00
David Bauer cb4e665da0 uqmi: use configured profile-id if available
Use a user-supplied profile-id when configuring the APN and PDP type.
Fall back to id "1" in case no profile-id is set by the user.

Link: https://github.com/openwrt/openwrt/issues/21617
Suggested-by: S. Hoot <spoot_hoot@protonmail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
2026-05-20 17:04:18 +02:00
Jonas Jelonek 98cadde477 generic: backport pse-pd error check fix
Backport a patch fixing the error return check when loading PSE PIs from
the DT tree in case the pairset property isn't specified.

This patch might be backported upstream in stable.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23449
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-20 10:38:35 +02:00
Jonas Jelonek fb7c14ce7b kernel: pse-pd: auto-select kmod-pse-pd from AddDepends helper
The AddDepends/pse-pd helper appended kmod-pse-pd to DEPENDS without the
'+' prefix, making it a hard dependency rather than an auto-selecting one.
This breaks pulling any PSE controller driver (kmod-pse-pd692x0,
kmod-pse-si3474, kmod-pse-tps23881, kmod-pse-regulator, ...) in via a
device's DEVICE_PACKAGES: the kmod itself is auto-selected, but the
unsatisfied hard dep on kmod-pse-pd silently drops it from .config.

Prefix the kmod-pse-pd entry with '+' so it auto-selects, matching how
the other deps in the same file (kmod-i2c-core, etc.) are expressed. The
helper is the right place to fix this; every PSE controller driver routes
through it.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23449
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-20 10:38:35 +02:00
Qingfang Deng a97dd6e8d9 kernel: update pppoe patch
Use the patch version accepted upstream and move it to backports dir.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23438
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-20 10:29:02 +02:00
Sven Eckelmann e75f33d0f2 ramips: pax1800-lite: fix label-mac-device
The gmac1 is not used and doesn't have any mac address configured. The
gmac0 has the nvmem-cells set and can actually be used to retrieve the
correct mac address.

Fixes: c7c54f3134 ("ramips: add support for Plasma Cloud PAX1800-Lite")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/23441
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-20 10:27:38 +02:00
Fil Dunsky d2fabb974c mediatek: add support for Wavlink WL-WNT100X3 ubootmod
This allows us to use the full size of nand, which increases ubi size
from 90M to 122.25M.

Flashing instructions:
1. Login into the device and backup all your partitions,
especially `Factory` and 'HW' to be able to come back to stock and use all
Wavlink services.

2. Unlock mtd partitions:
```
apk update && apk add kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1
```
3. Upload new `bl2` and `fip` to the router /tmp and write them:
```
mtd write /tmp/openwrt-mediatek-filogic-wavlink_wl-wnt100x3-ubootmod-preloader.bin bl2
mtd write /tmp/openwrt-mediatek-filogic-wavlink_wl-wnt100x3-ubootmod-bl31-uboot.fip fip
mtd erase ubi
```
4. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt initramfs has booted, prepare ubi and envs:
```
ubidetach -p /dev/mtd4 && ubiformat /dev/mtd4 -y && ubiattach -p /dev/mtd4 && ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB && ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
```
8. Perform sysupgrade.

Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22753
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-20 01:59:58 +02:00
Fil Dunsky 829d432ecd mediatek: add support for Wavlink WL-WNT100X3
Hardware
--------
- SOC: MediaTek MT7981B
- RAM: 512MB DDR3
- FLASH: 128MB SPI-NAND ESMT F50L1G41LB
- NETWORK: 1 x1000M WAN, 1 x 1000M LAN
- WIFI: MediaTek MT7981B 2x2 DBDC 802.11ax 2T2R (2.4/5)
- LEDs: 1x STATUS (blue)
- USB: 1x USB 3.0 (XHCI)
- FAN: 1x 5V FAN

Installation / Upgrade Procedure
-----------------------------

1.Log in to the web management page.
2.Select the country code and time zone, set the Wi-Fi password, and
click Save.
3.Click "More", navigate to "Developer Options", and enable the SSH
function.
4.Log in to the device via an SSH client (default IP is usually
192.168.20.1).
5.Use scp to upload the OpenWrt
image(openwrt-mediatek-filogic-wavlink_wl-wnt100x3-squashfs-sysupgrade.bin)
to the /tmp directory
6.Perform the flash by running the sysupgrade command (use -n to
overwrite the existing configuration)
7.Wait for the device to reboot automatically. Once finished, access the
OpenWrt web interface (LuCI) at the default IP 192.168.1.1.

MAC Addresses
-----------------------------

2.4GHz: 80:3F:5D:xx:xx:93 (Factory 0x4)
LAN   : 80:3F:5D:xx:xx:91 (Factory, 0x3fff4)
WAN   : 80:3F:5D:xx:xx:92 (Factory, 0x3fffa)
5GHz  : 02:3F:5D:xx:xx:93 (derived from 2.4GHz MAC, LAA))

Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22753
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-20 01:59:55 +02:00
Leonard Anderweit 7449064f64 mediatek: filogic: add support for TP-Link F65
Add support for TP-Link Festa F65, an AX3000 ceiling mount WiFi 6 AP.

Hardware
--------
SOC	: MediaTek MT7981B 2x A53
RAM	: ESMT M15T4G16256A 512MiB
Flash	: ESMT F50L1G41LB 128 MiB
ETH	: 1x 1GbE
WiFi	: MT7976
Buttons	: Reset
Leds	: Blue status led on top
Power	: DC 12V 1.2A / PoE

Installation
------------
1. Disassemble the device
2. Solder UART to pins VGRT right of the ethernet port
3. Connect UART console (3.3V)
4. Press Ctrl+b to stop in u-boot shell
5. Use `mtkload` to boot `openwrt-initramfs-kernel.bin` via tftp
6. Flash `openwrt-squashfs-sysupgrade.bin` via sysupgrade

Revert to OEM firmware
----------------------
1. Hold reset button while plugging in power
2. Configure host ethernet to 192.168.0.1/24
3. Go to http://192.168.0.254
4. Upload OEM firmware

MAC Addresses
-------------
LAN   : DC:62:79:xx:xx:28 (printed on label)
2.4GHz: DC:62:79:xx:xx:28
5GHz  : DC:62:79:xx:xx:29

Signed-off-by: Leonard Anderweit <leonard.anderweit@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22138
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-20 01:05:08 +02:00
sh3ikh-faisal fe3efbd7da mediatek: add support for JioRouter AX6000 JIDU6101
| Component        | Details                                         |
|------------------|-------------------------------------------------|
| **SoC**          | MediaTek MT7986A (4× ARM Cortex-A53 @ 2.0 GHz) |
| **RAM**          | 512 MB                                          |
| **Flash**        | 256 MB NAND                                     |
| **Ethernet**     | 5× 10/100/1000 Mbps (1 WAN + 4 LAN)            |
| **WLAN 2.4 GHz** | MediaTek MT7976GN — 802.11b/g/n/ax, 4×4 MIMO   |
| **WLAN 5 GHz**   | MediaTek MT7976AN — 802.11n/ac/ax, 4×4 MIMO    |
| **LEDs**         | 1× RGB LED (GPIO-controlled)                    |
| **Button**       | 1× Reset                                        |
| **USB**          | Yes                                             |

**MAC Addresses:**

| Interface  | Source                                          |
|------------|-------------------------------------------------|
| WAN/Label  | u-boot-env MTD partition, "mac" (text)          |
| LAN        | WAN + 1                                         |
| 2.4 GHz    | WAN + 2                                         |
| 5 GHz      | WAN + 3                                         |

---

**1. Prepare TFTP server**

Set a static IP on the ethernet interface of your computer (e.g. default: ip `192.168.1.2`, gateway `192.168.1.1`).

Download the initramfs image and host it with the TFTP server.

**2. Interrupt boot**

Attach UART and power on the router. When the boot menu appears, select **Failsafe Mode**,
then press `Ctrl-C` to interrupt and enter the U-Boot prompt.

**3. Load and run initramfs image**
```sh
setenv ipaddr 192.168.1.1
setenv serverip 192.168.1.2
tftpboot 0x46000000 openwrt-mediatek-filogic-jiorouter_ax6000-jidu6101-initramfs-kernel.bin
fdt addr $(fdtcontroladdr)
fdt rm /signature
bootm
```

**4. Flash sysupgrade image**

Place the sysupgrade image in `/tmp`, then run:
```sh
sysupgrade /tmp/openwrt-mediatek-filogic-jiorouter_ax6000-jidu6101-squashfs-sysupgrade.bin
```
Alternatively, use the sysupgrade option in LuCI.

Note:
- The raw MTD u-boot-env partition is only used for MAC address storage, while the active U-Boot environment is stored in the UBI volume.
- These devices ship with secure boot enabled and stock U-Boot only accepts vendor-signed FIT images.
- BL2/FIP cannot be replaced, so the stock signature verification path cannot be disabled directly.
- Setting ipaddr='' forces U-Boot to exit the web failsafe path and continue into autoboot.
- The custom bootcmd loads OpenWrt from the UBI volume and removes the /signature node before bootm, allowing unsigned OpenWrt FIT images to boot.
- Stock U-Boot expects its environment in a UBI volume named u-boot-env, so it is created during initial setup.

Signed-off-by: sh3ikh-faisal <sheikhfaisal713@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22201
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-20 00:51:40 +02:00
David Berdik a07f62f65a mediatek/filogic: add support for COMFAST CF-XR186
The COMFAST CF-XR186 is a WiFi repeater. The original OEM firmware is a
fork of OpenWrt 21.02.

To replace the OEM firmware with OpenWrt, flash the sysupgrade image
through the firmware upgrade option via the OEM firmware's web UI.
The OEM firmware upgrade page does not provide an option to perform a
factory reset, so after the flash completes and the device reboots,
perform a reset by holding in the WPS/Reset button until the WiFi
LED flashes red.

The led-boot, led-failsafe, led-upgrade, and led-running aliases all
point at the red WLAN GPIO LED.

The green and blue WLAN GPIO LEDs are used to indicate activity on the
2.4GHz and 5GHz radios. 01_leds assigns netdev triggers for those LEDs
to phy0-ap0 and phy1-ap0 respectively; if neither AP interface exists
(e.g. station-only repeater setups), both LEDs stay dark even when WiFi
traffic is flowing.

Specifications:
- SoC: MediaTek MT7981B
- RAM: 256MB
- Flash: SPI NAND
- WiFi: 2.4GHz + 5GHz (AX3000, 4x 3dBi antennas)
- Ethernet: 1x 10/100/1000M
- LEDs: power (not controllable), blue Ethernet, blue/green/red WiFi
- Button: WPS/Reset
- Power: 100-240V AC (wall plug)
- UART: 115200 8N1

MAC Addresses:
- LAN   : 40:A5:EF:xx:xx:2D (Factory, 0xe000)
- 2.4GHz: 40:A5:EF:xx:xx:2F (Factory, 0x0004)
- 5GHz  : 40:A5:EF:xx:xx:30 (Factory, 0x8000)

Signed-off-by: David Berdik <dgberdik@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22471
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-20 00:30:52 +02:00