MokerLink 2G080GM

OpenWrt support has been submitted upstream and is currently pending review.

Upstream pull request: https://github.com/openwrt/openwrt/pull/25193

The MokerLink 2G080GM is an 8-port 2.5GbE managed Ethernet switch based on the Realtek RTL9303 platform.

OpenWrt hardware bring-up, persistent installation, sysupgrade, recovery to stock firmware, and installation through the stock web interface have all been validated on hardware.

Normal installation does not require modification of the U-Boot environment or serial-console access. The stock web interface accepts the generated OpenWrt squashfs-factory.bix image directly.

Initial OpenWrt bring-up used the closely related Hasivo S1100WP-8GT-SE as a useful reference. Board-specific properties on the MokerLink were subsequently verified against the physical hardware.

See the OpenWrt forum development thread and upstream pull request for current status.

Component Details
SoC Realtek RTL9303 rev B
CPU architecture MIPS 34Kc
CPU frequency 800 MHz reported by stock U-Boot
RAM 128 MiB
Flash 16 MiB SPI NOR
Flash chip Fudan / FUDANWEI FM25Q128-family
Ethernet 8 × 10/100/1000/2500BASE-T
PHYs 8 × Realtek RTL8221B-VB-CG 2.5GbE PHY
Vendor hardware profile RTL9303_8X8226
CPU switch port RTL9303 port 28, fixed internal 1 Gbit/s link
Bootloader Vendor U-Boot 2011.12
Serial console 38400 8N1, no flow control
PoE No
SFP/SFP+ No
Buttons 1 × reset
Software-controlled status LED Yes
OpenWrt target realtek/rtl930x
OpenWrt package architecture mips_24kc
Function Status Notes
TFTP/initramfs boot Working Useful for development and recovery without writing flash
Normal OpenWrt userspace Working SSH and normal procd/ubus userspace verified
DSA switch Working Eight front-panel ports exposed as lan1 through lan8
All 8 Ethernet ports Working Each physical port individually tested with real traffic
100 Mbit/s Working Tested on all eight ports
1 Gbit/s Working Tested on all eight ports
2.5 Gbit/s Working Tested on all eight ports
VLAN filtering Working Tagged and untagged DSA VLAN operation validated
VLAN isolation Working L2 separation between test VLANs validated
Factory MAC Working Read from vendor U-Boot environment through NVMEM
RJ45 link/activity LEDs Working RTL9303 hardware LED engine
System/status LED Working GPIO 0
Reset button Working GPIO 5, active low
Cold boot Working Tested
Warm reboot Working Tested
Reset-button reboot Working Tested
Persistent OpenWrt install Working Boots OpenWrt directly from flash
OpenWrt sysupgrade Working OpenWrt-to-OpenWrt upgrade validated
Stock web installation Working Stock HTTP updater accepts squashfs-factory.bix
Stock firmware restoration Working Vendor RUNTIME restored and booted successfully
Official upstream support Pending Submitted as OpenWrt PR #25193

The vendor bootloader identifies the board hardware profile as:

RTL9303_8X8226

The stock bootloader enumerates external PHY-facing RTL9303 switch ports:

0, 8, 16, 20, 24, 25, 26, 27

Under OpenWrt, all eight PHYs bind to the Realtek RTL8221B driver.

The board has 128 MiB RAM. This differs from some closely related RTL9303 switch designs, so memory configuration from another device should not be copied without verification.

Front port OpenWrt RTL9303 switch port MDIO SerDes
1 lan1 0 bus 0, addr 1 2
2 lan2 8 bus 0, addr 2 3
3 lan3 16 bus 0, addr 3 4
4 lan4 20 bus 0, addr 4 5
5 lan5 24 bus 1, addr 1 6
6 lan6 25 bus 1, addr 2 7
7 lan7 26 bus 1, addr 3 8
8 lan8 27 bus 1, addr 4 9
CPU eth0 28 internal fixed internal link

The physical-to-OpenWrt port numbering above has been verified by individually cable-testing all eight front-panel ports.

