Skip to content

Commit 932aa0e

Browse files
Relocate port source to zephyr/subsys/mcuboot_svc
Relocate `$mcuboot/boot/zephyr/*.c` files to `$mcuboot/zephyr/subsys/mcuboot_svc/` to become a reusable subsystem. NOTE: keys.c was not put into `mcuboot_svc` as this will need to be project-specific and may need to be kept in a different module. Verified by: 1. Building `$mcuboot/boot/zephyr` and verifying the zephyr.map files showed the same functions and that the flash an ram usage was the same. Signed-off-by: Gregory SHUE <[email protected]>
1 parent 53ce277 commit 932aa0e

File tree

10 files changed

+9
-9
lines changed

10 files changed

+9
-9
lines changed

zephyr/subsys/mcuboot_svc/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,28 @@ endif()
4242

4343
zephyr_library_include_directories(
4444
${ZEPHYR_MCUBOOT_MODULE_DIR}/zephyr/include
45-
${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/targets
45+
targets
4646
)
4747
if(EXISTS targets/${BOARD}.h)
4848
zephyr_library_compile_definitions(MCUBOOT_TARGET_CONFIG="${BOARD}.h")
4949
endif()
5050

5151
# Zephyr port-specific sources.
5252
zephyr_library_sources(
53-
${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/main.c
54-
${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/flash_map_extended.c
55-
${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/os.c
53+
main.c
54+
flash_map_extended.c
55+
os.c
5656
)
5757

5858
if(DEFINED CONFIG_ENABLE_MGMT_PERUSER)
5959
zephyr_library_sources(
60-
${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/boot_serial_extensions.c
60+
boot_serial_extensions.c
6161
)
6262
endif()
6363

6464
if(NOT DEFINED CONFIG_FLASH_PAGE_LAYOUT)
6565
zephyr_library_sources(
66-
${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/flash_map_legacy.c
66+
flash_map_legacy.c
6767
)
6868
endif()
6969

@@ -88,7 +88,7 @@ endif()
8888

8989
if(CONFIG_SINGLE_APPLICATION_SLOT)
9090
zephyr_library_sources(
91-
${BOOT_DIR}/zephyr/single_loader.c
91+
single_loader.c
9292
)
9393
zephyr_library_include_directories(${BOOT_DIR}/bootutil/src)
9494
else()
@@ -207,7 +207,7 @@ if(CONFIG_BOOT_ENCRYPT_EC256)
207207
endif()
208208

209209
if(CONFIG_MCUBOOT_SERIAL)
210-
zephyr_sources(${BOOT_DIR}/zephyr/serial_adapter.c)
210+
zephyr_sources(serial_adapter.c)
211211
zephyr_sources(${BOOT_DIR}/boot_serial/src/boot_serial.c)
212212
zephyr_sources(${BOOT_DIR}/boot_serial/src/serial_recovery_cbor.c)
213213
zephyr_sources(${BOOT_DIR}/boot_serial/src/zcbor_decode.c)
@@ -228,6 +228,6 @@ endif()
228228

229229
if(CONFIG_MCUBOOT_CLEANUP_ARM_CORE)
230230
zephyr_library_sources(
231-
${BOOT_DIR}/zephyr/arm_cleanup.c
231+
arm_cleanup.c
232232
)
233233
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)