From 83b600d98e5165f7f0e718c04e37cc576e3eb6a2 Mon Sep 17 00:00:00 2001 From: Acelogic <7362641+Acelogic@users.noreply.github.com> Date: Sat, 24 Oct 2026 22:55:38 -0400 Subject: [PATCH] cycle: bind installed-fresh boots to the gadget-NCM stage too next3c refused at the loader (exit 2): the native Image4 path binds the resident q1n1 stage to its ELF (probes/stagebind.py), and the launch named only q1n1's build/uefi, while the A16 ran the gadget-NCM stage that tools/a16-link-rearm.py arms after a reset without a replug (q1n1 build/uefi-gadget-ncm, Q1N1_GADGET_NCM). SNAP_STAGE_BUILDS now also lists that build when it exists; each stage still binds only to its own ELF. --- tools/cycle_lib/installed_fresh.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/cycle_lib/installed_fresh.py b/tools/cycle_lib/installed_fresh.py index 1ed1598..8c9eb6d 100644 --- a/tools/cycle_lib/installed_fresh.py +++ b/tools/cycle_lib/installed_fresh.py @@ -2172,8 +2172,12 @@ def boot(ws, args, dest, qualification): need(battery['ac'] or not long_run, f'battery preflight refused: a watchdog above {WATCHDOG} s needs AC') record['status'] = 'BOOTING' write(path, record) + # The resident stage binds to its own ELF (probes/stagebind.py): the regular q1n1 build, or the gadget-NCM + # stage tools/a16-link-rearm.py arms after a reset (q1n1 build/uefi-gadget-ncm, Q1N1_GADGET_NCM) when built. + stage_builds = [ws.q / 'build/uefi'] + [p for p in [ws.q / 'build/uefi-gadget-ncm'] if p.is_dir()] settings = dict(qualification['environment'], SNAP_SMP_REPORT_PREFIX=args.prefix, SNAP_ADRENO_ADOPT=str(adoption), - SNAP_TXM_NATIVE=str(dest / 'image4.bin'), SNAP_STAGE_BUILDS=str(ws.q / 'build/uefi')) + SNAP_TXM_NATIVE=str(dest / 'image4.bin'), + SNAP_STAGE_BUILDS=os.pathsep.join(str(p) for p in stage_builds)) if settings.get('SNAP_QCC2072_WIFI'): # probes/run.py reads the prepared, hash-pinned inputs (check() re-verified them above). settings['SNAP_QCC2072_INPUTS'] = str(dest / QCC2072_INPUTS)