TODO: Add photographs of:

  • front of enclosure
  • rear / power input
  • product label
  • PCB overview
  • RTL9303 / heatsink area
  • SPI flash
  • serial header
  • relevant PCB revision markings

The switch uses a metal enclosure.

The main SoC heatsink is retained using push-pin fasteners. The heatsink was not removed during the initial OpenWrt bring-up and does not need to be removed for serial access or normal firmware development.

TODO: Add photographs and exact enclosure-opening steps.

The stock bootloader and OpenWrt console use:

Setting Value
Baud rate 38400
Data bits 8
Parity none
Stop bits 1
Flow control none

Example host command using picocom:

picocom -b 38400 --flow n --databits 8 --parity n --stopbits 1 /dev/ttyUSB0

TODO: Add verified serial-header pin order and a labelled PCB photograph.

Do not assume the pinout from another RTL9303 switch. Verify GND/TX/RX on the actual board before connecting a USB serial adapter.

The switch contains a 16 MiB SPI NOR device.

The following layout has been observed and reproduced by the OpenWrt device tree:

MTD Start End Size OpenWrt name Vendor purpose / name Notes
mtd0 0x000000 0x0e0000 896 KiB u-boot LOADER Bootloader; preserve
mtd1 0x0e0000 0x0f0000 64 KiB u-boot-env BDINFO U-Boot environment / board information
mtd2 0x0f0000 0x100000 64 KiB u-boot-env2 SYSINFO Vendor system information; preserve
mtd3 0x100000 0x200000 1 MiB jffs CFG Vendor configuration
mtd4 0x200000 0x300000 1 MiB jffs2 LOG Vendor log area
mtd5 0x300000 0xf00000 12 MiB firmware RUNTIME Vendor runtime firmware
mtd6 0xf00000 0x1000000 1 MiB oeminfo OEMINFO Vendor/OEM information; preserve

Persistent OpenWrt installation has been validated on this flash layout.

The normal installation path uses the vendor web updater and the generated squashfs-factory.bix image. The OpenWrt firmware occupies the existing 12 MiB vendor RUNTIME / OpenWrt firmware partition.

Normal installation does not require changes to the U-Boot environment, bootloader, SYSINFO, or OEMINFO partitions.

During RAM-boot development, the bootloader and protected vendor partitions were repeatedly hashed before and after cold boots, warm reboots, and reset-button reboots and remained unchanged.

The vendor firmware uses a legacy uImage header with the non-standard magic:

0x83800000

The OpenWrt device definition generates images using the same magic.

The firmware partition is described using:

compatible = "openwrt,uimage", "denx,uimage";
openwrt,ih-magic = <0x83800000>;

This allows both the vendor U-Boot implementation and the OpenWrt firmware splitter to recognize the image correctly.

Two persistent images are generated:

Image Purpose
squashfs-factory.bix Initial installation from the stock web interface
squashfs-sysupgrade.bin Subsequent OpenWrt-to-OpenWrt upgrades

The factory image contains the same kernel/rootfs payload as the sysupgrade image but without the trailing OpenWrt sysupgrade metadata.

While upstream review is still pending, there may not yet be an official OpenWrt download for this model.

Do not flash an image built for a different RTL9303 switch.

Normal installation does not require serial-console access or modification of U-Boot.

  1. Open the stock web interface.
  2. Navigate to Management → Firmware.
  3. Select Upgrade.
  4. Select HTTP.
  5. Upload the OpenWrt squashfs-factory.bix image.
  6. Wait for the stock interface to report that the upgrade completed.
  7. Reboot the switch.

After reboot, OpenWrt starts directly from flash.

The Image0 / Image1 selector present in the vendor interface applies to firmware backup/export. It is not presented during firmware upload.

For subsequent OpenWrt upgrades, use:

squashfs-sysupgrade.bin

TFTP boot is the currently tested development method because it permits OpenWrt hardware validation without installing OpenWrt to flash.

A serial console is strongly recommended.

