“MYZR-LS1012A-EK200 Linux-4.1.35 编译参考手册”的版本间的差异
来自明远智睿的wiki
第11行: | 第11行: | ||
<br> | <br> | ||
+ | |||
+ | ## **安装交叉编译工具链** | ||
+ | * 执行安装 | ||
+ | <pre> | ||
+ | =====> Input: | ||
+ | ./fsl-qoriq-glibc-x86_64-aarch64-toolchain-2.0.sh (不要安装到/opt目录) | ||
+ | |||
+ | =====> 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-qoriq/2.0/ | ||
+ | =====> Output: | ||
+ | You are about to install the SDK to "/home/myzr/my-work/03_toolchain/fsl-qoriq/2.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-qoriq/2.0/environment-setup-aarch64-fsl-linux | ||
+ | </pre> | ||
+ | * 修改配置文件 | ||
+ | <pre> | ||
+ | =====> Input: | ||
+ | echo "unset LDFLAGS" >> ~/my-work/03_toolchain/fsl-qoriq/2.0/environment-setup-aarch64-fsl-linux | ||
+ | </pre> | ||
+ | * source 工具链配置文件 | ||
+ | <pre> | ||
+ | =====> Input: | ||
+ | source /home/myzr/my-work/03_toolchain/fsl-qoriq/2.0/environment-setup-aarch64-fsl-linux | ||
+ | </pre> | ||
+ | * 检验交叉编译工具安装 | ||
+ | <pre> | ||
+ | =====> Input: | ||
+ | $CC -v | ||
+ | |||
+ | =====> Output: | ||
+ | Using built-in specs. | ||
+ | COLLECT_GCC=aarch64-fsl-linux-gcc | ||
+ | COLLECT_LTO_WRAPPER=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/libexec/aarch64-fsl-linux/gcc/aarch64-fsl-linux/4.9.3/lto-wrapper | ||
+ | Target: aarch64-fsl-linux | ||
+ | Configured with: /home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/work-shared/gcc-linaro-4.9-r2015.03/gcc-linaro-4.9-2015.03/configure --build=x86_64-linux --host=x86_64-fslsdk-linux --target=aarch64-fsl-linux --prefix=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr --exec_prefix=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr --bindir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/aarch64-fsl-linux --sbindir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/aarch64-fsl-linux --libexecdir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/libexec/aarch64-fsl-linux --datadir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/share --sysconfdir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/etc --sharedstatedir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/com --localstatedir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/var --libdir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/lib/aarch64-fsl-linux --includedir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/include --oldincludedir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/include --infodir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/share/info --mandir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/sysroots/x86_64-nativesdk-fslsdk-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=aarch64-fsl-linux- --without-local-prefix --enable-target-optspace --enable-lto --enable-libssp --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 --with-gxx-include-dir=/not/exist/usr/include/c++/4.9.3 --with-build-time-tools=/home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/sysroots/x86_64-linux/usr/aarch64-fsl-linux/bin --with-sysroot=/not/exist --with-build-sysroot=/home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/sysroots/ls1012ardb --enable-poison-system-directories --with-mpfr=/home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/sysroots/x86_64-nativesdk-fslsdk-linux --with-mpc=/home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/sysroots/x86_64-nativesdk-fslsdk-linux --enable-nls --enable-__cxa_atexit | ||
+ | Thread model: posix | ||
+ | gcc version 4.9.3 20150311 (prerelease) (Linaro GCC 4.9-2015.03) | ||
+ | </pre> |
2019年11月8日 (五) 10:09的版本
下载相关文件
交叉编译工具链
LS1012A系列:打开网盘到 2.3_OS_Linux-4.1.35 -> 03_toolchain,下载fsl-qoriq-glibc-x86_64-aarch64-toolchain-2.0.sh。
源码
rcw: 打开网盘到 2.3_OS_Linux-4.1.35 -> 02_source,下载 rcw.tar.bz2。
u-boot:打开网盘到 2.3_OS_Linux-4.1.35 -> 02_source,下载 u-boot-2016.09-*.tar.bz2。
Kernel:打开网盘到 2.3_OS_Linux-4.1.35 -> 02_source,下载 linux-4.1.35-*.tar.bz2。
ppa: 打开网盘到 2.3_OS_Linux-4.1.35 -> 02_source,下载 linux-4.1.35-*.tar.bz2。
安装交叉编译工具链
- 执行安装
=====> Input: ./fsl-qoriq-glibc-x86_64-aarch64-toolchain-2.0.sh (不要安装到/opt目录) =====> 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-qoriq/2.0/ =====> Output: You are about to install the SDK to "/home/myzr/my-work/03_toolchain/fsl-qoriq/2.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-qoriq/2.0/environment-setup-aarch64-fsl-linux
- 修改配置文件
=====> Input: echo "unset LDFLAGS" >> ~/my-work/03_toolchain/fsl-qoriq/2.0/environment-setup-aarch64-fsl-linux
- source 工具链配置文件
=====> Input: source /home/myzr/my-work/03_toolchain/fsl-qoriq/2.0/environment-setup-aarch64-fsl-linux
- 检验交叉编译工具安装
=====> Input: $CC -v =====> Output: Using built-in specs. COLLECT_GCC=aarch64-fsl-linux-gcc COLLECT_LTO_WRAPPER=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/libexec/aarch64-fsl-linux/gcc/aarch64-fsl-linux/4.9.3/lto-wrapper Target: aarch64-fsl-linux Configured with: /home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/work-shared/gcc-linaro-4.9-r2015.03/gcc-linaro-4.9-2015.03/configure --build=x86_64-linux --host=x86_64-fslsdk-linux --target=aarch64-fsl-linux --prefix=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr --exec_prefix=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr --bindir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/aarch64-fsl-linux --sbindir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/aarch64-fsl-linux --libexecdir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/libexec/aarch64-fsl-linux --datadir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/share --sysconfdir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/etc --sharedstatedir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/com --localstatedir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/var --libdir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/lib/aarch64-fsl-linux --includedir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/include --oldincludedir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/include --infodir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/share/info --mandir=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/sysroots/x86_64-nativesdk-fslsdk-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=aarch64-fsl-linux- --without-local-prefix --enable-target-optspace --enable-lto --enable-libssp --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 --with-gxx-include-dir=/not/exist/usr/include/c++/4.9.3 --with-build-time-tools=/home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/sysroots/x86_64-linux/usr/aarch64-fsl-linux/bin --with-sysroot=/not/exist --with-build-sysroot=/home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/sysroots/ls1012ardb --enable-poison-system-directories --with-mpfr=/home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/sysroots/x86_64-nativesdk-fslsdk-linux --with-mpc=/home/linyn/ls1012/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012ardb/tmp/sysroots/x86_64-nativesdk-fslsdk-linux --enable-nls --enable-__cxa_atexit Thread model: posix gcc version 4.9.3 20150311 (prerelease) (Linaro GCC 4.9-2015.03)