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() +
'modules'],
depends: mkfile,
install: true,
- install_dir: kernel_dir + '/../extra/dpdk',
+ install_dir: kernel_dir + '/extra/dpdk',
build_by_default: get_option('enable_kmods'))
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' +
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'))
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?')
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',