RISCV64 - u-boot FDT control address unset on qemu-riscv64_defconfig ?
Alexander von Gluck IV
kallisti5 at unixzen.com
Thu Aug 27 16:40:20 CEST 2020
Good morning!
I was looking at booting Haiku's riscv64 EFI bootloader under qemu, and noticed several FDT errors:
Device 0: QEMU VirtIO Block Device
Type: Hard Disk
Capacity: 428.0 MB = 0.4 GB (876544 x 512)
... is now current device
Scanning virtio 0:1...
** Unable to read file / **
Failed to load '/'
Found EFI removable media binary efi/boot/bootriscv64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk virtio-blk#0...
Found 2 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
595112 bytes read in 4 ms (141.9 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
A quick look showed this default state:
=> fdt list
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
Tossing in the default fdtcontroladdr seemed to resolve the issue:
=> fdt addr ${fdtcontroladdr}
=> fdt list
/ {
#address-cells = <0x00000002>;
#size-cells = <0x00000002>;
compatible = "riscv-virtio";
model = "riscv-virtio,qemu";
flash at 20000000 {
};
chosen {
};
uart at 10000000 {
};
test at 100000 {
};
virtio_mmio at 10008000 {
};
virtio_mmio at 10007000 {
};
virtio_mmio at 10006000 {
};
virtio_mmio at 10005000 {
};
virtio_mmio at 10004000 {
};
virtio_mmio at 10003000 {
};
virtio_mmio at 10002000 {
};
virtio_mmio at 10001000 {
};
cpus {
};
memory at 80000000 {
};
soc {
};
};
Shouldn't ${fdtcontroladdr} be the default fdt address on bootup?
Here's my qemu command:
qemu-system-riscv64 -bios ~/Code/firmware/u-boot/riscv64/qemu/u-boot.bin -M virt -device virtio-blk-device,drive=hd -drive file=~/Code/haiku/generated.riscv64/haiku-mmc.image,format=raw,id=hd -m 1024
More information about the U-Boot
mailing list