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

Add target for rpi disk #1859

Merged
merged 3 commits into from
Nov 29, 2023
Merged

Add target for rpi disk #1859

merged 3 commits into from
Nov 29, 2023

Conversation

frelon
Copy link
Contributor

@frelon frelon commented Nov 21, 2023

This commit adds a flavor for tumbleweed raspberry pi image that uses a after-disk hook to copy firmware into the EFI partition.

@frelon frelon force-pushed the build-disk-rpi branch 2 times, most recently from 5f557a8 to 9e1b93a Compare November 21, 2023 12:57
Dockerfile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6358862) 75.29% compared to head (d2360a1) 75.30%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1859      +/-   ##
==========================================
+ Coverage   75.29%   75.30%   +0.01%     
==========================================
  Files          67       67              
  Lines        6825     6828       +3     
==========================================
+ Hits         5139     5142       +3     
  Misses       1315     1315              
  Partials      371      371              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@frelon frelon marked this pull request as ready for review November 23, 2023 10:22
@frelon frelon requested a review from a team as a code owner November 23, 2023 10:22
Copy link
Contributor

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

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

I'd leave the build-hooks flag change out of this PR and eventually make a follow up PR to better manage and handle this use case including build, install, upgrade and reset commands or any command that makes use of the hooks concept.

@@ -105,7 +105,8 @@ func NewBuildDisk(root *cobra.Command, addCheckRoot bool) *cobra.Command {
c.Flags().Bool("expandable", false, "Creates an expandable image including only the recovery image")
c.Flags().Bool("unprivileged", false, "Makes a build runnable within a non-privileged container, avoids mounting filesystems (experimental)")
c.Flags().VarP(imgType, "type", "t", "Type of image to create")
c.Flags().StringSliceP("cloud-init", "c", []string{}, "Cloud-init config files")
c.Flags().StringSliceP("cloud-init", "c", []string{}, "Cloud-init config files to include in disk")
c.Flags().StringSlice("build-hooks", []string{}, "Paths to cloud-init config files to run during build")
Copy link
Contributor

Choose a reason for hiding this comment

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

This rename is not enough, it should be adapted within the pkg/types/v1/config.go at DiskSpec definition too.

Note for later. I am also wondering if shouldn't we make this change consistent to all commands and then have install-hooks, upgrade-hooks, reset-hooks flags.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I brought back the cloud-init-paths for now since it is needed for this PR to produce a bootable rpi disk.

I also think we should rework the hooks in a follow up PR 👍

This commit adds a flavor for tumbleweed raspberry pi image that uses a
after-disk hook to copy firmware into the EFI partition.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
Copy link
Contributor

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

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

Awesome 👍

@frelon frelon enabled auto-merge (squash) November 29, 2023 12:35
@frelon frelon merged commit d2d2889 into rancher:main Nov 29, 2023
14 checks passed
@frelon frelon deleted the build-disk-rpi branch December 12, 2023 14:04
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.

4 participants