im 的MFGTools配置流程分析.pdf
《im 的MFGTools配置流程分析.pdf》由会员分享,可在线阅读,更多相关《im 的MFGTools配置流程分析.pdf(30页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、1 1板子上;、M MF FG G说说明明MFGTool 工具是 freescale 专门针对处理器专门使用的烧写工具,用来将编译好的文件系统和镜像文件烧写到2 2、文件结构、文件结构以明远智睿 为例:文件结构指定 LIST,根据此定义,找到对应的操作部分流程:MFG 先把 OS Firmware 下面的 uImage 下载到 RAM 中,运行,再执行具体的烧录过程;ProfilesProfiles/MX6Q Linux Update/OS Firmware/uImage/MX6Q Linux Update/OS Firmware/uImage打开时,会读取 uImage 的内容;如果没有 u
2、Image,打开,提示:ProfilesProfiles/MX6Q Linux Update/OS Firmware/MX6Q Linux Update/OS Firmware/MFG 的工作流程由配置文件决定,配置文件即:明远明远,LIST name=Android-MYZR-SPI_NOR-EMMC,LIST name=Android-MYZR-SPI_NOR-EMMC /CMD/CMD./CMD/CMDCMD state=Updater type=push body=pipe dd of=/dev/mmcblk0p5 bs=512Formatting misc partitionfile
3、=files/android/Sending and writting/CMD-Sending optional flush the memory.-/CMD Loading Initramfs.Jumping to OS image.clean up u-boot parameter.Formatting dataSending kernel uImagewrite flush the memory.Formatting sd partition Partitioning.partitionSending data partition shellExtracting data partiti
4、on shellMaking dataencryptableFormatting system partitionFormatting cache partitionflush the memory.Formatting device partitionSending and writting flush the memory.-Sending optional flush the memory.-Sending and writting DoneFinishing rootfs writeProfiles/MX6Q Linux Update/OS Firmware/卡分区脚本/bin/bas
5、h -fEOFflash android image.check the if rootuserid=id-uif$userid-ne 0;thenfi parse command linemoreoptions=1node=nacal_only=0flash_images=0not_partition=0not_format_fs=0while$moreoptions=1-a$-gt 0;docase$1 in -h help;exit;-s cal_only=1;-f flash_images=1;-np not_partition=1;-nf not_format_fs=1;moreop
6、tions=0;node=$1;esacecho youre not rootexit$moreoptions=0&$-gt 1&help&exit$moreoptions=1&shiftdoneif -e$node;thenfi call sfdisk to create partition table get total card sizeseprate=40total_size=sfdisk-s$nodetotal_size=expr$total_size/1024boot_rom_sizeb=expr$BOOT_ROM_SIZE+$BOOTLOAD_RESERVEextend_size
7、=expr$SYSTEM_ROM_SIZE+$CACHE_SIZE+$VENDER_SIZE+$MISC_SIZE+$sepratedata_size=expr$total_size-$boot_rom_sizeb-$RECOVERY_ROM_SIZE-$extend_size+$seprate create partitionsif$cal_only-eq 1;thencat EOFBOOT :$boot_rom_sizebMBRECOVERY:$RECOVERY_ROM_SIZEMBSYSTEM:$SYSTEM_ROM_SIZEMBCACHE :$CACHE_SIZEMBDATA :$da
8、ta_sizeMBhelpexitMISC :$MISC_SIZEMBEOFexitfi destroy the partition tabledd if=/dev/zero of=$node bs=1024 count=1sfdisk-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,83EOF adjust the partition rese
9、rve for bootloader.if you dont 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 sylindersfdisk-force-uM$node-N1 EOF$BOOTLOAD_RESERVE,$BOOT_ROM_SIZE,83EOF For MFGTool Notes:MFGToo
10、l use store this script if you want change it.do following:tar xf vi edit want you want to change rm tar cfDocument/V2/Manufacturing Tool V2 UCL User GuideDocument/V2/Manufacturing Tool V2 UCL User GuideOverviewOverviewManufacturing Mfg tool provides a flexibleway for users to set their own operatio
11、ns.An xml scriptfile is used to configure the users operation.可以灵活的自定义操作An xml file typically consists of a number of tasks which can be executed by running the manufacturingtool just once.大量任务开始运行工具时,执行UTP mode operationUTP mode operationGlobal ConfigurationGlobal Configuration全局配置全局配置Mfg tool uses
12、 global configuration to recognize which device the user wants to flash among differentUSB devices connected to the PC.选择设备与 PC 相连的 USBLets explain it by an example.下面为例,说明 Global configuration is contained between parameter and.定义的全局配置参数 indicates the first phase of the burningprocess,the phase nam
13、e is“BootStrap”,and a device named“MX6Q”should be connected with theUSB pid“0054”and vid“15A2”.For 6 serial,in the phase“BootStrap”,the valid strings fordev are:“MX6Q”,“MX6D”,“MX6SL”;in the phase“Updater”,the valid string for dev is:“MSC”.烧录过程的第一步BootStrap indicates the second phase of the burningpr
14、ocess,the phase name is“Updater”,and adevice named“MSC”should be connected with the USBpid“37FF”and vid“066F”.Update Command ListUpdate Command ListThe tool uses Update Command List UCL to specify all the user tasks.The UCL contains a distinctlist for each use case.Each list contains a set of comman
15、d elements with attributes for the commandtype,body,and payload.The command element text provides a user interface message for the currentoperation.Each UCL begins from while ending with,the name of whichcan be specified by users.Parameter“desc”is used for comment purpose.There are two types of comm
16、ands:host specific commands and firmware specific commands.Host specificcommands are parsed and executed by host tool while firmware specific commands are parsed and executedby firmware runs on targeted device.Host Specific CommandsHost Specific CommandsThe example below shows a typical command.“sta
17、te”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.当前命令的描述CMD state=BootStrap type=load file=uImage address=0 xLoading Kernel.Comma
18、ndBodytypeOtherparametersDescriptionloadfileAddressloadSectionsetSectionHasFlashHeaderCodeOffsetDownload an image to RAM.It is stronglyrecommended to follow the example provided inrelease package since it involves ROM codeparameters which may not be easy to understand.file:specify the path and name
19、of the image file.说明文件的路径、名称Parameter“address”specifies the RAM addresswhere the image is located.文件在 RAM 的地址loadSection:a parameter used by ROM code,shouldbe set to“OTH”ROM 代码所用的参数setSection:a parameter used by ROM code,shouldbe set to“OTH”if there are other images to beloaded;set to“APP”if the las
20、t image isloaded.还有其他文件 OTH最后一个文件 APPHasFlashHeader:set TRUE if the image contains aflash header,or set to FALSE.包含 flash header,设成 TRUE否则,设成 FALSECodeOffset:the address offset of first executedinstruct within the image.文件中执行的第一条指令的偏移地址The command is only for Bulk-IO mode deviceexcept HID mode devic
21、e.jumpNotify ROM code to jump to the RAM image to run.The command must be followed after a load commandin which setSection value is set to“APP”.The command is only for Bulk-IO mode deviceexcept HID mode device.bootRecoveryFileifDownload an image to RAM.Firmware Specific CommandsIf a command is typed
22、 as“push”,which means the command is parsed and executed by the targeteddevice 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.As a result,each OS has its owncommands.Com
23、mandArgumentsNoneDescriptionRequest to send the device identity informationin XML formintegerInitiate the reboot depending on argument.3means reboot whileother values will force ashutdown.$stringExecute shell commandExample:$echo hello fromutpflushNoneWait for all data transfer to be finished andpro
24、cessed.ffsNonePartition the SD card and flash the boot streamto it.mknoddevice_class,device_item,node_to_create,Create the device node by parsing sysfs entry.type创建设备节点 Example:mknodclass/mtd,mtd0,/dev/mtd0readstringRead the file specified by parameter and sendit to the host.Ifthere is no such file,
25、theappropriate status will be returned.sendNoneReceive the file from the host.Subsequent shellcommands canrefer to the file received as$FILE.Example:selftest NonePerform self-diagnostic;returns either pass orappropriatestatus.Implemented as emptyfunction in current release.savestringSave the file re
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- im 的MFGTools配置流程分析 MFGTools 配置 流程 分析
限制150内