running u-boot in qemu-system-arm64
Simon Glass
sjg at chromium.org
Mon Dec 16 16:17:05 CET 2024
+Peter Robinson
+Matthias Brugger
Hi Jack,
On Sun, 15 Dec 2024 at 21:36, Jack Andrews <effbiae at gmail.com> wrote:
>
> thanks for u-boot.
>
> does u-boot run in qemu when emulating a raspberry pi 3 (or 4)?
>
> i'm running
> $ qemu-system-arm64 -M raspi3b -kernel u-boot
>
> and i just get a blank screen
>
> i built u-boot with
> export ARCH=arm64
> export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-
> export CC=gcc
> make rpi_3_defconfig
> make
>
> i also tried variations on qemu like:
> $ qemu-system-arm64 -smp 4,cores=1 -serial null -serial stdio -M raspi3b
> -kernel u-boot
> $ qemu-system-arm64 -smp 4,cores=1 -serial null -serial stdio -M raspi3ap
> -kernel u-boot
Here you are telling QEMU that the kernel is U-Boot, but U-Boot is
firmware, not LInux. Also, 'u-boot' is an ELF file. At least in the
instructions today[2] we use the flat binary produced from that ELF:
qemu-system-arm64 -M raspi3b -kernel u-boot.bin
But that doesn't work either. So I'm not sure how to make it work. If
you do figure it out, a documentation patch for U-Boot
Regards,
Simon
>
> best,
> jack
[1] https://www.qemu.org/docs/master/system/arm/raspi.html
[2] https://docs.u-boot.org/en/latest/board/emulation/qemu-arm.html#running-u-boot
More information about the U-Boot
mailing list