[yocto] creating images which include actively developed applications

Brian Karcz briank at RUSSOUND.COM
Wed Apr 22 13:51:08 PDT 2015


Hi Paul,

Thanks for pointing me to that. It sounds like exactly what I need. I can't believe that I've not come across that in my searches. I suppose its a matter of using the right search criteria.

It looks like I can add those lines to either local.conf or the package recipe. Once I do that I have a couple question on how it works:

1) does the version of the recipe become moot? Does it still need dummy versions in PV and PR to be valid?
2) can the SRC_URI now be omitted in the recipe since there is nothing to fetch?
3) can the "S" variable be used to drive into the source tree to find the applications top level makefile or should I just point the EXTERNALSRC variable right there and it will be fine navigating above that base?
4) can the recipe still inherit autotools to perform the build on the external source directory?

I'm now envisioning a package recipe that looks something like:

PV = "1.0"
PR = "r1"
DESCRIPTION = "abc package located outside build tree"
INHERIT += "externalsrc"
EXTERNALSRC_abc = "../../../../../abc"
S = "../../../../../abc/apps/build"
inherit autotools

Its propably unlikely, since this lends itself to being very custom, but do you know of any examples of a recipe implementation that use this mechanism?

Thanks,
Brian

-----Original Message-----
From: Paul Eggleton [mailto:paul.eggleton at linux.intel.com] 
Sent: Wednesday, April 22, 2015 1:58 PM
To: Brian Karcz
Cc: yocto at yoctoproject.org
Subject: Re: [yocto] creating images which include actively developed applications

Hi Brian,

On Wednesday 22 April 2015 15:32:06 Brian Karcz wrote:
> I'm attempting to create a recipe for some custom applications that we 
> want to include in our target image. The applications are actively 
> developed and it's often desired to generate images without versioning 
> the application code. It's also desired to be able to work in a source 
> tree that is external to the build tree. I'm trying to determine if 
> Yocto has a mechanism similar to the "source directory override" in 
> Buildroot that allows you to point a package/recipe at an external 
> directory to locate the source code.
>
> We have been using Poky for a couple years, but so far, have had to 
> build the applications externally and use some magic in the image 
> recipes to bring in the pre-built executables explicitly. We 
> accomplished this by using some relative pathing in the SRC_URI and 
> then placing the files in the rootfs by adding some commands to the image preprocess command.
> 
> Is there a way to create a recipe to build actively developed code 
> located in an external source directory? Basically skip the fetch and 
> unpack steps and always execute the compile and populate steps each 
> time and image is built?

Indeed there is:

http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#building-software-from-an-external-source

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list