From 719fc2874daa5fd5772c2c0d146e8d6fb9f1377b Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 11 May 2021 21:15:15 +0000
Subject: [PATCH 2/2] gnu: u-boot: Add crust firmware to pinebook, pine64_plus
and pine64-lts.
* gnu/packages/bootloaders.scm (make-u-boot-sunxi64-package): Take argument
for System Control Processor (SCP) firmware.
[native-inputs]: Add SCP firmware.
(u-boot-pine64-plus, u-boot-pine64-lts, u-boot-pinebook): Pass appropriate
crust firmware as the SCP firmware.
---
gnu/packages/bootloaders.scm | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
@@ -737,7 +737,7 @@ it fits within common partitioning schemes.")
(define-public u-boot-am335x-evm
(make-u-boot-package "am335x_evm" "arm-linux-gnueabihf"))
-(define-public (make-u-boot-sunxi64-package board triplet)
+(define-public (make-u-boot-sunxi64-package board triplet scpfirmware)
(let ((base (make-u-boot-package board triplet)))
(package
(inherit base)
@@ -752,6 +752,9 @@ it fits within common partitioning schemes.")
(assoc-ref (or native-inputs inputs) "firmware")
"/bl31.bin")))
(setenv "BL31" bl31)
+ (setenv "SCP" (string-append
+ (assoc-ref inputs "scpfirmware")
+ "/scp.bin"))
;; This is necessary when we're using the bundled dtc.
;(setenv "PATH" (string-append (getenv "PATH") ":"
; "scripts/dtc"))
@@ -759,16 +762,20 @@ it fits within common partitioning schemes.")
#t))))))
(native-inputs
`(("firmware" ,arm-trusted-firmware-sun50i-a64)
+ ("scpfirmware" ,scpfirmware)
,@(package-native-inputs base))))))
(define-public u-boot-pine64-plus
- (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu"))
+ (make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu"
+ crust-pine64-plus))
(define-public u-boot-pine64-lts
- (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu"))
+ (make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu"
+ crust-pine64-plus))
(define-public u-boot-pinebook
- (let ((base (make-u-boot-sunxi64-package "pinebook" "aarch64-linux-gnu")))
+ (let ((base (make-u-boot-sunxi64-package "pinebook" "aarch64-linux-gnu"
+ crust-pinebook)))
(package
(inherit base)
(arguments
--
2.30.2