From c34e3dccd7300b0159fef1c6c724d6b053049601 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 8 Feb 2024 09:26:27 +0100 Subject: [PATCH] riscv: install u-boot-starfive on VisionFive 2 preinstalled image The StarFive VisionFive 2 board can boot from SPI flash or SD-card. Install U-Boot to the SD card. Signed-off-by: Heinrich Schuchardt --- .../hooks.d/base/disk-image-uefi-non-cloud.binary | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary index 4bf9ad77..5060c284 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi-non-cloud.binary @@ -354,6 +354,13 @@ EOF # the model value is wrong and we need to use /etc/flash-kernel/machine instead. # This explains why we install flash-kernel here. chroot mountpoint bash -c "echo 'StarFive VisionFive 2 v1.3B' > /etc/flash-kernel/machine" + chroot mountpoint apt-get install -qqy u-boot-starfive + # U-Boot SPL + loader1="${loop_device}p13" + # Main U-Boot + loader2="${loop_device}p2" + dd if=mountpoint/usr/lib/u-boot/starfive_visionfive2/u-boot-spl.bin.normal.out of=$loader1 + dd if=mountpoint/usr/lib/u-boot/starfive_visionfive2/u-boot.itb of=$loader2 ;; unmatched) cp ${my_d}/riscv64/grub/90_watchdog-thresh.cfg mountpoint/etc/default/grub.d/