xref: /openbmc/qemu/docs/system/arm/imx8mp-evk.rst (revision 1ac21eb8fbb0297716a6c525e91196a247302b2b)
1NXP i.MX 8M Plus Evaluation Kit (``imx8mp-evk``)
2================================================
3
4The ``imx8mp-evk`` machine models the i.MX 8M Plus Evaluation Kit, based on an
5i.MX 8M Plus SoC.
6
7Supported devices
8-----------------
9
10The ``imx8mp-evk`` machine implements the following devices:
11
12 * Up to 4 Cortex-A53 cores
13 * Generic Interrupt Controller (GICv3)
14 * 4 UARTs
15 * 3 USDHC Storage Controllers
16 * 1 Designware PCI Express Controller
17 * 5 GPIO Controllers
18 * 6 I2C Controllers
19 * 3 SPI Controllers
20 * 3 Watchdogs
21 * Secure Non-Volatile Storage (SNVS) including an RTC
22 * Clock Tree
23
24Boot options
25------------
26
27The ``imx8mp-evk`` machine can start a Linux kernel directly using the standard
28``-kernel`` functionality.
29
30Direct Linux Kernel Boot
31''''''''''''''''''''''''
32
33Probably the easiest way to get started with a whole Linux system on the machine
34is to generate an image with Buildroot. Version 2024.11.1 is tested at the time
35of writing and involves three steps. First run the following commands in the
36toplevel directory of the Buildroot source tree:
37
38.. code-block:: bash
39
40  $ make freescale_imx8mpevk_defconfig
41  $ make
42
43Once finished successfully there is an ``output/image`` subfolder. Navigate into
44it and resize the SD card image to a power of two:
45
46.. code-block:: bash
47
48  $ qemu-img resize sdcard.img 256M
49
50Finally, the device tree needs to be patched with the following commands which
51will remove the ``cpu-idle-states`` properties from CPU nodes:
52
53.. code-block:: bash
54
55  $ dtc imx8mp-evk.dtb | sed '/cpu-idle-states/d' > imx8mp-evk-patched.dts
56  $ dtc imx8mp-evk-patched.dts -o imx8mp-evk-patched.dtb
57
58Now that everything is prepared the machine can be started as follows:
59
60.. code-block:: bash
61
62  $ qemu-system-aarch64 -M imx8mp-evk -smp 4 -m 3G \
63      -display none -serial null -serial stdio \
64      -kernel Image \
65      -dtb imx8mp-evk-patched.dtb \
66      -append "root=/dev/mmcblk2p2" \
67      -drive file=sdcard.img,if=sd,bus=2,format=raw,id=mmcblk2
68