Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 1 | ifneq ($O,) |
| 2 | out-dir := $O |
| 3 | else |
| 4 | # If no build folder has been specified, then create all build files in |
| 5 | # the current directory under a folder named out. |
| 6 | out-dir := $(CURDIR)/out |
| 7 | endif |
| 8 | |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 9 | -include $(TA_DEV_KIT_DIR)/host_include/conf.mk |
Cedric Chaumont | 1390f3a | 2015-08-31 13:55:16 +0200 | [diff] [blame] | 10 | |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 11 | ifneq ($V,1) |
| 12 | q := @ |
Jerome Forissier | 2a1ef2c | 2016-06-15 11:07:27 +0200 | [diff] [blame] | 13 | echo := @echo |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 14 | else |
| 15 | q := |
Jerome Forissier | 2a1ef2c | 2016-06-15 11:07:27 +0200 | [diff] [blame] | 16 | echo := @: |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 17 | endif |
| 18 | |
| 19 | .PHONY: all |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 20 | ifneq ($(wildcard $(TA_DEV_KIT_DIR)/host_include/conf.mk),) |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 21 | all: xtest ta |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 22 | else |
| 23 | all: |
| 24 | $(q)echo "TA_DEV_KIT_DIR is not correctly defined" && false |
| 25 | endif |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 26 | |
| 27 | .PHONY: xtest |
| 28 | xtest: |
| 29 | $(q)$(MAKE) -C host/xtest CROSS_COMPILE="$(CROSS_COMPILE_HOST)" \ |
Sumit Garg | 0e00914 | 2015-11-04 15:34:07 -0500 | [diff] [blame] | 30 | --no-builtin-variables \ |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 31 | q=$(q) \ |
| 32 | O=$(out-dir)/xtest \ |
| 33 | $@ |
| 34 | |
| 35 | .PHONY: ta |
| 36 | ta: |
| 37 | $(q)$(MAKE) -C ta CROSS_COMPILE="$(CROSS_COMPILE_TA)" \ |
| 38 | q=$(q) \ |
| 39 | O=$(out-dir)/ta \ |
| 40 | $@ |
| 41 | |
| 42 | .PHONY: clean |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 43 | ifneq ($(wildcard $(TA_DEV_KIT_DIR)/host_include/conf.mk),) |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 44 | clean: |
| 45 | $(q)$(MAKE) -C host/xtest O=$(out-dir)/xtest q=$(q) $@ |
| 46 | $(q)$(MAKE) -C ta O=$(out-dir)/ta q=$(q) $@ |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 47 | else |
| 48 | clean: |
| 49 | $(q)echo "TA_DEV_KIT_DIR is not correctly defined" |
| 50 | $(q)echo "You can remove manually $(out-dir)" |
| 51 | endif |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 52 | |
| 53 | .PHONY: patch |
| 54 | patch: |
Jerome Forissier | e368834 | 2015-09-24 10:45:17 -0700 | [diff] [blame] | 55 | ifdef CFG_GP_PACKAGE_PATH |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 56 | CFG_GP_API?=1.0 |
Pascal Brand | 3082681 | 2015-09-17 13:07:24 +0200 | [diff] [blame] | 57 | CFG_GP_XSL_PACKAGE_PATH?=$(CURDIR)/package/testsuite/global_platform/api_1.0/GP_XSL_TEE_Initial_Configuration-Test_Suite_v1_0_0-2014-12-03-STM |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 58 | |
| 59 | ifeq "$(wildcard $(CFG_GP_XSL_PACKAGE_PATH) )" "" |
| 60 | $(error CFG_GP_XSL_PACKAGE_PATH must contain the xsl package) |
| 61 | endif |
| 62 | |
| 63 | ifeq "$(wildcard $(CFG_GP_PACKAGE_PATH) )" "" |
| 64 | $(error CFG_GP_PACKAGE_PATH must contain the xml package from GP) |
| 65 | endif |
| 66 | |
| 67 | ifeq "$(wildcard /usr/include/openssl )" "" |
| 68 | $(error openssl must be installed) |
| 69 | endif |
| 70 | |
| 71 | # Note that only TEE_Initial_Configuration-Test_Suite_v1_1_0_4-2014_11_07 is supported |
| 72 | |
| 73 | GP_XTEST_OUT_DIR=$(CURDIR)/host/xtest |
| 74 | GP_XTEST_IN_DIR=${GP_XTEST_OUT_DIR}/global_platform/${CFG_GP_API} |
| 75 | GP_USERTA_DIR=$(CURDIR)/ta |
| 76 | |
| 77 | define patch-file |
| 78 | @if [ ! -e ${1} ]; then \ |
| 79 | echo "Error: File to patch is unknown: $1"; \ |
| 80 | return 1; \ |
| 81 | fi |
| 82 | @if [ ! -e ${2} ]; then \ |
| 83 | echo "Error: Patch to apply is unknown: $2"; \ |
| 84 | return 1; \ |
| 85 | fi |
| 86 | @if [ ! -e ${1}.orig ]; then \ |
| 87 | patch -N -b ${1} < ${2}; \ |
| 88 | else \ |
| 89 | echo "Warning: Patch already applied on `basename $1`"; \ |
| 90 | fi |
| 91 | endef |
| 92 | |
| 93 | # openssl .h file installation |
| 94 | forgpdir=${CURDIR}/host/xtest/for_gp |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 95 | .PHONY: patch-openssl |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 96 | patch-openssl: |
| 97 | $(q)mkdir -p ${forgpdir}/include/openssl ${forgpdir}/lib |
Pascal Brand | 0e38f3f | 2015-09-24 21:45:51 +0200 | [diff] [blame] | 98 | $(q)if [ -d /usr/include/x86_64-linux-gnu/openssl ]; then \ |
| 99 | cp -r /usr/include/x86_64-linux-gnu/openssl ${forgpdir}/include ; \ |
| 100 | fi |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 101 | $(q)cp /usr/include/openssl/*.h $f ${forgpdir}/include/openssl |
| 102 | |
| 103 | define mv-package |
| 104 | @if [ -d ${1} ]; then \ |
| 105 | mv ${1} ${CFG_GP_PACKAGE_PATH}/packages ;\ |
| 106 | fi |
| 107 | endef |
| 108 | |
| 109 | define patch-xalan |
| 110 | $(q)rm -f ${GP_XTEST_OUT_DIR}/${3} ${GP_XTEST_OUT_DIR}/${3}.orig |
| 111 | $(q)xalan -in ${GP_XTEST_IN_DIR}/${1} -xsl ${GP_XTEST_IN_DIR}/${2} -out ${GP_XTEST_OUT_DIR}/${3} |
| 112 | endef |
| 113 | |
| 114 | # Generate host files |
| 115 | define patch-cp-ta |
| 116 | $(q)rm -rf $(GP_USERTA_DIR)/${3} |
| 117 | $(q)mkdir -p $(GP_USERTA_DIR)/${3} |
| 118 | $(q)cp -p $(CFG_GP_PACKAGE_PATH)/${1}/* $(GP_USERTA_DIR)/${3} |
| 119 | $(q)cp -p $(CFG_GP_XSL_PACKAGE_PATH)/${2}/* $(GP_USERTA_DIR)/${3} |
| 120 | endef |
| 121 | |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 122 | .PHONY: patch-generate-host |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 123 | patch-generate-host: patch-package |
| 124 | @echo "INFO: Generate host tests" |
| 125 | $(q) mkdir -p ${GP_XTEST_IN_DIR} ${GP_XTEST_IN_DIR} |
| 126 | $(q)find ${CFG_GP_PACKAGE_PATH}/packages -type f -name "*.xml" -exec cp -p {} ${GP_XTEST_IN_DIR} \; |
| 127 | $(q)find ${CFG_GP_XSL_PACKAGE_PATH}/packages -type f -name "*.xsl" -exec cp -p {} ${GP_XTEST_IN_DIR} \; |
| 128 | $(call patch-xalan,TEE.xml,adbg_case_declare.xsl,adbg_case_declare.h) |
| 129 | $(call patch-xalan,TEE.xml,adbg_entry_declare.xsl,adbg_entry_declare.h) |
Jerome Forissier | c6aac93 | 2015-09-24 17:45:08 -0700 | [diff] [blame] | 130 | $(call patch-xalan,TEE.xml,TEE.xsl,xtest_7000_gp.c) |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 131 | $(call patch-xalan,TEE_DataStorage_API.xml,TEE_DataStorage_API.xsl,xtest_7500.c) |
| 132 | $(call patch-xalan,TEE_Internal_API.xml,TEE_Internal_API.xsl,xtest_8000.c) |
| 133 | $(call patch-xalan,TEE_TimeArithm_API.xml,TEE_TimeArithm_API.xsl,xtest_8500.c) |
| 134 | $(call patch-xalan,TEE_Crypto_API.xml,TEE_Crypto_API.xsl,xtest_9000.c) |
| 135 | @echo "INFO: Patch host tests" |
| 136 | # $(q)sed -i '752 c\ xtest_tee_deinit();\n' ${GP_XTEST_OUT_DIR}/xtest_7000.c |
| 137 | # $(q)sed -i '1076 c\ xtest_tee_deinit();\n' ${GP_XTEST_OUT_DIR}/xtest_8000.c |
| 138 | # $(q)sed -i '2549 c\ xtest_tee_deinit();\n' ${GP_XTEST_OUT_DIR}/xtest_8500.c |
| 139 | # $(q)sed -i '246 c\ xtest_tee_deinit();\n' ${GP_XTEST_OUT_DIR}/xtest_9000.c |
| 140 | $(call patch-file,host/xtest/xtest_9000.c,${CFG_GP_XSL_PACKAGE_PATH}/host/xtest/xtest_9000.c.patch) |
| 141 | |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 142 | .PHONY: patch-generate-ta |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 143 | patch-generate-ta: patch-package |
| 144 | @echo "INFO: Generate TA" |
| 145 | $(call patch-cp-ta,TTAs/TTA_Arithmetical/TTA_Arithmetical/code_files,TTAs/TTA_Arithmetical/code_files,GP_TTA_Arithmetical) |
| 146 | $(call patch-cp-ta,TTAs/TTA_DS/TTA_DS/code_files,TTAs/TTA_DS/code_files,GP_TTA_DS) |
| 147 | $(call patch-cp-ta,TTAs/TTA_ClientAPI/TTA_answerErrorTo_Invoke/code_files,TTAs/TTA_ClientAPI/TTA_answerErrorTo_Invoke/code_files,GP_TTA_answerErrorTo_Invoke) |
| 148 | $(call patch-cp-ta,TTAs/TTA_ClientAPI/TTA_check_OpenSession_with_4_parameters/code_files,TTAs/TTA_ClientAPI/TTA_check_OpenSession_with_4_parameters/code_files,GP_TTA_check_OpenSession_with_4_parameters) |
| 149 | $(q) cp $(CFG_GP_PACKAGE_PATH)/TTAs/TTA_ClientAPI/ta_check_OpenSession_with_4_parameters/code_files/TTA_check_OpenSession_with_4_parameters_protocol.h $(GP_USERTA_DIR)/GP_TTA_check_OpenSession_with_4_parameters |
| 150 | $(call patch-cp-ta,TTAs/TTA_ClientAPI/TTA_answerErrorTo_OpenSession/code_files,TTAs/TTA_ClientAPI/TTA_answerErrorTo_OpenSession/code_files,GP_TTA_answerErrorTo_OpenSession) |
| 151 | $(call patch-cp-ta,TTAs/TTA_ClientAPI/TTA_testingClientAPI/code_files,TTAs/TTA_ClientAPI/TTA_testingClientAPI/code_files,GP_TTA_testingClientAPI) |
| 152 | $(call patch-cp-ta,TTAs/TTA_ClientAPI/TTA_answerSuccessTo_OpenSession_Invoke/code_files,TTAs/TTA_ClientAPI/TTA_answerSuccessTo_OpenSession_Invoke/code_files,GP_TTA_answerSuccessTo_OpenSession_Invoke) |
| 153 | $(call patch-cp-ta,TTAs/TTA_Crypto/TTA_Crypto/code_files,TTAs/TTA_Crypto/code_files,GP_TTA_Crypto) |
| 154 | $(call patch-cp-ta,TTAs/TTA_Time/TTA_Time/code_files,TTAs/TTA_Time/code_files,GP_TTA_Time) |
| 155 | $(call patch-cp-ta,TTAs/TTA_TCF/TTA_TCF_SingleInstanceTA/code_files,TTAs/TTA_TCF/TTA_TCF_SingleInstanceTA/code_files,GP_TTA_TCF_SingleInstanceTA) |
| 156 | $(call patch-cp-ta,TTAs/TTA_TCF/TTA_TCF_ICA/code_files,TTAs/TTA_TCF/TTA_TCF_ICA/code_files,GP_TTA_TCF_ICA) |
| 157 | $(call patch-cp-ta,TTAs/TTA_TCF/TTA_TCF_MultipleInstanceTA/code_files,TTAs/TTA_TCF/TTA_TCF_MultipleInstanceTA/code_files,GP_TTA_TCF_MultipleInstanceTA) |
| 158 | $(call patch-cp-ta,TTAs/TTA_TCF/TTA_TCF_ICA2/code_files,TTAs/TTA_TCF/TTA_TCF_ICA2/code_files,GP_TTA_TCF_ICA2) |
| 159 | $(call patch-cp-ta,TTAs/TTA_TCF/TTA_TCF/code_files,TTAs/TTA_TCF/TTA_TCF/code_files,GP_TTA_TCF) |
| 160 | |
| 161 | # Patch the GP package |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 162 | .PHONY: patch-package |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 163 | patch-package: |
| 164 | @echo "INFO: Patch provided tests" |
| 165 | $(q)mkdir -p ${CFG_GP_PACKAGE_PATH}/packages |
| 166 | $(call mv-package,${CFG_GP_PACKAGE_PATH}/ClientAPI) |
| 167 | $(call mv-package,${CFG_GP_PACKAGE_PATH}/Crypto) |
| 168 | $(call mv-package,${CFG_GP_PACKAGE_PATH}/DataStorage) |
| 169 | $(call mv-package,${CFG_GP_PACKAGE_PATH}/Time_Arithmetical) |
| 170 | $(call mv-package,${CFG_GP_PACKAGE_PATH}/TrustedCoreFw) |
| 171 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/packages/ClientAPI/xmlStable/TEE.xml,${CFG_GP_XSL_PACKAGE_PATH}/packages/ClientAPI/xmlpatch/v1_1_0_4-2014_11_07/TEE.xml.patch) |
| 172 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/packages/Crypto/xmlStable/TEE_Crypto_API.xml,${CFG_GP_XSL_PACKAGE_PATH}/packages/Crypto/xmlpatch/v1_1_0_4-2014_11_07/TEE_Crypto_API.xml.patch) |
| 173 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/packages/DataStorage/xmlStable/TEE_DataStorage_API.xml,${CFG_GP_XSL_PACKAGE_PATH}/packages/DataStorage/xmlpatch/v1_1_0_4-2014_11_07/TEE_DataStorage_API.xml.patch) |
| 174 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/packages/Time_Arithmetical/xmlStable/TEE_TimeArithm_API.xml,${CFG_GP_XSL_PACKAGE_PATH}/packages/Time_Arithmetical/xmlpatch/v1_1_0_4-2014_11_07/TEE_TimeArithm_API.xml.patch) |
| 175 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/packages/TrustedCoreFw/xmlStable/TEE_Internal_API.xml,${CFG_GP_XSL_PACKAGE_PATH}/packages/TrustedCoreFw/xmlpatch/v1_1_0_4-2014_11_07/TEE_Internal_API.xml.patch) |
| 176 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_Arithmetical/TTA_Arithmetical/code_files/TTA_Arithmetical.c,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_Arithmetical/code_patches/v1_1_0_4-2014_11_07/TTA_Arithmetical.c.patch) |
| 177 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_Arithmetical/TTA_Arithmetical/code_files/TTA_Arithmetical_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_Arithmetical/code_patches/v1_1_0_4-2014_11_07/TTA_Arithmetical_protocol.h.patch) |
| 178 | # $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_ClientAPI/ta_check_OpenSession_with_4_parameters/code_files/TTA_check_OpenSession_with_4_parameters_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_ClientAPI/TTA_check_OpenSession_with_4_parameters/code_patches/v1_1_0_4-2014_11_07/TTA_check_OpenSession_with_4_parameters_protocol.h.patch) |
| 179 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_ClientAPI/TTA_testingClientAPI/code_files/TTA_testingClientAPI_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_ClientAPI/TTA_testingClientAPI/code_patches/v1_1_0_4-2014_11_07/TTA_testingClientAPI_protocol.h.patch) |
| 180 | # $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_ClientAPI/TTA_answerSuccessTo_OpenSession_Invoke/code_files/TTA_answerSuccessTo_OpenSession_Invoke_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_ClientAPI/TTA_answerSuccessTo_OpenSession_Invoke/code_patches/v1_1_0_4-2014_11_07/TTA_answerSuccessTo_OpenSession_Invoke_protocol.h.patch) |
| 181 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_ClientAPI/TTA_answerErrorTo_OpenSession/code_files/TTA_answerErrorTo_OpenSession_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_ClientAPI/TTA_answerErrorTo_OpenSession/code_patches/v1_1_0_4-2014_11_07/TTA_answerErrorTo_OpenSession_protocol.h.patch) |
| 182 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_ClientAPI/TTA_answerErrorTo_Invoke/code_files/TTA_answerErrorTo_Invoke_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_ClientAPI/TTA_answerErrorTo_Invoke/code_patches/v1_1_0_4-2014_11_07/TTA_answerErrorTo_Invoke_protocol.h.patch) |
| 183 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_Crypto/TTA_Crypto/code_files/TTA_Crypto.c,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_Crypto/code_patches/v1_1_0_4-2014_11_07/TTA_Crypto.c.patch) |
| 184 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_Crypto/TTA_Crypto/code_files/TTA_Crypto_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_Crypto/code_patches/v1_1_0_4-2014_11_07/TTA_Crypto_protocol.h.patch) |
| 185 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_DS/TTA_DS/code_files/TTA_DS_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_DS/code_patches/v1_1_0_4-2014_11_07/TTA_DS_protocol.h.patch) |
| 186 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_DS/TTA_DS/code_files/TTA_DS.c,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_DS/code_patches/v1_1_0_4-2014_11_07/TTA_DS.c.patch) |
| 187 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TEE_include/tee_internal_api.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TEE_include/code_patches/v1_1_0_4-2014_11_07/tee_internal_api.h.patch) |
| 188 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF_ICA/code_files/TTA_TCF_ICA_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF_ICA/code_patches/v1_1_0_4-2014_11_07/TTA_TCF_ICA_protocol.h.patch) |
| 189 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF_MultipleInstanceTA/code_files/TTA_TCF_MultipleInstanceTA_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF_MultipleInstanceTA/code_patches/v1_1_0_4-2014_11_07/TTA_TCF_MultipleInstanceTA_protocol.h.patch) |
Jerome Forissier | 529aa6f | 2015-12-04 15:40:16 +0100 | [diff] [blame] | 190 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF_MultipleInstanceTA/code_files/TTA_TCF_MultipleInstanceTA.c,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF_MultipleInstanceTA/code_patches/v1_1_0_4-2014_11_07/TTA_TCF_MultipleInstanceTA.c.patch) |
| 191 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF_SingleInstanceTA/code_files/TTA_TCF_SingleInstanceTA.c,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF_SingleInstanceTA/code_patches/v1_1_0_4-2014_11_07/TTA_TCF_SingleInstanceTA.c.patch) |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 192 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF/code_files/TTA_TCF.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF/code_patches/v1_1_0_4-2014_11_07/TTA_TCF.h.patch) |
| 193 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF_SingleInstanceTA/code_files/TTA_TCF_SingleInstanceTA_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_TCF/TTA_TCF_SingleInstanceTA/code_patches/v1_1_0_4-2014_11_07/TTA_TCF_SingleInstanceTA_protocol.h.patch) |
| 194 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_Time/TTA_Time/code_files/TTA_Time_protocol.h,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_Time/code_patches/v1_1_0_4-2014_11_07/TTA_Time_protocol.h.patch) |
| 195 | $(call patch-file,${CFG_GP_PACKAGE_PATH}/TTAs/TTA_Time/TTA_Time/code_files/TTA_Time.c,${CFG_GP_XSL_PACKAGE_PATH}/TTAs/TTA_Time/code_patches/v1_1_0_4-2014_11_07/TTA_Time.c.patch) |
| 196 | |
| 197 | define patch-filter-one |
| 198 | $(q)sed -i 's|^ADBG_SUITE_ENTRY(XTEST_TEE_'${1}', NULL)|/\*ADBG_SUITE_ENTRY(XTEST_TEE_'${1}', NULL)\*/|g' ${GP_XTEST_OUT_DIR}/xtest_main.c |
| 199 | $(q)sed -i 's| ADBG_SUITE_ENTRY(XTEST_TEE_'${1}', NULL)\\| /\*ADBG_SUITE_ENTRY(XTEST_TEE_'${1}', NULL)\*/\\|g' ${GP_XTEST_OUT_DIR}/adbg_entry_declare.h |
| 200 | endef |
| 201 | |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 202 | .PHONY: patch-filter |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 203 | patch-filter: |
| 204 | @echo "INFO: Filter some tests" |
| 205 | $(call patch-filter-one,7038) |
| 206 | $(call patch-filter-one,7522) |
| 207 | $(call patch-filter-one,7538) |
| 208 | $(call patch-filter-one,7540) |
| 209 | $(call patch-filter-one,7546) |
| 210 | $(call patch-filter-one,7557) |
| 211 | $(call patch-filter-one,7522) |
| 212 | $(call patch-filter-one,7538) |
| 213 | $(call patch-filter-one,7540) |
| 214 | $(call patch-filter-one,7546) |
| 215 | $(call patch-filter-one,7557) |
| 216 | $(call patch-filter-one,7559) |
| 217 | $(call patch-filter-one,7577) |
| 218 | $(call patch-filter-one,7641) |
| 219 | $(call patch-filter-one,7642) |
| 220 | $(call patch-filter-one,7643) |
| 221 | $(call patch-filter-one,7644) |
| 222 | $(call patch-filter-one,7686) |
| 223 | $(call patch-filter-one,8025) |
| 224 | $(call patch-filter-one,8058) |
| 225 | $(call patch-filter-one,8059) |
| 226 | $(call patch-filter-one,8030) |
| 227 | $(call patch-filter-one,8066) |
| 228 | $(call patch-filter-one,8614) |
| 229 | $(call patch-filter-one,8643) |
| 230 | $(call patch-filter-one,8644) |
| 231 | $(call patch-filter-one,8673) |
| 232 | $(call patch-filter-one,8674) |
| 233 | $(call patch-filter-one,9001) |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 234 | $(call patch-filter-one,9072) |
| 235 | $(call patch-filter-one,9073) |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 236 | $(call patch-filter-one,9075) |
| 237 | $(call patch-filter-one,9079) |
| 238 | $(call patch-filter-one,9080) |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 239 | $(call patch-filter-one,9082) |
| 240 | $(call patch-filter-one,9085) |
| 241 | $(call patch-filter-one,9086) |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 242 | $(call patch-filter-one,9088) |
| 243 | $(call patch-filter-one,9090) |
| 244 | $(call patch-filter-one,9091) |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 245 | $(call patch-filter-one,9093) |
| 246 | $(call patch-filter-one,9095) |
| 247 | $(call patch-filter-one,9096) |
| 248 | $(call patch-filter-one,9098) |
| 249 | $(call patch-filter-one,9099) |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 250 | $(call patch-filter-one,9109) |
| 251 | $(call patch-filter-one,9110) |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 252 | $(call patch-filter-one,9160) |
| 253 | $(call patch-filter-one,9174) |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 254 | $(call patch-filter-one,9195) |
| 255 | $(call patch-filter-one,9196) |
| 256 | $(call patch-filter-one,9204) |
| 257 | $(call patch-filter-one,9239) |
| 258 | |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 259 | .PHONY: patch |
Pascal Brand | d69d40c | 2015-09-17 14:37:41 +0200 | [diff] [blame] | 260 | patch: patch-openssl patch-generate-host patch-generate-ta |
| 261 | $(MAKE) patch-filter |
| 262 | |
| 263 | else |
Pascal Brand | e0d1841 | 2015-10-13 12:53:58 +0200 | [diff] [blame] | 264 | .PHONY: patch |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 265 | patch: |
Jerome Forissier | e368834 | 2015-09-24 10:45:17 -0700 | [diff] [blame] | 266 | $(q) echo "Please define CFG_GP_PACKAGE_PATH" && false |
Pascal Brand | c639ac8 | 2015-07-02 08:53:34 +0200 | [diff] [blame] | 267 | endif |
Jerome Forissier | 2a1ef2c | 2016-06-15 11:07:27 +0200 | [diff] [blame] | 268 | |
| 269 | install: |
| 270 | $(echo) ' INSTALL ${DESTDIR}/lib/optee_armtz' |
| 271 | $(q)mkdir -p ${DESTDIR}/lib/optee_armtz |
| 272 | $(q)find $(out-dir) -name \*.ta -exec cp -a {} ${DESTDIR}/lib/optee_armtz \; |
| 273 | $(echo) ' INSTALL ${DESTDIR}/bin' |
| 274 | $(q)mkdir -p ${DESTDIR}/bin |
| 275 | $(q)cp -a $(out-dir)/xtest/xtest ${DESTDIR}/bin |