Igor Opaniuk | 3730106 | 2020-10-22 11:21:39 +0300 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
Oleksandr Suvorov | f5c2c37 | 2021-03-11 22:00:37 +0200 | [diff] [blame] | 3 | Apalis iMX8X V1.1A Module (SoC NXP i.MX8QXP RevB) |
Heinrich Schuchardt | b0f569e | 2021-04-10 20:07:54 +0200 | [diff] [blame] | 4 | ================================================= |
Igor Opaniuk | 3730106 | 2020-10-22 11:21:39 +0300 | [diff] [blame] | 5 | |
| 6 | Quick Start |
| 7 | ----------- |
| 8 | |
Oleksandr Suvorov | f5c2c37 | 2021-03-11 22:00:37 +0200 | [diff] [blame] | 9 | - Get and Build the ARM trusted firmware |
| 10 | - Get System Controller firmware |
| 11 | - Get SECO container |
Igor Opaniuk | 3730106 | 2020-10-22 11:21:39 +0300 | [diff] [blame] | 12 | - Build U-Boot |
| 13 | - Load U-Boot binary using uuu |
| 14 | - Flash U-Boot binary into the eMMC |
| 15 | - Boot |
| 16 | |
Oleksandr Suvorov | f5c2c37 | 2021-03-11 22:00:37 +0200 | [diff] [blame] | 17 | Note: builddir is U-Boot build directory (source directory for in-tree builds) |
| 18 | |
Igor Opaniuk | 3730106 | 2020-10-22 11:21:39 +0300 | [diff] [blame] | 19 | Get and Build the ARM Trusted Firmware |
| 20 | -------------------------------------- |
| 21 | |
| 22 | .. code-block:: bash |
| 23 | |
Oleksandr Suvorov | f5c2c37 | 2021-03-11 22:00:37 +0200 | [diff] [blame] | 24 | $ cd $(builddir) |
| 25 | $ 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 |
| 27 | $ cp imx-atf/build/imx8qx/release/bl31.bin $(builddir) |
Igor Opaniuk | 3730106 | 2020-10-22 11:21:39 +0300 | [diff] [blame] | 28 | |
Oleksandr Suvorov | f5c2c37 | 2021-03-11 22:00:37 +0200 | [diff] [blame] | 29 | Get System Controller firmware |
Igor Opaniuk | 3730106 | 2020-10-22 11:21:39 +0300 | [diff] [blame] | 30 | --------------------------------------- |
| 31 | |
| 32 | .. code-block:: bash |
| 33 | |
Oleksandr Suvorov | f5c2c37 | 2021-03-11 22:00:37 +0200 | [diff] [blame] | 34 | $ wget https://github.com/toradex/i.MX-System-Controller-Firmware/raw/master/src/scfw_export_mx8qx_b0/build_mx8qx_b0/mx8qx-apalis-scfw-tcm.bin |
Igor Opaniuk | 3730106 | 2020-10-22 11:21:39 +0300 | [diff] [blame] | 35 | |
Oleksandr Suvorov | f5c2c37 | 2021-03-11 22:00:37 +0200 | [diff] [blame] | 36 | Get SECO container |
| 37 | --------------------------------------- |
Igor Opaniuk | 3730106 | 2020-10-22 11:21:39 +0300 | [diff] [blame] | 38 | |
| 39 | .. code-block:: bash |
| 40 | |
Oleksandr Suvorov | f5c2c37 | 2021-03-11 22:00:37 +0200 | [diff] [blame] | 41 | $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-3.7.4.bin |
| 42 | $ sh imx-seco-3.7.4.bin |
| 43 | $ cp imx-seco-3.7.4/firmware/seco/mx8qxb0-ahab-container.img $(builddir)/mx8qx-ahab-container.img |
Igor Opaniuk | 3730106 | 2020-10-22 11:21:39 +0300 | [diff] [blame] | 44 | |
| 45 | Build U-Boot |
| 46 | ------------ |
| 47 | .. code-block:: bash |
| 48 | |
| 49 | $ make apalis-imx8x_defconfig |
| 50 | $ make u-boot-dtb.imx |
| 51 | |
| 52 | Load the U-Boot Binary Using UUU |
| 53 | -------------------------------- |
| 54 | |
| 55 | Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``: |
| 56 | |
| 57 | https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases |
| 58 | |
| 59 | Put the module into USB recovery aka serial downloader mode, connect USB device |
| 60 | to your host and execute uuu: |
| 61 | |
| 62 | .. code-block:: bash |
| 63 | |
Oleksandr Suvorov | f5c2c37 | 2021-03-11 22:00:37 +0200 | [diff] [blame] | 64 | sudo ./uuu $(builddir)/u-boot-dtb.imx |
Igor Opaniuk | 3730106 | 2020-10-22 11:21:39 +0300 | [diff] [blame] | 65 | |
| 66 | Flash the U-Boot Binary into the eMMC |
| 67 | ------------------------------------- |
| 68 | |
| 69 | Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area |
| 70 | partition and boot: |
| 71 | |
| 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} |