Commit Graph
67696 Commits
Author SHA1 Message Date
Sheikh Faisal 363256ce99 mediatek: add support for JioRouter AX6000 JIDU6J01
| 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  | MFG MTD partition (variant-specific fallback)   |
| LAN        | WAN + 1                                         |
| 2.4 GHz    | WAN + 2                                         |
| 5 GHz      | WAN + 3                                         |

Supported variants and MAC source:
- JIDU6J01,JIDU6201: binary at offset 0x00
- JIDU6401: binary at offset 0x20
- JIDU6601: ASCII text at offset 0x1d0
- JIDU6701: ASCII mac= key

---

**1. Extracting U-Boot Credentials**
The U-Boot username and password are stored in the `MFG` partition. To retrieve them:
- With root access on stock OS: Read directly from the MFG partition.
- Without root access: Dump the NAND flash first, then extract the credentials from the dump.

**2. 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.

**3. 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 credentials extracted from `MFG` partition.

**4. 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-jidu6j01-initramfs-kernel.bin
fdt addr $(fdtcontroladdr)
fdt rm /signature
bootm
```

**5. Flash sysupgrade image**

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

Signed-off-by: Sheikh Faisal <sheikhfaisal713@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23510
(cherry picked from commit 552e617bd0)
Link: https://github.com/openwrt/openwrt/pull/25095
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-22 21:45:49 +02:00
Sheikh Faisal 1017574c7a mediatek: filogic: drop kmod-mt7916-firmware from JIDU6101
This device uses MT7976 radios and does not use the MT7916 blob.
Drop the unnecessary firmware package.

Signed-off-by: Sheikh Faisal <sheikhfaisal713@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23510
(cherry picked from commit 42eab6a9d3)
Link: https://github.com/openwrt/openwrt/pull/25095
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-22 21:45:49 +02:00
Sheikh Faisal 608b0769c6 mediatek: fix U-Boot env geometry for JioRouter AX6000 JIDU6101
Correct the U-Boot env geometry from "0x80000" "1" to "0x1f000" "5".
The correct LEB size for 128k PEB / 2k page is 0x1f000, and the 0x80000 volume spans 5 LEBs.

This also hardens jiorouter_initial_setup by adding proper error handling
and dynamic UBI device/volume lookups, and generates /etc/fw_env.config to be consistent.

Signed-off-by: Sheikh Faisal <sheikhfaisal713@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23510
(cherry picked from commit dcb5ede455)
Link: https://github.com/openwrt/openwrt/pull/25095
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-22 21:45:48 +02:00
John Audia 03be7efbab wireguard-tools: bump to 20260223
% git shortlog v1.0.20250521..v1.0.20260223

Doug Freed (1):
      wg-quick@.service: add deps on wg-quick.target

Jason A. Donenfeld (8):
      wg-quick: linux: use smallest mtu, not largest
      syncconf: account for psks removed from config file
      wg-quick: linux: deal with resolvconf migration more gracefully
      wg-quick: use addconf instead of setconf
      wg-quick: linux: do not unnecessarily set sysctl
      config: preserve const correctness
      syncconf: account for persistent keepalive removed from config file
      version: bump

Robyn Kosching (1):
      wg-quick: pass on # comments to {Pre,Post}{Up,Down}

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/22190
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit eda2630ceb)
Signed-off-by: Sander van Deijck <sander@vandeijck.com>
Link: https://github.com/openwrt/openwrt/pull/24666
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-21 13:33:42 +02:00
Robert Marko 419be080a8 qualcommax: ipq807x: ax89x: use lan1 for failsafe
The default failsafe script just takes the first interface from the UCI LAN
inteface list, so its currently using the SFP interface in failsafe.

Since this is not convenient at all, change the order so that lan1 will now
be used for failsafe instead.

Fixes: #23633
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit c618c6a353)
2026-09-21 13:31:23 +02:00
Robert Marko 9facdff6fb airoha: fix AN7583 thermal sensor reference
The AN7583 thermal provider declares #thermal-sensor-cells as zero, so
its thermal zone must reference it without an additional sensor ID.

The extra zero is parsed as another phandle and makes thermal zone lookup
fail with -ENOENT. This also prevents unrelated hwmon sensors using
HWMON_C_REGISTER_TZ from probing, even when they are not referenced by a
thermal zone.

Drop the invalid sensor ID from the CPU thermal zone reference.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
(cherry picked from commit 9550b20e42)
Link: https://github.com/openwrt/openwrt/pull/25090
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-15 16:34:42 +02:00
Daniel Schwierzeck bd2ac8e406 airoha: an7583: correct LED node names
Use the standard 'led' node name for GPIO LEDs as required by the
devicetree specification.

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
[ adapted from commit f5bf8c2b94 ("airoha: correct led nodename") ]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24264
(cherry picked from commit 2fca46c5ff)
Link: https://github.com/openwrt/openwrt/pull/25090
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-15 16:34:42 +02:00
Daniel Schwierzeck 4a2caf5c14 airoha: an7583: move the switch port label from soc-level to board-level
Different boards use different port maps. Defining the port labels in
board-level is better.

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
[ adapted from commit e2f7ad08c7 ("airoha: move the switch port label from soc-level to ...-") ]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24264
(cherry picked from commit ce55cdde26)
Link: https://github.com/openwrt/openwrt/pull/25090
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-15 16:34:42 +02:00
Daniel Schwierzeck fa5d5eefd5 airoha: an7583: disable all switch ports and PHYs by default
Some boards only use some of them, so enable as necessary in the
board-level DTS.

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
[ adapted from commit 007aa5a51c ("airoha: disable all switch port and phy by default") ]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24264
(cherry picked from commit d2698d325b)
Link: https://github.com/openwrt/openwrt/pull/25090
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-15 16:34:42 +02:00
Yalei Zang 455071bf77 airoha: an7583: add BL2 and BL31+U-Boot Artifacts for EVB board
Pack the BL2 and BL31+U-Boot artifacts as Airoha AN7583 is currently
supported in upstream U-Boot and bootloader files can be used for
unfused boards.

Signed-off-by: Yalei Zang <yalei.zang@airoha.com>
Link: https://github.com/openwrt/openwrt/pull/24397
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit 4797e145b3)
Link: https://github.com/openwrt/openwrt/pull/25090
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-15 16:34:42 +02:00
Yalei Zang 50a3bf7aa2 airoha: add label for ATF reserved memory
Add a label to the ATF reserved memory node so it can be referenced
by other device tree nodes or overlays.

No functional change intended.

Signed-off-by: Yalei Zang <yalei.zang@airoha.com>
Link: https://github.com/openwrt/openwrt/pull/24366
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit 5428b99227)
Link: https://github.com/openwrt/openwrt/pull/25090
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-15 16:34:42 +02:00
Yalei Zang c3859c5b8b airoha: align OPP node names for AN7581/AN7583
Align OPP node names with their corresponding opp-hz values for AN7581
and AN7583.

This only updates the node names. The actual OPP frequencies and operating
parameters are not changed.

No functional change intended.

Signed-off-by: Yalei Zang <yalei.zang@airoha.com>
Link: https://github.com/openwrt/openwrt/pull/24366
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit ff01bfac80)
Link: https://github.com/openwrt/openwrt/pull/25090
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-15 16:34:42 +02:00
Yalei Zang 90331a523a airoha: raise CPU critical temperature from 110°C to 120°C
The IC maximum operating temperature is 125C. Raise the CPU critical
temperature from 110C to 120C to account for possible temperature sensor
error.

This keeps the trip point below the IC maximum while avoiding premature
critical thermal protection.

Tested on Airoha internal platforms without thermal protection issues.

Signed-off-by: Yalei Zang <yalei.zang@airoha.com>
Link: https://github.com/openwrt/openwrt/pull/24367
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit a39d5a535b)
Link: https://github.com/openwrt/openwrt/pull/25090
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-15 16:34:41 +02:00
Yubo Zhang bdec8d0fe8 airoha: an7583: adjust thermal polling delays
The CPU thermal zone in an7583.dtsi sets the polling-delay-passive to
10000 ms while the polling-delay is 5000 ms. The thermal driver rejects
zones whose passive polling delay is greater than the regular polling
delay, causing thermal_zone0 registration to fail with -EINVAL.

Reduce the passive polling delay to 1000 ms to fix thermal_zone0
registration.

Boot log:
thermal_sys: Failed to register thermal zone cpu-thermal: -22
... register thermal zone sensor failed
... probe with driver airoha-thermal failed with error -22

Signed-off-by: Yubo Zhang <zyb_1998@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24337
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit 1ea29a6f49)
Link: https://github.com/openwrt/openwrt/pull/25090
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-15 16:34:41 +02:00
Rany Hany 517c80953f 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>
(cherry picked from commit 57b659c41d)
2026-09-15 10:02:35 +02:00
Luiz Angelo Daros de Luca 57d7325964 realtek: fix D-Link DGS-1210-28P/MP fan controller
The fan_ctrl.sh script incorrectly assumed that hwmon0 would always be
the lm63 device. Since the introduction of cpu_thermal for this target,
the initialization order of hwmon devices has changed. This patch
dynamically locates the correct hwmon device used by lm63.

Additionally, the script was reading only the first two characters of
the temperature (truncating millidegrees to degrees Celsius, assuming it
never dropped below 10°C) but subsequently compared it against a
threshold defined in millidegrees (51000). This caused the comparison to
always fail. This patch removes the truncation, ensuring both values are
properly compared in millidegrees.

Previously, uci-defaults/04_dlinkfan was used to set pwm1_enable to 1.
However, this is not the appropriate place to set volatile sysfs
attributes, as the script is deleted after the first boot. While the
hardware defaults to 1 (manual mode), the chip retains its state across
warm reboots. Resetting this value on every boot ensures a predictable
state and overrides any manual changes made by the user.

Therefore, the pwm1_enable initialization was moved to fan_ctrl.sh.
It now uses a tmpfs flag to ensure it runs only once per boot,
simulating a cold boot state and preventing warm reboot inconsistencies,
while it still allows the user to overwrite it in sysfs.

As before, fan_ctrl.sh will only be triggered every 5 minutes via cron.
This means that after a boot, the switch might take up to 5 minutes to
configure the fan controller. However, because the chip retains its
state, if the fan was already running, it will remain active during a
warm reboot.

Note: The main branch uses a different approach for this fix
(d3290efad9). This is a 25.12 fix, not a direct backport.

Fixes: 3c152904c2 ("realtek: add fan controller support to D-Link DGS-1210-28MP")
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/25100
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-13 13:10:08 +02:00
Semih Baskan 67b18c1ecc bcm53xx: fix sysupgrade losing config on NAND devices
The check that decides whether the new rootfs is a UBI image passes one argument
where 715634e6d1 now expects two. Without the extraction command the subshell
runs nothing, the magic comes back empty and the check fails. sysupgrade then
falls back to writing the whole image over the firmware partition, which cannot
carry sysupgrade.tgz into the new rootfs_data volume. After the reboot the
settings are gone, as if -n had been passed, and the UBI erase counters go with
them.

Affects bcm53xx NAND devices flashed with a trx based image, from 24.10.0-rc1
onwards.

The fix lives in the firmware doing the flashing, so upgrading from an affected
build loses the config one last time. Every upgrade from a fixed build onwards
keeps it.

Build tested on main with kernel 6.18, Asus RT-N18U, three consecutive
sysupgrades, config preserved every time.

Fixes: 715634e6d1 ("base-files: upgrade: nand: use "cmd" argument for extracting command")
Link: https://github.com/openwrt/openwrt/issues/21024
Link: https://github.com/openwrt/openwrt/issues/21655
Signed-off-by: Semih Baskan <strst.gs@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24531
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit 758d309f64)
Signed-off-by: Randy McCaskill <randy@mccaskill.us>
Link: https://github.com/openwrt/openwrt/pull/25142
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-13 12:47:40 +02:00
Gary Dotzler 84484e5198 kernel: fix mt7915e boot crash
Linux 6.12.97 backported the MediaTek PCIe MSI parent domain conversion
without prerequisite commit 06526443a34c ("irqchip/msi-lib: Honour the
MSI_FLAG_NO_AFFINITY flag").

This causes a NULL pointer dereference during mt7915e probe, resulting
in a crash and failure to boot.

Backport the missing prerequisite.

Fixes: https://github.com/openwrt/openwrt/issues/24764
Signed-off-by: Gary Dotzler <geldot@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/25102
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-12 18:03:55 +02:00
Shiji Yang 7722054025 kernel: bump 6.12 to 6.12.108
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.108

Upstream merged patches:
- generic/backport-6.12/501-v7.1-ksmbd-harden-file-lifetime-during-session-teardown.patch[1]
- generic/backport-6.12/894-v7.3-usb-xhci-handle-port-events-when-there-is-one-roothub.patch[2]

All other patches are automatically refreshed.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.108&id=b708aa5cb1422fc97b48f6a2598a87d638ad74c3
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.108&id=65b2f6f79753ca285f6c611e457a67812e31816c
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24993
(cherry picked from commit ca7f2b898f)
Link: https://github.com/openwrt/openwrt/pull/25055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-11 14:57:35 +02:00
Shiji Yang 77bc87827e kernel: bump 6.12 to 6.12.107
Changelog:
- https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.106
- https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.107

Manually rebased patch:
- bcm27xx/patches-6.12/950-0416-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch[1]

All other patches are automatically refreshed.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.107&id=76a91352fbd6ec3760eb918e33b641d128235cca
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24929
(cherry picked from commit a18140d895)
Link: https://github.com/openwrt/openwrt/pull/25055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-11 14:57:35 +02:00
Shiji Yang 79c9abd555 kernel: bump 6.12 to 6.12.105
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.105

All patches are automatically refreshed.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24808
(cherry picked from commit a865bd92e2)
Link: https://github.com/openwrt/openwrt/pull/25055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-11 14:57:35 +02:00
Shiji Yang 3aa25ca731 kernel: bump 6.12 to 6.12.104
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.104

Upstream merged patches:
- bcm53xx/patches-6.12/353-ARM-dts-bcm-ns-fix-PCIe-controller-2-second-interrup.patch[1]
- generic/backport-6.12/429-01-v6.18-mtd-spinand-fix-direct-mapping-creation-sizes.patch[2]
- generic/backport-6.12/429-02-v6.18-mtd-spinand-try-a-regular-dirmap-if-creating-a-di.patch[3]
- generic/backport-6.12/429-03-v6.18-mtd-spinand-repeat-reading-in-regular-mode-if-con.patch[4]

Manually rebased patches:
- generic/pending-6.12/804-nvmem-core-support-mac-base-fixed-layout-cells.patch[5]
- generic/pending-6.12/809-01-nvmem-core-generalize-mac-base-cells-handling.patch[5]

All other patches are automatically refreshed.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.104&id=65f3f2ed15a87d950a23deef32b4ad6c4036a459
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.104&id=f7d35b6043dcc38d2559822f755f9a25b2a6bc15
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.104&id=e2b420e755e243a432a1c4a6184215fa24d6c799
[4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.104&id=f1a4b9db4830bc9648afc6b96311380a807a30ae
[5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.104&id=751cc15343161267cca89aa31a6da4a79ea1f8f0
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/24808
(cherry picked from commit bbddea7603)
Link: https://github.com/openwrt/openwrt/pull/25055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-11 14:57:35 +02:00
Rosen Penev 13968d9b59 ramips: mtk_eth_soc: handle EPROBE_DEFER for MAC
If nvmem is used for ethernet mac address, we need to defer loading to
get the proper mac.

Move to probe as ndo_init is the wrong place to handle EPROBE_DEFER.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21920
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 0780972fd5)
Link: https://github.com/openwrt/openwrt/pull/25055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-11 14:57:10 +02:00
Hauke Mehrtens c588728777 octeon: handle EPROBE_DEFER when reading MAC addresses
The octeon ethernet driver reads the MAC addresses from ndo_init(), far
too late to ask for a retry, and cvm_oct_probe() cannot unwind once it
started the packet I/O hardware. Check the port nodes at the top of the
probe instead, where returning an error is still free.

On the EdgeRouter the addresses sit in a fixed-layout cell on the SPI
flash, which since 6.18.45 is not readable that early, so all ports got
a random MAC address. Not upstream yet.

Refresh the octeon patches.

Assisted-by: Claude:claude-opus-5
Link: https://github.com/openwrt/openwrt/pull/24924
(cherry picked from commit fffaf972dd)
Link: https://github.com/openwrt/openwrt/pull/25055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-11 14:54:32 +02:00
Hauke Mehrtens baa9c9a137 kernel: mvneta: handle EPROBE_DEFER when reading the MAC address
Since 6.18.45 the nvmem fixed-layout parser is a driver on the
nvmem-layout bus, so of_get_ethdev_address() returns -EPROBE_DEFER until
it has bound. drivers/net/ is linked before drivers/nvmem/, so mvneta
hits this on every boot and falls back to a random MAC address.

Backport the fix from Linux 7.1.

Assisted-by: Claude:claude-opus-5
Link: https://github.com/openwrt/openwrt/pull/24924
(cherry picked from commit a4f8c359d0)
Link: https://github.com/openwrt/openwrt/pull/25055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-11 14:54:32 +02:00
Hauke Mehrtens 813d0faa04 kernel: dsa: handle EPROBE_DEFER when reading port MAC addresses
DSA discards the return value of of_get_mac_address(), so a user port
whose MAC address comes from an NVMEM provider that is not ready yet
silently inherits the MAC address of its conduit interface. Since
6.18.45 that happens on every boot for cells behind a fixed-layout.

Propagate the deferral instead. Not upstream yet.

Assisted-by: Claude:claude-opus-5
Link: https://github.com/openwrt/openwrt/pull/24924
(cherry picked from commit 679b73b188)
Link: https://github.com/openwrt/openwrt/pull/25055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-11 14:54:32 +02:00
Hauke Mehrtens 93ddab6e2b bmips: enet: handle EPROBE_DEFER for the MAC address
Both bmips ethernet drivers call of_get_mac_address() and throw the
return value away. They then decide from the contents of an
uninitialised stack buffer whether a MAC address was found, and fall
back to eth_hw_addr_random() when it does not look valid. An
-EPROBE_DEFER is therefore turned into a random MAC address instead of
into a retry.

This did not matter while fixed-layout NVMEM cells were parsed
synchronously by the NVMEM core. Linux 6.12.104 picks up 751cc1534316
("nvmem: layouts: Add fixed-layout driver"), which drops the
"fixed-layout" entry from of_nvmem_layout_skip_table and turns it into
an ordinary NVMEM layout bus driver: nvmem_register() now only creates
the layout device and sets nvmem->layout, and the cells show up later,
when fixed_layout_probe() runs. Until then
nvmem_layout_module_get_optional() sees no bound driver and
of_nvmem_cell_get() returns -EPROBE_DEFER.

That window is hit on every boot rather than occasionally, because it
is link order and not a race. nvmem_init() is a subsys_initcall, but
the layout driver is a device_initcall and drivers/Makefile places
nvmem/ after both mtd/ and net/. The flash therefore registers its
NVMEM device first, the ethernet driver probes next and defers, and
only afterwards does the fixed-layout driver bind and add the cells.

28 bmips boards take their MAC address from a "fixed-layout" node and
bmips has no base-files fallback, so all of them would come up with a
random MAC address that changes on every boot. Propagate -EPROBE_DEFER
so that the probe is retried once the cell exists, the same way this
was already fixed for lantiq in 50e7e5c80d ("lantiq: xrx200: handle
EPROBE_DEFER for MAC address").

Fixes: 91a52f22a1 ("treewide: backport support for nvmem on non platform devices")
Fixes: 1c552eb44d ("bmips: add basic BCM6358 ethernet support")
Assisted-by: Claude:claude-opus-5
Link: https://github.com/openwrt/openwrt/pull/24808
(cherry picked from commit ed545519ee)
Link: https://github.com/openwrt/openwrt/pull/25055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-09-11 14:54:32 +02:00
Ahmed Naseef c2864bc780 mediatek: add support for Airtel AirFiber AAP4221ZY
The Airtel AirFiber AAP4221ZY is an ISP-provided router that is part
of the ISP's Fixed Wireless Access (FWA) solution. The FWA system
consists of two units: an outdoor 5G unit and this indoor Wi-Fi router
connected via a PoE ethernet link. This commit adds support for the
indoor unit.

The OEM appears to be Zyxel with model number EX3310-T0, although this
is not printed on any label and only found in the vendor firmware DTS,
bootlog, and other internal references.

Hardware
--------
SOC: MediaTek MT7981B
CPU: 2 core Cortex-A53 (1300MHz)
RAM: 512MB DDR3
FLASH: 512MB SPI-NAND (Micron, 4096 page, 256KiB block)
WIFI: MediaTek MT7976 802.11ax 2x2 2.4GHz + 5GHz
ETH: Airoha AN8855 GbE Switch (2x LAN) + MT7981 internal GbE PHY (WAN)
POE: WAN port provides PoE to the outdoor unit (GPIO 10)
UART: 3V3 115200 8N1

Bootloader
----------
The device uses BL2 -> U-Boot -> Zyxel zloader chain. U-Boot has a
hardcoded command to always launch zloader (similar to the Zyxel
EX5601-T0, see commit 1c05388ab0). zloader is the Zyxel secondary
bootloader which handles dual-boot (ubi/ubi2 A/B scheme), firmware
verification, and PoE port enablement.

zloader requires a UBI volume named "zyfwinfo" containing a 256-byte
metadata structure with a "ZYXE" magic header and a valid checksum.
Without this volume, zloader refuses to boot the firmware. The
zyfwinfo structure also contains a sequence number (range 0-9999,
wraps around) used to select which firmware bank to boot - the bank
with the higher sequence number wins. This OpenWrt image sets it to
5555 to always win over stock firmware starting at 0.

During sysupgrade, platform.sh refreshes the zyfwinfo volume before
writing kernel and rootfs to UBI, as rootfs_data is sized to fill the
remaining space.

Note that OpenWrt can only be flashed to ubi (mtd6). The zloader
appends rootubi=ubi or rootubi=ubi2 to the kernel bootargs based on
which partition it selects, but OpenWrt cannot understand this
parameter, so the firmware must always reside on the first bank (ubi).

UART access
-----------
Serial console output is restricted by the U-Boot environment variable
EngDebugFlag which is 0x00 by default. Users need to first obtain root
access on the vendor firmware and run:

  fw_setenv EngDebugFlag 0x01

Then reboot. Connect UART and press Enter to enter the zloader shell
(ZHAL> prompt). Use the ATGU command to switch to the U-Boot shell.
Note: ATGU must be entered twice to get the MT7981> prompt:

  ZHAL> ATGU
  [zloader reloads]
  ZHAL> ATGU
  MT7981>

Installation
------------
1. Enable UART access as described above.
2. Enter U-Boot shell (ATGU twice from ZHAL> prompt).
3. Load the initramfs image via TFTP:

  MT7981> setenv ipaddr 192.168.1.1
  MT7981> setenv serverip 192.168.1.2
  MT7981> tftpboot 0x46000000 openwrt-mediatek-filogic-airtel_aap4221zy-initramfs-kernel.bin
  MT7981> bootm 0x46000000

4. Once OpenWrt boots from initramfs, transfer and flash the
   sysupgrade image:

  sysupgrade -n /tmp/openwrt-mediatek-filogic-airtel_aap4221zy-squashfs-sysupgrade.bin

5. The device will reboot and zloader will boot OpenWrt from flash.

Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22809
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit ee2e25f009)
Signed-off-by: Psim Munir <psim_munir@proton.me>
Link: https://github.com/openwrt/openwrt/pull/24826
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
2026-09-11 10:37:32 +02:00
Vladimir Zadirei 6c40bc0bb0 adb: fix RSA authentication with mbedTLS
ADB authentication signs the 20-byte challenge directly as a SHA-1
digest. The mbedTLS port hashes the challenge before signing it,
causing adbd to reject every signature and request user approval
after each server restart.

Pass the challenge directly to mbedtls_pk_sign(), matching the former
RSA_sign() behavior.

Signed-off-by: Vladimir Zadirei <v.zadirei@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24946
(cherry picked from commit 5f62b79d1c)
Link: https://github.com/openwrt/openwrt/pull/25120
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-10 18:15:45 +02:00
Andrea Pesaresi 6f88b325be mediatek: correct MT7986 system timer rate
Port MediaTek commit 6a4c41c41410 ("fix timer inaccurate"), which
corrects the architected timer rate from 13 MHz to 12,986,200 Hz in the
DTS files for both MT7986A and MT7986B.

Upstream mt7986b.dtsi includes mt7986a.dtsi, so add the corrected rate
once to the common timer node. This makes the architected timer driver
override the 13 MHz value reported by firmware through CNTFRQ_EL0 for
both SoC variants.

The resulting 1062 ppm discrepancy exceeds the kernel's 500 ppm NTP
correction limit. This matches reports of sysntpd remaining saturated at
+500 ppm on the GL-MT6000.

Link: https://github.com/mediatek/mtk-openwrt-feeds/commit/6a4c41c41410cd5042ad10c39da6593ba036283c
Link: https://github.com/openwrt/openwrt/issues/24789
Signed-off-by: Andrea Pesaresi <andreapesaresi82@gmail.com>
(cherry picked from commit f36067d4e9)
Signed-off-by: Gary Dotzler <geldot@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/25108
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-10 11:28:51 +02:00
David Bauer d966bd2e2e ucode: fix build with GCC 15.3
Backport a fix for build failures due to invalid casts. Previously the
build of the ucode host package failed with Debian Forky.

Signed-off-by: David Bauer <mail@david-bauer.net>
2026-09-10 00:41:06 +02:00
David Bauer 7114f29fe2 net/l2tp: reset skb control buffer
The L2TP stack did not reset the skb control buffer before handing off
the package to the lower netdev.

In a setup with an ath10k radio and batman-adv over an L2TP tunnel
massive fragmentations happen sporadically if the L2TP tunnel is
established over IPv4.

L2TP might reset some of the fields in the IP control buffer, but L2TP
assumes the type of the control buffer to be of an IPv4 packet, while
due to it being Layer 2, this is not a given.

Clear the entire control buffer to avoid such mishaps altogether.

Link: https://github.com/torvalds/linux/commit/d70b592551ff23747e26e74081205babf8dba9b6
Signed-off-by: David Bauer <mail@david-bauer.net>
2026-09-08 00:39:23 +02:00
David Bauer b68374ee50 base-files: fix missing tabs
Tabs were missing from the default button behavior modification blocks,
breaking the build if they were activated.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 4b0f7ebab7)
2026-09-06 23:05:13 +02:00
David Bauer f4efe1d5a6 wifi-scripts: add option to disable WPS button handling
In case OpenWrt is used to build a custom distribution, the default
button handling logic may be undesired.

Add config options to disable default standard button handling code
at build-time.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 1eabd76d28)
2026-09-06 23:04:48 +02:00
David Bauer 26f8f9bb1b base-files: add options to disable default button handling
In case OpenWrt is used to build a custom distribution, the default
button handling logic may be undesired.

Add config options to disable default standard button handling code
at build-time.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 4bdc2ab93a)
2026-09-06 23:04:41 +02:00
David Bauer ba3243bba0 wifi-scripts: iface: set auth_type on unset encryption
parse_encryption returns leaves config.auth_type unset in case
encryption is unset. However, the owe_transition_iface config option for
the unencrypted network is currently only set in case encryption is
explicitly set to 'none'.

These two should be identical in their behavior. Set the encryption to
"none" in case it is unset and do not return. This aligns the behavior
of unset encryption with encryption explicitly set to 'none'.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 93d975fe9c)
2026-09-06 00:07:32 +02:00
Maxim Anisimov 30d53697c7 kernel: add support for HeYangTek HYF1GQ4UDACAE SPI-NAND
The HeYangTek HYF1GQ4UDACAE is a 1 Gbit (128 MiB) SLC SPI-NAND with
2048 + 64 byte pages and on-die 4-bit / 512-byte ECC (JEDEC ID 0xc9),
found among others on some Keenetic KN-3411 (Buddy 6) units.

The driver is accepted upstream and sits in the MTD tree heading for
Linux 7.3, so it goes to backport-6.12 as the upstream commit
a837468386 ("mtd: spinand: add support for HeYangTek HYF1GQ4UDACAE").

The Etron and Fidelix spinand patches are refreshed because the
backport applies before them and touches the same spinand-objs line.
Other SPI-NAND patches in the MediaTek, Airoha and EcoNet targets
are refreshed for the shifted core offsets.

Signed-off-by: Aleksei Sviridkin <f@lex.la>
Link: https://github.com/openwrt/openwrt/pull/23742
(cherry picked from commit 21a236d49e)
[Adapted to the SPI-NAND read-from-cache op API used before the
 SPINAND_PAGE_READ_FROM_CACHE_1S_4S_4S_OP-style rename: kernel 6.12
 still uses SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP/_X4_OP/_DUALIO_OP/
 _X2_OP/_OP instead. Backported to 25.12 to fix boot on the
 already-supported keenetic,kn-3711, which requires this chip's
 driver to boot (see PR#24001 comment:
 https://github.com/openwrt/openwrt/pull/24001#issuecomment-4869498638).]
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24928
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-09-03 12:50:58 +02:00
Shine 53846db686 mpc85xx: p1010: TL-WDR4900v1: DTS update for RFKILL switch
The TL-WDR4900v1, like many other similarly-aged TP-Link devices, is
using a flipswitch for toggling WiFi, not a pushbutton. Update the DTS
to reflect that. The debounce time used here has been chosen based on
other supported (but different target) TP-Link devices that are using
such a flipswitch.

Requires usage of the gpio-button-hotplug driver to work.

Fixes: #13552
Signed-off-by: Shine <4c.fce2@proton.me>
Tested-by: Edward Chow <equu@openmail.cc>
Link: https://github.com/openwrt/openwrt/pull/22494
(cherry picked from commit 2ea3f2ffe2)
Link: https://github.com/openwrt/openwrt/pull/24972
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-02 11:21:25 +02:00
Shine a9cddf7f3c mpc85xx: use gpio-button-hotplug as input subsystem
This replaces the standard Linux input subsystem with the
gpio-button-hotplug driver, which is already used with most other
targets for over a decade. While reducing overhead and resource
pressure especially for resource-constrained devices, this will
also allow for configuring things like flip-switches, in addition
to standard pushbuttons.

Will be required for a following commit.

Signed-off-by: Shine <4c.fce2@proton.me>
Tested-by: Edward Chow <equu@openmail.cc>
Link: https://github.com/openwrt/openwrt/pull/22494
(cherry picked from commit 3274238d29)
Link: https://github.com/openwrt/openwrt/pull/24972
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-02 11:21:25 +02:00
Pawel Dembicki 449f43829b mpc85xx: remove swconfig package
Every devices of mpc85xx was switched to DSA.
Swconfig can be removed.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22161
(cherry picked from commit a2b8a3fbb9)
Link: https://github.com/openwrt/openwrt/pull/24972
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-02 11:21:25 +02:00
Pawel Dembicki 7fb214fa9c mpc85xx: p2020: switch P2020RDB to DSA
Convert the P2020RDB DTS to DSA for the VSC7385 switch, add port
labels and fixed-link. Update board network defaults, preinit iface,
and compat version, and include the DSA switch kmod in the image.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22161
(cherry picked from commit 89d93700bf)
Link: https://github.com/openwrt/openwrt/pull/24972
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-02 11:21:25 +02:00
Edward Chow fb1f765ccd mpc85xx: unify wrapper address of simple image devices
The wrapper address of simple image devices should have been changed
at commit 6a8b831 , but only TL-WDR4900 and BR200-WP are changed at
that time, and now the wrapper address changes are split among patches
for specific devices. More importantly, commit 6a8b831 forgot to
change Enterasys WS-AP3715i, causing
https://github.com/openwrt/openwrt/issues/23112 .

This commit will gather the change of wrapper address of simple image
devices into a dedicated patch file.

Tested: Both WS-AP3715i and TL-WDR4900 v1 boot well.

Fixes: https://github.com/openwrt/openwrt/issues/23112
Signed-off-by: Edward Chow <equu@openmail.cc>
Link: https://github.com/openwrt/openwrt/pull/23121
(cherry picked from commit 9836f7ca13)
Link: https://github.com/openwrt/openwrt/pull/24972
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-02 11:21:25 +02:00
Edward Chow c44e5e1fdc mpc85xx: ws-ap3715i: use libdeflate-gzip for kernel
The simpleImage contains a payload already compressed with lzma-based
xz (by default), so further compressing it with lzma will often make
the result larger. On the contrary, compressing these simpleImages
with gzip can make the result smaller, so replace lzma with
libdeflate-gzip to compress kernel for ws-ap3715i.

Signed-off-by: Edward Chow <equu@openmail.cc>
Link: https://github.com/openwrt/openwrt/pull/23121
(cherry picked from commit e46844260b)
Link: https://github.com/openwrt/openwrt/pull/24972
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-02 11:21:25 +02:00
Edward Chow 1ab66b443d mpc85xx: ws-ap3715i: enable access to u-boot env
find_mtd_part() outputs /dev/mtdblockX, to which fw_setenv cannot
write, "/dev/mtd$(find_mtd_index '<vol name>')" could be used instead.

The envsize should also be changed to 0x1000 to make the CRC checksum
valid and the env block recognized by the uboot-envtools, but the
flash sector size remains 0x10000, otherwise the env block will be
readable but not writable.

The "read-only" mark within device tree is also removed.

Signed-off-by: Edward Chow <equu@openmail.cc>
Link: https://github.com/openwrt/openwrt/pull/23121
(cherry picked from commit 65a57d7159)
Link: https://github.com/openwrt/openwrt/pull/24972
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-09-02 11:21:25 +02:00
Mikhail Kshevetskiy b6a820ea85 airoha: an7581: dts: update number of available gpios
AN7581 SoC have more GPIOs. PCIE reset pins can be muxed to gpio,
so we have 50 GPIOs instead of 47.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/24646
(cherry picked from commit 9ccec981f5)
Link: https://github.com/openwrt/openwrt/pull/24884
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-08-26 11:10:33 +02:00
Mikhail Kshevetskiy 69c4af7d2c uboot-airoha: update an7583 patches
The same patches were submitted to upstream U-Boot.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/24646
(cherry picked from commit 82e2e4f492)
Link: https://github.com/openwrt/openwrt/pull/24884
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-08-26 11:10:33 +02:00
Mikhail Kshevetskiy 696e6de55d uboot-airoha: update pinctrl driver to match linux-7.3
U-Boot airoha pinctrl code was synced with linux-pinctrl/for-next
(future linux-7.3) branch.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/24646
(cherry picked from commit 57e5eab97e)
Link: https://github.com/openwrt/openwrt/pull/24884
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-08-26 11:10:33 +02:00
Mikhail Kshevetskiy dc1a8125d0 airoha: update pinctrl driver to match linux-7.3
Changes are based on linux-pinctrl/for-next (future linux-7.3) branch.
Existing pinctrl patches were adapted for upstream driver.

The commit was adapted to fit openwrt stable branch.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/24646
(cherry picked from commit 00f9f060a8)
Link: https://github.com/openwrt/openwrt/pull/24884
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-08-26 11:10:33 +02:00
Murad Rabadanov ecbf832c08 mediatek: filogic: add support for netis N6 V2
netis N6 V2 is a MT7981B-based router, hardware-compatible with
netis NX32U (confirmed via bootloader cross-flash). GPIO mappings
not covered by the vendor DTS were verified against NX32U and via
live link/carrier testing on switch ports, plus direct LED-toggle
confirmation on the physical device.

Hardware:
  SoC:      MediaTek MT7981B (Filogic 820)
  RAM:      256 MiB DDR3 (ESMT M15T2G16128A-AZR1-EFB, DDR3-1866)
  Flash:    128 MiB SPI-NAND
  Ethernet: 4x 1GbE (mt7531 switch: wan, lan1, lan2, lan3),
            2.5GbE internal CPU-switch link (gmac0, 2500base-x)
  WiFi:     MT7981 integrated 2.4GHz + MT7976C 5GHz radio,
            802.11ax, 2x2 MU-MIMO, HE160 supported (confirmed live;
            vendor firmware ships with HE80 for the AX1800 rating)
  USB:      1x USB 3.0 (vbus GPIO 23, active high)
  Buttons:  mesh/rfkill (GPIO 0), reset (GPIO 1)
  LEDs:     power (GPIO 4), status (GPIO 5), wan (GPIO 9),
            wlan 2.4GHz (GPIO 34, phy0tpt trigger),
            wlan 5GHz (GPIO 35, phy1tpt trigger),
            usb (GPIO 13, usbport trigger)
            all active low
  UART:     115200n8, uart0

MAC addresses:
  Interface   | Source           | Offset   | Address (this unit)
  ------------|------------------|----------|--------------------
  WAN         | Factory mac-base | 0x1fef26 | 30:07:5c:dc:7a:d2
  LAN/CPU     | Factory mac-base | 0x1fef20 | 30:07:5c:dc:7a:d0 (label)
  WiFi 2.4GHz | radio calibration (auto)     | 30:07:5c:dc:7a:d1
  WiFi 5GHz   | radio calibration (auto)     | b2:07:5c:dc:7a:d1

  LAN address matches the label on the device enclosure. WAN uses
  macaddr_factory_1fef26 on switch port@0, LAN/CPU uses
  macaddr_factory_1fef20 on port@6 (mt7531 switch). WiFi MACs are not
  set explicitly in DTS -- mt76 derives them from the radio's own
  calibration data, confirmed live to match the stock firmware value.

The USB LED (GPIO 13) was missed in the initial GPIO mapping pass --
it isn't referenced anywhere in the vendor DTS or any other board
signal, so it went unnoticed until manual GPIO toggling (`gpio clear
13` at the U-Boot prompt) confirmed it live on the physical device.
The USB LED on GPIO 13 uses the usbport trigger with trigger-sources
on both xhci ports, hence kmod-usb-ledtrig-usbport in DEVICE_PACKAGES.

The included U-Boot defenv for this board also avoids a silent
failure in ubi_write_production/ubi_write_recovery: these call
`ubi remove <vol>` without first detaching/reattaching the UBI
device, which fails silently on a busy volume while the boot script
proceeds as if it succeeded. Worked around here by adding
`ubi detach ; ubi part ubi ;` before the remove, a pattern already
used in other boards' defenvs (see issue #18231). Only this board's
defenv is touched -- other boards' defenv files are unchanged.

Known upstream issue (not specific to this port): probing
u-boot-env-layout on the ubootenv/ubootenv2 UBI volumes logs
"Invalid calculated CRC32" on every boot, see mediatek/filogic
issues #21876 and #22383.

Installation:
  Requires network access to stock firmware SSH (enabled by default)
  and a TFTP server on the same subnet.
  1. Set up a TFTP server on your PC at 192.168.1.254, serving the
     files from this release.
  2. SSH into stock firmware: ssh root@192.168.1.1
  3. Copy bl31-uboot.fip to the router and write it to the FIP
     partition: mtd write bl31-uboot.fip FIP
  4. Erase the ubi partition: mtd erase ubi
  5. Reboot. The new bootloader will detect the missing production
     image and automatically fetch initramfs-recovery.itb via TFTP.
  6. Once recovery has booted, SSH in again and sysupgrade to the
     production image: sysupgrade squashfs-sysupgrade.itb

Signed-off-by: Murad Rabadanov <the21.21@mail.ru>
Link: https://github.com/openwrt/openwrt/pull/24089
(cherry picked from commit 6c303018b3)
[ drop CONFIG_CMD_RNG/CONFIG_DM_RNG/CONFIG_RNG_MTK_V2: no mtk-rng
  driver in the 25.12 uboot-mediatek patch set ]
Signed-off-by: Murad Rabadanov <the21.21@mail.ru>
Link: https://github.com/openwrt/openwrt/pull/24548
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-08-24 00:51:35 +02:00
Mieczyslaw Nalewaj e472455a76 mediatek: mt7622: remove bogus dsa-migration from Netgear WAX206
The Netgear WAX206 was added to OpenWrt long after the mt7622 target
had already been converted to DSA. Consequently, this device never
shipped with a swconfig-based network setup and there is no DSA
migration to perform.

Remove the spurious $(Device/dsa-migration) reference. Device/dsa-migration
is not defined for the mediatek target, so the reference expands to nothing
and no DEVICE_COMPAT_VERSION was ever set for this device; removing it has
no effect on sysupgrade compatibility.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/24844
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 28f6d3e4fc)
2026-08-23 11:53:03 +02:00