Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [PATCH][jethro[master]][meta-networking] netmap-modules: fix build with kernel < 3.17
@ 2015-12-30 16:02 Martin Jansa
  2015-12-31  3:20 ` akuster808
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Jansa @ 2015-12-30 16:02 UTC (permalink / raw)
  To: openembedded-devel

* define NETMAP_LINUX_ALLOC_NETDEV_4ARGS only when MACHINE is using kernel
  3.17 or newer

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta-networking/recipes-kernel/netmap/netmap-modules_git.bb | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb b/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
index 6e6f02c..31fedbb 100644
--- a/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
+++ b/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
@@ -61,7 +61,6 @@ do_configure_append () {
 #define NETMAP_LINUX_HAVE_PHYS_ADDR_T
 #define NETMAP_LINUX_HAVE_ACCESS_ONCE
 #define NETMAP_LINUX_HAVE_NETDEV_OPS
-#define NETMAP_LINUX_ALLOC_NETDEV_4ARGS
 #define NETMAP_LINUX_HAVE_INIT_NET
 #define NETMAP_LINUX_HAVE_LIVE_ADDR_CHANGE
 #define NETMAP_LINUX_HAVE_TX_SKB_SHARING
@@ -75,6 +74,13 @@ do_configure_append () {
 #define NETMAP_LINUX_HAVE_E1000E_EXT_RXDESC
 #define NETMAP_LINUX_HAVE_E1000E_DOWN2
 EOF
+
+if ${@ 'true' if (bb.utils.vercmp_string(d.getVar('KERNEL_VERSION', True), '3.17') < 0) else 'false' } ; then
+    echo OK
+    cat >>  ${S}/LINUX/netmap_linux_config.h <<EOF
+#define NETMAP_LINUX_ALLOC_NETDEV_4ARGS
+EOF
+fi
 }
 
 do_compile () {
-- 
2.6.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][jethro[master]][meta-networking] netmap-modules: fix build with kernel < 3.17
  2015-12-30 16:02 [PATCH][jethro[master]][meta-networking] netmap-modules: fix build with kernel < 3.17 Martin Jansa
@ 2015-12-31  3:20 ` akuster808
  0 siblings, 0 replies; 2+ messages in thread
From: akuster808 @ 2015-12-31  3:20 UTC (permalink / raw)
  To: openembedded-devel

will pull this shortly.

- armin

On 12/30/2015 08:02 AM, Martin Jansa wrote:
> * define NETMAP_LINUX_ALLOC_NETDEV_4ARGS only when MACHINE is using kernel
>   3.17 or newer
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta-networking/recipes-kernel/netmap/netmap-modules_git.bb | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb b/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
> index 6e6f02c..31fedbb 100644
> --- a/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
> +++ b/meta-networking/recipes-kernel/netmap/netmap-modules_git.bb
> @@ -61,7 +61,6 @@ do_configure_append () {
>  #define NETMAP_LINUX_HAVE_PHYS_ADDR_T
>  #define NETMAP_LINUX_HAVE_ACCESS_ONCE
>  #define NETMAP_LINUX_HAVE_NETDEV_OPS
> -#define NETMAP_LINUX_ALLOC_NETDEV_4ARGS
>  #define NETMAP_LINUX_HAVE_INIT_NET
>  #define NETMAP_LINUX_HAVE_LIVE_ADDR_CHANGE
>  #define NETMAP_LINUX_HAVE_TX_SKB_SHARING
> @@ -75,6 +74,13 @@ do_configure_append () {
>  #define NETMAP_LINUX_HAVE_E1000E_EXT_RXDESC
>  #define NETMAP_LINUX_HAVE_E1000E_DOWN2
>  EOF
> +
> +if ${@ 'true' if (bb.utils.vercmp_string(d.getVar('KERNEL_VERSION', True), '3.17') < 0) else 'false' } ; then
> +    echo OK
> +    cat >>  ${S}/LINUX/netmap_linux_config.h <<EOF
> +#define NETMAP_LINUX_ALLOC_NETDEV_4ARGS
> +EOF
> +fi
>  }
>  
>  do_compile () {
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-31  3:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-30 16:02 [PATCH][jethro[master]][meta-networking] netmap-modules: fix build with kernel < 3.17 Martin Jansa
2015-12-31  3:20 ` akuster808

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox