Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 1 | # |
| 2 | # Common definition to all platforms |
| 3 | # |
| 4 | |
Jens Wiklander | 650f298 | 2017-04-05 10:08:59 +0200 | [diff] [blame] | 5 | SHELL := bash |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 6 | BASH ?= bash |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 7 | ROOT ?= $(shell pwd)/.. |
| 8 | |
Philip Attfield | 3f9250f | 2016-09-14 07:43:32 +0200 | [diff] [blame] | 9 | BUILD_PATH ?= $(ROOT)/build |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 10 | LINUX_PATH ?= $(ROOT)/linux |
Victor Chong | 9f0d120 | 2016-04-23 16:28:31 +0100 | [diff] [blame] | 11 | OPTEE_GENDRV_MODULE ?= $(LINUX_PATH)/drivers/tee/optee/optee.ko |
Pascal Brand | 440ef9c | 2015-09-08 16:01:58 +0200 | [diff] [blame] | 12 | GEN_ROOTFS_PATH ?= $(ROOT)/gen_rootfs |
| 13 | GEN_ROOTFS_FILELIST ?= $(GEN_ROOTFS_PATH)/filelist-tee.txt |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 14 | OPTEE_OS_PATH ?= $(ROOT)/optee_os |
| 15 | OPTEE_CLIENT_PATH ?= $(ROOT)/optee_client |
| 16 | OPTEE_CLIENT_EXPORT ?= $(OPTEE_CLIENT_PATH)/out/export |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 17 | OPTEE_TEST_PATH ?= $(ROOT)/optee_test |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 18 | OPTEE_TEST_OUT_PATH ?= $(ROOT)/optee_test/out |
Igor Opaniuk | 584efe5 | 2017-08-07 01:41:48 +0300 | [diff] [blame] | 19 | OPTEE_EXAMPLES_PATH ?= $(ROOT)/optee_examples |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 20 | BENCHMARK_APP_PATH ?= $(ROOT)/optee_benchmark |
Igor Opaniuk | 7b3a94c | 2017-09-13 13:15:30 +0300 | [diff] [blame] | 21 | LIBYAML_LIB_PATH ?= $(BENCHMARK_APP_PATH)/libyaml/out/lib |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 22 | |
Etienne Carriere | cc23f6b | 2016-10-21 10:16:00 +0200 | [diff] [blame] | 23 | # default high verbosity. slow uarts shall specify lower if prefered |
Pascal Brand | 23ef205 | 2016-03-09 15:25:01 +0100 | [diff] [blame] | 24 | CFG_TEE_CORE_LOG_LEVEL ?= 3 |
| 25 | |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 26 | # default disable latency benchmarks (over all OP-TEE layers) |
| 27 | CFG_TEE_BENCHMARK ?= n |
| 28 | |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 29 | CCACHE ?= $(shell which ccache) # Don't remove this comment (space is needed) |
| 30 | |
Igor Opaniuk | 97d0529 | 2016-10-26 14:46:14 +0300 | [diff] [blame] | 31 | # Accessing a shared folder on the host from QEMU: |
| 32 | # # Set QEMU_VIRTFS_ENABLE to 'y' and adjust QEMU_VIRTFS_HOST_DIR |
| 33 | # # Then in QEMU, run: |
| 34 | # # $ mount -t 9p -o trans=virtio host <mount_point> |
| 35 | QEMU_VIRTFS_ENABLE ?= n |
| 36 | QEMU_VIRTFS_HOST_DIR ?= $(ROOT) |
Pascal Brand | 6044eb5 | 2016-02-23 15:48:31 +0100 | [diff] [blame] | 37 | |
Igor Opaniuk | 0aea4ef | 2017-01-13 12:52:00 +0200 | [diff] [blame] | 38 | # Enable SLiRP user networking |
| 39 | QEMU_USERNET_ENABLE ?= n |
Igor Opaniuk | bbcf27d | 2017-09-13 13:12:51 +0300 | [diff] [blame] | 40 | |
| 41 | ################################################################################ |
| 42 | # Mandatory for autotools (for specifying --host) |
| 43 | ################################################################################ |
| 44 | ifeq ($(COMPILE_NS_USER),64) |
| 45 | MULTIARCH := aarch64-linux-gnu |
| 46 | else |
| 47 | MULTIARCH := arm-linux-gnueabihf |
| 48 | endif |
| 49 | |
Pascal Brand | 6044eb5 | 2016-02-23 15:48:31 +0100 | [diff] [blame] | 50 | ################################################################################ |
| 51 | # Check coherency of compilation mode |
| 52 | ################################################################################ |
| 53 | |
| 54 | ifneq ($(COMPILE_NS_USER),) |
| 55 | ifeq ($(COMPILE_NS_KERNEL),) |
| 56 | $(error COMPILE_NS_KERNEL must be defined as COMPILE_NS_USER=$(COMPILE_NS_USER) is defined) |
| 57 | endif |
| 58 | ifeq (,$(filter $(COMPILE_NS_USER),32 64)) |
| 59 | $(error COMPILE_NS_USER=$(COMPILE_NS_USER) - Should be 32 or 64) |
| 60 | endif |
| 61 | endif |
| 62 | |
| 63 | ifneq ($(COMPILE_NS_KERNEL),) |
| 64 | ifeq ($(COMPILE_NS_USER),) |
| 65 | $(error COMPILE_NS_USER must be defined as COMPILE_NS_KERNEL=$(COMPILE_NS_KERNEL) is defined) |
| 66 | endif |
| 67 | ifeq (,$(filter $(COMPILE_NS_KERNEL),32 64)) |
| 68 | $(error COMPILE_NS_KERNEL=$(COMPILE_NS_KERNEL) - Should be 32 or 64) |
| 69 | endif |
| 70 | endif |
| 71 | |
| 72 | ifeq ($(COMPILE_NS_KERNEL),32) |
| 73 | ifneq ($(COMPILE_NS_USER),32) |
| 74 | $(error COMPILE_NS_USER=$(COMPILE_NS_USER) - Should be 32 as COMPILE_NS_KERNEL=$(COMPILE_NS_KERNEL)) |
| 75 | endif |
| 76 | endif |
| 77 | |
| 78 | ifneq ($(COMPILE_S_USER),) |
| 79 | ifeq ($(COMPILE_S_KERNEL),) |
| 80 | $(error COMPILE_S_KERNEL must be defined as COMPILE_S_USER=$(COMPILE_S_USER) is defined) |
| 81 | endif |
| 82 | ifeq (,$(filter $(COMPILE_S_USER),32 64)) |
| 83 | $(error COMPILE_S_USER=$(COMPILE_S_USER) - Should be 32 or 64) |
| 84 | endif |
| 85 | endif |
| 86 | |
| 87 | ifneq ($(COMPILE_S_KERNEL),) |
| 88 | OPTEE_OS_COMMON_EXTRA_FLAGS ?= O=out/arm |
| 89 | OPTEE_OS_BIN ?= $(OPTEE_OS_PATH)/out/arm/core/tee.bin |
Jens Wiklander | f7b3509 | 2017-09-01 09:05:32 +0200 | [diff] [blame] | 90 | OPTEE_OS_HEADER_V2_BIN ?= $(OPTEE_OS_PATH)/out/arm/core/tee-header_v2.bin |
| 91 | OPTEE_OS_PAGER_V2_BIN ?= $(OPTEE_OS_PATH)/out/arm/core/tee-pager_v2.bin |
| 92 | OPTEE_OS_PAGEABLE_V2_BIN ?= $(OPTEE_OS_PATH)/out/arm/core/tee-pageable_v2.bin |
Pascal Brand | 6044eb5 | 2016-02-23 15:48:31 +0100 | [diff] [blame] | 93 | ifeq ($(COMPILE_S_USER),) |
| 94 | $(error COMPILE_S_USER must be defined as COMPILE_S_KERNEL=$(COMPILE_S_KERNEL) is defined) |
| 95 | endif |
| 96 | ifeq (,$(filter $(COMPILE_S_KERNEL),32 64)) |
| 97 | $(error COMPILE_S_KERNEL=$(COMPILE_S_KERNEL) - Should be 32 or 64) |
| 98 | endif |
| 99 | endif |
| 100 | |
| 101 | ifeq ($(COMPILE_S_KERNEL),32) |
| 102 | ifneq ($(COMPILE_S_USER),32) |
| 103 | $(error COMPILE_S_USER=$(COMPILE_S_USER) - Should be 32 as COMPILE_S_KERNEL=$(COMPILE_S_KERNEL)) |
| 104 | endif |
| 105 | endif |
| 106 | |
| 107 | |
| 108 | ################################################################################ |
| 109 | # set the compiler when COMPILE_xxx are defined |
| 110 | ################################################################################ |
Pascal Brand | efe5659 | 2016-03-03 10:46:52 +0100 | [diff] [blame] | 111 | CROSS_COMPILE_NS_USER ?= "$(CCACHE)$(AARCH$(COMPILE_NS_USER)_CROSS_COMPILE)" |
| 112 | CROSS_COMPILE_NS_KERNEL ?= "$(CCACHE)$(AARCH$(COMPILE_NS_KERNEL)_CROSS_COMPILE)" |
| 113 | CROSS_COMPILE_S_USER ?= "$(CCACHE)$(AARCH$(COMPILE_S_USER)_CROSS_COMPILE)" |
| 114 | CROSS_COMPILE_S_KERNEL ?= "$(CCACHE)$(AARCH$(COMPILE_S_KERNEL)_CROSS_COMPILE)" |
Pascal Brand | 6044eb5 | 2016-02-23 15:48:31 +0100 | [diff] [blame] | 115 | |
| 116 | ifeq ($(COMPILE_S_USER),32) |
Pascal Brand | 6044eb5 | 2016-02-23 15:48:31 +0100 | [diff] [blame] | 117 | OPTEE_OS_TA_DEV_KIT_DIR ?= $(OPTEE_OS_PATH)/out/arm/export-ta_arm32 |
| 118 | endif |
| 119 | ifeq ($(COMPILE_S_USER),64) |
Pascal Brand | 6044eb5 | 2016-02-23 15:48:31 +0100 | [diff] [blame] | 120 | OPTEE_OS_TA_DEV_KIT_DIR ?= $(OPTEE_OS_PATH)/out/arm/export-ta_arm64 |
| 121 | endif |
| 122 | |
Pascal Brand | 6044eb5 | 2016-02-23 15:48:31 +0100 | [diff] [blame] | 123 | ifeq ($(COMPILE_S_KERNEL),64) |
Pascal Brand | 6044eb5 | 2016-02-23 15:48:31 +0100 | [diff] [blame] | 124 | OPTEE_OS_COMMON_EXTRA_FLAGS += CFG_ARM64_core=y |
| 125 | endif |
| 126 | |
| 127 | |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 128 | ################################################################################ |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 129 | # defines, macros, configuration etc |
| 130 | ################################################################################ |
| 131 | define KERNEL_VERSION |
Jerome Forissier | ae45fbf | 2015-09-04 09:40:17 +0200 | [diff] [blame] | 132 | $(shell cd $(LINUX_PATH) && $(MAKE) --no-print-directory kernelversion) |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 133 | endef |
Victor Chong | 3bcef44 | 2017-08-07 10:57:55 +0100 | [diff] [blame] | 134 | |
| 135 | # Read stdin, expand ${VAR} environment variables, output to stdout |
| 136 | # http://superuser.com/a/302847 |
| 137 | define expand-env-var |
| 138 | awk '{while(match($$0,"[$$]{[^}]*}")) {var=substr($$0,RSTART+2,RLENGTH -3);gsub("[$$]{"var"}",ENVIRON[var])}}1' |
| 139 | endef |
| 140 | |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 141 | DEBUG ?= 0 |
| 142 | |
| 143 | ################################################################################ |
Pascal Brand | cb45260 | 2015-10-13 10:46:33 +0200 | [diff] [blame] | 144 | # default target is all |
| 145 | ################################################################################ |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 146 | .PHONY: all |
Pascal Brand | cb45260 | 2015-10-13 10:46:33 +0200 | [diff] [blame] | 147 | all: |
| 148 | |
| 149 | ################################################################################ |
Pascal Brand | 440ef9c | 2015-09-08 16:01:58 +0200 | [diff] [blame] | 150 | # Busybox |
| 151 | ################################################################################ |
| 152 | BUSYBOX_COMMON_TARGET ?= TOBEDEFINED |
| 153 | BUSYBOX_CLEAN_COMMON_TARGET ?= TOBEDEFINED |
Pascal Brand | 440ef9c | 2015-09-08 16:01:58 +0200 | [diff] [blame] | 154 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 155 | .PHONY: busybox-common |
Pascal Brand | 440ef9c | 2015-09-08 16:01:58 +0200 | [diff] [blame] | 156 | busybox-common: linux |
| 157 | cd $(GEN_ROOTFS_PATH) && \ |
Pascal Brand | efe5659 | 2016-03-03 10:46:52 +0100 | [diff] [blame] | 158 | CROSS_COMPILE=$(CROSS_COMPILE_NS_USER) \ |
Pascal Brand | 440ef9c | 2015-09-08 16:01:58 +0200 | [diff] [blame] | 159 | PATH=${PATH}:$(LINUX_PATH)/usr \ |
| 160 | $(GEN_ROOTFS_PATH)/generate-cpio-rootfs.sh \ |
| 161 | $(BUSYBOX_COMMON_TARGET) |
| 162 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 163 | .PHONY: busybox-clean-common |
Pascal Brand | 440ef9c | 2015-09-08 16:01:58 +0200 | [diff] [blame] | 164 | busybox-clean-common: |
| 165 | cd $(GEN_ROOTFS_PATH) && \ |
| 166 | $(GEN_ROOTFS_PATH)/generate-cpio-rootfs.sh \ |
| 167 | $(BUSYBOX_CLEAN_COMMON_TARGET) |
| 168 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 169 | .PHONY: busybox-cleaner-common |
Pascal Brand | 440ef9c | 2015-09-08 16:01:58 +0200 | [diff] [blame] | 170 | busybox-cleaner-common: |
| 171 | rm -rf $(GEN_ROOTFS_PATH)/build |
| 172 | rm -rf $(GEN_ROOTFS_PATH)/filelist-final.txt |
Victor Chong | 87f5fcf | 2015-11-26 10:52:52 +0900 | [diff] [blame] | 173 | |
Pascal Brand | e3d8598 | 2015-09-10 17:20:42 +0200 | [diff] [blame] | 174 | ################################################################################ |
| 175 | # Linux |
| 176 | ################################################################################ |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 177 | ifeq ($(CFG_TEE_BENCHMARK),y) |
| 178 | LINUX_DEFCONFIG_BENCH ?= $(CURDIR)/kconfigs/tee_bench.conf |
| 179 | endif |
| 180 | |
Pascal Brand | e3d8598 | 2015-09-10 17:20:42 +0200 | [diff] [blame] | 181 | LINUX_COMMON_FLAGS ?= LOCALVERSION= CROSS_COMPILE=$(CROSS_COMPILE_NS_KERNEL) |
| 182 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 183 | .PHONY: linux-common |
Pascal Brand | e3d8598 | 2015-09-10 17:20:42 +0200 | [diff] [blame] | 184 | linux-common: linux-defconfig |
| 185 | $(MAKE) -C $(LINUX_PATH) $(LINUX_COMMON_FLAGS) |
| 186 | |
Jerome Forissier | e100238 | 2015-11-26 11:36:00 +0100 | [diff] [blame] | 187 | $(LINUX_PATH)/.config: $(LINUX_DEFCONFIG_COMMON_FILES) |
| 188 | cd $(LINUX_PATH) && \ |
| 189 | ARCH=$(LINUX_DEFCONFIG_COMMON_ARCH) \ |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 190 | scripts/kconfig/merge_config.sh $(LINUX_DEFCONFIG_COMMON_FILES) \ |
| 191 | $(LINUX_DEFCONFIG_BENCH) |
Jerome Forissier | e100238 | 2015-11-26 11:36:00 +0100 | [diff] [blame] | 192 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 193 | .PHONY: linux-defconfig-clean-common |
Pascal Brand | e3d8598 | 2015-09-10 17:20:42 +0200 | [diff] [blame] | 194 | linux-defconfig-clean-common: |
Victor Chong | 87f5fcf | 2015-11-26 10:52:52 +0900 | [diff] [blame] | 195 | rm -f $(LINUX_PATH)/.config |
Pascal Brand | e3d8598 | 2015-09-10 17:20:42 +0200 | [diff] [blame] | 196 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 197 | # LINUX_CLEAN_COMMON_FLAGS should be defined in specific makefiles (hikey.mk,...) |
| 198 | .PHONY: linux-clean-common |
Pascal Brand | e3d8598 | 2015-09-10 17:20:42 +0200 | [diff] [blame] | 199 | linux-clean-common: linux-defconfig-clean |
| 200 | $(MAKE) -C $(LINUX_PATH) $(LINUX_CLEAN_COMMON_FLAGS) clean |
| 201 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 202 | # LINUX_CLEANER_COMMON_FLAGS should be defined in specific makefiles (hikey.mk,...) |
| 203 | .PHONY: linux-cleaner-common |
Pascal Brand | e3d8598 | 2015-09-10 17:20:42 +0200 | [diff] [blame] | 204 | linux-cleaner-common: linux-defconfig-clean |
Victor Chong | 87f5fcf | 2015-11-26 10:52:52 +0900 | [diff] [blame] | 205 | $(MAKE) -C $(LINUX_PATH) $(LINUX_CLEANER_COMMON_FLAGS) distclean |
Pascal Brand | e3d8598 | 2015-09-10 17:20:42 +0200 | [diff] [blame] | 206 | |
Pascal Brand | 440ef9c | 2015-09-08 16:01:58 +0200 | [diff] [blame] | 207 | ################################################################################ |
Pascal Brand | 9a0f50f | 2015-09-08 15:34:17 +0200 | [diff] [blame] | 208 | # EDK2 / Tianocore |
| 209 | ################################################################################ |
| 210 | # Make sure edksetup.sh only will be called once and that we don't rebuild |
| 211 | # BaseTools again and again. |
| 212 | $(EDK2_PATH)/Conf/target.txt: |
Jens Wiklander | 650f298 | 2017-04-05 10:08:59 +0200 | [diff] [blame] | 213 | set -e && cd $(EDK2_PATH) && source edksetup.sh && \ |
Pascal Brand | 9a0f50f | 2015-09-08 15:34:17 +0200 | [diff] [blame] | 214 | $(MAKE) -j1 -C $(EDK2_PATH)/BaseTools |
| 215 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 216 | .PHONY: edk2-common |
Pascal Brand | 9a0f50f | 2015-09-08 15:34:17 +0200 | [diff] [blame] | 217 | edk2-common: $(EDK2_PATH)/Conf/target.txt |
Jens Wiklander | 650f298 | 2017-04-05 10:08:59 +0200 | [diff] [blame] | 218 | set -e && cd $(EDK2_PATH) && source edksetup.sh && \ |
Pascal Brand | 9a0f50f | 2015-09-08 15:34:17 +0200 | [diff] [blame] | 219 | $(call edk2-call) |
| 220 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 221 | .PHONY: edk2-clean-common |
Pascal Brand | 9a0f50f | 2015-09-08 15:34:17 +0200 | [diff] [blame] | 222 | edk2-clean-common: |
Jens Wiklander | 650f298 | 2017-04-05 10:08:59 +0200 | [diff] [blame] | 223 | set -e && cd $(EDK2_PATH) && source edksetup.sh && \ |
Pascal Brand | 9a0f50f | 2015-09-08 15:34:17 +0200 | [diff] [blame] | 224 | $(call edk2-call) clean && \ |
Victor Chong | 2c429d7 | 2017-06-06 15:10:07 +0100 | [diff] [blame] | 225 | $(MAKE) -j1 -C $(EDK2_PATH)/BaseTools clean |
| 226 | rm -rf $(EDK2_PATH)/Build |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 227 | rm -rf $(EDK2_PATH)/Conf/.cache |
Victor Chong | 2c429d7 | 2017-06-06 15:10:07 +0100 | [diff] [blame] | 228 | rm -f $(EDK2_PATH)/Conf/build_rule.txt |
Pascal Brand | 9a0f50f | 2015-09-08 15:34:17 +0200 | [diff] [blame] | 229 | rm -f $(EDK2_PATH)/Conf/target.txt |
Victor Chong | 2c429d7 | 2017-06-06 15:10:07 +0100 | [diff] [blame] | 230 | rm -f $(EDK2_PATH)/Conf/tools_def.txt |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 231 | |
Igor Opaniuk | 97d0529 | 2016-10-26 14:46:14 +0300 | [diff] [blame] | 232 | ################################################################################ |
| 233 | # QEMU / QEMUv8 |
| 234 | ################################################################################ |
| 235 | QEMU_CONFIGURE_PARAMS_COMMON = --cc="$(CCACHE)gcc" --extra-cflags="-Wno-error" |
Pascal Brand | 9a0f50f | 2015-09-08 15:34:17 +0200 | [diff] [blame] | 236 | |
Igor Opaniuk | 97d0529 | 2016-10-26 14:46:14 +0300 | [diff] [blame] | 237 | ifeq ($(QEMU_VIRTFS_ENABLE),y) |
Jerome Forissier | 23b4131 | 2016-11-12 16:02:01 +0100 | [diff] [blame] | 238 | QEMU_CONFIGURE_PARAMS_COMMON += --enable-virtfs |
Igor Opaniuk | 97d0529 | 2016-10-26 14:46:14 +0300 | [diff] [blame] | 239 | QEMU_EXTRA_ARGS +=\ |
| 240 | -fsdev local,id=fsdev0,path=$(QEMU_VIRTFS_HOST_DIR),security_model=none \ |
| 241 | -device virtio-9p-device,fsdev=fsdev0,mount_tag=host |
| 242 | endif |
Igor Opaniuk | 0aea4ef | 2017-01-13 12:52:00 +0200 | [diff] [blame] | 243 | |
| 244 | ifeq ($(QEMU_USERNET_ENABLE),y) |
| 245 | QEMU_EXTRA_ARGS +=\ |
| 246 | -netdev user,id=vmnic -device virtio-net-device,netdev=vmnic |
| 247 | endif |
Jerome Forissier | efd5629 | 2017-01-31 17:46:10 +0100 | [diff] [blame] | 248 | |
| 249 | define run-help |
| 250 | @echo |
| 251 | @echo \* QEMU is now waiting to start the execution |
| 252 | @echo \* Start execution with either a \'c\' followed by \<enter\> in the QEMU console or |
| 253 | @echo \* attach a debugger and continue from there. |
| 254 | @echo \* |
| 255 | @echo \* To run OP-TEE tests, use the xtest command in the \'Normal World\' terminal |
| 256 | @echo \* Enter \'xtest -h\' for help. |
| 257 | @echo |
| 258 | endef |
| 259 | |
Jerome Forissier | 5b58525 | 2017-08-03 13:22:21 +0200 | [diff] [blame] | 260 | ifneq (, $(LAUNCH_TERMINAL)) |
Alex Bennée | 0758060 | 2017-07-07 14:26:51 +0100 | [diff] [blame] | 261 | define launch-terminal |
| 262 | @nc -z 127.0.0.1 $(1) || \ |
| 263 | $(LAUNCH_TERMINAL) $(SOC_TERM_PATH)/soc_term $(1) & |
| 264 | endef |
| 265 | else |
Jerome Forissier | efd5629 | 2017-01-31 17:46:10 +0100 | [diff] [blame] | 266 | gnome-terminal := $(shell command -v gnome-terminal 2>/dev/null) |
| 267 | xterm := $(shell command -v xterm 2>/dev/null) |
| 268 | ifdef gnome-terminal |
| 269 | # Note: the title option (-t) is ignored with gnome-terminal versions |
| 270 | # >= 3.14 and < 3.20 |
| 271 | define launch-terminal |
| 272 | @nc -z 127.0.0.1 $(1) || \ |
| 273 | $(gnome-terminal) -t "$(2)" -x $(SOC_TERM_PATH)/soc_term $(1) & |
| 274 | endef |
| 275 | else |
| 276 | ifdef xterm |
| 277 | define launch-terminal |
| 278 | @nc -z 127.0.0.1 $(1) || \ |
| 279 | $(xterm) -title $(2) -e $(BASH) -c "$(SOC_TERM_PATH)/soc_term $(1)" & |
| 280 | endef |
| 281 | else |
| 282 | check-terminal := @echo "Error: could not find gnome-terminal nor xterm" ; false |
| 283 | endif |
| 284 | endif |
Alex Bennée | 0758060 | 2017-07-07 14:26:51 +0100 | [diff] [blame] | 285 | endif |
Jerome Forissier | efd5629 | 2017-01-31 17:46:10 +0100 | [diff] [blame] | 286 | |
| 287 | define wait-for-ports |
| 288 | @while ! nc -z 127.0.0.1 $(1) || ! nc -z 127.0.0.1 $(2); do sleep 1; done |
| 289 | endef |
| 290 | |
Pascal Brand | 9a0f50f | 2015-09-08 15:34:17 +0200 | [diff] [blame] | 291 | ################################################################################ |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 292 | # OP-TEE |
| 293 | ################################################################################ |
Pascal Brand | 6044eb5 | 2016-02-23 15:48:31 +0100 | [diff] [blame] | 294 | OPTEE_OS_COMMON_FLAGS ?= \ |
| 295 | $(OPTEE_OS_COMMON_EXTRA_FLAGS) \ |
| 296 | CROSS_COMPILE=$(CROSS_COMPILE_S_USER) \ |
Jerome Forissier | ae45fbf | 2015-09-04 09:40:17 +0200 | [diff] [blame] | 297 | CROSS_COMPILE_core=$(CROSS_COMPILE_S_KERNEL) \ |
Victor Chong | badc792 | 2015-12-08 17:23:20 +0000 | [diff] [blame] | 298 | CROSS_COMPILE_ta_arm64=$(AARCH64_CROSS_COMPILE) \ |
| 299 | CROSS_COMPILE_ta_arm32=$(AARCH32_CROSS_COMPILE) \ |
Pascal Brand | 23ef205 | 2016-03-09 15:25:01 +0100 | [diff] [blame] | 300 | CFG_TEE_CORE_LOG_LEVEL=$(CFG_TEE_CORE_LOG_LEVEL) \ |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 301 | DEBUG=$(DEBUG) \ |
| 302 | CFG_TEE_BENCHMARK=$(CFG_TEE_BENCHMARK) |
Jerome Forissier | ae45fbf | 2015-09-04 09:40:17 +0200 | [diff] [blame] | 303 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 304 | .PHONY: optee-os-common |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 305 | optee-os-common: |
Jerome Forissier | ae45fbf | 2015-09-04 09:40:17 +0200 | [diff] [blame] | 306 | $(MAKE) -C $(OPTEE_OS_PATH) $(OPTEE_OS_COMMON_FLAGS) |
| 307 | |
Pascal Brand | 6044eb5 | 2016-02-23 15:48:31 +0100 | [diff] [blame] | 308 | OPTEE_OS_CLEAN_COMMON_FLAGS ?= $(OPTEE_OS_COMMON_EXTRA_FLAGS) |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 309 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 310 | .PHONY: optee-os-clean-common |
Igor Opaniuk | 4f667cd | 2017-05-31 14:11:56 +0300 | [diff] [blame] | 311 | ifeq ($(CFG_TEE_BENCHMARK),y) |
| 312 | optee-os-clean-common: benchmark-app-clean-common |
| 313 | endif |
Igor Opaniuk | 584efe5 | 2017-08-07 01:41:48 +0300 | [diff] [blame] | 314 | optee-os-clean-common: xtest-clean optee-examples-clean |
Jerome Forissier | ae45fbf | 2015-09-04 09:40:17 +0200 | [diff] [blame] | 315 | $(MAKE) -C $(OPTEE_OS_PATH) $(OPTEE_OS_CLEAN_COMMON_FLAGS) clean |
| 316 | |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 317 | OPTEE_CLIENT_COMMON_FLAGS ?= CROSS_COMPILE=$(CROSS_COMPILE_NS_USER) \ |
| 318 | CFG_TEE_BENCHMARK=$(CFG_TEE_BENCHMARK) \ |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 319 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 320 | .PHONY: optee-client-common |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 321 | optee-client-common: |
Jerome Forissier | ae45fbf | 2015-09-04 09:40:17 +0200 | [diff] [blame] | 322 | $(MAKE) -C $(OPTEE_CLIENT_PATH) $(OPTEE_CLIENT_COMMON_FLAGS) |
| 323 | |
Victor Chong | 87f5fcf | 2015-11-26 10:52:52 +0900 | [diff] [blame] | 324 | # OPTEE_CLIENT_CLEAN_COMMON_FLAGS can be defined in specific makefiles |
| 325 | # (hikey.mk,...) if necessary |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 326 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 327 | .PHONY: optee-client-clean-common |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 328 | optee-client-clean-common: |
Jerome Forissier | ae45fbf | 2015-09-04 09:40:17 +0200 | [diff] [blame] | 329 | $(MAKE) -C $(OPTEE_CLIENT_PATH) $(OPTEE_CLIENT_CLEAN_COMMON_FLAGS) \ |
| 330 | clean |
| 331 | |
Pascal Brand | 070d955 | 2015-09-01 15:33:22 +0200 | [diff] [blame] | 332 | ################################################################################ |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 333 | # xtest / optee_test |
| 334 | ################################################################################ |
Jerome Forissier | ae45fbf | 2015-09-04 09:40:17 +0200 | [diff] [blame] | 335 | XTEST_COMMON_FLAGS ?= CROSS_COMPILE_HOST=$(CROSS_COMPILE_NS_USER)\ |
| 336 | CROSS_COMPILE_TA=$(CROSS_COMPILE_S_USER) \ |
| 337 | TA_DEV_KIT_DIR=$(OPTEE_OS_TA_DEV_KIT_DIR) \ |
Etienne Carriere | 5e11351 | 2016-10-21 10:13:57 +0200 | [diff] [blame] | 338 | OPTEE_CLIENT_EXPORT=$(OPTEE_CLIENT_EXPORT) \ |
Pascal Brand | 6044eb5 | 2016-02-23 15:48:31 +0100 | [diff] [blame] | 339 | COMPILE_NS_USER=$(COMPILE_NS_USER) \ |
Igor Opaniuk | 4f667cd | 2017-05-31 14:11:56 +0300 | [diff] [blame] | 340 | O=$(OPTEE_TEST_OUT_PATH) |
Jerome Forissier | ae45fbf | 2015-09-04 09:40:17 +0200 | [diff] [blame] | 341 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 342 | .PHONY: xtest-common |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 343 | xtest-common: optee-os optee-client |
Pascal Brand | dc83b9a | 2015-09-24 02:43:25 +0200 | [diff] [blame] | 344 | $(MAKE) -C $(OPTEE_TEST_PATH) $(XTEST_COMMON_FLAGS) |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 345 | |
Etienne Carriere | 965db7b | 2017-01-10 17:50:21 +0100 | [diff] [blame] | 346 | XTEST_CLEAN_COMMON_FLAGS ?= O=$(OPTEE_TEST_OUT_PATH) \ |
| 347 | TA_DEV_KIT_DIR=$(OPTEE_OS_TA_DEV_KIT_DIR) \ |
Jerome Forissier | ae45fbf | 2015-09-04 09:40:17 +0200 | [diff] [blame] | 348 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 349 | .PHONY: xtest-clean-common |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 350 | xtest-clean-common: |
Pascal Brand | dc83b9a | 2015-09-24 02:43:25 +0200 | [diff] [blame] | 351 | $(MAKE) -C $(OPTEE_TEST_PATH) $(XTEST_CLEAN_COMMON_FLAGS) clean |
Pascal Brand | d6536da | 2015-09-01 10:38:43 +0200 | [diff] [blame] | 352 | |
Pascal Brand | dc83b9a | 2015-09-24 02:43:25 +0200 | [diff] [blame] | 353 | XTEST_PATCH_COMMON_FLAGS ?= $(XTEST_COMMON_FLAGS) |
Jerome Forissier | ae45fbf | 2015-09-04 09:40:17 +0200 | [diff] [blame] | 354 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 355 | .PHONY: xtest-patch-common |
Pascal Brand | dc83b9a | 2015-09-24 02:43:25 +0200 | [diff] [blame] | 356 | xtest-patch-common: |
| 357 | $(MAKE) -C $(OPTEE_TEST_PATH) $(XTEST_PATCH_COMMON_FLAGS) patch |
Victor Chong | 8519bcf | 2016-07-15 08:43:03 +0100 | [diff] [blame] | 358 | |
| 359 | ################################################################################ |
Igor Opaniuk | 584efe5 | 2017-08-07 01:41:48 +0300 | [diff] [blame] | 360 | # sample applications / optee_examples |
Victor Chong | 8519bcf | 2016-07-15 08:43:03 +0100 | [diff] [blame] | 361 | ################################################################################ |
Igor Opaniuk | 584efe5 | 2017-08-07 01:41:48 +0300 | [diff] [blame] | 362 | OPTEE_EXAMPLES_COMMON_FLAGS ?= HOST_CROSS_COMPILE=$(CROSS_COMPILE_NS_USER)\ |
Victor Chong | 8519bcf | 2016-07-15 08:43:03 +0100 | [diff] [blame] | 363 | TA_CROSS_COMPILE=$(CROSS_COMPILE_S_USER) \ |
| 364 | TA_DEV_KIT_DIR=$(OPTEE_OS_TA_DEV_KIT_DIR) \ |
| 365 | TEEC_EXPORT=$(OPTEE_CLIENT_EXPORT) |
| 366 | |
Igor Opaniuk | 584efe5 | 2017-08-07 01:41:48 +0300 | [diff] [blame] | 367 | .PHONY: optee-examples-common |
| 368 | optee-examples-common: optee-os optee-client |
| 369 | $(MAKE) -C $(OPTEE_EXAMPLES_PATH) $(OPTEE_EXAMPLES_COMMON_FLAGS) |
Victor Chong | 8519bcf | 2016-07-15 08:43:03 +0100 | [diff] [blame] | 370 | |
Igor Opaniuk | 584efe5 | 2017-08-07 01:41:48 +0300 | [diff] [blame] | 371 | OPTEE_EXAMPLES_CLEAN_COMMON_FLAGS ?= TA_DEV_KIT_DIR=$(OPTEE_OS_TA_DEV_KIT_DIR) |
Victor Chong | 8519bcf | 2016-07-15 08:43:03 +0100 | [diff] [blame] | 372 | |
Igor Opaniuk | 584efe5 | 2017-08-07 01:41:48 +0300 | [diff] [blame] | 373 | .PHONY: optee-examples-clean-common |
| 374 | optee-examples-clean-common: |
| 375 | $(MAKE) -C $(OPTEE_EXAMPLES_PATH) \ |
| 376 | $(OPTEE_EXAMPLES_CLEAN_COMMON_FLAGS) clean |
Etienne Carriere | 5e11351 | 2016-10-21 10:13:57 +0200 | [diff] [blame] | 377 | |
| 378 | ################################################################################ |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 379 | # benchmark_app |
| 380 | ################################################################################ |
Yves Lefloch | 221154a | 2017-08-02 17:36:58 +0200 | [diff] [blame] | 381 | BENCHMARK_APP_COMMON_FLAGS ?= CROSS_COMPILE=$(CROSS_COMPILE_NS_USER) \ |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 382 | TEEC_EXPORT=$(OPTEE_CLIENT_EXPORT) \ |
Igor Opaniuk | 7b3a94c | 2017-09-13 13:15:30 +0300 | [diff] [blame] | 383 | TEEC_INTERNAL_INCLUDES=$(OPTEE_CLIENT_PATH)/libteec \ |
| 384 | MULTIARCH=$(MULTIARCH) |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 385 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 386 | .PHONY: benchmark-app-common |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 387 | benchmark-app-common: optee-os optee-client |
| 388 | $(MAKE) -C $(BENCHMARK_APP_PATH) $(BENCHMARK_APP_COMMON_FLAGS) |
| 389 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 390 | .PHONY: benchmark-app-clean-common |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 391 | benchmark-app-clean-common: |
| 392 | $(MAKE) -C $(BENCHMARK_APP_PATH) clean |
| 393 | |
| 394 | ################################################################################ |
Etienne Carriere | 5e11351 | 2016-10-21 10:13:57 +0200 | [diff] [blame] | 395 | # rootfs |
| 396 | ################################################################################ |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 397 | .PHONY: update_rootfs-common |
Etienne Carriere | 5e11351 | 2016-10-21 10:13:57 +0200 | [diff] [blame] | 398 | update_rootfs-common: busybox filelist-tee |
| 399 | cat $(GEN_ROOTFS_PATH)/filelist-final.txt > $(GEN_ROOTFS_PATH)/filelist.tmp |
| 400 | cat $(GEN_ROOTFS_FILELIST) >> $(GEN_ROOTFS_PATH)/filelist.tmp |
| 401 | cd $(GEN_ROOTFS_PATH) && \ |
| 402 | $(LINUX_PATH)/usr/gen_init_cpio $(GEN_ROOTFS_PATH)/filelist.tmp | \ |
| 403 | gzip > $(GEN_ROOTFS_PATH)/filesystem.cpio.gz |
| 404 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 405 | .PHONY: update_rootfs-clean-common |
Etienne Carriere | 5e11351 | 2016-10-21 10:13:57 +0200 | [diff] [blame] | 406 | update_rootfs-clean-common: |
| 407 | rm -f $(GEN_ROOTFS_PATH)/filesystem.cpio.gz |
| 408 | rm -f $(GEN_ROOTFS_PATH)/filelist-all.txt |
| 409 | rm -f $(GEN_ROOTFS_PATH)/filelist-tmp.txt |
| 410 | rm -f $(GEN_ROOTFS_FILELIST) |
| 411 | |
Victor Chong | 46f8585 | 2017-08-09 08:26:41 +0100 | [diff] [blame] | 412 | .PHONY: filelist-tee-common |
Igor Opaniuk | 4f667cd | 2017-05-31 14:11:56 +0300 | [diff] [blame] | 413 | ifeq ($(CFG_TEE_BENCHMARK),y) |
| 414 | filelist-tee-common: benchmark-app |
| 415 | endif |
Etienne Carriere | 5e11351 | 2016-10-21 10:13:57 +0200 | [diff] [blame] | 416 | filelist-tee-common: fl:=$(GEN_ROOTFS_FILELIST) |
Igor Opaniuk | 584efe5 | 2017-08-07 01:41:48 +0300 | [diff] [blame] | 417 | filelist-tee-common: optee-client xtest optee-examples |
Etienne Carriere | 5e11351 | 2016-10-21 10:13:57 +0200 | [diff] [blame] | 418 | @echo "# filelist-tee-common /start" > $(fl) |
| 419 | @echo "dir /lib/optee_armtz 755 0 0" >> $(fl) |
Igor Opaniuk | 584efe5 | 2017-08-07 01:41:48 +0300 | [diff] [blame] | 420 | @if [ -e $(OPTEE_EXAMPLES_PATH)/out/ca ]; then \ |
| 421 | for file in $(OPTEE_EXAMPLES_PATH)/out/ca/*; do \ |
| 422 | echo "file /usr/bin/$$(basename $$file)" \ |
Etienne Carriere | a13ff03 | 2017-09-05 16:11:24 +0200 | [diff] [blame] | 423 | "$$file 755 0 0" >> $(fl); \ |
Igor Opaniuk | 584efe5 | 2017-08-07 01:41:48 +0300 | [diff] [blame] | 424 | done; \ |
| 425 | fi |
| 426 | @if [ -e $(OPTEE_EXAMPLES_PATH)/out/ta ]; then \ |
| 427 | for file in $(OPTEE_EXAMPLES_PATH)/out/ta/*; do \ |
| 428 | echo "file /lib/optee_armtz/$$(basename $$file)" \ |
Etienne Carriere | a13ff03 | 2017-09-05 16:11:24 +0200 | [diff] [blame] | 429 | "$$file 755 0 0" >> $(fl); \ |
Igor Opaniuk | 584efe5 | 2017-08-07 01:41:48 +0300 | [diff] [blame] | 430 | done; \ |
| 431 | fi |
Etienne Carriere | 5e11351 | 2016-10-21 10:13:57 +0200 | [diff] [blame] | 432 | @echo "# xtest / optee_test" >> $(fl) |
| 433 | @find $(OPTEE_TEST_OUT_PATH) -type f -name "xtest" | \ |
| 434 | sed 's/\(.*\)/file \/bin\/xtest \1 755 0 0/g' >> $(fl) |
| 435 | @find $(OPTEE_TEST_OUT_PATH) -name "*.ta" | \ |
| 436 | sed 's/\(.*\)\/\(.*\)/file \/lib\/optee_armtz\/\2 \1\/\2 444 0 0/g' \ |
| 437 | >> $(fl) |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 438 | @if [ -e $(BENCHMARK_APP_PATH)/benchmark ]; then \ |
| 439 | echo "file /bin/benchmark" \ |
| 440 | "$(BENCHMARK_APP_PATH)/benchmark 755 0 0" >> $(fl); \ |
Igor Opaniuk | 7b3a94c | 2017-09-13 13:15:30 +0300 | [diff] [blame] | 441 | echo "slink /lib/libyaml-0.so.2 libyaml-0.so.2.0.5 755 0 0" \ |
| 442 | >> $(fl); \ |
| 443 | echo "file /lib/libyaml-0.so.2.0.5 $(LIBYAML_LIB_PATH)/libyaml-0.so.2.0.5 755 0 0" \ |
| 444 | >> $(fl); \ |
Igor Opaniuk | 27edfc7 | 2016-10-25 18:33:54 +0300 | [diff] [blame] | 445 | fi |
Igor Opaniuk | 0aea4ef | 2017-01-13 12:52:00 +0200 | [diff] [blame] | 446 | @if [ "$(QEMU_USERNET_ENABLE)" = "y" ]; then \ |
| 447 | echo "slink /etc/rc.d/S02_udhcp_networking /etc/init.d/udhcpc 755 0 0" \ |
| 448 | >> $(fl); \ |
| 449 | fi |
Etienne Carriere | 5e11351 | 2016-10-21 10:13:57 +0200 | [diff] [blame] | 450 | @echo "# Secure storage dir" >> $(fl) |
| 451 | @echo "dir /data 755 0 0" >> $(fl) |
| 452 | @echo "dir /data/tee 755 0 0" >> $(fl) |
| 453 | @if [ -e $(OPTEE_GENDRV_MODULE) ]; then \ |
| 454 | echo "# OP-TEE device" >> $(fl); \ |
| 455 | echo "dir /lib/modules 755 0 0" >> $(fl); \ |
| 456 | echo "dir /lib/modules/$(call KERNEL_VERSION) 755 0 0" \ |
| 457 | >> $(fl); \ |
| 458 | echo "file /lib/modules/$(call KERNEL_VERSION)/optee.ko" \ |
| 459 | "$(OPTEE_GENDRV_MODULE) 755 0 0" \ |
| 460 | >> $(fl); \ |
| 461 | fi |
| 462 | @echo "# OP-TEE Client" >> $(fl) |
| 463 | @echo "file /bin/tee-supplicant $(OPTEE_CLIENT_EXPORT)/bin/tee-supplicant 755 0 0" \ |
| 464 | >> $(fl) |
| 465 | @echo "file /lib/libteec.so.1.0 $(OPTEE_CLIENT_EXPORT)/lib/libteec.so.1.0 755 0 0" \ |
| 466 | >> $(fl) |
| 467 | @echo "slink /lib/libteec.so.1 libteec.so.1.0 755 0 0" >> $(fl) |
| 468 | @echo "slink /lib/libteec.so libteec.so.1 755 0 0" >> $(fl) |
| 469 | @if [ -e $(OPTEE_CLIENT_EXPORT)/lib/libsqlfs.so.1.0 ]; then \ |
| 470 | echo "file /lib/libsqlfs.so.1.0" \ |
| 471 | "$(OPTEE_CLIENT_EXPORT)/lib/libsqlfs.so.1.0 755 0 0" \ |
| 472 | >> $(fl); \ |
| 473 | echo "slink /lib/libsqlfs.so.1 libsqlfs.so.1.0 755 0 0" >> $(fl); \ |
| 474 | echo "slink /lib/libsqlfs.so libsqlfs.so.1 755 0 0" >> $(fl); \ |
| 475 | fi |
Jerome Forissier | 1333db4 | 2017-01-18 10:20:51 +0100 | [diff] [blame] | 476 | @echo "file /etc/init.d/optee $(BUILD_PATH)/init.d.optee 755 0 0" >> $(fl) |
| 477 | @echo "slink /etc/rc.d/S09_optee /etc/init.d/optee 755 0 0" >> $(fl) |
Etienne Carriere | 5e11351 | 2016-10-21 10:13:57 +0200 | [diff] [blame] | 478 | @echo "# filelist-tee-common /end" >> $(fl) |