diff --git a/DEVELOPERS b/DEVELOPERS index b0f10148b5..a200edb7f5 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1029,6 +1029,10 @@ F: package/tbb/ N: Francisco Gonzalez F: package/ser2net/ +N: Francois Dugast +F: board/visionfive2/ +F: configs/visionfive2_defconfig + N: Francois Perrad F: board/freescale/ls1028ardb/ F: board/olimex/a20_olinuxino diff --git a/board/visionfive2/genimage.cfg b/board/visionfive2/genimage.cfg new file mode 100644 index 0000000000..c221b49c7b --- /dev/null +++ b/board/visionfive2/genimage.cfg @@ -0,0 +1,21 @@ +# Minimal SD card image for the Starfive VisionFive2 board + +image sdcard.img { + hdimage { + } + + # u-boot is hard coded to look at 3rd partition + partition dummy1 { + size = 512 + } + + partition dummy2 { + size = 512 + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + bootable = "true" + } +} diff --git a/board/visionfive2/overlay/boot/extlinux/extlinux.conf b/board/visionfive2/overlay/boot/extlinux/extlinux.conf new file mode 100644 index 0000000000..6e2c5660d6 --- /dev/null +++ b/board/visionfive2/overlay/boot/extlinux/extlinux.conf @@ -0,0 +1,4 @@ +label linux + kernel /boot/Image + devicetree /boot/jh7110-visionfive-v2.dtb + append console=ttyS0,115200 root=/dev/mmcblk1p3 diff --git a/board/visionfive2/readme.txt b/board/visionfive2/readme.txt new file mode 100644 index 0000000000..2da98f3847 --- /dev/null +++ b/board/visionfive2/readme.txt @@ -0,0 +1,30 @@ +Starfive VisionFive2 +==================== + +The VisionFive2 is a low-cost RISC-V 64-bit based platform, powered by a +Starfive JH7110 processor. + +How to build +============ + +$ make visionfive2_defconfig +$ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Preparing the board +=================== + +Connect a TTL UART cable to pin 6 (GND), 8 (TX) and 10 (RX). + +Insert your SD card. + +Power-up the board using an USB-C cable. diff --git a/configs/visionfive2_defconfig b/configs/visionfive2_defconfig new file mode 100644 index 0000000000..5b07a8efbc --- /dev/null +++ b/configs/visionfive2_defconfig @@ -0,0 +1,18 @@ +BR2_riscv=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y +BR2_SYSTEM_DHCP="eth0" +BR2_ROOTFS_OVERLAY="board/visionfive2/overlay" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/visionfive/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,starfive-tech,linux,7b7b4eddd8d5ae55f6e0ee09b93e16e23ab4f97b)/linux-7b7b4eddd8d5ae55f6e0ee09b93e16e23ab4f97b.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="starfive_visionfive2" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="starfive/jh7110-visionfive-v2" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +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_PACKAGE_HOST_GENIMAGE=y