xref: /rk3399_ARM-atf/docs/plat/imx8m.rst (revision ad329e50b6255cff7d4de319c58f434b4c540c4d)
124dba2b3SPaul BeesleyNXP i.MX 8M Series
224dba2b3SPaul Beesley==================
381136819SBai Ping
481136819SBai PingThe i.MX 8M family of applications processors based on Arm Corte-A53 and Cortex-M4
581136819SBai Pingcores provide high-performance computing, power efficiency, enhanced system
681136819SBai Pingreliability and embedded security needed to drive the growth of fast-growing
781136819SBai Pingedge node computing, streaming multimedia, and machine learning applications.
881136819SBai Ping
981136819SBai PingBoot Sequence
1024dba2b3SPaul Beesley-------------
1181136819SBai Ping
1281136819SBai PingBootrom --> SPL --> BL31 --> BL33(u-boot) --> Linux kernel
1381136819SBai Ping
1481136819SBai PingHow to build
1524dba2b3SPaul Beesley------------
1681136819SBai Ping
1781136819SBai PingBuild Procedure
1824dba2b3SPaul Beesley~~~~~~~~~~~~~~~
1981136819SBai Ping
2081136819SBai Ping-  Prepare AARCH64 toolchain.
2181136819SBai Ping
2281136819SBai Ping-  Build spl and u-boot firstly, and get binary images: u-boot-spl.bin,
2381136819SBai Ping   u-boot-nodtb.bin and dtb for the target board.
2481136819SBai Ping
2581136819SBai Ping-  Build TF-A
2681136819SBai Ping
2781136819SBai Ping   Build bl31:
2881136819SBai Ping
2981136819SBai Ping   .. code:: shell
3081136819SBai Ping
31650a435cSMark Dykes       CROSS_COMPILE=aarch64-linux-gnu- make PLAT=<Target_SoC> bl31
3281136819SBai Ping
3381136819SBai Ping   Target_SoC should be "imx8mq" for i.MX8MQ SoC.
34179f82a2SJacky Bai   Target_SoC should be "imx8mm" for i.MX8MM SoC.
3558fdd608SJacky Bai   Target_SoC should be "imx8mn" for i.MX8MN SoC.
36a775ef25SJacky Bai   Target_SoC should be "imx8mp" for i.MX8MP SoC.
3781136819SBai Ping
3881136819SBai PingDeploy TF-A Images
3924dba2b3SPaul Beesley~~~~~~~~~~~~~~~~~~
4081136819SBai Ping
4181136819SBai PingTF-A binary(bl31.bin), u-boot-spl.bin u-boot-nodtb.bin and dtb are combined
4281136819SBai Pingtogether to generate a binary file called flash.bin, the imx-mkimage tool is
4381136819SBai Pingused to generate flash.bin, and flash.bin needs to be flashed into SD card
4481136819SBai Pingwith certain offset for BOOT ROM. the u-boot and imx-mkimage will be upstreamed
4581136819SBai Pingsoon, this doc will be updated once they are ready, and the link will be posted.
46*ad329e50SYing-Chun Liu (PaulLiu)
47*ad329e50SYing-Chun Liu (PaulLiu)TBBR Boot Sequence
48*ad329e50SYing-Chun Liu (PaulLiu)------------------
49*ad329e50SYing-Chun Liu (PaulLiu)
50*ad329e50SYing-Chun Liu (PaulLiu)When setting NEED_BL2=1 on imx8mm. We support an alternative way of
51*ad329e50SYing-Chun Liu (PaulLiu)boot sequence to support TBBR.
52*ad329e50SYing-Chun Liu (PaulLiu)
53*ad329e50SYing-Chun Liu (PaulLiu)Bootrom --> SPL --> BL2 --> BL31 --> BL33(u-boot with UEFI) --> grub
54*ad329e50SYing-Chun Liu (PaulLiu)
55*ad329e50SYing-Chun Liu (PaulLiu)This helps us to fulfill the SystemReady EBBR standard.
56*ad329e50SYing-Chun Liu (PaulLiu)BL2 will be in the FIT image and SPL will verify it.
57*ad329e50SYing-Chun Liu (PaulLiu)All of the BL3x will be put in the FIP image. BL2 will verify them.
58*ad329e50SYing-Chun Liu (PaulLiu)In U-boot we turn on the UEFI secure boot features so it can verify
59*ad329e50SYing-Chun Liu (PaulLiu)grub. And we use grub to verify linux kernel.
60