From patchwork Mon Jan 7 10:24:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 1021259 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="LKDm1xhF"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43YBP51mFYz9sDn for ; Mon, 7 Jan 2019 21:25:45 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BBB22867DF; Mon, 7 Jan 2019 10:25:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kt6r6wR4Lpez; Mon, 7 Jan 2019 10:25:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 075B28637D; Mon, 7 Jan 2019 10:25:32 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id DBA3F1C2E2B for ; Mon, 7 Jan 2019 10:25:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D89BC8671F for ; Mon, 7 Jan 2019 10:25:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t5Ojj0neaXOY for ; Mon, 7 Jan 2019 10:25:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4255886354 for ; Mon, 7 Jan 2019 10:25:18 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id d39so318165edb.12 for ; Mon, 07 Jan 2019 02:25:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Uq5U0J8UBKzShRaGiN3UEEeMALxWiILX9y3Mj6ITH/s=; b=LKDm1xhFpnzZq4Dfic6MLx8yDXfwi0nCPpau19Fzm2kEEZ30oao9Pb8ocUBzV3Qy64 SNYGoXHurJ6/vuN/xDeeHfIySyJ+yRi8y2EolhM01WIhPxmJgU0nQgUcD/hurFbIY63z 3bOB7rDYMbvS9PEWEg0uJtsvF15HMdi+hhniY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Uq5U0J8UBKzShRaGiN3UEEeMALxWiILX9y3Mj6ITH/s=; b=fwgf7KVeYEDSJx0HSLW5FJlPfLoNNMXMbzK4bYh2sm6AMfe7Go7e/y6/cqA/mUt8Ix YuB/eZ+5jIPdK3e9DOM96UGMGO9y8T8c+PxYrlaAAm+IjJPD6ngo4WQ1V5xjOVTRTTba ndv2LiQ7dcigA1e923ul63laG1D/mi8gWgdSEua+1u7vkrECyH7VvV4bIOiPVdzaCzHU AOUhn/aviK8nqQiYaEA/p+qeHu0wtOFYNoRQgsqqGbH3q3zz8VqCMqRnDwkvn18Z1aYa Ng9WsYD/3ygGKlPqg8Lt4Ifr+7XjDd+wJlfQ8oKNzVy7QhHbymWxklr2qXBy2n/vNM1o pPbg== X-Gm-Message-State: AA+aEWYp7FULn7cYhITlBxS/dcw0W8QJKMO8DPcmeIQHIKrmJrycO2Yo fUIdWmS0VW3wARtko4H9dtMMIGTsUYJYigaX X-Google-Smtp-Source: AFSGD/WoEQ6hu7GGb7rFVK7j7FEtHnZTAo1RJVyIZAKJl5c2+VzD2NQFbocelUQDv6vSxCN097uWCg== X-Received: by 2002:a50:ccdd:: with SMTP id b29mr54689887edj.102.1546856716265; Mon, 07 Jan 2019 02:25:16 -0800 (PST) Received: from lmenx29q.lme.st.com. (gam64-h01-176-179-138-108.dsl.sta.abo.bbox.fr. [176.179.138.108]) by smtp.gmail.com with ESMTPSA id r51sm29418582eda.64.2019.01.07.02.25.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Jan 2019 02:25:15 -0800 (PST) From: Etienne Carriere To: buildroot@buildroot.org Date: Mon, 7 Jan 2019 11:24:56 +0100 Message-Id: <1546856698-20032-5-git-send-email-etienne.carriere@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1546856698-20032-1-git-send-email-etienne.carriere@linaro.org> References: <1542996547-5003-1-git-send-email-etienne.carriere@linaro.org> <1546856698-20032-1-git-send-email-etienne.carriere@linaro.org> Subject: [Buildroot] [PATCH v3 5/7] optee-benchmark: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Etienne Carriere MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" OP-TEE performance benchmark tools for the OP-TEE project. This packages generates embedded Linux based OS materials used to retrieve execution timing information on invocation of the OP-TEE secure services. It is added next to the OP-TEE client package in BR configuration. This change references in Buildroot the today's latest OP-TEE revision release tagged 3.3.0 with an added patch to fix an issue reported by recent GCC toolchains. Signed-off-by: Etienne Carriere --- Changes v2 -> v3: - Add an entry in file DEVELOPERS. - Clean Config.in layout and description sections. - Drop BR2_PACKAGE_OPTEE_BENCHMARK_SYNCED_VERSION. - Clean optee-benchmark.mk layout. - Replace common optee-benchmark.hash with per-version .hash files. - Add a patch on 3.3.0 to fix an issue reported through GCC warns. Changes v1 -> v2: - Add dependency on OP-TEE client. - Add option BR2_PACKAGE_OPTEE_BENCHMARK_SYNCED_VERSION to ensure OP-TEE benchmark version is synced with OP-TEE client version. - Remove useless OPTEE_BENCHMARK_INSTALL_STAGING and OPTEE_BENCHMARK_INSTALL_IMAGES. - Remove unused BR2_PACKAGE_OPTEE_BENCHMARK_GIT_REFERENCE. - Remove useless _INSTALL_STAGING/_INSTALL_IMAGES=YES. --- DEVELOPERS | 1 + package/Config.in | 1 + ...ix-format-specifier-in-call-to-INFO-macro.patch | 30 ++++++++++++ package/optee-benchmark/3.3.0/optee-benchmark.hash | 2 + package/optee-benchmark/Config.in | 55 ++++++++++++++++++++++ package/optee-benchmark/optee-benchmark.mk | 22 +++++++++ 6 files changed, 111 insertions(+) create mode 100644 package/optee-benchmark/3.3.0/0001-Fix-format-specifier-in-call-to-INFO-macro.patch create mode 100644 package/optee-benchmark/3.3.0/optee-benchmark.hash create mode 100644 package/optee-benchmark/Config.in create mode 100644 package/optee-benchmark/optee-benchmark.mk diff --git a/DEVELOPERS b/DEVELOPERS index 28ba658..4dd7f4a 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -683,6 +683,7 @@ F: package/szip/ N: Etienne Carriere F: boot/optee-os/ +F: package/optee-benchmark/ F: package/optee-client/ F: package/optee-examples/ F: package/optee-test/ diff --git a/package/Config.in b/package/Config.in index e5b6dad..cdee281 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2076,6 +2076,7 @@ endmenu menu "Security" source "package/checkpolicy/Config.in" + source "package/optee-benchmark/Config.in" source "package/optee-client/Config.in" source "package/optee-examples/Config.in" source "package/optee-test/Config.in" diff --git a/package/optee-benchmark/3.3.0/0001-Fix-format-specifier-in-call-to-INFO-macro.patch b/package/optee-benchmark/3.3.0/0001-Fix-format-specifier-in-call-to-INFO-macro.patch new file mode 100644 index 0000000..6a2cd37 --- /dev/null +++ b/package/optee-benchmark/3.3.0/0001-Fix-format-specifier-in-call-to-INFO-macro.patch @@ -0,0 +1,30 @@ +commit ecba70dd88f33f3c770a4c564b49d7e872eab34e +Author: ChrisG55 +Date: Thu Dec 6 11:52:29 2018 +0100 + + Fix format specifier in call to INFO macro + + Improper use of format specifiers for arguments of type intptr_t and size_t + raises warnings at compile time. Compilation breaks when GCC's -Werror flag is + set, which is the default. By using the appropriate format specifiers, no + warnings are raised and compilation succeeds. + + Reported-by: ChrisG55 + Tested-by: ChrisG55 + Fixes: 55fcc4ae0de4b9a2f7253562f8083694e69a8e33 + Signed-off-by: ChrisG55 + Reviewed-by: Joakim Bech + +diff --git a/main.c b/main.c +index 3d53dca..86225bd 100644 +--- a/main.c ++++ b/main.c +@@ -106,7 +106,7 @@ static void alloc_bench_buf(uint32_t cores) + paddr_ts_buf = op.params[0].value.a; + size = op.params[0].value.b; + +- INFO("ts buffer paddr = %x, size = %d\n", paddr_ts_buf, size); ++ INFO("ts buffer paddr = %" PRIiPTR ", size = %zu\n", paddr_ts_buf, size); + if (paddr_ts_buf) { + + bench_ts_global = mmap_paddr(paddr_ts_buf, size); diff --git a/package/optee-benchmark/3.3.0/optee-benchmark.hash b/package/optee-benchmark/3.3.0/optee-benchmark.hash new file mode 100644 index 0000000..d93c26c --- /dev/null +++ b/package/optee-benchmark/3.3.0/optee-benchmark.hash @@ -0,0 +1,2 @@ +# From https://github.com/linaro-swg/optee_benchmark/archive/3.3.0.tar.gz +sha256 bfba3749ac8b37628550696f0625452ae8aef060eff5b3b1c4283a5dad8a3383 optee-benchmark-3.3.0.tar.gz diff --git a/package/optee-benchmark/Config.in b/package/optee-benchmark/Config.in new file mode 100644 index 0000000..99794c3 --- /dev/null +++ b/package/optee-benchmark/Config.in @@ -0,0 +1,55 @@ +config BR2_PACKAGE_OPTEE_BENCHMARK + bool "optee-benchmark" + select BR2_PACKAGE_OPTEE_CLIENT + select BR2_PACKAGE_LIBYAML + help + Enable the OP-TEE benchmark package that brings facilities + for profiling traversal and execution timings when + invoking OP-TEE. OP-TEE benchmark is a component delivered + by the OP-TEE project. + + http://github.com/linaro-swg/optee_benchmark + +if BR2_PACKAGE_OPTEE_BENCHMARK + +choice + prompt "version" + default BR2_PACKAGE_OPTEE_BENCHMARK_LATEST + help + Select the version of OP-TEE benchmark you want to use + +config BR2_PACKAGE_OPTEE_BENCHMARK_LATEST + bool "3.3.0" + help + This fetches the registered release tag from the + OP-TEE official Git repository. + +config BR2_PACKAGE_OPTEE_BENCHMARK_CUSTOM_GIT + bool "Custom Git repository" + help + Sync with a specific OP-TEE Git repository. + +endchoice + +if BR2_PACKAGE_OPTEE_BENCHMARK_CUSTOM_GIT + +config BR2_PACKAGE_OPTEE_BENCHMARK_CUSTOM_REPO_URL + string "URL of custom repository" + help + Specific location of the reference source tree Git repository. + +config BR2_PACKAGE_OPTEE_BENCHMARK_CUSTOM_REPO_VERSION + string "Custom repository version" + help + Revision to use in the typical format used by + Git E.G. a sha id, a tag, branch, .. + +endif + +config BR2_PACKAGE_OPTEE_BENCHMARK_VERSION + string + default "3.3.0" if BR2_PACKAGE_OPTEE_BENCHMARK_LATEST + default BR2_PACKAGE_OPTEE_BENCHMARK_CUSTOM_REPO_VERSION \ + if BR2_PACKAGE_OPTEE_BENCHMARK_CUSTOM_GIT + +endif #BR2_PACKAGE_OPTEE_BENCHMARK diff --git a/package/optee-benchmark/optee-benchmark.mk b/package/optee-benchmark/optee-benchmark.mk new file mode 100644 index 0000000..8eef0f6 --- /dev/null +++ b/package/optee-benchmark/optee-benchmark.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# optee-benchmarch +# +################################################################################ + +OPTEE_BENCHMARK_VERSION = $(call qstrip,$(BR2_PACKAGE_OPTEE_BENCHMARK_VERSION)) +OPTEE_BENCHMARK_LICENSE = BSD-2-Clause + +OPTEE_BENCHMARK_DEPENDENCIES = optee-client libyaml + +ifeq ($(BR2_PACKAGE_OPTEE_BENCHMARK_LATEST),y) +OPTEE_BENCHMARK_SITE = $(call github,linaro-swg,optee_benchmark,$(OPTEE_BENCHMARK_VERSION)) +endif + +ifeq ($(BR2_PACKAGE_OPTEE_BENCHMARK_CUSTOM_GIT),y) +OPTEE_BENCHMARK_SITE = $(call qstrip,$(BR2_PACKAGE_OPTEE_BENCHMARK_CUSTOM_REPO_URL)) +OPTEE_BENCHMARK_SITE_METHOD = git +BR_NO_CHECK_HASH_FOR += $(OPTEE_BENCHMARK_SOURCE) +endif + +$(eval $(cmake-package))