Commit graph

67071 commits

Author SHA1 Message Date
Matt Merhar
324e157b4b apk: handle edge case when parsing .apk files
This was a regression introduced in the recent alignment changes and led
to failures when reading (i.e. 'mkndx') certain packages like follows:

ERROR: python3-botocore-1.31.7-r1.apk: unexpected end of file

It affected packages with a header size greater than the read buffer
size of 128KB but less than 160KB (128KB + (128KB / 4)).

In those cases, we'd attempt a 0 byte read, leading to APKE_EOF.

Based on some tests of files across multiple archs and feeds, it seems
the only packages meeting those criteria were python3-botocore and
golang-github-jedisct1-dnscrypt-proxy2-dev.

Fixes: 64ec08eee1 ("apk: backport upstream fixes for unaligned access")
Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/21992
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 8c6ed4e927)
Link: https://github.com/openwrt/openwrt/pull/22001
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-13 00:12:35 +01:00
Robert Marko
ac7c25ee92 mvebu: cortex-a53: respect DEVICE_packages for Methode devices
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Use the added support for generating per device targz rootfs so that images
generated for Methode devices when CONFIG_TARGET_MULTI_PROFILE and
CONFIG_TARGET_PER_DEVICE_ROOTFS are set, we actually get the targz rootfs
that respects DEVICE_PACKAGES.

Currently, buildbot generated images have no networking, LM75 nor I2C
working, as the generated images do not include required kmods that are
listed in DEVICE_PACKAGES.

While at it, there is no need for tar to run in verbose mode.

Fixes: 7dff6a8c89 ("mvebu: uDPU: add sysupgrade support")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
(cherry picked from commit ef92265772)
2026-02-12 16:59:52 +01:00
Robert Marko
b856372329 image: support generating per device targz rootfs
Currently, for targets that use the CONFIG_TARGET_ROOTFS_TARGZ a single
rootfs tarball is generated for the subtarget based of $(TARGET_DIR).

However, this means that it does not respect DEVICE_PACKAGES like other
rootfs images.

So, lets augment CONFIG_TARGET_ROOTFS_TARGZ by adding a proper targz fstype
so that per device rootfs is generated under lock.

This is required so that devices that use custom sysupgrade archives like
Methode devices, can actually include a per device rootfs so when building
for multiple devices and with CONFIG_TARGET_PER_DEVICE_ROOTFS set the built
image actually includes the listed DEVICE_PACKAGES.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
(cherry picked from commit d89cb72c23)
2026-02-12 16:59:43 +01:00
Hauke Mehrtens
8d1601b837 kernel: refresh patches
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Refresh the patches to make them apply cleanly again.

Fixes: 105eb9ca95 ("kernel: add cake-mq support")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 30ac12f4b4)
2026-02-12 01:00:22 +01:00
Zhi-Jun You
8bafa45f35 mediatek: filogic: add 6G precal to Acer Vero W6m
Bootlog has the following line:
mt7915e 0000:01:00.0: missing precal data, size=403472

It is because precal was not included in the previous NVMEM conversion.

Fix this by adding it to the dts.

Fixes: dbc2923cbe ("mediatek: filogic: convert Acer Predator W6 to use NVMEM framework")
Signed-off-by: Zhi-Jun You <hujy652@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/21894
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit c62bab29d5)
2026-02-12 00:49:01 +01:00
Zhi-Jun You
661ffcbf7d mediatek: filogic: add 6G precal to Acer Predator W6
Bootlog has the following line:
mt7915e 0000:01:00.0: missing precal data, size=403472

It is because precal was not included in the previous NVMEM conversion.

Fix this by adding it to the common dts.

Fixes: dbc2923cbe ("mediatek: filogic: convert Acer Predator W6 to use NVMEM framework")
Signed-off-by: Zhi-Jun You <hujy652@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/21894
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit eb369b267d)
2026-02-12 00:48:59 +01:00
Zhi-Jun You
a47290c869 mediatek: filogic: add precal to W6 common dtsi
Bootlog has the following line:
mt798x-wmac 18000000.wifi: missing precal data, size=403472

It is because precal was not included in the previous NVMEM conversion.

Fix this by adding it to the common dtsi.

