[资料] 明远智睿MY-IMX6-EK140P L4115 编译手册

本文档提供了一套详细的指南,用于在Ubuntu 12.04.5 x86-64环境下搭建嵌入式Linux开发环境,并介绍了如何编译U-Boot、Linux内核、设备树以及应用程序等关键组件。

文档说明(document instruction)


系统环境说明(system environment instruction)

  • 编译主机CPU架构:64位

IF">CUP architeture of host used for compilation:64bit

  • 编译主机系统:Linux

system of host:Linux

  • Linux发行版:Ubuntu

Linux release version:Ubuntu

  • Ubuntu版本类型:服务器版

Ubuntu version type:server version

  • Ubuntu版本号:12.04.5

Ubuntu version no.:12.04.5

  • Ubuntu系统类型:x86-64

Ubuntu system type:x86-64
  注意:开发主机请使用ubuntu 12.04.5 x86-64(桌面版或服务器版均可),使用其他发行版的Linux或Ubuntu的其它版本可能会遇到的不必要的问题。 
  Note: The development host should use ubuntu 12.04.5 x86-64(desktop and server version are available),Using other distribution of Linux and other versions of Ubuntu may encounter unnecessary problems 


操作说明 (operation instruction)

1)文档中以“$”开头的行,其后是Linux命令。 
The line in the document which begins with “$”,which is followed by the Linux command.。 

2)文档中所有的Linux命令建议手动输入到Linux主机执行(直接复制、粘贴到Linux主机上执行,可能会执行失败)。 
All the Linux commands in the document are recommended to be entered into the host manually for execution.(Copying ,pasting to the host directly to execute may fail)。

3)文档中的Linux执行命令,如果空格后的下一个字符是“-”的(如:sudo apt-get –y install之类的),请手动输入到Linux主机执行(直接复制、粘贴到Linux主机上执行,通常会执行失败)。 
In all the Linux execution commands of the document,if the next character after the space is "-",(example:sudo apt-get –y install),please enter into Linux host to execute manually.(Copying ,pasting to the host directly to execute may fail ).)。

4)文档中所有一行没写完的Linux命令请手动输入到Linux主机执行,(因为复制、粘贴命令不能包含类似“换行符”之类的特殊字符)。 
any line of Linux commands whichi is not finished is recommended to be entered into the host for execution. (Because copy or paste commands cannot contain special character such as "line breaks")。)。

5)按文档输入并执行Linux命令时注意观察命令的执行结果与文档图片中的是否一致,以确认命令是否输入有误及是否执行失败。 
Note whether the execution result is consistent with the document image when you enter and execute the command. check the command was entered incorrectly or faiLED to execute.。

6)第一遍编译请严格按照文档进行,否则可能出现莫名其妙的错误。
Please follow the document strictly to compile for the first time.Otherwise ,there may be unexpected error。


截图说明(screenshots instruction)

为使视图看起来简洁整齐,截图中的命令提示符统一使用myzr$。
To make the view look neat and tidy , the command prompt in the screenshot should use myzr$ uniformly。


图片中的Linux命令(Linux command in the image)

在文档的图片中观察“myzr$”开头的行可以直观的看到输入的Linux命令。
In the image of the document, you can see the input Linux command visually from the lines that start with “myzr$”。


重要信息说明(important information instruction)

为避免各位客户在搭建开发环境及编译过程中遇到不必要的问题浪费时间和精力,推荐使用明远智睿发布的“vb43-u12045-serv-amd64”虚拟机系统。
To avoid our customers wasting time and energy when they encounter unnecessary problems in building development environment and compiling process,it is recommended to use “vb43-u12045-serv-amd64” virtual machine system released by MYZR。


具体参见 MYZR虚拟机系统指导(details refered to MYZR virtual machine system guidance)

准备源码及相关文件(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 yourse

明远智设备上进行基于 **i.MX8** 系列处理器的烧录操作,通常需要依赖官方提供的 **SDK** 或 **烧录工具链**,以及对应的 **硬件连接方式**。以下是一个通用的烧录流程,适用于大多数基于 **i.MX8** 的开发板,包括明远智的设备。 --- ### ### 烧录前准备 1. **硬件准备**: - 明远智 i.MX8 开发板 - USB 转 TTL 线(用于串口调试) - USB Type-C 数据线(用于连接主机和开发板的烧录接口) - 主机(运行 Linux 或 Windows 系统) 2. **软件准备**: - **烧录工具**:推荐使用 **NXP 官方的 MfgTools**,该工具支持 i.MX 系列芯片的烧录操作。 - **镜像文件**:包括 U-Boot、内核(Kernel)、设备树(Device Tree)以及根文件系统(Rootfs),通常打包为 `.imx` 或 `.sdcard` 格式。 - **串口工具**:如 `minicom`、`putty` 或 `SecureCRT`,用于查看启动日志和调试。 --- ### ### 烧录步骤(基于 MfgTools) 1. **连接设备**: - 将开发板通过 USB Type-C 接口连接到主机。 - 按住开发板上的 **Boot Mode** 按钮(通常是拨码开关或物理按键),进入 **USB Boot 模式**。 2. **启动 MfgTools 工具**: - 解压并运行 MfgTools 工具包。 - 在 `cfg.ini` 文件中配置对应的烧录脚本(如 `ucl2.xml`),确保其匹配 i.MX8 的芯片型号和存储类型(如 eMMC 或 NAND)。 3. **加载烧录脚本**: - 启动 MfgTools 后,点击 “Start” 按钮,工具会自动检测设备并开始烧录流程。 - 烧录脚本通常包含以下步骤: - 加载 Bootloader(如 `imx-boot`)到 SRAM 并运行; - 加载 U-Boot 到 DDR; - 使用 U-Boot 加载内核和设备树; - 将系统镜像写入 eMMC 或其他存储介质。 4. **烧录完成**: - 烧录完成后,断开 USB 连接并重启开发板。 - 使用串口工具连接开发板,确认系统启动正常。 --- ### ### 替代方法:使用命令行烧录(Linux 环境) 如果使用 Linux 系统进行烧录,可以采用以下方式: 1. **使用 dd 命令烧录 SD 卡镜像**: ```bash sudo dd if=image-file.sdcard of=/dev/sdX bs=1M ``` 其中,`image-file.sdcard` 是生成的镜像文件,`/dev/sdX` 是 SD 卡设备路径。 2. **使用 fastboot 烧录 eMMC**: ```bash fastboot flash bootloader imx-boot fastboot flash kernel Image fastboot flash dtb imx8mm-evk.dtb fastboot flash rootfs rootfs.ext4 fastboot reboot ``` --- ### ### 常见问题处理 - **设备未被识别**:检查 USB 驱动是否安装,或尝试更换 USB 线缆。 - **烧录失败**:确保烧录脚本与芯片型号匹配,并检查镜像文件是否完整。 - **启动失败**:使用串口工具查看启动日志,确认 Bootloader 是否加载成功。 --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值