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