Repository navigation
Conversation
The flasher deploy for rb3gen2-core-kit downloads the combined _build.tar and dd's it directly onto the device as a raw disk image; no separate rootfs.img is ever extracted. The postprocess step was still writing OVERLAY=overlay.tar.gz / OVERLAY_PATH=rootfs.img into flash.settings, pointing at a file that never exists, so the device flasher silently never applies the LAVA test overlay. Every job then fails at `. /lava-<job>/environment` with "No such file or directory" because the test shell environment was never placed on the target. Locate the GPT partition named "rootfs" inside the downloaded raw image via sfdisk, dd just that partition out, bake the test overlay (LAVA overlay + Test_binaries.tar.gz) into it with e2cp/e2mkdir, verify the environment file is present, then dd the partition back into place. Drop the separate overlay deploy image and the dead OVERLAY/OVERLAY_PATH/ROOTFS_IMAGE settings, since the overlay now ships pre-baked inside the flashed image. Verified end-to-end against a synthetic GPT image with a rootfs partition, using the exact ghcr.io/mwasilew/docker-mkbootimage:master postprocess container.
The clone was pointed at Manigurr/job_render but with no branch specified, so it picked up the fork's default main branch - an older, unrelated template structure that still references node.artifacts.rootfs_image. video-driver's cloudData.json never sets that key, so rendering failed with: 'dict object' has no attribute 'rootfs_image' Pin -b fix/kodiak-bake-overlay-into-rootfs, the branch with the validated fix for the missing /lava-<job>/environment overlay (see Manigurr/job_render PR qualcomm-linux/job_render#52). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…cted rootfs.img The previous version of this fix wrongly assumed flash_image was a raw GPT-partitioned disk image dd'd directly onto the device, and tried to locate a "rootfs" partition via sfdisk. Against the real rb3gen2-core-kit_build.tar this fails immediately: sfdisk: rb3gen2-core-kit_build.tar: does not contain a recognized partition table The real artifact is an actual POSIX tar archive containing Qualcomm Firehose/QDL flashing files (rawprogram*.xml, gpt_backup0.bin, xbl.elf, patch*.xml) plus a top-level rootfs.img. Extract the tar, bake the test overlay into flash_content/rootfs.img directly with e2cp/e2mkdir (no partition offset math needed), verify /lava-<job>/environment is present, then re-pack the tar with the baked rootfs.img in place of the original - preserving every other member untouched. Also reduced the postprocess timeout from 60 to 45 minutes; LAVA rejected the previous value with "Action timeout is larger than job timeout" since the overall job timeout is 50 minutes. Verified end-to-end: downloaded and inspected the real rb3gen2-core-kit_build.tar (confirmed tar format + rootfs.img member via `tar -tvf`), then validated the full extract/bake/repack flow against a synthetic tar built from the real small members plus a local ext4 rootfs.img, using the actual ghcr.io/mwasilew/docker-mkbootimage:master postprocess container. Confirmed afterward that the repacked tar still contains every original member untouched, with the overlay now present in rootfs.img.
|
Update: the original version of this PR wrongly assumed Downloaded and inspected the real artifact - it's an actual POSIX tar archive containing Qualcomm Firehose/QDL flashing files ( Pushed a corrected version: extract the tar, bake the overlay directly into Re-validated end-to-end: built a synthetic tar from the real small members (downloaded above) + a local ext4 |
Job 253378 showed the device boots cleanly from a flashed image but still hits the original missing-overlay symptom. flash-universal.sh streams the combined build tar's raw bytes directly to the board's EDL/Firehose loader (an implausibly fast single dd of the whole 3.3GB file), which almost certainly parses rootfs.img's location via the tar's byte-exact layout (rawprogram*.xml offsets). Fully re-tarring the archive after extracting everything (previous fix) can shift member order/padding/header format enough to desync that offset parsing, so our modified rootfs.img never actually reaches the device - it just boots the stale rootfs already on the rig. Fix: locate rootfs.img's exact byte offset/size inside the tar via Python's tarfile module, extract only those bytes, bake the overlay into that extracted image with e2cp/e2mkdir (ext4 images are fixed size, so this never changes the file size), then dd the baked bytes back into the original tar at the same offset with conv=notrunc. Every other byte of the tar - headers, member order, padding - stays byte-for-byte identical. Verified locally against the real postprocess container with a synthetic combined tar: confirmed byte-identical regions outside rootfs.img's data span, confirmed the rootfs.img region actually changed, and confirmed a plain `tar -xf` extraction of the patched tar yields a rootfs.img with the overlay baked in via e2ls. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Second correction: in-place byte-offset patch instead of full re-tarReal job 253378 ran with the previous fix (commit 9b15cad) and the device actually booted cleanly end-to-end — SBL/XBL/UEFI/Linux boot, login prompt reached — but hit the original symptom again: The flash step's own log gave it away: A single Fix (commit 6903943)Stop re-tarring entirely. Patch
Every other byte of the tar (headers, member order, padding, trailer) stays byte-for-byte identical to the original artifact. Local verificationBuilt a synthetic combined tar matching the real one's member layout (
Not yet verified against real hardware — that'll show in the next LAVA run. |
The rendered LAVA job's test fetch step (git-repo-action) always cloned the upstream qualcomm-linux/qcom-linux-testkit.git, so fixes made in the fork (e.g. video_detect_platform/video_validate_upstream_loaded handling for SM8750/Pakala) were never exercised by real LAVA runs - job 253377 still saw "Detected platform: unknown" and failed Video_V4L2_Runner stack-switch checks because it fetched the unpatched upstream testkit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Problem
LAVA jobs for
rb3gen2-core-kit(e.g. job 253181 on the kodiak_testingpipeline) consistently fail at:
templates/boot/flasher.jinja2downloads the combined_build.tarand the device-side flasher
dds it directly onto storage as a rawdisk image — no separate
rootfs.imgis ever extracted or producedanywhere in this flow. The postprocess step nonetheless writes:
into
flash.settings, pointing at arootfs.imgfile that neverexists. The device-side flasher has nothing to apply the overlay to,
so the LAVA test overlay (which contains the
environmentfile everylava-test-shellaction sources) silently never makes it onto thebooted device.
Fix
In the postprocess docker step:
rootfsinside the downloaded rawimage via
sfdisk -d.ddjust that partition out to its own file.Test_binaries.tar.gz) intoit with
e2mkdir/e2cp(no mount/loop devices, no extra containerprivileges needed).
/lava-<job>/environmentis present inside the partitionbefore continuing — fail fast with a clear message otherwise.
ddthe patched partition back into place at the same offset.The now-dead
overlay:deploy image andOVERLAY=/OVERLAY_PATH=/
ROOTFS_IMAGE=settings are removed, since the overlay shipspre-baked inside the single flashed image.
Testing
Validated end-to-end locally against a synthetic GPT image (boot +
rootfspartitions, matching the real device'sPARTLABEL=rootfslayout seen in the job's boot log) using the exact
ghcr.io/mwasilew/docker-mkbootimage:masterpostprocess container:container against the synthetic image + a fake LAVA overlay +
Test_binaries.tar.gz.and confirmed via
e2ls/e2cpthat/lava-<job>/environmentandthe
Test_binariespayload are both present and intact.One assumption worth a sanity check against a real
rb3gen2-core-kit_build.tarbefore merging: that its GPT partition isnamed exactly
rootfs(matchesroot=PARTLABEL=rootfsand theEXT4-fs (sda2)mount seen in job 253181's boot log).