[oe] [PATCH] opencl-icd-loader: Initial recipe for OpenCL ICD loader

Khem Raj raj.khem at gmail.com
Mon Oct 8 02:31:59 UTC 2018


On Sat, Oct 6, 2018 at 1:43 AM Ankit Navik <ankit.tarot at gmail.com> wrote:
>
> This patch provides ICD loader library and ICD loader test binary
> and some helper library for test.
>
> Signed-off-by: Ankit Navik <ankit.tarot at gmail.com>
> ---
>  .../opencl-icd-loader/opencl-icd-loader_git.bb     | 47 ++++++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 meta-oe/recipes-core/opencl-icd-loader/opencl-icd-loader_git.bb
>
> diff --git a/meta-oe/recipes-core/opencl-icd-loader/opencl-icd-loader_git.bb b/meta-oe/recipes-core/opencl-icd-loader/opencl-icd-loader_git.bb
> new file mode 100644
> index 0000000..f6a8fef
> --- /dev/null
> +++ b/meta-oe/recipes-core/opencl-icd-loader/opencl-icd-loader_git.bb
> @@ -0,0 +1,47 @@
> +SUMMARY  = "OpenCL ICD Loader"
> +DESCRIPTION = "OpenCL compute ICD Loader from Khronos Group"
> +LICENSE  = "CLOSED"

this seems to be problematic, usually khronos s/w is under a known open
source license if its closed source then I would not like to maintain
it in open OE layers.
if its wrongly marked at closed please fix it in v2.

> +LIC_FILES_CHKSUM = "file://icd.h;beginline=1;endline=36;md5=c406ef72ec08f23326801455d7713b07"
> +SECTION = "base"
> +
> +inherit pkgconfig cmake
> +
> +S = "${WORKDIR}/git"
> +SRCREV = "b342ff7b7f70a4b3f2cfc53215af8fa20adc3d86"
> +SRC_URI = "git://github.com/KhronosGroup/OpenCL-ICD-Loader.git"
> +
> +do_install () {
> +       install -d ${D}${bindir}
> +       install -m 0755 ${S}/../build/bin/icd_loader_test ${D}${bindir}/

could be use ${B} here

> +       chrpath -d ${D}${bindir}/icd_loader_test
> +       install -d ${D}${libdir}
> +       install -m 0644 ${S}/../build/lib/libIcdLog.so ${D}${libdir}/
> +       install -m 0644 ${S}/../build/lib/libOpenCLDriverStub.so ${D}${libdir}/
> +       chrpath -d ${D}${libdir}/libOpenCLDriverStub.so
> +       install -m 0644 ${S}/../build/lib/libOpenCL.so.1.2 ${D}${libdir}/

same here.

> +       cd ${D}${libdir}
> +       ln -s libOpenCL.so.1.2 libOpenCL.so.1
> +       ln -s libOpenCL.so.1 libOpenCL.so
> +}
> +
> +PACKAGES = "opencl-icd-loader opencl-icd-loader-dev"
> +PACKAGES += "libicdlog libicdlog-dbg"
> +
> +FILES_${PN} = " \
> +       ${bindir}/icd_loader_test \
> +       ${libdir}/libOpenCLDriverStub.so \
> +       ${libdir}/libOpenCL.so.1.2 \
> +"
> +FILES_${PN}-dev = " \
> +       ${libdir}/libOpenCL.so \
> +       ${libdir}/libOpenCL.so.1 \
> +"
> +
> +FILES_libicdlog = "${libdir}/libIcdLog.so"
> +FILES_libicdlog-dbg = "${libdir}/.debug/libIcdLog.so \
> +       /usr/src/debug/opencl-icd-loader/git-${PR}/git/test \
> +       /usr/src/debug/opencl-icd-loader/git-${PR}/git \
> +"

Please use bitbake variables instead of hardcoding /usr

> +
> +DEPENDS = "opencl-headers"
> +RDEPENDS_${PN} = "opencl-headers libicdlog"

rdep on a headers package seems wrong  here.

> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel



More information about the Openembedded-devel mailing list