MCU Boot for secondary slot, fw_validation_info magic

Hello,

I'm using a combination of B0 and MCU Boot.

I want to build MCU Boot for secondary slot to try upgrading it.

I pass CONFIG_BUILD_S1_VARIANT=y to the build system and it produces the following .elf files in the build/mcuboot:

/build/mcuboot/zephyr/zephyr_prebuilt.elf
./build/mcuboot/zephyr/s1_image_prebuilt.elf
./build/mcuboot/zephyr/zephyr.elf
./build/mcuboot/zephyr/s1_image.elf

As I understand, the last file, s1_image.elf, is the image that should be written to the secondary slot. If I write it there, B0 sees it, but fails to verify: "Could not find valid firmware validation info". Note, I build mcuboot for slot 1 with version which is bigger than that of the mcuboot in slot 0, so B0 tries to boot it first.

Indeed, magic array in the fw_validation_info contains 0xFFFFFFFF instead of expected 0x281ee6de, 0x86518483, 0x00013502.

At what stage is this validation magic code written?
Is it done via validation_data.py?

What is the correct way to generate mcuboot image for slot 1?

Thanks

Parents
  • Hi,

    Could you please list the files generated in the build\zephyr folder ? 

    Do you have the .bin file ? I'm not sure why you use the .elf file here. Have you tried the merged.hex file ? 

    Did you compile only the MCUBoot for slot1 or you built the application with the CONFIG_BUILD_S1_VARIANT=y ? 

    Could you show how you test and verify the image ? 

Reply
  • Hi,

    Could you please list the files generated in the build\zephyr folder ? 

    Do you have the .bin file ? I'm not sure why you use the .elf file here. Have you tried the merged.hex file ? 

    Did you compile only the MCUBoot for slot1 or you built the application with the CONFIG_BUILD_S1_VARIANT=y ? 

    Could you show how you test and verify the image ? 

Children
No Data
Related