Subject: [bug#61959] [PATCH 2/7] gnu: Add u-boot-apple-m1.

From: Roman Scherer <[email-masked]>
Date: Sat, 4 Mar 2023 15:46:35 +0100

From: r0man <[email-masked]>

* gnu/packages/bootloaders.scm (u-boot-apple-m1): New variable.
---
 gnu/packages/bootloaders.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index d02161ab1f..bb2f5639bc 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1028,6 +1028,28 @@ (define-public u-boot-am335x-boneblack
 (define-public u-boot-am335x-evm
   (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf"))
 
+(define-public u-boot-apple-m1
+  (let ((base (make-u-boot-package "apple_m1" "aarch64-linux-gnu")))
+    (package
+      (inherit base)
+      (version "2022.10-1")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (string-append
+               "https://github.com/AsahiLinux/u-boot/archive/asahi-v"
+               version ".tar.gz"))
+         (sha256
+          (base32 "02x90h89p1kv3d29mdhq22a88m68w4m1cwb45gj0rr85i2z8mqjq"))))
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ((#:phases phases '%standard-phases)
+          #~(modify-phases #$phases
+              (delete 'disable-tools-libcrypto)))))
+      (native-inputs
+       `(("openssl" ,libressl)
+         ,@(package-native-inputs base))))))
+
 (define*-public (make-u-boot-sunxi64-package board triplet
                                              #:key defconfig configs)
   (let ((base (make-u-boot-package
-- 
2.39.1