diff --git a/bsp/CMakeLists.txt b/bsp/CMakeLists.txt index 535f9175..519314e5 100644 --- a/bsp/CMakeLists.txt +++ b/bsp/CMakeLists.txt @@ -23,26 +23,15 @@ set(arm_corstone_platform_bsp_SOURCE_DIR "Path to Arm Corstone-3xx Platform CMSIS-Driver Based Board Support Package source code" ) -execute_process(COMMAND git am --abort - COMMAND git am ${CMAKE_CURRENT_LIST_DIR}/patches/0001-corstone300-Add-missing-FVP-VSI-handlers.patch - WORKING_DIRECTORY ${arm_corstone_platform_bsp_SOURCE_DIR} - OUTPUT_QUIET - ERROR_QUIET -) - -execute_process(COMMAND git am --abort - COMMAND git am ${CMAKE_CURRENT_LIST_DIR}/patches/0002-platform-irq-Add-VSI-IRQ-numbers-for-CS300-and-CS310.patch - WORKING_DIRECTORY ${arm_corstone_platform_bsp_SOURCE_DIR} - OUTPUT_QUIET - ERROR_QUIET -) +include(ApplyPatches) -execute_process(COMMAND git am --abort - COMMAND git am ${CMAKE_CURRENT_LIST_DIR}/patches/0003-bsp-Add-CMSIS-Driver-implementation-for-VSI.patch - WORKING_DIRECTORY ${arm_corstone_platform_bsp_SOURCE_DIR} - OUTPUT_QUIET - ERROR_QUIET +set(PATCH_FILES_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/patches") +set(PATCH_FILES + "${PATCH_FILES_DIRECTORY}/0001-corstone300-Add-missing-FVP-VSI-handlers.patch" + "${PATCH_FILES_DIRECTORY}/0002-platform-irq-Add-VSI-IRQ-numbers-for-CS300-and-CS310.patch" + "${PATCH_FILES_DIRECTORY}/0003-bsp-Add-CMSIS-Driver-implementation-for-VSI.patch" ) +iot_reference_arm_corstone3xx_apply_patches("${arm_corstone_platform_bsp_SOURCE_DIR}" "${PATCH_FILES}") add_subdirectory(library) diff --git a/components/security/freertos_ota_pal_psa/CMakeLists.txt b/components/security/freertos_ota_pal_psa/CMakeLists.txt index 7c20a3a2..92dbdaec 100644 --- a/components/security/freertos_ota_pal_psa/CMakeLists.txt +++ b/components/security/freertos_ota_pal_psa/CMakeLists.txt @@ -8,11 +8,12 @@ set(freertos_ota_pal_psa_SOURCE_DIR "Path to FreeRTOS OTA PAL based on PSA API source code" ) -execute_process(COMMAND git am --abort - COMMAND git am ${CMAKE_CURRENT_LIST_DIR}/integration/patches/0001-ota-abort-Fix-successful-abortion-check.patch - WORKING_DIRECTORY ${freertos_ota_pal_psa_SOURCE_DIR} - OUTPUT_QUIET - ERROR_QUIET +include(ApplyPatches) + +set(PATCH_FILES_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/integration/patches") +set(PATCH_FILES + "${PATCH_FILES_DIRECTORY}/0001-ota-abort-Fix-successful-abortion-check.patch" ) +iot_reference_arm_corstone3xx_apply_patches("${freertos_ota_pal_psa_SOURCE_DIR}" "${PATCH_FILES}") add_subdirectory(integration) diff --git a/components/security/freertos_pkcs11_psa/CMakeLists.txt b/components/security/freertos_pkcs11_psa/CMakeLists.txt index d41aadde..d768b9ab 100644 --- a/components/security/freertos_pkcs11_psa/CMakeLists.txt +++ b/components/security/freertos_pkcs11_psa/CMakeLists.txt @@ -8,11 +8,12 @@ set(freertos_pkcs11_psa_SOURCE_DIR "Path to FreeRTOS PKCS#11 to PSA shim layer source code" ) -execute_process(COMMAND git am --abort - COMMAND git am ${CMAKE_CURRENT_LIST_DIR}/integration/patches/0001-build-Update-mbedtls-version.patch - WORKING_DIRECTORY ${freertos_pkcs11_psa_SOURCE_DIR} - OUTPUT_QUIET - ERROR_QUIET +include(ApplyPatches) + +set(PATCH_FILES_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/integration/patches") +set(PATCH_FILES + "${PATCH_FILES_DIRECTORY}/0001-build-Update-mbedtls-version.patch" ) +iot_reference_arm_corstone3xx_apply_patches("${freertos_pkcs11_psa_SOURCE_DIR}" "${PATCH_FILES}") add_subdirectory(integration) diff --git a/release_changes/202402140941.change b/release_changes/202402140941.change new file mode 100644 index 00000000..1ff7e859 --- /dev/null +++ b/release_changes/202402140941.change @@ -0,0 +1 @@ +patches: Unify the way of applying patches.