From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 51DF2A00E6 for ; Tue, 11 Jun 2019 10:49:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 78FD01C2BC; Tue, 11 Jun 2019 10:49:40 +0200 (CEST) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 588E01C2BA for ; Tue, 11 Jun 2019 10:49:39 +0200 (CEST) Received: by mail-lj1-f193.google.com with SMTP id 131so10769320ljf.4 for ; Tue, 11 Jun 2019 01:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PTk3T+zITYqQqayH2xroG+RwDUefaNWcJsBW5et3TWg=; b=SvOjcgL1bqY8yLfAeFKc9pldNW0BvHfj+CW5HDIoQgm5SJoWXRNCD/o/5bYUOmAqVW JveXb8CEIEWSyEWLx9NzNuixKrxZfSrfZjfiTXqQLoFXulkMdrlI2UniT15g+Q0nw27C uzHgqXRj3Bmd2qf9ieUFZZM+kCwjpARUKddWxFN98xbNK/2uUlrinLBGhlzmvJFEiO1P ZpfSInu4/+qM9JqW5cPulF3HKWYg2MEdJtQ0ErRAISndrdWsvgA1pcszpZeQgmodzAOE BeFBiujNbfdZvqFW4Uylm4UCcfsLmmA/zT+PM8fc9yrz+nGJupRsgF6UXqhEy1p5oLYT BOkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PTk3T+zITYqQqayH2xroG+RwDUefaNWcJsBW5et3TWg=; b=uQL+4UfGdEy1OvoVO7mIP3ZbVymvqbFxz8ZDNBv2Zym9cRx4DGXTO4EGYKA8zdcMjE EkZImEYmd2vtkCViC0IP6iOUs52mjzN4Oj0mTBSXnF6ru0u6yzwER6YwYufDHjK85Ilf Jsiya34Ktpywsu5saK3BGGLOuJsX3Le1kI9ochySi/vOifSIe4M+Wo52K7YNCCSzSgbJ ZjLnxWijYzARkEINxvM1F44c/Lxi+Oy5aEYOiQuP2Lh4RvCWuytofHsRvpXGmYihVw1P HgiAGmWnrCksLWG0TulL8Zhv46YJMMMXUApMG+Wm6/xOZz+lWepQM304CO3QeHokG1pL OXNA== X-Gm-Message-State: APjAAAWNDXT6rw/oIQI78DpuZaJUuCbeWVcvqNNJ9tcWzniTxYsnuuZJ Knpr2EFGm5y8yNPb4nVDLjHNf4Y3C3I= X-Google-Smtp-Source: APXvYqy1dVXJJNE5x6PC3LVbLk6LHCwVm/Zy+ao6rTeRyw9JYVA4AKtXCvHurOuFaewqBGRXNkcaPQ== X-Received: by 2002:a2e:b0f0:: with SMTP id h16mr15292991ljl.21.1560242978498; Tue, 11 Jun 2019 01:49:38 -0700 (PDT) Received: from localhost.localdomain ([212.48.63.198]) by smtp.gmail.com with ESMTPSA id b18sm2390262lfi.30.2019.06.11.01.49.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 01:49:37 -0700 (PDT) From: Igor Ryzhov To: dev@dpdk.org Cc: bruce.richardson@intel.com Date: Tue, 11 Jun 2019 11:49:34 +0300 Message-Id: <20190611084934.2993-1-iryzhov@nfware.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190610082552.79083-1-iryzhov@nfware.com> References: <20190610082552.79083-1-iryzhov@nfware.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] kernel/linux: fix modules install path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Currently kernel modules are installed into /usr/src instead of /lib/modules when meson build system is used. This patch fixes that. Signed-off-by: Igor Ryzhov --- v2 - don't change kernel_dir to kernel_version kernel/linux/igb_uio/meson.build | 4 ++-- kernel/linux/kni/meson.build | 4 ++-- kernel/linux/meson.build | 4 ++-- meson_options.txt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/linux/igb_uio/meson.build b/kernel/linux/igb_uio/meson.build index f5a9d5ccf..fac404f07 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 a9f48b0e6..955eec949 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 a37c95752..1796cc686 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 16d9f92c6..5302b9c68 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', -- 2.21.0