From 7b3a94cacc8ac0967db3c0a2952a778319ba7256 Mon Sep 17 00:00:00 2001
From: Igor Opaniuk <igor.opaniuk@linaro.org>
Date: Wed, 13 Sep 2017 13:15:30 +0300
Subject: [PATCH] benchmark: add support for libyaml

1. Add passing of MULTIARCH var to optee_benchmark main Makefile
2. Add packing of libyaml into rootfs

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org
Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
---
 common.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/common.mk b/common.mk
index c428a1c..15116ca 100644
--- a/common.mk
+++ b/common.mk
@@ -18,6 +18,7 @@ OPTEE_TEST_PATH			?= $(ROOT)/optee_test
 OPTEE_TEST_OUT_PATH		?= $(ROOT)/optee_test/out
 OPTEE_EXAMPLES_PATH		?= $(ROOT)/optee_examples
 BENCHMARK_APP_PATH		?= $(ROOT)/optee_benchmark
+LIBYAML_LIB_PATH		?= $(BENCHMARK_APP_PATH)/libyaml/out/lib
 
 # default high verbosity. slow uarts shall specify lower if prefered
 CFG_TEE_CORE_LOG_LEVEL		?= 3
@@ -379,7 +380,8 @@ optee-examples-clean-common:
 ################################################################################
 BENCHMARK_APP_COMMON_FLAGS ?= CROSS_COMPILE=$(CROSS_COMPILE_NS_USER) \
 	TEEC_EXPORT=$(OPTEE_CLIENT_EXPORT) \
-	TEEC_INTERNAL_INCLUDES=$(OPTEE_CLIENT_PATH)/libteec
+	TEEC_INTERNAL_INCLUDES=$(OPTEE_CLIENT_PATH)/libteec \
+	MULTIARCH=$(MULTIARCH)
 
 .PHONY: benchmark-app-common
 benchmark-app-common: optee-os optee-client
@@ -436,6 +438,10 @@ filelist-tee-common: optee-client xtest optee-examples
 	@if [ -e $(BENCHMARK_APP_PATH)/benchmark ]; then \
 		echo "file /bin/benchmark" \
 			"$(BENCHMARK_APP_PATH)/benchmark 755 0 0"	>> $(fl); \
+		echo "slink /lib/libyaml-0.so.2 libyaml-0.so.2.0.5 755 0 0" \
+									>> $(fl); \
+		echo "file /lib/libyaml-0.so.2.0.5 $(LIBYAML_LIB_PATH)/libyaml-0.so.2.0.5 755 0 0" \
+									>> $(fl); \
 	fi
 	@if [ "$(QEMU_USERNET_ENABLE)" = "y" ]; then \
 		echo "slink /etc/rc.d/S02_udhcp_networking /etc/init.d/udhcpc 755 0 0" \
-- 
GitLab