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