diff options
| author | Heinrich Schuchardt <[email protected]> | 2025-07-29 09:47:26 +0200 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2025-08-08 08:45:05 +0200 |
| commit | 8e5d34a3a26ad8550dd47ef7550d3f4a2067fdb4 (patch) | |
| tree | 3b1b22c8631af154caa623dafed4a77ac263b8e1 /doc | |
| parent | e16646c0ade9a62ef118978e27adbb259eb8a360 (diff) | |
doc: qemu-riscv: describe running as flash image
Describe how to build U-Boot to be run by QEMU as an emulated flash image.
Signed-off-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/board/emulation/qemu-riscv.rst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/board/emulation/qemu-riscv.rst b/doc/board/emulation/qemu-riscv.rst index cf2f893b723..b5948d9affc 100644 --- a/doc/board/emulation/qemu-riscv.rst +++ b/doc/board/emulation/qemu-riscv.rst @@ -179,6 +179,32 @@ Provide the U-Boot S-mode ELF image as *-kernel* parameter and do not add a qemu-system-riscv64 -accel kvm -nographic -machine virt -kernel u-boot +Running as flash binary +----------------------- + +U-Boot can be provided to QEMU as an emulated flash drive. +This can for instance be used to test capsule updates. + +Build qemu-riscv64_smode_defconfig with:: + + CONFIG_XIP=y + CONFIG_TEXT_BASE=0x20000000 + CONFIG_CMD_MTD=y + CONFIG_FLASH_CFI_MTD=y + +Pad u-boot.bin to 32 MiB size: + +.. code-block:: bash + + truncate -s 32M u-boot.bin + +Invoke QEMU with: + +.. code-block:: bash + + qemu-system-riscv64 -M virt -nographic \ + -drive if=pflash,format=raw,unit=0,file=u-boot.bin,readonly=off + Debug UART ---------- |
