<--

Manually Build Boot Binary For Olimex Imx8mp

Sometimes it is helpful to build boot binary outside of Yocto environment. In this, I will explore to boot

For the i.MX8MP SoC a boot image is generated by imx-mkimage tool and requires:

  • uboot-imx
  • TF-A
  • ddr training firmware
  1. Donwload and build the uboot-imx
git clone https://github.com/nxp-imx/uboot-imx.git -b lf_v2024.04

You also need the path (0001-Add-Olimex-iMX8MP-SOM-EVB-IND.patch) for EVK which is not currently supported in uboot-imx mainline.

make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- imx8mp_olimex_defconfig
make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- imx-boot
  1. Download and build the TF-A (ARM Trusted firmware)
git clone https://github.com/nxp-imx/imx-atf.git -b lf_v2.12

make PLAT=imx8mp bl31
  1. Download the LPDDR4 training binaries
wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.29-8741a3b.bin

Give execution permission and run the script which is going to unzip the blobs.

  1. Download imx-mkimage and build the image
git clone https://github.com/nxp-imx/imx-mkimage.git -b lf-6.12.34_2.1.0

You need the u-boot-spl.bin, u-boot-nodtb.bin, imx8mp-olimex.dtb, LPDDR4 files and bl31.bin

Copy all these to imx-mkimage/iMX8M/

Build with this command:

make SOC=iMX8MP REV=A0  dtbs=imx8mp-olimex.dtb flash_evk
  1. Program on the uSD
dd if=flash.bin of=/dev/<path 2 your uSD> bs=1K seek=32 conv=fsync

seek offset is taken from UG10163 i.MX Linux User’s Guide

imx8-olimex-uboot