summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2014-04-10 13:55:27 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-24 17:55:16 +0100
commit8e12e0ccf75749c682ac310c648166425a295b37 (patch)
tree925011b1d1963695741e3373efdf8b1ad8137922
parent51c6c42a843f760c7e190385c0c775d0b2c6ed83 (diff)
downloadpoky-8e12e0ccf75749c682ac310c648166425a295b37.tar.gz
cryptodev-module: recipe for out-of-tree cryptodev device driver
Depends on cryptodev-linux for providing a header file (From OE-Core rev: b7587d2ef7642dcc248744ade8f85f815185e78c) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb18
-rw-r--r--meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch28
-rw-r--r--meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch86
3 files changed, 132 insertions, 0 deletions
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb b/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb
new file mode 100644
index 0000000000..df50e5a1c6
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb
@@ -0,0 +1,18 @@
1require cryptodev_${PV}.inc
2
3SUMMARY = "A /dev/crypto device driver kernel module"
4
5inherit module
6
7# Header file provided by a separate package
8DEPENDS += "cryptodev-linux"
9
10SRC_URI += " \
11file://0001-Disable-installing-header-file-provided-by-another-p.patch \
12file://0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch \
13"
14
15EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
16
17RCONFLICTS_${PN} = "ocf-linux"
18RREPLACES_${PN} = "ocf-linux"
diff --git a/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch b/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch
new file mode 100644
index 0000000000..a580fc68e1
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch
@@ -0,0 +1,28 @@
1From 8a884f55bd1527baa82fab68c186ba546273860c Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com>
3Date: Sun, 6 Apr 2014 19:51:39 -0400
4Subject: [PATCH] Disable installing header file provided by another package
5
6Signed-off-by: Denys Dmytriyenko <denys@ti.com>
7
8Upstream-Status: Inappropriate [ OE specific ]
9---
10 Makefile | 2 --
11 1 file changed, 2 deletions(-)
12
13diff --git a/Makefile b/Makefile
14index d66ef26..8e97c6a 100644
15--- a/Makefile
16+++ b/Makefile
17@@ -23,8 +23,6 @@ install: modules_install
18
19 modules_install:
20 make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install
21- @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..."
22- @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h
23
24 clean:
25 make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean
26--
271.9.1
28
diff --git a/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch b/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch
new file mode 100644
index 0000000000..c5c7ec75f9
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch
@@ -0,0 +1,86 @@
1From 57b5544de80db85c8955499831fdaa30829db77a Mon Sep 17 00:00:00 2001
2From: Cosmin Paraschiv <cosmin.paraschiv@freescale.com>
3Date: Thu, 23 Jan 2014 03:40:00 +0100
4Subject: [PATCH] In the 3.13-rc1 Linux kernel, the INIT_COMPLETION macro has
5 been replaced with an inline function, reinit_completion [1][2]. We are
6 currently using the 3.13-rc3 Linux kernel, which leads to the following
7 error:
8
9cryptlib.c:279:2: error: implicit declaration of function 'INIT_COMPLETION' [-Werror=implicit-function-declaration]
10 INIT_COMPLETION(cdata->async.result->completion);
11
12[1] https://github.com/torvalds/linux/commit/c32f74ab2872994bc8336ed367313da3139350ca
13[2] https://github.com/torvalds/linux/commit/62026aedaacedbe1ffe94a3599ad4acd8ecdf587
14
15Signed-off-by: Cosmin Paraschiv <cosmin.paraschiv@freescale.com>
16Reviewed-by: Cristian Stoica <cristian.stoica@freescale.com>
17Tested-by: Cristian Stoica <cristian.stoica@freescale.com>
18Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
19Signed-off-by: Phil Sutter <phil@nwl.cc>
20
21Upstream-Status: Backport
22---
23 cryptlib.c | 8 ++++----
24 cryptodev_int.h | 6 ++++++
25 2 files changed, 10 insertions(+), 4 deletions(-)
26
27diff --git a/cryptlib.c b/cryptlib.c
28index 54d5d41..a923c14 100644
29--- a/cryptlib.c
30+++ b/cryptlib.c
31@@ -217,7 +217,7 @@ ssize_t cryptodev_cipher_encrypt(struct cipher_data *cdata,
32 {
33 int ret;
34
35- INIT_COMPLETION(cdata->async.result->completion);
36+ reinit_completion(&cdata->async.result->completion);
37
38 if (cdata->aead == 0) {
39 ablkcipher_request_set_crypt(cdata->async.request,
40@@ -240,7 +240,7 @@ ssize_t cryptodev_cipher_decrypt(struct cipher_data *cdata,
41 {
42 int ret;
43
44- INIT_COMPLETION(cdata->async.result->completion);
45+ reinit_completion(&cdata->async.result->completion);
46 if (cdata->aead == 0) {
47 ablkcipher_request_set_crypt(cdata->async.request,
48 (struct scatterlist *)src, dst,
49@@ -351,7 +351,7 @@ ssize_t cryptodev_hash_update(struct hash_data *hdata,
50 {
51 int ret;
52
53- INIT_COMPLETION(hdata->async.result->completion);
54+ reinit_completion(&hdata->async.result->completion);
55 ahash_request_set_crypt(hdata->async.request, sg, NULL, len);
56
57 ret = crypto_ahash_update(hdata->async.request);
58@@ -363,7 +363,7 @@ int cryptodev_hash_final(struct hash_data *hdata, void* output)
59 {
60 int ret;
61
62- INIT_COMPLETION(hdata->async.result->completion);
63+ reinit_completion(&hdata->async.result->completion);
64 ahash_request_set_crypt(hdata->async.request, NULL, output, 0);
65
66 ret = crypto_ahash_final(hdata->async.request);
67diff --git a/cryptodev_int.h b/cryptodev_int.h
68index 12dd5b1..188063d 100644
69--- a/cryptodev_int.h
70+++ b/cryptodev_int.h
71@@ -2,6 +2,12 @@
72 #ifndef CRYPTODEV_INT_H
73 # define CRYPTODEV_INT_H
74
75+#include <linux/version.h>
76+
77+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0))
78+# define reinit_completion(x) INIT_COMPLETION(*(x))
79+#endif
80+
81 #include <linux/init.h>
82 #include <linux/sched.h>
83 #include <linux/fs.h>
84--
851.9.1
86