From 45f787593768bcb092a0819fcf7d33b071e68757 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 26 Oct 2021 12:45:42 +0000 Subject: gnu: Add uuu. * gnu/packages/flashing-tools.scm (uuu): New variable. --- gnu/packages/flashing-tools.scm | 56 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm index 8b881a5c2c..c5f1abccbf 100644 --- a/gnu/packages/flashing-tools.scm +++ b/gnu/packages/flashing-tools.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice ;;; Copyright © 2021 Ricardo Wurmus +;;; Copyright © 2021 Mathieu Othacehe ;;; ;;; 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 @@ -520,3 +522,55 @@ Unifinished Extensible Firmware Interface (UEFI) images.") 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 + `(("pkg-config" ,pkg-config))) + (inputs + `(("libusb" ,libusb) + ("bzip2" ,bzip2) + ("zlib" ,zlib) + ("libzip" ,libzip) + ("openssl" ,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))) -- cgit 1.4.1