File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -768,12 +768,18 @@ void RAMFUNCTION wolfBoot_update_trigger(void)
768768 /* Set the IMG_STATE_UPDATING flag and
769769 * the trailer magic in cache before committing to flash
770770 */
771+ #ifndef FLAGS_HOME
771772 offset = WOLFBOOT_SECTOR_SIZE - (sizeof (uint32_t ) + 1 );
772- #ifdef FLAGS_HOME
773+ #else
773774 /* If flags are stored in BOOT partition, take into account the offset
774775 * of the flags used for the update partition too, to avoid erasing the
775776 * sector.
776777 */
778+ #ifdef EXT_ENCRYPTED
779+ offset = WOLFBOOT_SECTOR_SIZE - TRAILER_OVERHEAD ;
780+ #else
781+ offset = WOLFBOOT_SECTOR_SIZE - (sizeof (uint32_t ) + 1 );
782+ #endif
777783 offset -= (PART_BOOT_ENDFLAGS - PART_UPDATE_ENDFLAGS );
778784#endif
779785 NVM_CACHE [offset ] = st ;
You can’t perform that action at this time.
0 commit comments