Skip to content

mcuboot serial recovery wholly broken for single slot modes #2360

@nordicjm

Description

@nordicjm

The recent fix for image state null introduced code that calls various functions like boot_open_all_flash_areas which are added in loader.c, however, there's a bunch of MCUboot modes that do not use this file e.g. single slot, single ram load mode so when you configure MCUboot in one of these mode with serial recovery mode, you get the following:

/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/libzephyr.a(boot_serial.c.obj): in function `bs_list_set':
/tmp/cc/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c:657: undefined reference to `boot_state_clear'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /tmp/cc/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c:659: undefined reference to `boot_open_all_flash_areas'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /tmp/cc/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c:670: undefined reference to `boot_read_sectors'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /tmp/cc/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c:691: undefined reference to `boot_close_all_flash_areas'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /tmp/cc/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c:691: undefined reference to `boot_close_all_flash_areas'
/opt/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /tmp/cc/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c:691: undefined reference to `boot_close_all_flash_areas'
collect2: error: ld returned 1 exit status

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions