summaryrefslogtreecommitdiff
path: root/gnu/packages/flashing-tools.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/flashing-tools.scm')
-rw-r--r--gnu/packages/flashing-tools.scm378
1 files changed, 264 insertions, 114 deletions
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index fa9d88b30c..f591e57f34 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -11,10 +11,15 @@
;;; Copyright © 2021 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2022 Peter Polidoro <peter@polidoro.io>
+;;; Copyright © 2022 Danny Milosavljevic <dannym@scratchpost.org>
;;; Copyright © 2023 B. Wilson <x@wilsonb.com>
-;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2024, 2025 Cayetano Santos <csantosb@inventati.org>
;;; Copyright © 2025 Joaquín Aguirrezabalaga <kinote@kinote.org>
+;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2025 Ian Eure <ian@retrospec.tv>
+;;; Copyright © 2023 Thomas Albers Raviola <thomas@thomaslabs.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,6 +38,7 @@
(define-module (gnu packages flashing-tools)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system cargo)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
@@ -78,31 +84,34 @@
(define-public flashrom
(package
(name "flashrom")
- (version "1.5.1")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://download.flashrom.org/releases/flashrom-v"
- version ".tar.xz"))
- (sha256
- (base32
- "14v2bd46wyz46bvsxr3zx2wacqbqzi4w4pk50giar7nldq3lp4qz"))))
+ (version "1.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.flashrom.org/releases/flashrom-v"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "08s4r7abcyk849zk840l3szgdmaxj0bx1281wy0zrdgrgncb77cb"))))
(build-system meson-build-system)
- (inputs (list bash-minimal dmidecode pciutils libusb libftdi libjaylink))
- (native-inputs (list cmocka pkg-config))
(arguments
- (list #:configure-flags
- #~'("-Dprogrammer=all")
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'fix-path
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "dmi.c"
- (("(dmidecode)( 2>/dev/null)" _ command suffix)
- (string-append
- (search-input-file
- inputs (in-vicinity "sbin" command))
- suffix))))))))
+ (list
+ #:configure-flags #~'("-Dprogrammer=all")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "dmi.c"
+ (("(dmidecode)( 2>/dev/null)" _ command suffix)
+ (string-append
+ (search-input-file
+ inputs (in-vicinity "sbin" command))
+ suffix))))))))
+ (native-inputs
+ (list cmocka pkg-config))
+ (inputs
+ (list bash-minimal dmidecode pciutils libusb libftdi libjaylink))
(home-page "https://flashrom.org/")
(synopsis "Identify, read, write, erase, and verify ROM/flash chips")
(description
@@ -234,14 +243,15 @@ firmware from it.")
(define-public teensy-loader-cli
(package
(name "teensy-loader-cli")
- (version "2.2")
+ (version "2.3")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/PaulStoffregen/teensy_loader_cli")
(commit version)))
- (sha256 (base32 "12n8ifz4gph1anhwd8if3j1kw0wc3yxf48abbyxl8071l9vj3m0b"))
+ (sha256
+ (base32 "0kqjmbmns3ansmrs6pbpsqk0g4d82hxknpng6lp7375zccsq52im"))
(file-name (git-file-name name version))
(modules '((guix build utils)))
(snippet
@@ -253,14 +263,18 @@ firmware from it.")
(arguments
(list
#:tests? #f ;; Makefile has no test target
- #:make-flags #~(list "CC=gcc" (string-append "PREFIX=" #$output))
- #:phases #~(modify-phases %standard-phases
- (delete 'configure)
- (replace 'install
- (lambda _
- (install-file "teensy_loader_cli"
- (string-append #$output "/bin")))))))
- (inputs (list libusb-compat)) ;only compatible with libusb 0.1
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda _
+ (install-file "teensy_loader_cli"
+ (string-append #$output "/bin")))))))
+ (inputs
+ (list libusb-compat)) ;only compatible with libusb 0.1
(synopsis "Command line firmware uploader for Teensy development boards")
(description
"The Teensy loader program communicates with your Teensy board when the
@@ -310,8 +324,8 @@ for possible workarounds.")
%supported-systems))))
(define-public rkflashtool
- (let ((commit "8966c4e277de8148290554aaaa4146a3a84a3c53")
- (revision "1"))
+ (let ((commit "6022dd724e8247ff7a0825b0eda6a07c446aacdd")
+ (revision "2"))
(package
(name "rkflashtool")
(version (git-version "5.2" revision commit))
@@ -321,17 +335,19 @@ for possible workarounds.")
(uri (git-reference
(url "https://github.com/linux-rockchip/rkflashtool")
(commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1ndyzg1zlgg20dd8js9kfqm5kq19k005vddkvf65qj20w0pcyahn"))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0s4zir2s0c3igplj42lq7bq0f0416nf9hrprbxzm87c9mvsdhyvv"))))
(build-system gnu-build-system)
(arguments
- '(#:phases
- (modify-phases %standard-phases
- (delete 'configure)) ; no configure
- #:make-flags (list (string-append "PREFIX=" %output))
- #:tests? #f)) ; no tests
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)) ; no configure
+ #:make-flags
+ #~(list (string-append "PREFIX=" #$output))
+ #:tests? #f)) ; no tests
(native-inputs
(list pkg-config))
(inputs
@@ -394,31 +410,32 @@ referred to as the \"Odin 3 protocol\".")
(define-public ifdtool
(package
(name "ifdtool")
- (version "4.9")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/coreboot/coreboot")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0jidj29jh6p65d17k304wlzhxvp4p3c2namgcdwg2sxq8jfr0zlm"))))
+ (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
- `(#:make-flags
- (list "CC=gcc"
- "INSTALL=install"
- (string-append "PREFIX=" (assoc-ref %outputs "out")))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _
- (chdir "util/ifdtool")
- #t))
- (delete 'configure)) ; no configure script
- #:tests? #f)) ; no test suite
- (home-page "https://github.com/corna/me_cleaner/")
+ (list
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ "INSTALL=install"
+ (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "util/ifdtool")))
+ (delete 'configure)) ; no configure script
+ #:tests? #f)) ; no test suite
+ (home-page "https://doc.coreboot.org/util/ifdtool/")
(synopsis "Intel Firmware Descriptor dumper")
(description "This package provides @command{ifdtool}, a program to
dump Intel Firmware Descriptor data of an image file.")
@@ -427,33 +444,34 @@ dump Intel Firmware Descriptor data of an image file.")
(define-public intelmetool
(package
(name "intelmetool")
- (version "4.7")
+ (version "25.09")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://review.coreboot.org/p/coreboot")
+ (url "https://review.coreboot.org/coreboot")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
- "0nw555i0fm5kljha9h47bk70ykbwv8ddfk6qhz6kfqb79vzhy4h2"))))
+ "1a1n64dwr5fzdnaj45bjci85ap5yra5gwz4x056zn6481xwvbsmv"))))
(build-system gnu-build-system)
- (inputs
- (list pciutils zlib))
(arguments
- `(#:make-flags
- (list "CC=gcc"
- "INSTALL=install"
- (string-append "PREFIX=" (assoc-ref %outputs "out")))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _
- (chdir "util/intelmetool")
- #t))
- (delete 'configure)
- (delete 'check))))
- (home-page "https://github.com/zamaudio/intelmetool")
+ (list
+ #:tests? #f ;no test suite
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ "INSTALL=install"
+ (string-append "PREFIX=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "util/intelmetool")))
+ (delete 'configure) ;no configure script
+ (delete 'check))))
+ (inputs (list pciutils zlib))
+ (home-page
+ "https://github.com/coreboot/coreboot/tree/main/util/intelmetool/")
(synopsis "Intel Management Engine tools")
(description "This package provides tools for working with Intel
Management Engine (ME). You need to @code{sudo rmmod mei_me} and
@@ -496,6 +514,62 @@ ME as far as possible (it only edits ME firmware image files).")
;; This is an Intel thing.
(supported-systems '("x86_64-linux" "i686-linux"))))
+(define-public minipro
+ ;; When built from a Git repo, minipro expects GIT_DATE to be set to the
+ ;; value of `git show -s --format=%ci'. When updating the package, run this
+ ;; in a checkout and put the value here.
+ (let* ((date "2025-04-13 21:54:38 -0700"))
+ (package
+ (name "minipro")
+ (version "0.7.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/DavidGriffith/minipro.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1525rn5h73xism16vmivd3cz93g8w76h24f0yvbpc35ydc3fkqf7"))))
+ (native-inputs (list pkg-config which))
+ (inputs (list libusb zlib))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:tests? #f ; no test suite
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure) ; No ./configure script
+ (add-before 'build 'fix-makefile
+ (lambda _
+ ;; Fix some git related variables that minipro expects
+ (substitute* "Makefile"
+ (("GIT_BRANCH = .*")
+ (string-append "GIT_BRANCH = \"master\"\n"))
+ (("GIT_HASH = .*")
+ (string-append "GIT_HASH = \"" #$version "\"\n"))
+ (("GIT_DATE = .*")
+ (string-append "GIT_DATE = \"" #$date "\"\n"))))))
+ #:make-flags
+ #~(list (string-append "VERSION=" #$version)
+ (string-append "PREFIX=" #$output)
+ (string-append "UDEV_DIR=" #$output "/lib/udev")
+ (string-append "COMPLETIONS_DIR=" #$output
+ "/share/bash-completion/completions"))))
+ (synopsis "Controls the TL866xx series of chip programmers")
+ (description
+ "minipro is designed to program or read the contents of
+chips supported by the TL866xx series of programmers. This includes many
+microcontrollers, ROMs, EEPROMs and PLDs.
+
+To use this program without root privileges you must install the necessary udev
+rules. This can be done by extending @code{udev-service-type} in your
+@code{operating-system} configuration with this package. E.g.:
+@code{(udev-rules-service 'minipro minipro #:groups '(\"plugdev\")}.
+Additionally your user must be member of the @code{plugdev} group.")
+ (home-page "https://gitlab.com/DavidGriffith/minipro")
+ (license license:gpl3+))))
+
(define-public uefitool
(package
(name "uefitool")
@@ -528,6 +602,52 @@ ME as far as possible (it only edits ME firmware image files).")
Unifinished Extensible Firmware Interface (UEFI) images.")
(license license:bsd-2)))
+(define-public openfpgaloader
+ (package
+ (name "openfpgaloader")
+ (version "1.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/trabucayre/openfpgaloader")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "00xr4dzd1mlc1k4rivh9ibmdlx6yizb016laad10dkhjqfz1ixhq"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ (list pkg-config))
+ (inputs (list eudev
+ hidapi
+ libftdi
+ libgpiod
+ libusb
+ zlib))
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'install-rules
+ (lambda _
+ (install-file
+ "../source/99-openfpgaloader.rules"
+ (string-append #$output "/lib/udev/rules.d/")))))))
+ (synopsis "Utility for programming FPGA")
+ (description "This package provides a program to transfer a bitstream
+to an FPGA. To use @code{openfpgaloader} without root privileges it is
+necessary to install the necessary udev rules. This can be done by extending
+@code{udev-service-type} in the @code{operating-system} configuration file with
+this package, as in:
+@lisp
+(udev-rules-service 'openfpgaloader openfpgaloader #:groups '(\"plugdev\")
+@end lisp
+Additionally, the @samp{plugdev} group should be registered in the
+@code{supplementary-groups} field of your @code{user-account} declaration. Refer
+to @samp{info \"(guix) Base Services\"} for examples.")
+ (home-page "https://trabucayre.github.io/openFPGALoader/")
+ (license license:asl2.0)))
+
(define-public srecord
(package
(name "srecord")
@@ -593,7 +713,7 @@ formats, and can perform many different manipulations.")
(define-public uuu
(package
(name "uuu")
- (version "1.5.201")
+ (version "1.5.233")
(source
(origin
(method git-fetch)
@@ -603,31 +723,32 @@ formats, and can perform many different manipulations.")
(file-name (git-file-name name version))
(sha256
(base32
- "0jil04khy0lxllhapdm86yyq9i3xqrlvmf6g5r53qmq9jyvxwlhv"))))
+ "08pck42sywg0ibj79lhd3iv9z6bvr5g5bqvkls477x9x85nbsw67"))))
+ (build-system cmake-build-system)
(arguments
- `(#:tests? #f ; no tests
- #:modules ((guix build utils)
+ (list
+ #:tests? #f ; no tests
+ #:modules '((guix build utils)
(ice-9 popen)
(srfi srfi-26)
(guix build cmake-build-system))
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'fix-version-gen
- (lambda _
- (call-with-output-file ".tarball-version"
- (lambda (port)
- (display ,version port)))))
- (add-after 'install 'install-udev-rules
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (uuu (string-append out "/bin/uuu"))
- (pipe (open-pipe* OPEN_READ uuu "-udev"))
- (rules
- (string-append out "/lib/udev/rules.d/70-uuu.rules")))
- (mkdir-p (string-append out "/lib/udev/rules.d"))
- (call-with-output-file rules
- (cut dump-port pipe <>))))))))
- (build-system cmake-build-system)
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'fix-version-gen
+ (lambda _
+ (call-with-output-file ".tarball-version"
+ (lambda (port)
+ (display #$version port)))))
+ (add-after 'install 'install-udev-rules
+ (lambda _
+ (let* ((uuu (string-append #$output "/bin/uuu"))
+ (pipe (open-pipe* OPEN_READ uuu "-udev"))
+ (rules
+ (string-append
+ #$output "/lib/udev/rules.d/70-uuu.rules")))
+ (mkdir-p (string-append #$output "/lib/udev/rules.d"))
+ (call-with-output-file rules
+ (cut dump-port pipe <>))))))))
(native-inputs
(list pkg-config))
(inputs
@@ -639,9 +760,10 @@ formats, and can perform many different manipulations.")
It can be used to upload images to I.MX SoC's using at least their boot ROM.")
(license license:bsd-3)))
+;; The upstream repository has been archived on 2024-08-21,
+;; the replacement Keymapp does not seem to be free software.
+;; Keep it as long as it builds and works and no replacement is in sight.
(define-public wally-cli
- ;; Version with updated dependencies is not released yet, see
- ;; <https://github.com/zsa/wally-cli/pull/7>.
(let ((commit "b0fafe52cc7fb9d55f2b968d4548c99917c7325c")
(revision "0"))
(package
@@ -686,6 +808,30 @@ It can be used to upload images to I.MX SoC's using at least their boot ROM.")
@url{https://ergodox-ez.com/,ZSA keyboards}.")
(license license:expat))))
+(define-public wlink
+ (package
+ (name "wlink")
+ (version "0.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "wlink" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "05l6h5d4w181sg00nq0l1808l0zc4fdda6syvgm7ba31glj7xkd4"))))
+ (build-system cargo-build-system)
+ (arguments `(#:install-source? #f))
+ (native-inputs (list pkg-config))
+ (inputs (cons* eudev libusb (cargo-inputs 'wlink)))
+ (home-page "https://github.com/ch32-rs/wlink")
+ (synopsis "Unofficial WCH-Link command line tool")
+ (description
+ "This package is an unofficial command line tool for use with WCH-Link, a
+USB debbuger tool for flashing and debugging WCH RISC-V and ARM
+microcontrollers. This tool is still in development and may not be ready for
+production use.")
+ (license (list license:asl2.0 license:expat))))
+
(define-public qdl
(let ((commit "13681fcb359c9f9c32a17a91d3dd20df2e413b6d")
(revision "1"))
@@ -705,10 +851,14 @@ It can be used to upload images to I.MX SoC's using at least their boot ROM.")
(native-inputs (list libxml2))
(inputs (list eudev))
(arguments
- `(#:tests? #f ; No tests implemented
- #:make-flags (list (string-append "CC=" ,(cc-for-target))
- (string-append "prefix=" %output))
- #:phases (modify-phases %standard-phases (delete 'configure))))
+ (list
+ #:tests? #f ; No tests implemented
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "prefix=" #$output))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure))))
(home-page "https://git.linaro.org/landing-teams/working/qualcomm/qdl")
(synopsis "Qualcomm EDL mode flashing tool")
(description "This tool communicates with USB devices of id 05c6:9008 to