<?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-4.1.15_Build_Manual</id>
		<title>MY-IMX6 Linux-4.1.15 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-4.1.15_Build_Manual"/>
		<link rel="alternate" type="text/html" href="http://wiki.myzr.com.cn/index.php?title=MY-IMX6_Linux-4.1.15_Build_Manual&amp;action=history"/>
		<updated>2026-05-25T04:03:16Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>http://wiki.myzr.com.cn/index.php?title=MY-IMX6_Linux-4.1.15_Build_Manual&amp;diff=2080&amp;oldid=prev</id>
		<title>Admin：创建页面，内容为“&lt;div&gt;  = '''Document instruction''' = ---- == '''System environment instruction''' == * CUP architeture of host used for compilation：64bit &lt;br&gt;  *System of host：...”</title>
		<link rel="alternate" type="text/html" href="http://wiki.myzr.com.cn/index.php?title=MY-IMX6_Linux-4.1.15_Build_Manual&amp;diff=2080&amp;oldid=prev"/>
				<updated>2018-07-23T09:50:27Z</updated>
		
		<summary type="html">&lt;p&gt;创建页面，内容为“&amp;lt;div&amp;gt;  = &amp;#039;&amp;#039;&amp;#039;Document instruction&amp;#039;&amp;#039;&amp;#039; = ---- == &amp;#039;&amp;#039;&amp;#039;System environment instruction&amp;#039;&amp;#039;&amp;#039; == * CUP architeture of host used for compilation：64bit &amp;lt;br&amp;gt;  *System of host：...”&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;
