[meta-dpdk] dpdk: Skip build if necessary kernel options is not included

Submitted by zhe.he@windriver.com on Sept. 16, 2019, 7:56 a.m. | Patch ID: 165015

Details

Message ID 1568620588-32639-1-git-send-email-zhe.he@windriver.com
State New
Headers show

Commit Message

zhe.he@windriver.com Sept. 16, 2019, 7:56 a.m.
From: He Zhe <zhe.he@windriver.com>

dpdk depends on some kernel configuration options without which it is not able
to successfully build.

Signed-off-by: He Zhe <zhe.he@windriver.com>
---
 recipes-extended/dpdk/dpdk.inc | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-extended/dpdk/dpdk.inc
index 3b997eb..9c9b397 100644
--- a/recipes-extended/dpdk/dpdk.inc
+++ b/recipes-extended/dpdk/dpdk.inc
@@ -1,6 +1,11 @@ 
 DESCRIPTION = "Intel(r) Data Plane Development Kit"
 HOMEPAGE = "http://dpdk.org"
 
+python () {
+    if not bb.utils.contains('KERNEL_FEATURES', 'features/intel-dpdk/intel-dpdk.scc', True, False, d):
+        raise bb.parse.SkipPackage("dpdk requires features/intel-dpdk/intel-dpdk.scc in KERNEL_FEATURES to build")
+}
+
 STABLE = ""
 BRANCH = "master"
 S = "${WORKDIR}/git"

Comments

Anuj Mittal Sept. 17, 2019, 3:54 a.m.
On Mon, 2019-09-16 at 15:56 +0800, zhe.he@windriver.com wrote:
> From: He Zhe <zhe.he@windriver.com>
> 
> dpdk depends on some kernel configuration options without which it is
> not able
> to successfully build.
> 
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
>  recipes-extended/dpdk/dpdk.inc | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-
> extended/dpdk/dpdk.inc
> index 3b997eb..9c9b397 100644
> --- a/recipes-extended/dpdk/dpdk.inc
> +++ b/recipes-extended/dpdk/dpdk.inc
> @@ -1,6 +1,11 @@
>  DESCRIPTION = "Intel(r) Data Plane Development Kit"
>  HOMEPAGE = "http://dpdk.org"
>  
> +python () {
> +    if not bb.utils.contains('KERNEL_FEATURES', 'features/intel-
> dpdk/intel-dpdk.scc', True, False, d):
> +        raise bb.parse.SkipPackage("dpdk requires features/intel-
> dpdk/intel-dpdk.scc in KERNEL_FEATURES to build")
> +}
> +

I think this won't work for people who don't use yocto-kernel-cache.

Thanks,

Anuj