imx6的MFGTools配置、流程、分析_第1页
imx6的MFGTools配置、流程、分析_第2页
imx6的MFGTools配置、流程、分析_第3页
imx6的MFGTools配置、流程、分析_第4页
imx6的MFGTools配置、流程、分析_第5页
已阅读5页,还剩37页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1 MFG 说明说明 MFGTool 工具是 freescale 专门针对 i MX 处理器专门使用的烧写工具 用来将编译好的文件系统和镜像文件烧 写到板子上 2 文件结构 文件结构 以明远智睿 MY I MX6 MFG TOOL V2 3 为例 文件结构 cfg ini 指定 LIST ucl2 xml 根据此定义 找到对应的操作部分 流程 MFG 先把 OS Firmware 下面的 uboot bin uImage initramfs cpio gz uboot 下载到 RAM 中 运行 再执行具体的 烧录过程 Profiles MX6Q Linux Update OS Firmware uImage 打开 MfgTool2 exe 时 会读取 uImage 的内容 如果没有 uImage 打开 MfgTool2 exe 提示 Profiles MX6Q Linux Update OS Firmware ucl2 xml MFG 的工作流程由配置文件决定 配置文件即 ucl2 xml 明远 明远 LIST name Android MYZR SPI NOR EMMC 全局变量 ucl2 xml 将烧录过程分成两个阶段 BootStrap 和 Updater dev vid 和 pid 分别对应两个阶段的设备名 设备对应连接的 USB vid 和 pid 号 针对 imx6 系列 在 BootStrap 阶段 有效的设备名只有 MX6Q MX6D MX6SL 在 Updater 阶段 有效的 设备名只有 MSC 根据 cfg ini 文件中定义的 name 选择 Loading U boot 下载当前目录的 myzr u boot bin 文件到 RAM Loading Kernel 下载当前目录的 uImage 文件到 RAM 的 0 x10800000 地址处 Loading Initramfs 下载当前目录的 initramfs cpio gz uboot 文件到内存的 0 x10C00000 地址处 Jumping to OS image 通知内嵌 ROM 代码跳转到内存中的镜像执行 类型是 push 此句在目标机上执行 创建设备节点 类型是 push 此句在目标机上执行 创建设备节点 Erasing Boot partition 擦除信息 Sending U Boot 将 files android u boot bin 文件发送到目标机 write U Boot to SPI NOR 烧写 将 FILE 下载到 dev mtd0 位置 bs 512 指定读 写的 blocks 大小为 512bytes Sending partition shell 将当前目录的 mksdcard android sh tar 分区脚本文件 发送到目标机 Partitioning 解压脚本文件 Partitioning 执行脚本文件 Formatting sd partition 从下面开始烧录内核 文件系统 Sending kernel uImage 将 files android boot img 发送到目标机 write boot img flush the memory 刷新 等待数据传送完成 Formatting sd partition Formatting system partition Formatting cache partition Formatting data partition flush the memory Formatting misc partition Sending and writting system img 利用 pipe 传输大数据 flush the memory 执行 flush 刷新操作 等到数据传输完毕 Sending userdata img optional flush the memory 注释掉 Sending and writting recovery img Finishing rootfs write Done 显示执行完毕信息 官方 官方 LIST name Android SabreSD eMMC Loading U boot Loading Kernel Loading Initramfs Jumping to OS image clean up u boot parameter 将 dev zero 下载到 dev mmcblk0 从 dev mmcblk0 开始的位置 跳过 1536 个 blocks 复制 16 个 blocks sys devices platform sdhci esdhc imx 3 mmc host mmc0 mmc0 0001 boot config access boot partition 1 Sending U Boot write U Boot to sd card sys devices platform sdhci esdhc imx 3 mmc host mmc0 mmc0 0001 boot config access user partition and enable boot partion 1 to boot Sending partition shell Partitioning Partitioning Formatting sd partition Sending kernel uImage write boot img flush the memory Formatting data partition Sending data partition shell Extracting data partition shell Making data encryptable Formatting system partition Formatting cache partition flush the memory Formatting device partition Sending and writting system img flush the memory Sending userdata img optional flush the memory Sending and writting recovery img Finishing rootfs write Done Profiles MX6Q Linux Update OS Firmware mksdcard android sh tar SD 卡分区脚本 bin bash 定义是脚本文件 partition size in MB 以 MB 为单位 分区 BOOTLOAD RESERVE 8 BOOT ROM SIZE 8 SYSTEM ROM SIZE 512 CACHE SIZE 512 RECOVERY ROM SIZE 8 VENDER SIZE 8 MISC SIZE 8 help bn basename 0 cat EOF usage bn device node options hdisplays this help message sonly get partition size np not partition f flash android image EOF check the if root userid id u if userid ne 0 then echo you re not root exit fi parse command line moreoptions 1 node na cal only 0 flash images 0 not partition 0 not format fs 0 while moreoptions 1 a gt 0 do case 1 in h help exit s cal only 1 f flash images 1 np not partition 1 nf not format fs 1 moreoptions 0 node 1 esac moreoptions 0 then help exit fi call sfdisk to create partition table get total card size seprate 40 total size sfdisk s node total size expr total size 1024 boot rom sizeb expr BOOT ROM SIZE BOOTLOAD RESERVE extend size expr SYSTEM ROM SIZE CACHE SIZE VENDER SIZE MISC SIZE seprate data size expr total size boot rom sizeb RECOVERY ROM SIZE extend size seprate create partitions if cal only eq 1 then cat EOF BOOT boot rom sizeb MB RECOVERY RECOVERY ROM SIZE MB SYSTEM SYSTEM ROM SIZE MB CACHE CACHE SIZE MB DATA data size MB MISC MISC SIZE MB EOF exit fi destroy the partition table dd if dev zero of node bs 1024 count 1 sfdisk force uM node EOF boot rom sizeb 83 RECOVERY ROM SIZE 83 extend size 5 data size 83 SYSTEM ROM SIZE 83 CACHE SIZE 83 VENDER SIZE 83 MISC SIZE 83 EOF adjust the partition reserve for bootloader if you don t put the uboot on same device you can remove the BOOTLOADER ERSERVE to have 8M space the minimal sylinder for some card is 4M maybe some was 8M just 8M for some big eMMC s sylinder sfdisk force uM node N1 EOF BOOTLOAD RESERVE BOOT ROM SIZE 83 EOF For MFGTool Notes MFGTool use mksdcard android tar store this script if you want change it do following tar xf mksdcard android sh tar vi mksdcard android sh edit want you want to change rm mksdcard android sh tar tar cf mksdcard android sh tar mksdcard android sh Document V2 Manufacturing Tool V2 UCL User Guide Overview Manufacturing Mfg tool provides a flexible way for users to set their own operations An xml script file is used to configure the users operation 可以灵活的自定义操作 An xml file typically consists of a number of tasks which can be executed by running the manufacturing tool just once 大量任务 开始运行工具时 执行 UTP mode operation Global Configuration 全局配置全局配置 Mfg tool uses global configuration to recognize which device the user wants to flash among different USB devices connected to the PC 选择设备 与 PC 相连的 USB Let s explain it by an example 下面为例 说明 Global configuration is contained between parameter and 定义的全局配置参数 indicates the first phase of the burning process the phase name is BootStrap and a device named MX6Q should be connected with the USB pid 0054 and vid 15A2 For i MX 6 serial in the phase BootStrap the valid strings for dev are MX6Q MX6D MX6SL in the phase Updater the valid string for dev is MSC 烧录过程的第一步 BootStrap indicates the second phase of the burning process the phase name is Updater and a device named MSC should be connected with the USB pid 37FF and vid 066F Update Command List The tool uses Update Command List UCL to specify all the user tasks The UCL contains a distinct list for each use case Each list contains a set of command elements with attributes for the command type body and payload The command element text provides a user interface message for the current operation Each UCL begins from while ending with the name of which can be specified by users Parameter desc is used for comment purpose There are two types of commands host specific commands and firmware specific commands Host specific commands are parsed and executed by host tool while firmware specific commands are parsed and executed by firmware runs on targeted device Host Specific Commands The example below shows a typical command state indicates the phase of the command executed and 命令执行的阶段 type specifies the type of a command 命令的类型 body is a parameter of the command 命令的参数 file is another parameter 命令参数 Loading Kernel is a description of the command 当前命令的描述 Loading Kernel Comman d type BodyOther parameters Description loadfile Address loadSectio n setSection HasFlashHe ader CodeOffset Download an image to RAM It is strongly recommended to follow the example provided in release package since it involves ROM code parameters which may not be easy to understand file specify the path and name of the image file 说明文件的路径 名称 Parameter address specifies the RAM address where the image is located 文件在 RAM 的地址 loadSection a parameter used by ROM code should be set to OTH ROM 代码所用的参数 setSection a parameter used by ROM code should be set to OTH if there are other images to be loaded set to APP if the last image is loaded 还有其他文件 OTH 最后一个文件 APP HasFlashHeader set TRUE if the image contains a flash header or set to FALSE 包含 flash header 设成 TRUE 否则 设成 FALSE CodeOffset the address offset of first executed instruct within the image 文件中执行的第一条指令的偏移地址 The command is only for Bulk IO mode i MX device except i MX50 HID mode device jumpNotify ROM code to jump to the RAM image to run The command must be followed after a load command in which setSection value is set to APP The command is only for Bulk IO mode i MX device except i MX50 HID mode device bootRecoveryFile if Download an image to RAM Firmware Specific Commands If a command is typed as push which means the command is parsed and executed by the targeted device instead of host push 是目标机执行的命令 the only thing host has to do is to send the command to the targeted device 主机只是将命令发给目标机 The commands actually executed by OS image are downloaded in Command lists As a result each OS has its own commands Command Arguments Description None Request to send the device identity information in XML form integer Initiate the reboot depending on argument 3 means reboot while other values will force a shutdown string Execute shell command Example echo hello from utp flush None Wait for all data transfer to be finished and processed ffs None Partition the SD card and flash the boot stream to it mknod device class device item node t o create type Create the device node by parsing sysfs entry 创建设备节点 Example mknod class mtd mtd0 dev mtd0 read string Read the file specified by parameter and send it to the host If there is no such file the appropriate status will be returned send None Receive the file from the host Subsequent shell commands can refer to the file received as FILE Example selftest None Perform self diagnostic returns either pass or appropriate status Implemented as empty function in current release save string Save the file received by command send to the file specified as parameter pipe string require file attribute Execute shell command and read data from stdio pipe IN mfg will send file to stdio pipe OUT It is useful for big data transfer more than physical memory size Finish Flashing NAND Note The above two commands must be combined to use Recommend Please add below command prior to pipe command to free some memory proc sys vm drop caches release memory wff NONE Deprecate Prepare Write firmware to flash wfs NONE Deprecate Prepare Write firmware to SD CARD ffs NONE Write firmware to SD wrf NONE require file attribute ubiformat nand with ubi image Example Finish Flashing NAND wrs number of sd partition require file attribute Write rootfs image to sd card Example Finish Flashing NAND You can also use CMD type push body pipe dd of dev mmcblkp2 bs 1K file files rootfs ext2 Finish Flashing NAND frf NONE same as flush frs NONE same as flush OTP Bits Programming Command below shows how to write a file to a disk Showing HW OCOTP fuse bank sys fsl otp HW OCOTP MAC0 write 0 x11223344 to HW OCOTP MAC0 fuse bank Read value from HW OCOTP MAC0 fuse bank The fuse bank name ex HW OCOTP MAC0 should be set as needed 应用 MGFTool 下载时的打印信息 Loading U boot Loading Kernel Loading Initramfs Jumping to OS image 显示 Jumping to OS image 开始打印 U Boot 2009 08 dirty Dec 05 2013 15 40 26 CPU Freescale i MX6 family TO1 2 at 792 MHz Thermal sensor with ratio 176 Temperature 28 C calibration data 0 x5584d169 mx6q pll1 792MHz mx6q pll2 528MHz mx6q pll3 480MHz mx6q pll8 50MHz ipg clock 66000000Hz ipg per clock 66000000Hz uart clock 80000000Hz cspi clock 60000000Hz ahb clock 132000000Hz axi clock 264000000Hz emi slow clock 132000000Hz ddr clock 528000000Hz usdhc1 clock 198000000Hz usdhc2 clock 198000000Hz usdhc3 clock 198000000Hz usdhc4 clock 198000000Hz nfc clock 24000000Hz Board i MX6Q SABRESD unknown board Board 0 x63012 POR Boot Device SPI NOR I2C ready DRAM 1 GB MMC FSL USDHC 0 FSL USDHC 1 FSL USDHC 2 Using default environment In serial Out serial Err serial Net got MAC address from IIM 00 00 00 00 00 00 FEC0 PRIME Hit any key to stop autoboot 0 Booting kernel from Legacy Image at 10800000 Image Name Linux 3 0 35 06116 g2d14546 dirt Image Type ARM Linux Kernel Image uncompressed Data Size 3182360 Bytes 3 MB Load Address 10008000 Entry Point 10008000 Verifying Checksum OK Loading init Ramdisk from Legacy Image at 10c00000 Image Name uboot initramfs rootfs Image Type ARM Linux RAMDisk Image gzip compressed Data Size 4537478 Bytes 4 3 MB Load Address 00000000 Entry Point 00000000 Verifying Checksum OK Loading Kernel Image OK OK Starting kernel Uncompressing Linux done booting the kernel Linux version 3 0 35 06116 g2d14546 dirty gq gq gcc version 4 6 x google 20120106 prerelease GCC 2 SMP PREEMPT Thu Sep 4 13 36 48 CST 2014 CPU ARMv7 Processor 412fc09a revision 10 ARMv7 cr 10c53c7d CPU VIPT nonaliasing data cache VIPT aliasing instruction cache Machine Freescale i MX 6Quad DualLite Solo Sabre SD Board Memory policy ECC disabled Data cache writealloc CPU identified as i MX6Q silicon rev 1 2 PERCPU Embedded 7 pages cpu 8185b000 s5184 r8192 d15296 u32768 Built 1 zonelists in Zone order mobility grouping on Total pages 260096 Kernel command line console ttymxc0 115200 rdinit linuxrc enable wait mode off PID hash table entries 4096 order 2 16384 bytes Dentry cache hash table entries 131072 order 7 524288 bytes Inode cache hash table entries 65536 order 6 262144 bytes Memory 1024MB 1024MB total Memory 1028664k 1028664k available 19912k reserved 0K highmem Virtual kernel memory layout vector 0 xffff0000 0 xffff1000 4 kB fixmap 0 xfff00000 0 xfffe0000 896 kB DMA 0 xfbe00000 0 xffe00000 64 MB vmalloc 0 xc0800000 0 xf2000000 792 MB lowmem 0 x80000000 0 xc0000000 1024 MB pkmap 0 x7fe00000 0 x80000000 2 MB modules 0 x7f000000 0 x7fe00000 14 MB init 0 x80008000 0 x8003a000 200 kB text 0 x8003a000 0 x805b676c 5618 kB data 0 x805b8000 0 x80606280 313 kB bss 0 x806062a4 0 x806316f0 174 kB SLUB Genslabs 13 HWalign 32 Order 0 3 MinObjects 0 CPUs 4 Nodes 1 Preemptible hierarchical RCU implementation NR IRQS 624 MXC GPIO hardware sched clock 32 bits at 3000kHz resolution 333ns wraps every 1431655ms arm max freq 1GHz MXC Early serial console at MMIO 0 x2020000 options 115200 bootconsole ttymxc0 enabled Console colour dummy device 80 x30 Calibrating delay loop 1581 05 BogoMIPS lpj 7905280 pid max default 32768 minimum 301 Mount cache hash table entries 512 CPU Testing write buffer coherency ok hw perfevents enabled with ARMv7 Cortex A9 PMU driver 7 counters available CPU1 Booted secondary processor CPU2 Booted secondary processor CPU3 Booted secondary processor Brought up 4 CPUs SMP Total of 4 processors activated 6324 22 BogoMIPS print constraints dummy NET Registered protocol family 16 print constraints vddpu 725 1300 mV at 700 mV fast normal print constraints vddcore 725 1300 mV at 1150 mV fast normal print constraints vddsoc 725 1300 mV at 1200 mV fast normal print constraints vdd2p5 2000 2775 mV at 2400 mV fast normal print constraints vdd1p1 800 1400 mV at 1100 mV fast normal print constraints vdd3p0 2625 3400 mV at 3000 mV fast normal No AHCI save PWR PDDQ enabled hw breakpoint found 6 breakpoint and 1 watchpoint registers hw breakpoint 1 breakpoint s reserved for watchpoint single step hw breakpoint maximum watchpoint size is 4 bytes L310 cache controller enabled l2x0 16 ways CACHE ID 0 x410000c7 AUX CTRL 0 x02070000 Cache size 1048576 B bio create slab at 0 mxs dma mxs dma apbh initialized print constraints SPKVDD 4200 mV print constraints 1 8V 1800 mV print constraints MICVDD 3300 mV print constraints vmmc 3300 mV SCSI subsystem initialized spi imx imx6q ecspi 0 probed 22usbcore registered new interface driver usbfs 22usbcore registered new interface driver hub 11usbcore registered new device driver usb imx ipuv3 imx ipuv3 0 IPU DMFC NORMAL mode 1 0 1 5B 4 5 5F 6 7 imx ipuv3 imx ipuv3 1 IPU DMFC NORMAL mode 1 0 1 5B 4 5 5F 6 7 Advanced Linux Sound Architecture Driver Version 1 0 24 Bluetooth Core ver 2 16 NET Registered protocol family 31 Bluetooth HCI device and connection manager initialized Bluetooth HCI socket layer initialized Bluetooth L2CAP socket layer initialized Bluetooth SCO socket layer initialized i2c core driver max17135 using legacy suspend method i2c core driver max17135 using legacy resume method Switching to clocksource mxc timer1 Clockevents could not switch to one shot mode Clockevents could not switch to one shot mode Clockevents could not switch to one shot mode dummy timer is not functional Clockevents could not switch to one shot mode Could not switch to high resolution mode on CPU 2 dummy timer is not functional dummy timer is not functional Could not switch to high resolution mode on CPU 1 Could not switch to high resolution mode on CPU 0 NET Registered protocol family 2 IP route cache hash table entries 32768 order 5 131072 bytes TCP established hash table entries 131072 order 8 1048576 bytes TCP bind hash table entries 65536 order 7 786432 bytes TCP Hash tables configured established 131072 bind 65536 TCP reno registered UDP hash table entries 512 order 2 16384 bytes UDP Lite hash table entries 512 order 2 16384 bytes NET Registered protocol family 1 RPC Registered named UNIX socket transport module RPC Registered udp transport module RPC Registered tcp transport module RPC Registered tcp NFSv4 1 backchannel transport module Unpacking initramfs dummy timer is not functional Could not switch to high resolution mode on CPU 3 Freeing initrd memory 4428K PMU registered new PMU device of type 0 Static Power Management for Freescale i MX6 wait mode is disabled for i MX6 cpaddr c0880000 suspend iram base c08f8000 PM driver module loaded IMX usb wakeup probe cpu regulator mode ldo enable i MXC CPU frequency driver JFFS2 version 2 2 NAND 漏 2001 2006 Red Hat Inc msgmni has been set to 2017 cryptodev driver loaded io scheduler noop registered io scheduler deadline registered io scheduler cfq registered default mxc sdc fb mxc sdc fb 0 register mxc display driver ldb regulator get get with no identifier imx ipuv3 imx ipuv3 0 IPU DMFC DP HIGH RESOLUTION 1 0 1 5B 2 5 5F 6 7 Console switching to colour frame buffer device 128x37 mxc sdc fb mxc sdc fb 1 register mxc display driver hdmi mxc hdmi mxc hdmi Detected HDMI controller 0 x13 0 xa 0 xa0 0 xc1 fbcvt 1920 x1080 60 CVT Name 2 073M9 cut here WARNING at mm page alloc c 2121 alloc pages nodemask 0 x150 0 x64c Modules linked in unwind backtrace 0 x0 0 xf8 from warn slowpath common 0 x4c 0 x64 warn slowpath common 0 x4c 0 x64 from wa

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论