Explain that QEMU passes -kernel, -initrd and -append through fw_cfg when U-Boot runs from flash, and that the qfw boot method boots them.
Signed-off-by: Hung-Chun Tseng <[email protected]> --- doc/board/emulation/qemu-riscv.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/board/emulation/qemu-riscv.rst b/doc/board/emulation/qemu-riscv.rst index 229a7700a..a76a1a8bf 100644 --- a/doc/board/emulation/qemu-riscv.rst +++ b/doc/board/emulation/qemu-riscv.rst @@ -205,6 +205,18 @@ Invoke QEMU with: qemu-system-riscv64 -M virt -nographic \ -drive if=pflash,format=raw,unit=0,file=u-boot.bin,readonly=off +When U-Boot runs from flash, QEMU passes the files given with ``-kernel``, +``-initrd`` and ``-append`` to it through the fw_cfg interface instead of +loading the kernel itself. The QEMU firmware boot method (see +:doc:`../../develop/bootstd/qfw`) picks them up, and since ``qfw`` comes +first in ``boot_targets``, the kernel is booted without further input: + +.. code-block:: bash + + qemu-system-riscv64 -M virt -nographic -m 1G \ + -drive if=pflash,format=raw,unit=0,file=u-boot.bin,readonly=on \ + -kernel Image -initrd initrd.gz -append "console=ttyS0" + Debug UART ---------- -- 2.43.0
