【发布时间】:2019-04-02 04:03:27
【问题描述】:
我正在使用 yocto rocko / Linux 4.14.24 开发 IMX6QP,我正在尝试使用 GPU。
我的 yocto 配置文件:
MACHINE ??= 'imx6qp-tx6-emmc'
DL_DIR ?= "${BSPDIR}/downloads"
SSTATE_DIR ?= "${BSPDIR}/sstate-cache"
DISTRO ?= 'karo-minimal'
PACKAGE_CLASSES ?= "package_deb"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
VIRTUAL-RUNTIME_init_manager = "sysvinit"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = "1"
# EXTRA_IMAGE_FEATURES += "read-only-rootfs"
CORE_IMAGE_EXTRA_INSTALL += "openssh \
openssh-sftp-server iproute2 dnsmasq iperf3 \
v4l-utils curl vim gnutls alsa-utils iw \
usbutils pciutils i2c-tools can-utils libsocketcan wpa-supplicant \
gstreamer1.0 gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-plugins-base \
devmem2 iputils modutils-initscripts \
iptables iproute2-ss iproute2-tc bridge-utils hostapd \
ruby gdb \
qtbase-plugins \
qtbase-tools \
qtdeclarative \
qtdeclarative-tools \
qtdeclarative-qmlplugins \
qtmultimedia \
qtmultimedia-plugins \
qtmultimedia-qmlplugins \
qtsvg \
qtsvg-plugins \
qtsensors \
qtimageformats-plugins \
qtsystems \
qtsystems-tools \
qtsystems-qmlplugins \
qtscript \
qt3d \
qt3d-qmlplugins \
qt3d-tools \
qtgraphicaleffects-qmlplugins \
qtconnectivity-qmlplugins \
qtlocation-plugins \
qtlocation-qmlplugins \
cinematicexperience \
fb-test fbgrab fbida fbset-modes \
es2gears \
"
DISTRO_FEATURES_remove = " x11 wayland "
PACKAGECONFIG_append_pn-qtbase = " gles2 eglfs "
DISTRO_FEATURES_append = " opengles2 egl opengl gles gbm dri eglfs gles2 "
BB_NUMBER_THREADS = "1"
LICENSE_FLAGS_WHITELIST = "commercial"
当我运行 es2gears 或 Qt5_CinematicExperience yocto 时会显示:
gbm: failed to open any driver (search paths /usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/etnaviv_dri.so: cannot open shared object file: No such file or directory
failed to load driver: etnaviv
gbm: failed to open any driver (search paths /usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory
failed to load driver: kms_swrast
Unable to create EGL surface (eglError: 12299)
在 /usr/lib/dri 文件夹中只有:swrast_dri.so
如何在这个内核上使用 vivante GPU?可能吗? 在哪里可以找到不包含元飞思卡尔层的 etnaviv 驱动程序?
目标是运行一个使用 eglfs 的 Qt5 应用程序。
在文件 meta-karo/conf/machine/include/tx-base.inc 中:
PREFERRED_PROVIDER_virtual/egl ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
PREFERRED_PROVIDER_virtual/libg2d_mx6 ?= "mesa"
PREFERRED_PROVIDER_virtual/libg2d_mx6ul ?= ""
我补充说: CORE_IMAGE_INSTALL += "imx-gpu-viv"
在local.conf中,控制台显示:
ERROR: Nothing RPROVIDES 'imx-gpu-viv' (but /media/user/tx6qp-qt5-4.14/build/sources/poky/meta/recipes-core/images/core-image-minimal.bb RDEPENDS on or otherwise requires it)
imx-gpu-viv was skipped: PREFERRED_PROVIDER_virtual/libgles2 set to mesa, not imx-gpu-viv
NOTE: Runtime target 'imx-gpu-viv' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['imx-gpu-viv']
NOTE: Target 'core-image-minimal' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['core-image-minimal', 'imx-gpu-viv']
ERROR: Required build target 'core-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-minimal', 'imx-gpu-viv']
而且我的内核支持 CONFIG_DRM_ETNAVIV
我的板子是在this page 购买的 Karo 板子。
提前致谢, rBeal
【问题讨论】: