spsdk icon indicating copy to clipboard operation
spsdk copied to clipboard

Add support for multiple SEC_UNLOCK sections in BD file

Open IgorSukhov opened this issue 1 year ago • 2 comments

Summary Enable the ability to unlock multiple features from different engines using the boot descriptor (BD) file with multiple SEC_UNLOCK sections

Background Currently, there is no way to unlock features from different engines simultaneously using the BD file, as only the first SEC_UNLOCK section is processed.

Solution To unlock several features from different engines, multiple SEC_UNLOCK sections can be used in the BD file:

'section (SEC_UNLOCK; 
    Unlock_Engine = "SNVS",
    Unlock_features = "ZMK WRITE")
{
}

section (SEC_UNLOCK; 
    Unlock_Engine = "OCOTP", 
    Unlock_features = "SRK REVOKE")
{
}

Tested with i.MXRT1061 processor.

IgorSukhov avatar Oct 23 '24 12:10 IgorSukhov

Hi @IgorSukhov , Thank you for the proposal. When implementing CSF commands processing we expected just one command of given type per BD file. This is a new requirement which is currently not supported. Your solution solves the issue with multiple commands of same type. There is one downside and that is that the order of commands may not be kept. For example if user inserts one more command between two SEC_UNLOCK commands, the order of commands will be different to the BD file.

BohdanMarek avatar Nov 26 '24 09:11 BohdanMarek

Hi @IgorSukhov, This problem should be resolved in SPSDK 3.0.0 as the HAB has been redesigned. Thank you for bringing this up.

BohdanMarek avatar Mar 25 '25 06:03 BohdanMarek

Any info on when SPSDK 3.0.0 will be released? This is a pretty gnarly bug.

arbrauns avatar May 12 '25 13:05 arbrauns

I think it will be released by the end of this week or early next week

BohdanMarek avatar May 12 '25 13:05 BohdanMarek

Hello @IgorSukhov, the release was last week, let me know if you are satisfied with the solution :)

mwsk avatar May 28 '25 09:05 mwsk