STM32MP157CAC Secure Boot Process on Avenger96 board fails
Hi All,
I have performed Secure Boot over Avenger96 Board replaced with STM32MP157CAC earlier,but now I'm facing error provided below.
NOTICE: CPU: STM32MP157CAC Rev.?
NOTICE: Model: Arrow Electronics STM32MP157A Avenger96 board
NOTICE: Boot authentication Failed
INFO: Reset reason (0x15):
INFO: Power-on Reset (rst_por)
INFO: Using SDMMC
INFO: Instance 1
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.0-r1.5(debug):
NOTICE: BL2: Built : 13:13:37, Oct 2 2018
INFO: BL2: Doing platform setup
INFO: PMIC version = 0x10
INFO: RAM: DDR3-1066/888 bin G 2x4Gb 533MHz v1.45
INFO: Memory size = 0x40000000 (1024 MB)
INFO: BL2 runs SP_MIN setup
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x2fff0000
INFO: Image id=4 loaded: 0x2fff0000 - 0x30000000
INFO: BL2: Loading image id 5
INFO: Loading image id=5 at address 0xc0100000
INFO: STM32 Image size : 833640
INFO: Check signature on Non-Full-Secured platform
ERROR: Authentication Failed
WARNING: Failed to load image id=5 (-22)
ERROR: BL2: Failed to load image (-22)Steps followed :
1 Key generation:
sudo ./STM32MP_KeyGen_CLI -ecc 2 -pubk /home/user/secure_keys/public.pem -prvk /home/user/secure_keys/private.pem -hash /home/user/secure_keys/pubKeyHash.bin -pwd seed2 Extending PublickeyHash
Copied PublickeyHash in SD-card into bootfs
cp /home/ <username> /secure_keys/pubKeyHash.bin /media/<username>/bootfs/3 Key registration
at u-boot used the below commands
STM32MP>ext4load mmc 0:4 0xc0000000 pubKeyHash.bin
STM32MP> stm32key read 0xc0000000
STM32MP> stm32key fuse -y 0xc0000000 (after verifcation we have fused)now power-off the board and and again Plug SD-card to PC for flashing signed image.
4 Image Signing the FSBL and SSBL
FSBL
sudo ./STM32MP_SigningTool_CLI -bin /home/kaushendra/Board_Test/tf-a-stm32mp157a-av96-trusted.stm32 -pubk /home/kaushendra/secure_test/public.pem -prvk /home/kaushendra/secure_test/private.pem -pwd seed -a 2 -o /home/kaushendra/Board_Test/tf-a-stm32mp157a-av96-trusted-signed.stm32SSBL
sudo ./STM32MP_SigningTool_CLI -bin /home/kaushendra/Board_Test/u-boot-stm32mp157a-av96-trusted.stm32 -pubk /home/kaushendra/secure_test/public.pem -prvk /home/kaushendra/secure_test/private.pem -pwd seed -a 2 -o /home/kaushendra/Board_Test/u-boot-stm32mp157a-av96-trusted-signed.stm325 Image Programming
flash the SD-card plugged into PC
FSBL:
sudo dd if=tf-a-stm32mp157a-av96-trusted-signed.stm32 of=/dev/sdb1 bs=1M conv=fdatasync status=progress && sync
sudo dd if=tf-a-stm32mp157a-av96-trusted-signed.stm32 of=/dev/sdb2 bs=1M conv=fdatasync status=progress && sync
SSBL:
sudo dd if=u-boot-stm32mp157a-av96-trusted-signed.stm32 of=/dev/sdb3 bs=1M conv=fdatasync status=progress && syncAfter that when Plug the SD-card into board, i receive the above provided error log.
Please help me debugging the issue,or which step i just went wrong.
Regards,
kaushendra sah
