gnu: botan: Update to 2.17.3 [fixes CVE-2021-24115].
[jackhill/guix/guix.git] / gnu / packages / embedded.scm
CommitLineData
35a37efb 1;;; GNU Guix --- Functional package management for GNU
316fa45e 2;;; Copyright © 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
2da8865a 3;;; Copyright © 2016, 2017 Theodoros Foradis <theodoros@foradis.org>
e5e45c06 4;;; Copyright © 2016 David Craven <david@craven.ch>
9be1f2b7 5;;; Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
e35f77e1 6;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
337cb4a0 7;;; Copyright © 2018, 2019, 2021 Clément Lassieur <clement@lassieur.org>
7f6d3f39 8;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
f6ec9f9d 9;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
a613abeb 10;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
35a37efb
RW
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages embedded)
28 #:use-module (guix utils)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix svn-download)
32 #:use-module (guix git-download)
33 #:use-module ((guix licenses) #:prefix license:)
615a7eec 34 #:use-module (guix build-system cmake)
35a37efb 35 #:use-module (guix build-system gnu)
2c2fc24b 36 #:use-module (guix build-system python)
569f6016 37 #:use-module (guix build-system trivial)
29e91f0a 38 #:use-module ((guix build utils) #:select (alist-replace delete-file-recursively))
35a37efb 39 #:use-module (gnu packages)
e35f77e1 40 #:use-module (gnu packages admin)
e5e45c06 41 #:use-module (gnu packages autotools)
8ea42482 42 #:use-module ((gnu packages base) #:prefix base:)
2d7c9213 43 #:use-module (gnu packages bison)
c626e281 44 #:use-module (gnu packages boost)
0b8c90b6 45 #:use-module (gnu packages compression)
35a37efb 46 #:use-module (gnu packages cross-base)
2d7c9213 47 #:use-module (gnu packages dejagnu)
35a37efb 48 #:use-module (gnu packages flex)
dbc3c34e 49 #:use-module (gnu packages gcc)
94f36a4f 50 #:use-module (gnu packages gdb)
8ea42482 51 #:use-module (gnu packages guile)
5b83b7b8 52 #:use-module (gnu packages libftdi)
e5e45c06 53 #:use-module (gnu packages libusb)
e88242cb 54 #:use-module (gnu packages messaging)
35a37efb 55 #:use-module (gnu packages perl)
e5e45c06 56 #:use-module (gnu packages pkg-config)
1a6497de 57 #:use-module (gnu packages python)
a613abeb 58 #:use-module (gnu packages python-crypto)
2c2fc24b 59 #:use-module (gnu packages python-xyz)
1a6497de 60 #:use-module (gnu packages swig)
7894ea61 61 #:use-module (gnu packages texinfo)
cc8d346b 62 #:use-module (gnu packages xorg)
7894ea61 63 #:use-module (srfi srfi-1))
35a37efb
RW
64
65;; We must not use the released GCC sources here, because the cross-compiler
66;; does not produce working binaries. Instead we take the very same SVN
67;; revision from the branch that is used for a release of the "GCC ARM
68;; embedded" project on launchpad.
69;; See https://launchpadlibrarian.net/218827644/release.txt
70(define-public gcc-arm-none-eabi-4.9
71 (let ((xgcc (cross-gcc "arm-none-eabi"
7b3318e3
RW
72 #:xgcc gcc-4.9
73 #:xbinutils (cross-binutils "arm-none-eabi")))
35a37efb
RW
74 (revision "1")
75 (svn-revision 227977))
76 (package (inherit xgcc)
77 (version (string-append (package-version xgcc) "-"
78 revision "." (number->string svn-revision)))
79 (source
80 (origin
81 (method svn-fetch)
82 (uri (svn-reference
83 (url "svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_9-branch/")
84 (revision svn-revision)))
85 (file-name (string-append "gcc-arm-embedded-" version "-checkout"))
86 (sha256
87 (base32
88 "113r98kygy8rrjfv2pd3z6zlfzbj543pq7xyq8bgh72c608mmsbr"))
7894ea61
LC
89
90 ;; Remove the one patch that doesn't apply to this 4.9 snapshot (the
91 ;; patch is for 4.9.4 and later but this svn snapshot is older).
92 (patches (remove (lambda (patch)
93 (string=? (basename patch)
94 "gcc-arm-bug-71399.patch"))
95 (origin-patches (package-source xgcc))))))
35a37efb
RW
96 (native-inputs
97 `(("flex" ,flex)
7f6d3f39 98 ("gcc@5" ,gcc-5)
35a37efb
RW
99 ,@(package-native-inputs xgcc)))
100 (arguments
101 (substitute-keyword-arguments (package-arguments xgcc)
102 ((#:phases phases)
103 `(modify-phases ,phases
7f6d3f39
MB
104 (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
105 (lambda* (#:key inputs #:allow-other-keys)
106 (let ((gcc (assoc-ref inputs "gcc")))
107 ;; Remove the default compiler from CPLUS_INCLUDE_PATH to
108 ;; prevent header conflict with the GCC from native-inputs.
109 (setenv "CPLUS_INCLUDE_PATH"
110 (string-join
111 (delete (string-append gcc "/include/c++")
112 (string-split (getenv "CPLUS_INCLUDE_PATH")
113 #\:))
114 ":"))
115 (format #t
116 "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
117 (getenv "CPLUS_INCLUDE_PATH"))
118 #t)))
35a37efb
RW
119 (add-after 'unpack 'fix-genmultilib
120 (lambda _
121 (substitute* "gcc/genmultilib"
122 (("#!/bin/sh") (string-append "#!" (which "sh"))))
123 #t))))
124 ((#:configure-flags flags)
125 ;; The configure flags are largely identical to the flags used by the
126 ;; "GCC ARM embedded" project.
127 `(append (list "--enable-multilib"
128 "--with-newlib"
129 "--with-multilib-list=armv6-m,armv7-m,armv7e-m"
130 "--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm"
131 "--enable-plugins"
132 "--disable-decimal-float"
133 "--disable-libffi"
134 "--disable-libgomp"
135 "--disable-libmudflap"
136 "--disable-libquadmath"
137 "--disable-libssp"
138 "--disable-libstdcxx-pch"
139 "--disable-nls"
140 "--disable-shared"
141 "--disable-threads"
142 "--disable-tls")
143 (delete "--disable-multilib" ,flags)))))
144 (native-search-paths
145 (list (search-path-specification
146 (variable "CROSS_C_INCLUDE_PATH")
147 (files '("arm-none-eabi/include")))
148 (search-path-specification
149 (variable "CROSS_CPLUS_INCLUDE_PATH")
150 (files '("arm-none-eabi/include")))
151 (search-path-specification
152 (variable "CROSS_LIBRARY_PATH")
153 (files '("arm-none-eabi/lib"))))))))
6c39886a 154
dbc3c34e
TF
155(define-public gcc-arm-none-eabi-6
156 (package
157 (inherit gcc-arm-none-eabi-4.9)
158 (version (package-version gcc-6))
159 (source (origin (inherit (package-source gcc-6))
160 (patches
161 (append
162 (origin-patches (package-source gcc-6))
163 (search-patches "gcc-6-cross-environment-variables.patch"
164 "gcc-6-arm-none-eabi-multilib.patch")))))))
165
6c39886a
RW
166(define-public newlib-arm-none-eabi
167 (package
168 (name "newlib")
169 (version "2.4.0")
170 (source (origin
171 (method url-fetch)
172 (uri (string-append "ftp://sourceware.org/pub/newlib/newlib-"
173 version ".tar.gz"))
174 (sha256
175 (base32
176 "01i7qllwicf05vsvh39qj7qp5fdifpvvky0x95hjq39mbqiksnsl"))))
177 (build-system gnu-build-system)
178 (arguments
179 `(#:out-of-source? #t
180 ;; The configure flags are identical to the flags used by the "GCC ARM
181 ;; embedded" project.
182 #:configure-flags '("--target=arm-none-eabi"
183 "--enable-newlib-io-long-long"
184 "--enable-newlib-register-fini"
185 "--disable-newlib-supplied-syscalls"
186 "--disable-nls")
187 #:phases
188 (modify-phases %standard-phases
189 (add-after 'unpack 'fix-references-to-/bin/sh
190 (lambda _
191 (substitute* '("libgloss/arm/cpu-init/Makefile.in"
192 "libgloss/arm/Makefile.in"
193 "libgloss/libnosys/Makefile.in"
194 "libgloss/Makefile.in")
195 (("/bin/sh") (which "sh")))
196 #t)))))
197 (native-inputs
198 `(("xbinutils" ,(cross-binutils "arm-none-eabi"))
199 ("xgcc" ,gcc-arm-none-eabi-4.9)
200 ("texinfo" ,texinfo)))
2196e3cc 201 (home-page "https://www.sourceware.org/newlib/")
6c39886a
RW
202 (synopsis "C library for use on embedded systems")
203 (description "Newlib is a C library intended for use on embedded
204systems. It is a conglomeration of several library parts that are easily
205usable on embedded products.")
206 (license (license:non-copyleft
207 "https://www.sourceware.org/newlib/COPYING.NEWLIB"))))
a299a899
RW
208
209(define-public newlib-nano-arm-none-eabi
210 (package (inherit newlib-arm-none-eabi)
211 (name "newlib-nano")
212 (arguments
213 (substitute-keyword-arguments (package-arguments newlib-arm-none-eabi)
214 ;; The configure flags are identical to the flags used by the "GCC ARM
215 ;; embedded" project. They optimize newlib for use on small embedded
216 ;; systems with limited memory.
217 ((#:configure-flags flags)
218 ''("--target=arm-none-eabi"
219 "--enable-multilib"
220 "--disable-newlib-supplied-syscalls"
221 "--enable-newlib-reent-small"
222 "--disable-newlib-fvwrite-in-streamio"
223 "--disable-newlib-fseek-optimization"
224 "--disable-newlib-wide-orient"
225 "--enable-newlib-nano-malloc"
226 "--disable-newlib-unbuf-stream-opt"
227 "--enable-lite-exit"
228 "--enable-newlib-global-atexit"
229 "--enable-newlib-nano-formatted-io"
230 "--disable-nls"))))
231 (synopsis "Newlib variant for small systems with limited memory")))
569f6016 232
04c4ef35
RW
233\f
234;;; The following definitions are for the "7-2018-q2-update" variant of the
235;;; ARM cross toolchain as offered on https://developer.arm.com
236(define-public gcc-arm-none-eabi-7-2018-q2-update
237 (let ((xgcc (cross-gcc "arm-none-eabi"
238 #:xgcc gcc-7
239 #:xbinutils (cross-binutils "arm-none-eabi")))
240 (revision "1")
241 (svn-revision 261907))
242 (package (inherit xgcc)
243 (version (string-append "7-2018-q2-update-"
244 revision "." (number->string svn-revision)))
245 (source
246 (origin
247 (method svn-fetch)
248 (uri (svn-reference
249 (url "svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-7-branch/")
250 (revision svn-revision)))
251 (file-name (string-append "gcc-arm-embedded-" version "-checkout"))
252 (sha256
253 (base32
254 "192ggs63bixf3irpijgfkjks73yx1r3a4i6grk1y0i0iny76pmx5"))
255 (patches
256 (append
257 (origin-patches (package-source gcc-7))
258 (search-patches "gcc-7-cross-environment-variables.patch")))))
259 (native-inputs
840d7034 260 `(("flex" ,flex)
04c4ef35
RW
261 ("isl" ,isl-0.18)
262 ,@(alist-delete "isl" (package-native-inputs xgcc))))
263 (arguments
264 (substitute-keyword-arguments (package-arguments xgcc)
265 ((#:phases phases)
266 `(modify-phases ,phases
267 (add-after 'unpack 'expand-version-string
268 (lambda _
269 (make-file-writable "gcc/DEV-PHASE")
270 (with-output-to-file "gcc/DEV-PHASE"
271 (lambda ()
272 (display "7-2018-q2-update")))
273 #t))
274 (add-after 'unpack 'fix-genmultilib
275 (lambda _
276 (substitute* "gcc/genmultilib"
277 (("#!/bin/sh") (string-append "#!" (which "sh"))))
f6ec9f9d
BH
278 #t))
279 (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH
280 (lambda* (#:key inputs #:allow-other-keys)
281 (let ((gcc (assoc-ref inputs "gcc")))
282 ;; Remove the default compiler from CPLUS_INCLUDE_PATH to
283 ;; prevent header conflict with the GCC from native-inputs.
284 (setenv "CPLUS_INCLUDE_PATH"
285 (string-join
286 (delete (string-append gcc "/include/c++")
287 (string-split (getenv "CPLUS_INCLUDE_PATH")
288 #\:))
289 ":"))
290 (format #t
291 "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
292 (getenv "CPLUS_INCLUDE_PATH"))
293 #t)))))
04c4ef35
RW
294 ((#:configure-flags flags)
295 ;; The configure flags are largely identical to the flags used by the
296 ;; "GCC ARM embedded" project.
297 `(append (list "--enable-multilib"
298 "--with-newlib"
299 "--with-multilib-list=rmprofile"
300 "--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm"
301 "--enable-plugins"
302 "--disable-decimal-float"
303 "--disable-libffi"
304 "--disable-libgomp"
305 "--disable-libmudflap"
306 "--disable-libquadmath"
307 "--disable-libssp"
308 "--disable-libstdcxx-pch"
309 "--disable-nls"
310 "--disable-shared"
311 "--disable-threads"
312 "--disable-tls")
313 (delete "--disable-multilib" ,flags)))))
314 (native-search-paths
315 (list (search-path-specification
316 (variable "CROSS_C_INCLUDE_PATH")
317 (files '("arm-none-eabi/include")))
318 (search-path-specification
319 (variable "CROSS_CPLUS_INCLUDE_PATH")
320 (files '("arm-none-eabi/include")))
321 (search-path-specification
322 (variable "CROSS_LIBRARY_PATH")
323 (files '("arm-none-eabi/lib"))))))))
324
5c792737
RW
325(define-public newlib-arm-none-eabi-7-2018-q2-update
326 ;; This is the same commit as used for the 7-2018-q2-update release
327 ;; according to the release.txt.
328 (let ((commit "3ccfb407af410ba7e54ea0da11ae1e40b554a6f4")
329 (revision "0"))
330 (package
331 (inherit newlib-arm-none-eabi)
332 (version (git-version "3.0.0" revision commit))
333 (source
334 (origin
335 (method git-fetch)
336 (uri (git-reference
337 (url "http://sourceware.org/git/newlib-cygwin.git")
338 (commit commit)))
339 (file-name (git-file-name "newlib" commit))
340 (sha256
341 (base32
342 "1dq23fqrk75g1a4v7569fvnnw5q440zawbxi3w0g05n8jlqsmvcy"))))
343 (arguments
344 (substitute-keyword-arguments (package-arguments newlib-arm-none-eabi)
345 ;; The configure flags are identical to the flags used by the "GCC ARM
346 ;; embedded" project.
347 ((#:configure-flags flags)
348 `(cons* "--enable-newlib-io-c99-formats"
349 "--enable-newlib-retargetable-locking"
350 "--with-headers=yes"
351 ,flags))))
352 (native-inputs
353 `(("xbinutils" ,(cross-binutils "arm-none-eabi"))
354 ("xgcc" ,gcc-arm-none-eabi-7-2018-q2-update)
355 ("texinfo" ,texinfo))))))
356
f08eed3d
RW
357(define-public newlib-nano-arm-none-eabi-7-2018-q2-update
358 (package (inherit newlib-arm-none-eabi-7-2018-q2-update)
359 (name "newlib-nano")
360 (arguments
361 (package-arguments newlib-nano-arm-none-eabi))
362 (synopsis "Newlib variant for small systems with limited memory")))
363
364\f
1a1e8336
RW
365(define (make-libstdc++-arm-none-eabi xgcc newlib)
366 (let ((libstdc++ (make-libstdc++ xgcc)))
367 (package (inherit libstdc++)
368 (name "libstdc++-arm-none-eabi")
369 (arguments
370 (substitute-keyword-arguments (package-arguments libstdc++)
371 ((#:configure-flags flags)
372 ``("--target=arm-none-eabi"
373 "--host=arm-none-eabi"
374 "--disable-libstdcxx-pch"
375 "--enable-multilib"
376 "--with-multilib-list=armv6-m,armv7-m,armv7e-m"
377 "--disable-shared"
378 "--disable-tls"
379 "--disable-plugin"
380 "--with-newlib"
381 ,(string-append "--with-gxx-include-dir="
382 (assoc-ref %outputs "out")
383 "/arm-none-eabi/include")))))
384 (native-inputs
385 `(("newlib" ,newlib)
386 ("xgcc" ,xgcc)
387 ,@(package-native-inputs libstdc++))))))
388
569f6016
TF
389(define (arm-none-eabi-toolchain xgcc newlib)
390 "Produce a cross-compiler toolchain package with the compiler XGCC and the C
391library variant NEWLIB."
392 (let ((newlib-with-xgcc (package (inherit newlib)
393 (native-inputs
394 (alist-replace "xgcc" (list xgcc)
395 (package-native-inputs newlib))))))
396 (package
397 (name (string-append "arm-none-eabi"
398 (if (string=? (package-name newlib-with-xgcc)
399 "newlib-nano")
400 "-nano" "")
401 "-toolchain"))
402 (version (package-version xgcc))
403 (source #f)
404 (build-system trivial-build-system)
9cdf4872
RW
405 (arguments
406 '(#:modules ((guix build union))
407 #:builder
408 (begin
409 (use-modules (ice-9 match)
410 (guix build union))
411 (match %build-inputs
412 (((names . directories) ...)
413 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
414 directories)
415 #t)))))
569f6016
TF
416 (propagated-inputs
417 `(("binutils" ,(cross-binutils "arm-none-eabi"))
8ea169d0 418 ("libstdc++" ,(make-libstdc++-arm-none-eabi xgcc newlib-with-xgcc))
569f6016
TF
419 ("gcc" ,xgcc)
420 ("newlib" ,newlib-with-xgcc)))
421 (synopsis "Complete GCC tool chain for ARM bare metal development")
422 (description "This package provides a complete GCC tool chain for ARM
423bare metal development. This includes the GCC arm-none-eabi cross compiler
424and newlib (or newlib-nano) as the C library. The supported programming
425languages are C and C++.")
426 (home-page (package-home-page xgcc))
427 (license (package-license xgcc)))))
428
429(define-public arm-none-eabi-toolchain-4.9
430 (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9
431 newlib-arm-none-eabi))
432
433(define-public arm-none-eabi-nano-toolchain-4.9
434 (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9
435 newlib-nano-arm-none-eabi))
436
437(define-public arm-none-eabi-toolchain-6
438 (arm-none-eabi-toolchain gcc-arm-none-eabi-6
439 newlib-arm-none-eabi))
440
441(define-public arm-none-eabi-nano-toolchain-6
442 (arm-none-eabi-toolchain gcc-arm-none-eabi-6
443 newlib-nano-arm-none-eabi))
94f36a4f 444
893960ee
RW
445(define-public arm-none-eabi-toolchain-7-2018-q2-update
446 (arm-none-eabi-toolchain gcc-arm-none-eabi-7-2018-q2-update
447 newlib-arm-none-eabi-7-2018-q2-update))
448
ee9e108a
RW
449(define-public arm-none-eabi-nano-toolchain-7-2018-q2-update
450 (arm-none-eabi-toolchain gcc-arm-none-eabi-7-2018-q2-update
451 newlib-nano-arm-none-eabi-7-2018-q2-update))
452
94f36a4f
TF
453(define-public gdb-arm-none-eabi
454 (package
455 (inherit gdb)
456 (name "gdb-arm-none-eabi")
457 (arguments
458 `(#:configure-flags '("--target=arm-none-eabi"
459 "--enable-multilib"
460 "--enable-interwork"
461 "--enable-languages=c,c++"
462 "--disable-nls")
463 ,@(package-arguments gdb)))))
e5e45c06
DC
464
465(define-public libjaylink
2eacb95a
MFG
466 (package
467 (name "libjaylink")
468 (version "0.2.0")
469 (source (origin
470 (method git-fetch)
471 (uri (git-reference
472 (url "https://repo.or.cz/libjaylink.git")
473 (commit version)))
474 (file-name (git-file-name name version))
475 (sha256
476 (base32
477 "0ndyfh51hiqyv2yscpj6qd091w7myxxjid3a6rx8f6k233vy826q"))))
478 (build-system gnu-build-system)
479 (native-inputs
480 `(("autoconf" ,autoconf)
481 ("automake" ,automake)
482 ("libtool" ,libtool)
483 ("pkg-config" ,pkg-config)))
484 (inputs
485 `(("libusb" ,libusb)))
486 (home-page "https://repo.or.cz/w/libjaylink.git")
487 (synopsis "Library to interface Segger J-Link devices")
488 (description "libjaylink is a shared library written in C to access
e5e45c06 489SEGGER J-Link and compatible devices.")
2eacb95a 490 (license license:gpl2+)))
91ba6935
DC
491
492(define-public jimtcl
493 (package
494 (name "jimtcl")
e35f77e1 495 (version "0.80")
91ba6935 496 (source (origin
cc17b07a
EF
497 (method git-fetch)
498 (uri (git-reference
499 (url "https://github.com/msteveb/jimtcl")
500 (commit version)))
501 (file-name (git-file-name name version))
91ba6935
DC
502 (sha256
503 (base32
e35f77e1 504 "06rn60cx9sapc175vxvan87b8j5rkhh5gvvz7343xznzwlr0wcgk"))))
91ba6935
DC
505 (build-system gnu-build-system)
506 (arguments
507 `(#:phases
508 (modify-phases %standard-phases
91ba6935 509 (replace 'configure
e35f77e1 510 ;; This package doesn't use autoconf.
91ba6935
DC
511 (lambda* (#:key outputs #:allow-other-keys)
512 (let ((out (assoc-ref outputs "out")))
78854b38 513 (invoke "./configure"
e35f77e1
TGR
514 (string-append "--prefix=" out)))))
515 (add-before 'check 'delete-failing-tests
516 (lambda _
517 ;; XXX All but 1 TTY tests fail (Inappropriate ioctl for device).
518 (delete-file "tests/tty.test")
519 #t))
520 )))
521 (native-inputs
522 ;; For tests.
523 `(("inetutils" ,inetutils))) ; for hostname
fd7ad899 524 (home-page "http://jim.tcl.tk/index.html")
91ba6935
DC
525 (synopsis "Small footprint Tcl implementation")
526 (description "Jim is a small footprint implementation of the Tcl programming
527language.")
528 (license license:bsd-2)))
5b83b7b8
TF
529
530(define-public openocd
cad55e91
MFG
531 (let ((commit "9a877a83a1c8b1f105cdc0de46c5cbc4d9e8799e")
532 (revision "0"))
533 (package
534 (name "openocd")
535 (version (string-append "0.10.0-" revision "."
536 (string-take commit 7)))
537 (source (origin
538 (method git-fetch)
539 (uri (git-reference
540 (url "https://git.code.sf.net/p/openocd/code")
541 (commit commit)))
542 (file-name (string-append name "-" version "-checkout"))
543 (sha256
544 (base32
545 "1q536cp80v2bcy6xwk08f1r2ljyw13jchx3a1z7d3ni3vqql7rc6"))))
546 (build-system gnu-build-system)
547 (native-inputs
548 `(("autoconf" ,autoconf)
549 ("automake" ,automake)
550 ("libtool" ,libtool)
551 ("which" ,base:which)
552 ("pkg-config" ,pkg-config)))
553 (inputs
554 `(("hidapi" ,hidapi)
555 ("jimtcl" ,jimtcl)
556 ("libftdi" ,libftdi)
557 ("libjaylink" ,libjaylink)
558 ("libusb-compat" ,libusb-compat)))
559 (arguments
560 '(#:configure-flags
dcb95c6f
MS
561 (append (list "LIBS=-lutil"
562 "--disable-werror"
cad55e91
MFG
563 "--enable-sysfsgpio"
564 "--disable-internal-jimtcl"
565 "--disable-internal-libjaylink")
566 (map (lambda (programmer)
567 (string-append "--enable-" programmer))
568 '("amtjtagaccel" "armjtagew" "buspirate" "ftdi"
569 "gw16012" "jlink" "opendous" "osbdm"
570 "parport" "aice" "cmsis-dap" "dummy" "jtag_vpi"
571 "remote-bitbang" "rlink" "stlink" "ti-icdi" "ulink"
572 "usbprog" "vsllink" "usb-blaster-2" "usb_blaster"
573 "presto" "openjtag")))
574 #:phases
575 (modify-phases %standard-phases
576 (replace 'bootstrap
577 (lambda _
578 (patch-shebang "bootstrap")
579 (invoke "./bootstrap" "nosubmodule")))
580 (add-after 'autoreconf 'change-udev-group
581 (lambda _
582 (substitute* "contrib/60-openocd.rules"
583 (("plugdev") "dialout"))
584 #t))
585 (add-after 'install 'install-udev-rules
586 (lambda* (#:key outputs #:allow-other-keys)
587 (install-file "contrib/60-openocd.rules"
588 (string-append
589 (assoc-ref outputs "out")
590 "/lib/udev/rules.d/"))
591 #t)))))
592 (home-page "http://openocd.org")
593 (synopsis "On-Chip Debugger")
594 (description "OpenOCD provides on-chip programming and debugging support
5b83b7b8 595with a layered architecture of JTAG interface and TAP support.")
cad55e91 596 (license license:gpl2+))))
2d7c9213 597
791cfa67
RW
598;; The commits for all propeller tools are the stable versions published at
599;; https://github.com/propellerinc/propgcc in the release_1_0. According to
600;; personal correspondence with the developers in July 2017, more recent
601;; versions are currently incompatible with the "Simple Libraries".
2d7c9213
RW
602
603(define propeller-binutils
604 (let ((xbinutils (cross-binutils "propeller-elf"))
791cfa67
RW
605 (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
606 (revision "2"))
2d7c9213
RW
607 (package
608 (inherit xbinutils)
609 (name "propeller-binutils")
610 (version (string-append "0.0.0-" revision "." (string-take commit 9)))
611 (source (origin (inherit (package-source xbinutils))
612 (method git-fetch)
613 (uri (git-reference
b0e7b699 614 (url "https://github.com/parallaxinc/propgcc")
2d7c9213
RW
615 (commit commit)))
616 (file-name (string-append name "-" commit "-checkout"))
617 (sha256
618 (base32
791cfa67
RW
619 "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))
620 (patch-flags (list "-p1" "--directory=binutils"))))
2d7c9213 621 (arguments
791cfa67 622 `(;; FIXME: For some reason there are many test failures. It's not
2d7c9213
RW
623 ;; obvious how to fix the failures.
624 #:tests? #f
625 #:phases
626 (modify-phases %standard-phases
791cfa67
RW
627 (add-after 'unpack 'chdir
628 (lambda _ (chdir "binutils") #t)))
629 ,@(substitute-keyword-arguments (package-arguments xbinutils)
630 ((#:configure-flags flags)
631 `(cons "--disable-werror" ,flags)))))
2d7c9213
RW
632 (native-inputs
633 `(("bison" ,bison)
5e54f4ad 634 ("flex" ,flex)
2d7c9213
RW
635 ("texinfo" ,texinfo)
636 ("dejagnu" ,dejagnu)
637 ,@(package-native-inputs xbinutils))))))
638
bb19b2eb 639(define-public propeller-gcc-6
68cb2784 640 (let ((xgcc (cross-gcc "propeller-elf"
7b3318e3 641 #:xbinutils propeller-binutils))
68cb2784
RW
642 (commit "b4f45a4725e0b6d0af59e594c4e3e35ca4105867")
643 (revision "1"))
644 (package (inherit xgcc)
645 (name "propeller-gcc")
646 (version (string-append "6.0.0-" revision "." (string-take commit 9)))
647 (source (origin
648 (method git-fetch)
649 (uri (git-reference
b0e7b699 650 (url "https://github.com/totalspectrum/gcc-propeller")
68cb2784
RW
651 (commit commit)))
652 (file-name (string-append name "-" commit "-checkout"))
653 (sha256
654 (base32
655 "0d9kdxm2fzanjqa7q5850kzbsfl0fqyaahxn74h6nkxxacwa11zb"))
656 (patches
657 (append
658 (origin-patches (package-source gcc-6))
659 (search-patches "gcc-cross-environment-variables.patch")))))
660 (native-inputs
661 `(("flex" ,flex)
662 ,@(package-native-inputs xgcc)))
663 ;; All headers and cross libraries of the propeller toolchain are
664 ;; installed under the "propeller-elf" prefix.
665 (native-search-paths
666 (list (search-path-specification
667 (variable "CROSS_C_INCLUDE_PATH")
668 (files '("propeller-elf/include")))
669 (search-path-specification
670 (variable "CROSS_LIBRARY_PATH")
671 (files '("propeller-elf/lib")))))
672 (home-page "https://github.com/totalspectrum/gcc-propeller")
673 (synopsis "GCC for the Parallax Propeller"))))
674
db90eb8c 675(define-public propeller-gcc-4
bb19b2eb 676 (let ((xgcc propeller-gcc-6)
791cfa67
RW
677 (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
678 (revision "2"))
db90eb8c
RW
679 (package (inherit xgcc)
680 (name "propeller-gcc")
681 (version (string-append "4.6.1-" revision "." (string-take commit 9)))
682 (source (origin
683 (method git-fetch)
684 (uri (git-reference
b0e7b699 685 (url "https://github.com/parallaxinc/propgcc")
db90eb8c
RW
686 (commit commit)))
687 (file-name (string-append name "-" commit "-checkout"))
688 (sha256
689 (base32
791cfa67
RW
690 "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))
691 (patch-flags (list "-p1" "--directory=gcc"))
db90eb8c
RW
692 (patches
693 (append
694 (origin-patches (package-source gcc-4.7))
1d3be5d9
RW
695 (search-patches "gcc-4.6-gnu-inline.patch"
696 "gcc-cross-environment-variables.patch")))))
791cfa67
RW
697 (arguments
698 (substitute-keyword-arguments (package-arguments propeller-gcc-6)
699 ((#:phases phases)
700 `(modify-phases ,phases
701 (add-after 'unpack 'chdir
702 (lambda _ (chdir "gcc") #t))))))
8226304b
RW
703 (native-inputs
704 `(("gcc-4" ,gcc-4.9)
705 ,@(package-native-inputs propeller-gcc-6)))
791cfa67 706 (home-page "https://github.com/parallaxinc/propgcc")
57e96e48 707 (supported-systems (delete "aarch64-linux" %supported-systems)))))
db90eb8c 708
bb19b2eb
RW
709;; Version 6 is experimental and may not work correctly. This is why we
710;; default to version 4, which is also used in the binary toolchain bundle
711;; provided by Parallax Inc.
712(define-public propeller-gcc propeller-gcc-4)
713
791cfa67
RW
714
715;; FIXME: We do not build the tiny library because that would require C++
716;; headers, which are not available. This may require adding a propeller-elf
717;; variant of the libstdc++ package.
0d0079b2 718(define-public proplib
791cfa67
RW
719 (let ((commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
720 (revision "2"))
0d0079b2
RW
721 (package
722 (name "proplib")
723 (version (string-append "0.0.0-" revision "." (string-take commit 9)))
724 (source (origin
725 (method git-fetch)
726 (uri (git-reference
b0e7b699 727 (url "https://github.com/parallaxinc/propgcc")
0d0079b2
RW
728 (commit commit)))
729 (file-name (string-append name "-" commit "-checkout"))
730 (sha256
731 (base32
791cfa67 732 "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))))
0d0079b2
RW
733 (build-system gnu-build-system)
734 (arguments
735 `(#:tests? #f ; no tests
736 #:make-flags
737 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
738 (string-append "BUILD=" (getcwd) "/build"))
739 #:phases
740 (modify-phases %standard-phases
741 (delete 'configure)
791cfa67
RW
742 (add-after 'unpack 'chdir
743 (lambda _ (chdir "lib") #t))
744 (add-after 'chdir 'fix-Makefile
0d0079b2
RW
745 (lambda _
746 (substitute* "Makefile"
0d0079b2
RW
747 ;; Control the installation time of the headers.
748 ((" install-includes") ""))
749 #t))
750 ;; The Makefile does not separate building from installation, so we
751 ;; have to create the target directories at build time.
752 (add-before 'build 'create-target-directories
753 (lambda* (#:key make-flags #:allow-other-keys)
5cb9754c 754 (apply invoke "make" "install-dirs" make-flags)))
0d0079b2
RW
755 (add-before 'build 'set-cross-environment-variables
756 (lambda* (#:key outputs #:allow-other-keys)
757 (setenv "CROSS_LIBRARY_PATH"
758 (string-append (assoc-ref outputs "out")
759 "/propeller-elf/lib:"
760 (or (getenv "CROSS_LIBRARY_PATH") "")))
761 (setenv "CROSS_C_INCLUDE_PATH"
762 (string-append (assoc-ref outputs "out")
763 "/propeller-elf/include:"
764 (or (getenv "CROSS_C_INCLUDE_PATH") "")))
765 #t))
791cfa67 766 (add-before 'install 'install-includes
0d0079b2 767 (lambda* (#:key make-flags #:allow-other-keys)
5cb9754c 768 (apply invoke "make" "install-includes" make-flags))))))
0d0079b2
RW
769 (native-inputs
770 `(("propeller-gcc" ,propeller-gcc)
771 ("propeller-binutils" ,propeller-binutils)
772 ("perl" ,perl)))
791cfa67 773 (home-page "https://github.com/parallaxinc/propgcc")
0d0079b2
RW
774 (synopsis "C library for the Parallax Propeller")
775 (description "This is a C library for the Parallax Propeller
776micro-controller.")
777 ;; Most of the code is released under the Expat license. Some of the
778 ;; included code is public domain and some changes are BSD licensed.
779 (license license:expat))))
780
eb88fbaf
RW
781(define-public propeller-toolchain
782 (package
783 (name "propeller-toolchain")
784 (version (package-version propeller-gcc))
785 (source #f)
786 (build-system trivial-build-system)
e3cfef22 787 (arguments '(#:builder (begin (mkdir %output) #t)))
eb88fbaf
RW
788 (propagated-inputs
789 `(("binutils" ,propeller-binutils)
790 ("libc" ,proplib)
791 ("gcc" ,propeller-gcc)))
792 (synopsis "Complete GCC tool chain for Propeller micro-controllers")
793 (description "This package provides a complete GCC tool chain for
794Propeller micro-controller development.")
795 (home-page (package-home-page propeller-gcc))
796 (license (package-license propeller-gcc))))
797
150e0a1e
RW
798(define-public openspin
799 (package
800 (name "openspin")
801 (version "1.00.78")
802 (source (origin
9be1f2b7
EF
803 (method git-fetch)
804 (uri (git-reference
805 (url "https://github.com/parallaxinc/OpenSpin")
806 (commit version)))
807 (file-name (git-file-name name version))
150e0a1e
RW
808 (sha256
809 (base32
9be1f2b7 810 "0ghk8hj4717ydhqzx2pfs6737s1cxng6sgg2xgbkwvcfclxdbrd0"))))
150e0a1e
RW
811 (build-system gnu-build-system)
812 (arguments
813 `(#:tests? #f ; no tests
814 #:phases
815 (modify-phases %standard-phases
816 (delete 'configure)
817 (add-after 'unpack 'remove-timestamp
818 (lambda _
819 (substitute* "SpinSource/openspin.cpp"
820 ((" Compiled on.*$") "\\n\");"))
821 #t))
822 ;; Makefile does not include "install" target
823 (replace 'install
824 (lambda* (#:key outputs #:allow-other-keys)
825 (let ((bin (string-append (assoc-ref outputs "out")
826 "/bin")))
827 (mkdir-p bin)
828 (install-file "build/openspin" bin)
829 #t))))))
830 (home-page "https://github.com/parallaxinc/OpenSpin")
831 (synopsis "Spin/PASM compiler for the Parallax Propeller")
832 (description "OpenSpin is a compiler for the Spin/PASM language of the
833Parallax Propeller. It was ported from Chip Gracey's original x86 assembler
834code.")
835 (license license:expat)))
836
c6b96af7 837(define-public propeller-load
791cfa67
RW
838 (let ((commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3")
839 (revision "2"))
c6b96af7
RW
840 (package
841 (name "propeller-load")
842 (version "3.4.0")
843 (source (origin
844 (method git-fetch)
845 (uri (git-reference
b0e7b699 846 (url "https://github.com/parallaxinc/propgcc")
c6b96af7
RW
847 (commit commit)))
848 (file-name (string-append name "-" commit "-checkout"))
849 (sha256
850 (base32
791cfa67 851 "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck"))))
c6b96af7
RW
852 (build-system gnu-build-system)
853 (arguments
854 `(#:tests? #f ; no tests
855 #:make-flags
856 (list "OS=linux"
857 (string-append "TARGET=" (assoc-ref %outputs "out")))
858 #:phases
859 (modify-phases %standard-phases
791cfa67
RW
860 (add-after 'unpack 'chdir
861 (lambda _ (chdir "loader") #t))
c6b96af7
RW
862 (delete 'configure))))
863 (native-inputs
864 `(("openspin" ,openspin)
865 ("propeller-toolchain" ,propeller-toolchain)))
791cfa67 866 (home-page "https://github.com/parallaxinc/propgcc")
c6b96af7
RW
867 (synopsis "Loader for Parallax Propeller micro-controllers")
868 (description "This package provides the tool @code{propeller-load} to
869upload binaries to a Parallax Propeller micro-controller.")
870 (license license:expat))))
871
0a7860c4
RW
872(define-public spin2cpp
873 (package
874 (name "spin2cpp")
4886d5b2 875 (version "3.6.4")
0a7860c4 876 (source (origin
02aab3df
EF
877 (method git-fetch)
878 (uri (git-reference
879 (url "https://github.com/totalspectrum/spin2cpp")
880 (commit (string-append "v" version))))
881 (file-name (git-file-name name version))
0a7860c4
RW
882 (sha256
883 (base32
02aab3df 884 "0wznqvsckzzz4hdy2rpvj6jqpxw4yn7i0c7zxfm6i46k8gg9327b"))))
0a7860c4
RW
885 (build-system gnu-build-system)
886 (arguments
887 `(#:tests? #f ;; The tests assume that a micro-controller is connected.
888 #:phases
889 (modify-phases %standard-phases
890 (delete 'configure)
891 (add-before 'build 'set-cross-environment-variables
892 (lambda* (#:key inputs #:allow-other-keys)
893 (setenv "CROSS_LIBRARY_PATH"
894 (string-append (assoc-ref inputs "propeller-toolchain")
895 "/propeller-elf/lib"))
896 (setenv "CROSS_C_INCLUDE_PATH"
897 (string-append (assoc-ref inputs "propeller-toolchain")
898 "/propeller-elf/include"))
899 #t))
900 (replace 'install
901 (lambda* (#:key outputs #:allow-other-keys)
902 (let ((bin (string-append (assoc-ref outputs "out")
903 "/bin")))
904 (for-each (lambda (file)
905 (install-file (string-append "build/" file)
906 bin))
907 '("testlex" "spin2cpp" "fastspin")))
908 #t)))))
909 (native-inputs
910 `(("bison" ,bison)
911 ("propeller-load" ,propeller-load)
912 ("propeller-toolchain" ,propeller-toolchain)))
913 (home-page "https://github.com/totalspectrum/spin2cpp")
914 (synopsis "Convert Spin code to C, C++, or PASM code")
915 (description "This is a set of tools for converting the Spin language for
916the Parallax Propeller micro-controller into C or C++ code, into PASM, or even
917directly into an executable binary. The binaries produced use LMM PASM, so
918they are much faster than regular Spin bytecodes (but also quite a bit
919larger).")
920 (license license:expat)))
921
3ebc86d9
RW
922(define-public spinsim
923 (let ((commit "66915a7ad1a3a2cf990a725bb341fab8d11eb620")
924 (revision "1"))
925 (package
926 (name "spinsim")
927 (version (string-append "0.75-" revision "." (string-take commit 9)))
928 (source (origin
929 (method git-fetch)
930 (uri (git-reference
b0e7b699 931 (url "https://github.com/parallaxinc/spinsim")
3ebc86d9
RW
932 (commit commit)))
933 (file-name (string-append name "-" commit "-checkout"))
934 (sha256
935 (base32
936 "1n9kdhlxsdx7bz6c80w8dhi96zp633gd6qs0x9i4ii8qv4i7sj5k"))))
937 (build-system gnu-build-system)
938 (arguments
939 `(#:tests? #f ; no tests
940 #:phases
941 (modify-phases %standard-phases
942 (delete 'configure)
943 (replace 'install
944 (lambda* (#:key outputs #:allow-other-keys)
945 (let ((bin (string-append (assoc-ref outputs "out")
946 "/bin")))
947 (install-file "build/spinsim" bin))
948 #t)))))
949 (home-page "https://github.com/parallaxinc/spinsim")
950 (synopsis "Spin simulator")
951 (description "This package provides the tool @code{spinsim}, a simulator
952and simple debugger for Spin programs written for a Parallax Propeller
953micro-controller. Spinsim supports execution from cog memory and hub
954execution, but it does not support multi-tasking. It supports about
955two-thirds of the opcodes in the P2 instruction set.")
956 (license license:expat))))
957
395bbfdb
RW
958(define-public propeller-development-suite
959 (package
960 (name "propeller-development-suite")
961 (version (package-version propeller-gcc))
962 (source #f)
963 (build-system trivial-build-system)
e3cfef22 964 (arguments '(#:builder (begin (mkdir %output) #t)))
395bbfdb
RW
965 (propagated-inputs
966 `(("toolchain" ,propeller-toolchain)
967 ("openspin" ,openspin)
968 ("propeller-load" ,propeller-load)
969 ("spin2cpp" ,spin2cpp)
970 ("spinsim" ,spinsim)))
971 (synopsis "Complete development suite for Propeller micro-controllers")
972 (description "This meta-package provides a complete environment for the
973development with Parallax Propeller micro-controllers. It includes the GCC
974toolchain, the loader, the Openspin compiler, the Spin2cpp tool, and the Spin
975simulator.")
976 (home-page (package-home-page propeller-gcc))
977 (license (package-license propeller-gcc))))
8ea42482
DM
978
979(define-public binutils-vc4
980 (let ((commit "708acc851880dbeda1dd18aca4fd0a95b2573b36"))
981 (package
982 (name "binutils-vc4")
983 (version (string-append "2.23.51-0." (string-take commit 7)))
984 (source (origin
985 (method git-fetch)
986 (uri (git-reference
b0e7b699 987 (url "https://github.com/puppeh/binutils-vc4")
8ea42482 988 (commit commit)))
493ae57e 989 (file-name (string-append name "-" version "-checkout"))
8ea42482
DM
990 (sha256
991 (base32
992 "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63"))))
993 (build-system gnu-build-system)
994 (arguments
995 `(#:configure-flags '("--target=vc4-elf"
996 "--disable-werror"
997 "--enable-cgen-maint")
998 #:phases
999 (modify-phases %standard-phases
1000 (add-after 'unpack 'unpack-cgen
1001 (lambda* (#:key inputs #:allow-other-keys)
1002 (copy-recursively (string-append (assoc-ref inputs "cgen")
1003 "/cgen") "cgen")
1004 #t))
1005 (add-after 'unpack-cgen 'fix-cgen-guile
1006 (lambda _
1007 (substitute* "opcodes/Makefile.in"
1008 (("guile\\{,-\\}1.8") "guile"))
25e25d8f 1009 (invoke "which" "guile"))))))
8ea42482
DM
1010 (native-inputs
1011 `(("cgen"
1012 ,(origin
1013 (method git-fetch)
1014 (uri (git-reference
b0e7b699 1015 (url "https://github.com/puppeh/cgen")
8ea42482
DM
1016 (commit "d8e2a9eb70425f180fdd5bfd032884b0855f2032")))
1017 (sha256
1018 (base32
1019 "14b3h2ji740s8zq5vwm4qdcxs4aa4wxi6wb9di3bv1h39x14nyr9"))))
1020 ("texinfo" ,texinfo)
5e54f4ad 1021 ("flex" ,flex)
8ea42482
DM
1022 ("bison" ,bison)
1023 ("guile-1.8" ,guile-1.8)
1024 ("which" ,base:which)))
1025 (synopsis "Binutils for VC4")
1026 (description "This package provides @code{binutils} for VideoCore IV,
1027the Raspberry Pi chip.")
1028 (license license:gpl3+)
1029 (home-page "https://github.com/puppeh/vc4-toolchain/"))))
7cf06d62
DM
1030
1031(define-public gcc-vc4
f2c63754
DM
1032 (let ((commit "0fe4b83897341742f9df65797474cb0feab4b377")
1033 (xgcc (cross-gcc "vc4-elf" #:xgcc gcc-6 #:xbinutils binutils-vc4)))
7cf06d62
DM
1034 (package (inherit xgcc)
1035 (name "gcc-vc4")
1036 (source (origin
1037 (method git-fetch)
1038 (uri (git-reference
b0e7b699 1039 (url "https://github.com/puppeh/gcc-vc4")
7cf06d62
DM
1040 (commit commit)))
1041 (file-name (string-append name
1042 "-"
1043 (package-version xgcc)
1044 "-checkout"))
1045 (sha256
1046 (base32
f2c63754
DM
1047 "0kvaq4s0assvinmmicwqp07d0wwldcw0fv6f4k13whp3q5909jnr"))
1048 (patches
1049 (search-patches "gcc-6-fix-buffer-size.patch"
1050 "gcc-6-fix-isl-includes.patch"))))
7cf06d62
DM
1051 (native-inputs
1052 `(("flex" ,flex)
1053 ,@(package-native-inputs xgcc)))
1054 (synopsis "GCC for VC4")
1055 (description "This package provides @code{gcc} for VideoCore IV,
1056the Raspberry Pi chip."))))
1a6497de 1057
2ea4587d 1058(define-public python-libmpsse
1a6497de 1059 (package
2ea4587d 1060 (name "python-libmpsse")
782cc119 1061 (version "1.4.1")
1a6497de
DM
1062 (source
1063 (origin
2ea4587d
DM
1064 (method git-fetch)
1065 (uri (git-reference
b0e7b699 1066 (url "https://github.com/daym/libmpsse")
2ea4587d
DM
1067 (commit (string-append "v" version))))
1068 (file-name "libmpsse-checkout")
1a6497de
DM
1069 (sha256
1070 (base32
782cc119 1071 "1rypfb96k2szqgygp3jnwg2zq9kwmfz0460dsahn3r2vkzml8wn7"))))
1a6497de
DM
1072 (build-system gnu-build-system)
1073 (inputs
1074 `(("libftdi" ,libftdi)
2ea4587d 1075 ("python" ,python)))
1a6497de
DM
1076 (native-inputs
1077 `(("pkg-config" ,pkg-config)
1078 ("swig" ,swig)
1079 ("which" ,base:which)))
1080 (arguments
1081 `(#:tests? #f ; No tests exist.
2ea4587d 1082 #:parallel-build? #f ; Would be buggy.
1a6497de
DM
1083 #:make-flags
1084 (list (string-append "CFLAGS=-Wall -fPIC -fno-strict-aliasing -g -O2 "
1085 "$(shell pkg-config --cflags libftdi1)"))
1086 #:phases
1087 (modify-phases %standard-phases
1088 (add-after 'unpack 'set-environment-up
1089 (lambda* (#:key inputs outputs #:allow-other-keys)
2ea4587d
DM
1090 (let ((python (assoc-ref inputs "python")))
1091 (chdir "src")
1092 (setenv "PYDEV" (string-append python
1093 "/include/python"
a7b20226 1094 ,(version-major+minor (package-version python))))
2ea4587d 1095 #t)))
1a6497de 1096 (replace 'install
2ea4587d 1097 (lambda* (#:key inputs outputs make-flags #:allow-other-keys #:rest args)
1a6497de
DM
1098 (let* ((out (assoc-ref outputs "out"))
1099 (out-python (string-append out
2ea4587d
DM
1100 "/lib/python"
1101 ,(version-major+minor (package-version python))
1102 "/site-packages"))
1a6497de
DM
1103 (install (assoc-ref %standard-phases 'install)))
1104 (install #:make-flags (cons (string-append "PYLIB=" out-python)
1105 make-flags))))))))
1106 (home-page "https://code.google.com/archive/p/libmpsse/")
1107 (synopsis "Python library for MPSSE SPI I2C JTAG adapter by FTDI")
1108 (description "This package provides a library in order to support the
1109MPSSE (Multi-Protocol Synchronous Serial Engine) adapter by FTDI that can do
1110SPI, I2C, JTAG.")
1111 (license license:gpl2+)))
981bccf1 1112
2ea4587d
DM
1113(define-public python2-libmpsse
1114 (package
1115 (inherit python-libmpsse)
1116 (name "python2-libmpsse")
1117 (arguments
1118 (substitute-keyword-arguments (package-arguments python-libmpsse)
1119 ((#:phases phases)
1120 `(modify-phases ,phases
1121 (replace 'set-environment-up
1122 (lambda* (#:key inputs outputs #:allow-other-keys)
1123 (let ((python (assoc-ref inputs "python")))
1124 (chdir "src")
1125 (setenv "PYDEV" (string-append python
1126 "/include/python"
1127 ,(version-major+minor (package-version python-2))))
1128 #t)))
1129 (replace 'install
1130 (lambda* (#:key inputs outputs make-flags #:allow-other-keys #:rest args)
1131 (let* ((out (assoc-ref outputs "out"))
1132 (out-python (string-append out
1133 "/lib/python"
1134 ,(version-major+minor (package-version python-2))
1135 "/site-packages"))
1136 (install (assoc-ref %standard-phases 'install)))
1137 (install #:make-flags (cons (string-append "PYLIB=" out-python)
1138 make-flags)))))))))
1139 (inputs
1140 (alist-replace "python" (list python-2)
1141 (package-inputs python-libmpsse)))))
1142
981bccf1
DM
1143(define-public picprog
1144 (package
1145 (name "picprog")
1146 (version "1.9.1")
1147 (source (origin
1148 (method url-fetch)
1149 (uri (string-append "http://www.iki.fi/hyvatti/pic/picprog-"
1150 version ".tar.gz"))
1151 (file-name (string-append name "-" version ".tar.gz"))
1152 (sha256
1153 (base32
316fd29f
EF
1154 "1r04hg1n3v2jf915qr05la3q9cxy7a5jnh9cc98j04lh6c9p4x85"))
1155 (patches (search-patches "picprog-non-intel-support.patch"))))
981bccf1
DM
1156 (build-system gnu-build-system)
1157 (arguments
1158 `(#:tests? #f ; No tests exist.
1159 #:phases
1160 (modify-phases %standard-phases
1161 (add-after 'unpack 'patch-paths
1162 (lambda* (#:key outputs #:allow-other-keys)
1163 (substitute* "Makefile"
1164 (("/usr/local") (assoc-ref outputs "out"))
316fd29f
EF
1165 ((" -o 0 -g 0 ") " ")
1166 (("testport") ""))
981bccf1
DM
1167 #t))
1168 (add-before 'install 'mkdir
1169 (lambda* (#:key outputs #:allow-other-keys)
1170 (let ((out (assoc-ref outputs "out")))
1171 (mkdir-p (string-append out "/bin"))
1172 (mkdir-p (string-append out "/man/man1"))
1173 #t)))
1174 (delete 'configure))))
1175 (synopsis "Programs Microchip's PIC microcontrollers")
1176 (description "This program programs Microchip's PIC microcontrollers.")
dd8cf009 1177 (home-page "https://hyvatti.iki.fi/~jaakko/pic/picprog.html")
981bccf1 1178 (license license:gpl3+)))
cc8d346b
DM
1179
1180(define-public fc-host-tools
1181 (package
1182 (name "fc-host-tools")
3581d4be 1183 (version "14")
cc8d346b
DM
1184 (source (origin
1185 (method url-fetch)
1186 (uri (string-append "ftp://ftp.freecalypso.org/pub/GSM/"
1187 "FreeCalypso/fc-host-tools-r" version ".tar.bz2"))
1188 (sha256
1189 (base32
3581d4be 1190 "09ccd76khfvlx4dwi9dhrzl5mm68402mlych0g7f9ncfr5jzyf26"))))
cc8d346b
DM
1191 (build-system gnu-build-system)
1192 (arguments
1193 `(#:tests? #f ; No tests exist.
1194 #:make-flags
eb6ef893 1195 (list (string-append "INSTALL_PREFIX=" %output)
cc8d346b
DM
1196 (string-append "INCLUDE_INSTALL_DIR=" %output "include/rvinterf"))
1197 #:phases
1198 (modify-phases %standard-phases
1333eb58 1199 (add-after 'unpack 'patch-installation-paths
cc8d346b
DM
1200 (lambda* (#:key outputs #:allow-other-keys)
1201 (substitute* '("Makefile"
6adfcbea
DM
1202 "rvinterf/etmsync/fsiomain.c"
1203 "rvinterf/etmsync/fsnew.c"
1204 "rvinterf/asyncshell/help.c"
1205 "rvinterf/libinterf/launchrvif.c"
cc8d346b
DM
1206 "loadtools/defpath.c"
1207 "loadtools/Makefile"
1208 "miscutil/c139explore"
1dec2691
DM
1209 "miscutil/pirexplore"
1210 "ffstools/tiffs-wrappers/installpath.c"
1dec2691 1211 "uptools/atcmd/atinterf.c")
cc8d346b
DM
1212 (("/opt/freecalypso/loadtools")
1213 (string-append (assoc-ref outputs "out") "/lib/freecalypso/loadtools"))
16cb1c51
DM
1214 (("\\$\\{INSTALL_PREFIX\\}/loadtools")
1215 (string-append (assoc-ref outputs "out") "/lib/freecalypso/loadtools"))
1333eb58
DM
1216 (("\\$\\{INSTALL_PREFIX\\}/target-bin")
1217 (string-append (assoc-ref outputs "out") "/lib/freecalypso/target-bin"))
cc8d346b
DM
1218 (("/opt/freecalypso")
1219 (assoc-ref outputs "out")))
1333eb58
DM
1220 #t))
1221 (delete 'configure))))
cc8d346b
DM
1222 (inputs
1223 `(("libx11" ,libx11)))
1224 (synopsis "Freecalypso host tools")
2eefe1d8 1225 (description "This package provides some tools for debugging FreeCalypso phones and the FreeCalypso FCDEV3B dev board.
cc8d346b
DM
1226
1227@enumerate
1228@item fc-e1decode: Decodes a binary Melody E1 file into an ASCII source file.
1229@item fc-e1gen: Encodes an ASCII Melody E1 file into a binary Melody E1 file.
1230@item fc-fr2tch: Converts a GSM 06.10 speech recording from libgsm to hex
1231strings of TCH bits to be fed to the GSM 05.03 channel encoder of a TI
1232Calypso GSM device.
1233@item fc-tch2fr: Converts hex strings of TCH bits to libgsm.
1234@item fc-gsm2vm: utility converts a GSM 06.10 speech sample from the libgsm
1235source format into a voice memo file that can be uploaded into the FFS of a
1236FreeCalypso device and played with the audio_vm_play_start() API or the
1237AT@@VMP command that invokes the latter.
1238@item fc-rgbconv: Convers RGB 5:6:5 to RGB 8:8:8 and vice versa.
1239@item rvinterf: Communicates with a TI Calypso GSM device via RVTMUX.
1240@item rvtdump: produces a human-readable dump of all output emitted by a
1241TI-based GSM fw on the RVTMUX binary packet interface.
1242@item fc-shell: FreeCalypso firmwares have a feature of our own invention
1243(not present in any pre-existing ones) to accept AT commands over the RVTMUX
1244interface. It is useful when no second UART is available for a dedicated
1245standard AT command interface. fc-shell is the tool that allows you to send
1246AT commands to the firmware in this manner.
1247@item fc-memdump: Captures a memory dump from a GSM device.
1248@item fc-serterm: Trivial serial terminal. Escapes binary chars.
1249@item fc-fsio: Going through rvinterf, this tool connects to GSM devices and
1250allows you to manipulate the device's flash file system.
1251@item tiaud-compile: Compiles an audio mode configuration table for TI's
1252Audio Service from our own ASCII source format into the binary format for
1253uploading into FreeCalypso GSM device FFS with fc-fsio.
1254@item tiaud-decomp: Decodes TI's audio mode configuration files read out of
1255FFS into our own ASCII format.
1256@item tiaud-mkvol: Generates the *.vol binary files which need to accompany
1257the main *.cfg ones.
1258@item fc-compalram: Allows running programs on the device without writing
1259them to flash storage.
1260@item fc-xram: Allows running programs on the device without writing them
1261to flash storage.
1262@item fc-iram: Allows running programs on the device without writing them
1263to flash storage.
1264@item fc-loadtool: Writes programs to the device's flash storage.
1265@item pirffs: Allows listing and extracting FFS content captured as a raw
1266flash image from Pirelli phones.
1267@item mokoffs: Allows listing and extracting FFS content captured as a raw
1268flash image from OpenMoko phones.
1269@item tiffs: Allows listing and extracting FFS content captured as a raw
1270flash image from TI phones.
1271@item c139explore: Run-from-RAM program for C139 phones that
1272exercises their peripheral hardware: LCD, keypad backlight, buzzer, vibrator.
1273@item pirexplore: Run-from-RAM program for Pirelli DP-L10 phones that
1274exercises their peripheral hardware, primarily their LCD.
1275@item tfc139: Breaks into Mot C1xx phones via shellcode injection, allowing
1276you to reflash locked phones with new firmware with fc-loadtool.
1277@item ctracedec: GSM firmwares built in TI's Windows environment have a
1278compressed trace misfeature whereby many of the ASCII strings
1279in debug trace messages get replaced with numeric indices at
1280build time, and these numeric indices are all that gets emitted
1281on the RVTMUX serial channel. This tools decodes these numeric indices
1282back to strings in trace output.
1283@item fc-cal2text: This utility takes a dump of TI's /gsm/rf flash file system
1284directory subtree as input (either extracted in vitro with tiffs
1285or read out in vivo with fc-fsio) and converts all RF tables
1286found therein into a readable ASCII format.
1287@item imei-luhn: Computes or verifies the Luhn check digit of an IMEI number.
1288@item fc-dspapidump: Reads and dumps the contents of the DSP API RAM in a
1289target Calypso GSM device.
1290@item fc-vm2hex: Converts the old-fashioned (non-AMR) voice memo files read
1291out of FFS into hex strings.
1292@item fc-buzplay: Plays piezoelectic buzzer melodies on an actual
1293Calypso device equipped with such a buzzer (Mot C1xx, TI's D-Sample board,
1294our planned future HSMBP) by loading a buzplayer agent onto the target and
1295feeding melodies to be played to it.
1296@item fc-tmsh: TI-based GSM firmwares provide a rich set of Test Mode commands
1297that can be issued through the RVTMUX (debug trace) serial channel.
1298This program is our test mode shell for sending Test Mode commands to targets
1299and displaying decoded target responses.
2eefe1d8
DM
1300@item fcup-smsend: Send a short message via SMS
1301@item fcup-smsendmult: Send multiple short messages via SMS in one go
1302@item fcup-smsendpdu: Send multiple short messages given in PDU format via SMS
1303@item sms-pdu-decode: Decode PDU format messages
1bb4fd64
DM
1304@item fc-dspromdump: Dump DSP ROM.
1305@item pcm-sms-decode: Decode /pcm/SMS binary files read out of FFS maintained
1306by Pirelli DP-L10. Display the SMS in human-readable form.
1307@item srec-regions: Parse S-record (TI's *.m0), identify the set of
1308discontiguous regions into which this SREC image deposits bits, and list
1309these identified regions.
cc8d346b
DM
1310@end enumerate")
1311 (home-page "https://www.freecalypso.org/")
1312 (license license:public-domain)))
615a7eec
CL
1313
1314(define-public stlink
1315 (package
1316 (name "stlink")
1317 (version "1.5.1")
1318 (source
1319 (origin
fe1506a0
EF
1320 (method git-fetch)
1321 (uri (git-reference
1322 (url "https://github.com/texane/stlink")
1323 (commit (string-append "v" version))))
1324 (file-name (git-file-name name version))
615a7eec
CL
1325 (sha256
1326 (base32
fe1506a0 1327 "1d5gxiqpsm8fc105cxlp27af9fk339fap5h6nay21x5a7n61jgyc"))))
615a7eec
CL
1328 (build-system cmake-build-system)
1329 (arguments
1330 `(#:tests? #f ;no tests
1331 #:configure-flags
1332 (let* ((out (assoc-ref %outputs "out"))
1333 (etc (in-vicinity out "etc"))
1334 (modprobe (in-vicinity etc "modprobe.d"))
1335 (udev-rules (in-vicinity etc "udev/rules.d")))
1336 (list (string-append "-DSTLINK_UDEV_RULES_DIR=" udev-rules)
1337 (string-append "-DSTLINK_MODPROBED_DIR=" modprobe)))))
1338 (inputs
1339 `(("libusb" ,libusb)))
1340 (synopsis "Programmer for STM32 Discovery boards")
1341 (description "This package provides a firmware programmer for the STM32
1342Discovery boards. It supports two versions of the chip: ST-LINK/V1 (on
1343STM32VL discovery kits) and ST-LINK/V2 (on STM32L discovery and later kits).
1344Two different transport layers are used: ST-LINK/V1 uses SCSI passthru
1345commands over USB, and ST-LINK/V2 and ST-LINK/V2-1 (seen on Nucleo boards) use
1346raw USB commands.")
1347 (home-page "https://github.com/texane/stlink")
1348 ;; The flashloaders/stm32l0x.s and flashloaders/stm32lx.s source files are
1349 ;; licensed under the GPLv2+.
1350 (license (list license:bsd-3 license:gpl2+))))
2c2fc24b
CL
1351
1352(define-public west
1353 (package
1354 (name "west")
1355 (version "0.6.3")
1356 (source
1357 (origin
1358 (method url-fetch)
1359 (uri (pypi-uri "west" version))
1360 (sha256
1361 (base32
1362 "0ql6ij1hrj2ir5wkxm96zgig5qwvfwa75w77wh2y13w6b9cqcr4b"))))
1363 (propagated-inputs
1364 `(("python-colorama" ,python-colorama)
1365 ("python-configobj" ,python-configobj)
1366 ("python-pykwalify" ,python-pykwalify)
1367 ("python-pyyaml" ,python-pyyaml)))
1368 (build-system python-build-system)
1369 (home-page "https://github.com/zephyrproject-rtos/west")
1370 (synopsis "Zephyr RTOS Project meta-tool")
1371 (description "West is the swiss-army knife command line tool of the Zephyr
1372project. Its built-in commands provide a multiple repository management
1373system with features inspired by Google’s Repo tool and Git submodules. West
1374simplifies configuration and is also pluggable: you can write your own west
1375\"extension commands\" which add additional features to west. Zephyr uses
1376this feature to provide conveniences for building applications, flashing and
1377debugging them, and more.")
1378 (license license:expat)))
bbf8a309 1379
bbf8a309
DM
1380(define-public ebusd
1381 (package
1382 (name "ebusd")
1383 (version "3.4")
1384 (source (origin
1385 (method git-fetch)
1386 (uri (git-reference
8ed4c468 1387 (url "https://github.com/john30/ebusd")
bbf8a309
DM
1388 (commit (string-append "v" version))))
1389 (file-name (string-append name "-" version "-checkout"))
1390 (sha256
1391 (base32
1392 "0iva70bam7wdx60bpd3an9kxr28zxlvp3vprivgqshwwdhqa0hzp"))))
1393 (build-system gnu-build-system)
1394 (arguments
1395 `(#:phases
1396 (modify-phases %standard-phases
1397 (add-after 'install 'install-config
1398 (lambda* (#:key inputs outputs #:allow-other-keys)
1399 (let ((config-destination
1400 (string-append (assoc-ref outputs "out")
1401 "/share/ebusd")))
1402 (copy-recursively (string-append (assoc-ref inputs "config")
1403 "/ebusd-2.1.x")
1404 config-destination)
1405 #t))))))
e88242cb
DM
1406 (inputs
1407 `(("mosquitto" ,mosquitto)))
bbf8a309
DM
1408 (native-inputs
1409 `(("automake" ,automake)
1410 ("autoconf" ,autoconf)
1411 ("config"
1412 ,(origin
1413 (method git-fetch)
1414 (uri (git-reference
8ed4c468 1415 (url "https://github.com/john30/ebusd-configuration")
bbf8a309
DM
1416 (commit "666c0f6b9c4d7545eff7f43ab28a1c7baeab7913")))
1417 (file-name "config-checkout")
1418 (sha256
1419 (base32
1420 "0yxnx8p4lbk614l16854r9s9d8s9c7ixgczfs8mph94xz0wkda7x"))))))
1421 (synopsis "Daemon for communicating with eBUS devices")
1422 (description "This package provides @command{ebusd}, a daemon for
1423handling communication with eBUS devices connected to a 2-wire bus system
1424(\"energy bus\" used by numerous heating systems).")
1425 (home-page "https://ebusd.eu/")
1426 (license license:gpl3+)))
29e91f0a
SS
1427
1428(define-public ucsim
1429 (package
1430 (name "ucsim")
1431 (version "0.6-pre67")
1432 (source (origin
1433 (method url-fetch)
1434 (uri (string-append
1435 "http://mazsola.iit.uni-miskolc.hu/ucsim/download/unix/"
1436 "devel/ucsim-" version ".tar.gz"))
1437 (sha256
1438 (base32
1439 "0aahj9pbfjphjrm4hgs9pfmp6d5aikaq4yvxlrvhywjinnnf0qp1"))))
1440 (build-system gnu-build-system)
1441 (arguments
1442 `(#:configure-flags '("--enable-avr-port"
1443 "--enable-m6809-port"
1444 "--enable-p1516-port"
1445 "--enable-st7-port")
1446 #:phases
1447 (modify-phases %standard-phases
1448 (add-after 'unpack 'patch-makefiles
1449 (lambda _
1450 (substitute* (find-files "." "(\\.mk$|\\.in$)")
1451 (("/bin/sh") (which "sh")))
1452 #t))
1453 (add-after 'install 'remove-empty-directory
1454 (lambda* (#:key outputs #:allow-other-keys)
1455 (delete-file-recursively
1456 (string-append (assoc-ref outputs "out") "/share/man"))
1457 #t)))))
1458 (native-inputs
1459 `(("bison" ,bison)
1460 ("flex" ,flex)))
1461 (home-page "http://mazsola.iit.uni-miskolc.hu/ucsim/")
1462 (synopsis "Simulators for various microcontroller families")
1463 (description "μCsim is a collection of software simulators for
1464microcontrollers in the Atmel AVR; Intel MCS-51 (8051); Motorola 68HC08 and
14656809; P1516; Padauk PDK13, PDK14 and PDK15; STMicroelectronics ST7 and STM8;
1466and Zilog Z80 families, plus many of their variants.")
1467 (license license:gpl2+)))
c626e281
SS
1468
1469(define-public sdcc
1470 (package
1471 (name "sdcc")
0b8c90b6 1472 (version "4.0.0")
c626e281
SS
1473 (source (origin
1474 (method url-fetch)
1475 (uri (string-append
1476 "mirror://sourceforge/sdcc/sdcc"
1477 "/" version "/sdcc-src-" version ".tar.bz2"))
1478 (sha256
1479 (base32
0b8c90b6 1480 "042fxw5mnsfhpc0z9lxfsw88kdkm32pwrxacp88kj2n2dy0814a8"))
c626e281
SS
1481 (modules '((guix build utils)))
1482 (snippet
1483 '(begin
1484 ;; Remove non-free source files
1485 (delete-file-recursively "device/non-free")
1486 ;; Remove bundled μCsim source
1487 (delete-file-recursively "sim")
1488 #t))
1489 (patches (search-patches "sdcc-disable-non-free-code.patch"))))
1490 (build-system gnu-build-system)
1491 (native-inputs
1492 `(("bison" ,bison)
1493 ("boost" ,boost)
1494 ("flex" ,flex)
1495 ("python-2" ,python-2)
0b8c90b6
SS
1496 ("texinfo" ,texinfo)
1497 ("zlib" ,zlib)))
c626e281 1498 (arguments
c11fedf6
SS
1499 `(;; GPUTILS is required for the PIC ports, but the licensing status of
1500 ;; some of the files contained in its distribution is unclear (see
1501 ;; https://issues.guix.gnu.org/44557). For this reason it is not yet
1502 ;; available as a package in Guix.
c626e281
SS
1503 #:configure-flags
1504 '("--disable-pic14-port" "--disable-pic16-port" "--disable-ucsim")
1505 #:phases
1506 (modify-phases %standard-phases
c369a907 1507 (add-after 'unpack 'patch-makefiles
c626e281
SS
1508 (lambda _
1509 (substitute* (find-files "." "(\\.mk$|\\.in$)")
1510 (("/bin/sh") (which "sh")))
1511 #t)))))
1512 (home-page "http://sdcc.sourceforge.net")
20ba8656 1513 (synopsis "C compiler suite for 8-bit microcontrollers")
c626e281 1514 (description "SDCC is a retargetable, optimizing Standard C compiler suite
0b8c90b6
SS
1515that targets 8-bit microcontrollers in the Intel MCS-51 (8051); Motorola
151668HC08; Padauk PDK13, PDK14 and PDK15; STMicroelectronics STM8; and Zilog Z80
1517families, plus many of their variants.")
1fd317de
SS
1518 (license (list license:gpl2+
1519 license:gpl3+
1520 license:lgpl2.0+
1521 license:lgpl2.1+
1522 license:lgpl3+
1523 license:public-domain
1524 license:zlib))))
a613abeb
JL
1525
1526(define-public python-psptool
1527 (package
1528 (name "python-psptool")
1529 (version "2.2")
1530 (source (origin
1531 (method url-fetch)
1532 (uri (pypi-uri "psptool" version))
1533 (sha256
1534 (base32
1535 "1kx0xpfx67m4zclk4gs97wiwjms8i7z4f6b6m68y8sfgpshy4rf3"))
1536 (modules '((guix build utils)))
1537 (snippet
1538 '(begin
1539 ;; IPython is not used by the package at all
1540 (substitute* '("psptool/directory.py" "psptool/entry.py")
1541 (("from IPython.*") ""))))))
1542 (build-system python-build-system)
1543 (propagated-inputs
1544 `(("python-cryptography" ,python-cryptography)
1545 ("python-prettytable" ,python-prettytable)))
1546 (home-page "https://github.com/PSPReverse/psptool")
1547 (synopsis "Tool for dealing with AMD binary blobs")
1548 (description "PSPTool is a tool for dealing with AMD binary blobs")
1549 (license license:gpl3+)))
337cb4a0
CL
1550
1551(define-public agent-proxy
1552 (let ((commit "8927798a71d246871ea8fc22b4512296a3fa1765")
1553 (revision "0"))
1554 (package
1555 (name "agent-proxy")
1556 (version (git-version "1.98" revision commit))
1557 (home-page
1558 "https://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git")
1559 (source (origin
1560 (method git-fetch)
1561 (uri (git-reference (url home-page) (commit commit)))
1562 (file-name (git-file-name name version))
1563 (sha256
1564 (base32
1565 "1bxkzwsqfld4pknmiq8j3k55pv90n8s6kzh0xh42bhy2jv1wxz2z"))))
1566 (build-system gnu-build-system)
1567 (arguments
1568 `(#:tests? #f
1569 #:phases
1570 (modify-phases %standard-phases
1571 (delete 'configure)
1572 (add-after 'build 'build-kdmx
1573 (lambda _
1574 (invoke "make" "-C" "kdmx")
1575 #t))
1576 (replace 'install
1577 (lambda* (#:key outputs #:allow-other-keys)
1578 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
1579 (install-file "agent-proxy" bin)
1580 (install-file "kdmx/kdmx" bin)
1581 #t))))))
1582 (synopsis "Proxies to run kgdb/gdbserver and console on a serial port")
1583 (description "These programs are proxies allowing to run kgdb/gdbserver
1584and console on a single serial port. agent-proxy creates network sockets,
1585whereas kdmx creates pseudo-ttys.")
1586 (license license:gpl2))))