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

bin/generate-zbm: use objcopy procedure from mkinitcpio #509

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

zdykstra
Copy link
Member

This is a direct clone of the process/steps used by mkinitcpio. It's been tested locally with the Gummiboot stub and the most recent stub available on Arch; both are able to boot a test VM. Pending further review, I'll clean up the commits and add a larger degree of comments on what is happening. There's been minimal error handling added to this.

Comments/testing/nits welcome.

Closes #503

@ahesford
Copy link
Member

The global state bothers me. What about making these functions take as inputs the current offset as well as the alignment?

@zdykstra
Copy link
Member Author

It shouldn't be too bad to pass those refs around. I'll make that change tomorrow.

@ahesford
Copy link
Member

I hear Perl supports classes now. 🤔

@zdykstra
Copy link
Member Author

I hear Perl supports classes now. 🤔

😆

Copy link
Member

@ahesford ahesford left a comment

Choose a reason for hiding this comment

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

It doesn't have freaking awesome classes, but this looks good to me.

Newer versions of the EFI stub provided by systemd-boot are incompatible
with the method used by generate-zbm to add sections to the output
bundle. mkinitcpio uses a process that evaluates the sizes of each
component being combined into the EFI bundle and adjusts their section
VMA accordingly.

This has been tested with the latest systemd-boot EFI stub and the most
recent Gummiboot EFI stub.
@zdykstra zdykstra merged commit 0893838 into master Oct 24, 2023
3 checks passed
@zdykstra zdykstra deleted the lawd-i-am-dewy branch October 24, 2023 15:13
@gardar
Copy link
Contributor

gardar commented Oct 24, 2023

Any chance we could get a new release published with this?

@zdykstra
Copy link
Member Author

zdykstra commented Oct 24, 2023

Yes, there will likely be a release tagged tonight. If you'd like to test the patched bin/generate-zbm on your local Arch system with the default Arch-provided EFI stub, I'd appreciate the feedback.

Edit: That is, test prior to a release being tagged.

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.

[support] generate-zbm doesn't create bootable EFI
3 participants