From patchwork Mon Apr 7 02:29:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 27886 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0266A2055D for ; Mon, 7 Apr 2014 02:30:39 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rd18sf26525716iec.0 for ; Sun, 06 Apr 2014 19:30:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=nvWyjV2zXEwbwem/oWhb5mv9kvaFxZjAzODmf1HZfC4=; b=RbIL8vE37XbLKcsnYA96O75MJMCVu9f8v1r6nYOi9a+XMvao/5c/P9ep37Iasn2Snc snyt9YoL79Bs7aNXBHvjULbPnBIxhpoLBqwMFrDdyu8bFv1mKc3LppxcguoqNev/Vmg5 VWqIepT2dzODNnMASuUX9/r3g1j496v+lWLhGmnTm2FiAhWG/s8AY3P6HxMVON0AME0i oM7wguBdIbJcJVGuHY8LhnsSP4gX0c+73ENbc3Sm4jkFVz7KBT4NckEk7Nyf+nDF4Zd4 QcODKXvKJjHdz0g6Bwu8KR39zLZDZprY63M+cNCOUz4tXDL6+IXiRWVOc55/p9EzC9Ar 8b7Q== X-Gm-Message-State: ALoCoQlpEeR4pfpPHe7Tlyv1poqTH9FHKuhr+Vy+xgwpikZIHNaNhR9yEXcxmEuvrt9idaZ4YvIN X-Received: by 10.42.20.144 with SMTP id g16mr6443809icb.29.1396837839234; Sun, 06 Apr 2014 19:30:39 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.103 with SMTP id v94ls1677400qge.0.gmail; Sun, 06 Apr 2014 19:30:39 -0700 (PDT) X-Received: by 10.58.107.65 with SMTP id ha1mr18627234veb.1.1396837839136; Sun, 06 Apr 2014 19:30:39 -0700 (PDT) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id rn1si51835vec.78.2014.04.06.19.30.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 06 Apr 2014 19:30:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id oy12so3036391veb.26 for ; Sun, 06 Apr 2014 19:30:39 -0700 (PDT) X-Received: by 10.220.11.208 with SMTP id u16mr10126917vcu.19.1396837839043; Sun, 06 Apr 2014 19:30:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp125976vcv; Sun, 6 Apr 2014 19:30:38 -0700 (PDT) X-Received: by 10.66.163.2 with SMTP id ye2mr893990pab.110.1396837838298; Sun, 06 Apr 2014 19:30:38 -0700 (PDT) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id u6si7611359paa.421.2014.04.06.19.30.37 for ; Sun, 06 Apr 2014 19:30:38 -0700 (PDT) Received-SPF: pass (google.com: domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Received: from mail.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id F26306F778; Mon, 7 Apr 2014 02:30:29 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from vms173025pub.verizon.net (vms173025pub.verizon.net [206.46.173.25]) by mail.openembedded.org (Postfix) with ESMTP id AA3396EBA4 for ; Mon, 7 Apr 2014 02:29:43 +0000 (UTC) Received: from gandalf.denix.org ([unknown] [71.191.205.189]) by vms173025.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0N3N00F1I2X4WEB0@vms173025.mailsrvcs.net> for openembedded-core@lists.openembedded.org; Sun, 06 Apr 2014 21:29:43 -0500 (CDT) Received: from localhost.localdomain (elrond [192.168.0.7]) by gandalf.denix.org (Postfix) with ESMTP id 3457E20357; Sun, 06 Apr 2014 22:29:28 -0400 (EDT) From: Denys Dmytriyenko To: openembedded-core@lists.openembedded.org Date: Sun, 06 Apr 2014 22:29:15 -0400 Message-id: <1396837755-4659-4-git-send-email-denis@denix.org> X-Mailer: git-send-email 1.9.1 In-reply-to: <1396837755-4659-1-git-send-email-denis@denix.org> References: <1396837755-4659-1-git-send-email-denis@denix.org> Cc: Denys Dmytriyenko Subject: [OE-core] [PATCH 4/4] cryptodev-tests: recipe for cryptodev test suite based on OpenSSL X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: denis@denix.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Denys Dmytriyenko Signed-off-by: Denys Dmytriyenko --- .../cryptodev/cryptodev-tests_1.6.bb | 23 ++++++++ ...pile-and-install-rules-for-cryptodev-test.patch | 69 ++++++++++++++++++++++ ...ests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch | 29 +++++++++ 3 files changed, 121 insertions(+) create mode 100644 meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb create mode 100644 meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch create mode 100644 meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch diff --git a/meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb new file mode 100644 index 0000000..efc41ae --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb @@ -0,0 +1,23 @@ +require cryptodev_${PV}.inc + +SUMMARY = "A test suite for /dev/crypto device driver" + +DEPENDS += "openssl" + +SRC_URI += " \ +file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \ +file://0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch \ +" + +EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' + +do_compile() { + oe_runmake testprogs +} + +do_install() { + oe_runmake install_tests +} + +FILES_${PN}-dbg += "${bindir}/tests_cryptodev/.debug" +FILES_${PN} = "${bindir}/tests_cryptodev/*" diff --git a/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch b/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch new file mode 100644 index 0000000..cb871f6 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch @@ -0,0 +1,69 @@ +From 1980a8f4779a955e73285e7a0d86549b69bea5c8 Mon Sep 17 00:00:00 2001 +From: Yu Zongchun +Date: Sun, 28 Apr 2013 14:39:22 +0800 +Subject: [PATCH] Add the compile and install rules for cryptodev tests folder + +This is required to install the cryptodev tests folder to rootfs + +Signed-off-by: Yu Zongchun + +Upstream-Status: Pending + +--- + Makefile | 6 ++++++ + tests/Makefile | 8 ++++++++ + 2 files changed, 14 insertions(+), 0 deletions(-) + +diff --git a/Makefile b/Makefile +index 2be8825..4cbb865 100644 +--- a/Makefile ++++ b/Makefile +@@ -17,6 +17,9 @@ install: + @echo "Installing cryptodev.h in /usr/include/crypto ..." + @install -D crypto/cryptodev.h /usr/include/crypto/cryptodev.h + ++install_tests: ++ make -C tests install DESTDIR=$(PREFIX) ++ + clean: + make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean + rm -f $(hostprogs) *~ +@@ -25,6 +28,9 @@ clean: + check: + KERNEL_DIR=$(KERNEL_DIR) make -C tests check + ++testprogs: ++ KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs ++ + FILEBASE = cryptodev-linux-$(VERSION) + TMPDIR ?= /tmp + OUTPUT = $(FILEBASE).tar.gz +diff --git a/tests/Makefile b/tests/Makefile +index 87ca3c7..0488cf6 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o + example-async-speed-objs := async_speed.o + example-hashcrypt-speed-objs := hashcrypt_speed.c + ++install: ++ install -d $(DESTDIR)/usr/bin/tests_cryptodev ++ for bin in $(hostprogs); do \ ++ install -m 755 $${bin} $(DESTDIR)/usr/bin/tests_cryptodev/; \ ++ done ++ + check: $(hostprogs) + ./cipher + ./hmac +@@ -28,6 +34,8 @@ check: $(hostprogs) + ./cipher-gcm + ./cipher-aead + ++testprogs: $(hostprogs) ++ + clean: + rm -f *.o *~ $(hostprogs) + +-- +1.7.5.4 + diff --git a/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch b/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch new file mode 100644 index 0000000..f5ab8b4 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch @@ -0,0 +1,29 @@ +From 47ff1eb9bb4f872c1d731b93d334ee5865bf3439 Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Sun, 6 Apr 2014 22:16:30 -0400 +Subject: [PATCH] Fix tests Makefile usage of LDLIBS vs. LDFLAGS + +Libraries must come after objects, as link order matters, especially +when using linker flags like -Wl,--as-needed. + +Signed-off-by: Denys Dmytriyenko + +Upstream-Status: Pending +--- + tests/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/Makefile b/tests/Makefile +index cd202af..67c3c83 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -39,5 +39,5 @@ testprogs: $(hostprogs) + clean: + rm -f *.o *~ $(hostprogs) + +-${comp_progs}: LDFLAGS += -lssl -lcrypto ++${comp_progs}: LDLIBS += -lssl -lcrypto + ${comp_progs}: %: %.o openssl_wrapper.o +-- +1.9.1 +