gnu: arm-trusted-firmware: Reformat.

* gnu/packages/firmware.scm (arm-trusted-firmware)[source]: Use modules.
[synopsis]: Mention supported architectures.
[description]: Fix "ARMv7A" typo.  Remove newline.

Change-Id: I52d1a02f27e1c8ebbe5b48ea9a69e4c008ff5b9c
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
This commit is contained in:
Herman Rimm 2024-12-19 23:10:31 +01:00 committed by Vagrant Cascadian
parent 442c218c18
commit c514002bd7
No known key found for this signature in database
GPG key ID: DC518FC87F9716AA

View file

@ -1101,68 +1101,62 @@ (define-public ovmf
(define* (make-arm-trusted-firmware platform (define* (make-arm-trusted-firmware platform
#:key (triplet "aarch64-linux-gnu")) #:key (triplet "aarch64-linux-gnu"))
(let ((native-build? (lambda () (define (native-build?)
;; Note: %current-system is a *triplet*, unlike its "Return #t if the host and target platforms differ."
;; name would suggest. (or (not triplet)
(or (not triplet) ;disable cross-compilation ;;%current-system is a *triplet*, unlike its name would suggest.
(string=? (%current-system) (string=? (%current-system) (gnu-triplet->nix-system triplet))))
(gnu-triplet->nix-system triplet)))))) (package
(package (name (string-append "arm-trusted-firmware-" platform))
(name (string-append "arm-trusted-firmware-" platform)) (version "2.9")
(version "2.9") (source
(source (origin
(origin (method git-fetch)
(method git-fetch) (uri (git-reference
(uri (git-reference (url (string-append "https://git.trustedfirmware.org"
;; There are only GitHub generated release snapshots. "/TF-A/trusted-firmware-a.git/"))
(url "https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/") (commit (string-append "v" version))))
(commit (string-append "v" version)))) (file-name (git-file-name "arm-trusted-firmware" version))
(file-name (git-file-name "arm-trusted-firmware" version)) (sha256
(sha256 (base32 "16fjbn1zck0d8b554h8lk1svqqn0zlawvrlkjxry9l71s9h4vd0p"))
(base32 (modules '((guix build utils)))
"16fjbn1zck0d8b554h8lk1svqqn0zlawvrlkjxry9l71s9h4vd0p")) ;; Remove binary blobs: they don't reference a source or license.
(snippet (snippet #~(for-each delete-file (find-files "." "\\.bin$")))))
#~(begin (build-system gnu-build-system)
(use-modules (guix build utils)) (arguments
;; Remove binary blobs which do not contain source or proper (list
;; license. #:target (and (not (native-build?)) triplet)
#:phases
#~(modify-phases %standard-phases
(delete 'configure) ;no configure script
(replace 'install
(lambda _
(for-each (lambda (file) (for-each (lambda (file)
(delete-file file)) (install-file file #$output))
(find-files "." "\\.bin$")))))) (find-files "." "\\.(bin|elf)$")))))
(build-system gnu-build-system) #:make-flags
(arguments #~(list (string-append "PLAT=" #$platform)
(list #$@(if (not (native-build?))
#:target (and (not (native-build?)) triplet) (list (string-append "CROSS_COMPILE=" triplet "-"))
#:phases '())
#~(modify-phases %standard-phases "DEBUG=1")
(delete 'configure) ;no configure script #:tests? #f)) ;no test suite
(replace 'install (home-page "https://www.trustedfirmware.org/")
(lambda _ (synopsis "Secure world software for ARMv7-A and ARMv8-A")
(for-each (lambda (file) (description
(install-file file #$output)) "ARM Trusted Firmware provides a reference implementation of secure
(find-files "." "\\.(bin|elf)$"))))) world software for ARMv7-A and ARMv8-A, including a Secure Monitor
#:make-flags #~(list (string-append "PLAT=" #$platform) executing at @dfn{Exception Level 3} (EL3). It implements various ARM
#$@(if (not (native-build?)) interface standards, such as:
(list (string-append "CROSS_COMPILE=" triplet "-"))
'())
"DEBUG=1")
#:tests? #f)) ;no test suite
(home-page "https://www.trustedfirmware.org/")
(synopsis "Implementation of \"secure world software\"")
(description
"ARM Trusted Firmware provides a reference implementation of secure world
software for ARMv7A and ARMv8-A, including a Secure Monitor executing at
@dfn{Exception Level 3} (EL3). It implements various ARM interface standards,
such as:
@enumerate @enumerate
@item The Power State Coordination Interface (PSCI) @item The Power State Coordination Interface (PSCI)
@item Trusted Board Boot Requirements (TBBR, ARM DEN0006C-1) @item Trusted Board Boot Requirements (TBBR, ARM DEN0006C-1)
@item SMC Calling Convention @item SMC Calling Convention
@item System Control and Management Interface @item System Control and Management Interface
@item Software Delegated Exception Interface (SDEI) @item Software Delegated Exception Interface (SDEI)
@end enumerate\n") @end enumerate")
(license (list license:bsd-3 (license (list license:bsd-3
license:bsd-2))))) ; libfdt license:bsd-2)))) ; libfdt
(define-public arm-trusted-firmware-sun50i-a64 (define-public arm-trusted-firmware-sun50i-a64
(let ((base (make-arm-trusted-firmware "sun50i_a64"))) (let ((base (make-arm-trusted-firmware "sun50i_a64")))