summaryrefslogtreecommitdiff
path: root/gnu/packages/coreboot.scm
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2026-03-11 18:35:01 +0100
committerCayetano Santos <csantosb@inventati.org>2026-04-12 20:19:35 +0200
commit7cf91385c504d2d7be3665e5fda71bb4a7a862f8 (patch)
treec1de2f116b7fdd9de35a242ae84f375c5de8db65 /gnu/packages/coreboot.scm
parent4ec4ff0148570170ebdc161546a09869a4b764b8 (diff)
gnu: Move bincfg, ifdtool and intelmetool to coreboot.scm.
All these packages are being maintained by Coreboot and they are also present in the Coreboot source code. Merge guix/guix!7065 * gnu/packages/flashing-tools.scm (bincfg, ifdtool, intelmetool): Move from here ... * gnu/packages/coreboot.scm: ... to here. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * po/packages/POTFILES.in: Add it. Change-Id: I6d802042670fda52adeb85d9e3a4b3f3a23dcb66 Signed-off-by: Cayetano Santos <csantosb@inventati.org>
Diffstat (limited to 'gnu/packages/coreboot.scm')
-rw-r--r--gnu/packages/coreboot.scm199
1 files changed, 199 insertions, 0 deletions
diff --git a/gnu/packages/coreboot.scm b/gnu/packages/coreboot.scm
new file mode 100644
index 00000000000..fd70c344f61
--- /dev/null
+++ b/gnu/packages/coreboot.scm
@@ -0,0 +1,199 @@
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org>
3;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
4;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
5;;; Copyright © 2025 Cayetano Santos <csantosb@inventati.org>
6;;; Copyright © 2026 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages coreboot)
24 #:use-module (gnu packages bison)
25 #:use-module (gnu packages compression)
26 #:use-module (gnu packages flex)
27 #:use-module (gnu packages pciutils)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix build-system cargo)
30 #:use-module (guix build-system cmake)
31 #:use-module (guix build-system copy)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system go)
34 #:use-module (guix build-system meson)
35 #:use-module (guix build-system pyproject)
36 #:use-module (guix build-system python)
37 #:use-module (guix build-system qt)
38 #:use-module (guix download)
39 #:use-module (guix gexp)
40 #:use-module (guix git-download)
41 #:use-module (guix packages)
42 #:use-module (guix utils)
43 #:use-module (srfi srfi-26))
44
45(define-public bincfg
46 (package
47 (name "bincfg")
48 (version "25.09")
49 (source
50 (origin
51 (method git-fetch)
52 (uri (git-reference
53 (url "https://review.coreboot.org/coreboot")
54 (commit version)))
55 (file-name (git-file-name name version))
56 (sha256
57 (base32
58 "1a1n64dwr5fzdnaj45bjci85ap5yra5gwz4x056zn6481xwvbsmv"))))
59 (build-system gnu-build-system)
60 (arguments
61 (list
62 #:tests? #f ; no test suite
63 #:make-flags
64 #~(list
65 (string-append "CC=" #$(cc-for-target)))
66 #:phases
67 #~(modify-phases %standard-phases
68 (delete 'configure) ; no configure script
69 (add-after 'unpack 'chdir
70 (lambda _
71 (chdir "util/bincfg")))
72 (add-after 'build 'build-binaries
73 (lambda* (#:key make-flags #:allow-other-keys)
74 (for-each
75 (lambda (target result)
76 (apply invoke "make" (string-append "gen-" target) make-flags)
77 (rename-file result
78 (string-append target ".bin")))
79 (list
80 ;; generate GbE for X200
81 "gbe-ich9m"
82 ;; generate GbE for X220/x230
83 "gbe-82579LM"
84 ;; generate IFD for X200
85 "ifd-x200")
86 (list
87 "flashregion_3_gbe.bin"
88 "flashregion_3_gbe.bin"
89 "flashregion_0_fd.bin"))))
90 ;; The Makefile has no install target.
91 (replace 'install
92 (lambda _
93 (let ((bin (string-append #$output "/bin"))
94 (lib (string-append #$output "/lib/bincfg"))
95 (data (string-append #$output "/share/bincfg")))
96 ;; Install the program
97 (install-file "bincfg" bin)
98 ;; And its data
99 (for-each
100 (lambda (path)
101 (install-file path data))
102 (append (find-files "." ".*\\.set")
103 (find-files "." ".*\\.spec")))
104 ;; And the files generated with the data
105 (for-each
106 (lambda (path)
107 (install-file path lib))
108 (find-files "." ".*\\.bin"))))))))
109 (native-inputs (list bison flex))
110 (home-page "https://coreboot.org")
111 (synopsis "Encoder/decoder for binary formats described in text files")
112 (description "
113The bincfg program comes with specifications files for the following binary
114formats:
115@itemize
116@item Various DDR3 and DDR4 SPD
117@item Configuration data for the Intel 82579LM Gigabit Ethernet PHY
118@item Configuration data for the Intel Gigabit Ethernet controller present in
119 the Intel ICH9-M chipset.
120@item Intel Firmware Descriptor data for the Lenovo ThinkPad X200
121@item Configuration data for the ITE IT8718F SuperIO
122@end itemize
123It also comes with example files generated by bincfg.")
124 (license license:gpl3+)))
125
126(define-public ifdtool
127 (package
128 (name "ifdtool")
129 (version "25.09")
130 (source
131 (origin
132 (method git-fetch)
133 (uri (git-reference
134 (url "https://review.coreboot.org/coreboot")
135 (commit version)))
136 (file-name (git-file-name name version))
137 (sha256
138 (base32
139 "1a1n64dwr5fzdnaj45bjci85ap5yra5gwz4x056zn6481xwvbsmv"))))
140 (build-system gnu-build-system)
141 (arguments
142 (list
143 #:make-flags
144 #~(list (string-append "CC=" #$(cc-for-target))
145 "INSTALL=install"
146 (string-append "PREFIX=" #$output))
147 #:phases
148 #~(modify-phases %standard-phases
149 (add-after 'unpack 'chdir
150 (lambda _
151 (chdir "util/ifdtool")))
152 (delete 'configure)) ; no configure script
153 #:tests? #f)) ; no test suite
154 (home-page "https://doc.coreboot.org/util/ifdtool/")
155 (synopsis "Intel Firmware Descriptor dumper")
156 (description "This package provides @command{ifdtool}, a program to
157dump Intel Firmware Descriptor data of an image file.")
158 (license license:gpl2)))
159
160(define-public intelmetool
161 (package
162 (name "intelmetool")
163 (version "25.09")
164 (source (origin
165 (method git-fetch)
166 (uri (git-reference
167 (url "https://review.coreboot.org/coreboot")
168 (commit version)))
169 (file-name (git-file-name name version))
170 (sha256
171 (base32
172 "1a1n64dwr5fzdnaj45bjci85ap5yra5gwz4x056zn6481xwvbsmv"))))
173 (build-system gnu-build-system)
174 (arguments
175 (list
176 #:tests? #f ;no test suite
177 #:make-flags
178 #~(list (string-append "CC=" #$(cc-for-target))
179 "INSTALL=install"
180 (string-append "PREFIX=" #$output))
181 #:phases
182 #~(modify-phases %standard-phases
183 (add-after 'unpack 'chdir
184 (lambda _
185 (chdir "util/intelmetool")))
186 (delete 'configure) ;no configure script
187 (delete 'check))))
188 (inputs (list pciutils zlib))
189 (home-page
190 "https://github.com/coreboot/coreboot/tree/main/util/intelmetool/")
191 (synopsis "Intel Management Engine tools")
192 (description "This package provides tools for working with Intel
193Management Engine (ME). You need to @code{sudo rmmod mei_me} and
194@code{sudo rmmod mei} before using this tool. Also pass
195@code{iomem=relaxed} to the Linux kernel command line.")
196 (license license:gpl2)
197
198 ;; This is obviously an Intel thing, plus it requires <cpuid.h>.
199 (supported-systems '("x86_64-linux" "i686-linux"))))