zephyr/modules/Kconfig.mcuboot_bootutil
Andrzej Puzdrowski 049dac2a8a modules: introduce MCUBOOT_BOOTUTIL module
Some parts of subsys/dfu/boot code are re-implementations of
what is implemented in the MCUBoot repository.

Mcuboot's repository already provide implementation of function
required for application for interact with the MCUboot.

This patch introduces new MCUBOOT_BOOTUTIL module which covers
common code which is used in the bootloader and the chainnloaded
application.

dfu/boot: use MCUBoot's source code

Module was reworked so it start using MCUBoot's
bootutil_public API instead of copied code.

Reworked boot_is_img_confirmed() used MCUBoot's API
for determine image_ok flag.

mcuboot_shell switchd to use MCUboot's boot_read_swap_state_by_id()
This is MCUBoot function, use it for avoid linking conflict.

test/subsys/mcuboot: fix `test_write_confirm`

dfu/boot library was reworked so it uses MCUboot's bootutil_public
library whenever it can.
The library required that image was marked as copy-done before it
can be pending.
This patch adds such mark which fixes the test.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-01-14 18:03:38 +01:00

25 lines
623 B
Plaintext

# Copyright (c) 2020 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
menuconfig MCUBOOT_BOOTUTIL_LIB
bool "MCUboot utility library"
help
Enable MCUboot utility library which implements functions
required by the chain-loaded application and the MCUboot.
if MCUBOOT_BOOTUTIL_LIB
# hiden option for disabling module-own log configuration
# while building MCUboot bootloader
config MCUBOOT_BOOTUTIL_LIB_OWN_LOG
bool
default y
if MCUBOOT_BOOTUTIL_LIB_OWN_LOG
module = MCUBOOT_UTIL
module-str = MCUboot bootutil
source "subsys/logging/Kconfig.template.log_config"
endif
endif # MCUBOOT_BOOTUTIL_LIB