<?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-A9_Linux-3.0.35_Compile_reference_manual</id>
		<title>MY-IMX6-A9 Linux-3.0.35 Compile reference 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-A9_Linux-3.0.35_Compile_reference_manual"/>
		<link rel="alternate" type="text/html" href="http://wiki.myzr.com.cn/index.php?title=MY-IMX6-A9_Linux-3.0.35_Compile_reference_manual&amp;action=history"/>
		<updated>2026-09-21T17:16:30Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>http://wiki.myzr.com.cn/index.php?title=MY-IMX6-A9_Linux-3.0.35_Compile_reference_manual&amp;diff=2443&amp;oldid=prev</id>
		<title>Admin：创建页面，内容为“ [^_^]: MY-IMX6-A9 Linux-3.0.35 Compile reference manual  ## **Download relevant documents** #### Cross-compilation tool chain Location of network disc: 2.1_OS_Linux...”</title>
		<link rel="alternate" type="text/html" href="http://wiki.myzr.com.cn/index.php?title=MY-IMX6-A9_Linux-3.0.35_Compile_reference_manual&amp;diff=2443&amp;oldid=prev"/>
				<updated>2018-11-09T05:57:52Z</updated>
		
		<summary type="html">&lt;p&gt;创建页面，内容为“ [^_^]: MY-IMX6-A9 Linux-3.0.35 Compile reference manual  ## **Download relevant documents** #### Cross-compilation tool chain Location of network disc: 2.1_OS_Linux...”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
[^_^]: MY-IMX6-A9 Linux-3.0.35 Compile reference manual&lt;br /&gt;
&lt;br /&gt;
## **Download relevant documents**&lt;br /&gt;
#### Cross-compilation tool chain&lt;br /&gt;
Location of network disc: 2.1_OS_Linux-3.0.35 -&amp;gt; 03_Toolchain  &lt;br /&gt;
File one: gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12.tar.bz2  &lt;br /&gt;
File two: environment-setup-cortexa9hf-neon-fsl-linux-gnueabi  &lt;br /&gt;
#### u-boot source code&lt;br /&gt;
Location of network disc: 2.1_OS_Linux-3.0.35 -&amp;gt; 02_Source  &lt;br /&gt;
File Names: u-boot-2016.03-*.tar.bz2 (** source package version number required svn315 and above **)&lt;br /&gt;
#### Kernel source code&lt;br /&gt;
Location of network disc: 2.1_OS_Linux-3.0.35 -&amp;gt; 02_Source  &lt;br /&gt;
File Names: linux-3.0.35-*.tar.bz2 (** source package version number required svn31 and above **)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
## **Install the cross-compilation tool chain**&lt;br /&gt;
* Unzip the cross - compilation tool chain&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
tar xf gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12.tar.bz2 -C /opt/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Copy the tool chain configuration file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
cp environment-setup-cortexa9hf-neon-fsl-linux-gnueabi /opt/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* source Tool chain configuration file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
source /opt/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/environment-setup-cortexa9hf-neon-fsl-linux-gnueabi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Verify cross compilation tool installation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
$CC -v&lt;br /&gt;
&lt;br /&gt;
=====&amp;gt; Output: &lt;br /&gt;
Using built-in specs.&lt;br /&gt;
COLLECT_GCC=arm-fsl-linux-gnueabi-gcc&lt;br /&gt;
COLLECT_LTO_WRAPPER=/opt/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../libexec/gcc/arm-fsl-linux-gnueabi/4.6.2/lto-wrapper&lt;br /&gt;
Target: arm-fsl-linux-gnueabi&lt;br /&gt;
Configured with: /work/build/.build/src/gcc-linaro-4.6-2011.06-0/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-fsl-linux-gnueabi --prefix=/work/fsl-linaro-toolchain-2.13 --with-sysroot=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --enable-languages=c,c++ --with-pkgversion='Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpfr=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-mpc=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-ppl=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-cloog=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-libelf=/work/build/.build/arm-fsl-linux-gnueabi/build/static --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -L/work/build/.build/arm-fsl-linux-gnueabi/build/static/lib -lpwl' --enable-threads=posix --enable-target-optspace --enable-plugin --enable-multilib --with-local-prefix=/work/fsl-linaro-toolchain-2.13/arm-fsl-linux-gnueabi/multi-libs --disable-nls --enable-c99 --enable-long-long --with-system-zlib&lt;br /&gt;
Thread model: posix&lt;br /&gt;
gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
## **u-boot Compile**&lt;br /&gt;
### Preparation before compilation&lt;br /&gt;
* Create the compile working directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
mkdir ~/my-work/02_source/ -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Unzip the source package to the working directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
tar xf u-boot-2016.03-svn*.tar.bz2 -C ~/my-work/02_source/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
### Compile the u-boot target file&lt;br /&gt;
* Source directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
cd ~/my-work/02_source/u-boot-2016.03&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Generate the.config file for the target development board&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
make myimx6ek200-6q-1g_defconfig&lt;br /&gt;
&lt;br /&gt;
=====&amp;gt; Output: &lt;br /&gt;
  HOSTCC  scripts/basic/fixdep&lt;br /&gt;
  HOSTCC  scripts/kconfig/conf.o&lt;br /&gt;
  SHIPPED scripts/kconfig/zconf.tab.c&lt;br /&gt;
  SHIPPED scripts/kconfig/zconf.lex.c&lt;br /&gt;
  SHIPPED scripts/kconfig/zconf.hash.c&lt;br /&gt;
  HOSTCC  scripts/kconfig/zconf.tab.o&lt;br /&gt;
  HOSTLD  scripts/kconfig/conf&lt;br /&gt;
