prplos/.testbed
Petr Štetiar 78b11d2d5b
ci: testbed: labgrid: flash OSPv2 and Freedom via FEAT-29 update_prpl
Switch the OSPv2 (mxl25641-hdk-6) and Freedom (wnc-freedom) eMMC flash
flow to the FEAT-29 U-Boot update script, replacing the legacy OSPv2
update_fullimage path and the Freedom untar/flash sysupgrade path. This
exercises the image/update tooling introduced in prplos!1964.

The flow tftpboots the per-board update_script.itb, sources it and runs
update_prpl against the FEAT-29 OS artifacts:
- OSPv2: PRPL_OSP_v2-wgrtd159be_b_wav700-ext4.img (4G variant)
- Freedom: prpl_freedom-kernel.itb + prpl_freedom-rootfs.itb

update_rescue_bank is set to yes so both OS banks carry the same image
and a bank failover cannot boot a stale rootfs. U-Boot/RBE/XBL/SMD are
left unset: those are one-time migration inputs and must not be
reflashed on every refresh. Boards are expected to already be on the
prpl flash layout. Hand-off to Linux uses run bootcmd (bootprpl/bootipq)
instead of reset, which avoids a power cycle and the labgrid autoboot
re-interrupt hazard.

init_command_timeout bounds the whole init_commands sequence and is set
deliberately tight, per board, so a network/perf regression (e.g. image
TFTP throughput roughly halving) trips the timeout instead of silently
passing, while still absorbing TFTP first-packet jitter. Validated runs
executed the init_commands in:
- OSPv2:   ~30s (update_script TFTP ~10s + update_prpl ~18s)   -> 60s
- Freedom: ~37s (sleep 5 + update_script TFTP ~3.5s + update_prpl ~24s,
                 two images to both banks)                     -> 75s

The rootfs_data overlay is erased before update_prpl so every refresh
boots from a clean overlay; update_prpl itself leaves rootfs_data
untouched. The block offsets are hardcoded from each board's GPT because
the target U-Boot has no part command to derive them:
- OSPv2:   mmc erase 0x86c00 0x10000   (32 MiB, UPDK 9.2.0)
- Freedom: mmc erase 0x534022 0x40000  (128 MiB)

Because update_prpl needs both the update script and the OS image over
TFTP, generalise the testbed/cdrouter firmware copy to a list via the
new TFTP_IMAGE_FILENAMES variable (falling back to TFTP_IMAGE_FILENAME),
rather than overloading TFTP_IMAGE_UNPACK_COMMAND. The Freedom testbed
job now drives the wnc-freedom-emmc target instead of initramfs, so the
now-unused wnc-freedom-initramfs labgrid target is dropped.

Flip the wnc-freedom and mxl25641-hdk-6 testbed runner tags to the -sfl
variant (dut-wnc-freedom-sfl, dut-mxl25641-hdk-6-b-sfl), to make it
clear, that those devices are converted to the prpl Standard Flash
Layout.

References: FEAT-29
Closes: PCF-2644, PCF-2645
Assisted-by: claude:opus-4-8:1m-context
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
2026-06-23 10:57:09 +02:00
..
cdrouter ci: cdrouter: switch USP testing from STOMP to MQTTv5 as primary MTP 2026-04-21 16:00:15 +01:00
labgrid ci: testbed: labgrid: flash OSPv2 and Freedom via FEAT-29 update_prpl 2026-06-23 10:57:09 +02:00
README.md

Content

This directory contains bits needed for testbed.

cdrouter

Contains CDRouter configurations and test packages definitions for runtime testing on real devices using CDRouter.

labgrid

Provides content used during runtime testing on real device using labgrid Python testing framework.