ATF
Building ATF is as follows – make sure you have set your ARCH and CROSS_COMPILE environment variables as noted above
cd arm-trusted-firmware
make PLAT=imx8mq bl31
cp build/imx8mq/release/bl31.bin ../u-boot/
cd ..
Extract and copy firmware
Extract the NXP firmware archive and accept the end user agreement
chmod +x firmware-imx-7.9.bin
./firmware-imx-7.9.bin
cp firmware-imx-7.9/firmware/hdmi/cadence/signed_hdmi_imx8m.bin u-boot/
cp firmware-imx-7.9/firmware/ddr/synopsys/lpddr4*.bin u-boot/