DPDK patches and discussions
 help / color / mirror / Atom feed
From: Igor Ryzhov <iryzhov@nfware.com>
To: Xiaolong Ye <xiaolong.ye@intel.com>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	 dev <dev@dpdk.org>, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] kernel/linux: fix kernel dir for meson
Date: Mon, 2 Dec 2019 11:10:06 +0300	[thread overview]
Message-ID: <CAF+s_FyS6ti_+-GEr+6Hf-3QLmbLkBEwkDqOP1q21G=KR5vmUA@mail.gmail.com> (raw)
In-Reply-To: <20191202061442.56964-1-xiaolong.ye@intel.com>

Hi Xiaolong,

Nack from me. It's just an incorrect revert of my fix.
Kernel modules will be installed in wrong directory, just check install_dir
parameter in kni/meson.build and igb_uio/meson.build.

Igor

On Mon, Dec 2, 2019 at 9:18 AM Xiaolong Ye <xiaolong.ye@intel.com> wrote:

> kernel_dir option in meson build is equivalent to RTE_KERNELDIR in make
> system, for cross-compilation case, users would specify it as local
> kernel src dir like
>
> /<user local dir>/target-arm_glibc/linux-arm/linux-4.19.81/
>
> Current meson build would fail to compile kernel module if user specify
> kernel_dir as above, this patch fixes this issue.
>
> Fixes: 317832f97c16 ("kernel/linux: fix modules install path")
> Cc: stable@dpdk.org
> Cc: iryzhov@nfware.com
>
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
> ---
>  kernel/linux/igb_uio/meson.build | 2 +-
>  kernel/linux/kni/meson.build     | 2 +-
>  kernel/linux/meson.build         | 4 ++--
>  meson_options.txt                | 2 +-
>  4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/kernel/linux/igb_uio/meson.build
> b/kernel/linux/igb_uio/meson.build
> index fac404f07..e66218dae 100644
> --- a/kernel/linux/igb_uio/meson.build
> +++ b/kernel/linux/igb_uio/meson.build
> @@ -8,7 +8,7 @@ mkfile = custom_target('igb_uio_makefile',
>  custom_target('igb_uio',
>         input: ['igb_uio.c', 'Kbuild'],
>         output: 'igb_uio.ko',
> -       command: ['make', '-C', kernel_dir + '/build',
> +       command: ['make', '-C', kernel_dir,
>                 'M=' + meson.current_build_dir(),
>                 'src=' + meson.current_source_dir(),
>                 'EXTRA_CFLAGS=-I' + meson.current_source_dir() +
> diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
> index 955eec949..9fce0c16e 100644
> --- a/kernel/linux/kni/meson.build
> +++ b/kernel/linux/kni/meson.build
> @@ -13,7 +13,7 @@ kni_sources = files(
>  custom_target('rte_kni',
>         input: kni_sources,
>         output: 'rte_kni.ko',
> -       command: ['make', '-j4', '-C', kernel_dir + '/build',
> +       command: ['make', '-j4', '-C', kernel_dir,
>                 'M=' + meson.current_build_dir(),
>                 'src=' + meson.current_source_dir(),
>                 'MODULE_CFLAGS=-include ' + meson.source_root() +
> '/config/rte_config.h' +
> diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build
> index 1796cc686..a37c95752 100644
> --- a/kernel/linux/meson.build
> +++ b/kernel/linux/meson.build
> @@ -13,11 +13,11 @@ kernel_dir = get_option('kernel_dir')
>  if kernel_dir == ''
>         # use default path for native builds
>         kernel_version = run_command('uname', '-r').stdout().strip()
> -       kernel_dir = '/lib/modules/' + kernel_version
> +       kernel_dir = '/lib/modules/' + kernel_version + '/build'
>  endif
>
>  # test running make in kernel directory, using "make kernelversion"
> -make_returncode = run_command('make', '-sC', kernel_dir + '/build',
> +make_returncode = run_command('make', '-sC', kernel_dir,
>                 'kernelversion').returncode()
>  if make_returncode != 0
>         warning('Cannot compile kernel modules as requested - are kernel
> headers installed?')
> diff --git a/meson_options.txt b/meson_options.txt
> index bc369d06c..7eba3b720 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -17,7 +17,7 @@ option('ibverbs_link', type: 'combo', choices :
> ['shared', 'dlopen'], value: 'sh
>  option('include_subdir_arch', type: 'string', value: '',
>         description: 'subdirectory where to install arch-dependent
> headers')
>  option('kernel_dir', type: 'string', value: '',
> -       description: 'Path to the kernel for building kernel modules.
> Headers must be in $kernel_dir/build. Modules will be installed in
> $DEST_DIR/$kernel_dir/extra/dpdk.')
> +       description: 'Path to the kernel for building kernel modules.
> Modules will be installed in $DEST_DIR/$kernel_dir/extra/dpdk.')
>  option('lib_musdk_dir', type: 'string', value: '',
>         description: 'path to the MUSDK library installation directory')
>  option('machine', type: 'string', value: 'native',
> --
> 2.17.1
>
>

  reply	other threads:[~2019-12-02  8:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02  6:14 Xiaolong Ye
2019-12-02  8:10 ` Igor Ryzhov [this message]
2019-12-02  8:39   ` Ye Xiaolong
2019-12-02  9:16     ` Igor Ryzhov
2019-12-02 11:34       ` Ye Xiaolong
2019-12-02 12:08         ` Bruce Richardson
2019-12-02 15:44           ` Ye Xiaolong
2019-12-03  5:33           ` Ye Xiaolong
2019-12-03 10:10             ` Bruce Richardson
2019-12-03  5:29 ` [dpdk-dev] [PATCH v2] " Xiaolong Ye
2019-12-03 10:11   ` Bruce Richardson
2019-12-03 12:33     ` Ye Xiaolong
2019-12-03 13:58       ` Bruce Richardson
2019-12-03 15:01         ` Ye Xiaolong
2019-12-03 15:59 ` [dpdk-dev] [PATCH v3] " Xiaolong Ye
2019-12-04 13:51   ` Luca Boccassi
2019-12-04 14:18     ` Ye Xiaolong
2019-12-04 15:12       ` Bruce Richardson
2019-12-08  1:26         ` Ye Xiaolong
2019-12-09 12:12           ` Bruce Richardson

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='CAF+s_FyS6ti_+-GEr+6Hf-3QLmbLkBEwkDqOP1q21G=KR5vmUA@mail.gmail.com' \
    --to=iryzhov@nfware.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    --cc=xiaolong.ye@intel.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).