Linux-4.14.98编译手册
下载源码
检查交叉编译工具链
如果还没有安装交叉工具链,请参考《Ubuntu16.04+Win7》安装开发环境及交叉编译工具链。
安装完成后,输入指令查看交差编译编译器版本。
source /opt/fsl-imx-xwayland/4.9.88-2.0.0/environment-setup-aarch64-poky-linux $CC -v
串口输出:
Using built-in specs. COLLECT_GCC=aarch64-poky-linux-gcc COLLECT_LTO_WRAPPER=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/7.3.0/lto-wrapper Target: aarch64-poky-linux Configured with: ../../../../../../work-shared/gcc-7.3.0-r0/gcc-7.3.0/configure --build=x86_64-linux --host=x86_64-pokysdk-linux --target=aarch64-poky-linux --prefix=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr --exec_prefix=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr --bindir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux --sbindir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux --libexecdir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux --datadir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr/share --sysconfdir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/etc --sharedstatedir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/com --localstatedir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/var --libdir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr/lib/aarch64-poky-linux --includedir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr/include --oldincludedir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr/include --infodir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr/share/info --mandir=/opt/fsl-imx-xwayland/4.9.88-2.0.0/sysroots/x86_64-pokysdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/duxy/linux_4.9.88_2.0.0/build-ori-wayland/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-aarch64/7.3.0-r0/recipe-sysroot --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-poky-linux- --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++/7.3.0 --with-build-time-tools=/home/duxy/linux_4.9.88_2.0.0/build-ori-wayland/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-aarch64/7.3.0-r0/recipe-sysroot-native/usr/aarch64-poky-linux/bin --with-sysroot=/not/exist --with-build-sysroot=/home/duxy/linux_4.9.88_2.0.0/build-ori-wayland/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-aarch64/7.3.0-r0/recipe-sysroot --without-long-double-128 --enable-poison-system-directories --with-mpfr=/home/duxy/linux_4.9.88_2.0.0/build-ori-wayland/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-aarch64/7.3.0-r0/recipe-sysroot --with-mpc=/home/duxy/linux_4.9.88_2.0.0/build-ori-wayland/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-aarch64/7.3.0-r0/recipe-sysroot --enable-nls --enable-initfini-array --enable-__cxa_atexit Thread model: posix gcc version 7.3.0 (GCC)
如果有如上的打印信息,说明交叉编译链安装成功。