Igor Opaniuk | f4c326d | 2020-01-28 14:42:26 +0100 | [diff] [blame] | 1 | U-Boot for the Toradex Verdin iMX8M Mini Module |
| 2 | |
| 3 | Quick Start |
| 4 | =========== |
| 5 | |
| 6 | - Build the ARM trusted firmware binary |
| 7 | - Get the DDR firmware |
| 8 | - Build U-Boot |
| 9 | - Flash to eMMC |
| 10 | - Boot |
| 11 | |
| 12 | Get and Build the ARM Trusted Firmware (Trusted Firmware A) |
| 13 | =========================================================== |
| 14 | |
| 15 | $ echo "Downloading and building TF-A..." |
| 16 | $ git clone -b imx_4.14.98_2.3.0 https://source.codeaurora.org/external/imx/imx-atf |
| 17 | $ cd imx-atf |
| 18 | |
| 19 | Please edit `plat/imx/imx8mm/include/platform_def.h` so it contains proper |
| 20 | values for UART configuration and BL31 base address (correct values listed |
| 21 | below): |
| 22 | #define BL31_BASE 0x910000 |
| 23 | #define IMX_BOOT_UART_BASE 0x30860000 |
| 24 | #define DEBUG_CONSOLE 1 |
| 25 | |
| 26 | Then build ATF (TF-A): |
| 27 | $ make PLAT=imx8mm bl31 |
| 28 | |
| 29 | Get the DDR Firmware |
| 30 | ==================== |
| 31 | |
| 32 | $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.4.1.bin |
| 33 | $ chmod +x firmware-imx-8.4.1.bin |
| 34 | $ ./firmware-imx-8.4.1.bin |
| 35 | $ cp firmware-imx-8.4.1/firmware/ddr/synopsys/lpddr4*.bin ./ |
| 36 | |
| 37 | Build U-Boot |
| 38 | ============ |
| 39 | |
| 40 | $ export CROSS_COMPILE=aarch64-linux-gnu- |
| 41 | $ make verdin-imx8mm_defconfig |
| 42 | $ make flash.bin |
| 43 | |
| 44 | Flash to eMMC |
| 45 | ============= |
| 46 | |
| 47 | > tftpboot ${loadaddr} flash.bin |
| 48 | > setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 |
| 49 | > mmc dev 0 1 && mmc write ${loadaddr} 0x2 ${blkcnt} |
| 50 | |
| 51 | As a convenience, instead of the last two commands one may also use the update |
| 52 | U-Boot wrapper: |
| 53 | > run update_uboot |
| 54 | |
| 55 | Boot |
| 56 | ==== |
| 57 | |
| 58 | ATF, U-boot proper and u-boot.dtb images are packed into FIT image, |
| 59 | which is loaded and parsed by SPL. |
| 60 | |
| 61 | Boot sequence is: |
| 62 | SPL ---> ATF (TF-A) ---> U-boot proper |
| 63 | |
| 64 | Output: |
| 65 | U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) |
| 66 | Normal Boot |
| 67 | Trying to boot from MMC1 |
| 68 | NOTICE: Configuring TZASC380 |
| 69 | NOTICE: RDC off |
| 70 | NOTICE: BL31: v2.0(release):rel_imx_4.14.98_2.3.0-0-g09c5cc994-dirty |
| 71 | NOTICE: BL31: Built : 01:11:41, Jan 25 2020 |
| 72 | NOTICE: sip svc init |
| 73 | |
| 74 | |
| 75 | U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) |
| 76 | |
| 77 | CPU: Freescale i.MX8MMQ rev1.0 at 0 MHz |
| 78 | Reset cause: POR |
| 79 | DRAM: 2 GiB |
| 80 | MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 |
| 81 | Loading Environment from MMC... OK |
| 82 | In: serial |
| 83 | Out: serial |
| 84 | Err: serial |
| 85 | Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial# 06535149 |
| 86 | Net: eth0: ethernet@30be0000 |
| 87 | Hit any key to stop autoboot: 0 |
| 88 | Verdin iMX8MM # |