Commit Graph

92 Commits

Author SHA1 Message Date
Paul Meyer
3172f85a7e OVMF: ship qemu firmware descriptors
These can be used by libvirt or systemd-vmspawn to discover available
firmware.

Signed-off-by: Paul Meyer <katexochen0@gmail.com>
2026-07-07 13:25:59 +02:00
Raito Bezarius
6a63a4ad8b pkgs/*: drop maintenanceship of various packages
I have effectively renounced on maintaining all these packages and I do
not plan to return them except if I'm forced to.

I am also fine with most of these packages being dropped for next
releases if no maintainer shows up.

Change-Id: I8d167c8029b6991181bd7a094af21c3313af2b51
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-24 20:34:45 +02:00
Cheng Shao
85e0d4ddff OVMFFull: fix build on aarch64-darwin 2026-04-24 16:54:59 +02:00
sanana
e402bfe2c0 OVMF: disable hardening option "relro" on aarch64
This option doesn't work with aarch64-elf toolchain for some reason. All
other *-elf toolchains are just fine.
2026-01-17 12:46:29 -05:00
Gaël James
0e74d2b64c tree-wide: fetchgit, fetchFromGitHub, fetchFromGitLab, fetchFromGitea, fetchFromBitbucket, fetchFromSourcehut: use tag = instead of rev = refs/tags/... 2026-01-15 18:27:42 +01:00
Martin Joerg
45788a75f5 OVMF: drop i686 support
Upstream has dropped IA-32 support in OVMF starting with 202511.
https://github.com/tianocore/edk2/pull/11442
2025-12-29 12:21:10 +00:00
Adam C. Stephens
d41f19d0a8 OVMF: include UninstallMemAttrProtocol patch (#420069) 2025-09-18 13:03:19 +00:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
nat
11b932cb61 OVMF: include UninstallMemAttrProtocol patch 2025-06-26 01:20:47 +02:00
Martin Joerg
6d53dfcd45 OVMFFull: debian-edk-src: 2024.05-1 -> 2025.02-8
This contains a patch required to build using Python 3.13, no other changes are relevant for our usage.
ba55ec3c53
2025-06-02 15:48:53 +00:00
Peder Bergebakken Sundt
5aba99242e treewide: fix typos in comments
Made with

```shell
git restore .
fd '\.nix$' pkgs/ --type f -j1 -x bash -xc "$(cat <<"EOF"
    typos --no-check-filenames --write-changes "$1"
    git diff --exit-code "$1" && exit
    #( git diff "$1" | grep -qE "^\+ +[^# ]") && git restore "$1"
    count1="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> ' | wc -l )"
    count2="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> (<span style="color:#f8f8f2;"> *</span>)?<span style="color:#75715e;">.*</span>$' | wc -l )"
    [[ $count1 -ne $count2 ]] && git restore "$1"
EOF
)" -- {}
```

and filtered with `GIT_DIFF_OPTS='--unified=15' git -c interactive.singleKey=true add --patch`

I initially tried using the tree-sitter cli, python bindings and even ast-grep through various means, but this is what I ended up with.
2025-02-24 10:44:41 +01:00
Fernando Rodrigues
4efb8f08d9 OVMF: add passthru.mergedFirmware parameter
This is the final firmware blob that's expected by hypervisors, like Xen.
The `passthru.firmware` attribute refers to the OVMF_CODE.fd blob, which
is not aligned properly and exceeds the BIOS boundaries set by Xen.
See #373416 and https://www.mail-archive.com/xen-devel@lists.xen.org/msg118481.html

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2025-01-13 21:29:12 +00:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Fernando Rodrigues
4a972e3115 OVMF: add sigmasquadron as co-maintainer
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2024-11-23 20:13:42 -03:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
sanana
4074fbdc6c OVMF: build for loongarch64
Now that the edk2 package has support for loongarch64, this patch
enables building OVMF for loongarch64.
2024-09-02 11:49:00 +03:00
sanana
b5fecd5cfc OVMF: fix building for riscv64 2024-09-02 09:09:05 +02:00
Martin Joerg
d8c8c8f527 OVMFFull: expose variablesMs similar to firmware and variables 2024-08-27 15:14:52 +00:00
Martin Joerg
ab9a643c0d OVMFFull: update debian source to 2024.05-1 2024-08-27 15:14:51 +00:00
Martin Joerg
2dc6d27d8a OVMFFull: switch debian source to GitLab
The referenced archive is no longer available.
2024-08-27 15:14:51 +00:00
Martin Joerg
27627a34cc OVMFFull: fix build on Darwin
edk2-vars-generator might fail on Darwin due to passing an incompatible locale to mtools.
LC_ALL=C attempts to bypass this issue.
2024-08-27 15:14:51 +00:00
Martin Joerg
aea24a3839 OVMF: enable compilation using Clang
Disable -Wno-unneeded-internal-declaration causing the build to fail due to -Wall with Clang.
2024-08-27 15:14:51 +00:00
Martin Joerg
960e0694d9 edk2, edk2-uefi-shell, OVMF: add mjoerg as maintainer 2024-08-27 15:14:51 +00:00
Adam Stephens
3933d4a0da OVMF: fix eval/build on i686 2024-06-04 00:05:13 -04:00
Astro
17afbb81db OVMF-cloud-hypervisor: init 2024-04-18 21:05:58 +02:00
Raito Bezarius
99cf2d1e88 OVMF: remove invalid assert on SMM
Someone seems to believe that SMM implies x86, this is wrong.
aarch64 supports SMM too, see upstream QEMU code.

The proper way to do this is to signal support via QEMU itself, this is something
we cannot do because we have no way to communicate QEMU support itself (yet?).

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-03-01 23:40:36 +01:00
Adam Stephens
4631f2e1ed OVMF: remove CSM support
Upstream removed this support in edk2 202402
2024-02-27 20:39:11 -05:00
Shea Levy
6edee624d0 OVMF: Restore installation of OVMF.fd.
I accidentally removed this in f6fc51d (I missed the leading comma on
line 160), which was merged as part of #284874

This should be removed eventually, but it should be done intentionally
with proper release notes.
2024-02-26 07:55:55 -05:00
Shea Levy
88a1349dfe OVMF: Enable bundling the MS secure boot variables on aarch64. 2024-02-16 08:27:37 -05:00
Shea Levy
f6fc51dc9f OVMF: Clean up platform-specific code. 2024-02-16 06:58:39 -05:00
Shea Levy
9188bb5186 OVMF: Add test with secure boot enabled
Co-authored-by: Arthur Gautier <arthur.gautier@arista.com>
2024-02-15 12:13:05 -05:00
Shea Levy
4673ad7254 OVMF: Enable building an NVRAM variables template with MSFT keys. 2024-02-15 12:12:54 -05:00
Shea Levy
d68a84a55a OVMF: Use larger flash size with secure boot.
Debian claims the default is too small.
2024-02-15 11:07:56 -05:00
Shea Levy
0703a70295 OVMF: Expose flag to require SMM with secure boot 2024-02-15 11:07:55 -05:00
Raito Bezarius
75b67b0de8 OVMF: support riscv64 suffix
It was forgot in the previous attempt to bring up RISC V UEFI.
2023-12-27 23:09:05 +01:00
Anderson Torres
d5c17b3c47 ovmf: fixup seabios location
Since it is now on `${seabios}/share/seabios`.
2023-12-11 08:22:52 -03:00
Raito Bezarius
b0eed3a0ac OVMF: mark broken on Darwin
https://hydra.nixos.org/build/241925714/nixlog/2
2023-11-25 13:13:24 +01:00
Raito Bezarius
db9b8f36df OVMF: support RISC-V
Built according to https://github.com/tianocore/edk2/tree/master/OvmfPkg/RiscVVirt
and 884f2fa7ed.
2023-11-25 13:12:30 +01:00
Raito Bezarius
770194fac1 OVMF: disable sourceDebug by default
`sourceDebug` enables a source-level debugger agent inside the UEFI code
that can be leveraged via a certain bus (USB or serial for example) to debug the platform.

See: https://github.com/tianocore/tianocore.github.io/wiki/SourceLevelDebugPkg for more information.
`sourceDebug` is almost something you never want when you debug UEFI in a virtual machine.

Debugging with GDB can be achieved via: https://github.com/tianocore/tianocore.github.io/wiki/How-to-debug-OVMF-with-QEMU-using-GDB.
2023-11-25 12:49:21 +01:00
Adam Stephens
36d3be1707 ovmf: add adamcstephens as maintainer 2023-07-27 17:44:12 -04:00
Adam Stephens
8d08370a41 ovmf: add support for 4MB flash image 2023-07-27 17:42:38 -04:00
Raito Bezarius
c449133f88 ovmf: support debugging 2023-04-26 18:31:57 +02:00
Raito Bezarius
70ae9b5943 ovmf: add TLS support 2023-04-26 18:31:19 +02:00
Raito Bezarius
9e7091bc65 ovmf: enable IPv6 by default
> At its meeting on 21 April 2023, the RIPE NCC Executive Board resolved to suspend the ability of RIPE NCC members to submit new applications to the IPv4 waiting list until further notice.

It's time enough to start using IPv6 everywhere, including UEFI.
2023-04-26 18:30:32 +02:00
Weijia Wang
ff8061e062 OVMF: fix build on x86_64-darwin 2023-04-18 13:27:00 +03:00
Artturin
226e149145 treewide: env.NIX_CFLAGS_COMPILE use optionalString instead of optional
env values must be strings
2023-02-22 21:23:05 +02:00
Artturin
f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
Alyssa Ross
cc06a391ad OVMF: add 32-bit ARM support
Smoke tested in qemu.
2023-01-06 17:43:06 +00:00
Alyssa Ross
a7a79b12eb OVMF: inherit platforms from edk2
AFAICT OVMF runs on all EDK II platforms.
2023-01-06 17:43:06 +00:00
Alyssa Ross
247086c9e9 OVMF: add suffix for i686
This fixes eval of the ZFS NixOS tests on i686.

Fixes: 22b6f785a7 ("nixos/tests/zfs: Represent real world usage better")
2022-12-29 22:34:18 +00:00