From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.17]) by mail.openembedded.org (Postfix) with ESMTP id 2AB4071A61 for ; Tue, 22 Nov 2016 22:33:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id D51A020A48; Tue, 22 Nov 2016 22:33:43 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo03-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GUO8jPW0dcLn; Tue, 22 Nov 2016 22:33:43 +0000 (UTC) Received: from mail.denix.org (pool-100-15-95-79.washdc.fios.verizon.net [100.15.95.79]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id B4FDE2099F; Tue, 22 Nov 2016 22:33:42 +0000 (UTC) Received: by mail.denix.org (Postfix, from userid 1000) id 179D51621A7; Tue, 22 Nov 2016 17:33:42 -0500 (EST) Date: Tue, 22 Nov 2016 17:33:42 -0500 From: Denys Dmytriyenko To: =?iso-8859-1?Q?Andr=E9?= Draszik Message-ID: <20161122223342.GC31090@denix.org> References: <20161121093713.7220-1-git@andred.net> MIME-Version: 1.0 In-Reply-To: <20161121093713.7220-1-git@andred.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: openembedded-core@lists.openembedded.org 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: Tue, 22 Nov 2016 22:33:43 -0000 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Mon, Nov 21, 2016 at 09:37:13AM +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 Looks good to me, thanks. Acked-by: Denys Dmytriyenko > --- > meta/classes/module.bbclass | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) [...] > - 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 BTW, is "-Dm0644" portable? > + # 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