SB2 file creation and load

cancel
Showing results for 
Search instead for 
Did you mean: 

SB2 file creation and load

358 Views
binjun-charles_
Contributor II

Hello All

Now i am trying to create and load a sb2 file. Before doing it, i configured the keystore and CMPA and CFPA. Now bootloader is working in secure mode.

1. i use command " .\elftosb.exe -V -f lpc55xx -k ".\keys\sbkek.txt" -c ".\SB2 \commandFile.bd" -o image.sb2" to generate SB2 file.(why different sb2 files are generated using same sbkek.txt and commandFile.bd??)

2.  use command ".\blhost.exe -p COM13 receive-sb-file .\image.sb2" to load sb2 file and get log below:

PS C:\Users\sesa216564\Desktop\AN12283_LPC55Sxx_Secure_boot> .\blhost.exe -p COM13 receive-sb-file .\image.sb2
Ping responded in 1 attempt(s)
Inject command 'receive-sb-file'
Preparing to send 7360 (0x1cc0) bytes to the target.
Successful generic response to command 'receive-sb-file'
Error: read_start_byte() timeout after 5.096 seconds
Data phase write aborted by status 0x5 kStatus_Timeout
Error: read_start_byte() timeout after 5.104 seconds
Response status = 10004 (0x2714) No response packet from target device.
Wrote 0 of 7360 bytes.

why failed??

PS: i tried the same commands on another board without enabled security and got log below:

    Ping responded in 1 attempt(s)
Inject command 'receive-sb-file'
Preparing to send 7360 (0x1cc0) bytes to the target.
Successful generic response to command 'receive-sb-file'
Data phase write aborted by status 0x2712 kStatus_AbortDataPhase
Possible JUMP or RESET command received.
Response status = 10101 (0x2775) kStatusRomLdrSignature
Wrote 0 of 7360 bytes.

what's meaning of kStatusRomLdrSignature??

PS: Is it possible to check CMPA and CFPA memory when bootloader is working in secure mode? 

The attached files are used to generate sb2 file.

Best regards

Charles

Labels (1)
Tags (2)
0 Kudos
1 Reply

219 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI

why different sb2 files are generated using same sbkek.txt and commandFile.bd? It's normal. sbkek is the key that is used to encrypt the real key. mcu generates a different real key each time, nobody knows what's it. so the generated sb file must be different.

 

SB file download error. you must follow the steps of an12283 to program sb file.  how did you config CMPA, for example, if it is configured to boot the signed image, you must make sure sure the file that used to generating sb file is also signed one. make sure the file syntax match.


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
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