mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
gnu: Add bincfg.
* gnu/packages/flashing-tools.scm (bincfg): New variable. Merges guix/guix!7016 Change-Id: I75539ef75e6ea08ffe34dd1f11d2dec56683dcf4 Signed-off-by: Cayetano Santos <csantosb@inventati.org>
This commit is contained in:
committed by
Cayetano Santos
parent
0d622898fa
commit
fe8599a6be
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user