How to get HAB Authenticate Data block address for i.MX 8M Mini in Yocto

显示  仅  | 搜索替代 

How to get HAB Authenticate Data block address for i.MX 8M Mini in Yocto

1,468 次查看
Contributor V

Hello all,

    I'm following mx8m_secure_boot.txt as guide in enabling secure boot on i.MX 8M Mini EVK and I'm using Yocto (sumo) for building images. 

    The guide suggests to get the Blocks (both SPL & FIT) from the build logs, but as you may already know Yocto generally won't deploy build logs and keep them in tmp/work/ directory. So it's quite tricky to get the logs for analysis and the guide also suggests to run,

$ make SOC=<SoC Name> print_fit_hab

to get the additional block address which I'm not sure where to run!

So can you help me with the following questions:

  1. How to get imx-mkimage logs in Yocto deploy directory?
  2. How to run make SOC=imx8mm print_fit_hab in Yocto?

Thanks in advance.

3 回复数

344 次查看
Contributor II



Did you find any solution for this problem ?

0 项奖励

1,449 次查看
NXP Employee
NXP Employee

Hi kanimozhi_t


I asked internally and got below answer:


We may need to check if Yocto Project is using imx-mkimage tool for building i.MX8MM FIT images, I'm not being able to find that.

Alternatively you can use command below to display the FIT image load addresses:


$ sudo apt-get install device-tree-compiler
$ fdtdump -s imx-boot-imx8mmddr4evk-sd.bin-flash_ddr4_evk

**** fdtdump is a low-level debugging tool, not meant for general use.
**** If you want to decompile a dtb, you probably want
****     dtc -I dtb -O dts <filename>

imx-boot-imx8mmddr4evk-sd.bin-flash_ddr4_evk: found fdt at offset 0x57c00
// magic:		0xd00dfeed
// totalsize:		0x40f (1039)
// off_dt_struct:	0x38
// off_dt_strings:	0x39c
// off_mem_rsvmap:	0x28
// version:		17
// last_comp_version:	16
// boot_cpuid_phys:	0x0
// size_dt_strings:	0x73
// size_dt_struct:	0x364

/ {
    timestamp = <0x5ed2822e>;
    description = "Configuration to load ATF before U-Boot";
    images {
        uboot@1 {
            data-size = <0x000ef630>;
            data-position = <0x00003000>;
            description = "U-Boot (64-bit)";
            type = "standalone";
            arch = "arm64";
            compression = "none";
            load = <0x40200000>;
        fdt@1 {
            data-size = <0x00008d30>;
            data-position = <0x000f2630>;
            description = "evkddr4";
            type = "flat_dt";
            compression = "none";
        atf@1 {
            data-size = <0x0000b1e0>;
            data-position = <0x000fb360>;
            description = "ARM Trusted Firmware";
            type = "firmware";
            arch = "arm64";
            compression = "none";
            load = <0x00920000>;
            entry = <0x00920000>;
        tee@1 {
            data-size = <0x00059210>;
            data-position = <0x00106540>;
            description = "TEE firmware";
            type = "firmware";
            arch = "arm64";
            compression = "none";
            load = <0xbe000000>;
            entry = <0xbe000000>;
    configurations {
        default = "config@1";
        config@1 {
            description = "evkddr4";
            firmware = "uboot@1";
            loadables = "atf@1", "tee@1";
            fdt = "fdt@1";



Best regards

1,378 次查看
Contributor V

Thanks for the fdtdump solution, but we don't get all the required parameters in this method. Usually we need the following parameters for signing/encryption of FIT image.


========= OFFSET dump =========
Loader IMAGE:
header_image_off 0x0
dcd_off 0x0
image_off 0x40
csf_off 0x2d800
spl hab block: 0x7e0fc0 0x0 0x2d800

Second Loader IMAGE:
sld_header_off 0x57c00
sld_csf_off 0x58c20
sld hab block: 0x401fcdc0 0x57c00 0x1020

TEE_LOAD_ADDR=0xbe000000 ATF_LOAD_ADDR=0x00920000 VERSION=v1 ./ 0x60000 fsl-imx8mm-evk.dtb
0x40200000 0x5AC00 0xB3FD8
0x402B3FD8 0x10EBD8 0x8628
0x920000 0x117200 0xB160
0xBE000000 0x122360 0x5C000

It would be helpful if you could point out how we can get these addresses without imx-boot build log?


NOTE: Can we dump header as we do in i.MX 6UL (described in AN 4581) for the i.MX 8mm. If so could you share the header range and format?


Thanks in advance.