summaryrefslogtreecommitdiff
path: root/gnu/bootloader
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-05-28 10:57:35 +0300
committerEfraim Flashner <efraim@flashner.co.il>2023-06-14 14:52:21 +0300
commit39250fc6229d60b7ae397749caf1e4c99e49b419 (patch)
tree1ecd52c018e537bce7917217c17e6377076b3a40 /gnu/bootloader
parent3e5083b1823cb68cc5e51502cc297e0c2f5aab7e (diff)
gnu: bootloader: Add u-boot-sifive-unmatched-bootloader.
* gnu/bootloader/u-boot.scm (install-sifive-unmatched-u-boot, u-boot-sifive-unmatched-bootloader): New variables.
Diffstat (limited to 'gnu/bootloader')
-rw-r--r--gnu/bootloader/u-boot.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index 65d79234655..712db15b020 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -4,6 +4,7 @@
4;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu> 4;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
5;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> 5;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
6;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> 6;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
7;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il>
7;;; 8;;;
8;;; This file is part of GNU Guix. 9;;; This file is part of GNU Guix.
9;;; 10;;;
@@ -43,6 +44,7 @@
43 u-boot-puma-rk3399-bootloader 44 u-boot-puma-rk3399-bootloader
44 u-boot-rock64-rk3328-bootloader 45 u-boot-rock64-rk3328-bootloader
45 u-boot-rockpro64-rk3399-bootloader 46 u-boot-rockpro64-rk3399-bootloader
47 u-boot-sifive-unmatched-bootloader
46 u-boot-ts7970-q-2g-1000mhz-c-bootloader 48 u-boot-ts7970-q-2g-1000mhz-c-bootloader
47 u-boot-wandboard-bootloader)) 49 u-boot-wandboard-bootloader))
48 50
@@ -135,6 +137,15 @@
135 (install-dir (string-append mount-point "/boot"))) 137 (install-dir (string-append mount-point "/boot")))
136 (install-file u-boot.imx install-dir)))) 138 (install-file u-boot.imx install-dir))))
137 139
140(define install-sifive-unmatched-u-boot
141 #~(lambda (bootloader root-index image)
142 (let ((spl (string-append bootloader "/libexec/spl/u-boot-spl.bin"))
143 (u-boot (string-append bootloader "/libexec/u-boot.itb")))
144 (write-file-on-device spl (stat:size (stat spl))
145 image (* 34 512))
146 (write-file-on-device u-boot (stat:size (stat u-boot))
147 image (* 2082 512)))))
148
138 149
139 150
140;;; 151;;;
@@ -273,3 +284,9 @@
273 (package u-boot-ts7970-q-2g-1000mhz-c) 284 (package u-boot-ts7970-q-2g-1000mhz-c)
274 (installer install-u-boot-ts7970-q-2g-1000mhz-c-u-boot) 285 (installer install-u-boot-ts7970-q-2g-1000mhz-c-u-boot)
275 (disk-image-installer #f))) 286 (disk-image-installer #f)))
287
288(define u-boot-sifive-unmatched-bootloader
289 (bootloader
290 (inherit u-boot-bootloader)
291 (package u-boot-sifive-unmatched)
292 (disk-image-installer install-sifive-unmatched-u-boot)))