Fixes: dbc2923cbe ("mediatek: filogic: convert Acer Predator W6 to use NVMEM framework")
Signed-off-by: Zhi-Jun You <hujy652@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/21894
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 3f430451b1)
2026-02-12 00:48:58 +01:00
Qingfang Deng
74bf3689ea
kernel: backport pppoe improvements
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Backport PPP patches accepted upstream.

Manually rebased:
- target/linux/ipq40xx/patches-6.12/999-atm-mpoa-intel-dsl-phy-support.patch

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 316492b809)
2026-02-11 14:32:46 +01:00
Linus Walleij
b82ef842c5 gemini: select the right GPIO input package
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
We don't want kmod-gpio-button-hotplug, we want the more
normal kmod-input-gpio-keys.

Link: https://github.com/openwrt/openwrt/pull/21750
(cherry picked from commit 37b13b6ea6)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
f034005f95 gemini: set disk activity on orange LED
Set the disk activity LED to the intended trigger.

Link: https://github.com/openwrt/openwrt/pull/21750
(cherry picked from commit f52f1a85d1)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
b7cee916ed gemini: sl93512r: override SL93512R partitions for firmware
This is patch is identical in form and purpose as the IB-4220-B
patch. We switch over to a single "firmware" partition.

All reference design-based machines are now converted and we can
drop the legacy set-up code.

It turns out that the reference design also uses the flash layout
with a 3072KB kernel so augment the sysupgrade to do the right
thing also here.

Link: https://github.com/openwrt/openwrt/pull/21820
(cherry picked from commit c579e1d04c)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
1ed4f59e13 gemini: sq201: override SQ201 partitions for firmware
This is patch is identical in form and purpose as the IB-4220-B
patch. We switch over to a single "firmware" partition.

Link: https://github.com/openwrt/openwrt/pull/21820
(cherry picked from commit 81215f55e2)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
dd4423f298 gemini: override IB-4220-B partitions for firmware
To optimize the flash usage and to make firmware upgrades
simpler, catenate the three firmware partitions "Kern",
"Ramdisk" and "Application" into one, and use all of this
for the combined MTD-splitted kernel+rootfs.

This works fine as long as the kernel is placed in the
beginning of this firmware partition and we leave the
RedBoot partition as is, so the boot loader still can load
the kernel from the first two RedBoot partitions.

Using the RedBoot partitions "as is" can be considered
harmful, because when you flash to a RedBoot partition the
file size is used for downsizing of the partition and make
firmware upgrades fail if they are larger than the RedBoot
partition size after flashing, despite there is actually
flash there. So overriding with fixed partitions is just
generally a good idea.

Link: https://github.com/openwrt/openwrt/pull/21820
(cherry picked from commit 387752dc76)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
980c3ddac8 kernel: Add necessary CONFIG_MTD_SPLIT config option
Buils break without this new config, mea culpa.

Link: https://github.com/openwrt/openwrt/pull/21855
(cherry picked from commit eb0a1a3a89)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
c9ab6ffada kernel: mtdsplit: create executable prolog splitter
The problem is the following: we have three fixed partitions
in a RedBoot partition for kernel, initrd and rootfs. On the
surface this looks good.

But we have little flash and want to use it efficiently. We want
to use the OpenWrt "firmware" partition scheme where the kernel,
initramfs and sqashfs+jffs2 rootfs is appended, leaving maximum
space for a writeable rootfs.

To do this we will override the existing RedBoot partition table
with one that merges the three separate partitions into one
"firmware" partition.

RedBoot is still booting the system. It still needs to read the
first two parts "as if" these were the kernel and initrd. This
works fine, because the kernel still comes first.

We already have hacks in place to merge the two kernel and initrd
into one binary image and execute it. This is done by prepending
a "prolog" to the kernel that does the necessary copying in
memory and then jumps to execute the kernel.

Since this "prolog" copying routine is just 92 bytes but has 512
bytes allocated, we can trivially create a firmware format that
can be used for splitting the image into kernel and rootfs
using a tagging scheme that can be done directly by scripting
so we don't need any special binary programs.

This splitter implements that idea.

This will be used on the Gemini platform and was tested on the
Raidsonic IB-4220-B.

