Skip to content

harness: Seed a CS image from a file - #532

Open
chrysh wants to merge 1 commit into
OpenPRoT:ocp-global-demo-wipfrom
9elements:cs1-seed-from-file
Open

chrysh wants to merge 1 commit into
OpenPRoT:ocp-global-demo-wipfrom
9elements:cs1-seed-from-file

Conversation

@chrysh

@chrysh chrysh commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

The QEMU runner filled each FMC backing image with a single byte, so a
test could only hand the device erased flash. A test that exercises the
update path needs the device to already hold a firmware image the update
agent can offer.

cs0_contents and cs1_contents name a file copied into the image at
offset 0; the rest stays 0xFF. Without them the fill byte behaves as
before, so flash_qemu_test and smc_read_qemu_test are unchanged.

A contents file longer than flash_size is an error rather than a
truncation. A half-written image still parses far enough to fail
verification, which would make a verify-failure scenario pass for the
wrong reason.

There is no in-tree consumer yet. This is the first of two pieces of
groundwork for a QEMU integration test driven by a software mock BMC:
a reset line, a boot-worked line, and a PLDM update agent. The builder
that makes the file is the follow-up.

Assisted-by: Claude

The QEMU runner filled each FMC backing image with one byte, so a test
could hand the device erased flash and nothing else. The integration
test needs the device to already hold a firmware image the update agent
can offer.

cs0_contents and cs1_contents name a file to copy in at offset 0; the
remainder stays 0xFF. Without them the fill byte behaves as before, so
every existing test is unchanged.

A contents file longer than flash_size is an error rather than a
truncation. A half-written image still parses far enough to fail
verification, which would make a verify-failure scenario pass for the
wrong reason.

Assisted-by: Claude

This branch has not been deployed

No deployments
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