]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: qemu: Enable Bochs video support
authorBin Meng <bmeng@tinylab.org>
Sun, 23 Jul 2023 04:40:33 +0000 (12:40 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Wed, 2 Aug 2023 08:31:52 +0000 (16:31 +0800)
Enable video console using the emulated Bochs VGA card.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
board/emulation/qemu-riscv/Kconfig
doc/board/emulation/qemu-riscv.rst
include/configs/qemu-riscv.h

index 6114e1b812053df94a8353e2c7b99a687ce6a3c6..976c350e50be62d226c68f99d0b2b7b8fdbd691c 100644 (file)
@@ -68,5 +68,8 @@ config BOARD_SPECIFIC_OPTIONS # dummy
        imply MTD_NOR_FLASH
        imply CFI_FLASH
        imply OF_HAS_PRIOR_STAGE
+       imply VIDEO
+       imply VIDEO_BOCHS
+       imply SYS_WHITE_ON_BLACK
 
 endif
index 509bf7c4a6c436aea92c7bc2f7286333f1ce044d..9d21f3270c61a40778f1b332e87edc1455597c4e 100644 (file)
@@ -133,6 +133,11 @@ An attached disk can be emulated in RISC-V virt machine by adding::
 
 You will have to run 'scsi scan' to use it.
 
+A video console can be emulated in RISC-V virt machine by removing "-nographic"
+and adding::
+
+    -serial stdio -device VGA
+
 Running with KVM
 ----------------
 
index f6d326bda0d85a021eeae77b2ef0d3c856d047a0..7ec3d12ce10694af12c4db71d3e3ec8adbdd6d8b 100644 (file)
 
 /* Environment options */
 
+#define CFG_STD_DEVICES_SETTINGS       "stdin=serial\0" \
+                                       "stdout=serial,vidconsole\0" \
+                                       "stderr=serial,vidconsole\0"
+
 #define BOOT_TARGET_DEVICES(func) \
        func(QEMU, qemu, na) \
        func(VIRTIO, virtio, 0) \
@@ -35,6 +39,7 @@
        "qemu "
 
 #define CFG_EXTRA_ENV_SETTINGS \
+       CFG_STD_DEVICES_SETTINGS \
        "fdt_high=0xffffffffffffffff\0" \
        "initrd_high=0xffffffffffffffff\0" \
        "kernel_addr_r=0x84000000\0" \