The QEMU RISC-V virt machine has an fw_cfg device, and when U-Boot runs from pflash, QEMU passes the files given with -kernel, -initrd and -append through it rather than loading the kernel itself. QFW is only enabled with ACPI today, though, so these files cannot be loaded.
Enable CMD_QFW by default on TARGET_QEMU_VIRT, as on the Arm and x86 QEMU targets. The existing "select QFW_MMIO if QFW" in the board Kconfig then picks the MMIO transport. QFW brings in QFW_SMBIOS, which selects BLOBLIST, and SPL_BLOBLIST defaults to y with a fixed address that the RISC-V SPL configs do not set. As SPL does not need a bloblist here, disable SPL_BLOBLIST in the two SPL defconfigs. Signed-off-by: Hung-Chun Tseng <[email protected]> --- cmd/Kconfig | 2 +- configs/qemu-riscv32_spl_defconfig | 1 + configs/qemu-riscv64_spl_defconfig | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index e36406b64..f8a471c3a 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2599,7 +2599,7 @@ config CMD_QFW bool "qfw" select QFW default y if TARGET_QEMU_ARM_32BIT || TARGET_QEMU_ARM_64BIT || \ - TARGET_QEMU_X86 || TARGET_QEMU_X86_64 + TARGET_QEMU_VIRT || TARGET_QEMU_X86 || TARGET_QEMU_X86_64 help This provides access to the QEMU firmware interface. The main feature is to allow easy loading of files passed to qemu-system diff --git a/configs/qemu-riscv32_spl_defconfig b/configs/qemu-riscv32_spl_defconfig index d1c43575c..790bcb72b 100644 --- a/configs/qemu-riscv32_spl_defconfig +++ b/configs/qemu-riscv32_spl_defconfig @@ -17,6 +17,7 @@ CONFIG_DISTRO_DEFAULTS=y CONFIG_DISPLAY_CPUINFO=y CONFIG_DISPLAY_BOARDINFO=y # CONFIG_BOARD_INIT is not set +# CONFIG_SPL_BLOBLIST is not set CONFIG_SPL_MAX_SIZE=0x100000 CONFIG_SPL_SYS_MALLOC=y # CONFIG_CMD_MII is not set diff --git a/configs/qemu-riscv64_spl_defconfig b/configs/qemu-riscv64_spl_defconfig index 04dec72ce..5c1ced65b 100644 --- a/configs/qemu-riscv64_spl_defconfig +++ b/configs/qemu-riscv64_spl_defconfig @@ -16,6 +16,7 @@ CONFIG_DISTRO_DEFAULTS=y CONFIG_DISPLAY_CPUINFO=y CONFIG_DISPLAY_BOARDINFO=y # CONFIG_BOARD_INIT is not set +# CONFIG_SPL_BLOBLIST is not set CONFIG_SPL_MAX_SIZE=0x100000 CONFIG_SPL_SYS_MALLOC=y # CONFIG_CMD_MII is not set -- 2.43.0
