yocto imx6 qt5开发里坑

最近用freescale的imx6做嵌入式开发,一路走来的坑,让我深深敬畏linux的博大精深,为了防止遗忘,以及防止别人重蹈覆辙,给自己做个记录。

1、qt-creator不能运行、调试的解决

a、

target.path=/home/root/testwu
INSTALLS += target

b、不能deploy,原因是dropbear没有sftp-server,自己先交叉编译了dropbear(编译命令:./configure --host=arm-linux --prefix=/home/wuzq/laji && make && make install),也看了源码,以为最新的版本内置sftp-server,看了不行,于是编译openssh(下载portable版本的)(编译命令./configure --host=arm-linux --prefix=/home/wuzq/lajissh,连接不过,直接改Makefile文件里两行为CC=arm-poky-linux-gnueabi-gcc  -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi
LD=arm-poky-linux-gnueabi-gcc  --sysroot=/opt/poky/1.6.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi),用默认的LD就不行,把生成的sftp-server放在/usr/share/openssh/下面,就可以成功deploy


c、不能debug,因为这个问题我下载了qt-creator自己编译,也因为GL库和gl.h头文件,折腾了半天,ligGL.so解决方法:

ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /home/wuzq/Qt5.6.1/5.6/gcc_64/lib/libGL.so

gl.h头文件找不到解决办法是:

find / -name gl.h |xargs ls -l,搜索到我的sdk中的相应目录,拷贝到qt的安装目录下的include中(例如qt5.6.1/5.6/gcc_64/include)


d、用qt-creator调试qt-creator,跟踪发现qt-creator目录下share/qtcreator/debugger没有json模块(python),于是把windows上的json目录拷过来,也巧能跟踪了,后来继续查资料发现qt-creator如果不能建立调试,可以查看log ,在qt-creator菜单Window->Views->Debugger Log,可以看到出错的地方,可以很快知道缺少json模块。


e、如果不用sftp-server也可以运行和调试,需要手工拷贝到运行目录,或者加一个scp ..../执行文件 [email protected]:/..... 作为一个custom step到run步骤中。


2、触摸屏驱动调试



3、显示驱动调试


4、QT5的显示中文,原来只需要设置

export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/qt5/plugins/generic
export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event0
export QT_QPA_FONTDIR=/usr/lib/fonts/otf

export DISPLAY=:0





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章