blob: 1dac969476aea78dd99aaee76b48d2bab80d1ab2 [file] [log] [blame]
Igor Opaniukf4c326d2020-01-28 14:42:26 +01001U-Boot for the Toradex Verdin iMX8M Mini Module
2
3Quick 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
12Get 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
19Please edit `plat/imx/imx8mm/include/platform_def.h` so it contains proper
20values for UART configuration and BL31 base address (correct values listed
21below):
22#define BL31_BASE 0x910000
23#define IMX_BOOT_UART_BASE 0x30860000
24#define DEBUG_CONSOLE 1
25
26Then build ATF (TF-A):
27$ make PLAT=imx8mm bl31
28
29Get 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
37Build U-Boot
38============
39
40$ export CROSS_COMPILE=aarch64-linux-gnu-
41$ make verdin-imx8mm_defconfig
42$ make flash.bin
43
44Flash 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
51As a convenience, instead of the last two commands one may also use the update
52U-Boot wrapper:
53> run update_uboot
54
55Boot
56====
57
58ATF, U-boot proper and u-boot.dtb images are packed into FIT image,
59which is loaded and parsed by SPL.
60
61Boot sequence is:
62SPL ---> ATF (TF-A) ---> U-boot proper
63
64Output:
65U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100)
66Normal Boot
67Trying to boot from MMC1
68NOTICE: Configuring TZASC380
69NOTICE: RDC off
70NOTICE: BL31: v2.0(release):rel_imx_4.14.98_2.3.0-0-g09c5cc994-dirty
71NOTICE: BL31: Built : 01:11:41, Jan 25 2020
72NOTICE: sip svc init
73
74
75U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100)
76
77CPU: Freescale i.MX8MMQ rev1.0 at 0 MHz
78Reset cause: POR
79DRAM: 2 GiB
80MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
81Loading Environment from MMC... OK
82In: serial
83Out: serial
84Err: serial
85Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial# 06535149
86Net: eth0: ethernet@30be0000
87Hit any key to stop autoboot: 0
88Verdin iMX8MM #