i.MX6上的Qt,带-平台eglfs->;分段故障

i.MX6上的Qt,带-平台eglfs->;分段故障,qt,segmentation-fault,arm,debian,egl,Qt,Segmentation Fault,Arm,Debian,Egl,我交叉编译了Qt5.1.1,用于运行Debian 7(wheezy)的I.MX6供电的Nitrogen6x板 我已经用-egl参数配置了Qt,并且eglfs在配置输出中被列为QPA后端 但是,如果我尝试使用-platform eglfs参数运行一个小示例应用程序,我会遇到以下错误: stdin: is not a tty [ 1] HAL user version 4.6.9 build 6622 Aug 15 2013 13:22:40 [ 2] HAL kernel vers

我交叉编译了Qt5.1.1,用于运行Debian 7(wheezy)的I.MX6供电的Nitrogen6x板

我已经用
-egl
参数配置了Qt,并且eglfs在配置输出中被列为QPA后端

但是,如果我尝试使用
-platform eglfs
参数运行一个小示例应用程序,我会遇到以下错误:

stdin: is not a tty
[     1] HAL user version 4.6.9 build 6622 Aug 15 2013 13:22:40
[     2] HAL kernel version 4.6.9 build 1210
QML debugging is enabled. Only use this in a safe environment.
bash: line 1:  3673 Segmentation fault      DISPLAY=:0.0 /opt/Test/bin/Test -platform eglfs
Remote application finished with exit code 139.
OpenGL ES2和EGL安装在主板上,可以在
/usr/lib
/usr/include
中找到。 遗憾的是,我找不到合适的eglfs文档,所以我希望这里的人对它有一些经验

这是回溯输出:

    run Test-platform eglfs
Starting program: /opt/Test/bin/Test Test -platform eglfs
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[     1] HAL user version 4.6.9 build 6622 Aug 15 2013 13:31:17
[     2] HAL kernel version 4.6.9 build 1210
QML debugging is enabled. Only use this in a safe environment.
[New Thread 0x2c6b7460 (LWP 4057)]

