blob: 9e61d98c6b1fcf8c84625e2664841101abced556 [file] [log] [blame]
Marcel Ziswiler4d1fea92023-08-29 00:01:53 +02001.. SPDX-License-Identifier: GPL-2.0-or-later
2.. sectionauthor:: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Igor Opaniukad6a3f32020-02-12 17:14:31 +02003
Marcel Ziswiler4d1fea92023-08-29 00:01:53 +02004Colibri iMX8X Module
5====================
6
7- SoM: https://www.toradex.com/computer-on-modules/colibri-arm-family/nxp-imx-8x
8- Carrier board: https://www.toradex.com/products/carrier-board/colibri-evaluation-board
Igor Opaniukad6a3f32020-02-12 17:14:31 +02009
10Quick Start
11-----------
12
13- Build the ARM trusted firmware binary
14- Get scfw_tcm.bin and ahab-container.img
15- Build U-Boot
16- Load U-Boot binary using uuu
17- Flash U-Boot binary into the eMMC
18- Boot
19
20Get and Build the ARM Trusted Firmware
21--------------------------------------
22
23.. code-block:: bash
24
Oleksandr Suvorov61502952021-07-23 09:39:47 +030025 $ git clone -b toradex_imx_5.4.70_2.3.0 http://git.toradex.com/cgit/imx-atf.git/
26 $ make PLAT=imx8qx bl31 -C imx-atf
Igor Opaniukad6a3f32020-02-12 17:14:31 +020027
28Get scfw_tcm.bin and ahab-container.img
29---------------------------------------
Marcel Ziswiler4d1fea92023-08-29 00:01:53 +020030
Igor Opaniukad6a3f32020-02-12 17:14:31 +020031.. code-block:: bash
32
Oleksandr Suvorov61502952021-07-23 09:39:47 +030033 $ wget https://github.com/toradex/i.MX-System-Controller-Firmware/raw/master/src/scfw_export_mx8qx_b0/build_mx8qx_b0/mx8qx-colibri-scfw-tcm.bin
Marcel Ziswiler4d1fea92023-08-29 00:01:53 +020034 $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-3.8.1.bin
35 $ sh imx-seco-3.8.1.bin --auto-accept
Igor Opaniukad6a3f32020-02-12 17:14:31 +020036
37Copy the following firmware to the U-Boot folder:
38
39.. code-block:: bash
40
Oleksandr Suvorov61502952021-07-23 09:39:47 +030041 $ cp imx-atf/build/imx8qx/release/bl31.bin .
Marcel Ziswiler4d1fea92023-08-29 00:01:53 +020042 $ cp imx-seco-3.8.1/firmware/seco/mx8qxc0-ahab-container.img mx8qx-ahab-container.img
Igor Opaniukad6a3f32020-02-12 17:14:31 +020043
44Build U-Boot
45------------
46
47.. code-block:: bash
48
Philippe Schenker08b6a602020-08-28 21:08:05 +030049 $ make colibri-imx8x_defconfig
Igor Opaniukad6a3f32020-02-12 17:14:31 +020050 $ make u-boot-dtb.imx
51
52Load the U-Boot Binary Using UUU
53--------------------------------
54
55Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``:
56
57https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases
58
Marcel Ziswiler4d1fea92023-08-29 00:01:53 +020059Put the module into USB recovery aka serial downloader mode, connect the USB
60device to your host and execute ``uuu``:
Igor Opaniukad6a3f32020-02-12 17:14:31 +020061
62.. code-block:: bash
63
64 sudo ./uuu u-boot/u-boot-dtb.imx
65
66Flash the U-Boot Binary into the eMMC
67-------------------------------------
68
Marcel Ziswiler4d1fea92023-08-29 00:01:53 +020069Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area
70partition and boot:
Igor Opaniukad6a3f32020-02-12 17:14:31 +020071
72.. code-block:: bash
73
74 load mmc 1:1 $loadaddr u-boot-dtb.imx
75 setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200
76 mmc dev 0 1
77 mmc write ${loadaddr} 0x0 ${blkcnt}
Marcel Ziswiler4d1fea92023-08-29 00:01:53 +020078
79As a convenience, instead of the last three commands, one may also use the
80update U-Boot wrapper:
81
82.. code-block:: bash
83
84 > run update_uboot