Help with yocto opencv/openNi

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help with yocto opencv/openNi

13,015 Views
andreajulian
Contributor II

hello Im using the wandboard quad now.

previously, we used the wandboard dual;

now i cant bake the same image:

~/fsl-community-bsp$ MACHINE=wandboard-quad . ./setup-environment build

Configuring for wandboard-quad

Welcome to Freescale Community BSP

The Yocto Project has extensive documentation about OE including a

reference manual which can be found at:

    http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:

    http://www.openembedded.org/

You can now run 'bitbake <target>'

Common targets are:

    core-image-minimal

    meta-toolchain

    meta-toolchain-sdk

    adt-installer

    meta-ide-support

Your configuration files at build has not been touched.

~/fsl-community-bsp/build$ bitbake fsl-image-gui-sdk

Loading cache: 100% |################################################################################################| ETA:  00:00:00

Loaded 1737 entries from dependency cache.

ERROR: Nothing PROVIDES 'fsl-image-gui-sdk'. Close matches:

  fsl-image-gui

  fsl-image-test

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

so i baked the fsl-image-gui, core-image-lsb-sdk, core-image-sato-sdk, and core-image-x11.

now regardless of the image,

i try to install OPENNI

$ cd ~/nfsRootFS/current/home/root

$ sudo wget "http://www.openni.org/wp-content/uploads/2013/11/OpenNI-Linux-Arm-2.2.0.33.tar.zip"

$ sudo apt-get install unzip

$ sudo unzip OpenNI-Linux-Arm-2.2.tar.zip

$ sudo tar xf OpenNI-Linux-Arm-2.2.tar.bz2

$ sudo rm OpenNI-Linux-Arm-2.2.tar.*

$ sudo minicom

# cd ~/OpenNI-Linux-Arm-2.2

root@wandboard-quad:~/OpenNI-Linux-Arm-2.2# ./install.sh

root@wandboard-quad:~/OpenNI-Linux-Arm-2.2# cd Samples/Bin/

root@wandboard-quad:~/OpenNI-Linux-Arm-2.2/Samples/Bin# chmod 777 SimpleRead

root@wandboard-quad:~/OpenNI-Linux-Arm-2.2/Samples/Bin# ./SimpleRead

-sh: ./SimpleRead: No such file or directory

same with opencv

i crossed compiled opencv built all examples as said here: Cross compilation for ARM based Linux systems — OpenCV 2.4.8.0 documentation

root@wandboard-quad:~/opencv-2.4.8/samples/c# ./contours

-sh: ./contours: cannot execute binary file

and if i try a bake:

lighthouse@hec02:~/fsl-community-bsp/build$ bitbake opencv

WARNING: Unable to get checksum for linux-boundary SRC_URI entry defconfig: file could not be found################  | ETA:  00:00:00

Parsing recipes: 100% |##############################################################################################| Time: 00:00:15

Parsing of 1343 .bb files complete (0 cached, 1343 parsed). 1736 targets, 77 skipped, 0 masked, 0 errors.

NOTE: Resolving any missing task queue dependencies

NOTE: multiple providers are available for jpeg (jpeg, libjpeg-turbo)

NOTE: consider defining a PREFERRED_PROVIDER entry to match jpeg

ERROR: Nothing PROVIDES 'libav' (but /home/lighthouse/fsl-community-bsp/sources/meta-openembedded/meta-oe/recipes-support/opencv/opencv_2.4.bb DEPENDS on or otherwise requires it)

ERROR: libav was skipped: because it has a restricted license not whitelisted in LICENSE_FLAGS_WHITELIST

ERROR: libav was skipped: because it has a restricted license not whitelisted in LICENSE_FLAGS_WHITELIST

ERROR: Required build target 'opencv' has no buildable providers.

Missing or unbuildable dependency chain was: ['opencv', 'libav']

Summary: There was 1 WARNING message shown.

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

i have livab installed, and i added the whitelist in the .conf:

MACHINE ??= 'wandboard-quad'

DISTRO ?= 'poky'

PACKAGE_CLASSES ?= "package_rpm"

EXTRA_IMAGE_FEATURES = "debug-tweaks package-management"

EXTRA_IMAGE_FEATURES = "tools-sdk"

EXTRA_IMAGE_FEATURES = "tools-debug"

#IMAGE_INSTALL_append = " opencv"

USER_CLASSES ?= "buildstats image-mklibs image-prelink"

PATCHRESOLVE = "noop"

OE_TERMINAL = "gnome"

