How to encrypt flash_flexspi target of mk-image for iMX8QX rev C0?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to encrypt flash_flexspi target of mk-image for iMX8QX rev C0?

跳至解决方案
837 次查看
BrainKub
Contributor II

I can`t encrypt "flash_flexspi" target of "imx-mkimage" using the same CSF (for "flash" target):

[ERROR] CST: Offsets are not consistent with the input binary to be signed

Offset in CSF correct - they are from imx-mkimage output.

破坏者

[Header]
Target = AHAB
Version = 1.0

[Install SRK]
# SRK table generated by srktool
File = "./release/crts/SRK_1_2_3_4_table.bin"
# Public key certificate in PEM format
Source = "./release/crts/SRK1_sha384_secp384r1_v3_usr_crt.pem"
# Index of the public key certificate within the SRK table (0 .. 3)
Source index = 0
# Type of SRK set (NXP or OEM)
Source set = OEM
# bitmask of the revoked SRKs
Revocations = 0x0

[Authenticate Data]
# Binary to be signed generated by mkimage
File = "flash.bin"
# Offsets = Container header Signature block (printed out by mkimage)
Offsets = 0x400 0x590

破坏者
REVISION: B0
BOOT DEVICE: flexspi
New Container: 0
SCFW: scfw_tcm.bin
AP: u-boot-atf.bin core: a35 addr: 0x80000000
Output: flash.bin
CONTAINER FUSE VERSION: 0x00
CONTAINER SW VERSION: 0x0000
ivt_offset: 4096
rev: 2
Platform: i.MX8QXP B0
ivt_offset: 4096
container image offset (aligned):11800
flags: 0x10
Hash of the images = sha384
1+0 записей получено
1+0 записей отправлено
151552 байт (152 kB, 148 KiB) скопирован, 0,000365609 s, 415 MB/s
294+1 записей получено
294+1 записей отправлено
150720 байт (151 kB, 147 KiB) скопирован, 0,000656258 s, 230 MB/s
SCFW file_offset = 0x11800 size = 0x25000
Hash of the images = sha384
1+0 записей получено
1+0 записей отправлено
872448 байт (872 kB, 852 KiB) скопирован, 0,00104488 s, 835 MB/s
1702+1 записей получено
1702+1 записей отправлено
871767 байт (872 kB, 851 KiB) скопирован, 0,00213528 s, 408 MB/s
AP file_offset = 0x36800 size = 0xd5000
CST: CONTAINER 0 offset: 0x400
CST: CONTAINER 0: Signature Block: offset is at 0x590
DONE.
Note: Please copy image to offset: IVT_OFFSET + IMAGE_OFFSET
./../scripts/fspi_packer.sh ../scripts/fspi_header
0+1 записей получено
0+1 записей отправлено
512 байт скопировано, 0,00011303 s, 4,5 MB/s
1070+0 записей получено
1070+0 записей отправлено
1095680 байт (1,1 MB, 1,0 MiB) скопирован, 0,00211214 s, 519 MB/s
3+0 записей получено
3+0 записей отправлено
1536 байт (1,5 kB, 1,5 KiB) скопирован, 8,65e-05 s, 17,8 MB/s
F(Q)SPI IMAGE PACKED

How to encrypt "flash_flexspi" image for iMX8QXP C0?

0 项奖励
1 解答
800 次查看
BiyongSUN
NXP Employee
NXP Employee

The guide in uboot does not consider the spi.  

It is for emmc/sdcard. 

So you add 4096(0x1000) to offset for spi as I have given you the link, which is printout by build or in the build log.

 

Suggest you make sure you can sign the emmc/sdcard image. 

 

 

在原帖中查看解决方案

0 项奖励
4 回复数
810 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

You need follow this guide 

https://source.codeaurora.org/external/imx/uboot-imx/tree/doc/imx/habv4/guides/mx8m_secure_boot.txt?...

make SOC=<SoC Name> flash_hdmi_spl_uboot
make SOC=<SoC Name> print_fit_hab

 

 

0 项奖励
829 次查看
BiyongSUN
NXP Employee
NXP Employee
0 项奖励
817 次查看
BrainKub
Contributor II

What should I do with this value? Tell me please how I can determine the offsets.

0 项奖励
801 次查看
BiyongSUN
NXP Employee
NXP Employee

The guide in uboot does not consider the spi.  

It is for emmc/sdcard. 

So you add 4096(0x1000) to offset for spi as I have given you the link, which is printout by build or in the build log.

 

Suggest you make sure you can sign the emmc/sdcard image. 

 

 

0 项奖励