[meta-freescale] [meta-fsl-ppc][PATCH 1/5] cryptodev: rename to cryptodev-qoriq

ting.liu at nxp.com ting.liu at nxp.com
Tue Jun 21 02:47:15 PDT 2016


From: Ting Liu <ting.liu at nxp.com>

The QorIQ version of cryptodev needs to use another recipe name and
have a common provider, which is than choosen for QorIQ-based
machines.

Signed-off-by: Ting Liu <ting.liu at nxp.com>
---
 conf/machine/include/qoriq.inc                                |  6 +++---
 .../{cryptodev-linux_1.7.bb => cryptodev-qoriq-linux_1.7.bb}  |  6 +++++-
 ...{cryptodev-module_1.7.bb => cryptodev-qoriq-module_1.7.bb} |  6 +++++-
 .../{cryptodev-tests_1.7.bb => cryptodev-qoriq-tests_1.7.bb}  |  6 +++++-
 .../cryptodev/{cryptodev_1.7.inc => cryptodev-qoriq_1.7.inc}  | 11 ++++++++++-
 5 files changed, 28 insertions(+), 7 deletions(-)
 rename recipes-kernel/cryptodev/{cryptodev-linux_1.7.bb => cryptodev-qoriq-linux_1.7.bb} (74%)
 rename recipes-kernel/cryptodev/{cryptodev-module_1.7.bb => cryptodev-qoriq-module_1.7.bb} (70%)
 rename recipes-kernel/cryptodev/{cryptodev-tests_1.7.bb => cryptodev-qoriq-tests_1.7.bb} (77%)
 rename recipes-kernel/cryptodev/{cryptodev_1.7.inc => cryptodev-qoriq_1.7.inc} (84%)

diff --git a/conf/machine/include/qoriq.inc b/conf/machine/include/qoriq.inc
index f99f4e7..84b5abb 100644
--- a/conf/machine/include/qoriq.inc
+++ b/conf/machine/include/qoriq.inc
@@ -3,12 +3,12 @@
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq"
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-qoriq"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-qoriq"
+PREFERRED_PROVIDER_cryptodev-linux = "cryptodev-qoriq-linux"
+PREFERRED_PROVIDER_cryptodev-module = "cryptodev-qoriq-module"
+PREFERRED_PROVIDER_cryptodev-tests = "cryptodev-qoriq-tests"
 
 PREFERRED_VERSION_qemu = "2.4.0+fsl"
 PREFERRED_VERSION_openssl = "1.0.1i"
-PREFERRED_VERSION_cryptodev-linux = "1.7"
-PREFERRED_VERSION_cryptodev-module = "1.7"
-PREFERRED_VERSION_cryptodev-tests = "1.7"
 
 MACHINE_FEATURES = "keyboard pci ext2 ext3 serial"
 MACHINE_EXTRA_RRECOMMENDS += "udev-rules-qoriq kernel-modules"
diff --git a/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb b/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.7.bb
similarity index 74%
rename from recipes-kernel/cryptodev/cryptodev-linux_1.7.bb
rename to recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.7.bb
index 92ccd71..58db505 100644
--- a/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb
+++ b/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.7.bb
@@ -1,7 +1,9 @@
-require cryptodev_${PV}.inc
+require cryptodev-qoriq_${PV}.inc
 
 SUMMARY = "A /dev/crypto device driver header file"
 
+PROVIDES = "cryptodev-linux"
+
 do_compile[noexec] = "1"
 
 # Just install cryptodev.h which is the only header file needed to be exported
@@ -10,3 +12,5 @@ do_install() {
 }
 
 ALLOW_EMPTY_${PN} = "1"
+
+COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-kernel/cryptodev/cryptodev-module_1.7.bb b/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.7.bb
similarity index 70%
rename from recipes-kernel/cryptodev/cryptodev-module_1.7.bb
rename to recipes-kernel/cryptodev/cryptodev-qoriq-module_1.7.bb
index e6b1f27..383b482 100644
--- a/recipes-kernel/cryptodev/cryptodev-module_1.7.bb
+++ b/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.7.bb
@@ -1,10 +1,14 @@
-require cryptodev_${PV}.inc
+require cryptodev-qoriq_${PV}.inc
 
 SUMMARY = "A /dev/crypto device driver kernel module"
 
+PROVIDES = "cryptodev-module"
+
 inherit module qoriq_build_64bit_kernel
 
 # Header file provided by a separate package
 DEPENDS += "cryptodev-linux"
 
 EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
+
+COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb b/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.7.bb
similarity index 77%
rename from recipes-kernel/cryptodev/cryptodev-tests_1.7.bb
rename to recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.7.bb
index 128ccc9..a60ea98 100644
--- a/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb
+++ b/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.7.bb
@@ -1,8 +1,10 @@
-require cryptodev_${PV}.inc
+require cryptodev-qoriq_${PV}.inc
 
 SUMMARY = "A test suite for /dev/crypto device driver"
 DEPENDS = "openssl"
 
+PROVIDES = "cryptodev-tests"
+
 EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
 
 do_compile() {
@@ -15,3 +17,5 @@ do_install() {
 
 FILES_${PN}-dbg += "${bindir}/tests_cryptodev/.debug"
 FILES_${PN} = "${bindir}/tests_cryptodev/*"
+
+COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-kernel/cryptodev/cryptodev_1.7.inc b/recipes-kernel/cryptodev/cryptodev-qoriq_1.7.inc
similarity index 84%
rename from recipes-kernel/cryptodev/cryptodev_1.7.inc
rename to recipes-kernel/cryptodev/cryptodev-qoriq_1.7.inc
index 2060ce3..e4700db 100644
--- a/recipes-kernel/cryptodev/cryptodev_1.7.inc
+++ b/recipes-kernel/cryptodev/cryptodev-qoriq_1.7.inc
@@ -6,6 +6,15 @@ RREPLACES_${PN} = "ocf-linux"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
+python() {
+    pkgs = d.getVar('PACKAGES', True).split()
+    for p in pkgs:
+        if 'cryptodev-qoriq' in p:
+            d.appendVar("RPROVIDES_%s" % p, p.replace('cryptodev-qoriq', 'cryptodev'))
+            d.appendVar("RCONFLICTS_%s" % p, p.replace('cryptodev-qoriq', 'cryptodev'))
+            d.appendVar("RREPLACES_%s" % p, p.replace('cryptodev-qoriq', 'cryptodev'))
+}
+
 SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz"
 SRC_URI[md5sum] = "0b63b3481cf2c90386b35f057481d36b"
 SRC_URI[sha256sum] = "41880533b53de4d7b3f054e230f576988dafb8eed7bef5ebcf6422bb2e3a3b25"
@@ -46,7 +55,7 @@ file://0024-fix-COMPAT_CIOCKEY-ioctl-command-number.patch \
 
 # NOTE: remove this patch and all traces of DISTRO_FEATURE c29x_pkc
 # if pkc-host does not need customized cryptodev patches anymore
-SRC_URI_append = "${@bb.utils.contains('DISTRO_FEATURES', 'c29x_pkc', ' file://0001-don-t-advertise-RSA-keygen.patch', '' ,d)}"
+SRC_URI_append = "${@bb.utils.contains('DISTRO_FEATURES', 'c29x_pkc', ' file://0001-don-t-advertise-RSA-keygen.patch', '', d)}"
 
 S = "${WORKDIR}/cryptodev-linux-${PV}"
 
-- 
1.9.2



More information about the meta-freescale mailing list