“MY-IMX Linux-4.1.15 QT5 Program Build Manual”的版本间的差异

来自明远智睿的wiki
跳转至: 导航搜索
(创建页面,内容为“ [^_^]:   MY-IMX Linux-4.1.15 QT5 Program compilation manual <br/> ### Compile the host environment ---------------------------------------------------------...”)
 
(以“MY-IMX6 Linux-4.1.15 编译参考手册”替换内容)
 
第1行: 第1行:
 
+
[[MY-IMX6 Linux-4.1.15 编译参考手册]]
[^_^]:
 
  MY-IMX Linux-4.1.15 QT5 Program compilation manual
 
 
 
 
 
 
 
<br/>
 
### Compile the host environment
 
 
 
--------------------------------------------------------------------------------
 
* Compile the host CPU architecture: 64-bit 
 
* Compile the host system: Linux
 
* Linux distribution: Ubuntu 
 
* Ubuntu version number: 14.04.5
 
* Ubuntu version type: desktop version
 
* Ubuntu system type: x86-64 
 
 
 
<br/>
 
 
 
### Installing the SDK
 
 
 
--------------------------------------------------------------------------------
 
##### Download SDK
 
  Download the SDK package file in the "2.3_System_Linux-4.1.15/03\_Tools" directory of the network disk. 
 
  MY-IMX6EK140、MY-IMXEK40P:fsl-imx-fb-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-neon-toolchain-4.1.15-2.1.0.sh 
 
  MY-IMX6EK200、MY-IMX-EK314、MY-IMX-EK336:fsl-imx-fb-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.1.0.sh 
 
 
 
##### Install SDK (MY-IMX6EK140, MY-IMXEK40P example)
 
* Copy the downloaded package file to the compiled host.
 
 
 
* Modify the permissions of the pre-installation directory
 
<pre>
 
$ chmod 777 /opt -R
 
</pre>
 
 
 
* Install the SDK package file
 
 
 
<pre>
 
$ ./fsl-imx-fb-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-neon-toolchain-4.1.15-2.1.0.sh
 
 
 
Freescale i.MX Release Distro SDK installer version 4.1.15-2.1.0
 
================================================================
 
Enter target directory for SDK (default: /opt/fsl-imx-fb/4.1.15-2.1.0):
 
You are about to install the SDK to "/opt/fsl-imx-fb/4.1.15-2.1.0". Proceed[Y/n]? Y
 
Extracting SDK.......................................................................................................................................................done
 
Setting it up...done
 
SDK has been successfully set up and is ready to be used.
 
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 
$ . /opt/fsl-imx-fb/4.1.15-2.1.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabi
 
</pre>
 
 
 
* Create oe-device-extra.pri file to prevent error when calling qmake
 
<pre>
 
$ touch /opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/cortexa7hf-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/oe-device-extra.pri
 
</pre>
 
 
 
<br>
 
 
 
### Compile the QT application
 
 
 
--------------------------------------------------------------------------------
 
 
 
##### Configuring cross compilation tool environment variables
 
<pre>
 
$ source /opt/fsl-imx-fb/4.1.15-2.1.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabi
 
</pre>
 
 
 
##### Compile the QT Demo program
 
* Download QT Demo source package 
 
Download myzr-qt5-demo.tar on the network disk "2.3_ system _linux-4.1.15/05_my-demo" and copy it to the compiler host.
 
 
 
* Unzip QT Demo source package
 
<pre>
 
$ tar xf myzr-qt5-demo.tar
 
</pre>
 
 
 
* Enter the QT Demo project directory
 
<pre>
 
$ cd myzr-qt5-demo/AboutUs
 
</pre>
 
 
 
* Create makefiles for the project
 
<pre>
 
$ qmake
 
</pre>
 
 
 
* Compilation project
 
<pre>
 
$ make
 
 
 
/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/uic widget.ui -o ui_widget.h
 
arm-poky-linux-gnueabi-g++  -march=armv7ve -mfpu=neon  -mfloat-abi=hard -mcpu=co
 
......
 
arm-poky-linux-gnueabi-g++  -march=armv7ve -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/cortexa7hf-neon-poky-linux-gnueabi -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-O1 -o AboutUs main.o widget.o qrc_source.o moc_widget.o  -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lEGL -lpthread
 
</pre>
 
 
 
* View the compiled target file
 
<pre>
 
$ file AboutUs
 
 
 
AboutUs: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=38367b0a95b8fe7402e2377c11626581c07f9c9d, not stripped
 
</pre>
 
 
 
<br>
 
 
 
### Running target program
 
 
 
--------------------------------------------------------------------------------
 
 
 
* Copy the compiled AboutUs to the evaluation board.
 
* Execution target program
 
<pre>
 
$ ./AboutUs -platform eglfs -plugin evdevtouch:/dev/input/event0
 
 
 
QEglFSVivIntegration will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.
 
If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1
 
Unable to query physical screen size, defaulting to 100 dpi.
 
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
 
</pre>
 
 
 
 
 
<br>
 
<br>
 
 
 
--------------------------------------------------------------------------------
 
<pre>
 
-------------------------------------------------------------------------------- 
 
* ZhuHai MYZR Technology CO.,LTD.
 
* Latest Update: 2018/08/15 
 
* Supporter: Tang Bin
 
--------------------------------------------------------------------------------
 
</pre>
 

2018年11月17日 (六) 13:38的最新版本

MY-IMX6 Linux-4.1.15 编译参考手册