“MY-IMX6-EK140P L4115 编译手册”的版本间的差异
(→重要信息说明) |
|||
第54行: | 第54行: | ||
!评估板型号 || u-boot源码文件 || linux源码文件 | !评估板型号 || u-boot源码文件 || linux源码文件 | ||
|- | |- | ||
− | |MY-IMX6-EK200 || rowspan= | + | |MY-IMX6-EK200 || rowspan=5|u-boot-2016.03.tar.xz || rowspan=5|linux-4.1.15.tar.xz |
|- | |- | ||
|MY-IMX6-EK314 | |MY-IMX6-EK314 | ||
第61行: | 第61行: | ||
|- | |- | ||
|MY-IMX6-EK140 | |MY-IMX6-EK140 | ||
+ | |- | ||
+ | |MY-IMX6-EK140P | ||
|} | |} | ||
第145行: | 第147行: | ||
− | === 配置u-boot | + | === 配置u-boot === |
* 评估板及对应的 u-boot 编译配置:<br> | * 评估板及对应的 u-boot 编译配置:<br> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | !评估板主型号 | + | !评估板主型号 || CPU类型-内存容量 || 处理器架构 || 对应的u-boot配置 |
|- | |- | ||
− | |rowspan= | + | |rowspan=12|MY-IMX6-EK200 |
− | | i.MX 6QuadPlus - 1G || Cortex-A9 || myimx6ek200- | + | |i.MX 6Quad - 1G || Cortex-A9 || myimx6ek200-6q-1g_defconfig |
+ | |- | ||
+ | |i.MX 6Quad - 2G || Cortex-A9 || myimx6ek200-6q-2g_defconfig | ||
+ | |- | ||
+ | |i.MX 6Quad - 512M || Cortex-A9 || myimx6ek200-6q-512m_defconfig | ||
+ | |- | ||
+ | |i.MX 6QuadPlus - 1G || Cortex-A9 || myimx6ek200-6qp-1g_defconfig | ||
|- | |- | ||
|i.MX 6QuadPlus - 2G || Cortex-A9 || myimx6ek200-6qp-2g_defconfig | |i.MX 6QuadPlus - 2G || Cortex-A9 || myimx6ek200-6qp-2g_defconfig | ||
|- | |- | ||
− | |i. | + | |i.MX 6QuadPlus - 512M || Cortex-A9 || myimx6ek200-6qp-512m_defconfig |
+ | |- | ||
+ | |i.MX 6Solo - 1G || Cortex-A9 || myimx6ek200-6s-1g_defconfig | ||
+ | |- | ||
+ | |i.MX 6Solo - 256M || Cortex-A9 || myimx6ek200-6s-256m_defconfig | ||
+ | |- | ||
+ | |i.MX 6Solo - 512M || Cortex-A9 || myimx6ek200-6s-512m_defconfig | ||
+ | |- | ||
+ | |i.MX 6DualLite - 1G || Cortex-A9 || myimx6ek200-6u-1g_defconfig | ||
+ | |- | ||
+ | |i.MX 6DualLite - 2G || Cortex-A9 || myimx6ek200-6u-2g_defconfig | ||
+ | |- | ||
+ | |i.MX 6DualLite - 512M || Cortex-A9 || myimx6ek200-6u-512m_defconfig | ||
+ | |- | ||
+ | |rowspan=12|MY-IMX6-EK314 | ||
+ | | i.MX 6Quad - 1G || Cortex-A9 || myimx6ek314-6q-1g_defconfig | ||
+ | |- | ||
+ | |i.MX 6Quad - 2G || Cortex-A9 || myimx6ek314-6q-2g_defconfig | ||
+ | |- | ||
+ | |i.MX 6Quad- 512M || Cortex-A9 || myimx6ek314-6q-512m_defconfig | ||
+ | |- | ||
+ | |i.MX 6QuadPlus - 1G || Cortex-A9 || myimx6ek314-6qp-1g_defconfig | ||
+ | |- | ||
+ | |i.MX 6QuadPlus - 2G || Cortex-A9 || myimx6ek314-6qp-2g_defconfig | ||
+ | |- | ||
+ | |i.MX 6QuadPlus - 512M || Cortex-A9 || myimx6ek314-6qp-512m_defconfig | ||
+ | |- | ||
+ | |i.MX 6Solo- 1G || Cortex-A9 || myimx6ek314-6s-1g_defconfig | ||
+ | |- | ||
+ | |i.MX 6Solo - 256M || Cortex-A9 || myimx6ek314-6s-256m_defconfig | ||
|- | |- | ||
− | |i. | + | |i.MX 6Solo - 512M || Cortex-A9 || myimx6ek314-6s-512m_defconfig |
|- | |- | ||
− | |i. | + | |i.MX 6DualLite - 1G || Cortex-A9 || myimx6ek314-6u-1g_defconfig |
|- | |- | ||
− | |i.MX | + | |i.MX 6DualLite - 2G || Cortex-A9 || myimx6ek314-6u-2g_defconfig |
|- | |- | ||
− | |i.MX | + | |i.MX 6DualLite - 512M || Cortex-A9 || myimx6ek314-6u-512m_defconfig |
+ | |- | ||
+ | |rowspan=3|MY-IMX6-EK336 | ||
+ | |i.MX 6Quad - 1G || Cortex-A9 || myimx6ek336-6q-1g_defconfig | ||
+ | |- | ||
+ | |i.MX 6Quad - 2G || Cortex-A9 || myimx6ek336-6q-2g_defconfig | ||
+ | |- | ||
+ | |i.MX 6Quad - 512M || Cortex-A9 || myimx6ek336-6q-512m_defconfig | ||
+ | |- | ||
+ | |rowspan=8|MY-IMX6-EK140 | ||
+ | |i.MX 6UltraLite -256M -eMMC || Cortex-A7 || myimx6ek140-6g-256m-emmc_defconfig | ||
|- | |- | ||
− | + | |i.MX 6UltraLite -256M -Nand || Cortex-A7 || myimx6ek140-6g-256m-nand_defconfig | |
− | | i.MX | ||
|- | |- | ||
− | |i.MX | + | |i.MX 6UltraLite - 512M -eMMC || Cortex-A7 || myimx6ek140-6g-512m-emmc_defconfig |
|- | |- | ||
− | |i. | + | |i.MX 6UltraLite - 512M -Nand || Cortex-A7 || myimx6ek140-6g-512m-nand_defconfig |
|- | |- | ||
− | |i. | + | |i.MX 6UlltraLite Full - 256M-eMMC|| Cortex-A7 || myimx6ek140-6y-256m-emmc_defconfig |
|- | |- | ||
− | |i. | + | |i.MX 6UlltraLite Full - 512M-Nand|| Cortex-A7 || myimx6ek140-6y-256m-nand_defconfig |
|- | |- | ||
− | + | |i.MX 6UlltraLite Full - 512M-eMMC|| Cortex-A7 || myimx6ek140-6y-512m-emmc_defconfig | |
− | |i.MX | ||
|- | |- | ||
− | |i.MX | + | |i.MX 6UlltraLite Full - 512M-Nand|| Cortex-A7 || myimx6ek140-6y-512m-nand_defconfig |
|- | |- | ||
− | |i. | + | |rowspan=8|MY-IMX6-EK140P |
+ | |i.MX 6UltraLite -256M -eMMC || Cortex-A7 || myimx6ek140p-6g-256m-emmc_defconfig | ||
|- | |- | ||
− | |i. | + | |i.MX 6UltraLite -256M -Nand || Cortex-A7 || myimx6ek140p-6g-256m-nand_defconfig |
|- | |- | ||
− | + | |i.MX 6UltraLite - 512M -eMMC || Cortex-A7 || myimx6ek140p-6g-512m-emmc_defconfig | |
− | |i.MX 6UltraLite- | ||
|- | |- | ||
− | |i.MX 6UltraLite-512M || Cortex-A7 || | + | |i.MX 6UltraLite - 512M -Nand || Cortex-A7 || myimx6ek140p-6g-512m-nand_defconfig |
|- | |- | ||
− | |i.MX | + | |i.MX 6ULL - 256M-eMMC|| Cortex-A7 || myimx6ek140p-6y-256m-emmc_defconfig |
|- | |- | ||
− | |i.MX | + | |i.MX 6ULL - 512M-Nand|| Cortex-A7 || myimx6ek140p-6y-256m-nand_defconfig |
|- | |- | ||
− | |i.MX | + | |i.MX 6ULL - 512M-eMMC|| Cortex-A7 || myimx6ek140p-6y-512m-emmc_defconfig |
|- | |- | ||
− | |i.MX | + | |i.MX 6ULL - 512M-Nand|| Cortex-A7 || myimx6ek140p-6y-512m-nand_defconfig |
|} | |} | ||
第227行: | 第272行: | ||
!u-boot配置 || 目标文件 | !u-boot配置 || 目标文件 | ||
|- | |- | ||
− | |myimx6ek200- | + | |myimx6ek200-6q-1g_defconfig || uboot-myimx6ek200-6q-1g.imx |
+ | |- | ||
+ | |myimx6ek200-6q-2g_defconfig ||uboot-myimx6ek200-6q-2g.imx | ||
+ | |- | ||
+ | |myimx6ek200-6q-512m_defconfig || uboot-myimx6ek200-6q-512m.imx | ||
+ | |- | ||
+ | |myimx6ek200-6qp-1g_defconfig || uboot-myimx6ek200-6qp-1g.imx | ||
|- | |- | ||
|myimx6ek200-6qp-2g_defconfig || uboot-myimx6ek200-6qp-2g.imx | |myimx6ek200-6qp-2g_defconfig || uboot-myimx6ek200-6qp-2g.imx | ||
|- | |- | ||
− | |myimx6ek200- | + | |myimx6ek200-6qp-512m_defconfig || uboot-myimx6ek200-6qp-512m.imx |
|- | |- | ||
− | |myimx6ek200- | + | |myimx6ek200-6s-1g_defconfig|| uboot-myimx6ek200-6s-1g.imx |
|- | |- | ||
− | |myimx6ek200- | + | |myimx6ek200-6s-256m_defconfig || uboot-myimx6ek200-6s-256m.imx |
|- | |- | ||
− | |myimx6ek200- | + | |myimx6ek200-6s-512m_defconfig|| uboot-myimx6ek200-6s-512m.imx |
|- | |- | ||
− | |myimx6ek200- | + | |myimx6ek200-6u-1g_defconfig || uboot-myimx6ek200-6u-1g.imx |
+ | |- | ||
+ | |myimx6ek200-6u-2g_defconfig || uboot-myimx6ek200-6u-2g.imx | ||
+ | |- | ||
+ | |myimx6ek200-6u-512m_defconfig || uboot-myimx6ek200-6u-512m.imx | ||
|- | |- | ||
|colspan=2| | |colspan=2| | ||
|- | |- | ||
− | |myimx6ek314- | + | |myimx6ek314-6q-1g_defconfig || uboot-myimx6ek314-6q-1g.imx |
+ | |- | ||
+ | |myimx6ek314-6q-2g_defconfig || uboot-myimx6ek314-6q-2g.imx | ||
+ | |- | ||
+ | |myimx6ek314-6q-512m_defconfig || uboot-myimx6ek314-6q-512m.imx | ||
+ | |- | ||
+ | |myimx6ek314-6qp-1g_defconfig || uboot-myimx6ek314-6qp-1g.imx | ||
|- | |- | ||
|myimx6ek314-6qp-2g_defconfig || uboot-myimx6ek314-6qp-2g.imx | |myimx6ek314-6qp-2g_defconfig || uboot-myimx6ek314-6qp-2g.imx | ||
|- | |- | ||
− | |myimx6ek314- | + | |myimx6ek314-6qp-512m_defconfig|| uboot-myimx6ek314-6qp-512m.imx |
+ | |- | ||
+ | |myimx6ek314-6s-1g_defconfig || uboot-myimx6ek314-6s-1g.imx | ||
|- | |- | ||
− | |myimx6ek314-6q-2g_defconfig || uboot- | + | |myimx6ek314-6s-256m_defconfig|| uboot-myimx6ek314-6s-256m.imx |
+ | |- | ||
+ | |myimx6ek314-6s-512m_defconfig|| uboot-myimx6ek314-6s-512m.imx | ||
+ | |- | ||
+ | |myimx6ek314-6u-1g_defconfig || uboot-myimx6ek314-6u-1g.imx | ||
+ | |- | ||
+ | |myimx6ek314-6u-2g_defconfig|| uboot-myimx6ek314-6u-2g.imx | ||
+ | |- | ||
+ | |myimx6ek314-6u-512m_defconfig || uboot-myimx6ek314-6u-512m.imx | ||
+ | |- | ||
+ | |colspan=2| | ||
+ | |- | ||
+ | |myimx6ek336-6q-1g_defconfig || uboot-myimx6ek336-6q-1g.imx | ||
+ | |- | ||
+ | |myimx6ek336-6q-2g_defconfig || uboot-myimx6ek336-6q-2g.imx | ||
|- | |- | ||
− | | | + | |myimx6ek336-6q-512m_defconfig || uboot-myimx6ek336-6q-512m.imx |
|- | |- | ||
|colspan=2| | |colspan=2| | ||
|- | |- | ||
− | | | + | |myimx6ek140-6g-256m-emmc_defconfig || uboot-myimx6ek140-6g-256m-emmc.imx |
+ | |- | ||
+ | |myimx6ek140-6g-256m-nand_defconfig || uboot-myimx6ek140-6g-256m-nand.imx | ||
|- | |- | ||
− | | | + | |myimx6ek140-6g-512m-emmc_defconfig || uboot-myimx6ek140-6g-512m-emmc.imx |
|- | |- | ||
− | | | + | |myimx6ek140-6g-512m-nand_defconfig || uboot-myimx6ek140-6g-512m-nand.imx |
|- | |- | ||
− | | | + | |myimx6ek140-6y-256m-emmc_defconfig || uboot-myimx6ek140-6y-256m-emmc.imx |
+ | |- | ||
+ | |myimx6ek140-6y-256m-nand_defconfig || uboot-myimx6ek140-6y-256m-nand.imx | ||
+ | |- | ||
+ | |myimx6ek140-6y-512m-emmc_defconfig || uboot-myimx6ek140-6y-512m-emmc.imx | ||
+ | |- | ||
+ | |myimx6ek140-6y-512m-nand_defconfig || uboot-myimx6ek140-6y-512m-nand.imx | ||
|- | |- | ||
|colspan=2| | |colspan=2| | ||
|- | |- | ||
− | | | + | |myimx6ek140p-6g-256m-emmc_defconfig || uboot-myimx6ek140p-6g-256m-emmc.imx |
|- | |- | ||
− | | | + | |myimx6ek140p-6g-256m-nand_defconfig || uboot-myimx6ek140p-6g-256m-nand.imx |
|- | |- | ||
− | |myimx6ek140p- | + | |myimx6ek140p-6g-512m-emmc_defconfig || uboot-myimx6ek140p-6g-512m-emmc.imx |
|- | |- | ||
− | |myimx6ek140p-6g- | + | |myimx6ek140p-6g-512m-nand_defconfig || uboot-myimx6ek140p-6g-512m-nand.imx |
|- | |- | ||
− | |myimx6ek140p- | + | |myimx6ek140p-6y-256m-emmc_defconfig || uboot-myimx6ek140p-6y-256m-emmc.imx |
|- | |- | ||
− | |myimx6ek140p-6y- | + | |myimx6ek140p-6y-256m-nand_defconfig || uboot-myimx6ek140p-6y-256m-nand.imx |
+ | |- | ||
+ | |myimx6ek140p-6y-512m-emmc_defconfig || uboot-myimx6ek140p-6y-512m-emmc.imx | ||
+ | |- | ||
+ | |myimx6ek140p-6y-512m-nand_defconfig|| uboot-myimx6ek140p-6y-512m-nand.imx | ||
|} | |} | ||
第325行: | 第414行: | ||
|MY-IMX6-EK336 | |MY-IMX6-EK336 | ||
|- | |- | ||
− | |MY-IMX6-EK140 || myimx6a7_defconfig | + | |MY-IMX6-EK140 || rowspan=2|myimx6a7_defconfig |
+ | |- | ||
+ | |MY-IMX6-EK140P | ||
|} | |} | ||
$ make myimx6a9_defconfig <br> | $ make myimx6a9_defconfig <br> | ||
第360行: | 第451行: | ||
! 评估板主型号 || CPU类型-内存容量 || 对应的设备树文件 | ! 评估板主型号 || CPU类型-内存容量 || 对应的设备树文件 | ||
|- | |- | ||
− | |rowspan= | + | |rowspan=12|MY-IMX6-EK200 |
− | | i.MX | + | | i.MX 6Quad - 1G || myimx6ek200-6q-1g.dtb |
|- | |- | ||
− | | i.MX | + | | i.MX 6Quad - 2G || myimx6ek200-6q-2g.dtb |
|- | |- | ||
− | | i. | + | | i.MX 6Quad - 512M || myimx6ek200-6q-512m.dtb |
|- | |- | ||
− | | i. | + | | i.MX 6QuadPlus - 1G || myimx6ek200-6qp-1g.dtb |
|- | |- | ||
− | | i. | + | | i.MX 6DualLite - 2G || myimx6ek200-6qp-2g.dtb |
|- | |- | ||
− | | i.MX | + | | i.MX 6DualLite - 512M || myimx6ek200-6qp-512m.dtb |
|- | |- | ||
| i.MX 6Solo - 1G || myimx6ek200-6s-1g.dtb | | i.MX 6Solo - 1G || myimx6ek200-6s-1g.dtb | ||
|- | |- | ||
− | + | | i.MX 6Solo - 256M || myimx6ek200-6s-256m.dtb | |
− | | i.MX | ||
|- | |- | ||
− | | i.MX | + | | i.MX 6Solo - 512M || myimx6ek200-6s-512m.dtb |
|- | |- | ||
− | | i. | + | | i.MX 6DualLite - 1G || myimx6ek200-6u-1g.dtb |
|- | |- | ||
− | | i. | + | | i.MX 6DualLite - 2G || myimx6ek200-6u-2g.dtb |
|- | |- | ||
− | | i. | + | | i.MX 6DualLite - 512M || myimx6ek200-6u-512m.dtb |
|- | |- | ||
− | |rowspan= | + | |rowspan=12|MY-IMX6-EK314 |
− | | i.MX | + | | i.MX 6Quad - 1G || myimx6ek314-6q-1g.dtb |
|- | |- | ||
− | | i.MX | + | | i.MX 6Quad - 2G || myimx6ek314-6q-2g.dtb |
|- | |- | ||
− | | i. | + | | i.MX 6Quad - 512M || myimx6ek314-6q-512m.dtb |
|- | |- | ||
− | | i. | + | | i.MX 6QuadPlus - 1G || myimx6ek314-6qp-1g.dtb |
|- | |- | ||
− | + | | i.MX 6DualLite - 2G || myimx6ek314-6qp-2g.dtb | |
− | | i.MX | ||
|- | |- | ||
− | | i.MX | + | | i.MX 6DualLite - 512M || myimx6ek314-6qp-512m.dtb |
|- | |- | ||
− | | i.MX | + | | i.MX 6Solo - 1G || myimx6ek314-6s-1g.dtb |
|- | |- | ||
− | | i.MX | + | | i.MX 6Solo - 256M || myimx6ek314-6s-256m.dtb |
|- | |- | ||
− | | i.MX | + | | i.MX 6Solo - 512M|| myimx6ek314-6s-512m.dtb |
|- | |- | ||
− | | i.MX | + | | i.MX 6DualLite - 1G || myimx6ek314-6u-1g.dtb |
|- | |- | ||
− | | i.MX | + | | i.MX 6DualLite - 2G || myimx6ek314-6u-2g.dtb |
|- | |- | ||
− | | i.MX | + | | i.MX 6DualLite - 512M || myimx6ek314-6u-512m.dtb |
|- | |- | ||
− | | i.MX | + | |rowspan=3|MY-IMX6-EK336 |
+ | | i.MX 6Quad - 1G || myimx6ek336-6q-1g.dtb | ||
|- | |- | ||
− | | i.MX | + | | i.MX 6Quad - 2G || myimx6ek336-6q-2g.dtb |
+ | |- | ||
+ | | i.MX 6Quad - 512M || myimx6ek336-6q-512m.dtb | ||
+ | |- | ||
+ | |rowspan=8|MY-IMX6-EK140 | ||
+ | | i.MX 6UltraLite - 256M -eMMC || myimx6ek140-6g-256m-emmc.dtb | ||
+ | |- | ||
+ | | i.MX 6UltraLite - 256M -Nand || myimx6ek140-6g-256m-nand.dtb | ||
+ | |- | ||
+ | | i.MX 6UltraLite - 512M -eMMC || myimx6ek140-6g-512m-emmc.dtb | ||
+ | |- | ||
+ | | i.MX 6UltraLite - 512M -Nand|| myimx6ek140-6g-512m-nand.dtb | ||
+ | |- | ||
+ | | i.MX 6ULL - 256M -eMMC || myimx6ek140-6y-256m-emmc.dtb | ||
+ | |- | ||
+ | | i.MX 6ULL - 256M -Nand || myimx6ek140-6y-256m-nand.dtb | ||
+ | |- | ||
+ | | i.MX 6ULL - 512M -eMMC ||myimx6ek140-6y-512m-emmc.dtb | ||
+ | |- | ||
+ | | i.MX 6ULL - 512M -Nand|| myimx6ek140-6y-512m-nand.dtb | ||
+ | |- | ||
+ | |rowspan=8|MY-IMX6-EK140P | ||
+ | | i.MX 6UltraLite - 256M -eMMC || myimx6ek140p-6g-256m-emmc.dtb | ||
+ | |- | ||
+ | | i.MX 6UltraLite - 256M -Nand || myimx6ek140p-6g-256m-nand.dtb | ||
+ | |- | ||
+ | | i.MX 6UltraLite - 512M -eMMC || myimx6ek140p-6g-512m-emmc.dtb | ||
+ | |- | ||
+ | | i.MX 6UltraLite - 512M -Nand|| myimx6ek140p-6g-512m-nand.dtb | ||
+ | |- | ||
+ | | i.MX 6ULL - 256M -eMMC || myimx6ek140p-6y-256m-emmc.dtb | ||
+ | |- | ||
+ | | i.MX 6ULL - 256M -Nand || myimx6ek140p-6y-256m-nand.dtb | ||
+ | |- | ||
+ | | i.MX 6ULL - 512M -eMMC || myimx6ek140p-6y-512m-emmc.dtb | ||
+ | |- | ||
+ | | i.MX 6ULL - 512M -Nand|| myimx6ek140p-6y-512m-nand.dtb | ||
|} | |} | ||
第455行: | 第581行: | ||
|MY-IMX6-EK336 | |MY-IMX6-EK336 | ||
|- | |- | ||
− | |MY-IMX6-EK140 || kernel-modules-myimx6a7.tar.bz2 | + | |MY-IMX6-EK140 ||rowspan=2| kernel-modules-myimx6a7.tar.bz2 |
+ | |- | ||
+ | |MY-IMX6-EK140P | ||
|} | |} | ||
$ cp ../modules.tar.bz2 ~/my-imx6/04_image/image-linux-4115/kernel-modules-myimx6a9.tar.bz2<br> | $ cp ../modules.tar.bz2 ~/my-imx6/04_image/image-linux-4115/kernel-modules-myimx6a9.tar.bz2<br> | ||
− | 注意:如果是编译内核时配置文件使用的是 myimx6a9_defconfig,在这里要把 modules.tar.bz2 复制为 kernel-modules-myimx6a9.tar. | + | 注意:如果是编译内核时配置文件使用的是 myimx6a9_defconfig,在这里要把 modules.tar.bz2 复制为 kernel-modules-myimx6a9.tar.bz2;<br> |
+ | 如果是编译内核时配置文件使用的是 myimx6a7_defconfig,在这里要把 modules.tar.bz2 复制为 kernel-modules-myimx6a7.tar.bz2<br> | ||
2018年10月23日 (二) 12:44的最新版本
文档说明
系统环境说明
- 编译主机CPU架构:64位
- 编译主机系统:Linux
- Linux发行版:Ubuntu
- Ubuntu版本类型:服务器版
- Ubuntu版本号:12.04.5
- Ubuntu系统类型:x86-64
注意:开发主机请使用ubuntu 12.04.5 x86-64(桌面版或服务器版均可),使用其他发行版的Linux或Ubuntu的其它版本可能会遇到的不必要的问题。
操作说明
1)文档中以“$”开头的行,其后是Linux命令。
2)文档中所有的Linux命令建议手动输入到Linux主机执行(直接复制、粘贴到Linux主机上执行,可能会执行失败)。
3)文档中的Linux执行命令,如果空格后的下一个字符是“-”的(如:sudo apt-get –y install之类的),请手动输入到Linux主机执行(直接复制、粘贴到Linux主机上执行,通常会执行失败)。
4)文档中所有一行没写完的Linux命令请手动输入到Linux主机执行,(因为复制、粘贴命令不能包含类似“换行符”之类的特殊字符)。
5)按文档输入并执行Linux命令时注意观察命令的执行结果与文档图片中的是否一致,以确认命令是否输入有误及是否执行失败。
6)第一遍编译请严格按照文档进行,否则可能出现莫名其妙的错误。
截图说明
为使视图看起来简洁整齐,截图中的命令提示符统一使用myzr$。
图片中的Linux命令
在文档的图片中观察“myzr$”开头的行可以直观的看到输入的Linux命令。
重要信息说明
为避免各位客户在搭建开发环境及编译过程中遇到不必要的问题浪费时间和精力,推荐使用明远智睿发布的“vb43-u12045-serv-amd64”虚拟机系统。
具体参见 《MYZR虚拟机系统指导》
准备源码及相关文件
源码文件
评估板对应的Linux版本及对应的源码文件见下表:
评估板型号 | u-boot源码文件 | linux源码文件 |
---|---|---|
MY-IMX6-EK200 | u-boot-2016.03.tar.xz | linux-4.1.15.tar.xz |
MY-IMX6-EK314 | ||
MY-IMX6-EK336 | ||
MY-IMX6-EK140 | ||
MY-IMX6-EK140P |
交叉编译工具文件
Linux程序交叉编译工具:gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz
Linux交叉编译工具配置文件:gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env
创建工作目录
1)源码目录
$ mkdir ~/my-imx6/02_source –p
2)工具目录
$ mkdir ~/my-imx6/03_tools –p
3)镜像目录
$ mkdir ~/my-imx6/04_image –p
$ mkdir ~/my-imx6/04_image/image-linux-4115 –p
安装交叉编译工具链
安装Linux交叉编译工具链
1)进入交叉编译工具链目录
$ cd ~/my-imx6/03_tools/
2)复制Linux交叉编译工具到目录
将gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar复制到“~/my-imx6/03_tools”,这一步自己采取相应的方式完成。
3)解压Linux交叉编译工具
$ tar xf gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar
4)复制交叉编译工具配置文件
将gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env复制到“~/my-imx6/03_tools”,这一步自己采取相应的方式完成。
5)检查安装
$ source gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env
$ ${CROSS_COMPILE}gcc –v
U-Boot编译
准备编译
复制源码包到开发主机中
将下载的“u-boot源码”复制到Linux开发主机的“~/my-imx6/02_source”。
这一步自己采取相应的方式完成。
解压u-boot源码包
$ cd ~/my-imx6/02_source/
$ tar xf u-boot-2016.03__svn121.tar.xz
编译
使编译配置文件生效
$ source ~/my-imx6/03_tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env
进入u-boot源码目录
$ cd ~/my-imx6/02_source/u-boot-2016.03
清除u-boot临时文件
配置u-boot
- 评估板及对应的 u-boot 编译配置:
评估板主型号 | CPU类型-内存容量 | 处理器架构 | 对应的u-boot配置 |
---|---|---|---|
MY-IMX6-EK200 | i.MX 6Quad - 1G | Cortex-A9 | myimx6ek200-6q-1g_defconfig |
i.MX 6Quad - 2G | Cortex-A9 | myimx6ek200-6q-2g_defconfig | |
i.MX 6Quad - 512M | Cortex-A9 | myimx6ek200-6q-512m_defconfig | |
i.MX 6QuadPlus - 1G | Cortex-A9 | myimx6ek200-6qp-1g_defconfig | |
i.MX 6QuadPlus - 2G | Cortex-A9 | myimx6ek200-6qp-2g_defconfig | |
i.MX 6QuadPlus - 512M | Cortex-A9 | myimx6ek200-6qp-512m_defconfig | |
i.MX 6Solo - 1G | Cortex-A9 | myimx6ek200-6s-1g_defconfig | |
i.MX 6Solo - 256M | Cortex-A9 | myimx6ek200-6s-256m_defconfig | |
i.MX 6Solo - 512M | Cortex-A9 | myimx6ek200-6s-512m_defconfig | |
i.MX 6DualLite - 1G | Cortex-A9 | myimx6ek200-6u-1g_defconfig | |
i.MX 6DualLite - 2G | Cortex-A9 | myimx6ek200-6u-2g_defconfig | |
i.MX 6DualLite - 512M | Cortex-A9 | myimx6ek200-6u-512m_defconfig | |
MY-IMX6-EK314 | i.MX 6Quad - 1G | Cortex-A9 | myimx6ek314-6q-1g_defconfig |
i.MX 6Quad - 2G | Cortex-A9 | myimx6ek314-6q-2g_defconfig | |
i.MX 6Quad- 512M | Cortex-A9 | myimx6ek314-6q-512m_defconfig | |
i.MX 6QuadPlus - 1G | Cortex-A9 | myimx6ek314-6qp-1g_defconfig | |
i.MX 6QuadPlus - 2G | Cortex-A9 | myimx6ek314-6qp-2g_defconfig | |
i.MX 6QuadPlus - 512M | Cortex-A9 | myimx6ek314-6qp-512m_defconfig | |
i.MX 6Solo- 1G | Cortex-A9 | myimx6ek314-6s-1g_defconfig | |
i.MX 6Solo - 256M | Cortex-A9 | myimx6ek314-6s-256m_defconfig | |
i.MX 6Solo - 512M | Cortex-A9 | myimx6ek314-6s-512m_defconfig | |
i.MX 6DualLite - 1G | Cortex-A9 | myimx6ek314-6u-1g_defconfig | |
i.MX 6DualLite - 2G | Cortex-A9 | myimx6ek314-6u-2g_defconfig | |
i.MX 6DualLite - 512M | Cortex-A9 | myimx6ek314-6u-512m_defconfig | |
MY-IMX6-EK336 | i.MX 6Quad - 1G | Cortex-A9 | myimx6ek336-6q-1g_defconfig |
i.MX 6Quad - 2G | Cortex-A9 | myimx6ek336-6q-2g_defconfig | |
i.MX 6Quad - 512M | Cortex-A9 | myimx6ek336-6q-512m_defconfig | |
MY-IMX6-EK140 | i.MX 6UltraLite -256M -eMMC | Cortex-A7 | myimx6ek140-6g-256m-emmc_defconfig |
i.MX 6UltraLite -256M -Nand | Cortex-A7 | myimx6ek140-6g-256m-nand_defconfig | |
i.MX 6UltraLite - 512M -eMMC | Cortex-A7 | myimx6ek140-6g-512m-emmc_defconfig | |
i.MX 6UltraLite - 512M -Nand | Cortex-A7 | myimx6ek140-6g-512m-nand_defconfig | |
i.MX 6UlltraLite Full - 256M-eMMC | Cortex-A7 | myimx6ek140-6y-256m-emmc_defconfig | |
i.MX 6UlltraLite Full - 512M-Nand | Cortex-A7 | myimx6ek140-6y-256m-nand_defconfig | |
i.MX 6UlltraLite Full - 512M-eMMC | Cortex-A7 | myimx6ek140-6y-512m-emmc_defconfig | |
i.MX 6UlltraLite Full - 512M-Nand | Cortex-A7 | myimx6ek140-6y-512m-nand_defconfig | |
MY-IMX6-EK140P | i.MX 6UltraLite -256M -eMMC | Cortex-A7 | myimx6ek140p-6g-256m-emmc_defconfig |
i.MX 6UltraLite -256M -Nand | Cortex-A7 | myimx6ek140p-6g-256m-nand_defconfig | |
i.MX 6UltraLite - 512M -eMMC | Cortex-A7 | myimx6ek140p-6g-512m-emmc_defconfig | |
i.MX 6UltraLite - 512M -Nand | Cortex-A7 | myimx6ek140p-6g-512m-nand_defconfig | |
i.MX 6ULL - 256M-eMMC | Cortex-A7 | myimx6ek140p-6y-256m-emmc_defconfig | |
i.MX 6ULL - 512M-Nand | Cortex-A7 | myimx6ek140p-6y-256m-nand_defconfig | |
i.MX 6ULL - 512M-eMMC | Cortex-A7 | myimx6ek140p-6y-512m-emmc_defconfig | |
i.MX 6ULL - 512M-Nand | Cortex-A7 | myimx6ek140p-6y-512m-nand_defconfig |
- MYIMX6EK200-6Q-1G配置示例:
$ make myimx6ek200-6q_defconfig
执行编译
$ make
提示:这里为了提高编译速度,在make后面加了“-j4”。这里编译的Linux主机是双核4线程的,所以“-j”后面用了4,也就是采用4线程编译。“-j”后面的数字可以根据系统资源分配,但是不应该超过编译主机最大支持的线程数。
- 编译完成
目标文件
- 编译文件
编译完成后通过ls命令即可看到编译得到的文件u-boot.imx
$ ls
- 目标文件
MY-IMX6系列评估板的u-boot配置对应的目标文件名见下表:
u-boot配置 | 目标文件 |
---|---|
myimx6ek200-6q-1g_defconfig | uboot-myimx6ek200-6q-1g.imx |
myimx6ek200-6q-2g_defconfig | uboot-myimx6ek200-6q-2g.imx |
myimx6ek200-6q-512m_defconfig | uboot-myimx6ek200-6q-512m.imx |
myimx6ek200-6qp-1g_defconfig | uboot-myimx6ek200-6qp-1g.imx |
myimx6ek200-6qp-2g_defconfig | uboot-myimx6ek200-6qp-2g.imx |
myimx6ek200-6qp-512m_defconfig | uboot-myimx6ek200-6qp-512m.imx |
myimx6ek200-6s-1g_defconfig | uboot-myimx6ek200-6s-1g.imx |
myimx6ek200-6s-256m_defconfig | uboot-myimx6ek200-6s-256m.imx |
myimx6ek200-6s-512m_defconfig | uboot-myimx6ek200-6s-512m.imx |
myimx6ek200-6u-1g_defconfig | uboot-myimx6ek200-6u-1g.imx |
myimx6ek200-6u-2g_defconfig | uboot-myimx6ek200-6u-2g.imx |
myimx6ek200-6u-512m_defconfig | uboot-myimx6ek200-6u-512m.imx |
myimx6ek314-6q-1g_defconfig | uboot-myimx6ek314-6q-1g.imx |
myimx6ek314-6q-2g_defconfig | uboot-myimx6ek314-6q-2g.imx |
myimx6ek314-6q-512m_defconfig | uboot-myimx6ek314-6q-512m.imx |
myimx6ek314-6qp-1g_defconfig | uboot-myimx6ek314-6qp-1g.imx |
myimx6ek314-6qp-2g_defconfig | uboot-myimx6ek314-6qp-2g.imx |
myimx6ek314-6qp-512m_defconfig | uboot-myimx6ek314-6qp-512m.imx |
myimx6ek314-6s-1g_defconfig | uboot-myimx6ek314-6s-1g.imx |
myimx6ek314-6s-256m_defconfig | uboot-myimx6ek314-6s-256m.imx |
myimx6ek314-6s-512m_defconfig | uboot-myimx6ek314-6s-512m.imx |
myimx6ek314-6u-1g_defconfig | uboot-myimx6ek314-6u-1g.imx |
myimx6ek314-6u-2g_defconfig | uboot-myimx6ek314-6u-2g.imx |
myimx6ek314-6u-512m_defconfig | uboot-myimx6ek314-6u-512m.imx |
myimx6ek336-6q-1g_defconfig | uboot-myimx6ek336-6q-1g.imx |
myimx6ek336-6q-2g_defconfig | uboot-myimx6ek336-6q-2g.imx |
myimx6ek336-6q-512m_defconfig | uboot-myimx6ek336-6q-512m.imx |
myimx6ek140-6g-256m-emmc_defconfig | uboot-myimx6ek140-6g-256m-emmc.imx |
myimx6ek140-6g-256m-nand_defconfig | uboot-myimx6ek140-6g-256m-nand.imx |
myimx6ek140-6g-512m-emmc_defconfig | uboot-myimx6ek140-6g-512m-emmc.imx |
myimx6ek140-6g-512m-nand_defconfig | uboot-myimx6ek140-6g-512m-nand.imx |
myimx6ek140-6y-256m-emmc_defconfig | uboot-myimx6ek140-6y-256m-emmc.imx |
myimx6ek140-6y-256m-nand_defconfig | uboot-myimx6ek140-6y-256m-nand.imx |
myimx6ek140-6y-512m-emmc_defconfig | uboot-myimx6ek140-6y-512m-emmc.imx |
myimx6ek140-6y-512m-nand_defconfig | uboot-myimx6ek140-6y-512m-nand.imx |
myimx6ek140p-6g-256m-emmc_defconfig | uboot-myimx6ek140p-6g-256m-emmc.imx |
myimx6ek140p-6g-256m-nand_defconfig | uboot-myimx6ek140p-6g-256m-nand.imx |
myimx6ek140p-6g-512m-emmc_defconfig | uboot-myimx6ek140p-6g-512m-emmc.imx |
myimx6ek140p-6g-512m-nand_defconfig | uboot-myimx6ek140p-6g-512m-nand.imx |
myimx6ek140p-6y-256m-emmc_defconfig | uboot-myimx6ek140p-6y-256m-emmc.imx |
myimx6ek140p-6y-256m-nand_defconfig | uboot-myimx6ek140p-6y-256m-nand.imx |
myimx6ek140p-6y-512m-emmc_defconfig | uboot-myimx6ek140p-6y-512m-emmc.imx |
myimx6ek140p-6y-512m-nand_defconfig | uboot-myimx6ek140p-6y-512m-nand.imx |
我们需要将编译得到的u-boot.imx复制为我们的目标文件名。
这里以MY-IMX6-EK200-6Q为例(把配置myimx6ek200-6q_defconfig编译生成的u-boot.imx复制为目标文件):
$ cp u-boot.imx ~/my-imx6/04_image/image-linux-4115/uboot-myimx6ek200-6q.imx
编译内核
准备编译
复制源码包到开发主机中
将下载的“linux源码”复制到Linux开发主机的“~/my-imx6/02_source”。
这一步自己采取相应的方式完成。
解压linux源码包
$ cd ~/my-imx6/02_source/
$ tar xf linux-4.1.15__svn189.tar.xz
内核编译配置
使编译配置文件生效
$ source ~/my-imx6/03_tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env
清除内核临时文件
- 进入linux源码目录
$ cd ~/my-imx6/02_source/linux-4.1.15
- 清除临时文件
内核配置
- 内核配置文件
评估板型号 | 配置文件 |
---|---|
MY-IMX6-EK200 | myimx6a9_defconfig |
MY-IMX6-EK314 | |
MY-IMX6-EK336 | |
MY-IMX6-EK140 | myimx6a7_defconfig |
MY-IMX6-EK140P |
$ make myimx6a9_defconfig
如果是编译 MY-IMX6-EK140 的内核,请使用 $ make myimx6a7_defconfig
这里以 myimx6a9_defconfig 为例。
编译内核
- 执行编译
- 编译完成
- 目标文件
arch/arm/boot/zImage即为编译得到的内核文件,使用ls命令可查看文件信息。
$ ls arch/arm/boot/zImage -la
注意:我们烧录及启动的内核文件名为“zImage-myimx6a9”或“zImage-myimx6a7”,所以我们需要把zImage复制为zImage-myimx6a9或zImage-myimx6a7。
$ cp arch/arm/boot/zImage ~/my-imx6/04_image/image-linux-4115/zImage-myimx6a9 (A9)
或
$ cp arch/arm/boot/zImage ~/my-imx6/04_image/image-linux-4115/zImage-myimx6a7 (A7)
编译设备树
评估板型号规格与设备树文件对应关系见下表:
评估板主型号 | CPU类型-内存容量 | 对应的设备树文件 |
---|---|---|
MY-IMX6-EK200 | i.MX 6Quad - 1G | myimx6ek200-6q-1g.dtb |
i.MX 6Quad - 2G | myimx6ek200-6q-2g.dtb | |
i.MX 6Quad - 512M | myimx6ek200-6q-512m.dtb | |
i.MX 6QuadPlus - 1G | myimx6ek200-6qp-1g.dtb | |
i.MX 6DualLite - 2G | myimx6ek200-6qp-2g.dtb | |
i.MX 6DualLite - 512M | myimx6ek200-6qp-512m.dtb | |
i.MX 6Solo - 1G | myimx6ek200-6s-1g.dtb | |
i.MX 6Solo - 256M | myimx6ek200-6s-256m.dtb | |
i.MX 6Solo - 512M | myimx6ek200-6s-512m.dtb | |
i.MX 6DualLite - 1G | myimx6ek200-6u-1g.dtb | |
i.MX 6DualLite - 2G | myimx6ek200-6u-2g.dtb | |
i.MX 6DualLite - 512M | myimx6ek200-6u-512m.dtb | |
MY-IMX6-EK314 | i.MX 6Quad - 1G | myimx6ek314-6q-1g.dtb |
i.MX 6Quad - 2G | myimx6ek314-6q-2g.dtb | |
i.MX 6Quad - 512M | myimx6ek314-6q-512m.dtb | |
i.MX 6QuadPlus - 1G | myimx6ek314-6qp-1g.dtb | |
i.MX 6DualLite - 2G | myimx6ek314-6qp-2g.dtb | |
i.MX 6DualLite - 512M | myimx6ek314-6qp-512m.dtb | |
i.MX 6Solo - 1G | myimx6ek314-6s-1g.dtb | |
i.MX 6Solo - 256M | myimx6ek314-6s-256m.dtb | |
i.MX 6Solo - 512M | myimx6ek314-6s-512m.dtb | |
i.MX 6DualLite - 1G | myimx6ek314-6u-1g.dtb | |
i.MX 6DualLite - 2G | myimx6ek314-6u-2g.dtb | |
i.MX 6DualLite - 512M | myimx6ek314-6u-512m.dtb | |
MY-IMX6-EK336 | i.MX 6Quad - 1G | myimx6ek336-6q-1g.dtb |
i.MX 6Quad - 2G | myimx6ek336-6q-2g.dtb | |
i.MX 6Quad - 512M | myimx6ek336-6q-512m.dtb | |
MY-IMX6-EK140 | i.MX 6UltraLite - 256M -eMMC | myimx6ek140-6g-256m-emmc.dtb |
i.MX 6UltraLite - 256M -Nand | myimx6ek140-6g-256m-nand.dtb | |
i.MX 6UltraLite - 512M -eMMC | myimx6ek140-6g-512m-emmc.dtb | |
i.MX 6UltraLite - 512M -Nand | myimx6ek140-6g-512m-nand.dtb | |
i.MX 6ULL - 256M -eMMC | myimx6ek140-6y-256m-emmc.dtb | |
i.MX 6ULL - 256M -Nand | myimx6ek140-6y-256m-nand.dtb | |
i.MX 6ULL - 512M -eMMC | myimx6ek140-6y-512m-emmc.dtb | |
i.MX 6ULL - 512M -Nand | myimx6ek140-6y-512m-nand.dtb | |
MY-IMX6-EK140P | i.MX 6UltraLite - 256M -eMMC | myimx6ek140p-6g-256m-emmc.dtb |
i.MX 6UltraLite - 256M -Nand | myimx6ek140p-6g-256m-nand.dtb | |
i.MX 6UltraLite - 512M -eMMC | myimx6ek140p-6g-512m-emmc.dtb | |
i.MX 6UltraLite - 512M -Nand | myimx6ek140p-6g-512m-nand.dtb | |
i.MX 6ULL - 256M -eMMC | myimx6ek140p-6y-256m-emmc.dtb | |
i.MX 6ULL - 256M -Nand | myimx6ek140p-6y-256m-nand.dtb | |
i.MX 6ULL - 512M -eMMC | myimx6ek140p-6y-512m-emmc.dtb | |
i.MX 6ULL - 512M -Nand | myimx6ek140p-6y-512m-nand.dtb |
- 以MY-IMX6-EK200-6Q-1G为例
- 目标文件
使用ls命令可查看编译得到的目标设备树文件信息:
$ ls arch/arm/boot/dts/myimx6ek*.dtb
复制设备树文件到镜像目录
$ cp arch/arm/boot/dts/myimx6ek*.dtb ~/my-imx6/04_image/image-linux-4115/
编译模块
- 编译模块命令
- 安装模块到指定目录
$ make modules_install INSTALL_MOD_PATH=./modules
- 打包模块文件
$ cd modules
$ tar cjf ../modules.tar.bz2 *
- 复制模块包到镜像目录
评估板型号 | 目标模块包 |
---|---|
MY-IMX6-EK200 | kernel-modules-myimx6a9.tar.bz2 |
MY-IMX6-EK314 | |
MY-IMX6-EK336 | |
MY-IMX6-EK140 | kernel-modules-myimx6a7.tar.bz2 |
MY-IMX6-EK140P |
$ cp ../modules.tar.bz2 ~/my-imx6/04_image/image-linux-4115/kernel-modules-myimx6a9.tar.bz2
注意:如果是编译内核时配置文件使用的是 myimx6a9_defconfig,在这里要把 modules.tar.bz2 复制为 kernel-modules-myimx6a9.tar.bz2;
如果是编译内核时配置文件使用的是 myimx6a7_defconfig,在这里要把 modules.tar.bz2 复制为 kernel-modules-myimx6a7.tar.bz2
应用程序编译
Linux应用程序编译
编写应用程序
- 创建应用程序的源码目录和Linux-4.1.15的可执行程序目录
$ mkdir ~/my-demo/source_code -p
$ mkdir ~/my-demo/bin-l4115 -p
- 编写源代码
$ cd ~/my-demo/source_code
$ vi hello.c
写入以下代码并保存
#include <stdio.h>
int main(int argc, char **argv)
{
printf("Hello, MYZR!\n");
return;
}
- 查看代码
$ cat hello.c
编译应用程序
- 配置环境变量
$ source ~/my-imx6/03_tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf-env
- 编译
$ ${CROSS_COMPILE}gcc hello.c -o hello.out
注意:上面的命令有包含“$”号,即“${CROSS_COMPILE}gcc”,是引用我们source时产生的环境变量。
- 目标文件
$ file hello.out
可以看到目标文件 hello.out 的属性。
保存目标可执行文件
$ mv hello.out ~/my-demo/bin-l31452/
应用程序打包
说明
烧录工具支持烧录“my-demo.tar.xz”的文件包到评估板。所以在这里我们把我们需要的应用程序打包为“my-demo.tar.xz”。至于“my-demo.tar.xz”会被烧录到哪个位置,请看《烧录手册》。
打包应用程序
1)打包
这里我们将整个my-demo目录打包。
$ cd ~
$ tar cjf my-demo.tar.bz2 my-demo
2)复制应用程序包为目标烧录文件
$ cp my-demo.tar.bz2 ~/my-imx6/04_image/image-linux-31452/
目标烧录文件
至此,我们在“~/my-imx6/04_image/image-linux-31452/”得到了除文件系统以外的一套烧录文件。包括“uboot*.imx”、“myimx6*.dtb”、“zImage-myimx6”、“kernel-modules.tar.bz2”、“my-demo.tar.bz2”。
现在可以参照《烧录手册》烧录我们自己编译出来的image了。