The bootloader can be built either using the module's Linux system or on the Linux Host Machine, using a cross-SDK. In either case, the development tools need to be made available, as discussed in the Yocto Build section, chapters 2 and 3.
The build process itself consists of obtaining the proper source code and invoking make for the correct module and boot device; as the boot device either an SD card or the module's NOR Flash memory can be used.
1. Fetch the u-boot sources and enter the directory
Code Block | ||
---|---|---|
| ||
$ git clone <https://git.congatec.com/arm-nxp/imx8-family/uboot-imx8-family.git>
$ cd uboot-imx8-family |
2. Switch to the appropriate version
In this step a version that will be built needs to be selected in the downloaded Git repository. Selected can be either the latest version of a congatec branch (2a) or a particular version, usually tight to a software release (2b). 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 U-boot Branch | congatec Release Tags | Module Revision |
---|---|---|---|---|---|
2018.3 | 4.14.98-2.0.0 | 2.0.0_ga | cgtimx8mm__imx_v2018.03_4.14.98_2.0.0_ga | rel_cgtsx8m_20-06-16-0 | A |
2020.4 | 5.4.47-2.2.0 | 2.2.0 | cgtimx8mm__imx_v2020.04_5.4.47_2.2.0 | rel_cgtsx8m_21-03-16-0 | A |
2022.04 | 5.15.32-2.0.0 | 2.0.0 | cgtimx8mm__lf_v2022.04__cgtsx8m-A | N/A | A |
2022.04 | 5.15.32-2.0.0 | 2.0.0 | cgtimx8mm__lf_v2022.04 | rel_cgtsx8m_23-02-22-0 | B |
2a. Selecting the latest version from a branch
Code Block | ||
---|---|---|
| ||
$ git checkout <U-boot Branch> |
2a. Selecting a particular version
Code Block | ||
---|---|---|
| ||
$ git checkout <Release Tag> |
3. Build bootloader
The build process consists of two steps - selecting the desired make target and the build itself.
Available make targets can be found in the table below; the selection is made based on the module and the boot device the bootloader is intended for.
Module | Boot Device | Make Target |
---|---|---|
conga-SMX8-Mini | SD Card | cgtsx8m_defconfig |
conga-SMX8-Mini | NOR Flash | cgtsx8m_fspi_defconfig |
Code Block | ||
---|---|---|
| ||
$ make <Make Target>
$ make |
The following bootloader files are created during the build process; the SPL and TPL have the same name for every module while the name of the U-boot device tree file is module specific.
Role | Subdirectory | File name | Module |
---|---|---|---|
Secondary Program Loader (SPL) | spl | u-boot-spl.bin | All |
Tertiary Program Loader (TPL) | . | u-boot-nodtb.bin | All |
u-boot Device Tree (DTB) file | arch/arm/dts | imx8mm-cgtsx8m.dtb | conga-SMX8-Mini |