<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http://wiki.myzr.com.cn/index.php?action=history&amp;feed=atom&amp;title=MY-IMX6_Linux-3.0.35_Build_Manual</id>
		<title>MY-IMX6 Linux-3.0.35 Build Manual - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.myzr.com.cn/index.php?action=history&amp;feed=atom&amp;title=MY-IMX6_Linux-3.0.35_Build_Manual"/>
		<link rel="alternate" type="text/html" href="http://wiki.myzr.com.cn/index.php?title=MY-IMX6_Linux-3.0.35_Build_Manual&amp;action=history"/>
		<updated>2026-04-23T13:52:38Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>http://wiki.myzr.com.cn/index.php?title=MY-IMX6_Linux-3.0.35_Build_Manual&amp;diff=2078&amp;oldid=prev</id>
		<title>Admin：创建页面，内容为“&lt;div&gt;  = '''Prepare source code pacakge'''= ---- == '''3.0.35 Version code'''==  === u-boot Source code === Filename:u-boot-2009.08--svn*.tar.xz&lt;br&gt;  === kernel Sour...”</title>
		<link rel="alternate" type="text/html" href="http://wiki.myzr.com.cn/index.php?title=MY-IMX6_Linux-3.0.35_Build_Manual&amp;diff=2078&amp;oldid=prev"/>
				<updated>2018-07-23T09:38:01Z</updated>
		
		<summary type="html">&lt;p&gt;创建页面，内容为“&amp;lt;div&amp;gt;  = &amp;#039;&amp;#039;&amp;#039;Prepare source code pacakge&amp;#039;&amp;#039;&amp;#039;= ---- == &amp;#039;&amp;#039;&amp;#039;3.0.35 Version code&amp;#039;&amp;#039;&amp;#039;==  === u-boot Source code === Filename:u-boot-2009.08--svn*.tar.xz&amp;lt;br&amp;gt;  === kernel Sour...”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= '''Prepare source code pacakge'''=&lt;br /&gt;