#&lt;br /&gt;
# configuration written to .config&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Perform compilation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
make &lt;br /&gt;
&lt;br /&gt;
=====&amp;gt; Output: &lt;br /&gt;
scripts/kconfig/conf  --silentoldconfig Kconfig&lt;br /&gt;
  CHK     include/config.h&lt;br /&gt;
  UPD     include/config.h&lt;br /&gt;
  GEN     include/autoconf.mk&lt;br /&gt;
  GEN     include/autoconf.mk.dep&lt;br /&gt;
  CHK     include/config/uboot.release&lt;br /&gt;
  UPD     include/config/uboot.release&lt;br /&gt;
  CHK     include/generated/version_autogenerated.h&lt;br /&gt;
  ......&lt;br /&gt;
  LD      u-boot&lt;br /&gt;
  OBJCOPY u-boot-nodtb.bin&lt;br /&gt;
  OBJCOPY u-boot.srec&lt;br /&gt;
  SYM     u-boot.sym&lt;br /&gt;
  COPY    u-boot.bin&lt;br /&gt;
  CFGS    board/myzr/myimx6/myimx6a9-6q-ddr3.cfg.cfgtmp&lt;br /&gt;
  MKIMAGE u-boot.imx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
**Note: if you are prompted with &amp;quot;cc1: error&amp;quot;, the configuration of the cross-compilation tool is not in effect. You can follow the &amp;quot;source toolchain configuration file&amp;quot; in the previous &amp;quot;cross-compilation toolchain installation&amp;quot; before performing this step.* *&lt;br /&gt;
&lt;br /&gt;
* Rename target file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
cp u-boot.imx uboot-myimx6ek200-6q-1g.imx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
### Compile the u-boot environment variable script&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
./tools/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n &amp;quot;MYZR script&amp;quot; -d my_env_src/myimx6a9_3035_script.cmd my_env_script.scr&lt;br /&gt;
&lt;br /&gt;
=====&amp;gt; Output: &lt;br /&gt;
Image Name:   MYZR script&lt;br /&gt;
Created:      Tue Nov  6 17:24:27 2018&lt;br /&gt;
Image Type:   ARM Linux Script (uncompressed)&lt;br /&gt;
Data Size:    1900 Bytes = 1.86 kB = 0.00 MB&lt;br /&gt;
Load Address: 00000000&lt;br /&gt;
Entry Point:  00000000&lt;br /&gt;
Contents:&lt;br /&gt;
   Image 0: 1892 Bytes = 1.85 kB = 0.00 MB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
### Object file&lt;br /&gt;
**uboot-myimx6ek200-6q-1g.imx 和 my_env_script.scr 即编译得到的目标文件，保存这两个文件**&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
## Kernel compilation &lt;br /&gt;
### Preparation before compilation&lt;br /&gt;
* Create the compile working directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
mkdir ~/my-work/02_source/ -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Unzip the source package to the working directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
tar xf linux-3.0.35-svn*.tar.bz2 -C ~/my-work/02_source/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
### Compile the kernel target file&lt;br /&gt;
* Source directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
cd ~/my-work/02_source/linux-3.0.35&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Generate the.config file for the target platform&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
make myimx6a9_defconfig&lt;br /&gt;
&lt;br /&gt;
=====&amp;gt; Output: &lt;br /&gt;
  HOSTCC  scripts/basic/fixdep&lt;br /&gt;
  HOSTCC  scripts/kconfig/conf.o&lt;br /&gt;
  SHIPPED scripts/kconfig/zconf.tab.c&lt;br /&gt;
  SHIPPED scripts/kconfig/lex.zconf.c&lt;br /&gt;
  SHIPPED scripts/kconfig/zconf.hash.c&lt;br /&gt;
  HOSTCC  scripts/kconfig/zconf.tab.o&lt;br /&gt;
  HOSTLD  scripts/kconfig/conf&lt;br /&gt;