Link: https://github.com/openwrt/openwrt/pull/21820
(cherry picked from commit 5ac8f14ccb)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
40b5a83fdb gemini: use tar stream to write firmware
The firmware update file can get big, so instead of extracting
the whole file into the tmp folder potentially running out of space
and make the upgrade fail, stream from tar xvf -O directly to the
mtd write command.

Refactor the checking of partitions and the actual upgrade into
two steps when we are at it.

Link: https://github.com/openwrt/openwrt/pull/21782
(cherry picked from commit 1977301b5f)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
43547e9314 gemini: pad storlink reference firmware to 128kb
The redboot partition parser gets upset if a partition
doesn't end on an even erase block and marks the partition
read-only.

Fix this by always padding the three firmware items to
128kb.

It is no longer required for the filesystem to be padded
to 6144kb, so we pad this to just 128kb like the kernel
images.

Link: https://github.com/openwrt/openwrt/pull/21750
(cherry picked from commit db7a2fb217)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
26f776335a gemini: Fix up sysupgrade platform.sh script
The Storlink reference designs sometimes fail upgrade because
not the entire partition is used, so the size isn't equal to
the actual flash space available for the partition.

Fix this by calculating the actual partition sizes by measuring
across the partition offsets instead.

Link: https://github.com/openwrt/openwrt/pull/21750
(cherry picked from commit 04bc0b6d3f)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
0a5e9bc662 gemini: select CONFIG_BLK_DEV_LOOP
The gemini is using split squashfs/jffs2 root filesystems on
all devices, so without CONFIG_BLK_DEV_LOOP the device does
not gain a writeable root filesystem with these boot messages:

mount_root: unable to create loop device
mount_root: jffs2 not ready yet, using temporary tmpfs overlay

and then it never gets out of that. Fix this so we get writeable
rootfs again.

Link: https://github.com/openwrt/openwrt/pull/21748
(cherry picked from commit b8dc7ac9c6)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
1bd010f83b gemini: create a copy-kernel for 3072k kernels
The Raidsonic devices do not use a 2048k kernel "Kern"
partition like the Storlink reference designs. Instead
it uses a 3072k partition to fit a slightly
larger kernel.

Sadly the current OpenWrt Gemini kernel is still bigger
than 3072k so we need to make use of the Ramdisk
partition as well.

Create a special "copy-kernel" version that can deal
with the Raidsonic 3072k kernels. Tested on the
Raidsonic IB-4220-B booting kernel v6.12.66.

Fix a copy/paste error in the image generation makefile
while we are at it.

Link: https://github.com/openwrt/openwrt/pull/21686
(cherry picked from commit 691aa70e16)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
dd8727dd67 gemini: support upgrade on reference designs
The Gemini reference design-derived devices uses a partition
format which is predictable and we can exploit this to offer
some proper upgrade path.

The kernel for these contains a hack to use this partition
format unaltered by combining the partitions "Kern" and "Ramdisk"
to one image with all of the kernel+ramdisk in memory.

Then the "Application" which is used for the rootfs go into its
own partition.

Standard flash layout:
Kern         2048k |
Ramdisk      6144k | = 9216k
Application  6144k | = 15360k

Following the pattern of the factory image we create three
images named zImage, rd.gz and hddapp.tgz (these filenames
are misleading! They are just required by the old firmware.)
and flash each individually with "mtd" during upgrades.

Since the IB-4220-V has a different layout with a bigger kernel
space we parameterize this so we can handle this too. (More
fixes are needed for that device though.)

A way to upgrade older OpenWrt on these platforms to the latest
and greatest will be to copy the file
target/linux/gemini/base-files/lib/upgrade/platform.sh
to /lib/upgrade/platform.sh
on your running system and then run sysupgrade from the image
produced after this patch.

The script is picky to sanity check the partitions before
commencing upgrade.

This was tested with a full sysupgrade on the iTian SQ201.

Link: https://github.com/openwrt/openwrt/pull/21680
(cherry picked from commit 0b0cd4efe2)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
4a59012dbb gemini: Fix up the rootfs device for SQ201
The rootfs partition is /dev/mtdblock3, fix it up.

Link: https://github.com/openwrt/openwrt/pull/21662
(cherry picked from commit 8dec72061f)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Linus Walleij
62818bda83 gemini: Add DTS fix from upstream kernel
This contains small but important DTS fixes for the
RedBoot partitions.

