[yocto] Best practice for files copied directly into sysroot?

Bryan Evenson bevenson at melinkcorp.com
Mon Dec 7 13:32:14 PST 2015


Paul,

> -----Original Message-----
> From: Paul Eggleton [mailto:paul.eggleton at linux.intel.com]
> Sent: Monday, December 07, 2015 2:50 PM
> To: Bryan Evenson <bevenson at melinkcorp.com>
> Cc: yocto at yoctoproject.org; Trevor Woerner <twoerner at gmail.com>;
> Michael Habibi <mikehabibi at gmail.com>
> Subject: Re: [yocto] Best practice for files copied directly into sysroot?
> 
> On Mon, 07 Dec 2015 12:48:29 Trevor Woerner wrote:
> > On 12/04/15 09:03, Bryan Evenson wrote:
> > > Although I am having issues with the license; I haven't figured out where
> > > to put it and what to set LIC_FILES_CHKSUM to in the recipe so that
> > > bitbake can find the license.  If anyone has a good answer for that, let
> > > me know.
> > You could try:
> >     LICENSE = "CLOSED"
> >
> > then you don't need a checksum line.
> 
> This is legitimate of course only when the source is in fact closed (and even
> then, there may be redistribution conditions that you might want to track).
> 
> There are several more appropriate ways to solve this issue:
> 
> 1) The proper way is to point to a file in the fetched/unpacked sources. To do
> this, LIC_FILES_CHKSUM should specify one or more paths relative to ${S}
> (i.e.
> where the sources are unpacked to) each prefixed by file:// .
> 

Ah, now I see the example in the manual: "Specifying the LIC_FILES_CHKSUM Variable".  In my case I have the license as a separate file in my files/ directory for the recipe. So in my case I now set:

LIC_FILES_CHECKSUM = "file://${WORKDIR}/license.txt;md5=blahblah"
SRC_URI = "file://${BP}.tar.gz \
    file://license.txt \
    "

Now the do_license step is finding the license in the WORKDIR and I no longer have any warnings about the license.

Thanks!
Bryan

> 2) If there is no file in the sources describing the license, then add one in
> SRC_URI, or point to a common one in ${COMMON_LICENSE_DIR} if
> appropriate.
> These are then copied into ${WORKDIR} automatically and can be referred to
> in
> LIC_FILES_CHKSUM from there.
> 
> Cheers,
> Paul
> 
> --
> 
> Paul Eggleton
> Intel Open Source Technology Centre



More information about the yocto mailing list