-
Notifications
You must be signed in to change notification settings - Fork 28
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 EFI support #18
Merged
Merged
Add EFI support #18
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The most notable change is that it now exposes types implementing net.Conn/net.Listener instead of having to use ConnectForPort() and SetListenerFor() and then wrap these into net.Conn/net.Listener implementations.
The next commits will add EFI support which will be a different implementation of this new Bootloader interface.
This will remove the need for providing a kernel/initrd/kernel parameters when booting a linux VM.
The command line args were registered in cmd/vfkit/. Now that we have a cmdline package, we can move this definition there.
pflag parses string slices uses encoding/csv. This has one annoying limitation, it does not handle '--arg foo="a,b"', it returns an error about quote issues. Since I'd like to use a syntax like: --bootloader linux,cmdline="quiet console=ttyS0,115200" in vfkit, this commit is adding a string slice implementation which does not have this limitation when parsing. One thing which is not handled is \" to have quotes inside quotes.
This supersedes --kernel, --initrd, --kernel-cmdline as --bootloader will allow to use either a linux bootloader (with separate kernel, initrd and kernel command line) or an EFI bootloader. The legacy parameters are still available for now.
6 tasks
praveenkumar
reviewed
Dec 1, 2022
praveenkumar
reviewed
Dec 1, 2022
cfergeau
force-pushed
the
efi
branch
2 times, most recently
from
December 1, 2022 08:46
8638bb4
to
51b61bf
Compare
This allows applications using vfkit go bindings to start a VM using EFI.
/lgtm |
praveenkumar
approved these changes
Dec 1, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for EFI for linux virtual machines
https://developer.apple.com/documentation/virtualization/vzefibootloader?language=objc
This allows to boot directly from a disk image without the need for an external kernel/initrd.
This requires macOS 13.
This is done with a new --bootloader option which replaces the (now legacy)
--kernel/--initrd/--kernel-cmdline parameters.