Freescale / meta-freescale-distro

OpenEmbedded/Yocto BSP layer for Freescale's ARM based platforms
http://freescale.github.io
62 stars 81 forks source link

Unable to add SoftISP-based OpenVX samples in Yocto for IMX8 #15

Closed lleoncr closed 4 years ago

lleoncr commented 5 years ago

Hi everyone,

I have been looking for an option to enable SoftISP - OpenVX samples on an Nitrogen IMX8 mini. I have tried editing the recipe, but it seems to skip it. The edited recipe (https://github.com/Freescale/meta-freescale-distro/blob/master/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_5.0.2.bb) is below:

SUMMARY = "i.MX GPU SDK Samples"
DESCRIPTION = "Set of sample applications for i.MX GPU"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://License.md;md5=9d58a2573275ce8c35d79576835dbeb8"

DEPENDS = "assimp devil gstreamer1.0 gstreamer1.0-plugins-base"
DEPENDS_append = \
    "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' wayland', \
        bb.utils.contains('DISTRO_FEATURES',     'x11',  ' xrandr', \
                                                                '', d), d)}"
DEPENDS_append_imxgpu2d = " virtual/libg2d virtual/libopenvg"
DEPENDS_append_imxgpu3d = " virtual/libgles2"
DEPENDS_append_mx8      = \
    "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \
        bb.utils.contains('DISTRO_FEATURES',     'x11', '', \
                                                        ' vulkan', d), d)}"

SRC_URI = "git://github.com/codeauroraforum/gtec-demo-framework.git;protocol=https"

SRCREV = "d35bac9419895ea516c25e2f36a6084729d9e6ce"

# For backwards compatibility
RPROVIDES_${PN} = "fsl-gpu-sdk"
RREPLACES_${PN} = "fsl-gpu-sdk"
RCONFLICTS_${PN} = "fsl-gpu-sdk"

BACKEND = \
    "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'Wayland', \
        bb.utils.contains('DISTRO_FEATURES',     'x11',     'X11', \
                                                             'FB', d), d)}"

FEATURES                  = "EGL,EarlyAccess,OpenVG,OpenVX"
FEATURES_append_imxgpu2d  = ",G2D"
FEATURES_append_imxgpu3d = ",OpenGLES2"
FEATURES_append_mx6q     = ",OpenGLES3"
FEATURES_append_mx6dl    = ",OpenGLES3"
FEATURES_append_mx8       = ",OpenGLES3,OpenGLES3.1,OpenCL,OpenCL1.1,OpenCL1.2,OpenCV,OpenVX"
FEATURES_append_mx8       = \
    "${@bb.utils.contains('DISTRO_FEATURES', 'wayland',        '', \
        bb.utils.contains('DISTRO_FEATURES',     'x11',        '', \
                                                        ',Vulkan', d), d)}"

EXTENSIONS       = ""
EXTENSIONS_mx8mq = "OpenGLES3.1:EXT_geometry_shader,OpenGLES3.1:EXT_tessellation_shader"

S = "${WORKDIR}/git"

inherit python3native

do_compile () {
    export FSL_PLATFORM_NAME=Yocto
    export ROOTFS=${STAGING_DIR_HOST}
    . ./prepare.sh
    FslBuild.py -t sdk --UseFeatures [${FEATURES}] -v --UseExtensions [${EXTENSIONS}] --Variants [WindowSystem=${BACKEND}] --BuildThreads ${BB_NUMBER_THREADS} -- install
}

do_install () {
    install -d "${D}/opt/${PN}"
    cp -r ${S}/bin/* ${D}/opt/${PN}
    rm -rf ${D}/opt/${PN}/GLES2/DirectMultiSamplingVideoYUV
    rm -rf ${D}/opt/${PN}/GLES3/DirectMultiSamplingVideoYUV
    rm -rf ${D}/opt/${PN}/GLES2/DeBayer
}

FILES_${PN} += "/opt/${PN}"
FILES_${PN}-dbg += "/opt/${PN}/*/*/.debug /usr/src/debug"
INSANE_SKIP_${PN} += "already-stripped rpaths"

COMPATIBLE_MACHINE = "(mx6|mx7ulp|mx8)"

Did I forget something? How can I enable OpenVX?

Additional information:

I am using the following Yocto repo: https://boundarydevices.com/yocto-release-for-i-mx-8mm/ Board: i.MX8M MINI Target image: boundary-image-multimedia-full Compiling on Ubuntu 18.04

Thanks in advance, Leon.

zandrey commented 5 years ago

Hey Leon,

As far as I've seen, SoftIP needs both OpenVX and OpenVX1.1 features to be enabled.

Extract from the build log show that: Could not build package 'OpenVX.SoftISP' due to missing features 'OpenVX1.1'

You'd need to add somthing like this to SDK recipe: FEATURES = "EGL,EarlyAccess,OpenVG,OpenVX,OpenVX1.1"

However, I guess it would not be recommended since OpenVX is not officially supported by this layer (otherwise it would be included here). The best course of action to be is to create a .bbappend in your BSP layer and append FEATURES variable there.

-- andrey

lleoncr commented 5 years ago

Thanks for the answer. I will take it into consideration and come back if it worked.

zandrey commented 4 years ago

Hey Leon!

Thanks for the answer. I will take it into consideration and come back if it worked.

Did the above proposal worked for you? Is this issue still valid?

-- andrey

lleoncr commented 4 years ago

Hi Zandrey,

In the end, I could not integrate OpenVX with my platform. I was checking this page: https://developer.ridgerun.com/wiki/index.php?title=IMX8/SOC_Overview.

It says that my platform does not have support for OpenVX.

Thanks for your help and time.