summaryrefslogtreecommitdiff
path: root/gnu/packages/firmware.scm
diff options
context:
space:
mode:
authorHerman Rimm <[email protected]>2024-12-19 23:10:35 +0100
committerVagrant Cascadian <[email protected]>2024-12-19 16:06:26 -0800
commit91f50366e5bc54951851e99f5600f9abb628b6ec (patch)
tree0026dc271035a78fdb9b7b3836d9d28e2019f130 /gnu/packages/firmware.scm
parent29ff4a6ca836c0ee8fe052eda3ad9a5d2bb8d2af (diff)
gnu: arm-trusted-firmware-imx8mq: Fix build.
* gnu/local.mk (dist_patch_DATA): Register patches. * gnu/packages/firmware.scm (make-arm-trusted-firmware): Add make-flags argument. [source]: Use patches. (arm-trusted-firmware-imx8mq): Refactor. * gnu/packages/patches/8mq-enable-imx_hab_handler.patch: Add file. * gnu/packages/patches/8mq-move-stack-to-ocram_s.patch: Add file. Change-Id: I8a72c1ceb5e00e113ae91a7c2f5b733d981185d6 Signed-off-by: Vagrant Cascadian <[email protected]>
Diffstat (limited to 'gnu/packages/firmware.scm')
-rw-r--r--gnu/packages/firmware.scm35
1 files changed, 8 insertions, 27 deletions
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 6ce6694e1d..89d29b8add 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1099,8 +1099,9 @@ Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.")
(define-public ovmf
(deprecated-package "ovmf" ovmf-x86-64))
-(define* (make-arm-trusted-firmware platform
- #:key (triplet "aarch64-linux-gnu"))
+(define* (make-arm-trusted-firmware platform #:key
+ (triplet "aarch64-linux-gnu")
+ (make-flags '("DEBUG=1")))
(define (native-build?)
"Return #t if the host and target platforms differ."
(or (not triplet)
@@ -1119,6 +1120,8 @@ Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.")
(file-name (git-file-name "arm-trusted-firmware" version))
(sha256
(base32 "18rzhygvq0afcylirq9yis3kaa1nli14k2jrm64ih85gz4nhl99w"))
+ (patches (search-patches "8mq-enable-imx_hab_handler.patch"
+ "8mq-move-stack-to-ocram_s.patch"))
(modules '((guix build utils)))
;; Remove binary blobs: they don't reference a source or license.
(snippet #~(for-each delete-file (find-files "." "\\.bin$")))))
@@ -1147,7 +1150,7 @@ Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.")
#$@(if (not (native-build?))
(list (string-append "CROSS_COMPILE=" triplet "-"))
'("CC=gcc"))
- "DEBUG=1")
+ #$@make-flags)
#:tests? #f)) ;no test suite
(native-inputs (list python))
(home-page "https://www.trustedfirmware.org/")
@@ -1185,30 +1188,8 @@ interface standards, such as:
(cross-binutils "arm-none-eabi")))))))
(define-public arm-trusted-firmware-imx8mq
- (let ((base (make-arm-trusted-firmware "imx8mq")))
- (package
- (inherit base)
- ;; Newer versions do not build and are essentially not supported
- ;; upstream.
- ;; XXX: explore using NXP maintained branch
- ;; https://github.com/nxp-imx/imx-atf
- (version "2.8")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- ;; There are only GitHub generated release snapshots.
- (url "https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/")
- (commit (string-append "v" version))))
- (file-name (git-file-name "arm-trusted-firmware" version))
- (sha256
- (base32
- "0grq3fgxi9xhcljnhwlxjvdghyz15gaq50raw41xy4lm8rkmnzp3"))))
- (arguments
- (substitute-keyword-arguments (package-arguments base)
- ((#:make-flags flags ''())
- ;; Adding debug symbols causes the size to exceed limits.
- #~(delete "DEBUG=1" #$flags)))))))
+ ;; Remove debug symbols because of limited OCRAM.
+ (make-arm-trusted-firmware "imx8mq" #:make-flags '()))
(define make-crust-firmware
(mlambda (platform)