DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Igor Ryzhov <iryzhov@nfware.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] kernel/linux: fix modules install path
Date: Mon, 10 Jun 2019 10:37:17 +0100	[thread overview]
Message-ID: <20190610093717.GA1925@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20190610082552.79083-1-iryzhov@nfware.com>

On Mon, Jun 10, 2019 at 11:25:52AM +0300, Igor Ryzhov wrote:
> Currently kernel modules are installed into /usr/src/ instead of
> /lib/modules when meson build system is used. This patch fixes that.
> 
> Old build option "kernel_dir" is changed to "kernel_version".
> 
> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
> ---
>  kernel/linux/igb_uio/meson.build |  2 +-
>  kernel/linux/kni/meson.build     |  2 +-
>  kernel/linux/meson.build         | 16 +++++++++-------
>  meson_options.txt                |  4 ++--
>  4 files changed, 13 insertions(+), 11 deletions(-)
> 
> diff --git a/kernel/linux/igb_uio/meson.build b/kernel/linux/igb_uio/meson.build
> index f5a9d5ccf..5093610e3 100644
> --- a/kernel/linux/igb_uio/meson.build
> +++ b/kernel/linux/igb_uio/meson.build
> @@ -16,5 +16,5 @@ custom_target('igb_uio',
>  		'modules'],
>  	depends: mkfile,
>  	install: true,
> -	install_dir: kernel_dir + '/../extra/dpdk',
> +	install_dir: kernel_install_dir + '/extra/dpdk',
>  	build_by_default: get_option('enable_kmods'))
> diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
> index a9f48b0e6..8a902d2ed 100644
> --- a/kernel/linux/kni/meson.build
> +++ b/kernel/linux/kni/meson.build
> @@ -25,5 +25,5 @@ custom_target('rte_kni',
>  	depends: kni_mkfile,
>  	console: true,
>  	install: true,
> -	install_dir: kernel_dir + '/../extra/dpdk',
> +	install_dir: kernel_install_dir + '/extra/dpdk',
>  	build_by_default: get_option('enable_kmods'))
> diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build
> index a37c95752..5a9303b33 100644
> --- a/kernel/linux/meson.build
> +++ b/kernel/linux/meson.build
> @@ -3,19 +3,21 @@
>  
>  subdirs = ['igb_uio', 'kni']
>  
> -# if we are cross-compiling we need kernel_dir specified
> -if get_option('kernel_dir') == '' and meson.is_cross_build()
> -	warning('Need "kernel_dir" option for kmod compilation when cross-compiling')
> +# if we are cross-compiling we need kernel_version specified
> +if get_option('kernel_version') == '' and meson.is_cross_build()
> +	warning('Need "kernel_version" option for kmod compilation when cross-compiling')
>  	subdir_done()
>  endif

Looking at the patch now, I'm not sure that this change from kernel_dir to
kernel_version is the right thing to do - since it almost certainly cause
issues for cross-compiling. The kernel modules almost certainly won't be in
the host's /lib/modules folder in cross-compile cases, so I think we need
to continue to specify a path to the kernel modules folder.

To me the simplest option is that we should take the path to the kernels
module folder i.e. same as now, just without the "/build". A comment update
in the meson_options.txt file should be all that is needed to modify that
parameter, and we should be able to have the meson.build file automatically
strip "/build" off the path in order to enable backward compatibility. What
do you think?

/Bruce


  reply	other threads:[~2019-06-10  9:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10  8:25 Igor Ryzhov
2019-06-10  9:37 ` Bruce Richardson [this message]
2019-06-10 11:04   ` Igor Ryzhov
2019-06-10 11:12     ` Bruce Richardson
2019-06-10 11:23       ` Igor Ryzhov
2019-06-11  8:49 ` [dpdk-dev] [PATCH v2] " Igor Ryzhov
2019-06-11 10:11   ` Bruce Richardson
2019-06-27 15:34     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190610093717.GA1925@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=iryzhov@nfware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).