Skip to content

Commit

Permalink
v8.23
Browse files Browse the repository at this point in the history
- DietPi-Config | VisionFive 2: Assure that a U-Boot environment is flashed before allowing to update the bootloader, since the default from StarFive does not support any other then boot files on FAT on partition 3. Also fix the update, as the U-Boot environment is not on /dev/mtd1 and the U-Boot image on /dev/mtd2.
  • Loading branch information
MichaIng committed Oct 19, 2023
1 parent 9112eae commit c0464d9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,17 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr
\nThis will download and flash the latest U-Boot from StarFive to your VisionFive 2 SPI storage.
Latest release notes: https://github.com/starfive-tech/VisionFive2/releases
\nDo you want to continue?' || return 0
G_AG_CHECK_INSTALL_PREREQ libubootenv-tool
if fw_printenv 2>&1 | head -1 | grep -q '^Cannot read environment, using default'
then
G_WHIP_YESNO '[ INFO ] No U-Boot environment found
\nThere is currently no dedicated U-Boot environment on your SPI flash. U-Boot hence uses the embedded default and the latest StarFive U-Boot default environment does not support the DietPi OS partitioning anymore.
\nWith our latest kernel upgrade, we shipped the tools and configs to flash a reasonable generic U-Boot environment which supports boot from all filesystems of all partitions of all boot media, including NVMe, USB, eMMC, SD cards and DHCP/TFTP. Flashing assures that our image continues to boot after updating to the latest U-Boot release from StarFive.
\nOur U-Boot environment should support the official StarFive images, including all features. If you are missing anything or face issues with them, please report back: https://github.com/MichaIng/DietPi/issues/6212
\nYou can use the commands "fw_printenv" and "fw_setenv" to read and write to the U-Boot environment, especially set boot priorities via "boot_targets" variable.
\nDo you want to flash our new U-Boot environment to continue?' || return 0
G_EXEC fw_setenv
fi
/boot/dietpi/func/dietpi-set_hardware vf2-spi-update

elif [[ $G_WHIP_RETURNED_VALUE == 'I2C state' ]]; then
Expand Down
2 changes: 1 addition & 1 deletion dietpi/func/dietpi-set_hardware
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ _EOF_
G_EXEC curl -sSfLO "https://github.com/starfive-tech/VisionFive2/releases/download/$version/u-boot-spl.bin.normal.out"
G_EXEC curl -sSfLO "https://github.com/starfive-tech/VisionFive2/releases/download/$version/visionfive2_fw_payload.img"
G_EXEC_OUTPUT=1 G_EXEC flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
G_EXEC_OUTPUT=1 G_EXEC flashcp -v visionfive2_fw_payload.img /dev/mtd1
G_EXEC_OUTPUT=1 G_EXEC flashcp -v visionfive2_fw_payload.img /dev/mtd2
G_EXEC rm u-boot-spl.bin.normal.out visionfive2_fw_payload.img
}

Expand Down

0 comments on commit c0464d9

Please sign in to comment.