= '''Document instruction''' =&lt;br /&gt;
----&lt;br /&gt;
== '''System environment instruction''' ==&lt;br /&gt;
* CUP architeture of host used for compilation：64bit &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*System of host：Linux &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Linux release version：Ubuntu&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Ubuntu version type：server version&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Ubuntu version no.：12.04.5&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Ubuntu system type：x86-64&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;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 &lt;br /&gt;
Ubuntu may encounter unnecessary problems .&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''0peration instruction''' ==&lt;br /&gt;
1）The line in the document which begins with “$”,which is followed by the Linux command.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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）.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3）In all the Linux execution commands of the document，if the next character after the space is &amp;quot;-&amp;quot;,（example：sudo apt-get –y install），please enter into Linux host to execute manually.（Copying ,pasting to the host directly to execute may fail ).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4）Any line of Linux commands whichi is not finished is recommended to be entered into the host for execution. (Because copy or paste commands cannot contain special character such as &amp;quot;line breaks&amp;quot;）.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6）Please follow the document strictly to compile for the first time.Otherwise ,there may be unexpected error.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Screenshots instruction''' ==&lt;br /&gt;
To make the view look neat and tidy , the command prompt in the screenshot should use myzr$ uniformly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Linux command in the image''' ==&lt;br /&gt;
In the image of the document, you can see the input Linux command visually from the lines that start with “myzr$”.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Important information instruction'''&amp;lt;/span&amp;gt; ==&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;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.&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Details refered to 《[[MYZR virtual machine system instruction |MYZR virtual machine system instruction]]》'''&lt;br /&gt;
&lt;br /&gt;
= '''Prepare source code and relevant file''' =&lt;br /&gt;
----&lt;br /&gt;
== '''Source code''' ==&lt;br /&gt;
The corresponding Linux version of the evaluation board and the corresponding source code files are shown in the table below：&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 model || u-boot Source code|| linux Source code&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK200 || rowspan=4|u-boot-2016.03__svn121.tar.xz || rowspan=4|linux-4.1.15__svn189.tar.xz&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK314&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK336&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK140&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== '''Cross compiler tool file''' ==&lt;br /&gt;
Linux program cross compiler tool：gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Linux cross compiler tool configuration file：gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Creat working directory''' ==&lt;br /&gt;
1）Cource code directory&amp;lt;br&amp;gt;&lt;br /&gt;
$ mkdir ~/my-imx6/02_source –p &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_2.3.0.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2）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:myimx6linux3.14_build_2.3.0.2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3）Image directory &amp;lt;br&amp;gt;&lt;br /&gt;
$ mkdir ~/my-imx6/04_image –p&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_2.3.0.3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
$ mkdir ~/my-imx6/04_image/image-linux-4115 –p&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_2.3.0.4.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4）Application directory&amp;lt;br&amp;gt;&lt;br /&gt;
$ mkdir ~/my-demo&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_2.3.0.5.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= '''Install cross compiler tool chain''' =&lt;br /&gt;
----&lt;br /&gt;
== '''Install Linux cross compiler tool chain''' ==&lt;br /&gt;
1）Enter cross compiler tool chain directory&amp;lt;br&amp;gt;&lt;br /&gt;
$ cd ~/my-imx6/03_tools/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2）Copy Linux cross compiler tool to directory&amp;lt;br&amp;gt;&lt;br /&gt;
copy gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar to“~/my-imx6/03_tools”，complete this step by yourself in a proper way.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3）Uncompress Linux Cross Compilation Tools&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$ tar xf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_4.1.0.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4）Copy cross compiler tool configuration file&amp;lt;br&amp;gt;&lt;br /&gt;
Copy gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env to“~/my-imx6/03_tools”，complete this step by yourself in a proper way.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5）Check installation&amp;lt;br&amp;gt;&lt;br /&gt;
$ source gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env&amp;lt;br&amp;gt;&lt;br /&gt;
$ ${CROSS_COMPILE}gcc –v&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_4.1.0.2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= '''U-Boot compilation''' =&lt;br /&gt;
----&lt;br /&gt;
== '''Prepare compilation''' ==&lt;br /&gt;
&lt;br /&gt;
=== Copy source code package to development host ===&lt;br /&gt;
Copy“u-boot source code”downloaded to “~/my-imx6/02_source”of Linux development host.&amp;lt;br&amp;gt;&lt;br /&gt;
Complete this step by yourself in a proper way.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Decompress u-boot source code package ===&lt;br /&gt;
$ cd ~/my-imx6/02_source/&amp;lt;br&amp;gt;&lt;br /&gt;
$ tar xf u-boot-2016.03__svn121.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_5.1.2.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Compilation''' ==&lt;br /&gt;
=== Validate compiler configuration file ===&lt;br /&gt;
$ source ~/my-imx6/03_tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_5.2.1.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enter u-boot source code directory ===&lt;br /&gt;
$ cd ~/my-imx6/02_source/u-boot-2016.03&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_5.2.2.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Remove u-boot temporary files===&lt;br /&gt;
$ make distclean &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_5.2.3.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configure u-boot ===&lt;br /&gt;
* Configuration of development and its corresponding compiler：&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Development board main model ||CPU type-memory capacity|| Architeture of processor || Corresponding u-boot configuration&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=7|MY-IMX6-EK200 &lt;br /&gt;
| i.MX 6QuadPlus - 1G || Cortex-A9 || myimx6ek200-6qp_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX 6QuadPlus - 2G || Cortex-A9 || myimx6ek200-6qp-2g_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX6 Quad - 1G || Cortex-A9 || myimx6ek200-6q_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX6 Quad - 2G || Cortex-A9 || myimx6ek200-6q-2g_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX6 DualLite - 1G || Cortex-A9 || myimx6ek200-6u_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX 6Solo - 512M || Cortex-A9 || myimx6ek200-6s_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX 6Solo - 1G || Cortex-A9 || myimx6ek200-6s-1g_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=5|MY-IMX6-EK314 &lt;br /&gt;
| i.MX 6QuadPlus - 1G || Cortex-A9 || myimx6ek200-6qp_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX 6QuadPlus - 2G || Cortex-A9 || myimx6ek200-6qp-2g_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX6 Quad- 1G || Cortex-A9 || myimx6ek314-6q_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX6 Quad- 2G || Cortex-A9 || myimx6ek314-6q-2g_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX6 DualLite - 1G || Cortex-A9 || myimx6ek314-6u_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|MY-IMX6-EK336&lt;br /&gt;
|i.MX 6QuadPlus - 1G || Cortex-A9 || myimx6ek336-6qp_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX 6QuadPlus - 2G || Cortex-A9 || myimx6ek336-6qp-2g_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX6 Quad- 1G || Cortex-A9 || myimx6ek336-6q_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX6 Quad- 2G || Cortex-A9 || myimx6ek336-6q-2g_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=6|MY-IMX6-EK140 &lt;br /&gt;
|i.MX 6UltraLite-256M || Cortex-A7 || myimx6ek140-6g_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX 6UltraLite-512M || Cortex-A7 || myimx6ek140-6g-512m_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX 6UltraLite Full - 256M|| Cortex-A7 || myimx6ek140p-6g_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX 6UltraLite Full - 512M || Cortex-A7 || myimx6ek140p-6g-512m_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX 6UlltraLite Full - 256M|| Cortex-A7 || myimx6ek140p-6y_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|i.MX 6UlltraLite Full - 512M|| Cortex-A7 || myimx6ek140p-6y-512m_defconfig&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*MYIMX6EK200-6Q-1G configuration example：&amp;lt;br&amp;gt;&lt;br /&gt;
$ make myimx6ek200-6q_defconfig &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_5.2.4.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Execute compilation ===&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:myimx6linux3.14_build_5.2.5.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Complete compilation&amp;lt;br&amp;gt;&lt;br /&gt;
Tips: u-boot compiling process may take one or two minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_5.2.5.2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Target file''' ==&lt;br /&gt;
* Compile file&amp;lt;br&amp;gt;&lt;br /&gt;
You can get the compiled file u-boot .imx  with ls command after compilation.&amp;lt;br&amp;gt;&lt;br /&gt;
$ ls &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_5.3.0.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Target file&amp;lt;br&amp;gt;&lt;br /&gt;
The corresponding target file name for u-boot configuration of MY-IMX6 series evaluation board is shown in the table below：&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!u-boot Configuration&amp;lt;br&amp;gt; || Target file&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek200-6qp_defconfig || uboot-myimx6ek200-6qp.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek200-6qp-2g_defconfig || uboot-myimx6ek200-6qp-2g.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek200-6q_defconfig || uboot-myimx6ek200-6q.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek200-6q-2g_defconfig || uboot-myimx6ek200-6q-2g.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek200-6u_defconfig || uboot-myimx6ek200-6u.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek200-6s_defconfig || uboot-myimx6ek200-6s.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek200-6s-1g_defconfig || uboot-myimx6ek200-6s-1g.imx&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek314-6qp_defconfig || uboot-myimx6ek314-6qp.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek314-6qp-2g_defconfig || uboot-myimx6ek314-6qp-2g.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek314-6q_defconfig || uboot-myimx6ek314-6q.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek314-6q-2g_defconfig || uboot-myimx6ek314-6q-2g.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek314-6u_defconfig || uboot-myimx6ek314-6u.imx&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek336-6qp_defconfig || uboot-myimx6ek336-6qp.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek336-6qp-2g_defconfig || uboot-myimx6ek336-6qp-2g.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek336-6q_defconfig || uboot-myimx6ek336-6q.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek336-6q-2g_defconfig || uboot-myimx6ek336-6q-2g.imx&lt;br /&gt;
|-&lt;br /&gt;
|colspan=2|&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek140-6g_defconfig || uboot-myimx6ek140-6g.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek140-6g-512m_defconfig || uboot-myimx6ek140-6g-512m.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek140p-6g_defconfig || uboot-myimx6ek140p-6g.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek140p-6g-512m_defconfig || uboot-myimx6ek140p-6g-512m.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek140p-6y_defconfig || uboot-myimx6ek140p-6y.imx&lt;br /&gt;
|-&lt;br /&gt;
|myimx6ek140p-6y-512m_defconfig  || uboot-myimx6ek140p-6y-512m.imx&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
We need to copy the compilied file u-boot.imx as our target file name.：&amp;lt;br&amp;gt;&lt;br /&gt;
Copy  the generated file u-boot.imx from the compilation  of  myimx6ek200-6q_defconfig as target file.):&amp;lt;br&amp;gt;&lt;br /&gt;
$ cp u-boot.imx ~/my-imx6/04_image/image-linux-4115/uboot-myimx6ek200-6q.imx&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_5.3.0.2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= '''Compile kernel''' =&lt;br /&gt;
----&lt;br /&gt;
== '''Prepare compilation''' ==&lt;br /&gt;
=== Copy source code package to development host ===&lt;br /&gt;
Copy “linux source code”downloaded to “~/my-imx6/02_source”of Linux development host.&amp;lt;br&amp;gt;&lt;br /&gt;
Complete this step by yourself in a proper way.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Decompress linux source code package ===&lt;br /&gt;
$ cd ~/my-imx6/02_source/&amp;lt;br&amp;gt;&lt;br /&gt;
$ tar xf linux-4.1.15__svn189.tar.xz&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_6.1.2.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Kernel compilation configuration''' ==&lt;br /&gt;
=== Validate compilfer configuration file ===&lt;br /&gt;
$ source ~/my-imx6/03_tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_6.2.1.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove kernel temporary file ===&lt;br /&gt;
* Enter linux source code directory &amp;lt;br&amp;gt;&lt;br /&gt;
$ cd ~/my-imx6/02_source/linux-4.1.15&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_6.2.2.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Remove temporary file &amp;lt;br&amp;gt;&lt;br /&gt;
$ make distclean &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_6.2.2.2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Kernel configuration ===&lt;br /&gt;
*Kernel configuration file &amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Evaluation board model || Configuration file&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK200 || rowspan=3|myimx6a9_defconfig&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK314&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK336&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK140 || myimx6a7_defconfig&lt;br /&gt;
|}&lt;br /&gt;
$ make myimx6a9_defconfig &amp;lt;br&amp;gt;&lt;br /&gt;
If what compified is kernel of MY-IMX6-EK140，please use $ make myimx6a7_defconfig.&amp;lt;br&amp;gt;&lt;br /&gt;
Take myimx6a9_defconfig as an example.&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:myimx6linux3.14_build_6.2.3.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Compile kernel''' ==&lt;br /&gt;
* Execute compilation&amp;lt;br&amp;gt;&lt;br /&gt;
$ make zImage &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_6.3.0.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete compilation&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_6.3.0.2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Target file&amp;lt;br&amp;gt;&lt;br /&gt;
arch/arm/boot/zImage is the kernel file Compiled，you can check file information with ls command.&amp;lt;br&amp;gt;&lt;br /&gt;
$ ls arch/arm/boot/zImage -la &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_6.3.0.3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: The kernel file name which is going to be programed and started is “zImage-myimx6” or “zImage-myimx6a7”, So we should copy zImage as zImage-myimx6a9 or zImage-myimx6a7&amp;lt;br&amp;gt;&lt;br /&gt;
$ cp arch/arm/boot/zImage ~/my-imx6/04_image/image-linux-4115/zImage-myimx6a9   (A9)&amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
$ cp arch/arm/boot/zImage ~/my-imx6/04_image/image-linux-4115/zImage-myimx6a7    (A7) &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_6.3.0.4.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Compile device tree''' ==&lt;br /&gt;
The correspondence between the type of evaluation board and device tree is shown below：&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Development main model || CPU type-memory capacity || Corresponding device tree file&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=7|MY-IMX6-EK200 &lt;br /&gt;
| i.MX 6QuadPlus - 1G || myimx6ek200-6qp.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6QuadPlus - 2G || myimx6ek200-6qp-2g.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX6 Quad - 1G || myimx6ek200-6q.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX6 Quad - 2G || myimx6ek200-6q-2g.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX6 DualLite - 1G || myimx6ek200-6u.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6Solo - 512M || myimx6ek200-6s.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6Solo - 1G || myimx6ek200-6s-1g.dtb&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=5|MY-IMX6-EK314 &lt;br /&gt;
| i.MX 6QuadPlus - 1G || myimx6ek314-6qp.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6QuadPlus - 2G || myimx6ek314-6qp-2g.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX6 Quad - 1G || myimx6ek314-6q.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX6 Quad - 2G || myimx6ek314-6q-2g.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX6 DualLite - 1G || myimx6ek314-6u.dtb&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=4|MY-IMX6-EK336&lt;br /&gt;
| i.MX 6QuadPlus - 1G || myimx6ek336-6qp.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6QuadPlus - 2G || myimx6ek336-6qp-2g.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX6 Quad - 1G || myimx6ek336-6q.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX6 Quad - 2G || myimx6ek336-6q-2g.dtb&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=10|MY-IMX6-EK140&lt;br /&gt;
| i.MX 6UltraLite-256M || myimx6ek140-6g.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6UltraLite-512M || myimx6ek140-6g-512m.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6UltraLite Full - 256M (2eth) || myimx6ek140p-6g.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6UltraLite Full - 256M (8uart)|| myimx6ek140p-6g-8uart.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6UltraLite Full - 512M (2eth) || myimx6ek140p-6g-512m.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6UltraLite Full - 512M (8uart) || myimx6ek140p-6g-512m-8uart.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6UlltraLite Full - 256M (2eth) ||myimx6ek140p-6y.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6UlltraLite Full - 256M (8uart)) || myimx6ek140p-6y-8uart.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6UlltraLite Full - 512M (2eth) || myimx6ek140p-6y-512m.dtb&lt;br /&gt;
|-&lt;br /&gt;
| i.MX 6UlltraLite Full - 512M (8uart) || myimx6ek140p-6y-512m-8uart.dtb&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
*Take MY-IMX6-EK200-6Q-1G as example&amp;lt;br&amp;gt;&lt;br /&gt;
$ make myimx6ek200-6q.dtb&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_6.4.0.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Target file&amp;lt;br&amp;gt;&lt;br /&gt;
You can browse the target device tree file information from compilation with ls command：&amp;lt;br&amp;gt;&lt;br /&gt;
$ ls arch/arm/boot/dts/myimx6ek*.dtb &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_6.4.0.2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Copy device tree file to image directory&amp;lt;br&amp;gt;&lt;br /&gt;
$ cp arch/arm/boot/dts/myimx6ek*.dtb ~/my-imx6/04_image/image-linux-4115/  &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_6.4.0.3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Compile module''' ==&lt;br /&gt;
* Compile module command&amp;lt;br&amp;gt;&lt;br /&gt;
$ make modules&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_6.5.0.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install module to the specified directory &amp;lt;br&amp;gt;&lt;br /&gt;
$ make modules_install INSTALL_MOD_PATH=./modules&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_6.5.0.2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Package the module file &amp;lt;br&amp;gt;&lt;br /&gt;
$ cd modules&amp;lt;br&amp;gt;&lt;br /&gt;
$ tar cjf ../modules.tar.bz2 *&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_6.5.0.3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Copy module package to image directory&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Development board model || Target module package&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK200 || rowspan=3|kernel-modules-myimx6a9.tar.bz2&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK314&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK336&lt;br /&gt;
|-&lt;br /&gt;
|MY-IMX6-EK140 || kernel-modules-myimx6a7.tar.bz2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
$ cp ../modules.tar.bz2 ~/my-imx6/04_image/image-linux-4115/kernel-modules-myimx6a9.tar.bz2&amp;lt;br&amp;gt;&lt;br /&gt;
Note:when you compile the Kernel If the configuration file you use is myimx6a9_defconfig, here you should&lt;br /&gt;
:Copy modules.tar.bz2 as kernel-modules-myimx6a9.tar.bz2.If the configuration file is myimx6a7_defconfig，you should Copy modules.tar.bz2 as kernel-modules-myimx6a7.tar.bz2.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= '''Application compilation''' =&lt;br /&gt;
----&lt;br /&gt;
== '''Linux application compilation''' ==&lt;br /&gt;
&lt;br /&gt;
=== Write an application ===&lt;br /&gt;
* Create application source code directory and Linux-4.1.15 executable program directory&amp;lt;br&amp;gt;&lt;br /&gt;
$ mkdir ~/my-demo/source_code -p&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_8.1.1.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$ mkdir ~/my-demo/bin-l4115 -p&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_8.1.1.2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Write source code&amp;lt;br&amp;gt;&lt;br /&gt;
$ cd ~/my-demo/source_code&amp;lt;br&amp;gt;&lt;br /&gt;
$ vi hello.c&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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;
&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;
* View code&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_8.1.1.3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$ cat hello.c&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile application  ===&lt;br /&gt;
* Configure environment variables&amp;lt;br&amp;gt;&lt;br /&gt;
$ source ~/my-imx6/03_tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_8.1.2.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 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;
[[File:Myimx6linux3.14_build_8.1.2.2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
Note:The above command contains “$”,which is “${CROSS_COMPILE}gcc”. It is the environment variable generated when referring to our source.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Target file &amp;lt;br&amp;gt;&lt;br /&gt;
$ file hello.out&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_8.1.2.3.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
You can see the property of target file hello.out.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Save target executable file ===&lt;br /&gt;
$ mv hello.out ~/my-demo/bin-l31452/&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_8.1.3.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Package application''' ==&lt;br /&gt;
=== Instruction ===&lt;br /&gt;
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 [[MY-IMX6 MfgTool User Guide|《MY-IMX6 MfgTool User Guide》]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Package application ===&lt;br /&gt;
1）Package&amp;lt;br&amp;gt;&lt;br /&gt;
Here We package the whole my-demo directory.&amp;lt;br&amp;gt;&lt;br /&gt;
$ cd ~&amp;lt;br&amp;gt;&lt;br /&gt;
$ tar cjf my-demo.tar.bz2 my-demo&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_8.3.2.1.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2）Copy application package as target programming file.&amp;lt;br&amp;gt;&lt;br /&gt;
$ cp my-demo.tar.bz2 ~/my-imx6/04_image/image-linux-31452/&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Myimx6linux3.14_build_8.3.2.2.png]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= '''Target programming file''' =&lt;br /&gt;
----&lt;br /&gt;
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”.&amp;lt;br&amp;gt;&lt;br /&gt;
Now we can program the image we compiled by ourselves referring to [[MY-IMX6 MfgTool User Guide|《MY-IMX6 MfgTool User Guide》]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>