BB_DISKMON_DIRS = "\

    STOPTASKS,${TMPDIR},1G,100K \

    STOPTASKS,${DL_DIR},1G,100K \

    STOPTASKS,${SSTATE_DIR},1G,100K \

    ABORT,${TMPDIR},100M,1K \

    ABORT,${DL_DIR},100M,1K \

    ABORT,${SSTATE_DIR},100M,1K"

CONF_VERSION = "1"

BB_NUMBER_THREADS = '8'

PARALLEL_MAKE = '-j 8'

INHERIT += "rm_work"

DL_DIR ?= "${BSPDIR}/downloads/"

LICENSE_FLAGS_WHITELIST = "commercial_libav"

LICENSE_FLAGS_WHITELIST = "commercial"

LICENSE_FLAGS_WHITELIST = "commercial_x264"

ACCEPT_FSL_EULA = ""

what do i do? if these programs don't work, our project won't work.

maybe by adding this?

IMAGE_INSTALL_append = " gcc g++ binutils libgcc libgcc-dev libstdc++ libstdc++-dev libstdc++-staticdev \

tslib-conf tslib-tests tslib-calibrate openssh-sftp-server alsa-lib alsa-tools alsa-state alsa-utils-alsaconf \

tslib evtest dbus nano gstreamer \

cairo pango fontconfig freetype pulseaudio "

im baking another fslimage-gui with this and will update

thanks!

Labels (1)
11 Replies

3,865 Views
andre_silva
NXP Employee
NXP Employee

Hi Andrea,

I was able to successfully install OpenCV on yocto, but didn´t try OpenNI yet, I´m going to work on this and let you know soon as I have any result. Also, you can ask the same question on a Yocto forum.

regards,

Andre

0 Kudos

3,865 Views
andreajulian
Contributor II

Thanks Andre!

It worked, but now they tell me this other error shows up. I leave you the

details below:

Ok, I've changed the local.conf and did a bitbake opencv

it worked!

then, i tried to use the smart package manager to add it to the yocto

image....

$ cd ~/fsl-community-bsp/build/tmp/deploy/rpm

$ createrepo --update .

On the board install the new packages

$ sudo minicom

  1. smart search opencv

  2. smart install opencv

here is my output:

root@wandboard-quad:~# smart search opencv

Updating cache... ########################################

Saving cache...

root@wandboard-quad:~# smart install opencv

Loading cache...

Updating cache... ########################################

error: 'opencv' matches no packages

root@wandboard-quad:~# smart install opencv --stepped

Loading cache...

Updating cache... ########################################

error: 'opencv' matches no packages

and if i try to bake an image (with the parameters given by you in the

local.conf), still cant bake -sdk and now cant do image, will try minimal

and get back

lighthouse@hec02:~/fsl-community-bsp/build$ bitbake fsl-image-gui-sdk

WARNING: Unable to get checksum for linux-boundary SRC_URI entry

defconfig: file could not be found################ | ETA: 00:00:00

Parsing recipes: 100%

|##############################################################################################|

Time: 00:00:15

Parsing of 1343 .bb files complete (0 cached, 1343 parsed). 1736 targets,

62 skipped, 0 masked, 0 errors.

ERROR: Nothing PROVIDES 'fsl-image-gui-sdk'. Close matches:

fsl-image-gui

fsl-image-test

Summary: There was 1 WARNING message shown.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

lighthouse@hec02:~/fsl-community-bsp/build$ bitbake fsl-image-gui

Loading cache: 100%

|################################################################################################|

ETA: 00:00:00

Loaded 1737 entries from dependency cache.

NOTE: Resolving any missing task queue dependencies

ERROR: Nothing RPROVIDES 'gpu-viv-bin-mx6q-devz' (but

/home/lighthouse/fsl-community-bsp/sources/meta-fsl-demos/recipes-fsl/images/fsl-image-gui.bb

RDEPENDS on or otherwise requires it)

NOTE: Runtime target 'gpu-viv-bin-mx6q-devz' is unbuildable, removing...

Missing or unbuildable dependency chain was:

ERROR: Required build target 'fsl-image-gui' has no buildable providers.

Missing or unbuildable dependency chain was: ['fsl-image-gui',

'gpu-viv-bin-mx6q-devz']

lighthouse@hec02:~/fsl-community-bsp/build$ bitbake core-image-minimal

Loading cache: 100%

|################################################################################################|

ETA: 00:00:00

Loaded 1737 entries from dependency cache.

NOTE: Resolving any missing task queue dependencies

ERROR: Nothing RPROVIDES 'gpu-viv-bin-mx6q-devz' (but

/home/lighthouse/fsl-community-bsp/sources/poky/meta/recipes-core/images/core-image-minimal.bb

RDEPENDS on or otherwise requires it)

