Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | .. sectionauthor:: Marcel Ziswiler <marcel.ziswiler@toradex.com> |
Igor Opaniuk | 6f04caf | 2020-02-12 17:14:30 +0200 | [diff] [blame] | 3 | |
Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 4 | Apalis 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 Opaniuk | 6f04caf | 2020-02-12 17:14:30 +0200 | [diff] [blame] | 9 | |
| 10 | Quick 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 | |
| 20 | Get and Build the ARM Trusted Firmware |
| 21 | -------------------------------------- |
| 22 | |
| 23 | .. code-block:: bash |
| 24 | |
Fabio Estevam | f0f4612 | 2023-01-12 21:52:23 -0300 | [diff] [blame] | 25 | $ git clone -b imx_4.14.78_1.0.0_ga https://github.com/nxp-imx/imx-atf |
Igor Opaniuk | 6f04caf | 2020-02-12 17:14:30 +0200 | [diff] [blame] | 26 | $ cd imx-atf/ |
| 27 | $ make PLAT=imx8qm bl31 |
| 28 | |
| 29 | Get scfw_tcm.bin and ahab-container.img |
| 30 | --------------------------------------- |
| 31 | |
| 32 | .. code-block:: bash |
| 33 | |
| 34 | $ wget https://github.com/toradex/meta-fsl-bsp-release/blob/toradex-sumo-4.14.78-1.0.0_ga-bringup/imx/meta-bsp/recipes- |
| 35 | bsp/imx-sc-firmware/files/mx8qm-apalis-scfw-tcm.bin?raw=true |
| 36 | $ mv mx8qm-apalis-scfw-tcm.bin\?raw\=true mx8qm-apalis-scfw-tcm.bin |
| 37 | $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin |
| 38 | $ chmod +x firmware-imx-8.0.bin |
| 39 | $ ./firmware-imx-8.0.bin |
| 40 | |
| 41 | Copy the following binaries to the U-Boot folder: |
| 42 | |
| 43 | .. code-block:: bash |
| 44 | |
| 45 | $ cp imx-atf/build/imx8qm/release/bl31.bin . |
| 46 | $ cp u-boot/u-boot.bin . |
| 47 | |
| 48 | Copy the following firmware to the U-Boot folder: |
| 49 | |
| 50 | .. code-block:: bash |
| 51 | |
| 52 | $ cp firmware-imx-8.0/firmware/seco/ahab-container.img . |
| 53 | |
| 54 | Build U-Boot |
| 55 | ------------ |
Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 56 | |
Igor Opaniuk | 6f04caf | 2020-02-12 17:14:30 +0200 | [diff] [blame] | 57 | .. code-block:: bash |
| 58 | |
Philippe Schenker | bf46474 | 2020-08-28 21:08:06 +0300 | [diff] [blame] | 59 | $ make apalis-imx8_defconfig |
Igor Opaniuk | 6f04caf | 2020-02-12 17:14:30 +0200 | [diff] [blame] | 60 | $ make u-boot-dtb.imx |
| 61 | |
| 62 | Load the U-Boot Binary Using UUU |
| 63 | -------------------------------- |
| 64 | |
| 65 | Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``: |
| 66 | |
| 67 | https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases |
| 68 | |
Marcel Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 69 | Put the module into USB recovery aka serial downloader mode, connect the USB |
| 70 | device to your host and execute ``uuu``: |
Igor Opaniuk | 6f04caf | 2020-02-12 17:14:30 +0200 | [diff] [blame] | 71 | |
| 72 | .. code-block:: bash |
| 73 | |
| 74 | sudo ./uuu u-boot/u-boot-dtb.imx |
| 75 | |
| 76 | Flash the U-Boot Binary into the eMMC |
| 77 | ------------------------------------- |
| 78 | |
| 79 | Burn the ``u-boot-dtb.imx`` binary to the primary eMMC hardware boot area |
| 80 | partition 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 Ziswiler | 4d1fea9 | 2023-08-29 00:01:53 +0200 | [diff] [blame] | 88 | |
| 89 | As a convenience, instead of the last three commands, one may also use the |
| 90 | update U-Boot wrapper: |
| 91 | |
| 92 | .. code-block:: bash |
| 93 | |
| 94 | > run update_uboot |