#&lt;br /&gt;
# configuration written to .config&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
**Note: If there is an error in &amp;quot;Can't find default configuration &amp;quot;arch/x86/configs, because the configuration of the cross-compilation tool chain is not in effect, you Can perform this step after the&amp;quot; source tool chain configuration file &amp;quot;operation in the previous&amp;quot; cross-compilation tool chain installation &amp;quot;**&lt;br /&gt;
&lt;br /&gt;
* Compile the kernel target file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
make zImage&lt;br /&gt;
&lt;br /&gt;
=====&amp;gt; Output: &lt;br /&gt;
scripts/kconfig/conf --silentoldconfig Kconfig&lt;br /&gt;
  CHK     include/linux/version.h&lt;br /&gt;
  UPD     include/linux/version.h&lt;br /&gt;
  CHK     include/generated/utsrelease.h&lt;br /&gt;
  UPD     include/generated/utsrelease.h&lt;br /&gt;
  Generating include/generated/mach-types.h&lt;br /&gt;
  CC      kernel/bounds.s&lt;br /&gt;
  ......&lt;br /&gt;
  AS      arch/arm/boot/compressed/piggy.gzip.o&lt;br /&gt;
  LD      arch/arm/boot/compressed/vmlinux&lt;br /&gt;
  OBJCOPY arch/arm/boot/zImage&lt;br /&gt;
  Kernel: arch/arm/boot/zImage is ready&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Kernel target file renamed&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
cp arch/arm/boot/zImage zImage-myimx6a9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
### Compile the kernel module package&lt;br /&gt;
* Compiling&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
make modules&lt;br /&gt;
&lt;br /&gt;
=====&amp;gt; Output: &lt;br /&gt;
  CHK     include/linux/version.h&lt;br /&gt;
  CHK     include/generated/utsrelease.h&lt;br /&gt;
make[1]: “include/generated/mach-types.h” It's the latest.&lt;br /&gt;
  CALL    scripts/checksyscalls.sh&lt;br /&gt;
  CC [M]  fs/autofs4/init.o&lt;br /&gt;
  ......&lt;br /&gt;
  LD [M]  drivers/usb/gadget/g_serial.ko&lt;br /&gt;
  LD [M]  fs/nls/nls_ascii.ko&lt;br /&gt;
  LD [M]  fs/autofs4/autofs4.ko&lt;br /&gt;
  LD [M]  fs/nls/nls_utf8.ko&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Create the save directory for the kernel module&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
mkdir modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Install the kernel module to the specified directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
make modules_install INSTALL_MOD_PATH=./modules&lt;br /&gt;
&lt;br /&gt;
=====&amp;gt; Output: &lt;br /&gt;
  INSTALL crypto/tcrypt.ko&lt;br /&gt;
  INSTALL drivers/gpu/drm/drm.ko&lt;br /&gt;
  INSTALL drivers/gpu/drm/vivante/vivante.ko&lt;br /&gt;
  ......&lt;br /&gt;
  INSTALL fs/autofs4/autofs4.ko&lt;br /&gt;
  INSTALL fs/nls/nls_ascii.ko&lt;br /&gt;
  INSTALL fs/nls/nls_utf8.ko&lt;br /&gt;
  DEPMOD  3.0.35-myimx6a9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Package the kernel module file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
=====&amp;gt; Input:&lt;br /&gt;
tar cjf kernel-modules-myimx6a9.tar.bz2 -C modules lib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
### Object file&lt;br /&gt;
**zImage-myimx6a9 和 kernel-modules-myimx6a9.tar.bz2 即编译得到的目标文件，保存这两个文件**&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
* ZhuHai MYZR Technology CO.,LTD.&lt;br /&gt;
* Latest Update: 2018/11/08  &lt;br /&gt;
* Supporter: Tang Bin&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>