Hi,
I am using nrf toolchain v2.0.0, and am testing the dfu-ota example over BLE by following the below link ( ) . howveer for fast boot up, i am using "
CONFIG_BOOT_VALIDATE_SLOT0_ONCE=y" this macro , which is available in mcuboot_config.h file. but it has some dependencies on
BOOT_VALIDATE_SLOT0 && SINGLE_APPLICATION_SLOT.
here what do we meant by "SINGLE_APPLICATION_SLOT"
config BOOT_VALIDATE_SLOT0_ONCE bool "Validate image in the primary slot just once after after upgrade" depends on !BOOT_VALIDATE_SLOT0 && SINGLE_APPLICATION_SLOT default n help If y, the bootloader attempts to validate the signature of the primary slot only once after an upgrade of the main slot. It caches the result in the magic area, which makes it an unsecure method. This option is usefull for lowering the boot up time for low end devices with as a compromise lowering the security level. If unsure, leave at the default value.
So , if i want to use this macro i need to say
CONFIG_BOOT_VALIDATE_SLOT0=n and CONFIG_SINGLE_APPLICATION_SLOT=y .
so my question here is,
1. if i enable this CONFIG_SINGLE_APPLICATION_SLOT=y , am getting below error
D:\Nordic\v2.0.0\nrf\include\flash_map_pm.h:30:22: error: 'PM_mcuboot_secondary_ID' undeclared (first use in this function); did you mean 'PM_mcuboot_primary_ID'? 30 | #define PM_ID(label) PM_##label##_ID | ^~~ D:\Nordic\v2.0.0\nrf\include\flash_map_pm.h:35:30: note: in expansion of macro 'PM_ID' 35 | #define FLASH_AREA_ID(label) PM_ID(label) | ^~~~~ D:\Nordic\v2.0.0\zephyr\subsys\mgmt\mcumgr\lib\cmd\img_mgmt\src\zephyr_img_mgmt.c:134:11: note: in expansion of macro 'FLASH_AREA_ID' 134 | fa_id = FLASH_AREA_ID(image_1); | ^~~~~~~~~~~~~ D:\Nordic\v2.0.0\nrf\include\flash_map_pm.h:30:22: note: each undeclared identifier is reported only once for each function it appears in 30 | #define PM_ID(label) PM_##label##_ID | ^~~ D:\Nordic\v2.0.0\nrf\include\flash_map_pm.h:35:30: note: in expansion of macro 'PM_ID' 35 | #define FLASH_AREA_ID(label) PM_ID(label) | ^~~~~ D:\Nordic\v2.0.0\zephyr\subsys\mgmt\mcumgr\lib\cmd\img_mgmt\src\zephyr_img_mgmt.c:134:11: note: in expansion of macro 'FLASH_AREA_ID' 134 | fa_id = FLASH_AREA_ID(image_1); | ^~~~~~~~~~~~~ [200/267] Building C object zephyr/drivers/clock_control/CMakeFiles/drivers__clock_control.dir/clock_control_nrf.c.obj ninja: build stopped: subcommand failed.
Kindly suggest , what to be done here .
2. if i say CONFIG_SINGLE_APPLICATION_SLOT=n or if i removed that am getting below warnig
warning: BOOT_VALIDATE_SLOT0_ONCE (defined at D:\Nordic\v2.0.0\bootloader\mcuboot\boot\zephyr\Kconfig:187) was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies: SINGLE_APPLICATION_SLOT (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BOOT_VALIDATE_SLOT0_ONCE and/or look up BOOT_VALIDATE_SLOT0_ONCE in the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
from the above warning , does that mean it is ignoring the changes while building i.e CONFIG_BOOT_VALIDATE_SLOT0_ONCE=y. because of unsatisfied dependencies.
Note - i don't want to validate my image each and every boot up . it needs to be validate only once after the upgrade of the image.
Regards,
Shikamaru