Skip to content

Commit

Permalink
patches: Unify the way of applying patches
Browse files Browse the repository at this point in the history
All the components across the project should use
the `iot_reference_arm_corstone3xx_apply_patches`
function to apply patches which in turn improves
consistency. For more information,
please refer to the commit with SHA:
fa76f06

Signed-off-by: Ahmed Ismail <[email protected]>
  • Loading branch information
AhmedIsmail02 committed Feb 20, 2024
1 parent 32ea1a0 commit 53186a1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 28 deletions.
25 changes: 7 additions & 18 deletions bsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
11 changes: 6 additions & 5 deletions components/security/freertos_ota_pal_psa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
11 changes: 6 additions & 5 deletions components/security/freertos_pkcs11_psa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions release_changes/202402140941.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patches: Unify the way of applying patches.

0 comments on commit 53186a1

Please sign in to comment.