----&lt;br /&gt;
== '''3.0.35 Version code'''==&lt;br /&gt;
&lt;br /&gt;
=== u-boot Source code ===&lt;br /&gt;
Filename:u-boot-2009.08--svn*.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== kernel Source code ===&lt;br /&gt;
Filename：linux-3.0.35--svn*.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Cross compilation tool===&lt;br /&gt;
Filename：gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= '''Configuration  compilation environment'''=&lt;br /&gt;
----&lt;br /&gt;
== '''Prepare source code'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Prepare source code package===&lt;br /&gt;
1）Create working directory&amp;lt;br&amp;gt;&lt;br /&gt;
*Create ~/my-imx6 as working directory &amp;lt;br&amp;gt;&lt;br /&gt;
$ mkdir ~/my-imx6&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_2.1.1.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
*Create ~/my-imx6/02_source/imx_3.0.35_4.1.0 as source code directory.&amp;lt;br&amp;gt;&lt;br /&gt;
$ mkdir ~/my-imx6/02_source/imx_3.0.35_4.1.0 -p&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_2.1.1.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
*Create ~/my-imx6/03_tools as tool directory&amp;lt;br&amp;gt;&lt;br /&gt;
$ mkdir ~/my-imx6/03_tools -p&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_2.1.1.3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2）Copy source code package to the development host&amp;lt;br&amp;gt;&lt;br /&gt;
Do it in this step in your own way.&amp;lt;br&amp;gt;&lt;br /&gt;
''Tip：this step is to copy “02_source code”from network disk to “~/my-imx6/02_source/imx_3.0.35_4.1.0”in development host，and copy “03_tool/toolchain”to “~/my-imx6/03_tools”.''in development host.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Decompress source code package===&lt;br /&gt;
1）Decompress u-boot source code and kernel source code.&amp;lt;br&amp;gt;&lt;br /&gt;
$ cd ~/my-imx6/02_source/imx_3.0.35_4.1.0&amp;lt;br&amp;gt;&lt;br /&gt;
$ tar xf u-boot-2009.08--svn*.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
$ tar xf linux-3.0.35--svn*.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_2.1.2.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2）Decompress cross compiler tool &amp;lt;br&amp;gt;&lt;br /&gt;
$ cd ~/my-imx6/03_tools/&amp;lt;br&amp;gt;&lt;br /&gt;
$ tar jxf gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_2.1.2.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Development environment configuration'''==&lt;br /&gt;
=== Install package needed===&lt;br /&gt;
1）List of updated source &amp;lt;br&amp;gt;&lt;br /&gt;
$ sudo apt-get update&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_2.2.1.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
After update,it will look like below：&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File: myimx6l3035_build_2.2.1.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2）Install aptitude package management tool and ia32-lib.&amp;lt;br&amp;gt;&lt;br /&gt;
''Tips：if Linux of compiler host is 32bit，you can skip this step.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Install aptitude package management tool.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_2.2.1.3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
$ sudo apt-get –y install aptitude&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install ia32-libs with aptitude.&amp;lt;br&amp;gt;&lt;br /&gt;
$ sudo aptitude –y install ia32-libs&amp;lt;br&amp;gt;&lt;br /&gt;
''Tips：following is the screenshots with re-execution of installation command after installation of aptitude and ia32-libs is finished.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_2.2.1.4.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3）Install mkimage tool&amp;lt;br&amp;gt;&lt;br /&gt;
$ sudo apt-get -y install uboot-mkimage&amp;lt;br&amp;gt;&lt;br /&gt;
''Tips：following is the screenshots with re-execution of installation command after installation of mkimage tool is finished.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_2.2.1.5.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4）Install ncurses-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;Instruction：make menuconfig is dependent on it.&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
$ sudo aptitude -y install ncurses-dev&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Tips：following is the screenshots with re-execution of installation command after installation of ncurses-dev tool is finished.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_2.2.1.6.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure environment variables of MY-IMX6 compilation===&lt;br /&gt;
1）Write platform information to a new configured file.&amp;lt;br&amp;gt;&lt;br /&gt;
$ echo &amp;quot;export ARCH=arm&amp;quot; &amp;gt; ~/my-imx6/03_tools/myimx6_3035_build_env&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2）Write compiler tool chain path to configured file.&amp;lt;br&amp;gt;&lt;br /&gt;
* Enter cross compiler tool directory &amp;lt;br&amp;gt;&lt;br /&gt;
$ cd ~/my-imx6/03_tools/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/&amp;lt;br&amp;gt;&lt;br /&gt;
* Write path to configured file.&amp;lt;br&amp;gt;&lt;br /&gt;
$ sed -i &amp;quot;\$a IMX6_GCC462_PATH=$PWD&amp;quot; ~/my-imx6/03_tools/myimx6_3035_build_env&amp;lt;br&amp;gt;&lt;br /&gt;
* Write cross compiler tool to configured file&amp;lt;br&amp;gt;&lt;br /&gt;
$ sed -i &amp;quot;\$a export CROSS_COMPILE=\$IMX6_GCC462_PATH/arm-none-linux-gnueabi-&amp;quot; ~/my-imx6/03_tools/myimx6_3035_build_env&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3）View configured file &amp;lt;br&amp;gt;&lt;br /&gt;
$ cat ~/my-imx6/03_tools/myimx6_3035_build_env&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4）Figures&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_2.2.2.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note：If an error occurs in any step, need to delect ~/my-imx6/03_tools/myimx6_3035_build_env ，and operate again all steps of this segment.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= '''Compile u-boot'''=&lt;br /&gt;
----&lt;br /&gt;
== '''Enter u-boot source code directory'''==&lt;br /&gt;
$ cd ~/my-imx6/02_source/imx_3.0.35_4.1.0/u-boot-2009.08/&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_3.1.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Validate configured file'''==&lt;br /&gt;
* Execute source command&amp;lt;br&amp;gt;&lt;br /&gt;
$ source ~/my-imx6/03_tools/myimx6_3035_build_env&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_3.2.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* View compiler configuration&amp;lt;br&amp;gt;&lt;br /&gt;
$ echo $ARCH&amp;lt;br&amp;gt;&lt;br /&gt;
$ echo $CROSS_COMPILE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Tips：you can see that ARCH和CROSS_COMPILE is configured.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_3.2.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Verify cross compiler tool configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
$${CROSS_COMPILE}gcc –v&amp;lt;br&amp;gt;&lt;br /&gt;
''Tips：you can see version information of cross compiler tool shown on terminal after execution of command.as below：&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_3.2.0.3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Remove u-boot configuration'''==&lt;br /&gt;
$ make distclean&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_3.3.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''u-boot Configuration'''==&lt;br /&gt;
* Evaluation board and its corresponding u-boot compiler configuration：&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Evaluation board main model	&lt;br /&gt;
!CPU type-memory capacity		&lt;br /&gt;
!Corresponding u-boot configuration	&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|MY-IMX6-EK200	&lt;br /&gt;
|6Q（quad. core）- 1G&lt;br /&gt;
|myimx6ek200_6q_config&lt;br /&gt;
|-&lt;br /&gt;
	&lt;br /&gt;
|6Q（quad core）- 2G	&lt;br /&gt;
|myimx6ek200_6q_2g_config&lt;br /&gt;
|-&lt;br /&gt;
	&lt;br /&gt;
|6U（dual core tile）- 1G		&lt;br /&gt;
|myimx6ek200_6u_config&lt;br /&gt;
|-&lt;br /&gt;
	&lt;br /&gt;
|6S（single core）- 512M	&lt;br /&gt;
|myimx6ek200_6s_config&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|MY-IMX6-EK314	&lt;br /&gt;
|6Q（quad.core）- 1G	&lt;br /&gt;
|myimx6ek314_6q_config&lt;br /&gt;
|-&lt;br /&gt;
	&lt;br /&gt;
|6Q（quad.core）- 2G	&lt;br /&gt;
|myimx6ek314_6q_2g_config&lt;br /&gt;
|-&lt;br /&gt;
	&lt;br /&gt;
|6U（dual core tile）- 1G		&lt;br /&gt;
|myimx6ek314_6u_config&lt;br /&gt;
|-&lt;br /&gt;
	&lt;br /&gt;
|6S（single core）- 512M		&lt;br /&gt;
|myimx6ek314_6s_config&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*MYIMX6EK200-6Qxx-1G configuration example：&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$ make myimx6ek200_6q_config&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_3.3.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Compilation'''==&lt;br /&gt;
* Execute compilation &amp;lt;br&amp;gt;&lt;br /&gt;
$ make&amp;lt;br&amp;gt;&lt;br /&gt;
''Tips：To speed up the compilation，add &amp;quot;-j4&amp;quot; after make.The Linux host used to compile is dual-core ,4 threads .So &amp;quot;-j&amp;quot; is followed by 4, which takes 4 threads to compile. The number behind &amp;quot;-j&amp;quot; is allocated based on system resources,but It should not exceed the maximum threads the host support.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_3.5.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Complete compilation &amp;lt;br&amp;gt;&lt;br /&gt;
''Tips：u-boot compilation process will take a few minustes or so.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_3.5.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Target file'''==&lt;br /&gt;
You can get the compiled file u-boot.bin with ls command after compilation.&amp;lt;br&amp;gt;&lt;br /&gt;
$ ls&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_3.6.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= '''Compile kernel'''=&lt;br /&gt;
----&lt;br /&gt;
== '''Enter kernel source directory'''==&lt;br /&gt;
$ cd ~/my-imx6/02_source/imx_3.0.35_4.1.0/linux-3.0.35/&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.1.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Validate configured file'''==&lt;br /&gt;
* Execute source command&amp;lt;br&amp;gt;&lt;br /&gt;
$ source ~/my-imx6/03_tools/myimx6_3035_build_env&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.2.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* View compiler configuration&amp;lt;br&amp;gt;&lt;br /&gt;
$ echo $ARCH&amp;lt;br&amp;gt;&lt;br /&gt;
$ echo $CROSS_COMPILE&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Tips：you can see that ARCH和CROSS_COMPILE is configured&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.2.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Verify cross compiler tool configuration&amp;lt;br&amp;gt;&lt;br /&gt;
$ ${CROSS_COMPILE}gcc –v&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Tips：you can see version information of cross compiler tool shown on terminal after execution of command.as below：&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.2.0.3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Prepare for kernel configuration'''==&lt;br /&gt;
* Remove kernel configuration&amp;lt;br&amp;gt;&lt;br /&gt;
$ make distclean&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.3.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Generated.config file&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instructions：configuration files used for MY-IMX6-EK200 seires of evaluation board and MY-IMX6-EK314 series of evaluation board is myimx6_defconfig.&amp;lt;br&amp;gt;&lt;br /&gt;
$ make myimx6_defconfig&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.3.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Compile kernel'''==&lt;br /&gt;
* Compile uImage&amp;lt;br&amp;gt;&lt;br /&gt;
$ make uImage&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instruction：4 threads compilation is used in the screenshots.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.4.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Complete compilation&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.4.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Target file &amp;lt;br&amp;gt;&lt;br /&gt;
arch/arm/boot/uImage is the target file through compilation，you can view the file information with ls command.&amp;lt;br&amp;gt;&lt;br /&gt;
$ ls arch/arm/boot/uImage –la&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.4.0.3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Compile module'''==&lt;br /&gt;
* Compile &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$ make&amp;lt;br&amp;gt;&lt;br /&gt;
Instruction：4 threads compilation is used in the screenshots.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.5.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Complete compilation&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.5.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Target file&amp;lt;br&amp;gt;&lt;br /&gt;
The.ko file of each module is in the directory where code is located after compilation ，you can find the module compiled with find command after compilation,refering command as below：&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
$ find -name *.ko&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_4.5.0.3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= '''Linux application compilation'''=&lt;br /&gt;
----&lt;br /&gt;
== '''Write application'''==&lt;br /&gt;
1) Create application directory&amp;lt;br&amp;gt;&lt;br /&gt;
$ mkdir ~/my-imx6/02_source/application/ -p &amp;lt;br&amp;gt;&lt;br /&gt;
$ cd ~/my-imx6/02_source/application/ &amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_5.1.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) Write application（here take hello.c as example）&amp;lt;br&amp;gt;&lt;br /&gt;
Create hello.c and write following code and save：&amp;lt;br&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
int main(int argc, char **argv) &amp;lt;br&amp;gt;&lt;br /&gt;
{ &amp;lt;br&amp;gt;&lt;br /&gt;
　　　printf(&amp;quot;Hello, MYZR!\n&amp;quot;); &amp;lt;br&amp;gt;&lt;br /&gt;
　　　&amp;lt;br&amp;gt;&lt;br /&gt;
　　　return; &amp;lt;br&amp;gt;&lt;br /&gt;
} &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3)View code&amp;lt;br&amp;gt;&lt;br /&gt;
$ cat hello.c &amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_5.1.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Validate compiler configured file'''==&lt;br /&gt;
* Execute source command&amp;lt;br&amp;gt;&lt;br /&gt;
$ source ~/my-imx6/03_tools/myimx6_3035_build_env&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_5.2.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* View compiler configuration&amp;lt;br&amp;gt;&lt;br /&gt;
$ echo $ARCH&amp;lt;br&amp;gt;&lt;br /&gt;
$ echo $CROSS_COMPILE&amp;lt;br&amp;gt;&lt;br /&gt;
''Tips：you can see that ARCH和CROSS_COMPILE is configured &amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_5.2.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Verify cross compiler tool configuration&amp;lt;br&amp;gt;&lt;br /&gt;
$ ${CROSS_COMPILE}gcc –v&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Tips：you can see version information of cross compiler tool shown on terminal after execution of command.as below：&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_5.2.0.3.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Compile application'''==&lt;br /&gt;
2) Compile &amp;lt;br&amp;gt;&lt;br /&gt;
$ ${CROSS_COMPILE}gcc hello.c -o hello.out &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note：the above commands contain charater“$”，e.g“${CROSS_COMPILE}gcc”，which is the environment variable generated when referring to our source.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_5.3.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) View type of target file &amp;lt;br&amp;gt;&lt;br /&gt;
$ file hello.out &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can get the property of target file hello.out.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_5.3.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= '''File system'''=&lt;br /&gt;
----&lt;br /&gt;
== '''File system instruction'''==&lt;br /&gt;
File system package is located in image file folder in the network disk。as to type of file system supported and way of download please refer to《MY-IMX6 buring guide》.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Decompress file system to compiler host'''==&lt;br /&gt;
1）Create directory of file system and enter.&amp;lt;br&amp;gt;&lt;br /&gt;
$ mkdir ~/my-imx6/04_rootfs/ -p&amp;lt;br&amp;gt;&lt;br /&gt;
$ cd ~/my-imx6/04_rootfs/&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_6.2.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2）Copy file system to ~/my-imx6/04_rootfs/directory&amp;lt;br&amp;gt;&lt;br /&gt;
This step sbould be done in your own way&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3）Decompress file system to specified directory&amp;lt;br&amp;gt;&lt;br /&gt;
$ mkdir rootfs&amp;lt;br&amp;gt;&lt;br /&gt;
$ sudo tar jxf rootfs-linux.tar.bz2 -C rootfs&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_6.2.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Add application to file system'''==&lt;br /&gt;
$ cp ~/my-imx6/02_source/application/hello.out rootfs/app_test/&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_6.3.0.1.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5）Re-pakcage file system&amp;lt;br&amp;gt;&lt;br /&gt;
$ rm -rf rootfs-linux.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
$ cd rootfs/&amp;lt;br&amp;gt;&lt;br /&gt;
$ sudo tar cjf ../rootfs-linux.tar.bz2 *&amp;lt;br&amp;gt;&lt;br /&gt;
[[File: myimx6l3035_build_6.3.0.2.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Add module to file system'''==&lt;br /&gt;
Prepare .ko file of module needed,as to other operations please refer to“add application to file system”.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>