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 F2699A00E6 for ; Mon, 10 Jun 2019 13:04:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CEB7D1BFF9; Mon, 10 Jun 2019 13:04:38 +0200 (CEST) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id 29C7A1BFF7 for ; Mon, 10 Jun 2019 13:04:38 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id n4so8662944wrw.13 for ; Mon, 10 Jun 2019 04:04:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=132BbDpoDd4EnlgI/yMJ27wIbODOt3zbO28l9eWjxbc=; b=qPMHQMCGT1cbrbPXJ1wOMgBOmUNWnM2C6pKeawNTfzewFRPMs/QT8rnMcrxK6dJiXg IZKJqeZlWWbZwcH57GrjRYo5HkOsxDLmA5yWKXz8Bk3KwdQ2R1ECtQ6bEz5pbWTsAufJ W+6WRbz2IKYDTpJHbQ+5BwxHPgj3npTerFV12s5EutJuXfBpJAJq204zys4NLXBXURIV Rjh51wysgMlUAIPoFqV+QXtNq/MQqhwLx2gPeWZYRAUJ1D0zSSOUG9GcuwQCucMaQX4Q ka8gMbAvscWnZCdbGjFxgBqPAsgcehlDdjNb66rd+DbPcUEa1DfIDrjhrvNtittLg8wi kAJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=132BbDpoDd4EnlgI/yMJ27wIbODOt3zbO28l9eWjxbc=; b=Uk/ACVmFTWRTQw0l4wj3RjUlhZvKbjsrnDBIuFP+X6l9DRacK8rx0+nH93x3oCi1jj jhEGoBXEzsUUapP6ZtQedj4EvJfKcChuCU2iiMZznboN08Y1n9Mr0fsW5ULlrUs24Ay8 LhZfjY6QnwV3kArjmFijp/0iHXhxbzrozg+iTsfSVhLl7h5/bBdiPQK4NcOOoa7WAom4 HRdhrqivOgv/GSaQp3x+vqRxv+FieOKaKdPj/ExjKWgI5yrYVsoX43LSfltt+ZRrAD2I svnDEm2Me+rcZiSbpUzVk196ijVMkbzeLAtlijJ7HBEd8JHkyWKsAe7kSe9chemqEwNO FUng== X-Gm-Message-State: APjAAAV/xgmsxu2eOp5DSBigER6vxRUbSYtp0HTznAUYhMCd8sh+FuP1 LgsTrQ6Mz923uupTqNvtAgOlaRNuHP0r1sta3BbNIQ== X-Google-Smtp-Source: APXvYqynBQXCJeFOQCr2egxZZ2Q6inEKUQBT6t2nFF7IJ9/ubtTRMopMQn2Y7nrUFeMTArCHdptWiVOrcCpG0CaAS+0= X-Received: by 2002:adf:9d81:: with SMTP id p1mr31532800wre.294.1560164677717; Mon, 10 Jun 2019 04:04:37 -0700 (PDT) MIME-Version: 1.0 References: <20190610082552.79083-1-iryzhov@nfware.com> <20190610093717.GA1925@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20190610093717.GA1925@bricha3-MOBL.ger.corp.intel.com> From: Igor Ryzhov Date: Mon, 10 Jun 2019 14:04:26 +0300 Message-ID: To: Bruce Richardson Cc: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] 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" Bruce, >From my understanding, kernel_dir is a directory with kernel headers needed for modules building. When it's formed automatically, yes, it will be "/lib/modules/version/build" and we can get installation directory by stripping "/build". But when it's set manually, it can be set to, for example, "/usr/src/linux-headers-version", and build will be successful, but we won't be able to strip "/build" as there is no "/build". Which path should be used for installation in cross-compile case, when the kernel_dir is set manually? On Mon, Jun 10, 2019 at 12:37 PM Bruce Richardson < bruce.richardson@intel.com> wrote: > 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 > > --- > > 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 > >