Files
u-boot/doc/board/emulation/qemu-m68k.rst
Kuan-Wei Chiu 516afc8f76 board: Add QEMU m68k virt board support
Add support for the QEMU 'virt' machine on the m68k architecture. This
board emulates a generic machine based on the Motorola 68040 CPU
equipped with Goldfish virtual peripherals.

Introduce the necessary board configuration and initialization
infrastructure. The implementation includes logic to parse the QEMU
bootinfo interface, enabling dynamic detection of system RAM size to
adapt to the virtual machine's configuration.

Enable the Goldfish TTY driver for serial console output. Additionally,
enable Goldfish RTC and timer drivers to support real-time clock
functionality and nanosecond-resolution delays. Include comprehensive
documentation covering build instructions and usage examples.

Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Tested-by: Daniel Palmer <daniel@0x0f.com>
Reviewed-by: Simon Glass <simon.glass@canonical.com>
2026-02-02 14:24:41 -06:00

40 lines
1.1 KiB
ReStructuredText

.. SPDX-License-Identifier: GPL-2.0-or-later
.. Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>
QEMU m68k
=========
QEMU for m68k 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 m68k virtual machine with Goldfish
interfaces. It supports the Motorola 68040 CPU architecture.
Building U-Boot
---------------
Set the CROSS_COMPILE environment variable to your m68k toolchain, and run:
.. code-block:: bash
export CROSS_COMPILE=m68k-linux-gnu-
make qemu-m68k_defconfig
make
Running U-Boot
--------------
The minimal QEMU command line to get U-Boot up and running is:
.. code-block:: bash
qemu-system-m68k -M virt -cpu m68040 -nographic -kernel u-boot
Note that the `-nographic` option is used to redirect the console to stdio,
which connects to the emulated Goldfish TTY device.
Hardware Support
----------------
The following QEMU virt peripherals are supported in U-Boot:
* Goldfish TTY (Serial Console)
* Goldfish RTC (Real Time Clock)