Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zephyr: Fix sysflash and undefined function warning #1875

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions boot/zephyr/firmware_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ boot_image_validate(const struct flash_area *fa_p,
}
#endif /* MCUBOOT_VALIDATE_PRIMARY_SLOT || MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE*/

#if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE)
inline static fih_ret
boot_image_validate_once(const struct flash_area *fa_p,
struct image_header *hdr)
Expand Down Expand Up @@ -92,6 +93,7 @@ boot_image_validate_once(const struct flash_area *fa_p,
}
FIH_RET(FIH_SUCCESS);
}
#endif

/**
* Validates that an image in a slot is OK to boot.
Expand Down
4 changes: 2 additions & 2 deletions boot/zephyr/include/sysflash/sysflash.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <zephyr/storage/flash_map.h>
#include <zephyr/sys/util_macro.h>

#ifndef CONFIG_SINGLE_APPLICATION_SLOT
#if !defined(CONFIG_SINGLE_APPLICATION_SLOT) && !defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP)

/* Each pair of slots is separated by , and there is no terminating character */
#define FLASH_AREA_IMAGE_0_SLOTS slot0_partition, slot1_partition
Expand Down Expand Up @@ -50,7 +50,7 @@ static inline uint32_t __flash_area_ids_for_slot(int img, int slot)
#define FLASH_AREA_IMAGE_SCRATCH FIXED_PARTITION_ID(scratch_partition)
#endif

#else /* CONFIG_SINGLE_APPLICATION_SLOT */
#else /* !CONFIG_SINGLE_APPLICATION_SLOT && !CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP */

#define FLASH_AREA_IMAGE_PRIMARY(x) FIXED_PARTITION_ID(slot0_partition)
#define FLASH_AREA_IMAGE_SECONDARY(x) FIXED_PARTITION_ID(slot0_partition)
Expand Down
2 changes: 2 additions & 0 deletions boot/zephyr/single_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ boot_image_validate(const struct flash_area *fa_p,
}
#endif /* MCUBOOT_VALIDATE_PRIMARY_SLOT || MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE*/

#if defined(MCUBOOT_VALIDATE_PRIMARY_SLOT_ONCE)
inline static fih_ret
boot_image_validate_once(const struct flash_area *fa_p,
struct image_header *hdr)
Expand Down Expand Up @@ -88,6 +89,7 @@ boot_image_validate_once(const struct flash_area *fa_p,
}
FIH_RET(FIH_SUCCESS);
}
#endif

/**
* Gather information on image and prepare for booting.
Expand Down
Loading