diff options
Diffstat (limited to 'gnu/packages/flashing-tools.scm')
-rw-r--r-- | gnu/packages/flashing-tools.scm | 131 |
1 files changed, 88 insertions, 43 deletions
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm index 32c17b5ddd..764fc9b422 100644 --- a/gnu/packages/flashing-tools.scm +++ b/gnu/packages/flashing-tools.scm @@ -2,12 +2,13 @@ ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> -;;; Copyright © 2016, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2016, 2018, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier@web.de> ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -50,7 +51,8 @@ #:use-module (gnu packages libusb) #:use-module (gnu packages libftdi) #:use-module (gnu packages pciutils) - #:use-module (gnu packages qt)) + #:use-module (gnu packages qt) + #:use-module (gnu packages tls)) (define-public flashrom (package @@ -65,11 +67,8 @@ (base32 "0ax4kqnh7kd3z120ypgp73qy1knz47l6qxsqzrfkd97mh5cdky71")))) (build-system gnu-build-system) - (inputs `(("dmidecode" ,dmidecode) - ("pciutils" ,pciutils) - ("libusb" ,libusb) - ("libftdi" ,libftdi))) - (native-inputs `(("pkg-config" ,pkg-config))) + (inputs (list dmidecode pciutils libusb libftdi)) + (native-inputs (list pkg-config)) (arguments '(#:make-flags (list "CC=gcc" @@ -84,9 +83,15 @@ (substitute* "dmi.c" (("\"dmidecode\"") (format #f "~S" - (string-append (assoc-ref inputs "dmidecode") - "/sbin/dmidecode")))) - #t))))) + (search-input-file inputs "/sbin/dmidecode")))))) + (add-before 'build 'patch-type-error + (lambda _ + ;; See https://github.com/flashrom/flashrom/pull/133 + (substitute* "libflashrom.c" + (("supported_boards\\[i\\].working = binfo\\[i\\].working") + "supported_boards[i].working = (enum flashrom_test_state)binfo[i].working") + (("supported_chipsets\\[i\\].status = chipset\\[i\\].status") + "supported_chipsets[i].status = (enum flashrom_test_state)chipset[i].status"))))))) (home-page "https://flashrom.org/") (synopsis "Identify, read, write, erase, and verify ROM/flash chips") (description @@ -114,7 +119,7 @@ programmer devices.") (inputs ;; Building with libusb-compat will succeed but the result will be broken. ;; See <https://github.com/pali/0xFFFF/issues/3>. - `(("libusb" ,libusb-0.1))) + (list libusb-0.1)) (arguments `(#:phases (modify-phases %standard-phases @@ -147,12 +152,9 @@ brick your device.") (base32 "15m1w1qad3dj7r8n5ng1qqcaiyx1gyd6hnc3p2apgjllccdp77qg")))) (build-system gnu-build-system) (inputs - `(("libelf" ,libelf) - ("libusb" ,libusb-compat) - ("libftdi" ,libftdi))) + (list libelf libusb-compat libftdi)) (native-inputs - `(("bison" ,bison) - ("flex" ,flex))) + (list bison flex)) (home-page "https://www.nongnu.org/avrdude/") (synopsis "AVR downloader and uploader") (description @@ -176,9 +178,9 @@ programming} technique.") (patches (search-patches "dfu-programmer-fix-libusb.patch")))) (build-system gnu-build-system) (native-inputs - `(("pkg-config" ,pkg-config))) + (list pkg-config)) (inputs - `(("libusb" ,libusb))) + (list libusb)) (home-page "https://dfu-programmer.github.io/") (synopsis "Device firmware update programmer for Atmel chips") (description @@ -190,7 +192,7 @@ ISP.") (define-public dfu-util (package (name "dfu-util") - (version "0.10") + (version "0.11") (source (origin (method url-fetch) (uri (string-append @@ -198,12 +200,12 @@ ISP.") version ".tar.gz")) (sha256 (base32 - "0hlvc47ccf5hry13saqhc1j5cdq5jyjv4i05kj0mdh3rzj6wagd0")))) + "17piiyp08pccqmbhnswv957lkypmmm92kps79hypxvw23ai3pddl")))) (build-system gnu-build-system) (inputs - `(("libusb" ,libusb))) + (list libusb)) (native-inputs - `(("pkg-config" ,pkg-config))) + (list pkg-config)) (synopsis "Host side of the USB Device Firmware Upgrade (DFU) protocol") (description "The DFU (Universal Serial Bus Device Firmware Upgrade) protocol is @@ -255,7 +257,7 @@ firmware from it.") (install-file "teensy_loader_cli" bin) #t)))))) (inputs - `(("libusb-compat" ,libusb-compat))) + (list libusb-compat)) (synopsis "Command line firmware uploader for Teensy development boards") (description "The Teensy loader program communicates with your Teensy board when the @@ -290,9 +292,9 @@ non-root users.") #:make-flags (list (string-append "PREFIX=" %output)) #:tests? #f)) ; no tests (native-inputs - `(("pkg-config" ,pkg-config))) + (list pkg-config)) (inputs - `(("libusb" ,libusb))) + (list libusb)) (home-page "https://github.com/linux-rockchip/rkflashtool") (synopsis "Tools for flashing Rockchip devices") (description "Allows flashing of Rockchip based embedded linux devices. @@ -336,9 +338,7 @@ RK3036, RK3066, RK312X, RK3168, RK3188, RK3288, RK3368.") (install-file "libpit/libpit.a" lib) #t)))))) (inputs - `(("libusb" ,libusb) - ("qtbase" ,qtbase-5) - ("zlib" ,zlib))) + (list libusb qtbase-5 zlib)) (home-page "https://glassechidna.com.au/heimdall/") (synopsis "Flash firmware onto Samsung mobile devices") (description "@command{heimdall} is a tool suite used to flash firmware (aka @@ -396,8 +396,7 @@ dump Intel Firmware Descriptor data of an image file.") "0nw555i0fm5kljha9h47bk70ykbwv8ddfk6qhz6kfqb79vzhy4h2")))) (build-system gnu-build-system) (inputs - `(("pciutils" ,pciutils) - ("zlib" ,zlib))) + (list pciutils zlib)) (arguments `(#:make-flags (list "CC=gcc" @@ -457,7 +456,7 @@ ME as far as possible (it only edits ME firmware image files).") (define-public uefitool (package (name "uefitool") - (version "0.27.0") + (version "0.28.0") (source (origin (method git-fetch) (uri (git-reference @@ -465,7 +464,7 @@ ME as far as possible (it only edits ME firmware image files).") (commit version))) (sha256 (base32 - "1i1p823qld927p4f1wcphqcnivb9mq7fi5xmzibxc3g9zzgnyc2h")) + "1n2hd2dysi5bv2iyq40phh1jxc48gdwzs414vfbxvcharcwapnja")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments @@ -477,10 +476,9 @@ ME as far as possible (it only edits ME firmware image files).") (replace 'install (lambda* (#:key outputs #:allow-other-keys) (install-file "UEFITool" (string-append (assoc-ref outputs "out") - "/bin")) - #t))))) + "/bin"))))))) (inputs - `(("qtbase" ,qtbase-5))) + (list qtbase-5)) (home-page "https://github.com/LongSoft/UEFITool/") (synopsis "UEFI image editor") (description "@code{uefitool} is a graphical image file editor for @@ -506,18 +504,65 @@ Unifinished Extensible Firmware Interface (UEFI) images.") (assoc-ref %build-inputs "bash") "/bin/bash")))) (inputs - `(("boost" ,boost) - ("libgcrypt" ,libgcrypt))) + (list boost libgcrypt)) (native-inputs - `(("bison" ,bison) - ("diffutils" ,diffutils) - ("ghostscript" ,ghostscript) - ("groff" ,groff) - ("libtool" ,libtool) - ("which" ,which))) + (list bison + diffutils + ghostscript + groff + libtool + which)) (home-page "http://srecord.sourceforge.net/") (synopsis "Tools for EPROM files") (description "The SRecord package is a collection of powerful tools for manipulating EPROM load files. It reads and writes numerous EPROM file formats, and can perform many different manipulations.") (license license:gpl3+))) + +(define-public uuu + (package + (name "uuu") + (version "1.4.165") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/NXPmicro/mfgtools") + (commit (string-append "uuu_" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0k309lp27d4k6x4qq0badbk8i47xsc6f3fffz73650iyfs4hcniw")))) + (arguments + `(#: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) + (native-inputs + (list pkg-config)) + (inputs + (list libusb bzip2 zlib libzip openssl)) + (home-page "https://github.com/NXPmicro/mfgtools") + (synopsis "Freescale/NXP I.MX chip image deploy tools") + (description "@code{uuu} is a command line tool, evolved out of MFGTools. +It can be used to upload images to I.MX SoC's using at least their boot ROM.") + (license license:bsd-3))) |