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 <heinrich.schuchardt@canonical.com>
ubuntu-core-desktop-noble
Heinrich Schuchardt 11 months ago
parent b4cf5a1b2c
commit c34e3dccd7

@ -354,6 +354,13 @@ EOF
# the model value is wrong and we need to use /etc/flash-kernel/machine instead. # the model value is wrong and we need to use /etc/flash-kernel/machine instead.
# This explains why we install flash-kernel here. # This explains why we install flash-kernel here.
chroot mountpoint bash -c "echo 'StarFive VisionFive 2 v1.3B' > /etc/flash-kernel/machine" 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) unmatched)
cp ${my_d}/riscv64/grub/90_watchdog-thresh.cfg mountpoint/etc/default/grub.d/ cp ${my_d}/riscv64/grub/90_watchdog-thresh.cfg mountpoint/etc/default/grub.d/

Loading…
Cancel
Save