DUT configuration status¶
Record of state, applied configuration, and firmware per DUT. Update when flashing, changing network, or applying fixes.
Summary table¶
| DUT | Port | VLAN | Power | Firmware | SSH | Internet | Notes |
|---|---|---|---|---|---|---|---|
| Belkin RT3200 #1 | 11 | 100 | Relay | OpenWrt 23.05.5 | ✓ | ✓ | |
| Belkin RT3200 #2 | 12 | 101 | Relay | LibreMesh 2024.1 | ✓ | ✓ | |
| Belkin RT3200 #3 | 13 | 102 | Relay | OpenWrt 23.05.5 | ✓ | ✓ | |
| Banana Pi R4 | 14 | 103 | Relay | OpenWrt 24.10.5 | ✓ | ✓ | |
| OpenWRT One | 1 | 104 | PoE (native) | OpenWrt 24.10.5 | ✓ | ✓ | swap eth0/eth1, port 1 |
| Librerouter 1 | 2 | 105 | Relay (ch 4) | LibreRouterOs 23.05 + LibreMesh | ✓ | ✓ | 12V DC jack, opkg feeds 23.05.2 |
| Librerouter 2 | 3 | 106 | Relay | - | Pending | Pending | Reserved |
| Librerouter 3 | 4 | 107 | Relay | - | Pending | Pending | Reserved |
Serial and SSH: rack-cheatsheets.
Internet access (opkg)¶
By default each DUT is on its isolated VLAN (100-108) with gateway 192.168.XXX.254 (per-VLAN). When libremesh-tests moves a port to VLAN 200 (mesh), the gateway becomes 192.168.200.254. VLAN changes are per test via labgrid-switch-abstraction (CI) or switch-vlan (manual); there are no global modes. See Lab architecture.
DUT network config (gateway, DNS, secondary IP, firewall) is handled by test fixtures or dut_gateway.py:
- Gateway and DNS persist in UCI (
uci set+uci commit) - Secondary IP on the gateway subnet (e.g.
192.168.{vlan}.x/24isolated,192.168.200.x/24mesh) so the upstream router can route replies - Firewall stopped (
fw3/fw4) since test DUTs do not need it
Initial provisioning (once per DUT, via serial): provision_dut.py configures everything in one command: mesh IPs, gateway, DNS, firewall off, NTP, and per-device hooks (OpenWrt One eth swap, LibreRouter opkg feeds). The real LibreMesh br-lan address used by mesh assertions remains the node's dynamic 10.13.x.x address.
python3 scripts/provision_dut.py --all --dry-run # verify commands
python3 scripts/provision_dut.py --all # apply all config
For mesh IPs only (legacy): python3 scripts/provision_mesh_ip.py --all.
Hardware data per DUT (switch port, isolated VLAN, serial, ssh_alias): configs/dut-config.yaml, duts section.
Relation to manual SSH to the DUT: SSH access to DUTs.
opkg fails with "wget returned 5"¶
Many DUTs have no RTC and boot with wrong date. SSL fails. Fix before opkg update:
date -s "2026-02-22 16:00:00" # current date/time
opkg update
To persist, enable NTP (sysntpd):
uci set system.ntp.enabled='1'
uci commit system
/etc/init.d/sysntpd restart
date # verify
opkg fails with "Failed to send request: Operation not permitted"¶
Typical cause: firewall blocking outbound. Test fixtures stop the firewall automatically, but after a DUT reboot it may return. Quick fix:
/etc/init.d/firewall stop # fw4 (OpenWrt 24.x) or fw3 (23.x)
iptables -P OUTPUT ACCEPT 2>/dev/null # fw3 only
opkg update
If ping 8.8.8.8 fails (no route), check gateway and DUT VLAN with dut_gateway.py. If ping 8.8.8.8 works but ping downloads.openwrt.org says "bad address", DNS is missing:
echo "nameserver 8.8.8.8" > /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
opkg update
LibreRouter: SNAPSHOT feeds missing¶
If opkg update fails with 23.05-SNAPSHOT URLs: move to 23.05.2 and comment non-existent feeds. See Librerouter 1.
Belkin RT3200 / Linksys E8450 - General notes¶
All three Belkin RT3200 units (Linksys E8450 equivalent) share target mediatek/mt7622 and aarch64_cortex-a53.
U-Boot: Interrupt char \x03 (Ctrl-C). Must be a single byte for Labgrid's proactive interrupt mode. Previous value "0\n" (two chars) disabled proactive mode and caused U-Boot activation timeouts.
SPI-NAND layout change in OpenWrt 24.10+¶
From OpenWrt 24.10, SPI-NAND flash layout for E8450/RT3200 changed from image version 1.0 to 2.0. That implies:
- No direct
sysupgradefrom 23.05.x (layout 1.0) to 24.10+ (layout 2.0). The image is rejected with: image is incompatible for sysupgrade based on the image version (1.0->2.0). - Bootloader update required: run UBI installer 1.1.0+ (unsigned) before flashing 24.10+. See OpenWrt wiki: Linksys E8450.
For now devices stay on OpenWrt 23.05.x until 24.10+ is needed. If upgrading, plan bootloader update (via U-Boot or recovery).
Belkin RT3200 #1¶
Serial: /dev/belkin-rt3200-1. Port/VLAN mapping: summary table.
Firmware (detail): mediatek/mt7622, aarch64_cortex-a53.
Network: Internet access template.
Belkin RT3200 #2¶
Serial: /dev/belkin-rt3200-2. Mapping: summary table.
Firmware (detail): LibreMesh 2024.1 on OpenWrt 23.05.5, mediatek/mt7622.
Network: Internet access template.
Belkin RT3200 #3¶
Serial: /dev/belkin-rt3200-3. Mapping: summary table.
Firmware (detail): mediatek/mt7622 (same OpenWrt line as table).
Network: Internet access template.
If config does not persist after reboot: see Corrupt overlay.
Corrupt overlay (rootfs_data) - Belkin RT3200 / Linksys E8450¶
Symptoms: Network/UCI config does not persist after reboot. Each boot: default config, opkg "Operation not permitted", SSH host key changes. firstboot -y does not fix (UBIFS corruption remains).
Diagnosis:
mount | grep overlay
If you see ubifs (ro,...) and upperdir=/tmp/root/upper → overlay is corrupt; system uses ramoverlay (tmpfs) and nothing persists.
dmesg | grep -i -E "ubi|ubifs|overlay|read-only|error"
Typical errors: bad node type, switched to read-only mode, fallback to ramoverlay.
Fix - Re-flash with sysupgrade:
Belkin uses UBI layout; mtd "rootfs_data" is not a separate mtd (UBI volume 5). Reliable repair is re-flash:
- Configure network manually (so DUT can download):
ip route del default 2>/dev/null; true
ip addr add 192.168.102.108/24 dev br-lan 2>/dev/null; true
ip route add default via 192.168.102.254
echo "nameserver 8.8.8.8" > /etc/resolv.conf
date -s "2026-03-12 12:00:00" # current date
- Download and flash on DUT (use
.itb, not.bin):
cd /tmp
wget https://downloads.openwrt.org/releases/23.05.5/targets/mediatek/mt7622/openwrt-23.05.5-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade.itb
sysupgrade -F -v /tmp/openwrt-23.05.5-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade.itb
-F forces flash even if metadata missing. Router reboots; after boot overlay should mount rw.
- If overlay still broken after sysupgrade: may need manual UBI volume delete:
mount -o remount,rw /overlay
umount /overlay
ubirmvol /dev/ubi0 -n 5
reboot
On next boot init creates a new volume and overlay should work.
- After repair: apply Internet access template (VLAN 102 for Belkin #3) and verify persistence with
reboot.
Kiss of Death (OKD) on Belkin RT3200 / Linksys E8450¶
What is Kiss of Death?¶
Kiss of Death (OKD) is a common brick on Belkin RT3200 (Linksys E8450) running OpenWrt. The router becomes fully unresponsive: no lights, no LEDs, no response after power cycle, power loss, or normal reboot.
Root cause: Bootloader bug (TF-A BL2 v2.9/v2.10). On boot it reads NAND and a correctable error (common bad block) causes fatal failure. Not hardware; bootloader firmware in flash.
Typical trigger: Power cycle via relays, power loss, or reboot after tests (including initramfs in RAM). RAM tests do not write flash but coincide with power cycles that trigger the bug.
Reference: OpenWrt Wiki - Recovery from OpenWrt Kiss of Death (OKD) - Linksys E8450
Recovery (procedure used March 2026)¶
Use mtk_uartboot + serial + TFTP to rewrite fixed bootloader, no JTAG.
CRITICAL: reset vs BL2 error Failed to load image id 3 (-2)¶
Until option 8 (preloader) and option 7 (FIP) have finished writing to NAND, a full chip reboot loads BL2 from flash again. That BL2 then tries to load image id 3 (BL31/FIP) from NAND. If that region is still missing or corrupt, you get ERROR: BL2: Failed to load image id 3 (-2) and you never reach U-Boot. This is expected; it is not a “lost setenv” problem.
- Do not run
resetfrom the shell and do not power-cycle between option 8 and option 7, or before both completes. Use only the recovery menu’s option 9 (Reboot) (or equivalent) after both writes succeed. setenv serverip/setenv ipaddrapply to the current U-Boot in RAM (frommtk_uartboot). They are enough for TFTP in that same session. You do not needsaveenvto flash options 8 and 7 in one uartboot session. (saveenvis optional; avoid it if unsure.)- If you already
resetand see BL2: Failed to load image id 3: runmtk_uartbootagain — that is the only way back to U-Boot until NAND is fixed. - If you are at
MT7622>and need the menu again without resetting the chip: trybootmenuorhelpand look for a menu command. If nothing works,mtk_uartbootagain and press Down arrow immediately when U-Boot starts (step 3 below) before spending time in the shell.
Prerequisites¶
- USB-serial adapter: Use a reliable 3.3 V TTL adapter for this flow. CH340 adapters often complete the BootROM handshake then time out while uploading the BL2 payload (
sending payload.../ panic inbootrom.rs) because they drop bytes under sustained traffic. FT232RNL (or another genuine FTDI / CP210x known to work at 460800+) is strongly recommended. Plug the adapter directly into the PC when possible; long chains of USB hubs make CH340 failures more likely. See USB-TTL serial adapters. - 3.3V USB-serial TTL on J10 (router TX → adapter RX, RX → TX, common GND; do not connect VCC).
- Ethernet cable LAN 1 to PC.
- Files in a folder (e.g.
~/recoverBelkin): mt7622-ram-1ddr-bl2.bin- RAM loader (mtk_uartboot).openwrt-mediatek-mt7622-linksys_e8450-ubi-preloader.bin- fixed preloader (22.03.7, renamed).openwrt-23.05.5-mediatek-mt7622-linksys_e8450-ubi-bl31-uboot.fip- FIP with fixed U-Boot.mtk_uartboot- Linux binary.- TFTP:
sudo apt install tftpd-hpa. Configure/etc/default/tftpd-hpawithTFTP_DIRECTORY="/srv/tftpboot",TFTP_ADDRESS=":69",TFTP_OPTIONS="--secure". - Copy preloader and FIP to
/srv/tftpboot/. - PC Ethernet on the same L2 as U-Boot: U-Boot expects TFTP at
192.168.1.254while the DUT uses192.168.1.1. If the PC still has another subnet on that cable (e.g.192.168.0.5), TFTP fails with ARP Retry count exceeded. Flush and set192.168.1.254/24on the correct interface. Generic commands: Belkin U-Boot TFTP — PC Ethernet IP. - Serial permissions:
sudo usermod -a -G dialout $USER(logout/login). - Restart TFTP:
sudo systemctl restart tftpd-hpa.
Step by step¶
- Run mtk_uartboot (adjust
/dev/ttyUSB0if needed). If the serial adapter is marginal, try--brom-load-baudrate 115200 --bl2-load-baudrate 115200(slower but sometimes enough for CH340; FT232RNL usually needs no flags):
sudo ./mtk_uartboot -s /dev/ttyUSB0 -a -p mt7622-ram-1ddr-bl2.bin -f openwrt-23.05.5-mediatek-mt7622-linksys_e8450-ubi-bl31-uboot.fip
After you see Received FIP / U-Boot output, open the console in a second terminal: screen /dev/ttyUSB0 115200 (avoid && screen in one line if the tool exits with a non-zero code).
-
Power on the router right after pressing Enter. In a few seconds the handshake should complete and BL2 should start loading the FIP.
-
In screen: as soon as U-Boot starts, press Down arrow repeatedly to interrupt autoboot and open the recovery menu (do this before a long stop at
MT7622>if you want options 7/8). If you are already atMT7622>, runbootmenuif available (helplists commands), or re-run mtk_uartboot and catch the menu earlier. Optionally runsetenv serverip 192.168.1.254andsetenv ipaddr 192.168.1.1before choosing option 8 so TFTP does not use a stale192.168.200.1from the lab. -
Write preloader (option 8): choose "8. Load BL2 preloader via TFTP then write to flash". Wait "Loading..." → "Erasing..." → "Writing 131072 byte(s)..." four times (offsets 0x0, 0x20000, 0x40000, 0x60000). Press Enter to return to menu.
-
Write FIP (option 7): choose "7. Load BL31+U-Boot FIP via TFTP then write to flash". Wait same write flow. Press Enter to return.
-
Reboot: option "9. Reboot" or wait for auto reboot.
-
Disconnect serial and Ethernet. Power router from PSU only. Should boot with lights and OpenWrt/LibreMesh banner.
Notes¶
- If mtk_uartboot panics with Operation timed out right after
sending payload..., the cause is almost always the USB-serial chip (CH340 + hubs) or wiring; switching to FT232RNL fixed this in lab practice (April 2026). - If ARP retry fails on TFTP: first confirm the PC has
192.168.1.254on the Ethernet port cabled to the router (ip addr flush+ add, see Belkin U-Boot TFTP — PC Ethernet IP). If the link is correct but ARP still fails, try in U-Boot:setenv ethaddr 00:11:22:33:44:55; saveenv. - If it does not boot after process, repeat 1-6 (sometimes two attempts).
- Verify: after boot,
grep "(release)" /dev/mtd0roshould show v2.4 or fixed version. - Once applied, fix is permanent and OKD should not recur.
Banana Pi R4¶
Serial: /dev/bpi-r4. Mapping: summary table.
Firmware (detail): mediatek/filogic.
U-Boot: Interrupt char \x1b (ESC). The boot menu requires a single-byte interrupt for proactive capture by Labgrid. Multi-byte sequences (e.g. \\x0 literal) disable proactive mode and cause timeouts.
Network: Internet access template. No special UCI.
OpenWRT One¶
Serial: /dev/openwrt-one. Switch ports (PoE + data LAN) and VLAN: summary table and switch-config 5.2.
Firmware (detail): OpenWrt 24.10.0-rc2, mediatek/filogic (update summary table if version bumps).
U-Boot: Interrupt char \x1b (ESC). Same single-byte proactive interrupt requirement as Banana Pi R4. login_timeout: 30.
Swap eth0/eth1: OpenWRT One has PoE on one port only (eth0). Default eth0=WAN, eth1=LAN. If cable is on PoE port, host cannot reach 192.168.1.1 because br-lan (eth1) has no link. Swap:
uci delete network.@device[0].ports
uci add_list network.@device[0].ports='eth0'
uci set network.wan.device='eth1'
uci set network.wan6.device='eth1'
uci commit network
/etc/init.d/network restart
Result: eth0 (PoE) → br-lan → 192.168.1.1. Connect switch cable to PoE port.
After swap: Internet access template.
U-Boot TFTP with PoE: PoE power-cycle could make U-Boot fail with external PHY timeout (EN8811H). Fix: connect both ports to switch - WAN (PoE) to port 1 for power; LAN to port 16 for data (VLAN 104). U-Boot uses LAN link (internal PHY) and avoids timeout. See switch-config 5.2.
Librerouter 1¶
Serial: /dev/librerouter-1. Mapping: summary table.
Power: 12V DC barrel jack via Arduino relay channel 4 (arduino_relay_control.py on/off 4). PDU: fcefyn-arduino, index 4.
Firmware (detail): LibreRouterOs 23.05-SNAPSHOT + LibreMesh (line summarized in table).
Network: Internet access template.
opkg feeds: 23.05-SNAPSHOT feeds do not exist. Move to 23.05.2 and comment missing feeds:
sed -i 's/23.05-SNAPSHOT/23.05.2/g' /etc/opkg/distfeeds.conf
sed -i -e '/librerouteros_libremesh/s/^/#/' -e '/librerouteros_librerouter/s/^/#/' -e '/librerouteros_tmate/s/^/#/' /etc/opkg/distfeeds.conf
opkg update
SSH: ssh dut-librerouter-1 (needs ~/.ssh/config entry from configs/templates/ssh_config_fcefyn and labgrid-bound-connect).
Librerouter 2¶
Mapping and state: summary table (port 3, VLAN 106). Serial: - (fill when cabled).
Firmware: (TBD)
Librerouter 3¶
Mapping and state: summary table (port 4, VLAN 107). Serial: - (fill when cabled).
Firmware: (TBD)
Maintaining the DUT table¶
- Update summary table first (port, VLAN, power, short firmware, SSH/Internet, notes).
- In the DUT section: only detail that does not fit the table (serial, arch, UCI, feeds, troubleshooting).
cat /etc/os-releaseon DUT if firmware line changes.- Record non-obvious UCI or procedures.