summaryrefslogtreecommitdiff
path: root/gnu
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
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')
-rw-r--r--gnu/local.mk2
-rw-r--r--gnu/packages/coreboot.scm199
-rw-r--r--gnu/packages/flashing-tools.scm159
3 files changed, 202 insertions, 158 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 548b2b5c6ee..027451fc9ef 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -56,6 +56,7 @@
56# Copyright © 2022 Alex Griffin <a@ajgrf.com> 56# Copyright © 2022 Alex Griffin <a@ajgrf.com>
57# Copyright © 2022 ( <paren@disroot.org> 57# Copyright © 2022 ( <paren@disroot.org>
58# Copyright © 2022, 2026 jgart <jgart@dismail.de> 58# Copyright © 2022, 2026 jgart <jgart@dismail.de>
59# Copyright © 2022-2023, 2025-2026 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
59# Copyright © 2023-2025 Zheng Junjie <z572@z572.online> 60# Copyright © 2023-2025 Zheng Junjie <z572@z572.online>
60# Copyright © 2023 Ivana Drazovic <iv.dra@hotmail.com> 61# Copyright © 2023 Ivana Drazovic <iv.dra@hotmail.com>
61# Copyright © 2023 Andy Tai <atai@atai.org> 62# Copyright © 2023 Andy Tai <atai@atai.org>
@@ -216,6 +217,7 @@ GNU_SYSTEM_MODULES = \
216 %D%/packages/convmv.scm \ 217 %D%/packages/convmv.scm \
217 %D%/packages/codex.scm \ 218 %D%/packages/codex.scm \
218 %D%/packages/coq.scm \ 219 %D%/packages/coq.scm \
220 %D%/packages/coreboot.scm \
219 %D%/packages/cpio.scm \ 221 %D%/packages/cpio.scm \
220 %D%/packages/cpp.scm \ 222 %D%/packages/cpp.scm \
221 %D%/packages/cppi.scm \ 223 %D%/packages/cppi.scm \
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"))))
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index e7b09b175ad..d656d619260 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -2,7 +2,7 @@
2;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> 2;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
3;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> 3;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
4;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> 4;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
5;;; Copyright © 2016, 2018, 2021 Ludovic Courtès <ludo@gnu.org> 5;;; Copyright © 2016, 2021 Ludovic Courtès <ludo@gnu.org>
6;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il> 6;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
7;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier@web.de> 7;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier@web.de>
8;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> 8;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
@@ -84,7 +84,6 @@
84 #:use-module (gnu packages linux) 84 #:use-module (gnu packages linux)
85 #:use-module (gnu packages mtools) 85 #:use-module (gnu packages mtools)
86 #:use-module (gnu packages pciutils) 86 #:use-module (gnu packages pciutils)
87 #:use-module (gnu packages pciutils)
88 #:use-module (gnu packages perl) 87 #:use-module (gnu packages perl)
89 #:use-module (gnu packages pkg-config) 88 #:use-module (gnu packages pkg-config)
90 #:use-module (gnu packages python) 89 #:use-module (gnu packages python)
@@ -524,162 +523,6 @@ Loke and Heimdall communicate via the custom Samsung-developed protocol typicall
524referred to as the \"Odin 3 protocol\".") 523referred to as the \"Odin 3 protocol\".")
525 (license license:expat))) 524 (license license:expat)))
526 525
527(define-public ifdtool
528 (package
529 (name "ifdtool")
530 (version "25.09")
531 (source
532 (origin
533 (method git-fetch)
534 (uri (git-reference
535 (url "https://review.coreboot.org/coreboot")
536 (commit version)))
537 (file-name (git-file-name name version))
538 (sha256
539 (base32
540 "1a1n64dwr5fzdnaj45bjci85ap5yra5gwz4x056zn6481xwvbsmv"))))
541 (build-system gnu-build-system)
542 (arguments
543 (list
544 #:make-flags
545 #~(list (string-append "CC=" #$(cc-for-target))
546 "INSTALL=install"
547 (string-append "PREFIX=" #$output))
548 #:phases
549 #~(modify-phases %standard-phases
550 (add-after 'unpack 'chdir
551 (lambda _
552 (chdir "util/ifdtool")))
553 (delete 'configure)) ; no configure script
554 #:tests? #f)) ; no test suite
555 (home-page "https://doc.coreboot.org/util/ifdtool/")
556 (synopsis "Intel Firmware Descriptor dumper")
557 (description "This package provides @command{ifdtool}, a program to
558dump Intel Firmware Descriptor data of an image file.")
559 (license license:gpl2)))
560
561(define-public bincfg
562 (package
563 (name "bincfg")
564 (version "25.09")
565 (source
566 (origin
567 (method git-fetch)
568 (uri (git-reference
569 (url "https://review.coreboot.org/coreboot")
570 (commit version)))
571 (file-name (git-file-name name version))
572 (sha256
573 (base32
574 "1a1n64dwr5fzdnaj45bjci85ap5yra5gwz4x056zn6481xwvbsmv"))))
575 (build-system gnu-build-system)
576 (arguments
577 (list
578 #:tests? #f ; no test suite
579 #:make-flags
580 #~(list
581 (string-append "CC=" #$(cc-for-target)))
582 #:phases
583 #~(modify-phases %standard-phases
584 (delete 'configure) ; no configure script
585 (add-after 'unpack 'chdir
586 (lambda _
587 (chdir "util/bincfg")))
588 (add-after 'build 'build-binaries
589 (lambda* (#:key make-flags #:allow-other-keys)
590 (for-each
591 (lambda (target result)
592 (apply invoke "make" (string-append "gen-" target) make-flags)
593 (rename-file result
594 (string-append target ".bin")))
595 (list
596 ;; generate GbE for X200
597 "gbe-ich9m"
598 ;; generate GbE for X220/x230
599 "gbe-82579LM"
600 ;; generate IFD for X200
601 "ifd-x200")
602 (list
603 "flashregion_3_gbe.bin"
604 "flashregion_3_gbe.bin"
605 "flashregion_0_fd.bin"))))
606 ;; The Makefile has no install target.
607 (replace 'install
608 (lambda _
609 (let ((bin (string-append #$output "/bin"))
610 (lib (string-append #$output "/lib/bincfg"))
611 (data (string-append #$output "/share/bincfg")))
612 ;; Install the program
613 (install-file "bincfg" bin)
614 ;; And its data
615 (for-each
616 (lambda (path)
617 (install-file path data))
618 (append (find-files "." ".*\\.set")
619 (find-files "." ".*\\.spec")))
620 ;; And the files generated with the data
621 (for-each
622 (lambda (path)
623 (install-file path lib))
624 (find-files "." ".*\\.bin"))))))))
625 (native-inputs (list bison flex))
626 (home-page "https://coreboot.org")
627 (synopsis "Encoder/decoder for binary formats described in text files")
628 (description "
629The bincfg program comes with specifications files for the following binary
630formats:
631@itemize
632@item Various DDR3 and DDR4 SPD
633@item Configuration data for the Intel 82579LM Gigabit Ethernet PHY
634@item Configuration data for the Intel Gigabit Ethernet controller present in
635 the Intel ICH9-M chipset.
636@item Intel Firmware Descriptor data for the Lenovo ThinkPad X200
637@item Configuration data for the ITE IT8718F SuperIO
638@end itemize
639It also comes with example files generated by bincfg.")
640 (license license:gpl3+)))
641
642(define-public intelmetool
643 (package
644 (name "intelmetool")
645 (version "25.09")
646 (source (origin
647 (method git-fetch)
648 (uri (git-reference
649 (url "https://review.coreboot.org/coreboot")
650 (commit version)))
651 (file-name (git-file-name name version))
652 (sha256
653 (base32
654 "1a1n64dwr5fzdnaj45bjci85ap5yra5gwz4x056zn6481xwvbsmv"))))
655 (build-system gnu-build-system)
656 (arguments
657 (list
658 #:tests? #f ;no test suite
659 #:make-flags
660 #~(list (string-append "CC=" #$(cc-for-target))
661 "INSTALL=install"
662 (string-append "PREFIX=" #$output))
663 #:phases
664 #~(modify-phases %standard-phases
665 (add-after 'unpack 'chdir
666 (lambda _
667 (chdir "util/intelmetool")))
668 (delete 'configure) ;no configure script
669 (delete 'check))))
670 (inputs (list pciutils zlib))
671 (home-page
672 "https://github.com/coreboot/coreboot/tree/main/util/intelmetool/")
673 (synopsis "Intel Management Engine tools")
674 (description "This package provides tools for working with Intel
675Management Engine (ME). You need to @code{sudo rmmod mei_me} and
676@code{sudo rmmod mei} before using this tool. Also pass
677@code{iomem=relaxed} to the Linux kernel command line.")
678 (license license:gpl2)
679
680 ;; This is obviously an Intel thing, plus it requires <cpuid.h>.
681 (supported-systems '("x86_64-linux" "i686-linux"))))
682
683(define-public me-cleaner 526(define-public me-cleaner
684 (package 527 (package
685 (name "me-cleaner") 528 (name "me-cleaner")