blob: fff23c1a9b0e428d50949099608d34d411dcbf35 [file] [log] [blame]
Jiaxun Yang8363c872024-06-18 14:56:10 +01001.. SPDX-License-Identifier: GPL-2.0+
2.. Copyright (C) 2024 Jiaxun Yang <jiaxun.yang@flygoat.com>
3
4QEMU Xtensa
5===========
6
7QEMU for Xtensa supports a special 'virt' machine designed for emulation and
8virtualization purposes. This document describes how to run U-Boot under it.
9
10The QEMU virt machine models a generic Xtensa virtual machine with PCI Bus
11and Xtensa ISS simcall semihosting support. It supports many different Xtensa
12CPU configuration. Currently, only dc233c variant is tested against U-Boot.
13
14Building U-Boot
15---------------
16Set the CROSS_COMPILE environment variable as usual, and run:
17
18 make qemu-xtensa-dc233c_defconfig
19 make
20
21Note that Xtensa's toolchain is bounded to CPU configuration, you must use
22the toolchain built for exactly the same CPU configuration as you selected
23in U-Boot.
24
25Running U-Boot
26--------------
27The minimal QEMU command line to get U-Boot up and running is:
28
29 qemu-system-xtensa -nographic -machine virt -cpu dc233c -semihosting -kernel ./u-boot.elf
30
31You many change cpu option to match your U-Boot CPU type configuration.
32semihosting option is mandatory because this is the only way to interact
33with U-Boot in command line.