From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4BDDC432C0 for ; Mon, 2 Dec 2019 08:10:19 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 5A4ED20748 for ; Mon, 2 Dec 2019 08:10:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nfware-com.20150623.gappssmtp.com header.i=@nfware-com.20150623.gappssmtp.com header.b="rVmrC7xs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A4ED20748 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=nfware.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A6CF91C066; Mon, 2 Dec 2019 09:10:18 +0100 (CET) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 8067D1BFDC for ; Mon, 2 Dec 2019 09:10:17 +0100 (CET) Received: by mail-wm1-f67.google.com with SMTP id t14so4488123wmi.5 for ; Mon, 02 Dec 2019 00:10:17 -0800 (PST) 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=ciFcwOkJrCdMcvp9zv0o6Xb7hffuvRDLN+zE74l+MK4=; b=rVmrC7xs1D1YiaCbsNHdU7Z3lLNzTlBg2u7qbMRjdMEyvOFRDBkyFFVoSDX2eXhOsr MFm7oCYN6WFoEsGc+tKQCHJaInLlzVkpjkE+3qoXub6/HPvV3WaeTf4Gztlxu3CiiFDo ZyA/Rj059TNsK/n5g6dFc+GGa7KdnPeeShsNt2IRO4dzXYr04950kU/752b+EykkPAQm br02cb0TslcQAVdqqZnjFC8vsnbrU3Md3CnarOJzKUvsJZDUdrgaEL3PTzaKxMz5rxPk ISegarcG9kSJx9jLoZwnYMS1esOtXLzvQE8gXkoeUmk8F59FM9ytvKncL/ZQ2gl/B/8R Ozcw== 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=ciFcwOkJrCdMcvp9zv0o6Xb7hffuvRDLN+zE74l+MK4=; b=T2eiIAQh4xouOYRdjUxSfv3rJmJq5FdEtK+E1wFkQWpiOvNinP/pk8ur18ior1dzkp O1+lOrYlD3K/YcgDJ9sux4whFGD6bVahEGCpoRLPCp70yl7+jnxifIwmpYJCbl0sbMDu ECH7t3hc+TSNbiGl1Ki7Qt+e571Aw0XpoaGqKwcUvOhyMIcqBIu+pQPTdk3hEroFzUUC xXXPmDAFws51LN7Y6Cd0eH5IfCFW+lR/K+aH+Xy6YrUPqcTd6beRZw9jq5OuheFzq51a owWIf+2lMXA6MnqXU264k+L3xFnQQx8RJUxnAQDtZwI3JGP+MHHGbTBYDMl4osCvHBMR 5DPg== X-Gm-Message-State: APjAAAWHW1YJQ2CxCqNDp80Ikce5CIygNRIcDb+NMnCkNlmJQE7sH6oS Gu4DLQKve3xYCUwA1bILuomCoYWj9nv/6q2tH6bIoA== X-Google-Smtp-Source: APXvYqx7jxOQd7d8oXOXwLiH7VeOOZG2/3BHR8rXJ2pg1vpnwlQNsUC6Ofzj6YRTZfE6I9A4WInqP3RseEk44fjqeys= X-Received: by 2002:a7b:ce19:: with SMTP id m25mr7617039wmc.6.1575274217152; Mon, 02 Dec 2019 00:10:17 -0800 (PST) MIME-Version: 1.0 References: <20191202061442.56964-1-xiaolong.ye@intel.com> In-Reply-To: <20191202061442.56964-1-xiaolong.ye@intel.com> From: Igor Ryzhov Date: Mon, 2 Dec 2019 11:10:06 +0300 Message-ID: To: Xiaolong Ye Cc: Ferruh Yigit , Bruce Richardson , dev , dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] kernel/linux: fix kernel dir for meson 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" 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 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 > > //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 > --- > 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 > >