Link: https://github.com/openwrt/openwrt/pull/21662
(cherry picked from commit 92682593d5)
Link: https://github.com/openwrt/openwrt/pull/21973
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-02-11 08:47:45 +01:00
Rui Salvaterra
08cba4608e
iproute2: add cake_mq support
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Add two patches backported from iproute2-next.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21964
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit f9320e8d2d)
2026-02-11 02:12:22 +01:00
Rui Salvaterra
dd79febbbe
kernel: add cake-mq support
Add the required patches in order to backport cake-mq from Linux 7.0.

Many thanks to Toke Høiland-Jørgensen for providing the git trees with backports
for both 6.12 and 6.18.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21964
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 105eb9ca95)
2026-02-11 02:12:12 +01:00
Christoph Krapp
1f1dd426b5 ath79: add calibration variant for TP-Link TL-WA1201 v2
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Now that we have a board file, add calibration variant for TP-Link
TL-WA1201 v2 and add ipq-wifi package for it.

Tested-by: Jim McDonald <122668301+jimmyd998@users.noreply.github.com>
Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21736
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 0fa94cff86)
Link: https://github.com/openwrt/openwrt/pull/21951
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-11 00:14:43 +01:00
Christoph Krapp
667bf0b3c2 ipq-wifi: Add entry for TP-Link TL-WA1201 v2
Add IPQ Wifi entry for ath79 TP-Link TL-WA1201 v2.

Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21736
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 0230a35882)
Link: https://github.com/openwrt/openwrt/pull/21951
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-11 00:14:43 +01:00
Robert Marko
efa6205e08 ipq-wifi: update to Git HEAD (2026-01-28)
88514e5aab3e qca9888: add bdf for TP-Link TL-WA1201 v2

Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 953ef12f17)
Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21951
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-11 00:14:43 +01:00
Robert Marko
1c69a82182 ipq-wifi: update to Git HEAD (2026-01-24)
38804f59fbb9 ci: add ath12k BDF-s
d28bc0724dc6 ipq8074: add TCL LINKHUB  HH500V BDF
8e1fb2f59893 ipq6018:add TP-Link EAP620 HD v3 BDF Add board file for TP-Link EAP620 HD v3. bdwlan_US.bin sourced from EAP620 HD(US)_V3_1.4.4 Build 20250718 stock firmware.

Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 12fd85eb79)
Signed-off-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21951
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-11 00:14:43 +01:00
Mario Andrés Pérez
3ebb157b2d mediatek: filogic: gl-mt2500 fix compatibles PHY variants
These devices share the same "compatible" in device tree causing some
incompatibilities (sysupgrades, ASU profile identification), assign a
unique "compatible" and "model" to each variant.

Context:
Commit [1] added each variant's dts compatible to the SUPPORTED_DEVICES
field of the other variant to make easy sysupgrades between these
physically indistinguishable devices variants possible.

But there were found three issues which does not allow this:
- the sysupgrade's stricter check still used in some sysupgrade
paths(this check is being replaced(and redundant) with the newer fwtool's
SUPPORTED_DEVICES check using the info in images METADATA), this check
will fail when sysupgrading from a different board_name(compatible dts)
that the image was created for (image profile name).[2]
- ASU needs unique "dts compatible" to identify the devices profile.
- and an ASU's profile identification limitation when several devices from
a common target share SUPPORTED_DEVICES entries.[3]

There is a proposal for these issues but not yet implemented [4][3].

Until these issues are fixed we won't allow "easy" sysupgrades between
these two device variants.

Commit [5] avoided the ASU profile identification limitation but
missed the required two unique dts compatibles in order to make the two
variants fully work, although not allowing easy sysupgrade between them.

