From patchwork Thu May 22 18:27:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 30657 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 48A9120369 for ; Thu, 22 May 2014 18:28:48 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id m20sf11908928qcx.9 for ; Thu, 22 May 2014 11:28:48 -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: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=RE8KQH1eLw421jKhuRDqPgWhSaTJXDQTFno4BHNSvf0=; b=XIWwWKuFSdPgInit1thFen6f1i1yljicS2brWNsNxOuLpf7C088PLYcSbzWnfzntQg SwrhjZ6FALNbb26r2u32ikePlbokE9nm4kHykA0v0YVIufRzQmELGUePQINm54dLJ0dG 95uHnr7CeQLAnitA82ysXdmXZKElE8SJpdmpomwbuMD0n4zH7s4srDCzn9R3A2JX/jX2 G7Vd8962aY6IW2QuBHsVb6jbRXERqMygUcH57Hl7dAVs9Ov/tOsjyXS6BrH49UxgbVo/ l9GojJ7T5mCh9HKL5ips92588l4AI2paS/34P63bpWBUsgS0A91gEI32aN8y4ZsvFZUf UJvw== X-Gm-Message-State: ALoCoQmZ/MUQQUfOZmqAmfNV1/QLlX7aB1Vv+ln2B/0djD8PFffaGTEnLM3kp0I0rpVi6x6WP8Fn X-Received: by 10.236.133.201 with SMTP id q49mr21550908yhi.1.1400783328094; Thu, 22 May 2014 11:28:48 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.99 with SMTP id y90ls1391719qgd.82.gmail; Thu, 22 May 2014 11:28:48 -0700 (PDT) X-Received: by 10.58.23.6 with SMTP id i6mr50581459vef.12.1400783327972; Thu, 22 May 2014 11:28:47 -0700 (PDT) Received: from mail-vc0-x232.google.com (mail-vc0-x232.google.com [2607:f8b0:400c:c03::232]) by mx.google.com with ESMTPS id u14si303736vdj.101.2014.05.22.11.28.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 May 2014 11:28:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::232 as permitted sender) client-ip=2607:f8b0:400c:c03::232; Received: by mail-vc0-f178.google.com with SMTP id ij19so1564451vcb.37 for ; Thu, 22 May 2014 11:28:47 -0700 (PDT) X-Received: by 10.220.12.66 with SMTP id w2mr17194799vcw.15.1400783327817; Thu, 22 May 2014 11:28:47 -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 ib8csp221689vcb; Thu, 22 May 2014 11:28:47 -0700 (PDT) X-Received: by 10.66.153.80 with SMTP id ve16mr70304173pab.143.1400783327037; Thu, 22 May 2014 11:28:47 -0700 (PDT) Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id sf3si720702pac.91.2014.05.22.11.28.46 for ; Thu, 22 May 2014 11:28:47 -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 4A53E6B7D7; Thu, 22 May 2014 18:28:41 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-yk0-f172.google.com (unknown [209.85.160.172]) by mail.openembedded.org (Postfix) with ESMTP id 629516B438 for ; Thu, 22 May 2014 18:27:59 +0000 (UTC) Received: by mail-yk0-f172.google.com with SMTP id 79so3139477ykr.17 for ; Thu, 22 May 2014 11:28:01 -0700 (PDT) X-Received: by 10.236.180.169 with SMTP id j29mr86431591yhm.47.1400783281023; Thu, 22 May 2014 11:28:01 -0700 (PDT) Received: from nano.lab.ossystems.com.br ([177.194.208.225]) by mx.google.com with ESMTPSA id v60sm819663yhc.40.2014.05.22.11.27.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 May 2014 11:27:58 -0700 (PDT) Received: by nano.lab.ossystems.com.br (Postfix, from userid 1000) id DA4531B13ADBD; Thu, 22 May 2014 15:27:54 -0300 (BRT) From: Otavio Salvador To: OpenEmbedded Core Mailing List Date: Thu, 22 May 2014 15:27:52 -0300 Message-Id: <1400783274-7258-5-git-send-email-otavio@ossystems.com.br> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: <1400783274-7258-1-git-send-email-otavio@ossystems.com.br> References: <1400783274-7258-1-git-send-email-otavio@ossystems.com.br> Organization: O.S. Systems Software LTDA. Cc: Denys Dmytriyenko Subject: [OE-core] [daisy-backport][PATCH 4/6] 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:c03::232 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 +