Hello,
An example below show how to get the IVT structure from u-boot.imx and do the signature.
Dump u-boot.imx IVT structure:
$ od -x -N 64 u-boot.imx
0000000 00d1 4020 0000 1780 0000 0000 f42c 177f
0000020 f420 177f f400 177f a000 1785 0000 0000
0000040 f000 177f d000 0005 0000 0000 02d2 40f8
0000060 02cc 04f4 0e02 9807 0c00 0000 0e02 5807
0000100
U-boot.imx header layout is
| 0 | ivt_header_t header |
| 4 | uint32_t entry |
| 8 | uint32_t reserved1 |
| 12 | uint32_t dcd_ptr |
| 16 | uint32_t boot_data_ptr |
| 20 | uint32_t self |
| 24 | uint32_t csf |
| 28 | uint32_t reserved2 |
| 32 | uint32_t start |
| 36 | uint32_t size |
| 40 | uint32_t plugin |
IVT address: IVT.self = 0x177ff400.
Image length: IVT.csf – IVT.self = 0x1785a000 - 0x177ff400 = 0x5AC00
u-boot.imx need to be padded to 0x5AC00.
So the [Authenticate Data] of csf file is
Verification index = 2
Blocks = 0x177FF400 0x0 0x5AC00 "u-boot-pad.bin"
Regards,
Yuri.