The following is representative of the tested development setup:

  • switch IP: 192.168.0.1
  • TFTP server: 192.168.0.111
  • load address: 0x84f00000
  • image: locally built OpenWrt initramfs uImage

Example U-Boot commands:

setenv netretry no
setenv autostart yes
setenv ipaddr 192.168.0.1
setenv serverip 192.168.0.111
rtk network on
tftpboot 0x84f00000 mokerlink-initramfs.bin

With autostart=yes, the tested vendor U-Boot automatically boots the downloaded legacy uImage after a successful transfer.

Do not run saveenv when merely testing an initramfs image. The variables above can be used temporarily for a RAM-boot session.

A successful transfer looks similar to:

Using rtl9300#0 device
TFTP from server 192.168.0.111; our IP address is 192.168.0.1
Filename 'mokerlink-initramfs.bin'.
Load address: 0x84f00000
Loading: ...
done
Automatic boot of image at addr 0x84F00000 ...
## Booting kernel from Legacy Image at 84f00000 ...
   Image Name:   MIPS OpenWrt Linux
   Load Address: 80100000
   Entry Point:  80100000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

The vendor U-Boot networking implementation has been somewhat sensitive to physical link setup during development.

A 2.5GbE-capable intermediary switch between the TFTP server and the MokerLink has proven reliable. If TFTP does not work over a direct host-to-switch cable, try using a compatible intermediary switch before assuming the bootloader network driver is broken.

OpenWrt creates a DSA bridge containing:

lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8

The default development configuration bridges all eight ports on VLAN 1.

All eight front-panel ports have been individually tested with real IP traffic.

Every port has also been tested at:

  • 100 Mbit/s full duplex
  • 1 Gbit/s full duplex
  • 2.5 Gbit/s full duplex

The kernel identifies the PHYs as:

RTL8221B-VB-CG 2.5Gbps PHY

The vendor bootloader uses the older/profile designation RTL9303_8X8226. The Linux PHY driver identification above reflects the actual PHY revision detected by OpenWrt.

The front-panel system/status LED is controlled by:

GPIO 0, active high

It has been tested with:

  • forced off
  • forced on
  • heartbeat trigger

The OpenWrt device tree also assigns the system LED as:

led-boot
led-failsafe
led-running
led-upgrade

The physical reset button is:

GPIO 5, active low

It is exposed as KEY_RESTART.

A physical button press has been verified to cause a normal OpenWrt reboot, including clean DSA shutdown followed by return to U-Boot.

The RTL9303 hardware LED controller is used for the Ethernet port LEDs.

Observed behavior:

Link speed Physical indication
100 Mbit/s right green LED
1 Gbit/s left green LED
2.5 Gbit/s left amber/yellow LED
Traffic active link LED blinks

The port LEDs require the RTL9303 LED_SYNC pinmux to be enabled on this board.

During development, the Realtek LED configuration was parsed correctly but the physical RJ45 LEDs remained dark until LED_SYNC was enabled. This was verified by an A/B RAM-boot test.

The final board description enables LED_SYNC through the gpio-leds device pinctrl state.

The power LED appears to be rail-driven / hardware-controlled rather than software-controlled.

No software GPIO mapping has been assigned for the power LED.

The factory base MAC address is stored in the vendor U-Boot environment as ethaddr.

OpenWrt retrieves this through an NVMEM cell in the u-boot-env / BDINFO region and assigns it to the Ethernet interface.

The device tree uses the vendor-provided address rather than hard-coding a MAC.

The MAC address of the development unit is intentionally not documented here because it is unit-specific.

DSA bridge VLAN filtering has been validated with both access and trunk ports.

A temporary test configuration used:

VLAN Access ports Tagged trunk
VLAN 10 lan1, lan2 lan4
VLAN 20 lan3 lan4
Management / VLAN 1 lan5lan8

Validation included:

  • forwarding between hosts on the same untagged VLAN
  • isolation between different L2 VLANs
  • tagged VLAN 10 traffic on the trunk port
  • tagged VLAN 20 traffic on the trunk port
  • continued management connectivity outside the temporary test VLANs

