Skip to content

Commit ac37fb2

Browse files
boot: zephyr: Move zephyr sources 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. 2. Further verified that the following testcases still pass with mcuboot options on twister: mcuboot/boot/zephyr zephyr/tests/subsys/dfu zephyr/samples/subsys/mgmt/mcumgr/smp_svr Resolve #1410 Signed-off-by: Gregory SHUE <[email protected]>
1 parent 3ad1049 commit ac37fb2

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
@@ -43,28 +43,28 @@ endif()
4343

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

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

5959
if(DEFINED CONFIG_ENABLE_MGMT_PERUSER)
6060
zephyr_library_sources(
61-
${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/boot_serial_extensions.c
61+
boot_serial_extensions.c
6262
)
6363
endif()
6464

6565
if(NOT DEFINED CONFIG_FLASH_PAGE_LAYOUT)
6666
zephyr_library_sources(
67-
${ZEPHYR_MCUBOOT_MODULE_DIR}/boot/zephyr/flash_map_legacy.c
67+
flash_map_legacy.c
6868
)
6969
endif()
7070

@@ -89,7 +89,7 @@ endif()
8989

9090
if(CONFIG_SINGLE_APPLICATION_SLOT)
9191
zephyr_library_sources(
92-
${BOOT_DIR}/zephyr/single_loader.c
92+
single_loader.c
9393
)
9494
zephyr_library_include_directories(${BOOT_DIR}/bootutil/src)
9595
else()
@@ -208,7 +208,7 @@ if(CONFIG_BOOT_ENCRYPT_EC256)
208208
endif()
209209

210210
if(CONFIG_MCUBOOT_SERIAL)
211-
zephyr_sources(${BOOT_DIR}/zephyr/serial_adapter.c)
211+
zephyr_sources(serial_adapter.c)
212212
zephyr_sources(${BOOT_DIR}/boot_serial/src/boot_serial.c)
213213
zephyr_sources(${BOOT_DIR}/boot_serial/src/serial_recovery_cbor.c)
214214
zephyr_sources(${BOOT_DIR}/boot_serial/src/zcbor_decode.c)
@@ -229,6 +229,6 @@ endif()
229229

230230
if(CONFIG_MCUBOOT_CLEANUP_ARM_CORE)
231231
zephyr_library_sources(
232-
${BOOT_DIR}/zephyr/arm_cleanup.c
232+
arm_cleanup.c
233233
)
234234
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)