Method 2: Using Ethernet Cable
-
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.
-
Open minicom and wait until the board enters U-Boot mode. You will see
the following output when it is in U-Boot mode.
-
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. -
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.
-
Install a TFTP server on the Host PC.
sudo apt-get update sudo apt install tftpd-hpa
-
Check the status of the server.
sudo systemctl status tftpd-hpa
-
Execute the following to enter the TFTP server configuration.
sudo nano /etc/default/tftpd-hpa
-
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). -
Restart the TFTP server.
sudo systemctl restart tftpd-hpa
-
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
-
Log in with the following credentials.
-
Username: root
-
Password: starfive
-