Igor Opaniuk | fa14fa7 | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | Verdin iMX8M Mini Module |
| 4 | ======================== |
| 5 | |
| 6 | Quick Start |
| 7 | ----------- |
| 8 | |
| 9 | - Build the ARM trusted firmware binary |
| 10 | - Get the DDR firmware |
| 11 | - Build U-Boot |
| 12 | - Flash to eMMC |
| 13 | - Boot |
| 14 | |
| 15 | Get and Build the ARM Trusted Firmware (Trusted Firmware A) |
| 16 | ----------------------------------------------------------- |
| 17 | |
| 18 | .. code-block:: bash |
| 19 | |
| 20 | $ echo "Downloading and building TF-A..." |
Igor Opaniuk | 63a6098 | 2020-03-05 22:56:26 +0200 | [diff] [blame] | 21 | $ git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git |
| 22 | $ cd trusted-firmware-a |
Igor Opaniuk | fa14fa7 | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 23 | |
| 24 | Then build ATF (TF-A): |
| 25 | |
| 26 | .. code-block:: bash |
| 27 | |
Igor Opaniuk | 63a6098 | 2020-03-05 22:56:26 +0200 | [diff] [blame] | 28 | $ make PLAT=imx8mm IMX_BOOT_UART_BASE=0x30860000 bl31 |
| 29 | $ cp build/imx8mm/release/bl31.bin ../ |
Igor Opaniuk | fa14fa7 | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 30 | |
| 31 | Get the DDR Firmware |
| 32 | -------------------- |
| 33 | |
| 34 | .. code-block:: bash |
| 35 | |
Igor Opaniuk | 63a6098 | 2020-03-05 22:56:26 +0200 | [diff] [blame] | 36 | $ cd .. |
Igor Opaniuk | fa14fa7 | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 37 | $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.4.1.bin |
| 38 | $ chmod +x firmware-imx-8.4.1.bin |
| 39 | $ ./firmware-imx-8.4.1.bin |
| 40 | $ cp firmware-imx-8.4.1/firmware/ddr/synopsys/lpddr4*.bin ./ |
| 41 | |
| 42 | Build U-Boot |
| 43 | ------------ |
| 44 | .. code-block:: bash |
| 45 | |
| 46 | $ export CROSS_COMPILE=aarch64-linux-gnu- |
Igor Opaniuk | 63a6098 | 2020-03-05 22:56:26 +0200 | [diff] [blame] | 47 | $ export ATF_LOAD_ADDR=0x920000 |
Igor Opaniuk | fa14fa7 | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 48 | $ make verdin-imx8mm_defconfig |
| 49 | $ make flash.bin |
| 50 | |
| 51 | Flash to eMMC |
| 52 | ------------- |
| 53 | |
| 54 | .. code-block:: bash |
| 55 | |
| 56 | > tftpboot ${loadaddr} flash.bin |
| 57 | > setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 |
| 58 | > mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt} |
| 59 | |
| 60 | As a convenience, instead of the last two commands one may also use the update |
| 61 | U-Boot wrapper: |
| 62 | |
| 63 | .. code-block:: bash |
| 64 | |
| 65 | > run update_uboot |
| 66 | |
| 67 | Boot |
| 68 | ---- |
| 69 | |
| 70 | ATF, U-Boot proper and u-boot.dtb images are packed into FIT image, |
| 71 | which is loaded and parsed by SPL. |
| 72 | |
| 73 | Boot sequence is: |
| 74 | |
| 75 | * SPL ---> ATF (TF-A) ---> U-Boot proper |
| 76 | |
| 77 | Output: |
| 78 | |
| 79 | .. code-block:: bash |
| 80 | |
| 81 | U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) |
| 82 | Normal Boot |
| 83 | Trying to boot from MMC1 |
Igor Opaniuk | fa14fa7 | 2020-02-12 17:14:29 +0200 | [diff] [blame] | 84 | |
| 85 | U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) |
| 86 | |
| 87 | CPU: Freescale i.MX8MMQ rev1.0 at 0 MHz |
| 88 | Reset cause: POR |
| 89 | DRAM: 2 GiB |
| 90 | MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 |
| 91 | Loading Environment from MMC... OK |
| 92 | In: serial |
| 93 | Out: serial |
| 94 | Err: serial |
| 95 | Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial: |
| 96 | Net: eth0: ethernet@30be0000 |
| 97 | Hit any key to stop autoboot: 0 |
| 98 | Verdin iMX8MM # |