From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by mail.openembedded.org (Postfix) with ESMTP id 60FC071A8C for ; Mon, 12 Dec 2016 15:38:55 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id g23so12061533wme.1 for ; Mon, 12 Dec 2016 07:38:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; 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=iYeLJ4ONHY4YDTBGzak2YTQSAlX5f5X5ilY1UguOf4z6XpULSVoZx+ne+98KgYpcDG 5KAIFOihlKjl1mAbFsiQGZdZwcJbL83+Q7QhQhUGoiLX+zOKzlRxCM6YbXlbFhgA8unn toLJYqnHQWabOi2qKRUizyh1vMJ4LjczPRFUzLGMDXlL6pILlnmM+1xSSeJ315LoiGNA OcU5CDcmln5gb970HuAz/SWuW9RHoDLk6eeGDbOMprDPMArnCcgoWDvR3uyLVTrgKiWf Vg5Th2ugMdxtdJloGMIFi6HTb8CrsBpuk0vn0+OMX4JunHOc1IdJa1CBryhiOgxiVU2u Qyzg== X-Gm-Message-State: AKaTC005/rhhc1op1+6+MgZDf5A4iADZboLhQIWFDqPBFKFblj5esEi31ecrP/w6OVS4pw== X-Received: by 10.28.213.133 with SMTP id m127mr19422553wmg.90.1481557136258; Mon, 12 Dec 2016 07:38:56 -0800 (PST) Received: from tfsielt31850 ([77.107.218.170]) by smtp.gmail.com with ESMTPSA id x140sm36016391wme.19.2016.12.12.07.38.55 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Dec 2016 07:38:55 -0800 (PST) Message-ID: <1481557132.2518.11.camel@andred.net> From: =?ISO-8859-1?Q?Andr=E9?= Draszik To: openembedded-core@lists.openembedded.org Date: Mon, 12 Dec 2016 15:38:52 +0000 In-Reply-To: <20161121093713.7220-1-git@andred.net> References: <20161121093713.7220-1-git@andred.net> X-Mailer: Evolution 3.22.2-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: Mon, 12 Dec 2016 15:38:57 -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