Hi All,
I am working on authentication of u-boot from the spl. I have generated signature for u-boot without dtbs using ift tool which is provided by TI only.And also framed u-boot image in FIT format using mkimage tool and programmed into NOR memory.
Based on FDT header magic number, loading u-boot properties first into SDRAM and searching for /image node offset to get properties using following API.
/* find the firmware image to load */
images = fdt_path_offset(fit, FIT_IMAGES_PATH);
But after adding above API in the spl_load_simple_fit() function, i am even not able to authenticate spl from secure boot_ROM.(If i remove the API, spl is authenticated from secure rom code)
so please help me in the issue.I have verified that image is loaded to SDRAM that you can observe in the below content contains FIT images properties(Load address,magic number, architecture,os etc...)
U-Boot SPL 2016.05-00005-gdee9813d76b8-dirty (May 13 2021 - 12:43:26)
DRA762-HS ES1.0
i2c_write: error waiting for data ACK (status=0x116)
i2c_write: error waiting for data ACK (status=0x116)
Trying to boot from NOR
Found FIT
spl_ram_load_read: sector 0, count 2b0, buf 807ffd00
fit read sector 0x0, sectors=688, dst=807ffd00, count=688
Started priting all SDRAM data to console
807ffd00: d00dfeed000002ad 0000003800000230 0000002800000011 0000001000000000 0000007d000001f8
807ffd28: 0000000000000000 0000000000000000 0000000100000000 0000000300000004 0000005d609cd19a
807ffd50: 000000030000002a 000000514669726d 7761726520696d61 6765207769746820 6f6e65206f72206d
807ffd78: 6f72652046445420 626c6f6273000000 0000000300000031 00000049552d426f 6f74206d6b696d61
807ffda0: 676520323031362e 30352d3030303035 2d67646565393831 3364373662382d64 6972747900000000
807ffdc8: 0000000300000004 0000003a00000001 00000001696d6167 6573000000000001 6669726d77617265
807ffdf0: 4031000000000003 0000000400000073 000d519400000003 0000000400000067 0000000000000003
807ffe18: 0000003a00000051 552d426f6f742032 3031362e30352d30 303030352d676465 6539383133643736
807ffe40: 62382d6469727479 20666f7220647261 37787820626f6172 6400000000000003 0000000900000035
807ffe68: 6669726d77617265 0000000000000003 0000000400000030 41524d0000000003 000000070000002d
807ffe90: 752d626f6f740000 0000000300000005 000000216e6f6e65 0000000000000003 000000040000001c
807ffeb8: 8080000000000003 0000000400000016 0000000000000002 0000000200000001 636f6e6669677572
807ffee0: 6174696f6e730000 0000000300000007 00000009636f6e66 4031000000000001 636f6e6640310000
807fff08: 000000030000000b 000000006669726d 7761726540310000 0000000200000002 0000000200000009
807fff30: 6669726d77617265 0064656661756c74 006461746100656e 747279006c6f6164 00636f6d70726573
807fff58: 73696f6e006f7300 6172636800747970 6500236164647265 73732d63656c6c73 0063726561746f72
807fff80: 0064657363726970 74696f6e0074696d 657374616d700064 6174612d6f666673 657400646174612d
807fffa8: 73697a6500508de2
printed all SDRAM data to console
The first 8 bytes which is started from 807ffd00 address in the above log is the fdt magic number and FIT format size without uboot image(Means moved uboot image after the FIT format)
80800000 is highlighted with color that is start address of u-boot image.
If u need more information to understand the issue, Please let me know. I will arrange one call also if required. Please help me to sort it out this issue.
