Updating Kernel Image on VisionFive 2

Perform the following steps to update the kernel image on VisionFive 2:

  1. Flashing Debian image to SD card, it is mandatory to start VisionFive 2 normally once.
    Tip:
    Figure 1. VisionFive 2 Startup Output Example
  2. Insert an SD card and perform mount operations under Ubuntu development environment:
    1. Perform the following command to list devices:
      fdisk -l
      Figure 2. Example Output
    2. Execute the following command to mount:
      sudo mount /dev/sdc2 /media/<Username>/root/boot
      Example command:
      sudo mount /dev/sdc2 /media/yzx/root/boot
  3. Execute the following command and copy the generated kernel files to /media/<Username>/root/boot/boot:
    sudo cp boot/vmlinuz-5.15.0-starfive /media/<Username>/root/boot/boot && sync
    sudo cp boot/config-5.15.0-starfive /media/<Username>/root/boot/boot && sync
    sudo cp boot/System.map-5.15.0-starfive /media/<Username>/root/boot/boot && sync
    
  4. Execute the following command and copy the generated deb image packages to /media/<Username>/root/usr:
    sudo cp linux-image-5.15.0-starfive_5.15.0-starfive-1_riscv64.deb /media/<<Username>/ root/usr/ && sync
    sudo cp linux-libc-dev_5.15.0-starfive-1_riscv64.deb /media/<Username>/root/usr/ && sync
    sudo cp linux-headers-5.15.0-starfive_5.15.0-starfive-1_riscv64.deb /media/<Username>/root/usr/ && sync
    
  5. Download Docker offline install package and copy it to /media/<username>/root/usr.
  6. Insert the SD card on VisionFive 2 and restart it to enter the emergency mode. Then enter the password starfive to login.
  7. Unplug the SD card first and then reinsert it on VisionFive 2. After successful login, enter the /usr directory to install the deb package.
    Note: To install the package, execute the following commands in order.
    dpkg -i linux-headers-5.15.0-starfive_5.15.0-starfive-1_riscv64.deb
    dpkg -i linux-libc-dev_5.15.0-starfive-1_riscv64.deb
    dpkg -i linux-image-5.15.0-starfive_5.15.0-starfive-1_riscv64.deb
    
  8. Restart the system to enter the normal login interface, and enter the account and password.
  9. Execute the following commands to install Docker related dependency packages and offline packages:
    apt install libip6tc2 libyajl2 conntrack ebtables ethtool iptables socat libyajl-dev
    dpkg –i docker-v20.10.2-dev_riscv64.deb