Skip to content

feat(hw): recovery dispatch workflow + zc706 wiring - #750

Open
tfcollins wants to merge 2 commits into
mainfrom
feature/hw-recovery-scaffold
Open

feat(hw): recovery dispatch workflow + zc706 wiring#750
tfcollins wants to merge 2 commits into
mainfrom
feature/hw-recovery-scaffold

Conversation

@tfcollins

Copy link
Copy Markdown
Collaborator

Adds a manual Hardware Recovery (GHA) workflow keyed on a labgrid place name. The dispatcher looks up the place's daughter-board tag on the coordinator and routes to a per-board recovery handler.

Why a separate small PR

GitHub Actions only honors workflow_dispatch when the workflow file exists on the default branch. Cherry-picking just the recovery scaffold (3 files, 331 lines) onto main first makes the trigger invokable; the larger feature/gha-hw-workflow rollout will pick it up transitively.

Today's coverage

  • adrv9371 (zc706 carrier) → adi_lg_plugins.strategies.BootZynq7000JTAGRecovery
  • everything else → prints no recovery defined and exits 0

New boards plug in by adding an entry to HANDLERS in .github/scripts/recover-place.py — no workflow changes needed.

Verified

  • yaml.safe_load parses both the workflow and recovery-config.yml
  • ast.parse clean on the dispatcher
  • Dispatcher dry-run against the live coordinator (10.0.0.41:8000):
    • recover-place.py nucno recovery strategy defined for place='nuc' board='daq3' (exit 0)
    • recover-place.py bq'bq': zc706 recovery requires a per-place block ... Skipping until the operator stages those artifacts. (exit 0)

Operator prereqs before bq recovery can run end-to-end

Documented inline in .github/recovery-config.yml and labgrid-plugins/examples/zynq7000_recovery/lg_zc706_recovery.yaml:

  • Vivado/xsdb on the recovery runner
  • Digilent JTAG drivers + udev rule unbinding ftdi_sio from the FT232H
  • ps7_init.tcl / u-boot.elf / system_top.bit extracted via bootgen
  • TFTP root with uImage / devicetree.dtb / uInitrd.recovery
  • Kuiper SD image staged
  • places.bq.env_yaml block populated in recovery-config.yml (currently shipped as commented-out template)

Test plan

  • dispatcher exit 0 on both code paths against live coordinator
  • after merge: gh workflow run hardware-recover.yml -f place=bq reaches the dispatcher
  • once bq artifacts are staged: full recovery run drives BootZynq7000JTAGRecovery to sd_boot_verified

Adds a manual `Hardware Recovery (GHA)` workflow keyed on a labgrid
place name. The dispatcher looks up the place's `daughter-board` tag on
the coordinator and routes to the appropriate per-board recovery.

Today's coverage:
  - adrv9371 (zc706 carrier, e.g. bq):
      adi_lg_plugins.strategies.BootZynq7000JTAGRecovery
  - everything else:
      prints "no recovery defined" and exits 0

The handler table in `.github/scripts/recover-place.py` is the only
place to add new board → strategy mappings. New strategies plug in by
appending to HANDLERS — boards without recovery stay as silent no-ops.

The zc706 path needs operator-staged artifacts on the recovery runner
(Vivado/xsdb, Digilent JTAG drivers/udev, ps7_init.tcl, u-boot.elf,
bitstream, TFTP-served recovery image, SD-card image). Those go in
`.github/recovery-config.yml`'s per-place env_yaml block; the file
ships empty and the dispatcher skips with a clear "stage artifacts"
message until an operator populates it.

Reference template:
  labgrid-plugins/examples/zynq7000_recovery/lg_zc706_recovery.yaml

Lands on main first so `workflow_dispatch` becomes invokable; the
larger `feature/gha-hw-workflow` PR pulls it in transitively.
@github-actions

github-actions Bot commented May 16, 2026

Copy link
Copy Markdown

Test Results

1 812 tests  ±0     508 ✅ ±0   4m 24s ⏱️ - 4m 32s
    1 suites ±0   1 304 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 2fb0ab7. ± Comparison against base commit 562abf0.

♻️ This comment has been updated with latest results.

CI lint job ran black via pre-commit and reformatted long lines
that hadn't been wrapped. Apply the same reformat locally so the
PR's Lint (3.10/3.11/3.12) checks turn green.
@github-actions

Copy link
Copy Markdown

Generated documentation for this PR is available at Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant