qfw.rst 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. qfw command
  3. ===========
  4. Synopsis
  5. --------
  6. ::
  7. qfw list
  8. qfw cpus
  9. qfw load [kernel_addr [initrd_addr]]
  10. Description
  11. -----------
  12. The *qfw* command is used to retrieve information form the QEMU firmware.
  13. The *qfw list* sub-command displays the QEMU firmware files.
  14. The *qfw cpus* sub-command displays the available CPUs.
  15. The *qfw load* command is used to load a kernel and an initial RAM disk.
  16. kernel_addr
  17. address to which the file specified by the -kernel parameter of QEMU shall
  18. be loaded. Defaults to environment variable *loadaddr* and further to
  19. the value of *CONFIG_LOADADDR*.
  20. initrd_addr
  21. address to which the file specified by the -initrd parameter of QEMU shall
  22. be loaded. Defaults to environment variable *ramdiskaddr* and further to
  23. the value of *CONFIG_RAMDISK_ADDR*.
  24. Examples
  25. --------
  26. QEMU firmware files are listed via the *qfw list* command:
  27. ::
  28. => qfw list
  29. etc/boot-fail-wait
  30. etc/smbios/smbios-tables
  31. etc/smbios/smbios-anchor
  32. etc/e820
  33. genroms/kvmvapic.bin
  34. genroms/linuxboot.bin
  35. etc/system-states
  36. etc/acpi/tables
  37. etc/table-loader
  38. etc/tpm/log
  39. etc/acpi/rsdp
  40. bootorder
  41. The available CPUs can be shown via the *qfw cpus* command:
  42. ::
  43. => qfw cpu
  44. 2 cpu(s) online
  45. The *-kernel* and *-initrd* parameters allow to specify a kernel and an
  46. initial RAM disk for QEMU:
  47. .. code-block:: bash
  48. $ qemu-system-x86_64 -machine pc-i440fx-2.5 -bios u-boot.rom -m 1G \
  49. -nographic -kernel vmlinuz -initrd initrd
  50. Now the kernel and the initial RAM disk can be loaded to the U-Boot memory via
  51. the *qfw load* command and booted thereafter.
  52. ::
  53. => qfw load ${kernel_addr_r} ${ramdisk_addr_r}
  54. loading kernel to address 0000000001000000 size 5048f0 initrd 0000000004000000 size 3c94891
  55. => zboot 1000000 5048f0 4000000 3c94891
  56. Valid Boot Flag
  57. Magic signature found
  58. Linux kernel version 4.19.0-14-amd64 (debian-kernel@lists.debian.org) #1 SMP Debian 4.19.171-2 (2021-01-30)
  59. Building boot_params at 0x00090000
  60. Loading bzImage at address 100000 (5260160 bytes)
  61. Configuration
  62. -------------
  63. The qfw command is only available if CONFIG_CMD_QFW=y.