Repository navigation
VisionFive boot fixes - #31
MichaelZhuxx merged 3 commits into
Conversation
According to https://u-boot.readthedocs.io/en/latest/develop/distro.html the default u-boot configuration should define addresses such as "kernel_addr_r", so that "users" (distro maintainers) don't have to guess what are the right values. The values in this patch are a mix of those from qemu-riscv config, and those from the Fedora image provided by StarFive (which defines all addresses in a uEnv.txt file). These two sources mostly agree. For reference, here are the addresses in the Fedora image (version 20211226-214100): fdt_high=0xffffffffffffffff initrd_high=0xffffffffffffffff scriptaddr=0x88100000 script_offset_f=0x1fff000 script_size_f=0x1000 kernel_addr_r=0x84000000 kernel_comp_addr_r=0x90000000 kernel_comp_size=0x10000000 fdt_addr_r=0x88000000 ramdisk_addr_r=0x88300000 Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Currently, the starfive configuration implements the distro spec: https://u-boot.readthedocs.io/en/latest/develop/distro.html However, BOOTCOMMAND is not enabled in the actual board config. This results in "bootcmd" not being defined, so u-boot does nothing by default. The Fedora image provided by StarFive is still able to boot, but only because u-boot has a preboot command that loads boot/uEnv.txt from the third partition of the SD card. To make use of the distro spec and allow generic booting of any OS image, this patch enables BOOTCOMMAND. Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Currently, the boot order is DHCP, then MMC. Trying DHCP boot first is not user-friendly, because it can take a long time before falling back to MMC. Also, network booting is usually not wanted when a SD card is inserted. Change order so that we first try MMC, and then fall back to DHCP if MMC booting didn't work. Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
|
I have successfully tested these patches on a VisionFive V1 board, and I could boot Debian without needing any uEnv.txt file. |
|
Any update on this? |
|
Just to clarify: the current u-boot on VisionFive v1 makes it hard for distros to support the board. And updating u-boot on a board is not something that most users will feel comfortable doing (btw, updating u-boot was well documented before, but I can't find the documentation on rvspace.org anymore :/). So, it would be very helpful for the changes here to be integrated and shipped with the VisionFive V2 boards! |
|
For reference: The quick start guide has the instructions for upgrading U-Boot, recovery, etc..: |
|
I have an oreboot port in the makings instead, which would only need one single binary eventually for the whole procedure - clocks/GPIOs/DRAM init, SBI, loading a payload - plus your custom app, e.g., bare metal, LinuxBoot, hypervisor, whatever you like. :) |
See individual commit messages for details