Validate a built DDI¶
Pre-build validation¶
Runs the same package.yaml validation that buildctl build runs up front, plus backend source file presence and missing dependency checks. Does not invoke the backend. Exits non-zero if any errors are present.
See package.yaml fields for per-field rules.
Post-build validation¶
Verifies the DDI and its metadata without attaching the image. <dist-dir> is a directory containing one package's .raw and .json files.
Checks performed:
- Partition layout: opens the GPT and finds the three DPS partitions by type UUID (root, verity, verity-sig).
- Signature partition JSON: parses
{rootHash, signature, certificateFingerprint}and rejects malformed payloads. - Certificate fingerprint: SHA-256 of the DER encoding of
--certmust matchcertificateFingerprintin the signature partition. - PKCS7 signature: verifies the detached signature against the roothash using the provided certificate as the trust anchor.
- Metadata integrity: recomputes SHA-256 of the
.rawand compares it toddi_sha256in the metadata JSON.
FAIL: is printed for each failed check; Validation passed means all checks succeeded.