[yocto] Best practice for building a large amount of source files

Jeremy A. Puhlman jpuhlman at mvista.com
Thu Dec 10 13:32:24 PST 2015



On 12/10/2015 1:16 PM, Michael Habibi wrote:
> If I have some source I want to bring into my layer, for example:
>
> Recipe dir:
> meta-mylayer/recipes-management/myapplication/myapplication_1.0/<tons 
> of source files>
>
> What is the best option for adding all of these and compiling? As far 
> as I know, you have to do one of the following:
>
> 1) Use a fetch that fetches a tarball with all your source, or a repo 
> with all of your source
> 2) Use a million-line long SRC_URI assignment to include every file 
> that your application uses.
>
> Is there a third (or fourth) option that I may have missed?
Not necessarily best practice, but it is something that bitbake has 
supported.

If you create a directory under myapplication_1.0 that is unique and not 
an override, you can specify the directory name
as the SRC_URI and bitbake will pull the directory and its contents in.

Something like 
meta-mylayer/recipes-management/myapplication/myapplication_1.0/mysources/<tons 
of source files>

and SRC_URI file://mysources

It should work.

Something like the following:

 > find recipes/
recipes/
recipes/myapp
recipes/myapp/files
recipes/myapp/files/mysources
recipes/myapp/files/mysources/Makefile
recipes/myapp/myapp_1.0.bb
 > cat recipes/myapp/myapp_1.0.bb
LICENSE="MIT"
LIC_FILES_CHKSUM = 
"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

SRC_URI = "file://mysources"

S="${WORKDIR}/mysources"

>
> Michael
>
>
>
>

-- 
Jeremy A. Puhlman
jpuhlman at mvista.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20151210/54ffef40/attachment.html>


More information about the yocto mailing list