Recovering the Bootloader

The SPL and U-Boot are stored inside the SPI flash of your board. There may be situations where you accidentally empty the flash or if the flash is damaged on your board. In these situations, it's better to recover the bootloader.
  1. Connect the jumper wires between the USB-to-Serial converter and the Debug pins of VisionFive 2 40-pin GPIO header. The following figure is an example:

    Figure 1. Connecting to the Debug Pins of VisionFive 2 40-pin GPIO Header
  2. Before you recover the bootloader, double check the boot mode jumpers (Switch_2) on your board has already been switched to UART mode (RGPIO_1,RGPIO_0: 1,1).
    Tip: The following figure shows the boot mode settings. For more information, refer to VisionFive 2 Boot Mode Settings.
    Figure 2. Boot Mode Setting (UART)
  3. Configure the serial port baud rate settings to 115200 bps.
  4. Power up, you will see an output like this:
    CCCCCCCCCCCCCCCCCCCCC
  5. Transfer the latest recovery binary (jh7110-recovery-<Version>.bin) by XMODEM. The recovery binary is located at: https://github.com/starfive-tech/Tools/tree/master/recovery.
    Tip: <Version> indicates the version number of the recovery file. Make sure you use the latest version.
    Figure 3. Example Output
  6. Type 0 and press Enter on your keyboard to update SPL binary <u-boot-spl.bin.normal.out>.
    Figure 4. Example Output
  7. Type 2 and press Enter on your keyboard to update U-Boot binary <visionfive2_fw_payload.img>.
    Figure 5. Example Output
  8. Power off and switch jumpers back to Flash mode (RGPIO_1,RGPIO_0: 0,0).