/
i.MX 8M Mini Bootcontainer

i.MX 8M Mini Bootcontainer

The boot container that the i.MX 8M Mini modules are shipped with resides in the modules' flash NOR memory and is intended for booting Linux. It consists of the following parts:

  • Image Vector Table(IVT) - for details see i.MX 8M Mini Applications Processor Reference Manual

  • Secondary Program Loader(SPL) - u-boot-spl.bin

  • LPDDR training binaries - NXP proprietary

  • Tertiary Program Loader(TPL) - u-boot-nodtb.bin

  • ARM Trusted Firmware(ATF) - bl31.bin of imx-atf

  • u-boot device tree file - \<U-boot Default DTB\>*

Instructions for creation of the i.MX 8M Mini boot container:

1. Do the Yocto build for i.MX 8M Mini

2. Build the i.MX 8M Mini Bootloader

3. Fetch the i.MX mkimage sources and enter the directory

$ git clone <https://git.congatec.com/arm-nxp/imx8-family/misc/mkimage-imx8-family.git> $ cd mkimage-imx8-family

4. Switch to the appropriate branch

In this step the mkimage version that will be used to create the bootcontainer needs to be selected in the downloaded Git repository. Selected can be either the latest version of a congatec branch (4a) or a particular version, usually tight to a software release (4b). In any case, the same selection as for the bootloader build should be made here.
The available congatec branches, together with identification of the base NXP version and list of congatec releases on each branch can be found in the table below.

U-boot Version

Kernel Version

NXP Release Suffix

congatec Make Image Branch

congatec Release Tags

U-boot Version

Kernel Version

NXP Release Suffix

congatec Make Image Branch

congatec Release Tags

2018.3

4.14.98-2.0.0

2.0.0_ga

cgtimx8mm__imx_4.14.98_2.0.0_ga

rel_cgtsx8m_20-06-16-0*

\) Note: this version of mkimage is also to be used for 2020.4/5.4.47-2.2.0 bootcontainer*

4a. Selecting the latest version from a branch
$ git checkout <Make Image Branch>
4a. Selecting a particular version
$ git checkout <Release Tag>

5. Copy all following files into the iMX8M subdirectory

5.1 Boot loader files created in step 2
  • u-boot-spl.bin

  • u-boot-nodtb.bin

  • \<U-boot Default DTB\>*

5.2 LPDDR training binaries\\
  • lpddr4\_pmu\_train\_1d\_dmem.bin

  • lpddr4\_pmu\_train\_1d\_imem.bin

  • lpddr4\_pmu\_train\_2d\_dmem.bin

  • lpddr4\_pmu\_train\_2d\_imem.bin

5.3 ATF binary\\
  • bl31-imx8mm.bin\\\*

6. Create the boot container

Requirements:
1. The cross-SDK environment must not be set for this step
2. The device tree compiler has to be installed (e.g. sudo apt install device-tree-compiler on Ubuntu)

The same selection of make image target as for the bootloader build should be made here; the target is module and boot device dependent.

Module

Boot Device

Make Image Target

Module

Boot Device

Make Image Target

conga-SMX8-Mini

SD Card

flash_sx8m

conga-SMX8-Mini

NOR Flash

flash_sx8m_flexspi

Boot container is now ready as flash.bin inside the iMX8M directory. Its location on a boot device depends on the type of the boot device; for SD card use 0x8400 offset, for module's NOR flash memory place the container just from beginning (i.e. 0x0 offset).

Note 1: FlexSPI and SD/MMC are the only boot devices currently supported for i.MX 8M Mini modules
Note 2: No security features like HAB or OPTEE are part of the default bootcontainer


\) For the proper name go to the bootloader build section*
\\) the files reside in the imx-boot-tools subdirectory of the image directory created in step 1
\\\) the file has to be renamed to bl31.bin in the destination directory*