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

minor: allow passing custom assets to start SB protected CM4 #324

Merged
merged 3 commits into from
Jun 13, 2024

Conversation

aethernet
Copy link
Contributor

@aethernet aethernet commented May 9, 2024

This PR adds the ability pass a folder with second stage boot assets as parameter when initiating usbbootscanner.

This is to allow end-user to provide config.txt and signed boot.img required to get a secureboot-enabled CM4 to attach as a mass-storage device and be reflashed.

This mostly only expose the changes made in balena-io-modules/node-raspberrypi-usbboot#53 in examples.

@aethernet aethernet force-pushed the aethernet/allow-custom-sb-assets branch 8 times, most recently from 71b05d1 to 2ef116e Compare June 7, 2024 15:20
@aethernet aethernet requested review from dfunckt and alexgg June 7, 2024 15:22
@aethernet aethernet marked this pull request as ready for review June 7, 2024 15:23
@flowzone-app flowzone-app bot enabled auto-merge June 7, 2024 15:31
Copy link

@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.

lgtm with a small nitpick - however let's wait for Akis to review.

examples/usbboot.ts Outdated Show resolved Hide resolved
@dfunckt dfunckt disabled auto-merge June 12, 2024 11:14

if (flags.help) {
console.log(
'Usage: ts-node usbboot.js --bootImageFolder <bootImageFolder> --source <image>',
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this example file meant to used directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For demo purposes mostly
I do use it (also multi-destination) as a poor man CLI

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, that's the reason I'm asking -- if it's meant to be relied upon, then it should be a proper script shipped with the package and not merely an example (which is not really maintained or tested that it works).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If your concern is that would become de-facto production, it shouldn't. We still need a proper place to hook this up (the CLI, a new etcherCLI, a proper script in this repo or somewhere else)

@dfunckt
Copy link
Contributor

dfunckt commented Jun 12, 2024

Looks good to me, once Alex's comments are addressed feel free to merge

@aethernet aethernet force-pushed the aethernet/allow-custom-sb-assets branch from 524228c to f7629d6 Compare June 12, 2024 12:37
@aethernet aethernet requested review from dfunckt and alexgg June 12, 2024 12:38
@aethernet aethernet force-pushed the aethernet/allow-custom-sb-assets branch from f7629d6 to bafb2d7 Compare June 12, 2024 14:05
@flowzone-app flowzone-app bot enabled auto-merge June 12, 2024 14:10
Copy link

@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.

Just a bunch of nitpicks so I would ask you to self approve if it was possible - let me know if they are not worth addressing and I will approve.

examples/usbboot.ts Show resolved Hide resolved
examples/scanner.ts Outdated Show resolved Hide resolved
examples/scanner.ts Outdated Show resolved Hide resolved
tests/utils.spec.ts Show resolved Hide resolved
tests/utils.spec.ts Show resolved Hide resolved
@aethernet aethernet force-pushed the aethernet/allow-custom-sb-assets branch from bafb2d7 to d13f627 Compare June 13, 2024 12:00
@alexgg alexgg self-requested a review June 13, 2024 12:11
@flowzone-app flowzone-app bot merged commit c3e3d2e into master Jun 13, 2024
47 checks passed
@flowzone-app flowzone-app bot deleted the aethernet/allow-custom-sb-assets branch June 13, 2024 12:12
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.

3 participants