NOTE: Runtime target 'gpu-viv-bin-mx6q-devz' is unbuildable, removing...

Missing or unbuildable dependency chain was:

ERROR: Required build target 'core-image-minimal' has no buildable

providers.

Missing or unbuildable dependency chain was: ['core-image-minimal',

'gpu-viv-bin-mx6q-devz']

Summary: There were 2 ERROR messages shown, returning a non-zero exit

code.

So my question is, do i change back to my original parameters to add

opencv to an image?

thank you for your help....

...............................................

Saludos Cordiales/Best Regards/Mit freundlichen Grüßen

Andrea Magdalena Julián Alcántar

Public Private Partnership Mexico

Systems & Technology Automotive

Continental Automotive

Phone: +52 33 3283 1100 Ext.8371 | 8095

E-mail: Andrea.Julian@continental-corporation.com

Av. General Ramón Corona #2514 | Zapopan | Jalisco | 45201 | México

http://www.continental-corporation.com

0 Kudos

3,865 Views
andre_silva
NXP Employee
NXP Employee

Hi Andrea,

it is because Yocto will only add the opencv support when you actually build an application that requires OpenCV, otherwise the libraries will not be included. But you can overcome this situation by adding manually the dev packages you want:

in the local.conf you can add:

CORE_IMAGE_EXTRA_INSTALL += "libopencv-core-dev libopencv-highgui-dev libopencv-imgproc-dev libopencv-object-dev libopencv-ml-dev"

and build it with:

bitbake core-image-x11

regards,

Andre

3,865 Views
mahyar1
Contributor II

Hi Andre,

could you please tell me how did you add opencv libraries to your local config file?

I think packages (recipes) should be available to be added to CORE_IMAGE_EXTRA_INSTALL.

I just have two recipes related to opencv : opencv and opencv-samples (bitbake-layers show-recipes)

so I get an error by running bitbake.

Thanks,

Mahyar

0 Kudos

3,865 Views
andre_silva
NXP Employee
NXP Employee
0 Kudos

3,865 Views
1990rahulreddy
Contributor IV

ERROR: Nothing RPROVIDES 'gpu-viv-bin-mx6q' (but /home/swapnil/fsl-release-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/images/fsl-image-qt5.bb RDEPENDS on or otherwise requires it)

NOTE: Runtime target 'gpu-viv-bin-mx6q' is unbuildable, removing...

Missing or unbuildable dependency chain was: ['gpu-viv-bin-mx6q']

ERROR: Required build target 'fsl-image-qt5' has no buildable providers.

Missing or unbuildable dependency chain was: ['fsl-image-qt5', 'gpu-viv-bin-mx6q']

0 Kudos

3,865 Views
andreajulian
Contributor II

Hi Andre,

Thank you very much for your help! Nevertheless the team keeps getting

this error...

ERROR: Nothing PROVIDES 'libav' (but

/home/lighthouse/fsl-community-bsp/sources/meta-openembedded/meta-oe/recipes-support/opencv/opencv_2.4.bb

DEPENDS on or otherwise requires it)

ERROR: libav was skipped: because it has a restricted license not

whitelisted in LICENSE_FLAGS_WHITELIST

ERROR: libav was skipped: because it has a restricted license not

whitelisted in LICENSE_FLAGS_WHITELIST

NOTE: Runtime target 'libopencv-core-dev' is unbuildable, removing...

Missing or unbuildable dependency chain was: ['libopencv-core-dev',

'libav']

ERROR: Required build target 'core-image-x11' has no buildable providers.

Missing or unbuildable dependency chain was: ['core-image-x11',

'libopencv-core-dev', 'libav']

y esta puesto en local.conf:

MACHINE ??= 'wandboard-quad'

DISTRO ?= 'poky'

PACKAGE_CLASSES ?= "package_rpm"

EXTRA_IMAGE_FEATURES = "debug-tweaks package-management"

EXTRA_IMAGE_FEATURES = "tools-sdk"

EXTRA_IMAGE_FEATURES = "tools-debug"

CORE_IMAGE_EXTRA_INSTALL += "libopencv-core-dev libopencv-highgui-dev

libopencv-imgproc-dev libopencv-object-dev libopencv-ml-dev"

#IMAGE_INSTALL_append = " opencv"

IMAGE_INSTALL_append = " bash grep make wget util-linux usbutils gcc g++

binutils libgcc libgcc-dev libstdc++ libstdc+-dev libstdc+-staticdev \

tslib-conf tslib-tests tslib-calibrate openssh-sftp-server alsa-lib

