Overall Status
Core Components |
||
Boot Standard Kernel: |
|
|
LAN network card: |
|
|
Detect hard drives (NVMe): |
|
|
Detect hard drives (microSD): |
|
|
Xorg |
[?] |
|
Extra Features |
||
CPU Frequency Scaling |
|
|
Hibernation |
[?] |
|
Sleep / Suspend |
[?] |
|
Power Off / Reboot |
|
Legend :
= OK ;
Unsupported(No Driver) ;
= Error (Couldn't get it working); [?] Unknown, Not Test ; [-] Not-applicable
= Configuration Required;
= Only works with a non-free driver and or firmware
Most of ?VisionFive V2 hardware support is merged to upstream Linux kernel (v6.12);
- PCI-E works with upstream Linux 6.12
- Linux Kernel v6.12 does not yet support (patches are under review): CAN, MIPI DSI, HDMI/ DC8200;
A Linux kernel build with needed patches is maintained at https://framagit.org/compile-farm/riscv64-kernel-build-visionfive2 (also contains Linux configuration for Jh7110 hardware)
Steps to install Trixie https://lists.debian.org/debian-riscv/2025/03/msg00014.html
Current support state could be followed at RVSpace JH7110 Upstream Status page.
Important Notes
Be sure to set the DIP switches correctly for your boot medium! The default with my unit was UART. The DIP switches are helpfully ordered right to left if you look at the boot table.
Beware, if you need to boot from NVMe, be sure you update u-boot and firmware. Pay extra attention to setting correct XMODEM parity. You can follow this minicom HOWTO. Sources of the binaries are: for recovery for u-boot and firmware.
An alternative option is to boot from microSD and update u-boot and firmware using *flashcp* command as described at RVSpace Quick Start Guide.
You can mostly follow the instructions given for InstallingDebianOn/StarFive/VisionFiveV1.
However, at least some u-boot versions expect uEnv.txt to be named vf2_uEnv.txt instead.
Suggested vf2_uEnv.txt for this board:
kernel_comp_addr_r=0x90000000 kernel_comp_size=0x10000000 boot2=echo "HELLO WORLD" fatbootpart=1:3 bootdir=/ fdtfile=starfive/jh7110-visionfive-v2.dtb bootcmd_mmc1=devnum=1; run mmc_boot boot_targets=mmc1 bootcmd=run distro_bootcmd
When manually partitioning, do not forget to set the "BIOS legacy boot" flag on partition 3 (= "fatbootpart").
Note: these uboot settings have been tested with U-boot from VF2 release 2.8.0, version string "U-Boot 2021.10 (Jan 19 2023 - 04:09:41 +0800)".
Known working partitioning scheme:
Device Start End Sectors Type-UUID UUID Name Attrs /dev/mmcblk1p1 4096 8191 4096 2E54B353-1271-4842-806F-E436D6AF6985 D2584873-5D66-4D78-B3AE-59FEF7490893 spl /dev/mmcblk1p2 8192 16383 8192 5B193300-FC78-40CD-8002-E86C45580B47 BCD0A0B9-6868-453A-A68D-F6101DA0F64B uboot /dev/mmcblk1p3 16384 614399 598016 C12A7328-F81F-11D2-BA4B-00A0C93EC93B 42069F16-59F6-40F2-9669-F2E631C7F3E3 boot LegacyBIOSBootable
The starfive image has this:
Disklabel type: gpt Device Start End Sectors Size Type /dev/sda1 4096 8191 4096 2M HiFive BBL /dev/sda2 8192 16383 8192 4M HiFive FSBL /dev/sda3 16384 221183 204800 100M EFI System /dev/sda4 221184 5527518 5306335 2,5G Linux filesystem
Obviously, GPT has no such thing as boot flags for partitions,
Partition 4 and onwards can be your linux partitions.
Linux Kernel Configuration
Below are Linux configuration values which should be enabled (or compiled as modules) to support ?VisionFive 2 (JH7110) hardware:
CONFIG_HW_RANDOM_JH7110=m CONFIG_PINCTRL_STARFIVE_JH7110=y CONFIG_PINCTRL_STARFIVE_JH7110_SYS=y CONFIG_PINCTRL_STARFIVE_JH7110_AON=y CONFIG_SND_SOC_JH7110_PWMDAC=m CONFIG_SND_SOC_JH7110_TDM=m CONFIG_CLK_STARFIVE_JH7110_PLL=y CONFIG_CLK_STARFIVE_JH7110_SYS=y CONFIG_CLK_STARFIVE_JH7110_AON=m CONFIG_CLK_STARFIVE_JH7110_STG=m CONFIG_CLK_STARFIVE_JH7110_ISP=m CONFIG_CLK_STARFIVE_JH7110_VOUT=m CONFIG_RESET_STARFIVE_JH7110=y CONFIG_PHY_STARFIVE_JH7110_DPHY_RX=m CONFIG_PHY_STARFIVE_JH7110_DPHY_TX=m CONFIG_PHY_STARFIVE_JH7110_PCIE=m CONFIG_PHY_STARFIVE_JH7110_USB=m # CONFIG_CRYPTO_DEV_JH7110 is not set
The CONFIG_CRYPTO_DEV_JH7110 is not enabled because I get issues with the module as below:
jh7110-crypto 16000000.crypto: Failed to do one request from queue: -110.
U-Boot Configuration
Default U-Boot environment does not detect PCI-E devices (NVMe). On first boot, one should interrupt the boot process at the U-Boot stage and configure environment variables as follows:
boot_targets=mmc0 mmc1 nvme0n1p3 dhcp bootcmd_nvme0n1p3=devtype=nvme;devnum=0;distro_bootpart=3;prefix=/boot/; run boot_extlinux preboot=run chipa_set_uboot;run mmcbootenv;pci enum;nvme scan
*If boot from internal eMMC, microSD card and DHCP is not planned, they can be removed from the boot_targets.
U-Boot Linux Access
To access and edit U-Boot environment from a running OS, one can use u-boot-tools which are available in Debian repositories.
U-Boot environment is stored on the board's flash, so Linux Kernel support should be enabled for it (Kernel configuration is given to the best of my knowledge):
CONFIG_MTD=m CONFIG_MTD_OF_PARTS=m CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y CONFIG_MTD_NAND_CORE=m CONFIG_MTD_NAND_ECC=y CONFIG_MTD_NAND_ECC_SW_BCH=y CONFIG_MTD_SPI_NOR=m CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y CONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y CONFIG_LEDS_TRIGGER_MTD=y
u-boot-tools should be configured to read the environment:
# Edit /etc/fw_env.config and set to content as below: # NOR example # MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd1 0x0000 0x10000 0x1000
When configuration above is complete, one can try to read environment using fw_printenv and set using fw_setenv commands.
LUA Support
At the moment (Feb 10th, 2024), LUA JIT compilation support is not implemented for RISC-V, see Add support for RISC-V issue for the current state. A work in progress JIT support is available at LuaJIT.