版本说明
- 操作系统:Ubuntu16.04 64 位版
- 交叉工具链:arm-poky-linux-gnueabi-gcc 5.3.0
- Bootloader 版本:u-boot-2016.03
- 内核版本:linux-4.1.15
- QT 版本:Qt 5.6.2
用户资料工具fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-neon-toolchain-4.1.15-2.0.0.sh将上述 shell 脚本拷贝到虚拟机任意目录(例如用户目录:/home/{username}/work)下,在该目录下执行:
$ sudo ./fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-neon-toolchain-4.1.15-2.0.0.sh[sudo] password for neo:Freescale i.MX Release Distro SDK installer version 4.1.15-2.0.0================================================================
Enter target directory for SDK (default: /opt/fsl-imx-x11/4.1.15-2.0.0):You are about to install the SDK to "/opt/fsl-imx-x11/4.1.15-2.0.0". Proceed[Y/n]?Extrac
ting SDK..................
命令行提示:Enter target directory for SDK (default: /opt/fsl-imx-x11/4.1.15-2.0.0),默认设置安装地址直接回车即可。命令行提示:You are about to install the SDK to "/opt/fsl-imx-x11/4.1.15-2.0.0". Proceed[Y/n]?,输入 Y 即可。
2.2设置环境变量执行下边命令,配置环境变量。注意:“.”后面有空格:. /opt/fsl-imx-x11/4.1.15-2.0.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabi检查编译器是否安装成功:
$ arm-poky-linux-gnueabi-gcc -v如果安装正常会打印出 gcc 的版本信息:Thread model: posixgcc version 5.3.0 (GCC)
2.3 编译在进行本章实验之前,已经搭建好交叉编译器环境,即交叉编译器安装成功。
编译 u-bootu-boot 暂不开源,请使用飞凌提供的 u-boot 文件所在路径如下:256M NAND 256M DDR 版本的 u-boot 位置:
用户资料Linux镜像u-boot-imx6ull14x14evk_nand.imx4G eMMC 512M DDR 版本的 u-boot 位置:
用户资料Linux镜像 u-boot-imx6ull14x14evk_emmc.imx4.3.2 编译 Linux-4.1.15将压缩包 ‘linux-4.1.15.tar.bz2’ 拷贝到你的 Ubuntu 工作目录下,解压缩:neo@ubuntu:~/work$ tar xvf linux-4.1.15.tar.bz2Linux4.1.15 源码位置: 用户资料Linux源码kernellinux-4.1.15.tar.bz2
编译内核 $ ./imx6ull_build.sharch/arm/configs/imx6ull_defconfig 为配置文件路径.tmp/image/zImage 为内核镜像路径。
.tmp/image/imx6ull-S-gpmi-1024x600c7.dtb 为生成的 NAND 的 dtb 文件所在路径。.tmp/image/imx6ull-S-emmc-1024x600c7.dtb 为生成的 eMMC 的 dtb 文件所在路径。.tmp/image/modules.tar.bz2 为生成的模块打包文件。
单独命令编译内核
$ make distclean
$ make imx6ull_defconfig
$ make zImage
$ make dtbs
$ make modules
`