This is an automated email from the git hooks/post-receive script.

guix_mirror_bot pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new fe8599a6be gnu: Add bincfg.
fe8599a6be is described below

commit fe8599a6bef6b86d58b6cefa107dd476597f5156
Author: Denis 'GNUtoo' Carikli <[email protected]>
AuthorDate: Mon Mar 9 18:44:54 2026 +0100

    gnu: Add bincfg.
    
    * gnu/packages/flashing-tools.scm (bincfg): New variable.
    
    Merges guix/guix!7016
    
    Change-Id: I75539ef75e6ea08ffe34dd1f11d2dec56683dcf4
    Signed-off-by: Cayetano Santos <[email protected]>
---
 gnu/packages/flashing-tools.scm | 81 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index 471d17bcc2..1834b2b3c3 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -447,6 +447,87 @@ referred to as the \"Odin 3 protocol\".")
 dump Intel Firmware Descriptor data of an image file.")
     (license license:gpl2)))
 
+(define-public bincfg
+  (package
+    (name "bincfg")
+    (version "25.09")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://review.coreboot.org/coreboot";)
+              (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1a1n64dwr5fzdnaj45bjci85ap5yra5gwz4x056zn6481xwvbsmv"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:tests? #f ; no test suite
+      #:make-flags
+      #~(list
+         (string-append "CC=" #$(cc-for-target)))
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure) ; no configure script
+          (add-after 'unpack 'chdir
+            (lambda _
+              (chdir "util/bincfg")))
+          (add-after 'build 'build-binaries
+            (lambda* (#:key make-flags #:allow-other-keys)
+              (for-each
+               (lambda (target result)
+                 (apply invoke "make" (string-append "gen-" target) make-flags)
+                 (rename-file result
+                              (string-append target ".bin")))
+               (list
+                ;; generate GbE for X200
+                "gbe-ich9m"
+                ;; generate GbE for X220/x230
+                "gbe-82579LM"
+                ;; generate IFD for X200
+                "ifd-x200")
+               (list
+                "flashregion_3_gbe.bin"
+                "flashregion_3_gbe.bin"
+                "flashregion_0_fd.bin"))))
+          ;; The Makefile has no install target.
+          (replace 'install
+            (lambda _
+              (let ((bin (string-append #$output "/bin"))
+                    (lib (string-append #$output "/lib/bincfg"))
+                    (data (string-append #$output "/share/bincfg")))
+                ;; Install the program
+                (install-file "bincfg" bin)
+                ;; And its data
+                (for-each
+                 (lambda (path)
+                   (install-file path data))
+                 (append (find-files "." ".*\\.set")
+                         (find-files "." ".*\\.spec")))
+                ;; And the files generated with the data
+                (for-each
+                 (lambda (path)
+                   (install-file path lib))
+                 (find-files "." ".*\\.bin"))))))))
+    (native-inputs (list bison flex))
+    (home-page "https://coreboot.org";)
+    (synopsis "Encoder/decoder for binary formats described in text files")
+    (description "
+The bincfg program comes with specifications files for the following binary
+formats:
+@itemize
+@item Various DDR3 and DDR4 SPD
+@item Configuration data for the Intel 82579LM Gigabit Ethernet PHY
+@item Configuration data for the Intel Gigabit Ethernet controller present in
+      the Intel ICH9-M chipset.
+@item Intel Firmware Descriptor data for the Lenovo ThinkPad X200
+@item Configuration data for the ITE IT8718F SuperIO
+@end itemize
+It also comes with example files generated by bincfg.")
+    (license license:gpl3+)))
+
 (define-public intelmetool
   (package
     (name "intelmetool")

Reply via email to