[1]: 8d30e07180
[2]: sysupgrade stricter check https://github.com/openwrt/openwrt/issues/20566#issuecomment-3583555482
[3]: ASU proposal https://github.com/openwrt/asu/pull/1533
[4]: allow easy sysupgrade proposal https://github.com/openwrt/openwrt/pull/20947
[5]: b71f4665cd
Fixes: b71f466 ("mediatek: filogic: fix supported_devices list for gl-mt2500")
Fixes: 8d30e07 ("mediatek: filogic: fix for new GL.iNet GL-MT2500/GL-MT2500A hardware revision")
Fixes: https://github.com/openwrt/openwrt/issues/20566
Fixes: https://github.com/openwrt/asu/issues/1525

Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/21842
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 7aa1f7e814)
2026-02-11 00:09:30 +01:00
Matt Merhar
82fec218e1
apk: backport upstream fixes for unaligned access
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
On the kirkwood target, packages would frequently fail to install with
APKE_ADB_SCHEMA, APKE_ADB_BLOCK, and/or segfaults. The culprit was
unaligned access leading to bogus values being read out of memory on
these particular ARMv5 CPUs.

Pull in the relevant upstream fixes to address this.

Fixes: https://github.com/openwrt/openwrt/issues/21307
Link: https://gitlab.alpinelinux.org/alpine/apk-tools/-/merge_requests/391
Link: https://gitlab.alpinelinux.org/alpine/apk-tools/-/merge_requests/392
Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/21958
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
(cherry picked from commit 64ec08eee1)
2026-02-10 15:07:44 +01:00
Felix Fietkau
910eb0cc4e wifi-scripts: fix spurious teardown on config_change during setup
Some checks failed
Build all core packages / Build all core packages for selected target (push) Has been cancelled
When config_change is set during an active setup (e.g. by a concurrent
reconf call), wdev_mark_up() attempted to call setup() while still in
"setup" state. Since setup() requires state "up" or "down", it silently
returned, leaving the state as "setup". The subsequent wdev_setup_cb()
then treated this as a setup failure, triggering an unnecessary
teardown+restart cycle.

Fix this by removing the config_change handling from wdev_mark_up() and
moving it to wdev_setup_cb() instead. wdev_mark_up() now always
transitions to "up" state. When wdev_setup_cb() runs afterwards and
finds the device already "up" with config_change set, it initiates a
clean re-setup from the "up" state where setup() can run.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 3553eda283)
2026-02-09 08:22:10 +01:00
Paul Donald
85342bea07 wireguard-tools: fix script errors
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
follow-up to 148207730a

Schoolboy error on the peer_psk value.

Also fix an issue when joining peer IPv4 and IPv6 AllowedIPs
(${peer_a_ips/ /, } replaces only the first space, while
${peer_a_ips// /, } replaces all the spaces).

Closes: https://github.com/openwrt/openwrt/issues/21847
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21851
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 3f0de6a28d)
Link: https://github.com/openwrt/openwrt/pull/21840
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-09 00:47:28 +01:00
Paul Donald
436b090bc7 wireguard-tools: enable reload without teardown
- preserve (active) interface (at reload)

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21784
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 0a576dec74)
Link: https://github.com/openwrt/openwrt/pull/21840
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-09 00:47:28 +01:00
Paul Donald
f78d9d898c wireguard-tools: avoid temp file for peer generation
- no longer write any temporary file for peer gen
- use wg syncconf to update active interfaces (not setconf)

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21784
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 148207730a)
Link: https://github.com/openwrt/openwrt/pull/21840
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-09 00:47:28 +01:00
Paul Donald
89d6ada56e wireguard-tools: avoid temp file for key gen
- no longer write any temporary file for key gen

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21784
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 97789875d5)
Link: https://github.com/openwrt/openwrt/pull/21840
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-09 00:47:28 +01:00
Paul Donald
3a31d73d28 wireguard-tools: add protocol renew handler
- add a renew handler
- add a peer detect handler

( benefits from https://github.com/openwrt/netifd/pull/66 )

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21784
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 400742a855)
Link: https://github.com/openwrt/openwrt/pull/21840
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-09 00:47:28 +01:00
Paul Donald
61e931db7e wireguard-tools: detect address changes at reload
Proto handler now also detects changes to
- addresses

Tighten also assign address portion

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21784
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit d59b360cee)
Link: https://github.com/openwrt/openwrt/pull/21840
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-09 00:47:28 +01:00
Rosen Penev
5caf02eba9 package-pack: fix Ubuntu 18.04 compilation
Add \ to fix parsing with make 4.1.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21910
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 71ad91ecfa)
2026-02-09 00:40:31 +01:00
Burak Aydos
d527d58cf8 lantiq: xrx200: handle EPROBE_DEFER for MAC address
The xrx200 ethernet driver falls back to a random MAC address on any
error from of_get_ethdev_address(), including -EPROBE_DEFER. When the
MAC address comes from an nvmem layout driver (such as u-boot-env on
NAND), the nvmem cell may not be available yet at first probe attempt.