The test configuration was intentionally temporary and is not intended as a recommended production network configuration.

Multiple recovery paths have been validated or established during development.

For a normally functioning OpenWrt installation, use the standard OpenWrt squashfs-sysupgrade.bin image.

For advanced recovery or development:

  1. attach the 38400 8N1 serial console
  2. interrupt U-Boot
  3. initialize vendor networking using rtk network on
  4. TFTP-load an OpenWrt initramfs image to 0x84f00000
  5. boot the initramfs image without writing flash

The stock firmware RUNTIME image is flash-mapped at:

0xb4300000

Before persistent development, a full external SPI flash dump and individual MTD backups were created.

Users performing low-level recovery should use backups from their own device. BDINFO, SYSINFO, OEMINFO and other vendor partitions may contain unit-specific information.

Restoration of the original vendor RUNTIME partition has been tested.

The safest low-level method is to boot an OpenWrt initramfs image and write a backup of the unit's original firmware / RUNTIME partition.

Do not restore another unit's complete flash image unless you understand which regions contain device-specific data.

An external SPI programmer remains the final recovery method if the bootloader itself or protected flash regions are damaged.

Example excerpt from a development RAM boot:

U-Boot 2011.12.(3.6.6.55087)

Board: RTL9300 CPU:800MHz LX:175MHz DDR:600MHz
DRAM:  128 MB
SPI-F: FUDANWEI/... 1x16 MB

Hardware-profile probe (RTL9303_8X8226)

unit=0 port=0
unit=0 port=8
unit=0 port=16
unit=0 port=20
unit=0 port=24
unit=0 port=25
unit=0 port=26
unit=0 port=27

...

Realtek RTL9303 rev B (...) SoC with 128 MB
MIPS: machine is MokerLink 2G080GM
earlycon: ns16550a0 at MMIO 0x18002000 (options '38400n8')

...

Creating 7 MTD partitions on "spi0.0":
0x000000000000-0x0000000e0000 : "u-boot"
0x0000000e0000-0x0000000f0000 : "u-boot-env"
0x0000000f0000-0x000000100000 : "u-boot-env2"
0x000000100000-0x000000200000 : "jffs"
0x000000200000-0x000000300000 : "jffs2"
0x000000300000-0x000000f00000 : "firmware"
0x000000f00000-0x000001000000 : "oeminfo"

...

lan1: PHY driver [RTL8221B-VB-CG 2.5Gbps PHY]
lan2: PHY driver [RTL8221B-VB-CG 2.5Gbps PHY]
lan3: PHY driver [RTL8221B-VB-CG 2.5Gbps PHY]
lan4: PHY driver [RTL8221B-VB-CG 2.5Gbps PHY]
lan5: PHY driver [RTL8221B-VB-CG 2.5Gbps PHY]
lan6: PHY driver [RTL8221B-VB-CG 2.5Gbps PHY]
lan7: PHY driver [RTL8221B-VB-CG 2.5Gbps PHY]
lan8: PHY driver [RTL8221B-VB-CG 2.5Gbps PHY]

The exact OpenWrt kernel/revision shown in development logs is intentionally omitted here because development is ongoing and the version will change.

Hardware support has been submitted as:

https://github.com/openwrt/openwrt/pull/25193

The pull request is currently pending OpenWrt review and CI.

Until the change is merged and official snapshots are produced, this page should not be interpreted as indicating that an official downloadable OpenWrt image already exists for the device.

During link initialization, OpenWrt may print messages similar to:

realtek-otto-pcs ... SerDes N: waiting for RX idle timed out

The affected ports subsequently configure correctly and have been validated with real traffic at 100 Mbit/s, 1 Gbit/s and 2.5 Gbit/s.

So far this has not indicated a functional Ethernet failure.

The power LED appears to be hardware / rail controlled and has no OpenWrt software mapping.

Only the tested hardware revision has been validated.

Users with visibly different PCB revisions, flash parts or PHY layouts should verify hardware details before assuming identical compatibility.

  • Last modified: 2026/09/15 07:41
  • by ctalaveraw