qfw.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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_SYS_LOAD_ADDR*.
  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 *CFG_RAMDISK_ADDR*.
  24. Examples
  25. --------
  26. QEMU firmware files are listed via the *qfw list* command:
  27. ::
  28. => qfw list
  29. 00000000 bios-geometry
  30. 00000000 bootorder
  31. 000f0060 etc/acpi/rsdp
  32. bed14040 etc/acpi/tables
  33. 00000000 etc/boot-fail-wait
  34. 00000000 etc/e820
  35. 00000000 etc/smbios/smbios-anchor
  36. 00000000 etc/smbios/smbios-tables
  37. 00000000 etc/system-states
  38. 00000000 etc/table-loader
  39. 00000000 etc/tpm/log
  40. 00000000 genroms/kvmvapic.bin
  41. Where an address is shown, it indicates where the data is available for
  42. inspection, e.g. using the :doc:`md`.
  43. The available CPUs can be shown via the *qfw cpus* command:
  44. ::
  45. => qfw cpu
  46. 2 cpu(s) online
  47. The *-kernel* and *-initrd* parameters allow to specify a kernel and an
  48. initial RAM disk for QEMU:
  49. .. code-block:: bash
  50. $ qemu-system-x86_64 -machine pc-i440fx-2.5 -bios u-boot.rom -m 1G \
  51. -nographic -kernel vmlinuz -initrd initrd
  52. Now the kernel and the initial RAM disk can be loaded to the U-Boot memory via
  53. the *qfw load* command and booted thereafter.
  54. ::
  55. => qfw load ${kernel_addr_r} ${ramdisk_addr_r}
  56. loading kernel to address 0000000001000000 size 5048f0 initrd 0000000004000000 size 3c94891
  57. => zboot 1000000 5048f0 4000000 3c94891
  58. Valid Boot Flag
  59. Magic signature found
  60. Linux kernel version 4.19.0-14-amd64 (debian-kernel@lists.debian.org) #1 SMP Debian 4.19.171-2 (2021-01-30)
  61. Building boot_params at 0x00090000
  62. Loading bzImage at address 100000 (5260160 bytes)
  63. Configuration
  64. -------------
  65. The qfw command is only available if CONFIG_CMD_QFW=y.