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