git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #67836 from petabyteboy/feature/corebootutils

coreboot-utils: init at 4.10

commit62973ddc079889e54af76efeaf61873d393cd54b authorworldofpeace <worldofpeace@protonmail.ch> dateTue 3 Sep 2019, 11:54 (7 years ago) parentd7bbcdfd977d48
7 files changed+118−167
pkgs/applications/virtualization/cbfstool/default.nix−35 pkgs/tools/misc/cbmem/default.nix−28 pkgs/tools/misc/coreboot-utils/default.nix+104 pkgs/tools/misc/ifdtool/default.nix−28 pkgs/tools/misc/intelmetool/default.nix−32 pkgs/tools/misc/nvramtool/default.nix−34 pkgs/top-level/all-packages.nix+14−10
pkgs/applications/virtualization/cbfstool/default.nixdeleted−35
@@ -1,35 +0,0 @@
1−{ stdenv, fetchurl, iasl, flex, bison }:
2−
3−stdenv.mkDerivation rec {
4− pname = "cbfstool";
5− version = "4.9";
6−
7− src = fetchurl {
8− url = "https://coreboot.org/releases/coreboot-${version}.tar.xz";
9− sha256 = "0xkai65d3z9fivwscbkm7ndcw2p9g794xz8fwdv979w77n5qsdij";
10− };
11−
12− nativeBuildInputs = [ flex bison ];
13− buildInputs = [ iasl ];
14−
15− buildPhase = ''
16− export LEX=${flex}/bin/flex
17− make -C util/cbfstool
18− '';
19−
20− installPhase = ''
21− mkdir -p $out/bin
22− cp util/cbfstool/cbfstool $out/bin
23− cp util/cbfstool/fmaptool $out/bin
24− cp util/cbfstool/rmodtool $out/bin
25− '';
26−
27− meta = with stdenv.lib; {
28− description = "Management utility for CBFS formatted ROM images";
29− homepage = https://www.coreboot.org;
30− license = licenses.gpl2;
31− maintainers = [ maintainers.tstrobel ];
32− platforms = platforms.linux;
33− };
34−}
35−
pkgs/tools/misc/cbmem/default.nixdeleted−28
@@ -1,28 +0,0 @@
1−{ stdenv, fetchurl }:
2−
3−stdenv.mkDerivation rec {
4− pname = "cbmem";
5− version = "4.9";
6−
7− src = fetchurl {
8− url = "https://coreboot.org/releases/coreboot-${version}.tar.xz";
9− sha256 = "0xkai65d3z9fivwscbkm7ndcw2p9g794xz8fwdv979w77n5qsdij";
10− };
11−
12− buildPhase = ''
13− make -C util/cbmem
14− '';
15−
16− installPhase = ''
17− install -Dm755 util/cbmem/cbmem $out/bin/cbmem
18− '';
19−
20− meta = with stdenv.lib; {
21− description = "Read coreboot timestamps and console logs";
22− homepage = "https://www.coreboot.org";
23− license = licenses.gpl2;
24− maintainers = [ maintainers.petabyteboy ];
25− platforms = platforms.linux;
26− };
27−}
28−
pkgs/tools/misc/coreboot-utils/default.nixnew file+104
@@ -0,0 +1,104 @@
1+{ stdenv, fetchurl, zlib, pciutils, coreutils, acpica-tools, iasl, makeWrapper, gnugrep, gnused, file, buildEnv }:
2+
3+let
4+ version = "4.10";
5+
6+ meta = with stdenv.lib; {
7+ description = "Various coreboot-related tools";
8+ homepage = "https://www.coreboot.org";
9+ license = licenses.gpl2;
10+ maintainers = [ maintainers.petabyteboy ];
11+ platforms = platforms.linux;
12+ };
13+
14+ generic = { pname, path ? "util/${pname}", ... }@args: stdenv.mkDerivation (rec {
15+ inherit pname version meta;
16+
17+ src = fetchurl {
18+ url = "https://coreboot.org/releases/coreboot-${version}.tar.xz";
19+ sha256 = "1jsiz17afi2lqg1jv6lsl8s05w7vr7iwgg86y2qp369hcz6kcwfa";
20+ };
21+
22+ enableParallelBuilding = true;
23+
24+ postPatch = ''
25+ cd ${path}
26+ '';
27+
28+ makeFlags = [
29+ "INSTALL=install"
30+ "PREFIX=${placeholder "out"}"
31+ ];
32+ } // args);
33+
34+ utils = {
35+ msrtool = generic {
36+ pname = "msrtool";
37+ meta.description = "Dump chipset-specific MSR registers";
38+ buildInputs = [ pciutils zlib ];
39+ preConfigure = "export INSTALL=install";
40+ };
41+ cbmem = generic {
42+ pname = "cbmem";
43+ meta.description = "Coreboot console log reader";
44+ };
45+ ifdtool = generic {
46+ pname = "ifdtool";
47+ meta.description = "Extract and dump Intel Firmware Descriptor information";
48+ };
49+ intelmetool = generic {
50+ pname = "intelmetool";
51+ meta.description = "Dump interesting things about Management Engine";
52+ buildInputs = [ pciutils zlib ];
53+ };
54+ cbfstool = generic {
55+ pname = "cbfstool";
56+ meta.description = "Management utility for CBFS formatted ROM images";
57+ };
58+ nvramtool = generic {
59+ pname = "nvramtool";
60+ meta.description = "Read and write coreboot parameters and display information from the coreboot table in CMOS/NVRAM";
61+ };
62+ superiotool = generic {
63+ pname = "superiotool";
64+ 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";
65+ buildInputs = [ pciutils zlib ];
66+ };
67+ ectool = generic {
68+ pname = "ectool";
69+ meta.description = "Dump the RAM of a laptop's Embedded/Environmental Controller (EC)";
70+ meta.platforms = [ "x86_64-linux" "i686-linux" ];
71+ preInstall = "mkdir -p $out/sbin";
72+ };
73+ inteltool = generic {
74+ pname = "inteltool";
75+ meta.description = "Provides information about Intel CPU/chipset hardware configuration (register contents, MSRs, etc)";
76+ buildInputs = [ pciutils zlib ];
77+ };
78+ amdfwtool = generic {
79+ pname = "amdfwtool";
80+ meta.description = "Create AMD firmware combination";
81+ installPhase = "install -Dm755 amdfwtool $out/bin/amdfwtool";
82+ };
83+ acpidump-all = generic {
84+ pname = "acpidump-all";
85+ path = "util/acpi";
86+ meta.description = "Walk through all ACPI tables with their addresses";
87+ nativeBuildInputs = [ makeWrapper ];
88+ dontBuild = true;
89+ installPhase = "install -Dm755 acpidump-all $out/bin/acpidump-all";
90+ postFixup = let
91+ binPath = [ coreutils acpica-tools iasl gnugrep gnused file ];
92+ in "wrapProgram $out/bin/acpidump-all --set PATH ${stdenv.lib.makeBinPath binPath}";
93+ };
94+ };
95+
96+in utils // {
97+ coreboot-utils = (buildEnv {
98+ name = "coreboot-utils-${version}";
99+ paths = stdenv.lib.attrValues utils;
100+ postBuild = "rm -rf $out/sbin";
101+ }) // {
102+ inherit meta version;
103+ };
104+}
pkgs/tools/misc/ifdtool/default.nixdeleted−28
@@ -1,28 +0,0 @@
1−{ stdenv, fetchurl }:
2−
3−stdenv.mkDerivation rec {
4− pname = "ifdtool";
5− version = "4.9";
6−
7− src = fetchurl {
8− url = "https://coreboot.org/releases/coreboot-${version}.tar.xz";
9− sha256 = "0xkai65d3z9fivwscbkm7ndcw2p9g794xz8fwdv979w77n5qsdij";
10− };
11−
12− buildPhase = ''
13− make -C util/ifdtool
14− '';
15−
16− installPhase = ''
17− install -Dm755 util/ifdtool/ifdtool $out/bin/ifdtool
18− '';
19−
20− meta = with stdenv.lib; {
21− description = "Extract and dump Intel Firmware Descriptor information";
22− homepage = https://www.coreboot.org;
23− license = licenses.gpl2;
24− maintainers = [ maintainers.petabyteboy ];
25− platforms = platforms.linux;
26− };
27−}
28−
pkgs/tools/misc/intelmetool/default.nixdeleted−32
@@ -1,32 +0,0 @@
1−{ stdenv, fetchgit, zlib, pciutils }:
2−
3−stdenv.mkDerivation rec {
4− pname = "intelmetool";
5− version = "4.8.1";
6−
7− src = fetchgit {
8− url = "https://review.coreboot.org/coreboot.git";
9− rev = version;
10− sha256 = "1gjisy9b7vgzjvy1fwaqhq3589yd59kkylv7apjmg5r2b3dv4zvr";
11− fetchSubmodules = false;
12− };
13−
14− buildInputs = [ zlib pciutils ];
15−
16− buildPhase = ''
17− make -C util/intelmetool
18− '';
19−
20− installPhase = ''
21− mkdir -p $out/bin
22− cp util/intelmetool/intelmetool $out/bin
23− '';
24−
25− meta = with stdenv.lib; {
26− description = "Dump interesting things about Management Engine";
27− homepage = https://www.coreboot.org/Nvramtool;
28− license = licenses.gpl2;
29− maintainers = [ maintainers.gnidorah ];
30− platforms = platforms.linux;
31− };
32−}
pkgs/tools/misc/nvramtool/default.nixdeleted−34
@@ -1,34 +0,0 @@
1−{ stdenv, fetchgit, iasl, flex, bison }:
2−
3−stdenv.mkDerivation rec {
4− pname = "nvramtool";
5− version = "4.8.1";
6−
7− src = fetchgit {
8− url = "http://review.coreboot.org/p/coreboot";
9− rev = "refs/tags/${version}";
10− sha256 = "0nrf840jg4fn38zcnz1r10w2yfpvrk1nvsrnbbgdbgkmpjxz0zw9";
11− };
12−
13− nativeBuildInputs = [ flex bison ];
14− buildInputs = [ iasl ];
15−
16− buildPhase = ''
17− export LEX=${flex}/bin/flex
18− make -C util/nvramtool
19− '';
20−
21− installPhase = ''
22− mkdir -p $out/bin
23− cp util/nvramtool/nvramtool $out/bin
24− '';
25−
26− meta = with stdenv.lib; {
27− description = "utility for reading/writing coreboot parameters and displaying information from the coreboot table in CMOS/NVRAM";
28− homepage = https://www.coreboot.org/Nvramtool;
29− license = licenses.gpl2;
30− maintainers = [ maintainers.cryptix ];
31− platforms = platforms.linux;
32− };
33−}
34−
pkgs/top-level/all-packages.nix+14−10
@@ -1394,6 +1394,20 @@ in
13941394
13951395 corebird = callPackage ../applications/networking/corebird { };
13961396
1397+ inherit (callPackage ../tools/misc/coreboot-utils { })
1398+ msrtool
1399+ cbmem
1400+ ifdtool
1401+ intelmetool
1402+ cbfstool
1403+ nvramtool
1404+ superiotool
1405+ ectool
1406+ inteltool
1407+ amdfwtool
1408+ acpidump-all
1409+ coreboot-utils;
1410+
13971411 corosync = callPackage ../servers/corosync { };
13981412
13991413 cowsay = callPackage ../tools/misc/cowsay { };
@@ -11375,8 +11389,6 @@ in
1137511389
1137611390 ilmbase = callPackage ../development/libraries/ilmbase { };
1137711391
11378− intelmetool = callPackage ../tools/misc/intelmetool { };
11379−
1138011392 imlib = callPackage ../development/libraries/imlib {
1138111393 libpng = libpng12;
1138211394 };
@@ -15000,14 +15012,6 @@ in
1500015012
1500115013 seabios = callPackage ../applications/virtualization/seabios { };
1500215014
15003− cbfstool = callPackage ../applications/virtualization/cbfstool { };
15004−
15005− ifdtool = callPackage ../tools/misc/ifdtool { };
15006−
15007− cbmem = callPackage ../tools/misc/cbmem { };
15008−
15009− nvramtool = callPackage ../tools/misc/nvramtool { };
15010−
1501115015 vmfs-tools = callPackage ../tools/filesystems/vmfs-tools { };
1501215016
1501315017 pgbouncer = callPackage ../servers/sql/pgbouncer { };