查看“MY-IMX6 Linux-3.14.52 Build Manual”的源代码
←
MY-IMX6 Linux-3.14.52 Build Manual
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
<div> = '''Document instruction''' = ---- == '''System environment instruction''' == * CUP architeture of host used for compilation:64bit<br> * System of host:Linux<br> * Linux release version:Ubuntu<br> * Ubuntu version type:server version<br> * Ubuntu version no.:12.04.5<br> * Ubuntu system type:x86-64<br> <span style="color:red">Note: The development host should use ubuntu 12.04.5 x86-64(desktop and server version are available),Using other distribution of Linux and other versions of Ubuntu may encounter unnecessary problems .</span><br> == '''Operation Instruction''' == 1)The line in the document which begins with “$”,which is followed by the Linux command..<br> 2)All the Linux commands in the document are recommended to be entered into the host manually for execution.(Copying ,pasting to the host directly to execute may fail).<br> 3)In all the Linux execution commands of the document,if the next character after the space is "-",(example:sudo apt-get –y install),please enter into Linux host to execute manually.(Copying ,pasting to the host directly to execute may fail ).<br> 4)Linux commands that have not been written in all lines in the document should be manually entered into the Linux host (because the copy and paste commands cannot contain special characters such as "line breaks").<br> 5)Note whether the execution result is consistent with the document image when you enter and execute the command. check the command was entered incorrectly or failed to execute.<br> 6)Please follow the document strictly to compile for the first time.Otherwise ,there may be unexpected error.<br> == '''Screenshots instruction''' == To make the view look neat and tidy , the command prompt in the screenshot should use myzr$ uniformly.<br> == '''Linux command in the image''' == In the image of the document, you can see the input Linux command visually from the lines that start with “myzr$”.<br> == <span style="color:red">'''Important information instruction'''</span> == <span style="color:red">To avoid our customers wasting time and energy when they encounter unnecessary problems in building development environment and compiling process,it is recommended to use “vb43-u12045-serv-amd64” virtual machine system released by MYZR.</span><br> '''Details refered to 《[[virtual machine system instruction |virtual machine system instruction]]》''' = '''Prepare source code and related files''' = ---- == '''Source code''' == The corresponding Linux version of the evaluation board and the corresponding source code files are shown in the table below:<br> {| class="wikitable" |- !Evaluation board model || u-boot Source code || linux Source code |- |MY-IMX6-EK200 || rowspan=4|u-boot-2015.04.tar.xz || rowspan=4|linux-3.14.52.tar.xz |- |MY-IMX6-EK314 |- |MY-IMX6-EK336 |- |MY-IMX6-EK140 |} == '''Cross compiler tool file''' == *Linux program cross compiler tool:<span style="color:gray ">gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz </span><br> *Linux cross compiler tool configuration file:<span style="color:gray ">gcc-linaro-arm-linux-gnueabihf-492-env <br> *QT5 program compiler tool:<span style="color:gray ">fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-3.14.52-1.1.0.sh</span><br> == '''Creat working directory''' == 1)Source code directory<br> $ mkdir ~/my-imx6/02_source –p<br> [[File:myimx6linux3.14_build_2.3.0.1.png]]<br> 2)Tool directory<br> $ mkdir ~/my-imx6/03_tools –p<br> [[File:myimx6linux3.14_build_2.3.0.2.png]]<br> 3)Image directory $ mkdir ~/my-imx6/04_image –p<br> [[File:myimx6linux3.14_build_2.3.0.3.png]]<br> $ mkdir ~/my-imx6/04_image/image-linux-31452 –p<br> [[File:myimx6linux3.14_build_2.3.0.4.png]]<br> 4)Application directory<br> $ mkdir ~/my-demo<br> [[File:myimx6linux3.14_build_2.3.0.5.png]]<br> = '''Install cross-compilation tool chain''' = ---- == '''Install Linux cross-compilation tool chain''' == 1)Enter cross compiler tool chain directory<br> $ cd ~/my-imx6/03_tools/ <br> 2)Copy Linux cross compiler tool to directory<br> Copy "gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz "to"~/my-imx6/03_tools",complete this step by yourself in a proper way.<br> 3)Uncompress Linux Cross Compilation Tools<br> $ tar xf gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz<br> [[File:myimx6linux3.14_build_4.1.0.1.png]]<br> 4)Copy cross compiler tool configuration file.<br> Copy "gcc-linaro-arm-linux-gnueabihf-492-env "to"~/my-imx6/03_tools",complete this step by yourself in a proper way.<br> 5)Check installation<br> $ source gcc-linaro-arm-linux-gnueabihf-492-env<br> $ ${CROSS_COMPILE}gcc –v<br> [[File:myimx6linux3.14_build_4.1.0.2.png]]<br> == '''Install QT5 cross compiler tool''' == 1)Enter cross compiler tool chain directory<br> $ cd ~/my-imx6/03_tools/<br> [[File:myimx6linux3.14_build_4.2.0.1.png]]<br> 2)Execute installation command<br> $ sh fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-3.14.52-1.1.0.sh<br> 3)Choose installation path <br> *After execution of installation command,there will be a following prompt message:<br> *Enter target directory for SDK (default: /opt/fsl-imx-x11/3.14.52-1.1.0):<br> *Then press“Enter”key,let's keep defauted installation path.<br> 4)Confirm installation path<br> *Afterwards,there will be a following prompt message:<br> *You are about to install the SDK to "/opt/fsl-imx-x11/3.14.52-1.1.0". Proceed[Y/n]? *Then enter“Y”and press“Enter”key for confirmation.<br> [[File:myimx6linux3.14_build_4.2.0.2.png]]<br> 5)Wait for the installation to complete<br> Tips:installation will take a few minutes。</span><br> 6) Check installation <br> Check the version information of cross compiler tool chain to verify the normality of installation<br> $ source /opt/fsl-imx-x11/3.14.52-1.1.0/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi<br> $ qmake -v<br> After execution of command,there will be following message:<br> [[File:myimx6linux3.14_build_4.2.0.3.png]]<br> = '''U-Boot compilation''' = ---- == '''Prepare compilation''' == === Copy the source package to the development host === Copy“u-boot source code”downloaded to “~/my-imx6/02_source”of Linux development host.<br> Complete this step by yourself in a proper way.<br> === Decompress u-boot source code package === $ cd ~/my-imx6/02_source/<br> $ tar xf u-boot-2015.04.tar.xz<br> [[File:myimx6linux3.14_build_5.1.2.1.png]]<br> == '''Compilation''' == === Validate compiler configuration file === $ source ~/my-imx6/03_tools/gcc-linaro-arm-linux-gnueabihf-492-env<br> [[File:myimx6linux3.14_build_5.2.1.1.png]]<br> === Enter u-boot source code directory === $ cd ~/my-imx6/02_source/u-boot-2015.04<br> [[File:myimx6linux3.14_build_5.2.2.1.png]]<br> === Remove u-boot temporary files=== $ make distclean <br> [[File:myimx6linux3.14_build_5.2.3.1.png]]<br> === Configure u-boot === Configuration of development and its corresponding compiler:<br> {| class="wikitable" |- !Development board main model || CPU type-memory capacity || Architeture of processor || Corresponding u-boot configuration |- |rowspan=7|MY-IMX6-EK200 |i.MX 6QuadPlus - 1G || Cortex-A9 || myimx6ek200-6qp_config |- |i.MX 6QuadPlus - 2G || Cortex-A9 || myimx6ek200-6qp-2g_config |- |i.MX6 Quad - 1G || Cortex-A9 || myimx6ek200-6q_config |- |i.MX6 Quad - 2G || Cortex-A9 || myimx6ek200-6q-2g_config |- |i.MX6 DualLite - 1G || Cortex-A9 || myimx6ek200-6u_config |- |i.MX 6Solo - 512M || Cortex-A9 || myimx6ek200-6s_config |- |i.MX 6Solo - 1G || Cortex-A9 || myimx6ek200-6s-1g_config |- |rowspan=5|MY-IMX6-EK314 | i.MX 6QuadPlus - 1G || Cortex-A9 || myimx6ek200-6qp_config |- |i.MX 6QuadPlus - 2G || Cortex-A9 || myimx6ek200-6qp-2g_config |- |i.MX6 Quad- 1G || Cortex-A9 || myimx6ek314-6q_config |- |i.MX6 Quad- 2G || Cortex-A9 || myimx6ek314-6q-2g_config |- |i.MX6 DualLite - 1G || Cortex-A9 || myimx6ek314-6u_config |- |rowspan=4|MY-IMX6-EK336 |i.MX 6QuadPlus - 1G || Cortex-A9 || myimx6ek336-6qp_config |- |i.MX 6QuadPlus - 2G || Cortex-A9 || myimx6ek336-6qp-2g_config |- |i.MX6 Quad- 1G || Cortex-A9 || myimx6ek336-6q_config |- |i.MX6 Quad- 2G || Cortex-A9 || myimx6ek336-6q-2g_config |- |rowspan=4|MY-IMX6-EK140 |i.MX 6UltraLite-256M || Cortex-A7 || myimx6ek140-6g_config |- |i.MX 6UltraLite-512M || Cortex-A7 || myimx6ek140-6g-512m_config |- |i.MX 6UltraLite Full - 256M|| Cortex-A7 || myimx6ek140p-6g_defconfig |- |i.MX 6UltraLite Full - 512M || Cortex-A7 || myimx6ek140p-6g-512m_defconfig |} *MYIMX6EK200-6Q-1G configuration example:<br> $ make myimx6ek200-6q_config <br> [[File:myimx6linux3.14_build_5.2.4.1.png]]<br> === Execute compilation === $ make <br> Tips:To speed up the compilation,add "-j4" after make.The Linux host used to compile is dual-core ,4 threads .So "-j" is followed by 4, which takes 4 threads to compile. The number behind "-j" is allocated based on system resources,but It should not exceed the maximum threads the host support.<br> [[File:myimx6linux3.14_build_5.2.5.1.png]]<br> Complete compilation <br> Tips: u-boot compiling process may take one or two minutes.<br> [[File:myimx6linux3.14_build_5.2.5.2.png]]<br> == '''Target file''' == * Compile file<br> After compilation you can see the files compiled obtained by the ls command: u-boot.imx.<br> $ ls <br> [[File:myimx6linux3.14_build_5.3.0.1.png]]<br> *Target file<br> The corresponding target file name for u-boot configuration of MY-IMX6 series evaluation board is shown in the table below:<br> {| class="wikitable" |- !u-boot Configuration || Target file |- |myimx6ek200-6qp_config || uboot-myimx6ek200-6qp.imx |- |myimx6ek200-6qp-2g_config || uboot-myimx6ek200-6qp-2g.imx |- |myimx6ek200-6q_config || uboot-myimx6ek200-6q.imx |- |myimx6ek200-6q-2g_config || uboot-myimx6ek200-6q-2g.imx |- |myimx6ek200-6u_config || uboot-myimx6ek200-6u.imx |- |myimx6ek200-6s_config || uboot-myimx6ek200-6s.imx |- |myimx6ek200-6s-1g_config || uboot-myimx6ek200-6s-1g.imx |- |colspan=2| |- |myimx6ek314-6qp_config || uboot-myimx6ek314-6qp.imx |- |myimx6ek314-6qp-2g_config || uboot-myimx6ek314-6qp-2g.imx |- |myimx6ek314-6q_config || uboot-myimx6ek314-6q.imx |- |myimx6ek314-6q-2g_config || uboot-myimx6ek314-6q-2g.imx |- |myimx6ek314-6u_config || uboot-myimx6ek314-6u.imx |- |colspan=2| |- |myimx6ek336-6qp_config || uboot-myimx6ek336-6qp.imx |- |myimx6ek336-6qp-2g_config || uboot-myimx6ek336-6qp-2g.imx |- |myimx6ek336-6q_config || uboot-myimx6ek336-6q.imx |- |myimx6ek336-6q-2g_config || uboot-myimx6ek336-6q-2g.imx |- |colspan=2| |- |myimx6ek140-6g_config || uboot-myimx6ek140-6g.imx |- |myimx6ek140-6g-512m_config || uboot-myimx6ek140-6g-512m.imx |- |myimx6ek140p-6g_defconfig || uboot-myimx6ek140p-6g.imx |- |myimx6ek140p-6g-512m_defconfig || uboot-myimx6ek140p-6g-512m.imx |} We need to copy the compilied file u-boot.imx as our target file name.:<br> Copy the generated file u-boot.imx from the compilation of myimx6ek200-6q_config as target file.):<br> $ cp u-boot.imx ~/my-imx6/04_image/image-linux-31452/uboot-myimx6ek200-6q.imx<br> [[File:myimx6linux3.14_build_5.3.0.2.png]]<br> = '''Compile kernel''' = ---- == '''Prepare compilation''' == === Copy source code package to development host === Copy “linux source code”downloaded to “~/my-imx6/02_source”of Linux development host.<br> Complete this step by yourself in a proper way.<br> === Decompress linux source code package === $ cd ~/my-imx6/02_source/<br> $ tar xf linux-3.14.52.tar.xz<br> [[File:myimx6linux3.14_build_6.1.2.1.png]]<br> == '''Kernel compilation configuration''' == === Validate compiler configuration file === $ source ~/my-imx6/03_tools/gcc-linaro-arm-linux-gnueabihf-492-env<br> [[File:myimx6linux3.14_build_6.2.1.1.png]]<br> === Remove kernel temporary file === * Enter linux source code directory<br> $ cd ~/my-imx6/02_source/linux-3.14.52<br> [[File:myimx6linux3.14_build_6.2.2.1.png]]<br> * Remove temporary file<br> <$ make distclean <br> [[File:myimx6linux3.14_build_6.2.2.2.png]]<br> === Kernel configuration === *Kernel configuration file<br> {| class="wikitable" |- !Evaluation board model || Configuration file |- |MY-IMX6-EK200 || rowspan=3|myimx6_defconfig |- |MY-IMX6-EK314 |- |MY-IMX6-EK336 |- |MY-IMX6-EK140 || myimx6ul_defconfig |} $ make myimx6_defconfig <br> If you are compiling the kernel of MY-IMX6-EK140,please use $ make myimx6ul_defconfig <br> Take myimx6_defconfig as an example.<br> [[File:myimx6linux3.14_build_6.2.3.1.png]]<br> == '''Compile kernel''' == * Execute compilation<br> $ make zImage<br> [[File:Myimx6linux3.14_build_6.3.0.1.png]]<br> * Complete compilation<br> [[File:Myimx6linux3.14_build_6.3.0.2.png]]<br> * Target file<br> arch/arm/boot/zImage is a compiled kernel file that can be viewed using the ls command.<br> $ ls arch/arm/boot/zImage -la <br> [[File:Myimx6linux3.14_build_6.3.0.3.png]]<br> Note: The kernel file name which is going to be programed and started is “zImage-myimx6”, So we should Copy zImage as zImage-myimx6<br> $ cp arch/arm/boot/zImage ~/my-imx6/04_image/image-linux-31452/zImage-myimx6 <br> [[File:Myimx6linux3.14_build_6.3.0.4.png]]<br> == '''Compile device tree''' == The correspondence between the type of evaluation board and device tree is shown below:<br> {| class="wikitable" |- ! Development main mode || CPU type-memory capacity || Corresponding device tree file |- |rowspan=7|MY-IMX6-EK200 | i.MX 6QuadPlus - 1G || myimx6ek200-6qp.dtb |- | i.MX 6QuadPlus - 2G || myimx6ek200-6qp-2g.dtb |- | i.MX6 Quad - 1G || myimx6ek200-6q.dtb |- | i.MX6 Quad - 2G || myimx6ek200-6q-2g.dtb |- | i.MX6 DualLite - 1G || myimx6ek200-6u.dtb |- | i.MX 6Solo - 512M || myimx6ek200-6s.dtb |- | i.MX 6Solo - 1G || myimx6ek200-6s-1g.dtb |- |rowspan=5|MY-IMX6-EK314 | i.MX 6QuadPlus - 1G || myimx6ek314-6qp.dtb |- | i.MX 6QuadPlus - 2G || myimx6ek314-6qp-2g.dtb |- | i.MX6 Quad - 1G || myimx6ek314-6q.dtb |- | i.MX6 Quad - 2G || myimx6ek314-6q-2g.dtb |- | i.MX6 DualLite - 1G || myimx6ek314-6u.dtb |- |rowspan=4|MY-IMX6-EK336 | i.MX 6QuadPlus - 1G || myimx6ek336-6qp.dtb |- | i.MX 6QuadPlus - 2G || myimx6ek336-6qp-2g.dtb |- | i.MX6 Quad - 1G || myimx6ek336-6q.dtb |- | i.MX6 Quad - 2G || myimx6ek336-6q-2g.dtb |- |rowspan=6|MY-IMX6-EK140 | i.MX 6UltraLite-256M || myimx6ek140-6g.dtb |- | i.MX 6UltraLite-512M || myimx6ek140-6g-512m.dtb |- | i.MX 6UltraLite Full - 256M (2eth) || myimx6ek140p-6g.dtb |- | i.MX 6UltraLite Full - 256M (8uart)|| myimx6ek140p-6g-8uart.dtb |- | i.MX 6UltraLite Full - 512M (2eth) || myimx6ek140p-6g-512m.dtb |- | i.MX 6UltraLite Full - 512M (8uart) || myimx6ek140p-6g-512m-8uart.dtb |} *Take MY-IMX6-EK200-6Q-1G as example:<br> $ make myimx6ek200-6q.dtb<br> [[File:Myimx6linux3.14_build_6.4.0.1.png]]<br> *Target file <br> You can browse the target device tree file information from compilation with ls command:<br> $ ls arch/arm/boot/dts/myimx6ek*.dtb <br> [[File:Myimx6linux3.14_build_6.4.0.2.png]]<br> Copy device tree file to image directory<br> $ cp arch/arm/boot/dts/myimx6ek*.dtb ~/my-imx6/04_image/image-linux-31452/ <br> [[File:Myimx6linux3.14_build_6.4.0.3.png]]<br> == '''Compile module''' == * Compile module command <br> $ make modules<br> [[File:Myimx6linux3.14_build_6.5.0.1.png]]<br> * Install module to the specified directory<br> $ make modules_install INSTALL_MOD_PATH=./modules<br> [[File:Myimx6linux3.14_build_6.5.0.2.png]]<br> * Package the module file<br> $ cd modules<br> $ tar cjf ../modules.tar.bz2 <br> [[File:Myimx6linux3.14_build_6.5.0.3.png]]<br> *Copy module package to image directory<br> {| class="wikitable" |- !Development board model) || Target module package |- |MY-IMX6-EK200 || rowspan=3|kernel-modules-myimx6.tar.bz2 |- |MY-IMX6-EK314 |- |MY-IMX6-EK336 |- |MY-IMX6-EK140 || kernel-modules-myimx6g.tar.bz2 |} $ cp ../modules.tar.bz2 ~/my-imx6/04_image/image-linux-31452/kernel-modules-myimx6.tar.bz2<br> Note:when you compile the Kernel If the configuration file you use is myimx6_defconfig, here you should Copy modules.tar.bz2 as kernel-modules-myimx6.tar.bz2.If the configuration file is myimx6ul_defconfig,you should Copy modules.tar.bz2 as kernel-modules-myimx6g.tar.bz2.<br> = '''Application compilation''' = ---- == '''Linux application compilation''' == === Wite an application === * Create application source code directory and Linux-3.14.52 executable program directory<br> $ mkdir ~/my-demo/source_code -p<br> [[File:Myimx6linux3.14_build_8.1.1.1.png]]<br> $ mkdir ~/my-demo/bin-l31452 -p<br> [[File:Myimx6linux3.14_build_8.1.1.2.png]]<br> * Write source code <br> $ cd ~/my-demo/source_code<br> $ vi hello.c<br> Write following code and save<br> #include <stdio.h> <br> int main(int argc, char **argv) <br> { <br> printf("Hello, MYZR!\n"); <br> <br> return; <br> }<br> * View code</span><br> [[File:Myimx6linux3.14_build_8.1.1.3.png]]<br> $ cat hello.c<br> === Compile application === *Configure environment variables<br> $ source ~/my-imx6/03_tools/gcc-linaro-arm-linux-gnueabihf-492-env<br> [[File:Myimx6linux3.14_build_8.1.2.1.png]]<br> * Compile<br> $ ${CROSS_COMPILE}gcc hello.c -o hello.out<br> [[File:Myimx6linux3.14_build_8.1.2.2.png]]<br> Note:The above command contains “$”,which is “${CROSS_COMPILE}gcc”. It is the environment variable generated when referring to our source.<br> * Target file<br> $ file hello.out<br> [[File:Myimx6linux3.14_build_8.1.2.3.png]]<br> You can see the property of target file hello.out.<br> === Save target executable file === $ mv hello.out ~/my-demo/bin-l31452/<br> [[File:Myimx6linux3.14_build_8.1.3.1.png]]<br> == '''QT application Compile''' == === Prepare QT5 program code === Tips:Here We demonstrate with “Qt5_NMap_CarouselDemo_1.0.tgz".<br> 1)Copy code package to Linux development host<br> Copy code package“Qt5_NMap_CarouselDemo_1.0.tgz”to“~/my-demo/source_code”.<br> Complete this step by yourself in a proper way<br> 2)Decompress code package<br> $ cd ~/my-demo/source_code<br> $ tar zxf Qt5_NMap_CarouselDemo_1.0.tgz<br> [[File:Myimx6linux3.14_build_8.2.1.1.png]]<br> === Compile QT5 application === Tips: We compile with commands。</span><br> 1)Enter code directory<br> Tips:first we decompress code package“Qt5_NMap_CarouselDemo_1.0.tgz”to“~/my-demo/source_code”<br> $ cd ~/my-demo/source_code/Qt5_NMap_CarouselDemo_1.0/<br> 2)Check QMake<br> $ qmake –v<br> [[File:Myimx6linux3.14_build_8.2.2.2.png]]<br> If the current terminal output has “QMake version 3.0” after the execution of command,that means cross compiler is Configured normally.<br> Otherwise you need to execute the command below:<br> $ source /opt/fsl-imx-x11/3.14.52-1.1.0/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi<br> 3)Creat Makefile<br> $ qmake<br> [[File:Myimx6linux3.14_build_8.2.2.3.png]]<br> You can see an extra Makefile with ls after execution of qmake.<br> 4)Compile<br> $ make<br> [[File:Myimx6linux3.14_build_8.2.2.4.png]]<br> 5)Target file<br> * Executable file <br> $ file Qt5_NMap_CarouselDemo<br> [[File:Myimx6linux3.14_build_8.2.2.5.png]]<br> * Source file<br> Running QT5 needs the corresponding qml file and content<br> [[File:Myimx6linux3.14_build_8.2.2.6.png]]<br> === Save target executable file === Because running QT5 program requires qml file and content file, here We copy the entire directory to the target directory for simplicity.<br> $ cp ../Qt5_NMap_CarouselDemo_1.0 ~/my-demo/bin-l31452/ -a<br> [[File:Myimx6linux3.14_build_8.2.3.1.png]]<br> == '''Package application''' == === Instruction === Programming tool supports to program “my-demo.tar.xz” file package to evaluation board.So We package applications We need as “my-demo.tar.xz”.while where “my-demo.tar.xz” will be programmed ,refer to 《burning manual》.<br> === Package application === 1)Package<br> Here We package the whole my-demo directory.<br> $ cd ~<br> $ tar cjf my-demo.tar.bz2 my-demo<br> [[File:Myimx6linux3.14_build_8.3.2.1.png]]<br> 2)Copy application package as target programming file<br> $ cp my-demo.tar.bz2 ~/my-imx6/04_image/image-linux-31452/<br> [[File:Myimx6linux3.14_build_8.3.2.2.png]]<br> = '''Target programming file''' = ---- So far,we get a set of programming file except file system from“~/my-imx6/04_image/image-linux-31452/”。including“uboot*.imx”、“myimx6*.dtb”、“zImage-myimx6”、“kernel-modules.tar.bz2”、“my-demo.tar.bz2”.<br> Now we can program the image we compiled by ourselves referring to 《programming manual》.<br> == '''Run application on the evaluation board''' == After the burning, supply power for evaluation board,login system and execute commands below.<br> # /home/root/my-demo/bin-l31452/hello.out<br> # export DISPLAY=:0 <br> # /home/root/my-demo/bin-l31452/Qt5_NMap_CarouselDemo_1.0/Qt5_NMap_CarouselDemo-platform eglfs = '''Appendix:file system compilation''' = Notes and instructions:<br> 1)The download of the original compilation exceed 4G。(Tips:you can use files we have downloaded in order to reduce downloads and save time,which is going to be mentioned in 7.4).<br> 2)The network of the compilation host is good to access to www.fackbook.com .Otherwise It may be subject to the condition of the domestic firewall and It is unable to download the software for compilation.<br> 3)The initial compilation may take 2 hours to unlimited time.It depends on the network state and the configuration of the host.(After a rough statistics, It took about 100 minutes to compile QT5 system on the 16-core CPU 16 G memory host except download time).<br> Customer may decide whether to compile the file system or use the file system We provide based on the actual situation. If the file system we provide meets the requirements, you had better not to compile by yourself. Since It may be a lot of errors during compilation.<br> == '''Prepare for compilation''' == === Install software package === Instruction,Yocto compilation relies on some software package. So you need to Install them on the host.<br> $ sudo apt-get install gawk wget git-core diffstat unzip texinfo \<br> gcc-multilib build-essential chrpath socat <br> [[File:Myimx6linux3.14_build_10.1.1.1.png]]<br> $ sudo apt-get install libsdl1.2-dev xterm sed cvs subversion \<br> coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc \<br> g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial \<br> autoconf automake groff curl lzop asciidoc <br> [[File:Myimx6linux3.14_build_10.1.1.2.png]]<br> $ sudo apt-get install uboot-mkimage <br> [[File:Myimx6linux3.14_build_10.1.1.3.png]]<br> === Prepare source code === 1)Download source code<br> From network disk download yocto__imx-3.14.52-1.1.0_ga.tar.xz<br> 2)Create working directory<br> $ mkdir ~/yocto<br> [[File:Myimx6linux3.14_build_10.1.2.1.png]]<br> 3)Copy source code package to working directory <br> Copy“yocto__imx-3.14.52-1.1.0_ga.tar.xz”to“~/my-imx6/02_source”.<br> Complete this step by yourself in a proper way <br> 4) Decompress source code package <br> $ cd ~/yocto/ <br> $ tar xf yocto__imx-3.14.52-1.1.0_ga.tar.xz<br> [[File:Myimx6linux3.14_build_10.1.2.2.png]]<br> === Prepare software package required for compilation === Tips1:If you have a good network and can access a foreign website ,you can skip this section.<br> Tips2:If you use the package we have downloaded, please go on to the next step.<br> Tips3:Limited to the impact of network upload speed and software package updates, we may not include the downloaded package directory.<br> Compile all the necessary packages, but the missing package compilers will be downloaded during the compilation process. <br> 1)Download software package<br> Download the downloads folder on the disk drive (Location: MYZR-Universal Resources / yocto / downloads. Currently the folder size is 6 ~ 8G).<br> 2)Copy software package to BSP directory<br> *Move downloads to “~/yocto/imx-3.14.52-1.1.0_ga” directory<br> *Complete this step by yourself in a proper way.<br> == '''Compilation''' == === Update BSP === $ cd ~/yocto/imx-3.14.52-1.1.0_ga/<br> [[File:Myimx6linux3.14_build_10.2.1.1.png]]<br> $ ./bin/repo sync<br> [[File:Myimx6linux3.14_build_10.2.1.2.png]]<br> === Compilation configuration === $ DISTRO=fsl-imx-x11 MACHINE=imx6qsabresd source fsl-setup-release.sh -b build-x11<br> [[File:Myimx6linux3.14_build_10.2.2.1.png]]<br> After executing the command,the terminal will receive the output message, keep pressing "space" ,enter "y" in the final dialog<br> [[File:Myimx6linux3.14_build_10.2.2.2.png]]<br> Example:Do you accept the EULA you just read? (y/n) y <br> === Compiling the QT5 file system === 1)Execute compilation command<br> $ bitbake fsl-image-qt5<br> [[File:Myimx6linux3.14_build_10.2.3.1.png]]<br> Tips: It takes about one hour to compile on the 16-core CPU and 16G memory host to complete the compilation process except download time.<br> 2)Target file <br> $ ls ./tmp/deploy/images/imx6qsabresd/fsl-image-qt5-imx6qsabresd.tar.bz2<br> [[File:Myimx6linux3.14_build_10.2.3.2.png]]<br> 3)Copy target file<br> The QT5 file system name we programmed is “distro-fsl-image-qt5.tar.bz2”, So we need to copy the compiled file as “distro-fsl-image-qt5.tar.bz2”.<br> $ cp ./tmp/deploy/images/imx6qsabresd/fsl-image-qt5-imx6qsabresd.tar.bz2 ~/my-imx6/04_image/image-linux-31452/distro-fsl-image-qt5.tar.bz2<br> [[File:Myimx6linux3.14_build_10.2.3.3.png]]<br> === Compile Linux file system === 1)Execute compile command<br> $ bitbake fsl-image-machine-test<br> 2)Target file<br> $ ls ./tmp/deploy/images/imx6qsabresd/fsl-image-machine-test-imx6qsabresd.tar.bz2<br> [[File:Myimx6linux3.14_build_10.2.4.1.png]]<br> 3)Copy target file<br> The QT5 file system name We programmed is “distro-fsl-image.tar.bz2”, So we need to copy the compiled file as “distro-fsl-image.tar.bz2”.<br> $ cp ./tmp/deploy/images/imx6qsabresd/fsl-image-machine-test-imx6qsabresd.tar.bz2 ~/my-imx6/04_image/image-linux-31452/distro-fsl-image.tar.bz2<br> [[File:Myimx6linux3.14_build_10.2.4.2.png]]<br> === Compile the cross-compiler tool for QT5 === If you do not need to customize QT5 cross-compiler tool ,skip this section.<br> 1)Execute compilation command<br> $ bitbake meta-toolchain-qt5<br> 2)Target file<br> In the "./tmp/deploy/sdk/" directory, we can find the target file we compile and generate.<br> [[File:Myimx6linux3.14_build_10.2.5.1.png]]<br> 3)Save target file<br> Copy“fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-vfp-neon-toolchain-3.14.52-1.1.0.sh”we compiled to“~/my-imx6/03_tools/”<br> 4)Install QT5 cross-compiler tool<br> If you need to use QT5 cross-compiler tool compiled by yourself, you have to remove QT5 cross-compiler tool which has been already Installed. Install it referring to the "Install QT5 cross-compile tool" of "Install and Configure cross-compile tool chain.<br> </div>
返回至
MY-IMX6 Linux-3.14.52 Build Manual
。
导航菜单
个人工具
登录
命名空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
[-_-]
NXP平台:
MYZR-IMX6-EK200
MYZR-IMX6-EK200(EN)
MYZR-IMX6-EK314
MYZR-IMX6-EK314(EN)
MYZR-IMX6-EK336
MYZR-IMX6-EK336(EN)
MYZR-IMX6-EK140
MYZR-IMX6-EK140(EN)
MYZR-IMX6-EK140P
MYZR-IMX6-EK140P(EN)
MYZR-IMX8M-EK300
MYZR-IMX8M-EK300(EN)
MYZR-IMX8M-EVK
MYZR-IMX8Mmini-EK240
MYZR-IMX8Mmini-EK240(EN)
MYZR-IMX28-EK142
MYZR-IMX28-EK142(EN)
MYZR-LS1012A-EK200
MYZR-LS1012A-EK200(EN)
Rockchip平台:
MYZR-RK3288-EK314
MYZR-RK3288-EK314(EN)
MYZR-RK3399-EK314
MYZR-RK3399-EK314(EN)
Allwinner平台:
MYZR-R16-EK166
MYZR-R16-EK166(EN)
Microchip平台:
MYZR-SAMA5-EK200
MYZR-SAMA5-EK200(EN)
网关产品:
GW200
GW300
GW310/GW311
ST平台:
MYZR-STM32-EK152
所有页面
工具
链入页面
相关更改
特殊页面
页面信息