[yocto] change/modify recipe for OpenCV

Mariano Lopez mariano.lopez at linux.intel.com
Thu Nov 24 08:46:36 PST 2016


On Thursday, November 24, 2016 11:40:16 AM Peter Balazovic wrote:
> Dears,
> 
> I'm building Yocto image and this includes OpenCV 2.4 release.
> 
> For example my loca.conf looks similar as
> http://www.engcore.com/2014/02/building-opencv-2-4-x-for-freescales-i-mx6-bsp-yocto/
> :
> 
> ..
> *CORE_IMAGE_EXTRA_INSTALL += "libopencv-core-dev libopencv-highgui-dev*
> *libopencv-imgproc-dev libopencv-objdetect-dev libopencv-ml-dev"*
> ..
> 
> 
> I have located recipes *.bb @
> *../sources/meta-openembedded/meta-oe/recipes-support/opencv/*
> *opencv_2.4.bb <http://opencv_2.4.bb>*
> *opencv_3.0.bb <http://opencv_3.0.bb>*
> 
> *.bbapend @
> *../sources/meta-fsl-arm/openembedded-layer/recipes-support/opencv/*
> *opencv_2.4.bbappend*
> *opencv_3.0.bbappend*
> 
> Within fsl-imx-base.inc I can see reference to opencv_2.4.bbappend
> *../sources/meta-fsl-bsp-release/imx/meta-sdk/conf/distro/include*
> 
> ..
> BBMASK .=
> "|meta-fsl-arm/openembedded-layer/recipes-support/opencv/opencv_2.4.bbappend"
> ..
> 
> but replacing with 3.0 doesn't compile with 3.0.

I haven't check the bbappend file, but most likely the changes won't apply for 3.0.

> 
> I'd like to have OpenCV 3.0 installed.
> 
> 1) How/what to modify/configure to get installed OpenCV 3.0 into image ?

Unless you have a restriction (license, PREFERRED_VERSION) to not install
OpenCV 3.0, bitbake will install the newer.


> 2) How to control OpenCV build for Yocto and how packageconfig option to
> use to turn on/off individual OpenCV options?

I think you are looking for PACKAGECONFIG recipe variable, you can find more
info in here:

http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-PACKAGECONFIG

A good recipe example would be ffmpeg.

> 
> 
> Thank you for your advice very much.

Cheers

Mariano



More information about the yocto mailing list