Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: enable secure boot provisioning of cm4 #3444

Closed
wants to merge 2 commits into from

Conversation

rcooke-warwick
Copy link
Contributor

@rcooke-warwick rcooke-warwick commented Jun 11, 2024

Enables the secure boot provisioning of cm4

It was difficult to come up with something more generalised due to not having many examples to work with. Requires the following PRs to work:

It also requires copying the secure-boot-msd folder into the suites directory before running the tests - either in the jenkins config scripts or manually if running locally

Also required, as shown in the changes to the leviathan config.js in this PR , you must add artifacts: <name of the artifact folder in your config.js. So for example, if you have copied secure-boot-msd into your suites folder, then you must add artifacts: 'secure-boot-msd' . This will send the entire contents of that folder to the worker, placing them in the worker /data volume for use by the autokit (or whatever else is desired)

notes on flashing:

  • currently un-tested with locking the CM
  • don't be alarmed if the suite gets stuck either trying to find the worker or trying to execute a command over SSH after flashing is "done" - after flashing and powering on the cm4 runs the flasher image first to flash itself, then reboots into the normal image and then operates normally.

Contributor checklist

Reviewer Guidelines

  • When submitting a review, please pick:
    • 'Approve' if this change would be acceptable in the codebase (even if there are minor or cosmetic tweaks that could be improved).
    • 'Request Changes' if this change would not be acceptable in our codebase (e.g. bugs, changes that will make development harder in future, security/performance issues, etc).
    • 'Comment' if you don't feel you have enough information to decide either way (e.g. if you have major questions, or you don't understand the context of the change sufficiently to fully review yourself, but want to make a comment)

@rcooke-warwick rcooke-warwick marked this pull request as draft June 11, 2024 12:15
Copy link
Contributor

@alexgg alexgg left a comment

Choose a reason for hiding this comment

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

I think we should not make the artifacts directory a secure boot only tool - what do you think?

tests/suites/os/suite.js Outdated Show resolved Hide resolved
tests/suites/os/suite.js Outdated Show resolved Hide resolved
tests/suites/config.js Outdated Show resolved Hide resolved
@rcooke-warwick rcooke-warwick force-pushed the ryan/cm4-sb branch 2 times, most recently from 92a14f7 to 465057c Compare June 14, 2024 14:25
@rcooke-warwick rcooke-warwick force-pushed the ryan/cm4-sb branch 3 times, most recently from 939595f to fbbbe0b Compare June 14, 2024 14:50
Change-type: patch
Signed-off-by: Ryan Cooke <ryan@balena.io>
…tegrity

Change-type: patch
Signed-off-by: Ryan Cooke <ryan@balena.io>
@alexgg
Copy link
Contributor

alexgg commented Jun 17, 2024

I have rebased these changes onto https://github.com/balena-os/meta-balena/pull/3436/commits

@alexgg alexgg closed this Jun 17, 2024
@alexgg
Copy link
Contributor

alexgg commented Jun 17, 2024

Also, all mentioned required PRs have already been merged.

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