Unverified Commit 9e354b78 authored by Jared Baur's avatar Jared Baur Committed by GitHub
Browse files

vboot_reference: 135.16209 -> 143.16463; refactor; build with flashrom; rename...

vboot_reference: 135.16209 -> 143.16463; refactor; build with flashrom; rename to vboot-utils (#418036)
parents 2dba67c6 76555292
Loading
Loading
Loading
Loading
+39 −9
Original line number Diff line number Diff line
@@ -3,29 +3,38 @@
  stdenv,
  fetchFromGitiles,
  pkg-config,
  makeBinaryWrapper,
  libuuid,
  openssl,
  libyaml,
  xz,
  flashrom,

  withFlashrom ? true,
}:

stdenv.mkDerivation {
  pname = "vboot_reference";
  version = "135.16209";
stdenv.mkDerivation (finalAttrs: {
  pname = "vboot-utils";
  version = "143.16463";

  src = fetchFromGitiles {
    url = "https://chromium.googlesource.com/chromiumos/platform/vboot_reference";
    rev = "bf4b21294a1c2c6b94f400819d3fce4a905b3afe"; # refs/heads/release-R135-16209.B
    hash = "sha256-frg7NkK173wAHJRedtbJI5jI8Kee/VkByh5DCUzD9OA=";
    rev = "refs/heads/release-R${finalAttrs.passthru.versionFormatted}.B";
    hash = "sha256-8a49xD+EYXDouFuBmLyAtPxThYET6DtKImBPzXVhpxE=";
  };

  nativeBuildInputs = [ pkg-config ];
  nativeBuildInputs = [
    pkg-config
    makeBinaryWrapper
  ];

  buildInputs = [
    libuuid
    libyaml
    openssl
    xz
  ];
  ]
  ++ lib.optional withFlashrom finalAttrs.passthru.flashromChromeos;

  enableParallelBuilding = true;

@@ -42,7 +51,7 @@ stdenv.mkDerivation {
  makeFlags = [
    "DESTDIR=$(out)"
    "HOST_ARCH=${stdenv.hostPlatform.parsed.cpu.name}"
    "USE_FLASHROM=0"
    "USE_FLASHROM=${if withFlashrom then "1" else "0"}"
    # Upstream has weird opinions about DESTDIR
    # https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/refs/heads/release-R135-16209.B/Makefile#51
    "UB_DIR=${placeholder "out"}/bin"
@@ -54,12 +63,33 @@ stdenv.mkDerivation {
  postInstall = ''
    mkdir -p $out/share/vboot
    cp -r tests/devkeys* $out/share/vboot/
  ''
  + lib.optionalString withFlashrom ''
    wrapProgram $out/bin/crossystem \
      --prefix PATH : ${lib.makeBinPath [ finalAttrs.passthru.flashromChromeos ]}
  '';

  passthru = {
    versionFormatted = lib.concatStringsSep "-" (lib.versions.splitVersion finalAttrs.version);
    flashromChromeos = flashrom.overrideAttrs (_prev: {
      src = fetchFromGitiles {
        url = "https://chromium.googlesource.com/chromiumos/third_party/flashrom";
        rev = "refs/heads/release-R${finalAttrs.passthru.versionFormatted}.B-master";
        hash = "sha256-zOoWpuS/vDLvnRPdA9FNGhNbcwh3PMQwbdfqsyqj858=";
      };

      # requires git
      mesonFlags = _prev.mesonFlags ++ [ (lib.mesonEnable "documentation" false) ];

      # requires specific hardware
      doCheck = false;
    });
  };

  meta = {
    description = "Chrome OS partitioning and kernel signing tools";
    license = lib.licenses.bsd3;
    platforms = lib.platforms.linux;
    maintainers = [ lib.maintainers.jmbaur ];
  };
}
})
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
  lzop,
  openssl,
  ubootTools,
  vboot_reference,
  vboot-utils,
  xilinx-bootgen,
  xz,
  zstd,
@@ -85,7 +85,7 @@ rec {
        lzop
        openssl
        ubootTools
        vboot_reference
        vboot-utils
        xilinx-bootgen
        xz
        zstd
+1 −0
Original line number Diff line number Diff line
@@ -1533,6 +1533,7 @@ mapAliases {
  vamp.vampSDK = throw "'vamp.vampSDK' has been renamed to/replaced by 'vamp-plugin-sdk'"; # Converted to throw 2025-10-27
  vaultwarden-vault = throw "'vaultwarden-vault' has been renamed to/replaced by 'vaultwarden.webvault'"; # Converted to throw 2025-10-27
  vbetool = throw "'vbetool' has been removed as it is broken and not maintained upstream."; # Added 2025-06-11
  vboot_reference = vboot-utils; # Added 2025-11-01
  vc_0_7 = throw "'vc_0_7' has been removed as it was broken, unused in nixpkgs and unmaintained"; # Added 2025-10-20
  vdirsyncerStable = throw "'vdirsyncerStable' has been renamed to/replaced by 'vdirsyncer'"; # Converted to throw 2025-10-27
  ventoy-bin = throw "'ventoy-bin' has been renamed to/replaced by 'ventoy'"; # Converted to throw 2025-10-27