[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70892] [PATCH 5/6] bootloader: Add u-boot-starfive-visionfive2-boot
From: |
Zheng Junjie |
Subject: |
[bug#70892] [PATCH 5/6] bootloader: Add u-boot-starfive-visionfive2-bootloader. |
Date: |
Sun, 12 May 2024 19:09:28 +0800 |
* gnu/bootloader/u-boot.scm (u-boot-starfive-visionfive2-bootloader): New
variable.
Change-Id: I4b73906fe18d481644102c271f5e0883167b3a50
---
gnu/bootloader/u-boot.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index 8e7cc05191..b5a9662573 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -49,6 +49,7 @@ (define-module (gnu bootloader u-boot)
u-boot-rockpro64-rk3399-bootloader
u-boot-sifive-unmatched-bootloader
u-boot-qemu-riscv64-bootloader
+ u-boot-starfive-visionfive2-bootloader
u-boot-ts7970-q-2g-1000mhz-c-bootloader
u-boot-wandboard-bootloader))
@@ -159,6 +160,16 @@ (define install-sifive-unmatched-u-boot
(write-file-on-device u-boot (stat:size (stat u-boot))
image (* 2082 512)))))
+(define install-starfive-visionfive2-u-boot
+ #~(lambda (bootloader root-index image)
+ (let ((spl (string-append
+ bootloader "/libexec/spl/u-boot-spl.bin.normal.out"))
+ (u-boot (string-append bootloader "/libexec/u-boot.itb")))
+ (write-file-on-device spl (stat:size (stat spl))
+ image (* 34 512))
+ (write-file-on-device u-boot (stat:size (stat u-boot))
+ image (* 2082 512)))))
+
(define install-qemu-riscv64-u-boot
#~(lambda (bootloader device mount-point)
(let ((u-boot.bin (string-append bootloader "/libexec/u-boot.bin"))
@@ -316,6 +327,12 @@ (define u-boot-sifive-unmatched-bootloader
(package u-boot-sifive-unmatched)
(disk-image-installer install-sifive-unmatched-u-boot)))
+(define u-boot-starfive-visionfive2-bootloader
+ (bootloader
+ (inherit u-boot-bootloader)
+ (package u-boot-starfive-visionfive2)
+ (disk-image-installer install-starfive-visionfive2-u-boot)))
+
(define u-boot-qemu-riscv64-bootloader
(bootloader
(inherit u-boot-bootloader)
--
2.41.0
- [bug#70892] [PATCH 0/6] Add visionfive2 support., Zheng Junjie, 2024/05/12
- [bug#70892] [PATCH 3/6] gnu: shepherd-0.10: When target riscv64, use guile-fibers-1.1., Zheng Junjie, 2024/05/12
- [bug#70892] [PATCH 5/6] bootloader: Add u-boot-starfive-visionfive2-bootloader.,
Zheng Junjie <=
- [bug#70892] [PATCH 1/6] gnu: linux-libre-6.8: add riscv config., Zheng Junjie, 2024/05/12
- [bug#70892] [PATCH 2/6] image: raise error when use both grub-efi* bootloader and not gpt image., Zheng Junjie, 2024/05/12
- [bug#70892] [PATCH 4/6] gnu: Add u-boot-starfive-visionfive2., Zheng Junjie, 2024/05/12
- [bug#70892] [PATCH 6/6] system: images: Add visionfive2 module., Zheng Junjie, 2024/05/12
- [bug#70892] [PATCH 0/6] Add visionfive2 support., Vagrant Cascadian, 2024/05/15
- [bug#70892] [PATCH v2 0/7] Add visionfive2 support., Zheng Junjie, 2024/05/18