查看: 2017|回复: 0

明远智睿MY-IMX6 Linux-4.1.15 编译参考手册

[复制链接]
发表于 2019-1-15 10:46:12 | 显示全部楼层 |阅读模式
1  下载相关文件
1.1  交叉编译工具链
A7系列:打开网盘到 2.3_OS_Linux-4.1.15 -> 03_toolchain,下载 MY-IMX-A7 目录。
A9系列:打开网盘到 2.3_OS_Linux-4.1.15 -> 03_toolchain,下载 MY-IMX-A9 目录。

1.2  源码
u-boot:打开网盘到 2.3_OS_Linux-4.1.15 -> 02_source,下载 u-boot-2016.03-*.tar.bz2 (源码包版本号需svn315及以上)。
Kernel:打开网盘到 2.3_OS_Linux-4.1.15 -> 02_source,下载 linux-4.1.15-*.tar.bz2 (源码包版本号需svn368及以上) 。

2  安装交叉编译工具链
2.1  MY-IMX6-A7 系列交叉编译工具链安装
执行安装
=====> Input:
./fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-neon-toolchain-4.1.15-2.1.0.sh

=====> Output:
Freescale i.MX Release Distro SDK installer version 4.1.15-2.1.0
================================================================
Enter target directory for SDK (default: /opt/fsl-imx-x11/4.1.15-2.1.0):
=====> Input:
/home/myzr/my-work/03_toolchain/fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-neon-toolchain-4.1.15-2.1.0
=====> Output:
You are about to install the SDK to "/home/myzr/my-work/03_toolchain/fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-neon-toolchain-4.1.15-2.1.0". Proceed[Y/n]?
=====> Input:
y
=====> Output:
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.
$ . /home/myzr/my-work/03_toolchain/fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-neon-toolchain-4.1.15-2.1.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabi

source 工具链配置文件
=====> Input:
source  /home/myzr/my-work/03_toolchain/fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-neon-toolchain-4.1.15-2.1.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabi

检验交叉编译工具安装
=====> Input:
$CC -v
=====> Output:
Using built-in specs.
COLLECT_GCC=arm-poky-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/home/myzr/my-work/03_toolchain/fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-neon-toolchain-4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.3.0/lto-wrapper
Target: arm-poky-linux-gnueabi
Configured with: ../../../../../../work-shared/gcc-5.3.0-r0/gcc-5.3.0/configure --build=x86_64-linux --host=x86_64-pokysdk-linux --target=arm-poky-linux-gnueabi --prefix=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr --exec_prefix=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr --bindir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi --sbindir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi --libexecdir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi --datadir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/share --sysconfdir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/etc --sharedstatedir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/com --localstatedir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/var --libdir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi --includedir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/include --oldincludedir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/include --infodir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/share/info --mandir=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/myzr/my-yocto/imx-4.1.15-2.1.0/imx6ull14x14evk__fsl-imx-x11/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-poky-linux-gnueabi- --without-local-prefix --enable-lto --enable-libssp --enable-libitm --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-gxx-include-dir=/not/exist/usr/include/c++/5.3.0 --with-build-time-tools=/home/myzr/my-yocto/imx-4.1.15-2.1.0/imx6ull14x14evk__fsl-imx-x11/tmp/sysroots/x86_64-linux/usr/arm-poky-linux-gnueabi/bin --with-sysroot=/not/exist --with-build-sysroot=/home/myzr/my-yocto/imx-4.1.15-2.1.0/imx6ull14x14evk__fsl-imx-x11/tmp/sysroots/imx6ull14x14evk --enable-poison-system-directories --with-mpfr=/home/myzr/my-yocto/imx-4.1.15-2.1.0/imx6ull14x14evk__fsl-imx-x11/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --with-mpc=/home/myzr/my-yocto/imx-4.1.15-2.1.0/imx6ull14x14evk__fsl-imx-x11/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --enable-nls --with-arch=armv7-a
Thread model: posix
gcc version 5.3.0 (GCC)

2.2  MY-IMX6-A9 系列交叉编译工具链安装
执行安装
=====> Input:
./fsl-imx-fb-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.1.0.sh
=====> Output:
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)
=====> Input:
/opt/fsl-imx-fb-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.1.0
=====> Output:
You are about to install the SDK to "/opt/fsl-imx-fb-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.1.0". Proceed[Y/n]?
=====> Input:
y
=====> Output:
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-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.1.0/environment-setup-cortexa9hf-neon-poky-linux-gnueabi

source 工具链配置文件
=====> Input:
source /opt/fsl-imx-fb-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.1.0/environment-setup-cortexa9hf-neon-poky-linux-gnueabi

检验交叉编译工具安装
=====> Input:
$CC -v
=====> Output:
Using built-in specs.
COLLECT_GCC=arm-poky-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/opt/fsl-imx-fb-glibc-x86_64-meta-toolchain-qt5-cortexa9hf-neon-toolchain-4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.3.0/lto-wrapper
Target: arm-poky-linux-gnueabi
Configured with: ../../../../../../work-shared/gcc-5.3.0-r0/gcc-5.3.0/configure --build=x86_64-linux --host=x86_64-pokysdk-linux --target=arm-poky-linux-gnueabi --prefix=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr --exec_prefix=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr --bindir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi --sbindir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi --libexecdir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi --datadir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/share --sysconfdir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/etc --sharedstatedir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/com --localstatedir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/var --libdir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi --includedir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/include --oldincludedir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/include --infodir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/share/info --mandir=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/myzr/my-yocto/imx-4.1.15-2.1.0/imx6qdlsolo__fsl-imx-fb/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-poky-linux-gnueabi- --without-local-prefix --enable-lto --enable-libssp --enable-libitm --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-gxx-include-dir=/not/exist/usr/include/c++/5.3.0 --with-build-time-tools=/home/myzr/my-yocto/imx-4.1.15-2.1.0/imx6qdlsolo__fsl-imx-fb/tmp/sysroots/x86_64-linux/usr/arm-poky-linux-gnueabi/bin --with-sysroot=/not/exist --with-build-sysroot=/home/myzr/my-yocto/imx-4.1.15-2.1.0/imx6qdlsolo__fsl-imx-fb/tmp/sysroots/imx6qdlsolo --enable-poison-system-directories --with-mpfr=/home/myzr/my-yocto/imx-4.1.15-2.1.0/imx6qdlsolo__fsl-imx-fb/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --with-mpc=/home/myzr/my-yocto/imx-4.1.15-2.1.0/imx6qdlsolo__fsl-imx-fb/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --enable-nls --with-arch=armv7-a
Thread model: posix
gcc version 5.3.0 (GCC)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关于我们  -  服务条款  -  使用指南  -  站点地图  -  友情链接  -  联系我们
电子工程网 © 版权所有   京ICP备16069177号 | 京公网安备11010502021702
快速回复 返回顶部 返回列表