Fix this by propagating EPROBE_DEFER so the driver probe is deferred
until the nvmem cell becomes available.

Tested on Zyxel P-2812HNU-F1 (NAND, u-boot-env nvmem layout).

Signed-off-by: Burak Aydos <byhexadecimal@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21861
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 50e7e5c80d)
2026-02-09 00:40:31 +01:00
Markus Stockhausen
2efc40b0ed realtek: dts: add LGS328C port 21 definition
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Port 21 definition was missed during addition of LGS328C.
Add it to the dts.

Fixes: 853d73f ("realtek: add support for Linksys LGS328C")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21793
Signed-off-by: Robert Marko <robimarko@gmail.com>

(cherry picked from commit 75fd2497ac)
Link: https://github.com/openwrt/openwrt/pull/21900
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 21:25:29 +01:00
Bjørn Mork
53d688cf85 realtek: dsa: remove storm control
Commit 78bf3a5f44 ("realtek: dsa: Fix rate control initialization") enabled
code setting up the "storm control" feature. This casued a speed regression
on rtl838x, reducing the effective max speed per port from line rate to around
500 Mbits/s.

Storm control is a policy feature with a number of input parameters depending
on use case and environment.  It is not possible to define a meaningful static
policy in the driver. The problem isn't just the arbitrary limits in the
current code.  Such features require userspace interfaces.

Drop this code for now. It wasn't missed while it was disabled.

Fixes: 78bf3a5f44 ("realtek: dsa: Fix rate control initialization")
Link: https://github.com/openwrt/openwrt/issues/21692
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/21877
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 3972aeaf7c)
Link: https://github.com/openwrt/openwrt/pull/21900
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 21:25:29 +01:00
Markus Stockhausen
21414937d1 realtek: dsa: rtl839x: fix uninitialized global access
Setup for DSA QOS on RTL839x accesses unitialized memory. For some
reason the handover of the priv structure was realized via global
intermediate variable switch_priv. During refactoring for adbb9a6
("realtek: dsa: rtl83xx: fix init section mismatch") this was not
noticed. Since then RTL839x devices crash during startup.

Fix this by using standard handover via function parameters.

Fixes: e81affb9 ("realtek: dsa: rtl83xx: fix init section mismatch")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21703
Signed-off-by: Robert Marko <robimarko@gmail.com>

(cherry picked from commit ac96463944)
Link: https://github.com/openwrt/openwrt/pull/21900
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 21:25:29 +01:00
Markus Stockhausen
0837be599d realtek: dsa: rtl83xx: fix init section mismatch
Compilation currently spits this message:

WARNING: modpost: vmlinux: section mismatch in reference:
rtl83xx_sw_probe+0x6a4 (section: .text.rtl83xx_sw_probe)
-> rtl83xx_setup_qos (section: .init.text)

That means that we have a "normal" function caller (can be
called during the whole uptime) and a "initialization" function
callee (only available during init.

Fix this and directly fix the unwanted family checks.

Fixes: 012e0091 ("realtek: dsa: avoid use-after-free")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21690

(cherry picked from commit adbb9a6423)
Link: https://github.com/openwrt/openwrt/pull/21900
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 21:25:29 +01:00
Carl-Daniel Hailfinger
dec360a3ac realtek: dsa: avoid use-after-free
The realtek target uses some functions marked __init for initialization.
However, that means they can only be called once when compiled in and
afterwards the memory occupied by them is freed and potentially reused.
Some "impossible" (code at a given location can't crash in the way it
does) crashes can be caused by this because upon re-execution of those
functions, garbage gets executed. Such re-execution can happen for
deferred probes or repeated probes.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Link: https://github.com/openwrt/openwrt/pull/21504
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

(cherry picked from commit a91c3abe83)
Link: https://github.com/openwrt/openwrt/pull/21900
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 21:25:29 +01:00
Shine
8c895dc4c5 wifi-scripts: fix encryption setting of default OpenWrt SSID
Some checks are pending
Build all core packages / Build all core packages for selected target (push) Waiting to run
Commit 01a87f4bd0 changed the encryption
setting of the default SSID "OpenWrt" from "none" to "open". The correct
setting as per the documentation [1] is "none", though.
While this invalid setting won't cause a wrong hostapd setup, it will
at least cause malfunction in LuCI.

Change the default encryption setting back to "none".

[1] https://openwrt.org/docs/guide-user/network/wifi/basic#encryption_modes

Fixes: 01a87f4bd0
Signed-off-by: Shine <4c.fce2@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21925
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 4ab5fcc04f)
2026-02-08 19:05:59 +01:00
Mikhail Zhilkin
5f1b0fbf9b mediatek: routerich be7200: fix usb issue
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
This commit fixes non-working USB port:
---
[    5.294036] xhci-mtk 11200000.usb: error -EPERM: Failed to get supply 'vbus'
[    5.301163] xhci-mtk 11200000.usb: error -EPERM: Failed to get regulators
[    5.307938] xhci-mtk 11200000.usb: probe with driver xhci-mtk failed with error -1
---

