scripts: build-qemu: Add --bootcmd option to pass bootcmd via fw_cfg
Add a --bootcmd option to the build-qemu script that allows passing a boot command to QEMU via fw_cfg. The bootcmd is written to the "opt/u-boot/bootcmd" fw_cfg entry, which can be read by U-Boot's EVT_BOOTCMD handler. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -64,6 +64,14 @@ Once configured, you can build and run QEMU for arm64 like this::
|
||||
|
||||
scripts/build-qemu -rsw
|
||||
|
||||
To pass a custom boot command to U-Boot via fw_cfg, use the `--bootcmd`
|
||||
option::
|
||||
|
||||
scripts/build-qemu -rsw --bootcmd "echo Hello from QEMU; bootflow scan -lb"
|
||||
|
||||
This will cause U-Boot to execute the specified command instead of the default
|
||||
autoboot behavior.
|
||||
|
||||
Options
|
||||
~~~~~~~
|
||||
|
||||
@@ -107,3 +115,10 @@ Options are available to control the script:
|
||||
|
||||
-w
|
||||
Use word version (32-bit). By default, 64-bit is used
|
||||
|
||||
--bootcmd BOOTCMD
|
||||
U-Boot bootcmd to pass via fw_cfg. This allows passing a custom boot
|
||||
command to U-Boot at runtime through QEMU's firmware configuration
|
||||
interface. The bootcmd is written to the 'opt/u-boot/bootcmd' fw_cfg
|
||||
entry and is read by U-Boot's EVT_BOOTCMD handler before the default
|
||||
autoboot process runs.
|
||||
|
||||
Reference in New Issue
Block a user