summaryrefslogtreecommitdiffstats
path: root/recipes-graphics/imx-gpu-sdk
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2026-06-14 02:04:02 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2026-06-14 02:04:02 -0300
commit6fefb192c9615e09d4db0b3fa45715649f381c43 (patch)
treeb3674b05f4c3a1cc7c1964f0e3c4b48d7ba5cae9 /recipes-graphics/imx-gpu-sdk
parenta8dfbc95e0a7782971d4e0c0c4a215d8a3e1172e (diff)
downloadmeta-freescale-6fefb192c9615e09d4db0b3fa45715649f381c43.tar.gz
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 <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-graphics/imx-gpu-sdk')
-rw-r--r--recipes-graphics/imx-gpu-sdk/imx-gpu-sdk-src.inc4
-rw-r--r--recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_6.1.1.bb145
-rw-r--r--recipes-graphics/imx-gpu-sdk/libxdg-shell.bb21
-rw-r--r--recipes-graphics/imx-gpu-sdk/libxdg-shell/0001-xdg-shell-Add-CMake-minimum.patch38
4 files changed, 208 insertions, 0 deletions
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 @@
1SRC_URI = "${GPU_SDK_SRC};branch=${GPU_SDK_SRC_BRANCH}"
2GPU_SDK_SRC ?= "git://github.com/nxp-imx/gtec-demo-framework.git;protocol=https"
3GPU_SDK_SRC_BRANCH ?= "master"
4SRCREV = "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 @@
1SUMMARY = "i.MX GPU SDK Samples"
2DESCRIPTION = "Set of sample applications for i.MX GPU"
3LICENSE = "BSD-3-Clause"
4LIC_FILES_CHKSUM = "file://License.md;md5=9d58a2573275ce8c35d79576835dbeb8"
5
6DEPENDS_BACKEND = \
7 "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' libxdg-shell wayland', \
8 bb.utils.contains('DISTRO_FEATURES', 'x11', ' xrandr', \
9 '', d), d)}"
10DEPENDS_MX8 = ""
11DEPENDS_MX8:mx8-nxp-bsp = " \
12 glslang-native \
13 opencv \
14 rapidopencl \
15 rapidopenvx \
16 rapidvulkan \
17 vulkan-headers \
18 vulkan-loader \
19"
20DEPENDS_MX8:mx8mm-nxp-bsp = " \
21 opencv \
22"
23DEPENDS = " \
24 assimp \
25 cmake-native \
26 devil \
27 fmt \
28 gli \
29 glm \
30 gstreamer1.0 \
31 gstreamer1.0-plugins-base \
32 gtest \
33 half \
34 ninja-native \
35 nlohmann-json \
36 rapidjson \
37 stb \
38 zlib \
39 ${DEPENDS_BACKEND} \
40 ${DEPENDS_MX8} \
41"
42DEPENDS:append:imxgpu2d = " virtual/libg2d virtual/libopenvg"
43DEPENDS:append:imxgpu3d = " virtual/libgles2"
44
45require imx-gpu-sdk-src.inc
46
47
48WINDOW_SYSTEM = \
49 "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'Wayland_XDG', \
50 bb.utils.contains('DISTRO_FEATURES', 'x11', 'X11', \
51 'FB', d), d)}"
52
53FEATURES = "ConsoleHost,EarlyAccess,EGL,GoogleUnitTest,Lib_NlohmannJson,OpenVG,Test_RequireUserInputToExit,WindowHost"
54FEATURES:append:imxgpu = ",HW_GPU_VIVANTE"
55FEATURES:append:imxgpu2d = ",G2D"
56FEATURES:append:imxgpu3d = ",OpenGLES2"
57FEATURES:append = "${FEATURES_SOC}"
58
59FEATURES_SOC = ""
60FEATURES_SOC:mx6q-nxp-bsp = ",OpenGLES3"
61FEATURES_SOC:mx6dl-nxp-bsp = ",OpenGLES3"
62FEATURES_SOC:mx8-nxp-bsp = ",OpenCV4,Vulkan1.2,OpenGLES3.2,OpenCL1.2,OpenVX1.2"
63FEATURES_SOC:mx8mm-nxp-bsp = ",OpenCV4"
64
65EXTENSIONS = "*"
66EXTENSIONS:mx6q-nxp-bsp = "OpenGLES:GL_VIV_direct_texture,OpenGLES3:GL_EXT_geometry_shader,OpenGLES3:GL_EXT_tessellation_shader"
67EXTENSIONS:mx6dl-nxp-bsp = "OpenGLES:GL_VIV_direct_texture,OpenGLES3:GL_EXT_geometry_shader,OpenGLES3:GL_EXT_tessellation_shader"
68EXTENSIONS:mx8m-nxp-bsp = "OpenGLES:GL_VIV_direct_texture,OpenGLES3:GL_EXT_color_buffer_float"
69EXTENSIONS:mx8mm-nxp-bsp = "*"
70
71do_compile () {
72 export FSL_PLATFORM_NAME=Yocto
73 export ROOTFS=${STAGING_DIR_HOST}
74 . ./prepare.sh
75 FslBuild.py -vvvvv -t sdk --UseFeatures [${FEATURES}] --UseExtensions [${EXTENSIONS}] --Variants [WindowSystem=${WINDOW_SYSTEM}] --BuildThreads ${@oe.utils.parallel_make(d)} -c install --CMakeInstallPrefix ${S}
76}
77
78REMOVALS = " \
79 GLES2/DeBayer \
80 GLES2/DirectMultiSamplingVideoYUV \
81 GLES3/DirectMultiSamplingVideoYUV \
82"
83REMOVALS:append:imxdpu = " \
84 G2D/EightLayers \
85"
86REMOVALS:append:mx6q-nxp-bsp = " \
87 GLES3/HDR02_FBBasicToneMapping \
88 GLES3/HDR03_SkyboxTonemapping \
89 GLES3/HDR04_HDRFramebuffer \
90"
91REMOVALS:append:mx6dl-nxp-bsp = " \
92 GLES3/HDR02_FBBasicToneMapping \
93 GLES3/HDR03_SkyboxTonemapping \
94 GLES3/HDR04_HDRFramebuffer \
95"
96
97do_install () {
98 install -d "${D}/opt/${PN}"
99 cp -r ${S}/bin/* ${D}/opt/${PN}
100 for removal in ${REMOVALS}; do
101 rm -rf ${D}/opt/${PN}/$removal
102 done
103}
104
105FILES:${PN} += "/opt/${PN}"
106FILES:${PN}-dbg += "/opt/${PN}/*/*/.debug /usr/src/debug"
107INSANE_SKIP:${PN} += "already-stripped rpaths"
108
109# Unfortunately recipes with an empty main package, like header-only libraries,
110# are not included in the SDK. Use RDEPENDS as a workaround.
111RDEPENDS_EMPTY_MAIN_PACKAGE = " \
112 fmt \
113 gli \
114 glm \
115 googletest \
116 half \
117 nlohmann-json \
118 rapidjson \
119 stb \
120"
121RDEPENDS_EMPTY_MAIN_PACKAGE_MX8 = ""
122RDEPENDS_EMPTY_MAIN_PACKAGE_MX8:mx8-nxp-bsp = " \
123 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libxdg-shell', '', d)} \
124 rapidopencl \
125 rapidopenvx \
126 rapidvulkan \
127"
128RDEPENDS_EMPTY_MAIN_PACKAGE_MX8:mx8mm-nxp-bsp = ""
129# vulkan-loader is dynamically loaded, so need to add an explicit
130# dependency
131RDEPENDS_VULKAN_LOADER = ""
132RDEPENDS_VULKAN_LOADER:mx8-nxp-bsp = "vulkan-validation-layers vulkan-loader"
133RDEPENDS_VULKAN_LOADER:mx8mm-nxp-bsp = ""
134RDEPENDS:${PN} += " \
135 ${RDEPENDS_EMPTY_MAIN_PACKAGE} \
136 ${RDEPENDS_EMPTY_MAIN_PACKAGE_MX8} \
137 ${RDEPENDS_VULKAN_LOADER} \
138"
139
140# For backwards compatibility
141RPROVIDES:${PN} = "fsl-gpu-sdk"
142RREPLACES:${PN} = "fsl-gpu-sdk"
143RCONFLICTS:${PN} = "fsl-gpu-sdk"
144
145COMPATIBLE_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 @@
1SUMMARY = "Provides XDG shell header and glue code library"
2LICENSE = "BSD-3-Clause"
3LIC_FILES_CHKSUM = "file://${UNPACKDIR}/${BP}/License.md;md5=9d58a2573275ce8c35d79576835dbeb8"
4
5DEPENDS = "wayland-native wayland wayland-protocols"
6
7require imx-gpu-sdk-src.inc
8
9SRC_URI += "file://0001-xdg-shell-Add-CMake-minimum.patch"
10
11S = "${UNPACKDIR}/${BP}/ThirdParty/Recipe/xdg-shell"
12
13inherit cmake pkgconfig
14
15EXTRA_OECMAKE = " \
16 -DWAYLAND_SCANNER=${STAGING_BINDIR_NATIVE}/wayland-scanner \
17 -DWAYLAND_PROTOCOLS_DIR=${STAGING_DATADIR}/wayland-protocols \
18"
19
20ALLOW_EMPTY:${PN} = "1"
21RDEPENDS:${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 @@
1From 6e38ee09378bfa7edc97528967f0dd0bd810f2c6 Mon Sep 17 00:00:00 2001
2From: Tom Hochstein <tom.hochstein@nxp.com>
3Date: Thu, 9 Oct 2025 08:29:44 -0500
4Subject: [PATCH] xdg-shell: Add CMake minimum
5
6The build is broken:
7```
8| CMake Error in CMakeLists.txt:
9| No cmake_minimum_required command is present. A line of code such as
10|
11| cmake_minimum_required(VERSION 4.1)
12|
13| should be added at the top of the file. The version specified may be lower
14| if you wish to support older CMake versions for this project. For more
15| information run "cmake --help-policy CMP0000".
16```
17
18Upstream-Status: Pending
19Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
20---
21 CMakeLists.txt | 2 ++
22 1 file changed, 2 insertions(+)
23
24diff --git a/CMakeLists.txt b/CMakeLists.txt
25index 8d39c6c5..5cb52e32 100644
26--- a/CMakeLists.txt
27+++ b/CMakeLists.txt
28@@ -1,5 +1,7 @@
29 # Generate the client header and glue library from xdg-shell.xml
30
31+cmake_minimum_required(VERSION 3.5)
32+
33 include(FindPkgConfig)
34
35 if (NOT DEFINED WAYLAND_PROTOCOLS_DIR)
36--
372.34.1
38