HCL:BeagleV

Jump to: navigation, search
BeagleV Beta with fan and UART cables

The BeagleV Starlight is the first RISC-V based Beagleboard.

Technical details

  • StarFive JH7100 SoC
    • 2x SiFive U74 cores - RV64GBC ISA
  • 8 MiB RAM
  • SPI flash
  • microSD card slot
  • 4x USB 3.0
  • Ethernet
  • HDMI
  • 40-pin GPIO connector

The Beta version of the board features an active cooling fan that requires 5V power supply - it is suggested to use pins 4 (VCC) and 6 (GND). To reduce the noise it can also be connected to pin 1 (3.3V). This conflicts with the common usage of pins 6, 8, 10 for UART; instead GND can be connected to pin 9 or 14.

Firmware update

The first-stage bootloader offers a serial menu that allows to flash bootloaders via serial (xmodem).

Cf. https://github.com/starfive-tech/JH7100_ddrinit and https://github.com/starfive-tech/JH7100_secondBoot.

OpenSBI and U-Boot are also needed: https://github.com/starfive-tech/opensbi and https://github.com/starfive-tech/u-boot.

In case of failure during the firmware update a recovery can be done with https://github.com/starfive-tech/bootloader_recovery.

You can follow this link for more information on the update process: https://rvspace.org/en/Product/VisionFive/Technical_Documents/VisionFive_Single_Board_Computer_Quick_Start_Guide#appendix-b-updating-firmware-and-u-boot

Community images

Dedicated images are available in this project: https://build.opensuse.org/project/show/devel:RISCV:Factory:Contrib:StarFive.

Write the downloaded image on a sd card:

xzcat [image].raw.xz | dd bs=4M of=/dev/mmcblkX iflag=fullblock oflag=direct status=progress; sync

For now, a hack is needed to be able to boot the image in an automated way. After writing the image on an sdcard you have to copy /boot/dtb/starfive/*.dtb files in /boot/efi/dtb/starfive (do not use links!), then create a /boot/uEnv.txt file that contains these lines:

fdt_high=0xffffffffffffffff
initrd_high=0xffffffffffffffff
kernel_addr_r=0x84000000
kernel_comp_addr_r=0x90000000
kernel_comp_size=0x10000000
fdt_addr_r=0x88000000
scriptaddr=0x88100000
pxefile_addr_r=0x88200000
ramdisk_addr_r=0x88300000
loadaddr=0xa0000000

# Force automated boot
bootcmd=run distro_bootcmd

Of course, to do this you have to mount your image/partition on another machine, or do some U-Boot magic to boot your board on do these steps online ;-)

This uEnv.txt hack will be removed as soon as this fix will be merged: https://github.com/starfive-tech/u-boot/pull/31.

It should be available also in the "generic" images at some points.

Manual installation

OpenSBI

You will need to update the boot loader firmware on your Beagle-V to be able to boot a mainline based kernel. The image (opensbi-starfivejh7100starlightsmode.img) needs to be extracted from the file opensbi-starfivejh7100starlightsmode.tar.gz. To write the binary to the board you need a xmodem connection (e.g. use minicom). Interrupt the first timeout before OpenSBI on the board gets booted. More information can be found here.

U-Boot

Mainline U-Boot v2022.04 does not yet support the BeagleV. For now, a firmware payload that contains OpenSBI and U-Boot provided by StarFive can be used: https://github.com/starfive-tech/Fedora_on_StarFive/releases. Latest U-Boot development version is used, these changes will be added in the official version at some points.

Kernel

The mainline Linux kernel v5.18 does not yet contain a fully working Device Tree for the BeagleV.

See also