alsa-tools alsa-state alsa-utils-alsaconf \

tslib evtest dbus nano gstreamer \

cairo pango fontconfig freetype pulseaudio "

USER_CLASSES ?= "buildstats image-mklibs image-prelink"

PATCHRESOLVE = "noop"

OE_TERMINAL = "gnome"

BB_DISKMON_DIRS = "\

STOPTASKS,$,1G,100K \ STOPTASKS,$,1G,100K \ STOPTASKS,$,1G,100K \ ABORT,$,100M,1K \

ABORT,$,100M,1K \

ABORT,$,100M,1K"

CONF_VERSION = "1"

BB_NUMBER_THREADS = '8'

PARALLEL_MAKE = '-j 8'

INHERIT += "rm_work"

DL_DIR ?= "$/downloads/"

LICENSE_FLAGS_WHITELIST = "commercial_libav"

LICENSE_FLAGS_WHITELIST = "commercial"

LICENSE_FLAGS_WHITELIST = "commercial_x264"

ACCEPT_FSL_EULA = ""

...............................................

Saludos Cordiales/Best Regards/Mit freundlichen Grüßen

Andrea Magdalena Julián Alcántar

Public Private Partnership Mexico

Systems & Technology Automotive

Continental Automotive

Phone: +52 33 3283 1100 Ext.8371 | 8095

E-mail: Andrea.Julian@continental-corporation.com

Av. General Ramón Corona #2514 | Zapopan | Jalisco | 45201 | México

http://www.continental-corporation.com

0 Kudos

3,865 Views
andre_silva
NXP Employee
NXP Employee

Hi Andrea,

I´m writing a tutorial to post in the imxcv blog (imxcv.blogspot.com) and share with you soon as it is online.

regards,

Andre

0 Kudos

3,865 Views
andreajulian
Contributor II

Thank you very much Andre! =)

...............................................

Saludos Cordiales/Best Regards/Mit freundlichen Grüßen

Andrea Magdalena Julián Alcántar

Public Private Partnership Mexico

Systems & Technology Automotive

Continental Automotive

Phone: +52 33 3283 1100 Ext.8371 | 8095

E-mail: Andrea.Julian@continental-corporation.com

Av. General Ramón Corona #2514 | Zapopan | Jalisco | 45201 | México

http://www.continental-corporation.com

0 Kudos

3,865 Views
andreajulian
Contributor II

Thank you very much Andre,

I'll share this information with the engineering team.

I'll keep in touch.

Have a nice day.

...............................................

Saludos Cordiales/Best Regards/Mit freundlichen Grüßen

Andrea Magdalena Julián Alcántar

Public Private Partnership Mexico

Systems & Technology Automotive

Continental Automotive

Phone: +52 33 3283 1100 Ext.8371 | 8095

E-mail: Andrea.Julian@continental-corporation.com

Av. General Ramón Corona #2514 | Zapopan | Jalisco | 45201 | México

http://www.continental-corporation.com

0 Kudos

3,865 Views
andre_silva
NXP Employee
NXP Employee

Hi Andrea,

please, use a local.conf like this:

-----------------------

MACHINE ??= 'imx6qsabresd'

DISTRO ?= 'poky'

PACKAGE_CLASSES ?= "package_rpm"

EXTRA_IMAGE_FEATURES = "debug-tweaks"

USER_CLASSES ?= "buildstats image-mklibs image-prelink"

PATCHRESOLVE = "noop"

BB_DISKMON_DIRS = "\

    STOPTASKS,${TMPDIR},1G,100K \

    STOPTASKS,${DL_DIR},1G,100K \

    STOPTASKS,${SSTATE_DIR},1G,100K \

    ABORT,${TMPDIR},100M,1K \

    ABORT,${DL_DIR},100M,1K \

    ABORT,${SSTATE_DIR},100M,1K"

PACKAGECONFIG_pn-qemu-native = "sdl"

ASSUME_PROVIDED += "libsdl-native"

CONF_VERSION = "1"

BB_NUMBER_THREADS = '4'

PARALLEL_MAKE = '-j 4'

DL_DIR ?= "${BSPDIR}/downloads/"

ACCEPT_FSL_EULA = ""

CORE_IMAGE_EXTRA_INSTALL += "gpu-viv-bin-mx6q gpu-viv-bin-mx6q-devz"

LICENSE_FLAGS_WHITELIST = "commercial"

-----------------------------

I was able to build OpenCV with that, regarding OpenNI, I didn´t find any recipe for this. I will need to investigate how to build it for yocto.

Regards,

Andre