Facing issue with tool elftosb (v5.1.19) as "Invalid Block arguments"

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

Facing issue with tool elftosb (v5.1.19) as "Invalid Block arguments"

1,343 Views
KrutarthRaut
Contributor III

I am working with imx1176 evm board. for secure boot, I need to create signed flashloader.

as input, I took flashloader.srec file from "C:\nxp\MCUX_Provi_v3.1\bin\tools\elftosb\win\flashloader.srec". Tool does not work with srec file and its generate empty bin file as output.

Command used : "elftosb.exe -f imx -V -c imx-flexspinor-flashloader-signed.bd -o new.bin flashloader.srec"

So, I have converted srec file to bin format.

I have created BD command file and added option as below

options {
flags = 0x08;
startAddress = 0x20250000;
ivtOffset = 0x0000;
initialLoadSize = 0x2000;
}

Then I have run command as "Command used : "elftosb.exe -f imx -V -c imx-flexspinor-flashloader-signed.bd -o new.bin flashloader_test.bin"

this time its worked partially.
Sections are created but fails with cst tool chain

Issue listed as below:

Authenticate data
Invalid Block arguments, Blocks start offset and length together exceed file size in command AuthenticateData
error: failed to run code signing tool.

 

Please, can anyone suggest to make it work?

0 Kudos
Reply
7 Replies

1,335 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @KrutarthRaut ,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Before sharing some advice, I'd like to suggest that you can share the imx-flexspinor-flashloader-signed.bd.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-----------------------------------------------------------------------------

0 Kudos
Reply

1,331 Views
KrutarthRaut
Contributor III

Hello,

PFA command file.

0 Kudos
Reply

1,311 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
After checking, I think the format of the source file is the root cause of the above issue, the format should be elf or srec.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-----------------------------------------------------------------------------

0 Kudos
Reply

1,309 Views
KrutarthRaut
Contributor III

Hello,

Actually I tried with SREC if you see my first comment.

It is generating empty bin file as output. CST tool chain part does not work in that case.

regards

KRaut

0 Kudos
Reply

1,300 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @KrutarthRaut ,
Thanks for your reply.
After digging deeper, firstly, the issue is not related to the CST tool, secondly, I think you should add the entry Point Address item in the options in the .bd file, lastly, please confirm the table.bin is the corresponding hash of the root public key.
From my experience, you'd better use the GUI tool: MCUXpresso Secure Provision instead of typing in commands manually.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

1,290 Views
KrutarthRaut
Contributor III

Hi @jeremyzhou ,

Thank you for replying.
For Gui, SPT4.1 does not support ECC based operation so we moved to command line toolchain.

secondly, I made changes to Entry point as well with referring to bd file from SDK. But It did not solve issue. I believe, the issue is with "startAddress" and initialLoadSize. I am trying with it yet not succeeded.

 

If you have any example bd file for flashloader of Imx1176, Please share.

Regards

KR

 

0 Kudos
Reply

1,283 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @KrutarthRaut ,

Please check the attachment.

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply