[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RISC-V virtual machine does not boot anymore

On 2019-12-18, Mitsuya Shibata wrote:
> What is the content of /boot/extlinux/extlinux.conf?
> On my environment (Ubuntu 19.10 with amd64),
> I need to set 'U_BOOT_FDT_DIR="noexist"' in /etc/default/u-boot,
> then execute "u-boot-update".
> As following commit, v5.3 kernel of debain enabled CONFIG_SOC_SIFIVE.
>   https://salsa.debian.org/kernel-team/linux/commit/263ffea1717c37378581c991a43278de085a9033
> By CONFIG_SOC_SIFIVE, DTB for sifive is built and installed to
> /usr/lib/linux-image-5.3.0-3-riscv64/sifive/hifive-unleashed-a00.dtb.
> u-boot-update command of u-boot-menu package will add "fdtdir" in extlinux.conf
> automatically.
>   ref: https://github.com/suihkulokki/u-boot-menu/blob/master/u-boot-update#L162-L167
> u-boot try to load DTB file from
> /usr/lib/linux-image-5.3.0-3-riscv64/<DTB FILE NAME>.
> However <DTB FILE NAME> should not be "sifive/hifive-unleashed-a00.dtb"
> for QEMU instance.

Nice catch, this workaround worked for me with both 5.3.x from unstable
and 5.4.x from experimental by essentially not configuring it to use any
.dtb file and just using the device-tree loaded by qemu/opensbi at
$fdtcontroladdr ... which the u-boot packages in Debian were patched to


There's some discussion on it about weather it's correct to use
$fdtcontroladdr vs. $fdt_addr_r and other various issues, so the patch
has not landed in upstream u-boot yet.

> Another perspective, Linux 5.3 introduced new image header for RISC-V.
>   RISC-V: Add an Image header that boot loader can parse.
>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f327f2aaad6a87356cbccfa390d4d3b64d0d3b6

This was backported to Debian's linux 5.2.6-1.

> For this, following patch will be needed which is committed after v2019.10.
>   https://gitlab.denx.de/u-boot/u-boot/commit/70d64a4c7646aa51c0334618ccb9af0132d9d834

I'll be testing u-boot 2020.01-rc5 soon and seeing what changes may be

live well,

Attachment: signature.asc
Description: PGP signature

Reply to: