summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb23
-rw-r--r--meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch69
-rw-r--r--meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch29
3 files changed, 121 insertions, 0 deletions
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 0000000000..efc41ae427
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb
@@ -0,0 +1,23 @@
1require cryptodev_${PV}.inc
2
3SUMMARY = "A test suite for /dev/crypto device driver"
4
5DEPENDS += "openssl"
6
7SRC_URI += " \
8file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \
9file://0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch \
10"
11
12EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
13
14do_compile() {
15 oe_runmake testprogs
16}
17
18do_install() {
19 oe_runmake install_tests
20}
21
22FILES_${PN}-dbg += "${bindir}/tests_cryptodev/.debug"
23FILES_${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 0000000000..cb871f6b44
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch
@@ -0,0 +1,69 @@
1From 1980a8f4779a955e73285e7a0d86549b69bea5c8 Mon Sep 17 00:00:00 2001
2From: Yu Zongchun <b40527@freescale.com>
3Date: Sun, 28 Apr 2013 14:39:22 +0800
4Subject: [PATCH] Add the compile and install rules for cryptodev tests folder
5
6This is required to install the cryptodev tests folder to rootfs
7
8Signed-off-by: Yu Zongchun <b40527@freescale.com>
9
10Upstream-Status: Pending
11
12---
13 Makefile | 6 ++++++
14 tests/Makefile | 8 ++++++++
15 2 files changed, 14 insertions(+), 0 deletions(-)
16
17diff --git a/Makefile b/Makefile
18index 2be8825..4cbb865 100644
19--- a/Makefile
20+++ b/Makefile
21@@ -17,6 +17,9 @@ install:
22 @echo "Installing cryptodev.h in /usr/include/crypto ..."
23 @install -D crypto/cryptodev.h /usr/include/crypto/cryptodev.h
24
25+install_tests:
26+ make -C tests install DESTDIR=$(PREFIX)
27+
28 clean:
29 make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
30 rm -f $(hostprogs) *~
31@@ -25,6 +28,9 @@ clean:
32 check:
33 KERNEL_DIR=$(KERNEL_DIR) make -C tests check
34
35+testprogs:
36+ KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs
37+
38 FILEBASE = cryptodev-linux-$(VERSION)
39 TMPDIR ?= /tmp
40 OUTPUT = $(FILEBASE).tar.gz
41diff --git a/tests/Makefile b/tests/Makefile
42index 87ca3c7..0488cf6 100644
43--- a/tests/Makefile
44+++ b/tests/Makefile
45@@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o
46 example-async-speed-objs := async_speed.o
47 example-hashcrypt-speed-objs := hashcrypt_speed.c
48
49+install:
50+ install -d $(DESTDIR)/usr/bin/tests_cryptodev
51+ for bin in $(hostprogs); do \
52+ install -m 755 $${bin} $(DESTDIR)/usr/bin/tests_cryptodev/; \
53+ done
54+
55 check: $(hostprogs)
56 ./cipher
57 ./hmac
58@@ -28,6 +34,8 @@ check: $(hostprogs)
59 ./cipher-gcm
60 ./cipher-aead
61
62+testprogs: $(hostprogs)
63+
64 clean:
65 rm -f *.o *~ $(hostprogs)
66
67--
681.7.5.4
69
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 0000000000..f5ab8b4f96
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch
@@ -0,0 +1,29 @@
1From 47ff1eb9bb4f872c1d731b93d334ee5865bf3439 Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com>
3Date: Sun, 6 Apr 2014 22:16:30 -0400
4Subject: [PATCH] Fix tests Makefile usage of LDLIBS vs. LDFLAGS
5
6Libraries must come after objects, as link order matters, especially
7when using linker flags like -Wl,--as-needed.
8
9Signed-off-by: Denys Dmytriyenko <denys@ti.com>
10
11Upstream-Status: Pending
12---
13 tests/Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/tests/Makefile b/tests/Makefile
17index cd202af..67c3c83 100644
18--- a/tests/Makefile
19+++ b/tests/Makefile
20@@ -39,5 +39,5 @@ testprogs: $(hostprogs)
21 clean:
22 rm -f *.o *~ $(hostprogs)
23
24-${comp_progs}: LDFLAGS += -lssl -lcrypto
25+${comp_progs}: LDLIBS += -lssl -lcrypto
26 ${comp_progs}: %: %.o openssl_wrapper.o
27--
281.9.1
29