-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
edk2: Support build on macOS #85603
edk2: Support build on macOS #85603
Conversation
In order to use OVMF firmware with e.g. qemu on macOS, these packages needed to be made macOS ready. This meant choosing the clang build in this case, because it is the only one working on macOS. Unfortunately, just using clang on all platforms doesn't work because there are hardcoded assumptions in the edk2 build system.
Tested this on Mac, LGTM. |
@Mic92 can you have another look please? |
@GrahamcOfBorg build edk2 |
@@ -57,6 +57,6 @@ edk2.mkDerivation projectDscPath { | |||
description = "Sample UEFI firmware for QEMU and KVM"; | |||
homepage = https://github.com/tianocore/tianocore.github.io/wiki/OVMF; |
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.
Please put the URL in the homepage
field into quotes (RFC45).
@@ -38,15 +63,15 @@ edk2 = stdenv.mkDerivation { | |||
|
|||
enableParallelBuilding = true; | |||
|
|||
meta = with stdenv.lib; { | |||
meta = with lib; { | |||
description = "Intel EFI development kit"; | |||
homepage = https://sourceforge.net/projects/edk2/; |
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.
Please put the URL in the homepage
field into quotes (RFC45).
Result of |
Motivation for this change
Booting qemu tests with OVMF firmware on macOS requires the firmware files provided by these packages. With this change, the package builds out of the box. My first attempt was to use clang everywhere, but unfortunately, there are some assumptions in the edk2 build system that caused the clang build on Linux to fail.
Note: There seems to be an issue with temporary directories (AF_UNIX path name too long) on macOS, I had to run
TMPDIR=/tmp nix-build default.nix -A OVMF
.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)