Skip to content

Commit 298a35b

Browse files
nordicjmdkalowsk
authored andcommitted
modules: tf-m: Remove some download Kconfigs
Removes two Kconfig which seemed to indicate downloading of a project would happen automatically, which does not abide by how to get additional module code in Zephyr. Due to TF-M always setting these to "DOWNLOAD" in the repo, they are set even if the modules do not exist so that they do not download e.g. in CI. Unfortunately it seems that the qcbor one cannot be removed at this time due to being needed in some applications and is not apache licensed, though instructions should be provided to users instead describing how to add it to a module manifest instead, in a later task Signed-off-by: Jamie McCrae <[email protected]>
1 parent 514d7e2 commit 298a35b

File tree

2 files changed

+4
-44
lines changed

2 files changed

+4
-44
lines changed

modules/trusted-firmware-m/CMakeLists.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ if (CONFIG_BUILD_WITH_TFM)
6767
list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_KEY_${SUFFIX}=${CONFIG_TFM_KEY_FILE_${SUFFIX}})
6868
endforeach()
6969

70+
# Supply path to MCUboot for TF-M build
71+
list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_PATH=${ZEPHYR_MCUBOOT_MODULE_DIR})
7072
else()
7173
list(APPEND TFM_CMAKE_ARGS -DBL2=FALSE)
7274
endif()
@@ -256,11 +258,6 @@ if (CONFIG_BUILD_WITH_TFM)
256258
list(APPEND TFM_CMAKE_ARGS -DHAL_ADI_PATH=${ZEPHYR_ADI_MODULE_DIR})
257259
endif()
258260

259-
if(CONFIG_TFM_BL2 AND CONFIG_TFM_MCUBOOT_PATH_LOCAL)
260-
# Supply path to MCUboot for TF-M build
261-
list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_PATH=${ZEPHYR_MCUBOOT_MODULE_DIR})
262-
endif()
263-
264261
if(CONFIG_TFM_MCUBOOT_DATA_SHARING)
265262
list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_DATA_SHARING=ON)
266263
endif()
@@ -277,8 +274,8 @@ if (CONFIG_BUILD_WITH_TFM)
277274

278275
list(APPEND TFM_CMAKE_ARGS -DTFM_TESTS_REVISION_CHECKS=OFF)
279276

280-
if(CONFIG_TFM_ETHOS_DRIVER_PATH_LOCAL)
281-
list(APPEND TFM_CMAKE_ARGS -DETHOS_DRIVER_PATH=${CONFIG_TFM_ETHOS_DRIVER_PATH_LOCAL})
277+
if(CONFIG_SOC_SERIES_MPS3 OR CONFIG_SOC_SERIES_MPS4)
278+
list(APPEND TFM_CMAKE_ARGS -DETHOS_DRIVER_PATH=${ZEPHYR_HAL_ETHOS_U_MODULE_DIR})
282279
endif()
283280

284281
if(CONFIG_TFM_STM32_FLASH_LAYOUT_BEGIN_OFFSET)

modules/trusted-firmware-m/Kconfig.tfm

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -310,43 +310,6 @@ config TFM_MCUBOOT_IMAGE_NUMBER
310310
updated in one atomic operation. When this is 2, they are split and
311311
can be updated independently if dependency requirements are met.
312312

313-
choice TFM_MCUBOOT_PATH
314-
prompt "Path to MCUboot or DOWNLOAD to fetch automatically"
315-
default TFM_MCUBOOT_PATH_LOCAL
316-
help
317-
Path to MCUboot for TF-M builds. The default option
318-
is to use Zephyr's MCUboot module. As an alternative,
319-
users may switch to the 'download' version; in that
320-
case MCUboot will be fetched by the TF-M build during
321-
build time. The default option ensures that Zephyr builds
322-
with TF-M do not fetch external trees.
323-
324-
config TFM_MCUBOOT_PATH_LOCAL
325-
bool "TF-M to use Zephyr's MCUboot"
326-
help
327-
TF-M builds with BL2 will use the Zephyr's MCUboot version,
328-
which is present in the MCUboot module.
329-
330-
config TFM_MCUBOOT_PATH_DOWNLOAD
331-
bool "TF-M to automatically download MCUboot during build"
332-
help
333-
TF-M builds with BL2 will let the TF-M build to automatically
334-
fetch and check-out the MCUboot version to use in the build.
335-
336-
endchoice
337-
338-
config TFM_ETHOS_DRIVER_PATH_LOCAL
339-
string "Path to a locally available Ethos-U driver or an empty string"
340-
depends on SOC_SERIES_MPS3 || SOC_SERIES_MPS4
341-
default "$(ZEPHYR_HAL_ETHOS_U_MODULE_DIR)"
342-
help
343-
Path to a locally available Ethos-U driver to be used for TF-M builds or
344-
an empty string to allow TF-M to automatically fetch the Ethos-U
345-
driver from an external repository at build time.
346-
By default Zephyr's Ethos-U driver will be used. It is present in
347-
the hal_ethos_u module.
348-
Alternatively, applications can point to their own paths for Ethos-U driver.
349-
350313
config TFM_QCBOR_PATH
351314
string
352315
prompt "Path to QCBOR or DOWNLOAD to fetch automatically"

0 commit comments

Comments
 (0)