I hope I can be of some help!
The process for the coral dev board was quite involved. It's roughly described below:
Dependencies:
apt-get install build-essential qemu-user-static bc
Fetching repo from google:
mkdir -p bin
export PATH=$PATH:$HOME/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
repo init -u https://coral.googlesource.com/manifest
repo sync -j$(nproc)
Next enabled secure boot by adding CONFIG_SECURE_BOOT=y to uboot-imx/configs/imx8mq_phanbell_defconfig
Next if all extra binary files were needed, we added the following to /packages/uboot-imx/debian/rules :
install -d debian/uboot-imx/boot
install -m 644 -o 0 -g 0 boot.scr debian/uboot-imx/boot/boot.scr
install -m 644 -o 0 -g 0 debian/overlays.txt debian/uboot-imx/boot/overlays.txt
install -d debian/uboot-mkimage/usr/bin
install -m 644 -o 0 -g 0 tools/mkimage debian/uboot-mkimage/usr/bin/mkimage
install -m 644 -o 0 -g 0 /usr/share/imx-atf/bl31.bin debian/uboot-imx/boot/bl31.bin
install -m 644 -o 0 -g 0 u-boot-nodtb.bin debian/uboot-imx/boot/u-boot-nodtb.bin
install -m 644 -o 0 -g 0 arch/arm/dts/fsl-imx8mq-phanbell.dtb debian/uboot-imx/boot/u-boot.dtb
install -m 644 -o 0 -g 0 u-boot-spl-ddr.bin debian/uboot-imx/boot/u-boot-spl-ddr.bin
install -m 644 -o 0 -g 0 $(IMX_FIRMWARE_DIR)/signed_hdmi_imx8m.bin debian/uboot-imx/boot/signed_hdmi_imx8m.bin
install -m 644 -o 0 -g 0 u-boot.bin debian/uboot-imx/boot/u-boot.bin
dh_install
install -m 644 -o 0 -g 0 u-boot.imx debian/uboot-imx/boot/u-boot.imx
Then built bootloader with (requires docker):
source build/setup.sh
m docker-uboot-imx
The bootloader installer package could then be found from:
out/target/product/imx8m_phanbell/packages/bsp/uboot-imx_5-3_arm64.deb
With an archive explorer, the imx file was found from said deb file from:
data.tar.xz/./boot/u-boot.imx
Next we had to check the log file "/out/target/product/imx8m_phanbell/uboot-imx-arm64.log" for the offset dump values:
Loader IMAGE:
header_image_off 0x0
image_off 0x40
csf_off 0x2ae00
spl hab block: 0x7e0fc0 0x0 0x2ae00
Second Loader IMAGE:
sld_header_off 0x57c00
sld_csf_off 0x58c20
sld hab block: 0x401fcdc0 0x57c00 0x1020
Here the hab_block & csf_off values were important later
Next we used this code signing tool: https://www.nxp.com/webapp/Download?colCode=IMX_CST_TOOL_NEW
and in the release/keys folder, created 2 files:
"serial" that contains a 8 digit code
"key_pass.txt" that contains a passphrase twice (1st and 2nd line)
We ran:
./hab4_pki_tree.sh
Do you want to use an existing CA key (y/n)?: n
Do you want to use Elliptic Curve Cryptography (y/n)?: n
Enter key length in bits for PKI tree: 4096
Enter PKI tree duration (years): 20
How many Super Root Keys should be generated? 4
Do you want the SRK certificates to have the CA flag set? (y/n)?: y