Chen Minqiang [Fri, 12 Dec 2025 02:58:16 +0000 (10:58 +0800)]
mediatek: filogic: add support for Tenda BE12 Pro
This patch adds support for Tenda BE12 Pro.
The stock bootloader requires a specific 16-byte header (Magic: "God1")
to correctly verify and boot the Linux kernel from flash. A new image
command `tenda-mkdualimageheader` is added to generate this header and
append the checksum/size information required for the device to boot
successfully.
MAC Addresses (NVMEM):
- Base MAC located at Factory partition offset 0x4
- gmac2 (WAN) : Base - 2 (Label MAC)
- gmac0 (LAN) : Base - 1
- gmac1 (LAN) : Base - 3
- 2.4 GHz : Base
- 5 GHz : Base + 1
Installation:
1. Connect via UART and interrupt U-Boot by pressing 'Ctrl+C' during boot.
2. Set up a TFTP server on a computer (IP 192.168.1.2) containing
'openwrt-initramfs.bin'.
3. Load the initramfs image:
tftpboot openwrt-initramfs.bin
4. Boot the image:
bootm
5. Once booted into OpenWrt initramfs, perform a sysupgrade with the
sysupgrade image.
Paul Donald [Tue, 6 Jan 2026 00:53:25 +0000 (01:53 +0100)]
ucode: enable ucode-mod-zlib
The module exists in ucode and has been present for a while
but has not been enabled. It provides the ucode zlib module
for handling gzip and zlib compression in ucode scripts.
Chukun Pan [Thu, 10 Jul 2025 14:15:05 +0000 (22:15 +0800)]
generic: restore network port name for r8169 LED
Currently, the LED names generated by the r8169 driver are the
network port names renamed by udev, such as enp1s0. Add a hack
patch to restore the interface name to match OpenWrt.
The gmac definition has an offset of 1 compared to the label MAC. Fixes: a55ab9e1343e85021253e9c55f67adf33ad68f09 ("mediatek: filogic: prevent faulty mac address assignment") Signed-off-by: Maximilian Baumgartner <aufhaxer@googlemail.com> Link: https://github.com/openwrt/openwrt/pull/21560 Signed-off-by: Robert Marko <robimarko@gmail.com>
Jonas Jelonek [Sun, 11 Jan 2026 22:28:35 +0000 (22:28 +0000)]
realtek: pcs: rtl930x: rework SerDes mode setting
Rework the SerDes mode setting to have a better logical structure,
similar to how RTL931x currently does it. Mode setting is grouped into a
MAC setup and IP core setup. Most modes just need to trigger the MAC
setup and then they work, otherwise some complex sequence is needed.
To achieve that, rename several functions and group their content
differently. While at it, rename some constants to use the RTPCS_ prefix.
RTL930x has some helpers which take care of writing the actual mode
value to the corresponding register. They exist for the MAC setup SerDes
mode, the USXGMII submode and the SerDes IP core mode.
To reflect that, adjust the naming of these helpers accordingly. Most
importantly, prefix the helper names with '__'. This is a common
convention to denote helpers/functions which are internal, not intended
for general use and skip certain checks. Those conditions apply to these
helpers. Though they are still used quite often here, this might change
with further cleanups.
Jonas Jelonek [Thu, 8 Jan 2026 12:21:47 +0000 (12:21 +0000)]
realtek: pcs: rtl930x: use SerDes hw mode in setup entry
Start using the SerDes hardware in the RTL930x SerDes setup entrypoint.
Use the generic mapper (which will be moved out later to pcs_config) to
determine the mode. In the next steps, switch to solely using that
step-by-step.
The hardware reset is a combined function for all device families.
So it uses several family specific branches to decide what is
really needed. Refactor this into device specific variants to make
it easier to understand.
The cpu port and nic reset sequence is the same for all families.
Provide this with a dedicated function.
realtek: image: switch cameo devices from gzip to lzma
The cameo based RTL83xx devices have a simple U-Boot that only
supports gzip compression. Actual models are mainly D-Link
DGS-1210 and the Apresia Light GS120GT-SS. Reduce the image
size by ~1MB by switching over to lzma compression and rt-loader.
Flash instructions:
1. Download the initramfs image, rename it to
initramfs.itb, host it with the tftp server.
2. Enter "jdmt018R" to interrupt U-Boot
when the following statement appears:
"disabled console and autoboot in 2 seconds"
3. Run these commands in U-Boot console:
tftpboot initramfs.itb
bootm
4. After openwrt boots up, use scp or luci web
to upload sysupgrade.bin to upgrade.
Flash instructions:
1. Download the initramfs image, rename it to
initramfs.itb, host it with the tftp server.
2. If the stock firmware version is 4.3.0.r4211
or higher, enter "jdmt018R" to interrupt
U-Boot when the following statement appears:
"disabled console and autoboot in 2 seconds"
3. Run these commands in U-Boot console:
tftpboot initramfs.itb
bootm
4. After openwrt boots up, use scp or luci web
to upload sysupgrade.bin to upgrade.
Flash instructions:
1. Download the initramfs image, rename it to
initramfs.itb, host it with the tftp server.
2. If the stock firmware version is 4.3.0.r4211
or higher, enter "jdmt018R" to interrupt
U-Boot when the following statement appears:
"disabled console and autoboot in 2 seconds"
3. Run these commands in U-Boot console:
tftpboot initramfs.itb
bootm
4. After openwrt boots up, use scp or luci web
to upload sysupgrade.bin to upgrade.
Eric Fahlgren [Thu, 15 Jan 2026 21:48:11 +0000 (13:48 -0800)]
realtek: imagebuilder: add guard around loader generation
The imagebuilder cannot compile source, so we must guard against
generation of artifact targets that require this. Without this
guard we see an error when building the zyxel,gs1920-24hp-v1 profile.
Create standalone rt-loader, loading uimage from address 0xb40c0000
mips-openwrt-linux-musl-gcc -fpic -msoft-float -Iinclude -c -o ... src/startup.S
make[4]: mips-openwrt-linux-musl-gcc: No such file or directory
realtek: eth: rename priv to ctrl (as in other drivers)
All Realtek drivers use ctrl (control) als the central driver
structure. Align that for the ethernet driver. Additionally
use the rteth prefix for the device independent structure
definition. Its current prefix "rtl838x_" is only confusing.
Val Kulkov [Mon, 12 Jan 2026 17:21:52 +0000 (17:21 +0000)]
wifi-scripts: fix wifi failure on specifying value of DAE client
The code to be replaced is a glorious no-op. A default value for
config.radius_das_client does not need to be assigned. This parameter
already has non-empty value: see the enclosing 'if' block.
As a result, the value of config.radius_das_client never gets modified
to contain both dae_client and dae_secret. This breaks hostapd.add_iface()
that expects config.radius_das_client to contain both dae_client and
dae_secret separated by a whitespace.
Initialization of the RTL8214FC was coded like "put the cart
before the horse". Configuration was called from probing
and only when called for the last port.
Testing showed that there is no need to overcomplicate things.
Reorganize the setup as follows:
- Let probe() & config() do what they are meant for
- Split the config part between a package and a port sequence
realtek: phy: Use single initialization for RTL8214FC
There are currently two code paths to initialize the RTL8214FC. One is
for RTL838x, the other for RTL839x. With the recently added minimum
setup sequence the phy will come up and pass traffic on any device.
Use this als the reference implementation and drop the usage of the
magic firmware based setup.
The dts misses the address and size properties for the
ports section. Fix that.
Fixes: 2a55846 ("realtek: add support for ZyXEL GS1920-24HPv1") Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/21534 Signed-off-by: Robert Marko <robimarko@gmail.com>
Hauke Mehrtens [Mon, 12 Jan 2026 22:05:57 +0000 (23:05 +0100)]
bcm27xx: refresh kernel patches
The patch 950-0019-BCM2708-Add-core-Device-Tree-support.patch creates a
symbolic link. It looks like quilt does not support this and never
refreshed it.
I removed the symbolic link, refreshed the patch and then added it
back again.
Commit 9151c7015ed2 introduced support for the global DHCP DUID to
generate a RFC4361-style client identifier.
However, the IAID introduced in those changes is based on ifindex, which
is subject to changes and causes issues on environments requiring a stable
IAID.
This commit switches the IAID to a stable one based on MD5.
FUKAUMI Naoki [Wed, 14 Jan 2026 01:52:55 +0000 (01:52 +0000)]
rockchip: add `"compat_version": "1.1"` for Radxa E52C
This is something I missed in https://github.com/openwrt/openwrt/pull/20608
Fixes: 1f1db75432 ("rockchip: make NIC name predictable for Radxa E52C/ROCK 5 ITX/ROCK 5T") Signed-off-by: FUKAUMI Naoki <naoki@radxa.com> Link: https://github.com/openwrt/openwrt/pull/21533 Signed-off-by: Robert Marko <robimarko@gmail.com>
Pawel Dembicki [Mon, 12 Jan 2026 14:44:05 +0000 (15:44 +0100)]
mpc85xx: fix failsafe iface selection for mpc85xx boards
Some mpc85xx boards still boot with failsafe configured on a non-LAN
interface. Align the preinit interface with the first DSA port or the
interface that LAN is connected to.
This makes failsafe reachable on devices where the default selection does
not map to the primary LAN port.
Fil Dunsky [Sat, 3 Jan 2026 22:00:14 +0000 (01:00 +0300)]
mediatek: add support for Airpi AP3000M
This adds support for the Airpi AP3000M 5G CPE based on MediaTek MT7981B.
Specifications:
SoC: MediaTek MT7981B (dual-core ARM Cortex-A53)
RAM: 1GB DDR4
Storage: 8GB or 16GB eMMC
Ethernet: 1x 2.5GbE LAN, 1x 1GbE WAN
Wireless: 2.4GHz/5GHz 802.11ax
Buttons: Reset, WPS
LEDs: System, 2.4GHz WiFi, 5GHz WiFi
Cooling: PWM-controlled fan
Expansion: M.2 slot for 5G modem
The factory partition (mmcblk0p2) is empty in stock firmware.
Execute via SSH before flashing OpenWrt:
```
dd if=/lib/firmware/MT7981_iPAiLNA_EEPROM.bin of=/dev/mmcblk0p2 bs=4k count=1
MAC addresses
```
Fixed MAC addresses are derived by macaddr_generate_from_mmc_cid.
Installation via U-Boot web page
Set static IP 192.168.88.2/255.255.255.0 on your computer.
Connect to the 1GbE port (WAN) and hold the reset button while booting the device. Wait for about 6 seconds, and release the reset button.
Open U-boot web page on your browser at http://192.168.88.1
Select the OpenWRT sysupgrade image, upload it, and start the upgrade.
Wait for automatic reboot.
Installation via sysupgrade
Flash the sysupgrade file via LuCI upgrade page without saving the settings.
Jakub Vaněk [Sun, 4 Jan 2026 23:10:46 +0000 (00:10 +0100)]
mediatek: fix PHY autodetection on Cudy WR3000H
Newer Cudy WR3000H units have a Motorcomm YT8821 PHY instead of a
Realtek PHY on the WAN port. Before this commit, the Motorcomm PHY
could not be autodetected by the kernel -- the PHY would show up as
just a generic clause 45 PHY and the proper driver would not be loaded.
The cause of the detection failure likely was that the YT8821 PHY was
held in reset during PHY detection. To fix this, move the reset GPIO
definition to the MDIO bus level. This reset line is deasserted before
the autodetection process, see also [1]. With this change, both Realtek
and Motorcomm PHYs can be supported with a single device tree.
Andrew MacIntyre [Tue, 30 Dec 2025 01:22:41 +0000 (12:22 +1100)]
mediatek: add Motorcomm PHY driver to Cudy WR3000H
Recent Cudy WR3000H v1 units have a Motorcomm YT8821 2.5G PHY for
the WAN interface instead of the RTL8221B PHY used in earlier units,
so add kmod-phy-motorcomm to be able to use it.
Signed-off-by: Andrew MacIntyre <andymac@pcug.org.au>
[linuxtardis@gmail.com: slightly reworded the commit description] Signed-off-by: Jakub Vaněk <linuxtardis@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21399 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Andrew MacIntyre [Mon, 29 Dec 2025 12:38:10 +0000 (23:38 +1100)]
kernel: add kmod-phy-motorcomm
The Motorcomm YT8821 2.5G PHY is being used in some devices as an
alternative to devices like the RTL8221B. Package it as a kmod
so it can be used as a device package rather than requiring changes
to the target kernel config.
Robert Marko [Mon, 12 Jan 2026 16:28:06 +0000 (17:28 +0100)]
boot: arm-trusted-firmware-microchipsw: fix compilation against LibreSSL
LibreSSL 3.9+ has dropped support for X509V3 extension API so cert_create
tool does not compile against it at all.
This was hidden by the fact that it was compiling against OpenSSL on my
host which still has that API, however we do not ship libssl-dev in the
Buildbot containers so compiling against distro OpenSSL is not possible.
So, after a long time trying to find any docs on that API I resorted to
LLM(Gemini 3 Pro) to get it to compile.
Our libcrypto is linked against pthread so we must pass -lpthread as well
for cert_tool.
Fixes: 5205c0c42607 ("microchipsw: lan969x: add Microchip EV23X71A") Signed-off-by: Robert Marko <robert.marko@sartura.hr>
The interfaces attribute of the mdio bus held the information
about the connection mode (qsgmii, sgmii, ...). This was only
used during the old RTL930x setup. Drop it because it is not
needed any longer.
The mdio driver currently initializes the phy polling registers
with some nasty magic. It identifies the interface mode from the
dts and draws some strange conclusions.
Looking at the SDK one can see that this is basically dependent
of the attached phy type. So the code location is quite right
inside the mdio driver.
Provide a new get_phy_info() function that determines the phy
characteristics that are important for the polling unit . It will
be later needed by the RTL93xx setup code.
Some explanation about the fields of the structure:
- has_res_reg: phy has a special Realtek resolution polling
register. It is unclear if this gives more details or if it
simply allows faster polling.
- has_giga_lite: This is a phy that allows for Realtek proprietary
1G/2.5G lite connectivity. In this case data is only transmitted
over two wire pairs.
Currently there are several places where the driver uses the
classic "i" as iterator. In these cases where it iterates
phy ports use "addr" instead to make it easier to read. Do
the same for the smi bus. Additionally forthcomming commits
will show nicer diffs.
While we are here fix the initialization sequence of the private
structure. There is no need to set data to zero that has already
been zero-allocated before. Instead initialize smi_bus[] with
a value of "-1" to denote that a phy is not in scope. This is
essential as some functions already have a matching check in
place.
George Sapkin [Tue, 6 Jan 2026 01:50:37 +0000 (03:50 +0200)]
build: add default priority to ABI-versioned packages
If a package has an ABI version defined, set priority to 10. The enables
packages with an ABI version to be installed by their base name instead
of a name and an ABI version, e.g.:
libfoo3, where 3 is the ABI version can be installed by just libfoo.
This affects manual installation only, as the dependency resolution
takes care of ABI versions.
George Sapkin [Mon, 5 Jan 2026 02:03:00 +0000 (04:03 +0200)]
build: fix implicit self-provides
Fix setting implicit self-provides for packages when they don't have any
PROVIDES specified.
Remove redundant self-provide for kmods, since kmods are packages and
will have a self-provide added already.
Fixes: 5ed650a ("build: add support for virtual provides") Fixes: 9b37b71 ("build: provide virtual self in kmods") Signed-off-by: George Sapkin <george@sapk.in> Link: https://github.com/openwrt/openwrt/pull/21369 Signed-off-by: Robert Marko <robimarko@gmail.com>
George Sapkin [Sun, 4 Jan 2026 21:02:21 +0000 (23:02 +0200)]
elfutils: drop libelf1 provide
ABI version is added to a package name during packaging, so there's no
need to specify it manually. And nothing explicitly depends on libelf1.
Fixes: d7bf089 ("elfutils: rename libelf1 to libelf") Signed-off-by: George Sapkin <george@sapk.in> Link: https://github.com/openwrt/openwrt/pull/21369 Signed-off-by: Robert Marko <robimarko@gmail.com>
George Sapkin [Fri, 2 Jan 2026 14:26:40 +0000 (16:26 +0200)]
uclient: provide virtual wget-any
Packages shouldn't provide a package that another package, in this case
wget from packages provides. Explicitly provide a virtual @wget-any
instead to match the implicit wget provide and switch the only consumer
to use the new provider.
Set uclient-fetch as the default variant for wget-any.
George Sapkin [Sun, 4 Jan 2026 17:50:52 +0000 (19:50 +0200)]
build: fix provides logic when ABI version is set
Same as for the base package name, when a package has an ABI version,
provide both unversioned provider in addition to one with ABI version
and version.
So for each provide instead of providing only:
$provide$ABI_version=$package_version
now provide:
$provide $provide$ABI_version=$package_version
When a provide ends in a number, the ABI version will be prefixed with
a - sign, e.g.: provide1-0
Fixes: 18029977 ("build: fix apk packaging and ABI-versioning") Signed-off-by: George Sapkin <george@sapk.in> Link: https://github.com/openwrt/openwrt/pull/21369 Signed-off-by: Robert Marko <robimarko@gmail.com>
George Sapkin [Fri, 2 Jan 2026 15:10:00 +0000 (17:10 +0200)]
build: don't auto mark all provides as virtual
Don't mark all provides as virtual when ALTERNATIVES is set.
Automatically marking all provides as virtual prevents variants from
conflicting between each other. Alternatives have nothing to do with
packaging and packages are expected to manage their own provides.
Updated internal provides explanation.
Remove unnecessary back slashes from FormatProvides.
Fixes: 18029977 ("build: fix apk packaging and ABI-versioning") Signed-off-by: George Sapkin <george@sapk.in> Link: https://github.com/openwrt/openwrt/pull/21369 Signed-off-by: Robert Marko <robimarko@gmail.com>
George Sapkin [Fri, 2 Jan 2026 15:07:52 +0000 (17:07 +0200)]
build: remove default provider priority
Remove default provider priority since packages are expected to
explicitly declare virtual provides and set default variants. With
default priority some package variants without PROVIDES and not marked
as default end up with priority 0 and are not picked for installation.
Before the change dnsmasq-dhcpv6 is selected for dnsmasq, because the
former has higher priority:
name <dnsmasq> selected from selectable list
select_package: dnsmasq (requirers=1, autosel=1, iif=0, order_id=0x4000005f)
consider dnsmasq-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
prefer existing package
choose as new provider
consider dnsmasq-dhcpv6-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=1, installed=0
prefer highest declared provider priority
choose as new provider
consider dnsmasq-full-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=1, installed=0
prefer lowest available repository
selecting: dnsmasq-dhcpv6-2.91-r2, available: 1
assign dnsmasq-dhcpv6 to dnsmasq-dhcpv6-2.91-r2
assign dnsmasq to dnsmasq-dhcpv6-2.91-r2
disqualify_package: dnsmasq-2.91-r2 (conflicting provides)
disqualify_package: dnsmasq-full-2.91-r2 (conflicting provides)
apply_constraint: libc
apply_constraint: provider: libc-1.2.5-r5: 1
After the change dnsmasq is selected for dnsmasq based on
lexicographical order:
name <dnsmasq> selected from selectable list
select_package: dnsmasq (requirers=1, autosel=1, iif=0, order_id=0x4000005f)
consider dnsmasq-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
prefer existing package
choose as new provider
consider dnsmasq-dhcpv6-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
prefer lowest available repository
consider dnsmasq-full-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
prefer lowest available repository
selecting: dnsmasq-2.91-r2, available: 1
assign dnsmasq to dnsmasq-2.91-r2
disqualify_package: dnsmasq-dhcpv6-2.91-r2 (conflicting provides)
disqualify_package: dnsmasq-full-2.91-r2 (conflicting provides)
apply_constraint: libc
apply_constraint: provider: libc-1.2.5-r5: 1
Fixes: dea8397 ("include/package-pack: add default 'provider_priority' for APK packages") Signed-off-by: George Sapkin <george@sapk.in> Link: https://github.com/openwrt/openwrt/pull/21369 Signed-off-by: Robert Marko <robimarko@gmail.com>
Mark T4240RDB u-boot variants as device-built and avoid installing them into rootfs.
Without this buildbot crashes during package install with:
ERROR: unable to select packages:
u-boot-fsl_T4240RDB-nor (no such package):
required by: world[u-boot-fsl_T4240RDB-nor]
u-boot-fsl_T4240RDB-sdboot (no such package):
required by: world[u-boot-fsl_T4240RDB-sdboot]
Fixes: c5d3d5fe28f7 ("package: u-boot: initial support for qoriq arch") Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21514 Signed-off-by: Robert Marko <robimarko@gmail.com>
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.
realtek: phy: add RTL8214FC initialization for RTL839x
Until now the RTL8214FC is initialized either by U-Boot (all
devices) or by some magic firmware file (RTL838x). On RTL839x
devices without U-Boot (e.g. ZyXEL GS1920) this PHY cannot
be used.
Provide the most basic setup sequence for RTL839x so that
copper/fiber work. Later it can be taken over for all devices
and the firmware helpers can be dropped.
Remark! This should not (but might) break RTL839x devices with
RTL8214FC U-Boot setup.
The RTL8214FC and the RTL8218B share the same register set and
need to be initialized quite similar. In the future the RTl8214FC
will get its own setup sequence. To keep the codebase small the
common parts (serdes & copper) will be covered by the existing
RTL8218B configuration.
Enhance the RTL8218B setup with this separate commit to ensure
that nothing breaks.
Rany Hany [Tue, 6 Jan 2026 14:35:05 +0000 (14:35 +0000)]
wifi-scripts: ucode: fix RRM defaults
They are being default enabled unconditionally when they should
depend on 802.11k. 802.11k should not be enabled by default
either as it can cause issues with certain older drivers and
is useless without a userspace program like usteer or DAWN.
If users want to enable 802.11k they will enable it when they
set such programs up.
Another inconsistency with rnr was dealt with so that it is not
default enabled. This is also not done with old wifi-scripts
and is generally unexpected and surprising behavior.
Moreoever, this introduces an inconsistency between old shell
wifi-scripts and ucode version. Old wifi-scripts does not do this.
Commit ab805ec316b5 ("generic: add missing squashfs config") enabled
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU in the generic config, so it is no
longer needed in the target configs.
Jonas Jelonek [Fri, 2 Jan 2026 17:12:47 +0000 (17:12 +0000)]
realtek: pcs: rtl838x: use SerDes hardware modes
Switch RTL838X SerDes setup to use the internal SerDes hardware modes
instead of the PHY_INTERFACE_MODE_* modes.
Use the generic mapper in the beginning of the SerDes setup and convert
all affected functions to the different mode type. This will be moved
out to the generic pcs_config later.
Jonas Jelonek [Fri, 9 Jan 2026 23:12:36 +0000 (23:12 +0000)]
realtek: pcs: drop legacy comment and warning
We finally reached the point where PCS has full control over SerDes and
no parts of this are scattered in other drivers anymore. To make that
clear, drop the comment in pcs_config that explains this former state
and remove a warning which states that pcs_config isn't fully
implemented yet.
Add a generic output to at least keep a generic sign of life from the
PCS driver, independently from what the variant-specific code currently
prints.
Jonas Jelonek [Fri, 9 Jan 2026 23:43:21 +0000 (23:43 +0000)]
realtek: phy: add comment to firmware file definition
Add a comment stating the situation around a specific RTL838x firmware
file. After SerDes setup has been moved to the PCS driver, this firmware
file is partially unused. If the remaining bits are pulled out or just
replaced, this firmware file can be dropped. The comment ensures that we
do not forget about that.
Works:
------
- (24) RJ-45 ethernet ports
- Switch functions
- Buttons
- LEDs (partial support, the wrong LEDs light up)
- Manual fan control
Not yet enabled:
----------------
- PoE (requires patches to realtek-poe to support i2c)
- Combo ports (link is up, but no data is transferred)
Fans:
-----
After boot, the fans are running in full speed mode. You can interact
with the fan controller at /sys/class/hwmon/
Installation:
-------------
This device uses ZyNOS instead of Linux, this makes installation a bit
more cumbersome. Serial console is required!
1. Set the switch to boot from the first image. This step is crucial,
it will fail to boot if this is not set properly.
2. Connect to the switch using serial and interrupt the boot process
to enter debug/recovery mode.
3. Load the OpenWrt initramfs image via XMODEM. You need to obtain an
unlock code, based on your MAC address, first. See the excellent write
up at https://www.ixo.de/info/zyxel_uclinux/ for details. Replace
unlock_code in the commands below by the code obtained.
After running ATBA5, the terminal needs to be closed and re-opened
with 115200 baud. This speeds up the file transfer significantly!
The file length in bytes need to be given instead of file_length below.
You also need an XMODEM upload utility like "lrzsz-sx -X" to transfer
the file. Start the XMODEM upload after running the ATUPxxxx command:
NB: You do not need to touch the loader binary unless it's recommended.
The loader is not part of a regular sysupgrade file and will be left
untouched. The boot loader only checks if the loader is valid to be
able to boot.
Recovery/ Return to stock:
--------------------------
Just spam the "u" key during (or "z" for 9600 baud) during memory testing
to trigger a recovery XMODEM upload at 115200 baud. A standard OEM upgrade
image works properly.
1. Obtain the original MAC address table from the stock bootlog, for
example:
setting device eth0 to 00:90:7f:00:00:01
setting device eth1 to 00:90:7f:00:00:02
setting device eth2 to 00:90:7f:00:00:03
setting device eth3 to 00:90:7f:00:00:04
setting device eth4 to 00:90:7f:00:00:05
setting device eth5 to 00:90:7f:00:00:06
setting device eth6 to 00:90:7f:00:00:07
2. Open the case and move jumper JP1 from 2-3 to 1-2 to enter FAILSAFE
mode.
3. Power on the device and interrupt the boot process to access the U-Boot
shell.
4. Program the MAC base address into the EEPROM (text after '#' is a
comment):
mac ports 3
mac 2 00:90:7f:00:00:01 # first MAC address from bootlog
mac save
5. Reset the device and enter the U-Boot console again.
6. Connect a TFTP server to port 6 and boot the initramfs image:
7. (Optional) Backup all MTD partitions if you want the ability to restore
stock firmware.
8. Perform a normal sysupgrade from the initramfs environment.
9. Power off the device and move jumper JP1 back to 2-3.
10. The device will now boot OpenWrt.
Known issues:
- LCD, buttons and LEDs are controlled by an external MCU; the protocol is
currently unknown.
- The internal connection between the two Marvell switches is unused by
OpenWrt.
- The stock firmware uses an empty U-Boot environment; saving variables
modifies the environment and prevents a normal boot. FAILSAFE U-Boot
remains functional.
- WatchGuard configuration is encrypted; DSA MAC addresses are stored in
this configuration.
- Failsafe Ethernet works on port1.
JINLIANG GU [Sat, 10 Jan 2026 01:45:58 +0000 (09:45 +0800)]
netifd: dhcp: suppress udhcpc default vendor class if specified in sendopts
When DHCP Option 60 is specified via sendopts (hex, decimal, or named
formats), udhcpc sends its default "udhcp <version>" string alongside
the custom value, which causes authentication failures with some ISPs.
This fix detects Option 60 in sendopts and automatically passes -V ""
to udhcpc to suppress the default version string while allowing
multiple user-defined vendor classes.