-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
ovmf: expose EFI prefixes and refactor qemu-vm with it #187887
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks!
dd6522f
to
62e78d3
Compare
Could you add some tests to I assume we already have tests for this, but I don't know. |
We do not have direct tests for this, except that using EFI in NixOS tests are using ovmf (and then edk2) indirectly, would you like me to add the indirect tests? |
62e78d3
to
c91d071
Compare
OfBorg doesn't seem to pick up on the lowercase commit message prefix. @ofborg build OVMF OVMF.passthru.tests |
@roberth unclear if https://logs.nix.ci/?key=nixos/nixpkgs.187887&attempt_id=a3efc083-4804-4b47-b326-aef7d9d3c51b is a failure or not to me. |
It's a clean refactor producing the exact same derivation, so the problem isn't caused by this PR. |
Description of changes
In summary:
mkDerivation
supports functional-stylemkDerivation
;passthru
asfirmware
andvariables
virtualisation/qemu-vm
uses it to pass them in the machinery, consolidating it ;How to test this? :
nix-build nixos/tests/systemd-boot.nix -A basic
, it if works, then QEMU's EFI still works fine. :)It is pretty common to require the EFI firmware and variables of OVMF, this exposes it in
passthru
as suggested by @roberth on Matrix.qemu-vm
can be refactored with this, showing an example of usage.This makes it easier to consolidate and add new architectures that OVMF supports, e.g. RISC-V, Raspberry Pi, etc.
I tested
systemd-boot.basic
test with this, which relies on EFI, so it should have tested this part of the code.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes