Checking data CRC by uboot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Checking data CRC by uboot

1,357 Views
adrian_dusinski
Contributor II

Hi,

I use u-boot 2017.03-r6.2 and yocto 3.0.

I have boot.scr with size 0x5020 and CRC32 ed13a969. I checked CRC32 on device and it's the same.

I have trustfence enabled so boot.scr is signed and when uboot start authenticate_image it takes:

ivt_offset = 0x1000

start = 80800000

bytes = 0x3020

So boot.scr with size 0x3020 have c7e49c7d and I get Bad data crc.

Is this my problem? Do I need to take any additional steps to make these crc compatible?

In header I have 0x54ce00a5 but my calculated crc for uboot is:

data 0x80800040

len 0x3d2

calculated crc 0x2248eb72

And calculated value for this size is right but size is wrong.

Regards,

Adrian

Labels (1)
0 Kudos
Reply
2 Replies

1,298 Views
IvanRuiz
NXP Employee
NXP Employee

Hello,

To get a different CRC, two things might happen: The CRC algorithm is not the same on both sides, or the data input to the CRC algorithm is different, this might be caused because one of the input data might be encrypted (which is different to plain text) and the other is not, or in case the data was padded, this also increases the length; so please check those points.

Hope that helps!

BR,

Ivan.

0 Kudos
Reply

1,298 Views
adrian_dusinski
Contributor II

Hi,
Thank you for response.
The problem was that image was encrypted by default and now it's works.

Regards,

Adrian

0 Kudos
Reply