While testing the USB power on/off functionality during the previous
commit, I didn't sufficiently test the actual operation of the USB
devices.

Fixes: ff5e66a920 ("mediatek: add support for Routerich BE7200")
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21795
(cherry picked from commit 2651a6ced9)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21882
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-08 00:42:03 +01:00
Gustavo Henrique Nihei
cb209ad0d4 ext-toolchain: fix wrapper for gcc-ar, gcc-nm, gcc-ranlib
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
The pattern '*-*cc-*' incorrectly matches these tools because their names
contain 'cc-'. This causes them to receive compiler CFLAGS, breaking
builds with 'ar: two different operation options specified'.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
Link: https://github.com/openwrt/openwrt/pull/21757
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 435917735a)
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
Link: https://github.com/openwrt/openwrt/pull/21899
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-07 17:50:57 +01:00
Derek Denk
45788a48c7 mediatek: filogic: add support for Cudy AP3000 Wall v1
This commit adds support for the Cudy AP3000 Wall v1.

SoC: MediaTek MT7981b
RAM: 256MiB
Flash: spi-nand spi0.0: 128 MiB
Wifi: MediaTek MT7981 2x2 DBDC 802.11ax 2T2R (2.4 / 5)
LEDs: 1 LED in two colors (red & white)
Buttons: 1 reset, 1 led on/off
Ethernet: 5x 1GbE
Power: PoE powered (standalone)

The stock firmware is a customized variant of OpenWrt, which implements
a signature check that only allows flashing official firmware. Cudy offers
intermediate OpenWrt firmware images on their website [1][2] which do not
implement the signature check. After flashing the intermediate image the
upstream official OpenWrt image can be installed.

The stock firmware can be recovered via TFTP using the U-Boot based boot
loader[3]. Set up a TFTP server on your computer with IP 192.168.1.88/24
serving the stock firmware from Cudy's website renamed to "recovery.bin".
Press and hold the reset button while powering on the device, wait for the
TFTP server to send the recovery.bin file, then release the reset button.
The router will take a couple of minutes to reboot and set up the stock
firmware.

[1] https://www.cudy.com/blogs/faq/openwrt-software-download
[2] https://drive.google.com/drive/folders/1BKVarlwlNxf7uJUtRhuMGUqeCa5KpMnj
[3] https://www.cudy.com/en-us/blogs/faq/how-to-recovery-the-cudy-router-from-openwrt-firmware-to-cudy-official-firmware

Signed-off-by: Derek Denk <derek.denk@live.com>
Link: https://github.com/openwrt/openwrt/pull/21266
(cherry picked from commit afad4c71f8)
Link: https://github.com/openwrt/openwrt/pull/21890
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-07 17:30:03 +01:00
Aleksander Jan Bajkowski
4da230548f airoha: an7581: add switch ports interrups
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Has been cancelled
The MT7531 has an incorrect interrupt number described in the DTS.
This commit also adds PHY interrupts. They work the same as on
the MT7988.

Tested on Gemtek W1700k.

Suggested-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/21016
(cherry picked from commit 788958880b)
Link: https://github.com/openwrt/openwrt/pull/21838
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-02-07 17:03:50 +01:00