Method 2: Using Ethernet Cable

  1. Connect an Ethernet Cable from the RJ45 port of VisionFive 2 to a router, connect serial adapter cable and power on the board.
    Note: Make sure the host PC is also connected to the same router using Ethernet or Wi-Fi.
  2. Open minicom and wait until the board enters U-Boot mode. You will see the following output when it is in U-Boot mode.
    Figure 1. Example Output
    using_ethernet_cable_step2(2).png
  3. Enter the following commands to set U-Boot environment variables.
    setenv serverip 192.168.125.142;setenv ipaddr 192.168.125.200;
    setenv hostname starfive;setenv netdev eth0;
    setenv kernel_comp_addr_r 0xb0000000;setenv kernel_comp_size 0x10000000; 
    setenv bootargs console=ttyS0,115200 earlycon=sbi root=/dev/ram0 stmmaceth=chain_mode:1 loglevel=8
    Note: Generally, the default IP of a router is 192.168.120.1. In this case, use the server IP as the IP assigned by the DHCP server of the router and use the VisionFive 2 IP as 192.168.120.xxx. However, if your router IP is different (e.g.: 192.168.2.1), the server and VisionFive 2 should follow the IP format of 192.168.2.xxx.
  4. Check the connectivity by pinging the host PC from VisionFive 2.

    Example:

    ping 192.168.120.12
    Result:

    If you see the following output, the host PC and VisionFive 2 have established communication on the same network.

    Figure 2. Example Output
  5. Install a TFTP server on the Host PC.
    sudo apt-get update
    sudo apt install tftpd-hpa 
  6. Check the status of the server.
    sudo systemctl status tftpd-hpa
  7. Execute the following to enter the TFTP server configuration.
    sudo nano /etc/default/tftpd-hpa
  8. Configure the TFTP server as follows.
    TFTP_USERNAME="tftp"
    TFTP_DIRECTORY="/home/user/Desktop/compiled"
    TFTP_ADDRESS=":69"
    TFTP_OPTIONS="--secure"
    Note: The TFTP_DIRECTORY is the directory that we created before with all the 3 images (Image.gz, jh7110-visionfive-v2.dtb, rootfs.cpio.gz).
  9. Restart the TFTP server.
    sudo systemctl restart tftpd-hpa
  10. Type the following inside the U-Boot mode of VisionFive 2 to download the files from the TFTP server of the host PC and start the kernel.
    tftpboot ${fdt_addr_r} <dtb_File_Name>;
    tftpboot ${kernel_addr_r} Image.gz;tftpboot ${ramdisk_addr_r} rootfs.cpio.gz;
    run chipa_set_linux;
    booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
    Note:
    Example:

    The following command is an example for VisionFive 2:

    tftpboot ${fdt_addr_r} jh7110-visionfive-v2.dtb;
    tftpboot ${kernel_addr_r} Image.gz;
    tftpboot ${ramdisk_addr_r} rootfs.cpio.gz;
    run chipa_set_linux;
    booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
    Result:
    starfive mini RISC-V Rootfs
  11. Log in with the following credentials.
    • Username: root

    • Password: starfive