diff --git a/board/visionfive2/genimage.cfg b/board/visionfive2/genimage.cfg index c221b49c7b..8133e740c0 100644 --- a/board/visionfive2/genimage.cfg +++ b/board/visionfive2/genimage.cfg @@ -2,20 +2,22 @@ image sdcard.img { hdimage { + partition-table-type = "gpt" } - # u-boot is hard coded to look at 3rd partition - partition dummy1 { - size = 512 + partition spl { + partition-type-uuid = 2E54B353-1271-4842-806F-E436D6AF6985 + image = "u-boot-spl.bin.normal.out" } - partition dummy2 { - size = 512 + partition uboot { + partition-type-uuid = BC13C2FF-59E6-4262-A352-B275FD6F7172 + image = "u-boot.itb" } partition rootfs { - partition-type = 0x83 + partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4 + bootable = true image = "rootfs.ext4" - bootable = "true" } } diff --git a/board/visionfive2/readme.txt b/board/visionfive2/readme.txt index 1924cbc12b..85be1d5dfc 100644 --- a/board/visionfive2/readme.txt +++ b/board/visionfive2/readme.txt @@ -27,6 +27,10 @@ Preparing the board Connect a TTL UART cable to pin 6 (GND), 8 (TX) and 10 (RX). +Change the boot mode pins to SD card booting (RGPIO_0=1, GRPIO_1=0): + +https://doc-en.rvspace.org/VisionFive2/Quick_Start_Guide/VisionFive2_SDK_QSG/boot_mode_settings.html + Insert your SD card. Power-up the board using an USB-C cable. diff --git a/configs/visionfive2_defconfig b/configs/visionfive2_defconfig index 3a1a4f527c..c8576a35a7 100644 --- a/configs/visionfive2_defconfig +++ b/configs/visionfive2_defconfig @@ -15,4 +15,23 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y # BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_OPENSBI=y +BR2_TARGET_OPENSBI_CUSTOM_VERSION=y +BR2_TARGET_OPENSBI_CUSTOM_VERSION_VALUE="1.4" +BR2_TARGET_OPENSBI_PLAT="generic" +# BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set +BR2_TARGET_OPENSBI_ADDITIONAL_VARIABLES="FW_TEXT_START=0x40000000 FW_OPTIONS=0" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="starfive_visionfive2" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_OPENSBI=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin.normal.out" BR2_PACKAGE_HOST_GENIMAGE=y