Loading...

Booting a qemu/kvm guest with U-Boot (Concept tree)
====================================================

To boot a qemu guest with U-Boot, start qemu-system with the '-bios'
option. Use the full path to the file that corresponds with the
architecture you are trying to boot.

For x86 builds, use the .rom file:

  qemu-system-x86_64 -bios /usr/lib/u-boot-concept/qemu-x86_64/u-boot.rom ...

For other architectures, use the .bin file:

  qemu-system-aarch64 -bios /usr/lib/u-boot-concept/qemu_arm64/u-boot.bin ...

This package is built from the U-Boot Concept tree, which may include
features not yet available in the upstream U-Boot release.


Booting from disk
-----------------

To allow a qemu guest to boot from disk, you need a U-Boot config file on the
disk. There is no need to install U-Boot in the guest, as you are passing
U-Boot directly to qemu. The config file can be automatically created
by installing the u-boot-menu package. Alternatively, the flash-kernel package
can also create U-Boot config files, but it currently doesn't recognise qemu
guests.


Netboot
-------

U-Boot supports the e1000 network driver to boot from the network. Please note
that U-Boot will initially output "Net:   No ethernet found.", before
continuing with the netboot.


Device tree
-----------

On architectures where a device tree file is needed to boot, qemu will
generate the device tree based on the virtual hardware that is configured.
U-Boot should be able to find this data at the default address where it
looks for this data (${fdt_addr}), so you should use that address in your
U-Boot script.