Skip to content

qemu: allow auto-booting through firmware device

Andre Przywara u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3qfw: store loaded file size in environment variablecmd/qfw.c+2 -01 reply
2/3qfw: return failure when no kernel could be loadedcmd/qfw.c+2 -21 reply
3/3qemu: Try to automatically boot from the QEMU firmware device (qfw)include/configs/qemu-arm.h+12 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] qemu: allow auto-booting through firmware device

Hi,

when running QEMU and specifying both a firmware binary (--bios) and a kernel (-kernel) on the command line, QEMU will run the firmware, but will also record information about the provided kernel in the QEMU firmware device. U-Boot's "qfw" command can load the kernel to a provided address then. However using a kernel (and initrd) provided this way requires typing some rather generic commands.

This series automates this, so that the default boot sequence tries to launch a kernel this way first. If that fails, we gracefully continue with the existing boot locations.

This simplifies automated booting, with external firmware:

$ qemu-system-aarch64 -machine virt,virtualization=on,gic-version=2
  -cpu cortex-a57 -nographic -display none -d unimp --bios u-boot.bin
  -kernel Image -initrd initrd.gz -append "earlycon"

The first two patches clean up some qfw issues, so that the automatic booting becomes smoother, while the third patch adds the new commands to QEMU's distro_boot script.

Please have a look!

Cheers,
Andre

Andre Przywara (3):
qfw: store loaded file size in environment variable
qfw: return failure when no kernel could be loaded
qemu: Try to automatically boot from the QEMU firmware device (qfw)

 cmd/qfw.c                  |  6 ++++--
 include/configs/qemu-arm.h | 12 ++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.1