Program received signal SIGSEGV, Segmentation fault.
0x2bab6f48 in gcoHAL_QueryChipCount () from /usr/lib/libGAL.so
(gdb) backrace full
Undefined command: "backrace".  Try "help".
(gdb) backrace full[1@t
#0  0x2bab6f48 in gcoHAL_QueryChipCount () from /usr/lib/libGAL.so
No symbol table info available.
#1  0x2ba7ccbc in veglGetThreadData () from /usr/lib/libEGL.so.1
No symbol table info available.
#2  0x2ba74cd0 in eglBindAPI () from /usr/lib/libEGL.so.1
No symbol table info available.
#3  0x2be41934 in ?? () from /usr/local/Qt-Debian/plugins/platforms/libqeglfs.so
No symbol table info available.
#4  0x2be41934 in ?? () from /usr/local/Qt-Debian/plugins/platforms/libqeglfs.so
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) info registers
r0             0x1  1
r1             0x23e54  147028
r2             0x738    1848
r3             0x0  0
r4             0x2bb67d84   733379972
r5             0x23e18  146968
r6             0x2e70c  190220
r7             0x2b430198   725811608
r8             0x7efff9e8   2130704872
r9             0x8  8
r10            0x2b0725c4   721888708
r11            0x7efffae0   2130705120
r12            0x2bab6f1c   732655388
sp             0x7efff8f0   0x7efff8f0
lr             0x2ba7ccbc   732417212
pc             0x2bab6f48   0x2bab6f48 <gcoHAL_QueryChipCount+44>
cpsr           0x80000010   -2147483632
(gdb) x/16i $pc
=> 0x2bab6f48 <gcoHAL_QueryChipCount+44>:   ldr r3, [r3, #12]
   0x2bab6f4c <gcoHAL_QueryChipCount+48>:   sub r2, r3, #1
   0x2bab6f50 <gcoHAL_QueryChipCount+52>:   cmp r2, #2
   0x2bab6f54 <gcoHAL_QueryChipCount+56>:   bhi 0x2bab6f70 <gcoHAL_QueryChipCount+84>
   0x2bab6f58 <gcoHAL_QueryChipCount+60>:   ldr r2, [r4]
   0x2bab6f5c <gcoHAL_QueryChipCount+64>:   mov r0, #0
   0x2bab6f60 <gcoHAL_QueryChipCount+68>:   str r3, [r1]
   0x2bab6f64 <gcoHAL_QueryChipCount+72>:   add r3, r2, #1
   0x2bab6f68 <gcoHAL_QueryChipCount+76>:   str r3, [r4]
   0x2bab6f6c <gcoHAL_QueryChipCount+80>:   pop {r4, pc}
   0x2bab6f70 <gcoHAL_QueryChipCount+84>:   mvn r0, #8
   0x2bab6f74 <gcoHAL_QueryChipCount+88>:   bl  0x2baad5fc
   0x2bab6f78 <gcoHAL_QueryChipCount+92>:   ldr r3, [r4]
   0x2bab6f7c <gcoHAL_QueryChipCount+96>:   mvn r0, #8
   0x2bab6f80 <gcoHAL_QueryChipCount+100>:  add r3, r3, #1
   0x2bab6f84 <gcoHAL_QueryChipCount+104>:  str r3, [r4]
(gdb) thread apply all backtrace

Thread 2 (Thread 0x2c6b7460 (LWP 4057)):
#0  0x2b52ef96 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
#1  0x2b568634 in _IO_file_close () from /lib/arm-linux-gnueabihf/libc.so.6
#2  0x2b568ffe in _IO_file_close_it () from /lib/arm-linux-gnueabihf/libc.so.6
#3  0x2b56113a in fclose () from /lib/arm-linux-gnueabihf/libc.so.6
#4  0x2bea8d00 in udev_new () from /lib/arm-linux-gnueabihf/libudev.so.0
#5  0x2be7d2e4 in ?? () from /usr/local/Qt-Debian/plugins/platforms/libqeglfs.so
#6  0x2be7d2e4 in ?? () from /usr/local/Qt-Debian/plugins/platforms/libqeglfs.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 1 (Thread 0x2bcb9220 (LWP 4056)):
#0  0x2bab6f48 in gcoHAL_QueryChipCount () from /usr/lib/libGAL.so
#1  0x2ba7ccbc in veglGetThreadData () from /usr/lib/libEGL.so.1
#2  0x2ba74cd0 in eglBindAPI () from /usr/lib/libEGL.so.1
#3  0x2be41934 in ?? () from /usr/local/Qt-Debian/plugins/platforms/libqeglfs.so
#4  0x2be41934 in ?? () from /usr/local/Qt-Debian/plugins/platforms/libqeglfs.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) quit
运行测试平台eglfs
启动程序:/opt/Test/bin/Test-Test-平台eglfs
[已启用使用libthread_db的线程调试]
使用主机libthread_db library“/lib/armlinux gnueabihf/libthread_db.so.1”。
[1]HAL用户版本4.6.9构建6622 2013年8月15日13:31:17
[2]HAL内核版本4.6.9构建1210
QML调试已启用。只能在安全的环境中使用。
[新螺纹0x2c6b7460(LWP 4057)]
程序接收信号SIGSEGV,分段故障。
来自/usr/lib/libGAL.so的gcoHAL_QueryChipCount()中的0x2bab6f48
(gdb)回程已满
未定义的命令:“回程”。试试“帮助”。
(gdb)回程已满[1@t
#来自/usr/lib/libGAL.so的gcoHAL_QueryChipCount()中的0 0x2bab6f48
没有可用的符号表信息。
#1/usr/lib/libEGL.so.1中的veglGetThreadData()中的0x2ba7ccbc
没有可用的符号表信息。
#2/usr/lib/libEGL.so.1中的eglBindAPI()中的0x2ba74cd0
没有可用的符号表信息。
#来自/usr/local/Qt-Debian/plugins/platforms/libqeglfs.so的3 0x2be41934英寸
没有可用的符号表信息。
#来自/usr/local/Qt-Debian/plugins/platforms/libqeglfs.so的4 0x2be41934英寸
没有可用的符号表信息。
反向跟踪停止:上一帧与此帧相同(堆栈损坏?)
(gdb)信息寄存器
r0 0x1 1
r1 0x23e54 147028
r2 0x738 1848
r3 0x0 0
r4 0x2bb67d84 733379972
r5 0x23e18 146968
r6 0x2e70c 190220
r7 0x2b430198 725811608
r8 0x7EFF9E8 2130704872
r9 0x8
r10 0x2b0725c4 721888708
r11 0x7efffae0 2130705120
r12 0x2bab6f1c 732655388
sp 0x7efff8f0 0x7efff8f0
lr 0x2ba7ccbc 732417212
pc 0x2bab6f48 0x2bab6f48
cpsr 0x8000010-2147483632
(gdb)x/16i$pc
=>0x2bab6f48:ldr r3[r3,#12]
0x2bab6f4c:子r2,r3,#1
0x2bab6f50:cmp r2,#2
0x2bab6f54:bhi 0x2bab6f70
0x2bab6f58:ldr r2[r4]
0x2bab6f5c:mov r0,#0
0x2bab6f60:str r3[r1]
0x2bab6f64:添加r3、r2和#1
0x2bab6f68:str r3[r4]
0x2bab6f6c:pop{r4,pc}
0x2bab6f70:mvn r0,#8
0x2bab6f74:bl 0x2baad5fc
0x2bab6f78:ldr r3[r4]
0x2bab6f7c:mvn r0,#8
0x2bab6f80:添加r3、r3和#1
0x2bab6f84:str r3[r4]
(gdb)线程应用所有回溯
螺纹2(螺纹0x2c6b7460(LWP 4057)):
#0 0x2b52ef96英寸???(来自/lib/arm-linux-gnueabihf/libc.so.6)
#1 0x2b568634位于/lib/arm-linux-gnueabihf/libc.so.6的_IO_文件_close()中
#2 0x2b568ffe位于/lib/arm-linux-gnueabihf/libc.so.6的IO文件中
#3/lib/arm-linux-gnueabihf/libc.so.6中fclose()中的0x2b56113a
#来自/lib/arm-linux-gnueabihf/libudev.so.0的udev_new()中的4 0x2bea8d00
#来自/usr/local/Qt-Debian/plugins/platforms/libqeglfs.so的5 0x2be7d2e4英寸
#来自/usr/local/Qt-Debian/plugins/platforms/libqeglfs.so的6 0x2be7d2e4英寸
反向跟踪停止:上一帧与此帧相同(堆栈损坏?)
线程1(线程0x2bcb9220(LWP 4056)):
#来自/usr/lib/libGAL.so的gcoHAL_QueryChipCount()中的0 0x2bab6f48
#1/usr/lib/libEGL.so.1中的veglGetThreadData()中的0x2ba7ccbc
#2/usr/lib/libEGL.so.1中的eglBindAPI()中的0x2ba74cd0
#来自/usr/local/Qt-Debian/plugins/platforms/libqeglfs.so的3 0x2be41934英寸
#来自/usr/local/Qt-Debian/plugins/platforms/libqeglfs.so的4 0x2be41934英寸
反向跟踪停止:上一帧与此帧相同(堆栈损坏?)
(gdb)退出

我怎么可能修复这个错误呢?

我在一个MarSBoard上遇到了完全相同的崩溃,该MarSBoard在一个Yocto映像上运行egl fb应用程序,Yocto映像是用来自的配方创建的。 我不得不从中复制EGL/OpenGL相关的东西。 在我的例子中,galcore.ko是内置的

编辑: 检查您是否拥有/dev/galcore,以及其权限是否为crw.rw.rw(否则为sudo chmod 666/dev/galcore)。 如果没有/dev/galcore,请尝试insmod/lib/modules/…/kernel/drivers/mxc/gpu-viv/galcore.ko。 这些步骤为我修复了ubuntu图像上的崩溃。 在Yocto的图片上,galcore的驱动程序是内置的,似乎在那里,但我仍然得到碰撞

编辑:
Yocto映像中的崩溃是由EGL/GAL.so libs的错误版本引起的。显然,内核中内置的galcore驱动程序版本为4.6.9.6622。它需要gpu-viv-bin-mx6q-3.0.35-4.1.0中的libs。使用这些libs并手动将其复制到/usr/lib my fb应用程序运行良好,使用硬件OpenGLES 2.0和硬件解码一个h264视频。

我在一个MarSBoard上发生了完全相同的崩溃,该MarSBoard在一个Yocto图像上运行egl fb应用程序,该图像是由来自的配方创建的。 我不得不从中复制EGL/OpenGL相关的东西。 在我的例子中,galcore.ko是内置的

编辑: 检查您是否拥有/dev/galcore,以及其权限是否为crw.rw.rw(否则为sudo chmod 666/dev/galcore)。 如果没有/dev/galcore,请尝试insmod/lib/modules/…/kernel/drivers/mxc/gpu-viv/galcore.ko。 这些步骤为我修复了ubuntu图像上的崩溃。 在Yocto的图片上,galcore的驱动程序是内置的,似乎在那里,但我仍然得到碰撞

编辑: Yocto映像中的崩溃是由EGL/GAL.so libs的错误版本引起的。显然,内核中内置的galcore驱动程序的版本为4.6.9.6622。它需要来自g的libs
#0  0x766062b0 in gcoHAL_QueryChipCount (Hal=Hal@entry=0x0, Count=Count@entry=0x16494)
    at gc_hal_user_query.c:1726
#1  0x766da244 in veglGetThreadData () at gc_egl.c:137
#2  0x766d3210 in eglfGetDisplay (display_id=0x16c08) at gc_egl_init.c:464
#3  eglGetDisplay (DisplayID=0x16c08) at gc_egl_init.c:565