Merge tag 'u-boot-atmel-fixes-2021.01-b' of https://gitlab.denx.de/u-boot/custodians...
[platform/kernel/u-boot.git] / doc / board / toradex / apalix-imx8x.rst
1 .. SPDX-License-Identifier: GPL-2.0+
2
3 Apalis iMX8X V1.1A Module
4 ==========================
5
6 Quick Start
7 -----------
8
9 - Build the ARM trusted firmware binary
10 - Get scfw_tcm.bin and ahab-container.img
11 - Build U-Boot
12 - Load U-Boot binary using uuu
13 - Flash U-Boot binary into the eMMC
14 - Boot
15
16 Get and Build the ARM Trusted Firmware
17 --------------------------------------
18
19 .. code-block:: bash
20
21     $ git clone -b toradex_imx_5.4.24_2.1.0 http://git.toradex.com/cgit/imx-atf.git
22     $ cd imx-atf/
23     $ make PLAT=imx8qx bl31
24
25 Get scfw_tcm.bin and ahab-container.img
26 ---------------------------------------
27
28 .. code-block:: bash
29
30     $ wget https://github.com/toradex/i.MX-System-Controller-Firmware/blob/master/src/scfw_export_mx8qx_b0/build_mx8qx_b0/mx8qx-apalis-scfw-tcm.bin
31     $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-3.6.3.bin
32     $ chmod +x imx-seco-3.6.3.bin
33     $ ./imx-seco-3.6.3.bin
34
35 Copy the following binaries to the U-Boot folder:
36
37 .. code-block:: bash
38
39     $ cp imx-atf/build/imx8qx/release/bl31.bin .
40     $ cp imx-seco-3.6.3/firmware/seco/mx8qxb0-ahab-container.img mx8qx-ahab-container.imx8_defconfig
41
42 Build U-Boot
43 ------------
44 .. code-block:: bash
45
46     $ make apalis-imx8x_defconfig
47     $ make u-boot-dtb.imx
48
49 Load the U-Boot Binary Using UUU
50 --------------------------------
51
52 Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``:
53
54 https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases
55
56 Put the module into USB recovery aka serial downloader mode, connect USB device
57 to your host and execute uuu:
58
59 .. code-block:: bash
60
61     sudo ./uuu u-boot/u-boot-dtb.imx
62
63 Flash the U-Boot Binary into the eMMC
64 -------------------------------------
65
66 Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area
67 partition and boot:
68
69 .. code-block:: bash
70
71     load mmc 1:1 $loadaddr u-boot-dtb.imx
72     setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200
73     mmc dev 0 1
74     mmc write ${loadaddr} 0x0 ${blkcnt}