[bug#74849,v2,5/6] gnu: make-arm-trusted-firmware: Update to 2.12.

Message ID 252aca03db260a19297a87d50cc539c1cace1ebb.1734645720.git.herman@rimm.ee
State New
Headers
Series Update ARM Trusted Firmware. |

Commit Message

Herman Rimm Dec. 19, 2024, 10:10 p.m. UTC
  * gnu/packages/firmware.scm (make-arm-trusted-firmware): Update to 2.12.
[arguments]: Select correct objcopy and objdump variants.
[native-inputs]: Add python to avoid warnings.

Change-Id: Iccff10b16090913fe5c99491d8335f8ede09038c
---
 gnu/packages/firmware.scm | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
  

Patch

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 3e76681c66..81ebd5efd8 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1108,7 +1108,7 @@  (define* (make-arm-trusted-firmware platform
         (string=? (%current-system) (gnu-triplet->nix-system triplet))))
   (package
     (name (guix-name "arm-trusted-firmware-" platform))
-    (version "2.9")
+    (version "2.12")
     (source
      (origin
        (method git-fetch)
@@ -1118,7 +1118,7 @@  (define* (make-arm-trusted-firmware platform
               (commit (string-append "v" version))))
        (file-name (git-file-name "arm-trusted-firmware" version))
        (sha256
-        (base32 "16fjbn1zck0d8b554h8lk1svqqn0zlawvrlkjxry9l71s9h4vd0p"))
+        (base32 "18rzhygvq0afcylirq9yis3kaa1nli14k2jrm64ih85gz4nhl99w"))
        (modules '((guix build utils)))
        ;; Remove binary blobs: they don't reference a source or license.
        (snippet #~(for-each delete-file (find-files "." "\\.bin$")))))
@@ -1128,7 +1128,15 @@  (define* (make-arm-trusted-firmware platform
       #:target (and (not (native-build?)) triplet)
       #:phases
       #~(modify-phases %standard-phases
-          (delete 'configure)         ;no configure script
+          (replace 'configure          ;no configure script
+            ;; Fix ATF commit ffb7742125def3e0acca4c7e4d3215af5ce25a31
+            (lambda _
+              (unless #$(native-build?)
+                (substitute* "plat/rockchip/rk3399/drivers/m0/Makefile"
+                  (("-oc") "-oc-default"))
+                (substitute* "make_helpers/build_macros.mk"
+                  (("-oc") "-oc-default")
+                  (("-od") "-od-default")))))
           (replace 'install
             (lambda _
               (for-each (lambda (file)
@@ -1138,9 +1146,10 @@  (define* (make-arm-trusted-firmware platform
       #~(list (string-append "PLAT=" #$platform)
               #$@(if (not (native-build?))
                      (list (string-append "CROSS_COMPILE=" triplet "-"))
-                     '())
+                     '("CC=gcc"))
               "DEBUG=1")
       #:tests? #f))                   ;no test suite
+    (native-inputs (list python))
     (home-page "https://www.trustedfirmware.org/")
     (synopsis "Secure world software for ARMv7-A and ARMv8-A")
     (description