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