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@20000000 {
        };
        chosen {
        };
        uart@10000000 {
        };
        test@100000 {
        };
        virtio_mmio@10008000 {
        };
        virtio_mmio@10007000 {
        };
        virtio_mmio@10006000 {
        };
        virtio_mmio@10005000 {
        };
        virtio_mmio@10004000 {
        };
        virtio_mmio@10003000 {
        };
        virtio_mmio@10002000 {
        };
        virtio_mmio@10001000 {
        };
        cpus {
        };
        memory@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

Reply via email to