diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2020-10-23 12:33:30 -0700 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2020-11-13 19:04:43 -0300 |
commit | 692f6d34e121787d26b6a4eba59f473b5c6e8db7 (patch) | |
tree | f9edf63d4cb6f80206c65a1941519e7b939573ed /recipes-graphics | |
parent | aa6064a5c2d1e897ddf7d4c895d2c4b1729080f1 (diff) | |
download | meta-freescale-692f6d34e121787d26b6a4eba59f473b5c6e8db7.tar.gz |
imx-gpu-viv: Update install for improved packaging design
The old packaging model stripped the version number from the
filename, added a backend qualifier, and removed any symbolic
links. This had to be matched in the install with logic to
undo the changes.
The design is now greatly simplified by preserving all library
filenames as-is, with backend-specific libraries placed in
sub-folders.
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Diffstat (limited to 'recipes-graphics')
-rw-r--r-- | recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc | 58 |
1 files changed, 15 insertions, 43 deletions
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc index 9eeea103..3ec37e5d 100644 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc | |||
@@ -176,7 +176,7 @@ do_install () { | |||
176 | # The preference order, based in DISTRO_FEATURES, is Wayland (with or without X11), X11 and fb | 176 | # The preference order, based in DISTRO_FEATURES, is Wayland (with or without X11), X11 and fb |
177 | if [ "${USE_WL}" = "yes" ]; then | 177 | if [ "${USE_WL}" = "yes" ]; then |
178 | 178 | ||
179 | backend=wl | 179 | backend=wayland |
180 | 180 | ||
181 | install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_wayland.pc ${D}${libdir}/pkgconfig/egl.pc | 181 | install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_wayland.pc ${D}${libdir}/pkgconfig/egl.pc |
182 | install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc | 182 | install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc |
@@ -217,40 +217,18 @@ do_install () { | |||
217 | install -d ${D}${sysconfdir}/OpenCL/vendors/ | 217 | install -d ${D}${sysconfdir}/OpenCL/vendors/ |
218 | install -m 0644 ${S}/gpu-core/etc/Vivante.icd ${D}${sysconfdir}/OpenCL/vendors/Vivante.icd | 218 | install -m 0644 ${S}/gpu-core/etc/Vivante.icd ${D}${sysconfdir}/OpenCL/vendors/Vivante.icd |
219 | 219 | ||
220 | # We'll only have one backend here so we rename it to generic name | 220 | # Handle backend specific drivers |
221 | # and avoid rework in other packages, when possible | 221 | cp -r ${S}/gpu-core/usr/lib/${backend}/* ${D}${libdir} |
222 | if [ "${USE_WL}" = "yes" -o "${USE_X11}" = "yes" ]; then | ||
223 | cp ${S}/gpu-core/usr/lib/libGL-${backend}.so ${D}${libdir}/libGL.so.1.2.0 | ||
224 | ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so.1.2 | ||
225 | ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so | ||
226 | fi | ||
227 | mv ${D}${libdir}/libEGL-${backend}.so ${D}${libdir}/libEGL.so.1.0 | ||
228 | ln -sf libEGL.so.1.0 ${D}${libdir}/libEGL.so.1 | ||
229 | ln -sf libEGL.so.1.0 ${D}${libdir}/libEGL.so | ||
230 | mv ${D}${libdir}/libGAL-${backend}.so ${D}${libdir}/libGAL.so | ||
231 | if [ "${USE_WL}" = "yes" ]; then | 222 | if [ "${USE_WL}" = "yes" ]; then |
232 | # Special case for libVDK on Wayland backend, deliver fb library as well. | 223 | # Special case for libVDK on Wayland backend, deliver fb library as well. |
233 | # Need to rename the libraries to avoid the code below that will remove | 224 | cp ${S}/gpu-core/usr/lib/fb/libVDK.so.1.2.0 ${D}${libdir}/libVDK-fb.so.1.2.0 |
234 | # *-fb.so and *-wl.so | ||
235 | mv ${D}${libdir}/libVDK-fb.so ${D}${libdir}/libVDK-framebuffer.so | ||
236 | mv ${D}${libdir}/libVDK-wl.so ${D}${libdir}/libVDK-wayland.so | ||
237 | ln -sf libVDK-wayland.so ${D}${libdir}/libVDK.so | ||
238 | else | ||
239 | mv ${D}${libdir}/libVDK-${backend}.so ${D}${libdir}/libVDK.so | ||
240 | fi | 225 | fi |
241 | |||
242 | # update libglesv2 as backend dependent | ||
243 | rm -rf ${D}${libdir}/libGLESv2* | ||
244 | cp ${S}/gpu-core/usr/lib/libGLESv2-${backend}.so ${D}${libdir}/libGLESv2.so.2.0.0 | ||
245 | ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so.2 | ||
246 | ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so | ||
247 | |||
248 | if [ "${IS_MX8}" = "1" ]; then | 226 | if [ "${IS_MX8}" = "1" ]; then |
249 | # Rename the vulkan implementation library which is wrapped by the vulkan-loader | 227 | # Rename the vulkan implementation library which is wrapped by the vulkan-loader |
250 | # library of the same name | 228 | # library of the same name |
251 | MAJOR=1 | 229 | MAJOR=1 |
252 | FULL=$MAJOR.1.3 | 230 | FULL=$MAJOR.1.6 |
253 | mv ${D}${libdir}/libvulkan-${backend}.so.$FULL ${D}${libdir}/libvulkan_VSI.so.$FULL | 231 | mv ${D}${libdir}/libvulkan.so.$FULL ${D}${libdir}/libvulkan_VSI.so.$FULL |
254 | patchelf --set-soname libvulkan_VSI.so.$MAJOR ${D}${libdir}/libvulkan_VSI.so.$FULL | 232 | patchelf --set-soname libvulkan_VSI.so.$MAJOR ${D}${libdir}/libvulkan_VSI.so.$FULL |
255 | rm ${D}${libdir}/libvulkan.so.$MAJOR ${D}${libdir}/libvulkan.so | 233 | rm ${D}${libdir}/libvulkan.so.$MAJOR ${D}${libdir}/libvulkan.so |
256 | ln -s libvulkan_VSI.so.$FULL ${D}${libdir}/libvulkan_VSI.so.$MAJOR | 234 | ln -s libvulkan_VSI.so.$FULL ${D}${libdir}/libvulkan_VSI.so.$MAJOR |
@@ -267,11 +245,6 @@ do_install () { | |||
267 | find ${D}${libdir} -name "libwayland-viv.*" -exec rm '{}' ';' | 245 | find ${D}${libdir} -name "libwayland-viv.*" -exec rm '{}' ';' |
268 | fi | 246 | fi |
269 | 247 | ||
270 | for i in wl x11 fb dri; do | ||
271 | find ${D}${libdir} -name "*-$i.so*" -exec rm '{}' ';' | ||
272 | find ${D}${libdir} -name "*.$i.so*" -exec rm '{}' ';' | ||
273 | done | ||
274 | |||
275 | # FIXME: MX6SL does not have 3D support; hack it for now | 248 | # FIXME: MX6SL does not have 3D support; hack it for now |
276 | if [ "${IS_MX6SL}" = "1" ]; then | 249 | if [ "${IS_MX6SL}" = "1" ]; then |
277 | rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \ | 250 | rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \ |
@@ -325,12 +298,13 @@ FILES_libvulkan-imx = "${libdir}/libvulkan_VSI${REALSOLIBS} ${libdir}/libSPIRV_v | |||
325 | FILES_libvulkan-imx-dev = "${includedir}/vulkan ${libdir}/libvulkan_VSI${SOLIBSDEV}" | 298 | FILES_libvulkan-imx-dev = "${includedir}/vulkan ${libdir}/libvulkan_VSI${SOLIBSDEV}" |
326 | 299 | ||
327 | FILES_libopenvx-imx = " \ | 300 | FILES_libopenvx-imx = " \ |
328 | ${libdir}/libOpenVX*${REALSOLIBS} \ | 301 | ${libdir}/libOpenVX${REALSOLIBS} \ |
329 | ${libdir}/libOpenVXU${SOLIBS} \ | 302 | ${libdir}/libOpenVXC${SOLIBS} \ |
330 | ${libdir}/libOvx*${SOLIBS} \ | 303 | ${libdir}/libOpenVXU${SOLIBS} \ |
331 | ${libdir}/libovx*${SOLIBS} \ | 304 | ${libdir}/libOvx*${SOLIBS} \ |
332 | " | 305 | ${libdir}/libArchModelSw${SOLIBS} \ |
333 | FILES_libopenvx-imx-dev = "${includedir}/VX ${includedir}/OVXLIB" | 306 | " |
307 | FILES_libopenvx-imx-dev = "${includedir}/VX ${libdir}/libOpenVX${SOLIBSDEV}" | ||
334 | RDEPENDS_libopenvx-imx = "libnn-imx" | 308 | RDEPENDS_libopenvx-imx = "libnn-imx" |
335 | 309 | ||
336 | FILES_libgl-imx = "${libdir}/libGL${REALSOLIBS}" | 310 | FILES_libgl-imx = "${libdir}/libGL${REALSOLIBS}" |
@@ -364,13 +338,11 @@ FILES_libopencl-imx = "${libdir}/libOpenCL${REALSOLIBS} \ | |||
364 | FILES_libopencl-imx-dev = "${includedir}/CL ${libdir}/libOpenCL${SOLIBSDEV}" | 338 | FILES_libopencl-imx-dev = "${includedir}/CL ${libdir}/libOpenCL${SOLIBSDEV}" |
365 | RDEPENDS_libopencl-imx= "libclc-imx" | 339 | RDEPENDS_libopencl-imx= "libclc-imx" |
366 | 340 | ||
367 | INSANE_SKIP_libopenvg-imx += "dev-so" | 341 | FILES_libopenvg-imx = "${libdir}/libOpenVG*${REALSOLIBS}" |
368 | FILES_libopenvg-imx = "${libdir}/libOpenVG*${SOLIBS}" | ||
369 | FILES_libopenvg-imx-dev = "${includedir}/VG ${libdir}/libOpenVG*${SOLIBSDEV} ${libdir}/pkgconfig/vg.pc" | 342 | FILES_libopenvg-imx-dev = "${includedir}/VG ${libdir}/libOpenVG*${SOLIBSDEV} ${libdir}/pkgconfig/vg.pc" |
370 | 343 | ||
371 | FILES_libvdk-imx = "${libdir}/libVDK*${SOLIBS}" | 344 | FILES_libvdk-imx = "${libdir}/libVDK*${REALSOLIBS}" |
372 | FILES_libvdk-imx-dev = "${includedir}/*vdk*.h ${libdir}/libVDK${SOLIBSDEV}" | 345 | FILES_libvdk-imx-dev = "${includedir}/*vdk*.h ${libdir}/libVDK${SOLIBSDEV}" |
373 | INSANE_SKIP_libvdk-imx += "dev-so" | ||
374 | 346 | ||
375 | FILES_libvivante-dri-imx = "${libdir}/dri/vivante_dri.so" | 347 | FILES_libvivante-dri-imx = "${libdir}/dri/vivante_dri.so" |
376 | RDEPENDS_libvivante-dri-imx = "libdrm" | 348 | RDEPENDS_libvivante-dri-imx = "libdrm" |