[yocto] Two Stage Package Recipe

Darcy Watkins dwatkins at sierrawireless.com
Sat Jan 24 08:56:45 PST 2015


Hello,

I have a package in my BSP layer, let’s just call it “my-platform”.  At present, it builds libraries to implement a HW access API along with command line utilities useful for testing and diagnostics (and using the API from shell scripts).  At present, it also uses the host-swig to generate interface libraries for python bindings and java bindings to access the HW API.

This means that ‘my-platform’ has to depend both on ‘python’ and on ‘openjdk-7-jre’ to build.

What I would like to do is to have the default build to the recipe to build it all EXCEPT for the java bindings.  So I would want to build all the usual libraries and utilities and have this NOT have dependency on ‘openjdk-7-jre’.

Then without having to treat it as a different package, I would like to be able to re-invoke the build to build the java bindings.  This particular step will need to be dependent on ‘openjdk-7-jre’ without making earlier steps to be dependent on ‘openjdk-7-jre’.

I envision that this should result in one RPM output with the first build products, and the second RPM output with the java bindings (addons).

In the end, I will want to be able to have a minimalistic image include and depend on ‘my-package’ without java bindings, and then have a full feature image that includes and depends on the java bindings.

I suppose there is nothing stopping me from breaking out the python bindings into the same second stage scheme as well just to keep things consistent, but in terms of need, breaking out the java is the priority.

Any suggestions, tips in terms of best practices?   … or please point me to good examples to study.  Thanks!

I am presently working from ‘daisy’ branch.

Thanks in advance.


Regards,

Darcy



Darcy Watkins
Staff Engineer, Firmware

----
Sierra Wireless
http://www.sierrawireless.com
[M1]

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


More information about the yocto mailing list