summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerman Rimm <herman@rimm.ee>2024-05-09 07:35:30 +0200
committerGuix Patches Tester <>2024-05-09 08:42:21 +0200
commit41b8da006831dc56b07a446721687955ae806669 (patch)
tree472dec807e1426ba205e096d9697ad2ef55f2d60
parent6c93e6a38e580b3e0b925d2586ffcbcb6d56f6c0 (diff)
downloadguix-patches-41b8da006831dc56b07a446721687955ae806669.tar
guix-patches-41b8da006831dc56b07a446721687955ae806669.tar.gz
gnu: bootloader: Add orangepi-zero2w bootloader.
* gnu/bootloader/u-boot.scm (u-boot-orangepi-zero2w-bootloader): Add variable. * gnu/packages/bootloaders.scm (u-boot-orangepi-zero2w): Add variable. * gnu/packages/firmware.scm (arm-trusted-firmware-sun50i-h616): Add variable. Change-Id: Idb43fdabac51b3301f3bea24fec72bfa29636489
-rw-r--r--gnu/bootloader/u-boot.scm6
-rw-r--r--gnu/packages/bootloaders.scm18
-rw-r--r--gnu/packages/firmware.scm6
3 files changed, 30 insertions, 0 deletions
diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index 0b00afbe78..8d62c3dad8 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -41,6 +41,7 @@
u-boot-nintendo-nes-classic-edition-bootloader
u-boot-novena-bootloader
u-boot-orangepi-r1-plus-lts-rk3328-bootloader
+ u-boot-orangepi-zero2w-bootloader
u-boot-pine64-plus-bootloader
u-boot-pine64-lts-bootloader
u-boot-pinebook-bootloader
@@ -274,6 +275,11 @@
(package u-boot-orangepi-r1-plus-lts-rk3328)
(disk-image-installer install-orangepi-r1-plus-lts-rk3328-u-boot)))
+(define u-boot-orangepi-zero2w-bootloader
+ (bootloader
+ (inherit u-boot-allwinner-bootloader)
+ (package u-boot-orangepi-zero2w)))
+
(define u-boot-pine64-plus-bootloader
(bootloader
(inherit u-boot-allwinner64-bootloader)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index a6ba4b14da..9bc5aa7d40 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1144,6 +1144,24 @@ removed so that it fits within common partitioning schemes.")))
(modify-inputs (package-inputs base)
(append arm-trusted-firmware-sun50i-a64))))))
+(define-public u-boot-orangepi-zero2w
+ (let ((base (make-u-boot-package
+ "orangepi_zero2w" "aarch64-linux-gnu")))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'set-environment
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (setenv "SCP" "/dev/null")
+ (setenv "BL31" (search-input-file inputs "bl31.bin"))))))))
+ (inputs
+ (modify-inputs (package-inputs base)
+ ;; The Zero 2W uses the slightly revised Allwinner H618.
+ (append arm-trusted-firmware-sun50i-h616))))))
+
(define-public u-boot-pine64-plus
(make-u-boot-sunxi64-package "pine64_plus" "aarch64-linux-gnu"
(delay crust-pine64-plus)))
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index d155c5365c..d282b4b684 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1154,6 +1154,12 @@ such as:
(inherit base)
(name "arm-trusted-firmware-sun50i-a64"))))
+(define-public arm-trusted-firmware-sun50i-h616
+ (let ((base (make-arm-trusted-firmware "sun50i_h616")))
+ (package
+ (inherit base)
+ (name "arm-trusted-firmware-sun50i-h616"))))
+
(define-public arm-trusted-firmware-rk3328
(make-arm-trusted-firmware "rk3328"))