Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions pkgs/applications/virtualization/cbfstool/default.nix

This file was deleted.

28 changes: 0 additions & 28 deletions pkgs/tools/misc/cbmem/default.nix

This file was deleted.

104 changes: 104 additions & 0 deletions pkgs/tools/misc/coreboot-utils/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{ stdenv, fetchurl, zlib, pciutils, coreutils, acpica-tools, iasl, makeWrapper, gnugrep, gnused, file, buildEnv }:

let
version = "4.10";

meta = with stdenv.lib; {
description = "Various coreboot-related tools";
homepage = "https://www.coreboot.org";
license = licenses.gpl2;
maintainers = [ maintainers.petabyteboy ];
platforms = platforms.linux;
};

generic = { pname, path ? "util/${pname}", ... }@args: stdenv.mkDerivation (rec {
inherit pname version meta;

src = fetchurl {
url = "https://coreboot.org/releases/coreboot-${version}.tar.xz";
sha256 = "1jsiz17afi2lqg1jv6lsl8s05w7vr7iwgg86y2qp369hcz6kcwfa";
};

enableParallelBuilding = true;

postPatch = ''
cd ${path}
'';

makeFlags = [
"INSTALL=install"
"PREFIX=${placeholder "out"}"
];
} // args);

utils = {
msrtool = generic {
pname = "msrtool";
meta.description = "Dump chipset-specific MSR registers";
buildInputs = [ pciutils zlib ];
preConfigure = "export INSTALL=install";
};
cbmem = generic {
pname = "cbmem";
meta.description = "Coreboot console log reader";
};
ifdtool = generic {
pname = "ifdtool";
meta.description = "Extract and dump Intel Firmware Descriptor information";
};
intelmetool = generic {
pname = "intelmetool";
meta.description = "Dump interesting things about Management Engine";
buildInputs = [ pciutils zlib ];
};
cbfstool = generic {
pname = "cbfstool";
meta.description = "Management utility for CBFS formatted ROM images";
};
nvramtool = generic {
pname = "nvramtool";
meta.description = "Read and write coreboot parameters and display information from the coreboot table in CMOS/NVRAM";
};
superiotool = generic {
pname = "superiotool";
meta.description = "User-space utility to detect Super I/O of a mainboard and provide detailed information about the register contents of the Super I/O";
buildInputs = [ pciutils zlib ];
};
ectool = generic {
pname = "ectool";
meta.description = "Dump the RAM of a laptop's Embedded/Environmental Controller (EC)";
meta.platforms = [ "x86_64-linux" "i686-linux" ];
preInstall = "mkdir -p $out/sbin";
};
inteltool = generic {
pname = "inteltool";
meta.description = "Provides information about Intel CPU/chipset hardware configuration (register contents, MSRs, etc)";
buildInputs = [ pciutils zlib ];
};
amdfwtool = generic {
pname = "amdfwtool";
meta.description = "Create AMD firmware combination";
installPhase = "install -Dm755 amdfwtool $out/bin/amdfwtool";
};
acpidump-all = generic {
pname = "acpidump-all";
path = "util/acpi";
meta.description = "Walk through all ACPI tables with their addresses";
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = "install -Dm755 acpidump-all $out/bin/acpidump-all";
postFixup = let
binPath = [ coreutils acpica-tools iasl gnugrep gnused file ];
in "wrapProgram $out/bin/acpidump-all --set PATH ${stdenv.lib.makeBinPath binPath}";
};
};

in utils // {
coreboot-utils = (buildEnv {
name = "coreboot-utils-${version}";
paths = stdenv.lib.attrValues utils;
postBuild = "rm -rf $out/sbin";
}) // {
inherit meta version;
};
}
28 changes: 0 additions & 28 deletions pkgs/tools/misc/ifdtool/default.nix

This file was deleted.

32 changes: 0 additions & 32 deletions pkgs/tools/misc/intelmetool/default.nix

This file was deleted.

34 changes: 0 additions & 34 deletions pkgs/tools/misc/nvramtool/default.nix

This file was deleted.

24 changes: 14 additions & 10 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,20 @@ in

corebird = callPackage ../applications/networking/corebird { };

inherit (callPackage ../tools/misc/coreboot-utils { })
msrtool
cbmem
ifdtool
intelmetool
cbfstool
nvramtool
superiotool
ectool
inteltool
amdfwtool
acpidump-all
coreboot-utils;

corosync = callPackage ../servers/corosync { };

cowsay = callPackage ../tools/misc/cowsay { };
Expand Down Expand Up @@ -11353,8 +11367,6 @@ in

ilmbase = callPackage ../development/libraries/ilmbase { };

intelmetool = callPackage ../tools/misc/intelmetool { };

imlib = callPackage ../development/libraries/imlib {
libpng = libpng12;
};
Expand Down Expand Up @@ -14978,14 +14990,6 @@ in

seabios = callPackage ../applications/virtualization/seabios { };

cbfstool = callPackage ../applications/virtualization/cbfstool { };

ifdtool = callPackage ../tools/misc/ifdtool { };

cbmem = callPackage ../tools/misc/cbmem { };

nvramtool = callPackage ../tools/misc/nvramtool { };

vmfs-tools = callPackage ../tools/filesystems/vmfs-tools { };

pgbouncer = callPackage ../servers/sql/pgbouncer { };
Expand Down