From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wj0-f194.google.com (mail-wj0-f194.google.com [209.85.210.194]) by mail.openembedded.org (Postfix) with ESMTP id 8ABB7772D7 for ; Wed, 21 Dec 2016 10:02:51 +0000 (UTC) Received: by mail-wj0-f194.google.com with SMTP id xy5so31280042wjc.1 for ; Wed, 21 Dec 2016 02:02:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=TPMN/4b+K78zVFH4vOJB94x/MbNvfBzfzRb+guRwCcQ=; b=uUmx9/fprYAYnbZiw2Gk/knKR0WxSsI0QpK+WdF96PjxTAC1QJ/8mmtF4JUG/ZKzYk QQuP7ufQK0oOaY6ZMcrq7LeBS3mvk2WSF2/v3HDasygWWdKB0EKJ0IZeWlDdJpTI0x+5 T/DGFxeeCQ1hcqj7oGdm5EhIy9vbngsLD628rkXkhgpsg/MuYeuw5Sz3ZbhNSrSfdarK tP/QetIvDFxqN3bOY/JlgsxE29qdaVbNje63NNIApSAxlJp9I1W9adqHMi4n0mb2kg1f XR5fVg+WFQ0pr5Rx+eZFcmvv2AC5f23FEV9ZXuJIwMb0DEzmtyODcktigAMFToKTsYdJ 7WAg== X-Gm-Message-State: AIkVDXKQN6Vz2unwvdFwiwAd9DHCVTQKt2I/lg2cbimB1wf6TJNxA5ZPMuDg4kTYBnCxOA== X-Received: by 10.194.200.228 with SMTP id jv4mr1470239wjc.217.1482314572031; Wed, 21 Dec 2016 02:02:52 -0800 (PST) Received: from tfsielt31850 ([77.107.218.170]) by smtp.gmail.com with ESMTPSA id bf2sm29603300wjc.48.2016.12.21.02.02.50 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Dec 2016 02:02:51 -0800 (PST) Message-ID: <1482314569.19279.2.camel@andred.net> From: =?ISO-8859-1?Q?Andr=E9?= Draszik To: openembedded-core@lists.openembedded.org Date: Wed, 21 Dec 2016 10:02:49 +0000 In-Reply-To: <20161121093713.7220-1-git@andred.net> References: <20161121093713.7220-1-git@andred.net> X-Mailer: Evolution 3.22.3-1 Mime-Version: 1.0 Subject: Re: [PATCH] module.bbclass: allow to override location of Module.symvers X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2016 10:02:52 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit ping On Mon, 2016-11-21 at 09:37 +0000, André Draszik wrote: > From: André Draszik > > Requiring all build systems for external kernel modules to > place Module.symvers directly into ${B}/. is quite an > artificial assumption/requirement. It doesn't have to end > up there, but could easily end up somewhere below ${B}. > > Allow to override the location below ${B} > > Note that we still don't make use of multiple > Module.symvers in case there are any generated by one > single kernel module build, but this is no change in > behaviour from before and could be added if there really > is a demand for that. > > Reported-by: Denys Dmytriyenko > Signed-off-by: André Draszik > --- >  meta/classes/module.bbclass | 16 ++++++++++++---- >  1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass > index 68e3d34..037ca4f 100644 > --- a/meta/classes/module.bbclass > +++ b/meta/classes/module.bbclass > @@ -7,6 +7,7 @@ do_make_scripts[depends] += > "virtual/kernel:do_shared_workdir" >  EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}" >   >  MODULES_INSTALL_TARGET ?= "modules_install" > +MODULES_MODULE_SYMVERS_LOCATION ?= "" >   >  python __anonymous () { >      depends = d.getVar('DEPENDS', True) > @@ -35,10 +36,17 @@ module_do_install() { >              O=${STAGING_KERNEL_BUILDDIR} \ >              ${MODULES_INSTALL_TARGET} >   > - install -d -m0755 ${D}${includedir}/${BPN} > - cp -a --no-preserve=ownership ${B}/Module.symvers > ${D}${includedir}/${BPN} > - # it doesn't actually seem to matter which path is specified here > - sed -e 's:${B}/::g' -i ${D}${includedir}/${BPN}/Module.symvers > + if [ ! -e > "${B}/${MODULES_MODULE_SYMVERS_LOCATION}/Module.symvers" ] ; then > + bbwarn "Module.symvers not found in > ${B}/${MODULES_MODULE_SYMVERS_LOCATION}" > + bbwarn "Please consider setting > MODULES_MODULE_SYMVERS_LOCATION to a" > + bbwarn "directory below B to get correct inter-module > dependencies" > + else > + install -Dm0644 > "${B}/${MODULES_MODULE_SYMVERS_LOCATION}"/Module.symvers > ${D}${includedir}/${BPN}/Module.symvers > + # Module.symvers contains absolute path to the build > directory. > + # While it doesn't actually seem to matter which path is > specified, > + # clear them out to avoid confusion > + sed -e 's:${B}/::g' -i > ${D}${includedir}/${BPN}/Module.symvers > + fi >  } >   >  EXPORT_FUNCTIONS do_compile do_install