cancel
Showing results for 
Search instead for 
Did you mean: 

SBSFU: image validation error

mr_divakar
Associate II

Hi,

I am evaluating/learning the SBSFU application example on STM32WBA55CG. I have disabled the MCUBOOT_HW_ROLLBACK_PROT and generated the signed confirmed image sbsfu_app_init.bin using the imgtool.exe  without the security counter TLV using the below command. 

imgtool.exe  sign -k root-rsa-2048.pem  -S 229376  -e little -H 0x400 --pad-header --align 8 --overwrite-only -v 1.0.0 --confirm --pad sbsfu_app_init.bin

 The only change I made to the above command is to remove the "-s auto" and +0 from the version to ensure TLV for the security counter isn't added. However, when I run the application, the image validation fails within the bootutil_tlv_iter_begin as shown below i.e

	if (info.it_magic == IMAGE_TLV_PROT_INFO_MAGIC) {// fails with info.it_magic = 0x6907

		if (hdr->ih_protect_tlv_size != info.it_tlv_tot) {
			return -1;
		}

		if (LOAD_IMAGE_DATA(hdr, fap, off_ + info.it_tlv_tot, &info,
				sizeof(info))) {
			return -1;
		}
	} else if (hdr->ih_protect_tlv_size != 0) {//fails with hdr->ih_protect_tlv_size = 4
		return -1;
	}

I'd expect hdr->ih_protect_tlv_size to be 0 however it is not. Could someone help/advise to resolve this. Any insights would be appreciated.

0 REPLIES 0