我正在使用yocto /Linux4.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?有可能吗?我在哪里可以找到不包括元-飞思卡尔层的电子导航驱动程序?
目标是运行一个使用eglfs的Qt5应用程序。
在meta/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
我的板子是在此页上买的卡洛板。
谢谢你,rBeal
发布于 2018-11-22 11:23:09
我看到你也在使用KaRo TX6QP。我设法在TX6DL/TX6S/TX6QP上运行了QT5。
对于较新的内核(例如,主线),您不需要被废弃的vivante驱动程序。把它扔出你的local.conf
!您需要(或需要)社区开发的内核和QP板的mesa-etnaviv
驱动程序。
只需要三个步骤,因为meta-karo
已经为您从meta-karo/conf/machine/include/tx-base.inc
粘贴的所有板子启用了mesa
1.使QT5-台面支助
在您自己的元层中,创建具有以下内容的文件recipes-qt5/qt5/qtbase_%.bbappend
:
# mx6q = TX6Q/TX6QP, this is the important part!
PACKAGECONFIG_GL_mx6q = "gbm gles2 kms"
# mx6dl = TX6DL/TX6S
PACKAGECONFIG_GL_mx6dl = "gbm gles2 kms"
PACKAGECONFIG_GL_mx6sx = "gles2"
PACKAGECONFIG_GL_mx6sl = "${@base_contains('DISTRO_FEATURES', 'x11', ' gl', ' ', d)}"
PACKAGECONFIG_GL_mx6ul = "${@base_contains('DISTRO_FEATURES', 'x11', ' gl', ' ', d)}"
PACKAGECONFIG_GL_mx7 = "gles2"
QT_CONFIG_FLAGS_append_mx6q = "${@base_contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
QT_CONFIG_FLAGS_append_mx6dl = "${@base_contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
QT_CONFIG_FLAGS_append_mx6sx = "${@base_contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
QT_CONFIG_FLAGS_append_mx6sl = "${@base_contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -no-opengl -linuxfb -no-eglfs -opengl es2 -no-xcb', d)}"
QT_CONFIG_FLAGS_append_mx6ul = "${@base_contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -no-opengl -no-eglfs -linuxfb', d)}"
QT_CONFIG_FLAGS_append_mx7 = "${@base_contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -no-eglfs -linuxfb', d)}"
此.bbappend为TX6{Q,QP,DL,S,UL,ULL}启用必要的QT5选项。现在,QT5用gdm
模块构建了它的eglfs平台,这是mesa-etnaviv
所需要的。
2.在台地启用镓和铈
同样,在您自己的层中,创建文件recipes-graphics/mesa/mesa_17.1.7.bbappend
。,但请检查17.1.7是否也是您的mesa版本!检查您的台面版本搜索在poky/meta/recipes-graphics/mesa/mesa_[...].bb
中的台面食谱!
在.bbappend中,粘贴以下内容:
# FIXME: mesa should support 'x11-no-tls' option
python () {
overrides = d.getVar("OVERRIDES", True).split(":")
if "imxgpu2d" not in overrides:
return
x11flag = d.getVarFlag("PACKAGECONFIG", "x11", False)
d.setVarFlag("PACKAGECONFIG", "x11", x11flag.replace("--enable-glx-tls", "--enable-glx"))
}
# Enable Etnaviv support
PACKAGECONFIG_append = " gallium"
GALLIUMDRIVERS_append = ",etnaviv,imx"
最后两行是最重要的:启用gallium
及其imx-etnaviv
模块。
现在你已经准备好用QT5-EtNaviv支持来烘焙你自己的形象了!
3.正确启动您的应用程序!
两个.bbappends都不会修补qt5-qmake来启用正确的平台。
./yourapplication -platform eglfs
现在,您的应用程序应该做到这一点,并愉快地使用egl运行。但是,可能发生的情况是,您的QT5希望使用不同的eglfs--deviceintegration。你可以通过运行
export QT_LOGGING_RULES="qt.qpa.*=true"
./yourapplication -platform eglfs
当QT抱怨它不支持模拟的egl,或者抱怨它未能加载eglfs_viv、eglfs_emu或eglfs_*时,尝试将它强制到正确的设备集成(gbm)中。
export QT_QPA_EGLFS_INTEGRATION=eglfs_gbm
./yourapplication -platform eglfs
发布于 2018-10-30 05:48:31
这取决于您的yocto供应商,请检查preferred_provider_virtual/libgl/egl ="mesa/imx-gpu-viv"
。
我认为目前只有一些yocto bsps正在生产etna viv dri。如果您想要添加etnaviv_dri.so,就像phytec yocto BSP等
(drivers/gpu/etna/*)
。提到你的董事会来了解更多
https://stackoverflow.com/questions/53041843
复制相似问题