Hi!
I'm in the process of packaging the UF2 bootloader, for which i am
heavily inspired by the way Das U-Boot is packaged. Unfortunately I am
stuck. I have the following WIP definition:
--8<---------------cut here---------------start------------->8---
(define-public uf2-samdx1
(let* ((commit "a3395d547b0bbe92676214be68e5cec1a2dbba1b")
(revision "0")
(board "metro_m0")
(triplet "arm-linux-gnueabihf")
(native-build? (lambda _
(or (not triplet) ;disable cross-compilation
(string=? (%current-system)
(gnu-triplet->nix-system triplet))))))
(package
(name "uf2-samdx1")
(version (git-version "3.4.0" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Microsoft/uf2-samdx1")
(commit commit)
(recursive? #t)))
(file-name (git-file-name name version))
(sha256
(base32
"11gn8aq9i20pl55bcpxw6ba0wl1a7n8qz25ibv18kl0dc4d18rrh"))))
(build-system gnu-build-system)
(arguments
(list #:target (and (not (native-build?)) triplet)
#:make-flags
#~(list (string-append "BOARD=" #$board)
#$@(if (not (native-build?))
(list (string-append "CROSS_COMPILE=" triplet))
'()))
#:phases #~(modify-phases %standard-phases
(delete 'configure)
(add-before 'build 'create-version-header
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((dir (string-append "build/" #$board)))
(mkdir-p dir)
(with-output-to-file (string-append dir
"/uf2_version.h")
(lambda _
(string-join (list "v" #$version #$revision
#$commit)
"-")))))))))
(inputs (list python
;; (make-arm-none-eabi-toolchain-12.3.rel1) ; that's not
it!?
))
(home-page "https://github.com/Microsoft/uf2")
(synopsis "Embedded bootloader")
(description "UF2, aka. USB Flashing Format allows to flash embedded
devices through dragging and dropping of uf2 files onto flash drives.")
(license license:expat))))
--8<---------------cut here---------------end--------------->8---
which fails:
> make: arm-none-eabi-gcc: No such file or directory
How can I make that (cross-compilation) toolchain available for the package?
Have an awesome week
gabber