[PATCH 10/10] doc: New documentation for qemu-xtensa
Jiaxun Yang
jiaxun.yang at flygoat.com
Sun May 19 22:53:57 CEST 2024
Introduce the board and provide instructions on how to get
it work.
Signed-off-by: Jiaxun Yang <jiaxun.yang at flygoat.com>
---
doc/board/emulation/index.rst | 1 +
doc/board/emulation/qemu-xtensa.rst | 33 +++++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/doc/board/emulation/index.rst b/doc/board/emulation/index.rst
index d3d6b8f3d86b..98a0b26ad245 100644
--- a/doc/board/emulation/index.rst
+++ b/doc/board/emulation/index.rst
@@ -14,3 +14,4 @@ Emulation
qemu-ppce500
qemu-riscv
qemu-x86
+ qemu-xtensa
diff --git a/doc/board/emulation/qemu-xtensa.rst b/doc/board/emulation/qemu-xtensa.rst
new file mode 100644
index 000000000000..fdab6d7c439d
--- /dev/null
+++ b/doc/board/emulation/qemu-xtensa.rst
@@ -0,0 +1,33 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. Copyright (C) 2024 Jiaxun Yang <jiaxun.yang at flygoat.com>
+
+QEMU Xtensa
+===========
+
+QEMU for Xtensa supports a special 'virt' machine designed for emulation and
+virtualization purposes. This document describes how to run U-Boot under it.
+
+The QEMU virt machine models a generic Xtensa virtual machine with PCI Bus
+and Xtensa ISS simcall semihosting support. It supports many different Xtensa
+CPU configuration. Currently, only dc232b variant is tested against U-Boot.
+
+Building U-Boot
+---------------
+Set the CROSS_COMPILE environment variable as usual, and run:
+
+ make qemu-xtensa-dc232b_defconfig
+ make
+
+Note that Xtensa's toolchain is bounded to CPU configuration, you must use
+the toolchain built for exactly the same CPU configuration as you selected
+in U-Boot.
+
+Running U-Boot
+--------------
+The minimal QEMU command line to get U-Boot up and running is:
+
+ qemu-system-xtensa -nographic -machine virt -cpu dc232b -semihosting -kernel ./u-boot.elf
+
+You many change cpu option to match your U-Boot CPU type configuration.
+semihosting option is mandatory because this is the only way to interact
+with U-Boot in command line.
--
2.43.0
More information about the U-Boot
mailing list