22 description = "Various coreboot-related tools";
23 homepage = "https://www.coreboot.org";
24 license = with lib.licenses; [
28 maintainers = with lib.maintainers; [
32 platforms = lib.platforms.linux;
38 path ? "util/${pname}",
43 inherit pname version;
46 url = "https://review.coreboot.org/coreboot";
48 hash = "sha256-BwuoBuWKHTnSwV8ubm5NqcddgxP5OMXuTl3zmwwKEsg=";
51 enableParallelBuilding = true;
54 substituteInPlace 3rdparty/vboot/Makefile --replace 'ar qc ' '$$AR qc '
61 "PREFIX=${placeholder "out"}"
64 meta = commonMeta // args.meta;
66 // (removeAttrs args [ "meta" ])
72 meta.description = "Dump chipset-specific MSR registers";
81 preConfigure = "export INSTALL=install";
85 meta.description = "coreboot console log reader";
89 meta.description = "Extract and dump Intel Firmware Descriptor information";
91 intelmetool = generic {
92 pname = "intelmetool";
93 meta.description = "Dump interesting things about Management Engine";
105 meta.description = "Management utility for CBFS formatted ROM images";
107 nvramtool = generic {
109 meta.description = "Read and write coreboot parameters and display information from the coreboot table in CMOS/NVRAM";
110 meta.mainProgram = "nvramtool";
112 superiotool = generic {
113 pname = "superiotool";
114 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";
126 meta.description = "Dump the RAM of a laptop's Embedded/Environmental Controller (EC)";
131 preInstall = "mkdir -p $out/sbin";
133 inteltool = generic {
135 meta.description = "Provides information about Intel CPU/chipset hardware configuration (register contents, MSRs, etc)";
145 amdfwtool = generic {
147 meta.description = "Create AMD firmware combination";
148 buildInputs = [ openssl ];
149 nativeBuildInputs = [ pkg-config ];
153 install -Dm755 amdfwtool $out/bin/amdfwtool
158 acpidump-all = generic {
159 pname = "acpidump-all";
161 meta.description = "Walk through all ACPI tables with their addresses";
162 nativeBuildInputs = [ makeWrapper ];
167 install -Dm755 acpidump-all $out/bin/acpidump-all
172 wrapProgram $out/bin/acpidump-all \
191 name = "coreboot-utils-${version}";
192 paths = lib.filter (lib.meta.availableOn stdenv.hostPlatform) (lib.attrValues utils);
193 postBuild = "rm -rf $out/sbin";