Hi Kan,
Sorry for the late reply.
I did some changes and now am able to build a smaller image with correct offset. Here is what I did:
1. First I generate the build script with this command:
securep -w /wksp/rt1040SecAppWksp1/ --device MIMXRT1040 --boot-device Winbond_W25Q64JW --boot-type authenticated_hab --life-cycle open_develop --script-only build --source-image iled_blinky.bin --start-address 0x600c1000 --img-cert crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem --save-settings
2. Then I modified the following configurations in `configs/imx_application_gen.yaml`
startAddress: 0x600c0000
ivtOffset: 0x0
initialLoadSize: 0x1000
3. Then I call the script `./build_image_lnx.sh` to build the signed image.
Now I am trying to authenticate the blinky signed binary from my bootloader, but getting HAB authentication failure when my bootloader is calling `hab_rvt::authenticate_image_no_dcd`. The audit log I get from the `hab_rvt::report_event` says HAB_INV_ADDRESS
DB 00 08 43 33 22 0A 00 | ...C3"..
This is the linker I modified for the blinky example:
MEMORY
{
m_ivt (RX) : ORIGIN = 0x600C0000, LENGTH = 0x00001000
m_interrupts (RX) : ORIGIN = 0x600C1000, LENGTH = 0x00000400
m_text (RX) : ORIGIN = 0x600C1400, LENGTH = 0x007FDC00
m_qacode (RX) : ORIGIN = 0x00000000, LENGTH = 0x00020000
m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00020000
m_data2 (RW) : ORIGIN = 0x20200000, LENGTH = 0x00040000
}
As for your questions, I adjusted the startAddress to 0x600c0000. Could you please explain what you mean by "you have to remove its IVT header"? Please note the bootloader I am using to verify the blinky signed binary is not signed as of now.
Thanks,
Rohan