From 6fefb192c9615e09d4db0b3fa45715649f381c43 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sun, 14 Jun 2026 02:04:02 -0300 Subject: imx-gpu-sdk: import from meta-freescale-distro Move the recipe into meta-freescale as part of consolidating all recipe content into a single layer. meta-freescale-distro is becoming a thin backward-compatibility layer that only keeps the distro definitions for the wrynose LTS lifetime and is no longer used for recipe development. Signed-off-by: Otavio Salvador --- recipes-graphics/imx-gpu-sdk/imx-gpu-sdk-src.inc | 4 + recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_6.1.1.bb | 145 +++++++++++++++++++++ recipes-graphics/imx-gpu-sdk/libxdg-shell.bb | 21 +++ .../0001-xdg-shell-Add-CMake-minimum.patch | 38 ++++++ 4 files changed, 208 insertions(+) create mode 100644 recipes-graphics/imx-gpu-sdk/imx-gpu-sdk-src.inc create mode 100644 recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_6.1.1.bb create mode 100644 recipes-graphics/imx-gpu-sdk/libxdg-shell.bb create mode 100644 recipes-graphics/imx-gpu-sdk/libxdg-shell/0001-xdg-shell-Add-CMake-minimum.patch (limited to 'recipes-graphics/imx-gpu-sdk') diff --git a/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk-src.inc b/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk-src.inc new file mode 100644 index 000000000..3c927b587 --- /dev/null +++ b/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk-src.inc @@ -0,0 +1,4 @@ +SRC_URI = "${GPU_SDK_SRC};branch=${GPU_SDK_SRC_BRANCH}" +GPU_SDK_SRC ?= "git://github.com/nxp-imx/gtec-demo-framework.git;protocol=https" +GPU_SDK_SRC_BRANCH ?= "master" +SRCREV = "35bbd45ed6eac169a778bd154283771b9bf39be7" diff --git a/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_6.1.1.bb b/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_6.1.1.bb new file mode 100644 index 000000000..e1510baf3 --- /dev/null +++ b/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_6.1.1.bb @@ -0,0 +1,145 @@ +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_BACKEND = \ + "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' libxdg-shell wayland', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', ' xrandr', \ + '', d), d)}" +DEPENDS_MX8 = "" +DEPENDS_MX8:mx8-nxp-bsp = " \ + glslang-native \ + opencv \ + rapidopencl \ + rapidopenvx \ + rapidvulkan \ + vulkan-headers \ + vulkan-loader \ +" +DEPENDS_MX8:mx8mm-nxp-bsp = " \ + opencv \ +" +DEPENDS = " \ + assimp \ + cmake-native \ + devil \ + fmt \ + gli \ + glm \ + gstreamer1.0 \ + gstreamer1.0-plugins-base \ + gtest \ + half \ + ninja-native \ + nlohmann-json \ + rapidjson \ + stb \ + zlib \ + ${DEPENDS_BACKEND} \ + ${DEPENDS_MX8} \ +" +DEPENDS:append:imxgpu2d = " virtual/libg2d virtual/libopenvg" +DEPENDS:append:imxgpu3d = " virtual/libgles2" + +require imx-gpu-sdk-src.inc + + +WINDOW_SYSTEM = \ + "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'Wayland_XDG', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', 'X11', \ + 'FB', d), d)}" + +FEATURES = "ConsoleHost,EarlyAccess,EGL,GoogleUnitTest,Lib_NlohmannJson,OpenVG,Test_RequireUserInputToExit,WindowHost" +FEATURES:append:imxgpu = ",HW_GPU_VIVANTE" +FEATURES:append:imxgpu2d = ",G2D" +FEATURES:append:imxgpu3d = ",OpenGLES2" +FEATURES:append = "${FEATURES_SOC}" + +FEATURES_SOC = "" +FEATURES_SOC:mx6q-nxp-bsp = ",OpenGLES3" +FEATURES_SOC:mx6dl-nxp-bsp = ",OpenGLES3" +FEATURES_SOC:mx8-nxp-bsp = ",OpenCV4,Vulkan1.2,OpenGLES3.2,OpenCL1.2,OpenVX1.2" +FEATURES_SOC:mx8mm-nxp-bsp = ",OpenCV4" + +EXTENSIONS = "*" +EXTENSIONS:mx6q-nxp-bsp = "OpenGLES:GL_VIV_direct_texture,OpenGLES3:GL_EXT_geometry_shader,OpenGLES3:GL_EXT_tessellation_shader" +EXTENSIONS:mx6dl-nxp-bsp = "OpenGLES:GL_VIV_direct_texture,OpenGLES3:GL_EXT_geometry_shader,OpenGLES3:GL_EXT_tessellation_shader" +EXTENSIONS:mx8m-nxp-bsp = "OpenGLES:GL_VIV_direct_texture,OpenGLES3:GL_EXT_color_buffer_float" +EXTENSIONS:mx8mm-nxp-bsp = "*" + +do_compile () { + export FSL_PLATFORM_NAME=Yocto + export ROOTFS=${STAGING_DIR_HOST} + . ./prepare.sh + FslBuild.py -vvvvv -t sdk --UseFeatures [${FEATURES}] --UseExtensions [${EXTENSIONS}] --Variants [WindowSystem=${WINDOW_SYSTEM}] --BuildThreads ${@oe.utils.parallel_make(d)} -c install --CMakeInstallPrefix ${S} +} + +REMOVALS = " \ + GLES2/DeBayer \ + GLES2/DirectMultiSamplingVideoYUV \ + GLES3/DirectMultiSamplingVideoYUV \ +" +REMOVALS:append:imxdpu = " \ + G2D/EightLayers \ +" +REMOVALS:append:mx6q-nxp-bsp = " \ + GLES3/HDR02_FBBasicToneMapping \ + GLES3/HDR03_SkyboxTonemapping \ + GLES3/HDR04_HDRFramebuffer \ +" +REMOVALS:append:mx6dl-nxp-bsp = " \ + GLES3/HDR02_FBBasicToneMapping \ + GLES3/HDR03_SkyboxTonemapping \ + GLES3/HDR04_HDRFramebuffer \ +" + +do_install () { + install -d "${D}/opt/${PN}" + cp -r ${S}/bin/* ${D}/opt/${PN} + for removal in ${REMOVALS}; do + rm -rf ${D}/opt/${PN}/$removal + done +} + +FILES:${PN} += "/opt/${PN}" +FILES:${PN}-dbg += "/opt/${PN}/*/*/.debug /usr/src/debug" +INSANE_SKIP:${PN} += "already-stripped rpaths" + +# Unfortunately recipes with an empty main package, like header-only libraries, +# are not included in the SDK. Use RDEPENDS as a workaround. +RDEPENDS_EMPTY_MAIN_PACKAGE = " \ + fmt \ + gli \ + glm \ + googletest \ + half \ + nlohmann-json \ + rapidjson \ + stb \ +" +RDEPENDS_EMPTY_MAIN_PACKAGE_MX8 = "" +RDEPENDS_EMPTY_MAIN_PACKAGE_MX8:mx8-nxp-bsp = " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libxdg-shell', '', d)} \ + rapidopencl \ + rapidopenvx \ + rapidvulkan \ +" +RDEPENDS_EMPTY_MAIN_PACKAGE_MX8:mx8mm-nxp-bsp = "" +# vulkan-loader is dynamically loaded, so need to add an explicit +# dependency +RDEPENDS_VULKAN_LOADER = "" +RDEPENDS_VULKAN_LOADER:mx8-nxp-bsp = "vulkan-validation-layers vulkan-loader" +RDEPENDS_VULKAN_LOADER:mx8mm-nxp-bsp = "" +RDEPENDS:${PN} += " \ + ${RDEPENDS_EMPTY_MAIN_PACKAGE} \ + ${RDEPENDS_EMPTY_MAIN_PACKAGE_MX8} \ + ${RDEPENDS_VULKAN_LOADER} \ +" + +# For backwards compatibility +RPROVIDES:${PN} = "fsl-gpu-sdk" +RREPLACES:${PN} = "fsl-gpu-sdk" +RCONFLICTS:${PN} = "fsl-gpu-sdk" + +COMPATIBLE_MACHINE = "(imxgpu)" diff --git a/recipes-graphics/imx-gpu-sdk/libxdg-shell.bb b/recipes-graphics/imx-gpu-sdk/libxdg-shell.bb new file mode 100644 index 000000000..a5637869a --- /dev/null +++ b/recipes-graphics/imx-gpu-sdk/libxdg-shell.bb @@ -0,0 +1,21 @@ +SUMMARY = "Provides XDG shell header and glue code library" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${UNPACKDIR}/${BP}/License.md;md5=9d58a2573275ce8c35d79576835dbeb8" + +DEPENDS = "wayland-native wayland wayland-protocols" + +require imx-gpu-sdk-src.inc + +SRC_URI += "file://0001-xdg-shell-Add-CMake-minimum.patch" + +S = "${UNPACKDIR}/${BP}/ThirdParty/Recipe/xdg-shell" + +inherit cmake pkgconfig + +EXTRA_OECMAKE = " \ + -DWAYLAND_SCANNER=${STAGING_BINDIR_NATIVE}/wayland-scanner \ + -DWAYLAND_PROTOCOLS_DIR=${STAGING_DATADIR}/wayland-protocols \ +" + +ALLOW_EMPTY:${PN} = "1" +RDEPENDS:${PN}-dev = "${PN}-staticdev" diff --git a/recipes-graphics/imx-gpu-sdk/libxdg-shell/0001-xdg-shell-Add-CMake-minimum.patch b/recipes-graphics/imx-gpu-sdk/libxdg-shell/0001-xdg-shell-Add-CMake-minimum.patch new file mode 100644 index 000000000..9ece7d8f7 --- /dev/null +++ b/recipes-graphics/imx-gpu-sdk/libxdg-shell/0001-xdg-shell-Add-CMake-minimum.patch @@ -0,0 +1,38 @@ +From 6e38ee09378bfa7edc97528967f0dd0bd810f2c6 Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Thu, 9 Oct 2025 08:29:44 -0500 +Subject: [PATCH] xdg-shell: Add CMake minimum + +The build is broken: +``` +| CMake Error in CMakeLists.txt: +| No cmake_minimum_required command is present. A line of code such as +| +| cmake_minimum_required(VERSION 4.1) +| +| should be added at the top of the file. The version specified may be lower +| if you wish to support older CMake versions for this project. For more +| information run "cmake --help-policy CMP0000". +``` + +Upstream-Status: Pending +Signed-off-by: Tom Hochstein +--- + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8d39c6c5..5cb52e32 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,7 @@ + # Generate the client header and glue library from xdg-shell.xml + ++cmake_minimum_required(VERSION 3.5) ++ + include(FindPkgConfig) + + if (NOT DEFINED WAYLAND_PROTOCOLS_DIR) +-- +2.34.1 + -- cgit v1.2.3-54-g00ecf