File: qemu-xtensa.rst

package info (click to toggle)
u-boot 2025.01-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 330,740 kB
  • sloc: ansic: 2,627,855; python: 60,773; sh: 41,641; asm: 21,854; makefile: 15,048; perl: 12,447; cs: 6,763; cpp: 1,868; yacc: 1,100; lex: 747; awk: 57; tcl: 32; sed: 24
file content (33 lines) | stat: -rw-r--r-- 1,176 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.. SPDX-License-Identifier: GPL-2.0+
.. Copyright (C) 2024 Jiaxun Yang <jiaxun.yang@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 dc233c variant is tested against U-Boot.

Building U-Boot
---------------
Set the CROSS_COMPILE environment variable as usual, and run:

    make qemu-xtensa-dc233c_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 dc233c -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.