Merge pull request #31151 from lheckemann/vboot-update

vboot_reference:  20130507 -> 20171023
This commit is contained in:
Jörg Thalheim 2017-11-03 00:23:57 +00:00 committed by GitHub
commit 90c92918f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,42 +1,35 @@
{ stdenv, fetchgit, pkgconfig, libuuid, openssl }:
{ stdenv, fetchgit, pkgconfig, libuuid, openssl, libyaml, lzma }:
stdenv.mkDerivation rec {
version = "20130507";
checkout = "25/50225/2";
version = "20171023";
checkout = "8122e0b8b13794";
name = "vboot_reference-${version}";
src = fetchgit {
url = https://chromium.googlesource.com/chromiumos/platform/vboot_reference;
rev = "refs/changes/${checkout}";
sha256 = "14d3a93ha5k4al4ib43nyn1ppx7kgb12xw6mkflhx8nxmx8827nc";
rev = "${checkout}";
sha256 = "0qxm3qlvm2fgjrn9b3n8rdccw2f5pdi7z542m2hdfddflx7jz1w7";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl stdenv.cc.libc.static ]
++ stdenv.lib.optional (libuuid != null)
(libuuid.overrideAttrs (attrs:
{ configureFlags = attrs.configureFlags ++ [ "--enable-static" ]; }));
buildInputs = [ openssl libuuid libyaml lzma ];
arch = if stdenv.system == "x86_64-linux" then "x86_64"
else if stdenv.system == "i686-linux" then "x86"
else throw "vboot_reference for: ${stdenv.system} not supported!";
enableParallelBuilding = true;
buildPhase = ''
make ARCH=${arch} `pwd`/build/cgpt/cgpt
make ARCH=${arch} `pwd`/build/utility/vbutil_kernel
make ARCH=${arch} `pwd`/build/utility/vbutil_key
make ARCH=${arch} `pwd`/build/utility/vbutil_keyblock
make ARCH=${arch} `pwd`/build/utility/vbutil_firmware
patchShebangs scripts
make -j''${NIX_BUILD_CORES:-1} \
`pwd`/build/cgpt/cgpt \
`pwd`/build/futility/futility
'';
installPhase = ''
mkdir -p $out/bin
cp build/cgpt/cgpt $out/bin
cp build/utility/vbutil_kernel $out/bin
cp build/utility/vbutil_key $out/bin
cp build/utility/vbutil_keyblock $out/bin
cp build/utility/vbutil_firmware $out/bin
cp build/futility/futility $out/bin
mkdir -p $out/share/vboot
cp -r tests/devkeys* $out/share/vboot/
'';
meta = {