OSMesa was originally added for i.MX 8 only. This limitation was recently dropped
accidentally. Additionally, the 8DualXLite has no GPU and fails to build:
```
| In file included from ../../../mesa-demos-8.4.0/src/osdemos/osdemo32.c:14:
| ../../../mesa-demos-8.4.0/src/util/glut_wrap.h:9:12: fatal error: GL/glut.h: No such file or directory
| 9 | # include <GL/glut.h>
| | ^~~~~~~~~~~
| compilation terminated.
```
Fix the OSMesa configuration by limiting it to parts with DRM.
Also, adding swrast prevents the use of hardware acceleration. Drop swrast.
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
(cherry picked from commit
47394d05017483e7fd0cba5b927c76198bdfa062)
# Enable Etnaviv and Freedreno support
PACKAGECONFIG_append_use-mainline-bsp = " gallium etnaviv kmsro freedreno"
-# Enable OSMesa which also requires dri (classic) swrast
-PACKAGECONFIG_remove_use-nxp-bsp = "gallium"
-PACKAGECONFIG_append_use-nxp-bsp = " osmesa"
-DRIDRIVERS_use-nxp-bsp = "swrast"
+# For NXP BSP, enable OSMesa for parts with DRM
+PACKAGECONFIG_remove_use-nxp-bsp_imxdrm = "gallium"
+PACKAGECONFIG_append_use-nxp-bsp_imxdrm = " osmesa"
BACKEND = \
"${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \