简体   繁体   English

如何交叉编译imx6的QT应用程序?

[英]How do I cross-compile a QT application for imx6?

How do I cross-compile a QT application for a Freescale Hummingboard(imx6(arm))? 如何交叉编译飞思卡尔Hummingboard(imx6(arm))的QT应用程序?

There are some guides around, but I've not been able to complete one with success. 周围有一些指南,但我无法成功完成。

The following (and more) guides give me a compile error on ./configure http://forum.solid-run.com/linux-on-cubox-i-and-hummingboard-f8/qt5-3-on-hummingboard-t2072.html https://community.freescale.com/docs/DOC-94066 When I run the ./configure command (With recommended commands, I've tried this with a lot of possibilities for commands but got none working). 以下(以及更多)指南为我在./configure http://forum.solid-run.com/linux-on-cubox-i-and-hummingboard-f8/qt5-3-on-hummingboard- t2072.html https://community.freescale.com/docs/DOC-94066当我运行./configure命令时(对于推荐的命令,我已经尝试了很多方法,但没有任何作用)。 I got a compile error for all the external libraries QT uses (zlib, libjpeg, libpng, etc.). QT使用的所有外部库(zlib,libjpeg,libpng等)都出现编译错误。 So it's a dead end from there. 所以这是一个死胡同。

I've tried a lot more stuff, I don't even remember all the stuff I've tried, but I got nothing working. 我尝试了更多的东西,甚至都不记得尝试过的所有东西,但是我什么也没做。

I'm trying to use mini-distribution for the Hummingboard. 我正在尝试为Hummingboard使用小型发行版。 It's a system without window manager that is able to run QT applications (QT5). 这是一个没有窗口管理器的系统,能够运行QT应用程序(QT5)。 The build tool I'm trying to use is gcc-linaro-arm-linux-gnueabi, I'm using QT Creator. 我要使用的构建工具是gcc-linaro-arm-linux-gnueabi,我正在使用QT Creator。 I've got QT working on the Hummingboard, I just can't compile anything for it. 我已经在Hummingboard上使用了QT,但我无法为此进行任何编译。

I managed building an application for the IMX6 finally. 我最终设法为IMX6构建了一个应用程序。 Here is how I did it for other's. 这是我为别人做的。 It's not an optimal solution but it is an solution. 这不是一个最佳解决方案,但它是一个解决方案。

I use Buildgear to build mini-distirbution as OS (Google it, not enough links with my reputation). 我使用Buildgear作为操作系统构建小型发行版(Google发行,没有足够的声誉链接)。 I append my own application to this mini-distribution to also build it. 我将自己的应用程序附加到此迷你发行版中以进行构建。 This is done by placing creating a folder in the buildfiles/cross/cross-hummingboard folder and adding a buildfile (mine look like this http://pastebin.com/bZkJUiry ). 这是通过在buildfiles / cross / cross-hummingboard文件夹中创建一个文件夹并添加一个buildfile(看起来像http://pastebin.com/bZkJUiry )来完成的。 In this folder I also place a .tar of the project files (including the .pro). 在此文件夹中,我还放置了项目文件(包括.pro)的.tar。 To get it to build I add "qt-gui" as a dependency to the fs (buildfiles/cross/cross-hummingboard/fs) by adding it to the list of depends. 为了构建它,我将“ qt-gui”添加到fs(buildfiles / cross / cross-hummingboard / fs)的依赖项,方法是将其添加到depends列表中。

I then run buildgear build fs, which will create an (Tarred) image including my (working) qt-application! 然后,我运行buildgear build fs,它将创建一个包含我(正在运行的)qt应用程序的(运行)映像! I then extract the ./qt-gui executable and ssh it to the Hummingboard. 然后,我提取./qt-gui可执行文件并将其SSH到Hummingboard。

Of course this is all a bit cumbersome so I made a script that automates this all: http://pastebin.com/jFM6rZyY It copies and Tars sources, compiles it together with the fs, extracts the executable, ssh's the file to the hummingboard and runs it. 当然,这有点麻烦,所以我制作了一个脚本来自动完成所有操作: http : //pastebin.com/jFM6rZyY它复制并Tars源文件,与fs一起编译,提取可执行文件,将ssh的文件发送到hummingboard并运行它。 Takes about 3 minutes building but it works which is what counts for me at this point. 大约需要3分钟的构建时间,但它确实有效,这对我来说很重要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM