Skip to content

Conversation

@learmj
Copy link
Collaborator

@learmj learmj commented Oct 29, 2025

Introduce schema validation of the Provisioning Map (PMAP). The schema is selected by a new base image layer config variable, with default schemas residing under layer/base/schemas/provisionmap/.

The generic post-image hook now validates the PMAP automatically on every build. This ensures the staged JSON is valid for the provisioning side to process.

Drop (now redundant) checks on some JSON objects in the pmap helper. Schema validation is performed on every invocation.

Clarify some description wording in the AB layer.
Fixup bad partition ref in the AB layer clear pmap for A.system.

@learmj
Copy link
Collaborator Author

learmj commented Oct 29, 2025

@tdewey-rpi This schema enables validation of the Provisioning Map component of the Image Description JSON (ie the part which defines how the image should be provisioned on-device).

Introduce schema validation of the Provisioning Map (PMAP). The
schema is selected by a new base image layer config variable, with
default schemas residing under layer/base/schemas/provisionmap/.

The generic post-image hook now validates the PMAP automatically
on every build. This ensures the staged JSON is valid for the
provisioning side to process.

Drop (now redundant) checks on some JSON objects in the pmap helper.
Schema validation is performed on every invocation.

Clarify some description wording in the AB layer.
Fixup bad partition ref in the AB layer clear pmap for A.system.
Update docs.
System B will be provisioned encrypted (hybrid). Development only.</td>
clear: All partitions will be provisioned unencrypted.
crypt: All partitions except <slot>:boot will be provisioned encrypted.
hybrid: B:system will be provisioned encrypted (development only).</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also consider the reverse-hybrid (read: just-what-matters), where you only encrypt the userdata partition.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. hybrid is just for testing, but I agree we probably need more granularity regarding what gets encrypted. I'll add some follow-up commits to tweaks the types of pmap that we support here.

@learmj
Copy link
Collaborator Author

learmj commented Nov 3, 2025

Hi @tdewey-rpi
Please see this add-on commit - it adds two new pmaps to cover what you mentioned above. Let me know if you'd like anything else here, or any other changes. Thanks.

Add two new PMAPs:
- cryptdata  : Only the persistent storage partition is encrypted.
- cryptslots : Only the system (OS) partition for each slot is encrypted.

Rename hybrid -> crypthybrid - this is a development-only PMAP which
encrypts B.system.

A crypt* PMAP now denotes encryption will be applied on some part of the
disk image at provisioning time.

Schema header, PMAP versions and documentation updated.
@learmj learmj merged commit 7738fc4 into raspberrypi:master Nov 3, 2025
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.

2 participants