blob: 378b259abd05a185e029600e69db981e79a285cd [file] [log] [blame]
Marcel Ziswiler813070a2023-08-29 00:01:53 +02001.. SPDX-License-Identifier: GPL-2.0-or-later
2.. sectionauthor:: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Igor Opaniuk505fb752020-02-12 17:14:31 +02003
Marcel Ziswiler813070a2023-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 Opaniuk505fb752020-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
Hiago De Franco57292ca2024-03-15 18:56:56 -030023Download the imx-atf repository:
24
25.. code-block:: bash
26
27 $ git clone -b lf_v2.6 https://github.com/nxp-imx/imx-atf.git
28
29Compile it with an aarch64 toolchain:
30
Igor Opaniuk505fb752020-02-12 17:14:31 +020031.. code-block:: bash
32
Oleksandr Suvorov4f00f3c2021-07-23 09:39:47 +030033 $ make PLAT=imx8qx bl31 -C imx-atf
Igor Opaniuk505fb752020-02-12 17:14:31 +020034
35Get scfw_tcm.bin and ahab-container.img
36---------------------------------------
Marcel Ziswiler813070a2023-08-29 00:01:53 +020037
Hiago De Franco57292ca2024-03-15 18:56:56 -030038Download imx-seco firmware and extract it:
39
Igor Opaniuk505fb752020-02-12 17:14:31 +020040.. code-block:: bash
41
Hiago De Franco57292ca2024-03-15 18:56:56 -030042 $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-5.8.7.bin
43 $ sh imx-seco-5.8.7.bin --auto-accept
Igor Opaniuk505fb752020-02-12 17:14:31 +020044
45Copy the following firmware to the U-Boot folder:
46
47.. code-block:: bash
48
Hiago De Franco57292ca2024-03-15 18:56:56 -030049 $ 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
50 $ cp ../imx-atf/build/imx8qx/release/bl31.bin .
51 $ cp ../imx-seco-5.8.7/firmware/seco/mx8qxc0-ahab-container.img mx8qx-ahab-container.img
Igor Opaniuk505fb752020-02-12 17:14:31 +020052
53Build U-Boot
54------------
55
56.. code-block:: bash
57
Philippe Schenker336720f2020-08-28 21:08:05 +030058 $ make colibri-imx8x_defconfig
Igor Opaniuk505fb752020-02-12 17:14:31 +020059 $ make u-boot-dtb.imx
60
61Load the U-Boot Binary Using UUU
62--------------------------------
63
64Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``:
65
Hiago De Franco57292ca2024-03-15 18:56:56 -030066https://github.com/nxp-imx/mfgtools/releases
Igor Opaniuk505fb752020-02-12 17:14:31 +020067
Marcel Ziswiler813070a2023-08-29 00:01:53 +020068Put the module into USB recovery aka serial downloader mode, connect the USB
69device to your host and execute ``uuu``:
Igor Opaniuk505fb752020-02-12 17:14:31 +020070
71.. code-block:: bash
72
73 sudo ./uuu u-boot/u-boot-dtb.imx
74
75Flash the U-Boot Binary into the eMMC
76-------------------------------------
77
Marcel Ziswiler813070a2023-08-29 00:01:53 +020078Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area
79partition and boot:
Igor Opaniuk505fb752020-02-12 17:14:31 +020080
81.. code-block:: bash
82
83 load mmc 1:1 $loadaddr u-boot-dtb.imx
84 setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200
85 mmc dev 0 1
86 mmc write ${loadaddr} 0x0 ${blkcnt}
Marcel Ziswiler813070a2023-08-29 00:01:53 +020087
88As a convenience, instead of the last three commands, one may also use the
89update U-Boot wrapper:
90
91.. code-block:: bash
92
93 > run update_uboot