Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Nave-k
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey Everyone,
I'm using MCUBoot example on STM32H573I-DK board. Basically I have application on 0x08010000. Bootloader doesn't jump to application. I'm getting the following message in serial monitor.
***** Booting MCUboot v2.1.0-rc1-184-ga2bc982b3379 ***
*** Using Zephyr OS build v4.2.0-802-g00e217da7d84 ***
I: Starting bootloader
W: Failed reading sectors; BOOT_MAX_IMG_SECTORS=512 - too small?
E: Image in the primary slot is not valid!
E: Unable to find bootable image
I've also dissected the image signed by the imgtool, Here are few parameters
Image header (offset: 0x0)
magic: 0x96f3b83d
load_addr: 0x0
hdr_size: 0x400
protected_tlv_size: 0x0
img_size: 0xc19c
flags: 0x0
version: 0.0.0+0
############################################################
Payload (offset: 0x400)
| |
| FW image (size: 0xc19c Bytes) |
| |
############################################################
TLV area (offset: 0xc59c)
magic: 0x6907
area size: 0x150
---------------------------------------------
type: SHA256 (0x10)
len: 0x20
data: 0xa0 0x13 0x68 0x7e 0x3d 0x6d 0x0f 0x34
0x5d 0xa3 0xaa 0x0a 0x5f 0x20 0xca 0x09
0xfa 0xa6 0x76 0x09 0x83 0x27 0x1d 0xc8
0xfe 0x50 0x6d 0x0b 0x2b 0x8d 0x86 0x1d
---------------------------------------------
type: KEYHASH (0x1)
len: 0x20
data: 0x94 0x0c 0xbc 0x91 0x33 0xa2 0x15 0x33
0xe5 0xc2 0xd6 0x15 0x99 0x3e 0x77 0x79
0x05 0x6a 0xbe 0x64 0x42 0x16 0xa4 0x12
0x3e 0x29 0x82 0x2c 0x6c 0xc0 0xa9 0x27
---------------------------------------------
type: RSA2048 (0x20)
len: 0x100
data: 0x47 0xa1 0xf8 0x0d 0xe4 0xf3 0x89 0xcc
0xab 0x50 0xe7 0xdb 0xb9 0xd8 0x88 0x1d
0xd8 0x8a 0xb9 0x57 0xa9 0x7d 0x65 0xbb
0x89 0xea 0xec 0x6a 0x62 0x0f 0x17 0xa6
0xf9 0x91 0x43 0x34 0x19 0x07 0xd8 0x7d
0x06 0x80 0x8f 0xe2 0xa0 0xf5 0xf0 0x06
0x39 0xf8 0x7e 0xd7 0xce 0x72 0x69 0x91
0x64 0x99 0x85 0x38 0x38 0xc6 0x41 0xd5
0xd2 0xd9 0xca 0xc1 0x5e 0xea 0x35 0x4d
0x50 0x59 0xb9 0x8e 0x72 0x1e 0x24 0x7f
0x9f 0xce 0x8a 0xde 0x38 0x99 0x98 0x6b
0x26 0x16 0x90 0x69 0x52 0xe4 0xfd 0x87
0x8a 0x0e 0xb0 0x46 0xf0 0x61 0xe5 0x66
0x1d 0x6a 0x80 0xd7 0xa9 0x29 0xaf 0x53
0x2d 0x79 0xd8 0x51 0xb6 0xd7 0x16 0x34
0xd6 0x63 0xd6 0xd3 0xb5 0xc2 0x7a 0x8d
0x90 0xb9 0x27 0x07 0x70 0x4f 0x3a 0x6a
0xe8 0xbc 0xa1 0x2f 0x9a 0xcb 0xee 0xcd
0x99 0x9c 0x66 0xfb 0xde 0xf5 0xc0 0xaf
0x06 0xe6 0xc7 0x30 0x24 0x99 0x0b 0xfb
0x79 0xd1 0x16 0x25 0xab 0x9e 0x7c 0x8a
0x61 0x96 0x81 0xd6 0xcb 0x23 0x7d 0xf7
0x21 0x59 0x6e 0x9c 0x20 0xf1 0xd5 0xc8
0x80 0x13 0xc8 0x43 0xab 0xc3 0xb0 0x27
0x02 0x59 0xe1 0x79 0x36 0x02 0x14 0xc6
0x8e 0x43 0x6a 0x5e 0x46 0xcb 0x81 0x0a
0xc6 0xff 0x94 0x3d 0x37 0xfd 0x6b 0x1e
0x02 0x92 0x6e 0x93 0x3d 0xab 0x87 0x24
0xb0 0x61 0x3b 0xb2 0x55 0xb9 0x02 0x20
0x48 0xfa 0xbb 0x98 0x08 0x75 0x7c 0xda
0xaa 0xce 0x1c 0xf6 0x39 0x1b 0xe2 0x49
0x0b 0x56 0xe7 0xf1 0x8b 0x95 0x00 0x23
############################################################
End of Image
why is the field protected_tlv_size 0x0, Is it something to do with signing part?
Application partition that was added to stm32h573i_dk.dts is
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
};
Application prj.conf is,
CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_LOG_BACKEND_UART=y
CONFIG_PRINTK=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_IDLE_STACK_SIZE=1024
CONFIG_ISR_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_BOOT_BANNER=y
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="bootloader/mcuboot/mykey.pem"
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
MCUBoot Prj.conf is,
CONFIG_PM=n
CONFIG_MAIN_STACK_SIZE=10240
#CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h"
CONFIG_BOOT_SWAP_SAVE_ENCTLV=n
CONFIG_BOOT_ENCRYPT_IMAGE=n
CONFIG_BOOT_UPGRADE_ONLY=n
CONFIG_BOOT_BOOTSTRAP=y
CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
CONFIG_BOOT_VALIDATE_SLOT0=y
CONFIG_FLASH=y
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_LOG_DEFAULT_LEVEL=0
CONFIG_MCUBOOT_LOG_LEVEL_INF=y
CONFIG_CBPRINTF_NANO=y
CONFIG_MINIMAL_LIBC=y
CONFIG_BOOT_SWAP_USING_MOVE=y
CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
CONFIG_BOOT_SIGNATURE_KEY_FILE="mykey.pem"
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_CLEANUP_ARM_CORE=y
CONFIG_BOOT_MAX_IMG_SECTORS_AUTO=n
CONFIG_BOOT_MAX_IMG_SECTORS=512
MCUBoot app.overlay device tree file is,
/ {
chosen {
zephyr,code-partition = &boot_partition;
};
};
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
};
I'm fairly new to zephyr. It would be great if some one help me out here
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions