1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
3 ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages flashing-tools)
21 #:use-module (guix licenses)
22 #:use-module (guix download)
23 #:use-module (guix packages)
24 #:use-module (gnu packages)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages bison)
27 #:use-module (gnu packages flex)
28 #:use-module (gnu packages elf)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages libusb)
31 #:use-module (gnu packages libftdi)
32 #:use-module (gnu packages pciutils)
33 #:use-module (gnu packages admin))
35 (define-public flashrom
42 "http://download.flashrom.org/releases/flashrom-"
46 "1s9pc4yls2s1gcg2ar4q75nym2z5v6lxq36bl6lq26br00nj2mas"))
47 (patches (list (search-patch "flashrom-use-libftdi1.patch")))))
48 (build-system gnu-build-system)
49 (inputs `(("dmidecode" ,dmidecode)
50 ("pciutils" ,pciutils)
52 ("libftdi" ,libftdi)))
53 (native-inputs `(("pkg-config" ,pkg-config)))
55 '(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
56 #:tests? #f ; no 'check' target
61 'build 'patch-exec-paths
62 (lambda* (#:key inputs #:allow-other-keys)
66 (string-append (assoc-ref inputs "dmidecode")
67 "/sbin/dmidecode")))))
69 (home-page "http://flashrom.org/")
70 (synopsis "Identify, read, write, erase, and verify ROM/flash chips")
72 "flashrom is a utility for identifying, reading, writing,
73 verifying and erasing flash chips. It is designed to flash
74 BIOS/EFI/coreboot/firmware/optionROM images on mainboards,
75 network/graphics/storage controller cards, and various other
79 (define-public avrdude
86 (uri (string-append "mirror://savannah/avrdude/avrdude-"
90 "0frxg0q09nrm95z7ymzddx7ysl77ilfbdix1m81d9jjpiv5bm64y"))
91 (patches (list (search-patch "avrdude-fix-libusb.patch")))))
92 (build-system gnu-build-system)
96 ("libftdi" ,libftdi)))
100 (home-page "http://www.nongnu.org/avrdude/")
101 (synopsis "AVR downloader and uploader")
103 "AVRDUDE is a utility to download/upload/manipulate the ROM and
104 EEPROM contents of AVR microcontrollers using the in-system programming