cancel
Showing results for 
Search instead for 
Did you mean: 

BL2 image load error

allard
Senior

I'm having some trouble booting my custom board containing a STM32MP157F. I'm able to program everything using STM32CubeProgrammer, but i'm not able to boot:

WARNING: Firmware Image Package header check failed.
WARNING: Failed to obtain reference to image id=2 (-2)
ERROR: BL2: Failed to load image id 2 (-2)

If I'm right image id 2 is HW_CONFIG. What worries me are the following lines in the log:

partitions on mmc1: Writing GPT: success!
done
Erasing fip-b on mmc 1:

Caution! Your devices Erase group is 0x300
The erase range would be change to 0x2c00~0x4bff

done
Erasing u-boot-env on mmc 1:

Caution! Your devices Erase group is 0x300
The erase range would be change to 0x4c00~0x4fff

Could this be the reason why image 2 won't load? Some kind of eMMC alignment issue?

The whole log is attached.

3 REPLIES 3
allard
Senior

In addition:

The device does boot when I program everything using STM32CubeProgrammer, and then type ctrl-c + 'run bootcmd_mmc1' in the u-boot console. But when I give a POR, the error occurs.

allard
Senior

Able to get rid of the

Caution! Your devices Erase group is 0x300

messages by settings the following in my machine:

 

DEVICE_ALIGNMENT_SIZE:EMMC = "0x00180000"
DEVICE_START_OFFSET:EMMC = "0x00180000"

 

But the BL2 error is still there.This is the output of fiptool info:

Secure Payload BL32 (Trusted OS): offset=0x128, size=0x1C, cmdline="--tos-fw"
Secure Payload BL32 Extra1 (Trusted OS Extra1): offset=0x144, size=0x30B68, cmdline="--tos-fw-extra1"
Non-Trusted Firmware BL33: offset=0x30CAC, size=0xF5D3C, cmdline="--nt-fw"
FW_CONFIG: offset=0x1269E8, size=0x1EA, cmdline="--fw-config"
HW_CONFIG: offset=0x126BD2, size=0x171E0, cmdline="--hw-config"

 

Anyone any clues?

allard
Senior

Bump