准备源码及相关文件(prepare source code and relevant file)
源码文件(source code)评估板对应的Linux版本及对应的源码文件见下表:
The corresponding Linux version of the evaluation board and the corresponding source code files are shown in the table below:
评估板型号
(evaluation board model) | u-boot源码文件
(u-boot source code) | linux源码文件
(linux source code) |
MY-IMX6-EK200 | u-boot-2016.03__svn121.tar.xz | linux-4.1.15__svn189.tar.xz |
MY-IMX6-EK314 |
MY-IMX6-EK336 |
MY-IMX6-EK140 |
交叉编译工具文件(cross compiler tool file)Linux程序交叉编译工具:gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
Linux program cross compiler tool:gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar
Linux交叉编译工具配置文件:gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env
Linux cross compiler tool configuration file:gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env
创建工作目录(creat working directory)1)源码目录
source code directory
$ mkdir ~/my-imx6/02_source –p
2)工具目录
tool directory
$ mkdir ~/my-imx6/03_tools –p
3)镜像目录
image directory
$ mkdir ~/my-imx6/04_image –p
$ mkdir ~/my-imx6/04_image/image-linux-4115 –p
4)应用程序目录
application diretory
$ mkdir ~/my-demo
安装交叉编译工具链(install cross compiler tool chain)
安装Linux交叉编译工具链(install Linux cross compiler tool chain)1)进入交叉编译工具链目录
enter cross compiler tool chain diretory
$ cd ~/my-imx6/03_tools/
2)复制Linux交叉编译工具到目录
copy Linux cross compiler tool to directory
将gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar复制到“~/my-imx6/03_tools”,这一步自己采取相应的方式完成。
3)解压Linux交叉编译工具
copy gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar to“~/my-imx6/03_tools”,complete this step by yourself in a proper way。
$ tar xf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar
4)复制交叉编译工具配置文件
copy cross compiler tool configuration file
将gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env复制到“~/my-imx6/03_tools”,这一步自己采取相应的方式完成。
copy gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env to“~/my-imx6/03_tools”,complete this step by yourself in a proper way。
5)检查安装
check installation
$ source gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env
$ ${CROSS_COMPILE}gcc –v