Table of Contents
Obtain sources #
$ git clone https://github.com/Trucrux/uboot-trucrux.git $ cd uboot-trucrux
Configure compilation environment: $ source /opt/fslc-xwayland/3.1/environment-setup-aarch64-fslc-linux
Cleanup everything #
$ make mrproper
$ make imx8mq_trucrux_defconfig
Build U-Boot #
$ make -j$(nproc)
Build boot image #
Create imx-boot-tools directory: #
$ mkdir imx-boot-tools $ cd imx-boot-tools
Download DDR firmware #
$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.8.bin $ chmod +x firmware-imx-8.8.bin $ ./firmware-imx-8.8.bin $ cp firmware-imx-8.8/firmware/ddr/synopsys/* .
Download imx-mkimage #
$ git clone https://github.com/nxp-imx/imx-mkimage -b imx_5.4.24_2.1.0 $ cp imx-mkimage/iMX8M/*.c imx-mkimage/iMX8M/*.sh imx-mkimage/scripts/*.sh .
Download and build ATF #
$ git clone https://github.com/Trucrux/imx-atf $ git clone https://github.com/Trucrux/meta-trucrux $ cp iMX8M/soc.mak .. $ cd .. $ source /opt/fslc-xwayland/3.1/environment-setup-aarch64-fslc-linux $ unset LDFLAGS $ make PLAT=imx8mm bl31 $ cp build/imx8mm/release/bl31.bin .. $ cd .. Copy U-Boot binaries: $ cp ../tools/mkimage mkimage_uboot $ cp ../u-boot.bin . $ cp ../u-boot-nodtb.bin ../spl/u-boot-spl.bin ../arch/arm/dts/imx8mq-trux-DVP.dtb .
Build boot image #
$ make -f soc.mak clean make -f soc.mak SOC=iMX8MQ dtbs=”imx8mq-trux-DVP.dtb“ MKIMG=./mkimage_imx8 PAD_IMAGE=./pad_image.sh CC=gcc OUTIMG=imx-boot-sd.bin flash_lpddr4_ddr4_evk
Install the built U-Boot on an SD card #
$ sudo dd if=imx-boot-sd.bin of=/dev/sdX bs=1K seek=33 conv=fsync
(Replace /dev/sdX with the correct device)
If you want to use our recovery SD card to flash the built U-Boot to NAND flash/eMMC, then copy it to the appropriate location in the SD card:
$ sudo cp imx-boot-sd.bin /media/rootfs/opt/images/…