summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2019-06-11 11:49:34 +0300
committerThomas Monjalon <thomas@monjalon.net>2019-06-27 17:43:59 +0200
commit317832f97c165cd4f327567935dfbd6af92b4159 (patch)
tree53b459de623500cbdc43c1a2736ab21876496505
parent1c7191e7349e612a44523cde7fa2340ffe8f1c8f (diff)
downloaddpdk-317832f97c165cd4f327567935dfbd6af92b4159.zip
dpdk-317832f97c165cd4f327567935dfbd6af92b4159.tar.gz
dpdk-317832f97c165cd4f327567935dfbd6af92b4159.tar.xz
kernel/linux: fix modules install path
Currently kernel modules are installed into /usr/src instead of /lib/modules when meson build system is used. This patch fixes that. Cc: stable@dpdk.org Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
-rw-r--r--kernel/linux/igb_uio/meson.build4
-rw-r--r--kernel/linux/kni/meson.build4
-rw-r--r--kernel/linux/meson.build4
-rw-r--r--meson_options.txt2
4 files changed, 7 insertions, 7 deletions
diff --git a/kernel/linux/igb_uio/meson.build b/kernel/linux/igb_uio/meson.build
index f5a9d5c..fac404f 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,
+ command: ['make', '-C', kernel_dir + '/build',
'M=' + meson.current_build_dir(),
'src=' + meson.current_source_dir(),
'EXTRA_CFLAGS=-I' + meson.current_source_dir() +
@@ -16,5 +16,5 @@ custom_target('igb_uio',
'modules'],
depends: mkfile,
install: true,
- install_dir: kernel_dir + '/../extra/dpdk',
+ install_dir: kernel_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 a9f48b0..955eec9 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,
+ command: ['make', '-j4', '-C', kernel_dir + '/build',
'M=' + meson.current_build_dir(),
'src=' + meson.current_source_dir(),
'MODULE_CFLAGS=-include ' + meson.source_root() + '/config/rte_config.h' +
@@ -25,5 +25,5 @@ custom_target('rte_kni',
depends: kni_mkfile,
console: true,
install: true,
- install_dir: kernel_dir + '/../extra/dpdk',
+ install_dir: kernel_dir + '/extra/dpdk',
build_by_default: get_option('enable_kmods'))
diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build
index a37c957..1796cc6 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 + '/build'
+ kernel_dir = '/lib/modules/' + kernel_version
endif
# test running make in kernel directory, using "make kernelversion"
-make_returncode = run_command('make', '-sC', kernel_dir,
+make_returncode = run_command('make', '-sC', kernel_dir + '/build',
'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 16d9f92..5302b9c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -15,7 +15,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, they will be installed in $DEST_DIR/$kernel_dir/../extra/dpdk')
+ 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.')
option('lib_musdk_dir', type: 'string', value: '',
description: 'path to the MUSDK library installation directory')
option('machine', type: 'string', value: 'native',