From patchwork Wed May 14 20:30:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 30195 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 033C520446 for ; Wed, 14 May 2014 20:31:08 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id ma3sf459222pbc.11 for ; Wed, 14 May 2014 13:31:08 -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:organization: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=RE8KQH1eLw421jKhuRDqPgWhSaTJXDQTFno4BHNSvf0=; b=ZvaZP2UBKMrydYC0ybIKtJFytWiaIEruLKyV9i2LO+A16Qt4Lmf4PSmSGukS2RKkda RJsS5E7OuP2HVoIgSXLkerXA2PLMDxR0Cr/DuAODCHDwdkGRan/M6ZgrdOVeI8rpjGd/ Zxv6WVpgsXc9see9lfAZD0FWmEy1oJhR0lIjlMpMWXYxrzj4tIU21cZKHB79kFfq76Yj RA7CAzIGlRswOdCKN83zGOJNjZeDe96zk9y+w2Z3rGvyFPyMhqnoHdzVGIlZgXf5O0Q6 uwcyCkS+/6gbGxsjX08aZSkeWrzA7RAbMI3VsPQRRoELgkPV/ee5FlJWvfRwmQD/UDjS uvpQ== X-Gm-Message-State: ALoCoQnNpeb5U3pd0FAzYsE8pF7jcOO9p+A0Fg996YdVSVsvxvLIz+fcm1OfWJMZUOaCy5R/jPlU X-Received: by 10.66.169.231 with SMTP id ah7mr3009254pac.40.1400099468269; Wed, 14 May 2014 13:31:08 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.145 with SMTP id 17ls2562750qgn.21.gmail; Wed, 14 May 2014 13:31:08 -0700 (PDT) X-Received: by 10.58.116.175 with SMTP id jx15mr4574474veb.9.1400099468017; Wed, 14 May 2014 13:31:08 -0700 (PDT) Received: from mail-ve0-x22f.google.com (mail-ve0-x22f.google.com [2607:f8b0:400c:c01::22f]) by mx.google.com with ESMTPS id tx4si512100vdc.202.2014.05.14.13.31.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 May 2014 13:31:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c01::22f as permitted sender) client-ip=2607:f8b0:400c:c01::22f; Received: by mail-ve0-f175.google.com with SMTP id jw12so124196veb.20 for ; Wed, 14 May 2014 13:31:07 -0700 (PDT) X-Received: by 10.220.161.8 with SMTP id p8mr4648830vcx.4.1400099467885; Wed, 14 May 2014 13:31:07 -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.221.72 with SMTP id ib8csp269416vcb; Wed, 14 May 2014 13:31:07 -0700 (PDT) X-Received: by 10.68.215.40 with SMTP id of8mr7095123pbc.15.1400099467072; Wed, 14 May 2014 13:31:07 -0700 (PDT) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id zm3si3012651pac.97.2014.05.14.13.31.06 for ; Wed, 14 May 2014 13:31:07 -0700 (PDT) Received-SPF: none (google.com: openembedded-core-bounces@lists.openembedded.org does not designate permitted sender hosts) client-ip=140.211.169.62; Received: from mail.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 8FCC66A53C; Wed, 14 May 2014 20:31:04 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-yh0-f44.google.com (unknown [209.85.213.44]) by mail.openembedded.org (Postfix) with ESMTP id 023136A42A for ; Wed, 14 May 2014 20:30:39 +0000 (UTC) Received: by mail-yh0-f44.google.com with SMTP id b6so2213895yha.17 for ; Wed, 14 May 2014 13:30:40 -0700 (PDT) X-Received: by 10.236.104.234 with SMTP id i70mr8522324yhg.125.1400099440316; Wed, 14 May 2014 13:30:40 -0700 (PDT) Received: from nano.lab.ossystems.com.br ([177.194.208.225]) by mx.google.com with ESMTPSA id x37sm4113750yhn.39.2014.05.14.13.30.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 May 2014 13:30:38 -0700 (PDT) Received: by nano.lab.ossystems.com.br (Postfix, from userid 1000) id 23A5D1ACE5DA6; Wed, 14 May 2014 17:30:34 -0300 (BRT) From: Otavio Salvador To: OpenEmbedded Core Mailing List Date: Wed, 14 May 2014 17:30:34 -0300 Message-Id: <1400099434-22527-4-git-send-email-otavio@ossystems.com.br> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: <1400099434-22527-1-git-send-email-otavio@ossystems.com.br> References: <1400099434-22527-1-git-send-email-otavio@ossystems.com.br> Organization: O.S. Systems Software LTDA. Subject: [OE-core] [daisy][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-Original-Sender: otavio@ossystems.com.br X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c01::22f as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@ Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Denys Dmytriyenko (From OE-Core rev: c54fa061da6195081cd29817a351a36377b58e53) Signed-off-by: Denys Dmytriyenko Signed-off-by: Richard Purdie --- .../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 +