Commit a15aa7a3 authored by K900's avatar K900
Browse files

treewide: clean up misc OVMF.fd references

We have passthru attributes, use them.
parent bf5c44d0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ callPackage (import ./generic.nix (rec {
    ++ optional (withSeabios) "--with-system-seabios=${seabios}/share/seabios"
    ++ optional (!withInternalSeabios && !withSeabios) "--disable-seabios"

    ++ optional (withOVMF) "--with-system-ovmf=${OVMF.fd}/FV/OVMF.fd"
    ++ optional (withOVMF) "--with-system-ovmf=${OVMF.firmware}"
    ++ optional (withInternalOVMF) "--enable-ovmf";

  NIX_CFLAGS_COMPILE = toString [
+2 −2
Original line number Diff line number Diff line
@@ -61,8 +61,8 @@ stdenv.mkDerivation rec {

  postPatch = ''
    sed -i \
      -e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${OVMFFull.fd}/FV/OVMF_CODE.fd","${OVMFFull.fd}/FV/OVMF_VARS.fd" |' \
      -e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.fd}/FV/OVMF_CODE.fd","${OVMF.fd}/FV/OVMF_VARS.fd" |' \
      -e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${OVMFFull.firmware}","${OVMFFull.variables}" |' \
      -e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.firmware}","${OVMF.variables}" |' \
      -e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \
      -e 's/Icon=.*qemu.svg/Icon=qemu/' \
      quickemu
+2 −3
Original line number Diff line number Diff line
@@ -70,8 +70,8 @@ stdenv.mkDerivation

    # Patch the patch of the OVMF binaries to use paths from the nix store.
    substituteInPlace ./src/platform/backends/qemu/linux/qemu_platform_detail_linux.cpp \
      --replace "OVMF.fd" "${OVMF.fd}/FV/OVMF.fd" \
      --replace "QEMU_EFI.fd" "${OVMF.fd}/FV/QEMU_EFI.fd"
      --replace "OVMF.fd" "${OVMF.firmware}" \
      --replace "QEMU_EFI.fd" "${OVMF.firmware}"

    # Copy the grpc submodule we fetched into the source code.
    cp -r --no-preserve=mode ${grpc_src} 3rd-party/grpc
@@ -122,7 +122,6 @@ stdenv.mkDerivation
      dnsmasq
      iproute2
      iptables
      OVMF.fd
      qemu
      qemu-utils
      xterm