blob: 069d86ccd8ca77c55ed3752a6c6a3eb43ed527cb [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 Opaniuk7ecebb82020-02-12 17:14:30 +02003
Marcel Ziswiler813070a2023-08-29 00:01:53 +02004Apalis iMX8 Module
5==================
6
7- SoM: https://www.toradex.com/computer-on-modules/apalis-arm-family/nxp-imx-8
8- Carrier board: https://www.toradex.com/products/carrier-board/apalis-evaluation-board
Igor Opaniuk7ecebb82020-02-12 17:14:30 +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 Francoea6fc122024-03-15 18:56:57 -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 Opaniuk7ecebb82020-02-12 17:14:30 +020031.. code-block:: bash
32
Igor Opaniuk7ecebb82020-02-12 17:14:30 +020033 $ cd imx-atf/
34 $ make PLAT=imx8qm bl31
35
36Get scfw_tcm.bin and ahab-container.img
37---------------------------------------
38
Hiago De Francoea6fc122024-03-15 18:56:57 -030039Download imx-seco firmware and extract it:
Igor Opaniuk7ecebb82020-02-12 17:14:30 +020040
41.. code-block:: bash
42
Hiago De Francoea6fc122024-03-15 18:56:57 -030043 $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-5.8.7.bin
44 $ sh imx-seco-5.8.7.bin --auto-accept
Igor Opaniuk7ecebb82020-02-12 17:14:30 +020045
Hiago De Francoea6fc122024-03-15 18:56:57 -030046Copy the following binaries to the U-Boot folder:
Igor Opaniuk7ecebb82020-02-12 17:14:30 +020047
48.. code-block:: bash
49
Hiago De Francoea6fc122024-03-15 18:56:57 -030050 $ wget https://github.com/toradex/i.MX-System-Controller-Firmware/raw/master/src/scfw_export_mx8qm_b0/build_mx8qm_b0/mx8qm-apalis-scfw-tcm.bin
51 $ cp ../imx-atf/build/imx8qm/release/bl31.bin .
52 $ cp ../imx-seco-5.8.7/firmware/seco/mx8qmb0-ahab-container.img mx8qm-ahab-container.img
Igor Opaniuk7ecebb82020-02-12 17:14:30 +020053
54Build U-Boot
55------------
Marcel Ziswiler813070a2023-08-29 00:01:53 +020056
Igor Opaniuk7ecebb82020-02-12 17:14:30 +020057.. code-block:: bash
58
Philippe Schenkerc3144042020-08-28 21:08:06 +030059 $ make apalis-imx8_defconfig
Igor Opaniuk7ecebb82020-02-12 17:14:30 +020060 $ make u-boot-dtb.imx
61
62Load the U-Boot Binary Using UUU
63--------------------------------
64
65Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``:
66
Hiago De Francoea6fc122024-03-15 18:56:57 -030067https://github.com/nxp-imx/mfgtools/releases
Igor Opaniuk7ecebb82020-02-12 17:14:30 +020068
Marcel Ziswiler813070a2023-08-29 00:01:53 +020069Put the module into USB recovery aka serial downloader mode, connect the USB
70device to your host and execute ``uuu``:
Igor Opaniuk7ecebb82020-02-12 17:14:30 +020071
72.. code-block:: bash
73
74 sudo ./uuu u-boot/u-boot-dtb.imx
75
76Flash the U-Boot Binary into the eMMC
77-------------------------------------
78
79Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area
80partition and boot:
81
82.. code-block:: bash
83
84 load mmc 1:1 $loadaddr u-boot-dtb.imx
85 setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200
86 mmc dev 0 1
87 mmc write ${loadaddr} 0x0 ${blkcnt}
Marcel Ziswiler813070a2023-08-29 00:01:53 +020088
89As a convenience, instead of the last three commands, one may also use the
90update U-Boot wrapper:
91
92.. code-block:: bash
93
94 > run update_uboot