Enable HAB Support in u-boot for Yocto Project

In Tordex Embedded Linux BSP 3.0 yocto , I have enabled Secure Boot with HABV4 for Colibri iMX6ULL 512MB IT. BSP3.0 contains the u-boot Git branch as “toradex_2019.07” and Colibri-imx6ull_defconfig Hs added the following configuration to enable secure boot.
CONFIG_SECURE_BOOT=y
CONFIG_SYS_FSL_HAS_SEC=y
CONFIG_SYS_FSL_SEC_COMPAT=4

With the code signing tool created CSF file and CSF binary signature using the below commands.
$ ./cst -i csf-uboot-4096 -o try.bin
$ cat u-boot-nand.imx try.bin > u-boot-signed.imx

Toradex easy installer tool is used to flash the signed u-boot images. After flashing there are no print/debug messages in the serial console.

Please provide the necessary steps to enable secure boot for Toradex BSP3.0 with yocto project.

Thanks,
Sivasubramaniyan P

Hi @Sivasubramaniyan ,

In case of bootloader not working one need to reflash module using Toradex easy installer.

Also let us know if while secure booting you have closed the device or it is still open. In case of device close and non working uboot, it’s more likely will not work with reflashing also as module will expect signed firmware to boot.

Regarding steps for using HAB I am afraid as of now we do not have step by step guide, NXP guide is what you need to refer. Additionally please check below post for solution and info regarding HAB on iMX6ULL

Best Regards
Ritesh Kumar

Hi @ritesh.tx,

I have cloned u-boot toardex with branch 2016.11-toradex. the following hab events are generated. Please help me to resolve the hab events error.

Colibri iMX6ULL #

Secure boot disabled

HAB Configuration: 0xf0, HAB State: 0x66 /* Refer Page no 70 Section 6.8.3 State */

--------- HAB Event 1 -----------------
event data:
0xdb 0x00 0x14 0x42 0x33 0x18 0xc0 0x00
0xca 0x00 0x0c 0x00 0x01 0xc5 0x00 0x00
0x00 0x00 0x0d 0xdc

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_SIGNATURE (0x18) /* Refer Page no 65 Section 6.7.1 Reason /
CTX = HAB_CTX_COMMAND (0xC0) /
Refer Page no 75 Section 6.7.2 State */
ENG = HAB_ENG_ANY (0x00)

--------- HAB Event 2 -----------------
event data:
0xdb 0x00 0x14 0x42 0x33 0x0c 0xa0 0x00
0x00 0x00 0x00 0x00 0x87 0x7f 0xf4 0x00
0x00 0x00 0x00 0x20

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ASSERTION (0x0C)
CTX = HAB_CTX_ASSERT (0xA0)
ENG = HAB_ENG_ANY (0x00)

--------- HAB Event 3 -----------------
event data:
0xdb 0x00 0x14 0x42 0x33 0x0c 0xa0 0x00
0x00 0x00 0x00 0x00 0x87 0x7f 0xf4 0x2c
0x00 0x00 0x01 0xe8

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ASSERTION (0x0C)
CTX = HAB_CTX_ASSERT (0xA0)
ENG = HAB_ENG_ANY (0x00)

--------- HAB Event 4 -----------------
event data:
0xdb 0x00 0x14 0x42 0x33 0x0c 0xa0 0x00
0x00 0x00 0x00 0x00 0x87 0x7f 0xf4 0x20
0x00 0x00 0x00 0x01

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ASSERTION (0x0C)
CTX = HAB_CTX_ASSERT (0xA0)
ENG = HAB_ENG_ANY (0x00)

--------- HAB Event 5 -----------------
event data:
0xdb 0x00 0x14 0x42 0x33 0x0c 0xa0 0x00
0x00 0x00 0x00 0x00 0x87 0x80 0x00 0x00
0x00 0x00 0x00 0x04

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ASSERTION (0x0C)
CTX = HAB_CTX_ASSERT (0xA0)
ENG = HAB_ENG_ANY (0x00)

Thanks and Regards,
Sivasubramaniyan P