diff --git a/conf/machine/imx95-19x19-verdin.conf b/conf/machine/imx95-19x19-verdin.conf index a271388c3..d03d69139 100644 --- a/conf/machine/imx95-19x19-verdin.conf +++ b/conf/machine/imx95-19x19-verdin.conf @@ -1,7 +1,7 @@ #@TYPE: Machine -#@NAME: Toradex i.MX 95 19x19 Verdin board +#@NAME: Toradex i.MX 95 19x19 Verdin Evaluation Kit #@SOC: i.MX95 -#@DESCRIPTION: Machine configuration for Toradex i.MX 95 19x19 Verdin board +#@DESCRIPTION: Machine configuration for Toradex i.MX 95 19x19 Verdin Evaluation Ki #@MAINTAINER: Flora Hu MACHINEOVERRIDES =. "mx95:" diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index 9d06b4649..b4f853888 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc @@ -574,6 +574,16 @@ PREFERRED_PROVIDER_opencl-headers:imxgpu ?= "imx-gpu-viv" PREFERRED_PROVIDER_opencl-icd-loader:imxgpu ?= "imx-gpu-viv" PREFERRED_PROVIDER_virtual/opencl-icd:imxgpu ?= "imx-gpu-viv" +PREFERRED_PROVIDER_virtual/egl:mx95-nxp-bsp ?= "mali-imx" +PREFERRED_PROVIDER_virtual/libgles1:mx95-nxp-bsp ?= "mali-imx" +PREFERRED_PROVIDER_virtual/libgles2:mx95-nxp-bsp ?= "mali-imx" +PREFERRED_PROVIDER_virtual/libgles3:mx95-nxp-bsp ?= "mali-imx" +PREFERRED_PROVIDER_opencl-clhpp:mx95-nxp-bsp ?= "opencl-clhpp" +PREFERRED_PROVIDER_opencl-headers:mx95-nxp-bsp ?= "opencl-headers" +# install libmali-opencl-icd package as the loaders backend +PREFERRED_PROVIDER_opencl-icd-loader:mx95-nxp-bsp ?= "opencl-icd-loader" +PREFERRED_PROVIDER_virtual/opencl-icd:mx95-nxp-bsp ?= "opencl-icd-loader" + PREFERRED_VERSION_weston:imx-nxp-bsp ??= "12.0.4.imx" # i.MX 6 & 7 stay on weston 10.0 for fbdev PREFERRED_VERSION_weston:mx6-nxp-bsp ??= "10.0.5.imx" diff --git a/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend b/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend index 4cfa51ea9..a5d3c2e2c 100644 --- a/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend +++ b/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend @@ -1,4 +1,5 @@ # Only _mx8 machine do provide virtual/libgbm required for any drm* flavour DRM-REMOVE:imxgpu = "drm-gl drm-gles2" DRM-REMOVE:imxgpu:mx8-nxp-bsp = "" +DRM-REMOVE:imxgpu:mx95-nxp-bsp = "" PACKAGECONFIG:remove = "${DRM-REMOVE}" diff --git a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend index 7401a5669..e450e568e 100644 --- a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +++ b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend @@ -12,6 +12,7 @@ SRC_URI:append:imxgpu = " \ PACKAGECONFIG_GL_IMX_GPU = "" PACKAGECONFIG_GL_IMX_GPU:mx8-nxp-bsp = "gbm kms" +PACKAGECONFIG_GL_IMX_GPU:mx95-nxp-bsp = "gbm kms" PACKAGECONFIG_GL:imxpxp = "gles2" PACKAGECONFIG_GL:imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' gl', '', d)} \ @@ -31,6 +32,7 @@ PACKAGECONFIG += "${PACKAGECONFIG_PLATFORM}" PACKAGECONFIG_VULKAN_IMX_GPU = "" PACKAGECONFIG_VULKAN_IMX_GPU:mx8-nxp-bsp = "vulkan" +PACKAGECONFIG_VULKAN_IMX_GPU:mx9-nxp-bsp = "vulkan" PACKAGECONFIG_VULKAN_IMX_GPU:mx8mm-nxp-bsp = "" PACKAGECONFIG_VULKAN = "" PACKAGECONFIG_VULKAN:imxgpu = "${PACKAGECONFIG_VULKAN_IMX_GPU}" diff --git a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend index a97b765f1..659a7cc0a 100644 --- a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend +++ b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend @@ -6,3 +6,4 @@ PACKAGECONFIG:remove:mx7-nxp-bsp = "xcomposite-egl xcomposite-glx" # i.MX8 does never provide native x11, so required dependencies are not met PACKAGECONFIG:remove:mx8-nxp-bsp = "xcomposite-egl xcomposite-glx" +PACKAGECONFIG:remove:mx95-nxp-bsp = "xcomposite-egl xcomposite-glx" diff --git a/dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend b/dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend index 1c51fc09d..b12499666 100644 --- a/dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend +++ b/dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend @@ -14,6 +14,8 @@ PACKAGECONFIG_GRAPHICS:imxgpu3d = " \ PACKAGECONFIG_GRAPHICS_IMX_GPU = "" PACKAGECONFIG_GRAPHICS_IMX_GPU:mx8-nxp-bsp = " \ gbm kms" +PACKAGECONFIG_GRAPHICS_IMX_GPU:mx95-nxp-bsp = " \ + gbm kms" PACKAGECONFIG_GRAPHICS:use-mainline-bsp ?= " \ gles2 gbm kms" @@ -51,4 +53,5 @@ PACKAGECONFIG_VULKAN:imxgpu = " \ ${PACKAGECONFIG_VULKAN_IMX_GPU}" PACKAGECONFIG_VULKAN_IMX_GPU = "" PACKAGECONFIG_VULKAN_IMX_GPU:mx8-nxp-bsp = "vulkan" +PACKAGECONFIG_VULKAN_IMX_GPU:mx95-nxp-bsp = "vulkan" PACKAGECONFIG_VULKAN_IMX_GPU:mx8mm-nxp-bsp = "" diff --git a/dynamic-layers/qt6-layer/recipes-qt/qt6/qtwayland_%.bbappend b/dynamic-layers/qt6-layer/recipes-qt/qt6/qtwayland_%.bbappend index ca011758b..f2b0b8025 100644 --- a/dynamic-layers/qt6-layer/recipes-qt/qt6/qtwayland_%.bbappend +++ b/dynamic-layers/qt6-layer/recipes-qt/qt6/qtwayland_%.bbappend @@ -4,3 +4,4 @@ PACKAGECONFIG:remove:use-mainline-bsp = "xcomposite-glx" PACKAGECONFIG:remove:mx6-nxp-bsp = "xcomposite-egl xcomposite-glx" PACKAGECONFIG:remove:mx7-nxp-bsp = "xcomposite-egl xcomposite-glx" PACKAGECONFIG:remove:mx8-nxp-bsp = "xcomposite-egl xcomposite-glx" +PACKAGECONFIG:remove:mx95-nxp-bsp = "xcomposite-egl xcomposite-glx" diff --git a/recipes-graphics/mali/mali-imx.inc b/recipes-graphics/mali/mali-imx.inc new file mode 100644 index 000000000..e4fafeb0b --- /dev/null +++ b/recipes-graphics/mali/mali-imx.inc @@ -0,0 +1,107 @@ +SUMMARY = "Graphics libraries and driver for i.MX Mali GPU" +SECTION = "libs" +DEPENDS = " \ + libdrm \ + vulkan-loader \ + wayland \ + wayland-protocols" +PROVIDES = " \ + virtual/egl \ + virtual/libgbm \ + virtual/libgles1 \ + virtual/libgles2 \ + virtual/libgles3" + +# The packaged binaries have been stripped of debug info, so disable +# operations accordingly. +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" + +PACKAGES =+ " \ + ${PN}-libegl ${PN}-libegl-dev \ + ${PN}-libgbm ${PN}-libgbm-dev \ + ${PN}-libgles1 ${PN}-libgles1-dev \ + ${PN}-libgles2 ${PN}-libgles2-dev \ + ${PN}-libgles3 ${PN}-libgles3-dev \ + ${PN}-libvulkan \ + ${PN}-opencl-icd ${PN}-opencl-icd-dev" + +# Since libmali.so is loaded by dlopen, include it in the main package +FILES:${PN} += " \ + ${libdir}/libmali.so \ + ${nonarch_base_libdir}/firmware" +FILES_SOLIBSDEV = "" +INSANE_SKIP:${PN} = "dev-so" +FILES:${PN}-libegl = " \ + ${libdir}/libEGL${SOLIBS}" +FILES:${PN}-libgbm = " \ + ${libdir}/libgbm${SOLIBS}" +FILES:${PN}-libgles1 = " \ + ${libdir}/libGLESv1_CM${SOLIBS}" +FILES:${PN}-libgles2 = " \ + ${libdir}/libGLESv2${SOLIBS}" +FILES:${PN}-opencl-icd = " \ + ${sysconfdir}/OpenCL" +FILES:${PN}-libvulkan = " \ + ${sysconfdir}/vulkan" + +FILES:${PN}-dev = " \ + ${bindir}/malisc" +FILES:${PN}-libegl-dev = " \ + ${includedir}/EGL \ + ${includedir}/KHR \ + ${libdir}/libEGL${SOLIBSDEV} \ + ${libdir}/pkgconfig/egl.pc" +FILES:${PN}-libgbm-dev = " \ + ${includedir}/gbm.h \ + ${libdir}/libgbm${SOLIBSDEV} \ + ${libdir}/pkgconfig/gbm.pc" + +# Consolidate GLES dev packages +PACKAGES =+ "${PN}-libgles-dev" +FILES:${PN}-libgles-dev = " \ + ${includedir}/GLES* \ + ${libdir}/libGLES*${SOLIBSDEV} \ + ${libdir}/pkgconfig/gles*.pc" +DEBIAN_NOAUTONAME:${PN}-libgles-dev = "1" +RREPLACES:${PN}-libgles-dev = "libgles-dev" +RPROVIDES:${PN}-libgles-dev = "libgles-dev" +RCONFLICTS:${PN}-libgles-dev = "libgles-dev" +ALLOW_EMPTY:${PN}-libgles1-dev = "1" +ALLOW_EMPTY:${PN}-libgles2-dev = "1" +ALLOW_EMPTY:${PN}-libgles3-dev = "1" +RDEPENDS:${PN}-libgles1-dev = "${PN}-libgles-dev" +RDEPENDS:${PN}-libgles2-dev = "${PN}-libgles-dev" +RDEPENDS:${PN}-libgles3-dev = "${PN}-libgles-dev" + +FILES:${PN}-opencl-icd-dev = " \ + ${bindir}/mali_clcc" + +python __anonymous() { + + # Avoid Debian-renaming + for p in (("libegl", "libegl1" ), + ("libgbm", "libgbm1" ), + ("libgles1", "libglesv1-cm1"), + ("libgles2", "libglesv2-2" ), + ("libgles3", )): + fullp = "${PN}-" + p[0] + pkgs = "".join(' %s' % i for i in p) + d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") + d.appendVar("RREPLACES:" + fullp, pkgs) + d.appendVar("RPROVIDES:" + fullp, pkgs) + d.appendVar("RCONFLICTS:" + fullp, pkgs) + # libmali.so is loaded with dlopen, so an explicit runtime dependency is necessary + d.appendVar("RDEPENDS:" + fullp, "${PN}") + + # For -dev, the first element is both the Debian and original name + fullp += "-dev" + pkgs = p[0] + "-dev" + d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") + d.appendVar("RREPLACES:" + fullp, pkgs) + d.appendVar("RPROVIDES:" + fullp, pkgs) + d.appendVar("RCONFLICTS:" + fullp, pkgs) +} + +COMPATIBLE_MACHINE = "(mx95-nxp-bsp)" diff --git a/recipes-graphics/mali/mali-imx_r50.0.bb b/recipes-graphics/mali/mali-imx_r50.0.bb new file mode 100644 index 000000000..3d30f4685 --- /dev/null +++ b/recipes-graphics/mali/mali-imx_r50.0.bb @@ -0,0 +1,25 @@ +require mali-imx.inc + +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://COPYING;md5=ca53281cc0caa7e320d4945a896fb837" + +SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}-${IMX_SRCREV_ABBREV}.bin;fsl-eula=true" +SRC_URI[sha256sum] = "a787a3285c3e288eedacf1a746de2bc9f5fdc15f35cf8b6147deb436183baf6f" +IMX_SRCREV_ABBREV = "39604c3" + +S = "${WORKDIR}/${BPN}-${PV}-${IMX_SRCREV_ABBREV}" + +inherit fsl-eula-unpack + +do_install () { + install -d ${D} + cp -r ${S}/etc ${S}/usr ${D} + + # Move firmware to nonarch_base_libdir + if [ "${base_libdir}" != "${nonarch_base_libdir}" ]; then + install -d ${D}${nonarch_base_libdir} + mv ${D}${base_libdir}/firmware ${D}${nonarch_base_libdir} + fi +} + +PACKAGE_ARCH = "${MACHINE_SOCARCH}"