环境

宿主机平台:Ubuntu 16.04.6

目标机:iMX6ULL开发板

MFGTool 2.7

参考:https://www.cnblogs.com/helloworldtoyou/p/6053195.html

MFGTool2 的使用


fsl i.MX6开发板开发过程中系统常用烧写方式:SD卡、TFTP、USB;

其中SD卡首先需要SD卡;TFTP升级太慢,因此最常用的开发过程中更新内核采用的时MFGTool来进行系统升级;

MFGTool v2使用方式与v1差别较大,采用了vbscript来启动;

工具中一些文件的介绍

vbscript


双击对应的vbscript可以启动mfgtool工具,一般vbs文件的命名应突出板子规格(芯片、系统、存储等)

vbs文件可以指定修改 cfg.ini 文件中设置的一些参数

Set wshShell = CreateObject("WScript.shell")
wshShell.run "mfgtool2.exe -c ""Wh Linux Update"" -l ""NAND Flash"" -s ""board=sabresd"" -s ""folder=sabresd"" -s ""soc=6q"" -s ""mmc=3"" -s ""data_type="""
Set wshShell = Nothing 参数的含义:
-c: 芯片配置文件夹名称 Wh Linux Update
-l: list名称,对应ucl2.xml文件中的LIST标签的name,后面会说明。
-s: 变量名称, cfg.ini以及ucl2.xml中会用到。

UICfg.ini


用来配置每次同时可以烧写开发板的个数

[UICfg]
PortMgrDlg=1

cfg.ini


用来配置芯片类型和板子信息以及烧写内容存储方式

指定了ucl2.xml(/profiles/Linux/OS Firmware)文件中的LIST项名称

上面的vbs脚本中的参数会覆盖cfg.ini文件中的参数

[profiles]
chip = Linux

profiles下面的子目录:芯片类型目录,后面如果有新的芯片类型可自定义如 MX6ULL Linux Update

这样MFGTool就会在.\Profiles\Linux\OS Firmware中寻找相应的配置文件ucl2.xml

#可以解释位具体板子型号
[platform]
board = SabreSD

[LIST]
name = SDCard

ucl2.xml有多个LIST项,每一项对应于一个开发板相关烧写配置,此处指明哪一项LIST有效;
LIST中指明了执行的下载/烧写动作,要操作(下载/烧写/或命令)的文件,shell命令等内容。

cfg.ini一定要根据你的板子和要烧写到哪里来设置,设置的信息和你使用的板子要匹配。

LIST中主要是加载需要烧写的文件,文件的名称通过 vscript 脚本传递参数选择,然后执行烧写。

ucl2.xml


根据 vbs和cfg.ini文件中的参数指定的LIST名称,选择正确的操作进行进行烧录。

这个目录里面有很多文件,烧录的时候要用到的uboot,内核,文件系统到RAM中,运行

  • 首先烧录Profiles/Linux/OS Firmware/firmware文件夹的镜像到RAM中运行系统。

  • 系统运行之后烧录Profiles/Linux/OS Firmware/files/android/sabresd/中的镜像到emmc中

files目录下为烧写的目标镜像文件

firmware是烧写系统的镜像文件,当更新系统的分区大小或烧写方式时才需要更新firmware中的文件。

<UCL>
<!-- 首先判断不同芯片的vid和pid来确定芯片型号 -->
<CFG>
<STATE name="BootStrap" dev="MX6SL" vid="15A2" pid="0063"/>
<STATE name="BootStrap" dev="MX6D" vid="15A2" pid="0061"/>
<STATE name="BootStrap" dev="MX6Q" vid="15A2" pid="0054"/>
<STATE name="BootStrap" dev="MX6SX" vid="15A2" pid="0071"/>
<STATE name="BootStrap" dev="MX6UL" vid="15A2" pid="007D"/>
<STATE name="BootStrap" dev="MX7D" vid="15A2" pid="0076"/>
<STATE name="BootStrap" dev="MX6ULL" vid="15A2" pid="0080"/>
<STATE name="Updater" dev="MSC" vid="066F" pid="37FF"/>
</CFG> <LIST name="NAND Flash" desc="Choose NAND as media">
<!-- 将两个%号之间的参数使用vbs脚本和cfg.ini文件中的值进行替换 -->
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6UL">Loading U-boot</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%lite%%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6ULL">Loading U-boot</CMD> <!-- 下载firmware下的镜像到CPU的RAM中直接运行,当系统跑起来之后再烧录镜像到EMMC中。不同的CPU型号下载的地址不同 -->
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x12000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Kernel.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x80800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL MX6ULL">Loading Kernel.</CMD> <CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x12C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Initramfs.</CMD>
<CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x83800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL MX6ULL">Loading Initramfs.</CMD> <CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6UL">Loading device tree.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul%lite%-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6ULL">Loading device tree.</CMD> <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD> <!--RAM中系统运行后,将files文件夹下的镜像烧录 -->
<!--burn the uboot to NAND: -->
<CMD state="Updater" type="push" body="$ mount -t debugfs debugfs /sys/kernel/debug">Mounting debugfs</CMD>
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_uboot% 0 0">Erasing Boot partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/u-boot-imx6ul%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6UL">Sending u-boot.bin</CMD>
<CMD state="Updater" type="push" body="send" file="files/u-boot-imx6ul%lite%%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6ULL">Sending u-boot.bin</CMD>
<CMD state="Updater" type="push" body="$ kobs-ng init -x -v --chip_0_device_path=/dev/mtd%part_uboot% $FILE">Flashing Bootloader</CMD> <!--burn the kernel to NAND: -->
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_kernel% 0 0">Erasing Kernel partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/zImage-imx6ul" ifdev="MX6UL">Sending kernel zImage</CMD>
<CMD state="Updater" type="push" body="send" file="files/zImage-imx6ul%lite%" ifdev="MX6ULL">Sending kernel zImage</CMD>
<CMD state="Updater" type="push" body="$ nandwrite -p /dev/mtd%part_kernel% -p $FILE">Flashing Kernel</CMD> <CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_dtb% 0 0">Erasing dtb partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/zImage-imx6ul-%6uldtb%-%nanddtb%.dtb" ifdev="MX6UL">Sending Device Tree file</CMD>
<CMD state="Updater" type="push" body="send" file="files/zImage-imx6ul%lite%-%6uldtb%-%nanddtb%.dtb" ifdev="MX6ULL">Sending Device Tree file</CMD>
<CMD state="Updater" type="push" body="$ nandwrite -p /dev/mtd%part_dtb% -p $FILE">Flashing dtb</CMD> <!--burn the rootfs to NAND: -->
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_rootfs% 0 0">Erasing rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ ubiformat /dev/mtd%part_rootfs%"/>
<CMD state="Updater" type="push" body="$ ubiattach /dev/ubi_ctrl -m %part_rootfs%">Attaching UBI partition</CMD>
<CMD state="Updater" type="push" body="$ ubimkvol /dev/ubi0 -Nrootfs -m"/>
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mtd%part_rootfs%"/>
<CMD state="Updater" type="push" body="$ mount -t ubifs ubi0:rootfs /mnt/mtd%part_rootfs%"/> <CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mtd%part_rootfs%" file="files/%rootfs_name%-mys6ul14x14.rootfs.tar.bz2" ifdev="MX6UL">Sending and writting rootfs</CMD>
<CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mtd%part_rootfs%" file="files/%rootfs_name%-mys6ul%lite%14x14.rootfs.tar.bz2" ifdev="MX6ULL">Sending and writting rootfs</CMD>
<CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>
<CMD state="Updater" type="push" body="$ umount /mnt/mtd%part_rootfs%">Unmounting rootfs partition</CMD> <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>
</UCL>

文件中下载文件使用的变量有

lite      芯片型号 ull lite=l

6uluboot    开发板 14x14-evk

ddrsize              ddr内存大小 ddrsize=256

nand       存储类型 nand

6uldtb                开发板 14x14-evk

nanddtb            存储类型 gpmi-weim

part_uboot

part_kernel

part_dtb

part_rootfs

ddrsize

rootfs_name

工具自定义使用


在profiles中新建 Wh Linux Update 文件夹,拷贝模板linux文件夹里面的内容

OS Firmware 保留内容如下

清空files文件夹,替换自己使用的烧写文件

通过编译内核源码我们可以得到 zImage 和 设备树文件 mys-imx6ull-14x14-evk-gpmi-weim.dtb

平常测试不可能每次都需要烧写全部内容,因此修改 ucl2.xml 增加支持烧写 uboot、kernel、rootfs单独烧写

<UCL>
<!-- 首先判断不同芯片的vid和pid来确定芯片型号 -->
<CFG>
<STATE name="BootStrap" dev="MX6SL" vid="15A2" pid="0063"/>
<STATE name="BootStrap" dev="MX6D" vid="15A2" pid="0061"/>
<STATE name="BootStrap" dev="MX6Q" vid="15A2" pid="0054"/>
<STATE name="BootStrap" dev="MX6SX" vid="15A2" pid="0071"/>
<STATE name="BootStrap" dev="MX6UL" vid="15A2" pid="007D"/>
<STATE name="BootStrap" dev="MX7D" vid="15A2" pid="0076"/>
<STATE name="BootStrap" dev="MX6ULL" vid="15A2" pid="0080"/>
<STATE name="Updater" dev="MSC" vid="066F" pid="37FF"/>
</CFG> <LIST name="NAND-all" desc="Choose NAND as media">
<!-- 将两个%号之间的参数使用vbs脚本和cfg.ini文件中的值进行替换 -->
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6UL">Loading U-boot</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%lite%%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6ULL">Loading U-boot</CMD> <!-- 下载firmware下的镜像到CPU的RAM中直接运行,当系统跑起来之后再烧录镜像到EMMC中。不同的CPU型号下载的地址不同 -->
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x12000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Kernel.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x80800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL MX6ULL">Loading Kernel.</CMD> <CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x12C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Initramfs.</CMD>
<CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x83800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL MX6ULL">Loading Initramfs.</CMD> <CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6UL">Loading device tree.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul%lite%-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6ULL">Loading device tree.</CMD> <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD> <!--RAM中系统运行后,将files文件夹下的镜像烧录 -->
<!--burn the uboot to NAND: -->
<CMD state="Updater" type="push" body="$ mount -t debugfs debugfs /sys/kernel/debug">Mounting debugfs</CMD>
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_uboot% 0 0">Erasing Boot partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/u-boot-imx6ul%lite%%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6ULL">Sending u-boot.bin</CMD>
<CMD state="Updater" type="push" body="$ kobs-ng init -x -v --chip_0_device_path=/dev/mtd%part_uboot% $FILE">Flashing Bootloader</CMD> <!--burn the kernel to NAND: -->
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_kernel% 0 0">Erasing Kernel partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/zImage" ifdev="MX6ULL">Sending kernel zImage</CMD>
<CMD state="Updater" type="push" body="$ nandwrite -p /dev/mtd%part_kernel% -p $FILE">Flashing Kernel</CMD> <CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_dtb% 0 0">Erasing dtb partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/mys-imx6ul%lite%-%6uldtb%-%nanddtb%.dtb" ifdev="MX6ULL">Sending Device Tree file</CMD>
<CMD state="Updater" type="push" body="$ nandwrite -p /dev/mtd%part_dtb% -p $FILE">Flashing dtb</CMD> <!--burn the rootfs to NAND: -->
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_rootfs% 0 0">Erasing rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ ubiformat /dev/mtd%part_rootfs%"/>
<CMD state="Updater" type="push" body="$ ubiattach /dev/ubi_ctrl -m %part_rootfs%">Attaching UBI partition</CMD>
<CMD state="Updater" type="push" body="$ ubimkvol /dev/ubi0 -Nrootfs -m"/>
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mtd%part_rootfs%"/>
<CMD state="Updater" type="push" body="$ mount -t ubifs ubi0:rootfs /mnt/mtd%part_rootfs%"/> <CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mtd%part_rootfs%" file="files/%rootfs_name%-mys6ul%lite%14x14.rootfs.tar.bz2" ifdev="MX6ULL">Sending and writting rootfs</CMD>
<CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>
<CMD state="Updater" type="push" body="$ umount /mnt/mtd%part_rootfs%">Unmounting rootfs partition</CMD> <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST> <LIST name="NAND-uboot" desc="Choose NAND as media">
<!-- 将两个%号之间的参数使用vbs脚本和cfg.ini文件中的值进行替换 -->
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%lite%%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6ULL">Loading U-boot</CMD> <!-- 下载firmware下的镜像到CPU的RAM中直接运行,当系统跑起来之后再烧录镜像到EMMC中。不同的CPU型号下载的地址不同 -->
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x12000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Kernel.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x80800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL MX6ULL">Loading Kernel.</CMD> <CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x12C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Initramfs.</CMD>
<CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x83800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL MX6ULL">Loading Initramfs.</CMD> <CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6UL">Loading device tree.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul%lite%-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6ULL">Loading device tree.</CMD> <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD> <!--RAM中系统运行后,将files文件夹下的镜像烧录 -->
<!--burn the uboot to NAND: -->
<CMD state="Updater" type="push" body="$ mount -t debugfs debugfs /sys/kernel/debug">Mounting debugfs</CMD>
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_uboot% 0 0">Erasing Boot partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/u-boot-imx6ul%lite%%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6ULL">Sending u-boot.bin</CMD>
<CMD state="Updater" type="push" body="$ kobs-ng init -x -v --chip_0_device_path=/dev/mtd%part_uboot% $FILE">Flashing Bootloader</CMD> <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST> <LIST name="NAND-kernel" desc="Choose NAND as media">
<!-- 将两个%号之间的参数使用vbs脚本和cfg.ini文件中的值进行替换 -->
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6UL">Loading U-boot</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%lite%%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6ULL">Loading U-boot</CMD> <!-- 下载firmware下的镜像到CPU的RAM中直接运行,当系统跑起来之后再烧录镜像到EMMC中。不同的CPU型号下载的地址不同 -->
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x12000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Kernel.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x80800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL MX6ULL">Loading Kernel.</CMD> <CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x12C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Initramfs.</CMD>
<CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x83800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL MX6ULL">Loading Initramfs.</CMD> <CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6UL">Loading device tree.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul%lite%-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6ULL">Loading device tree.</CMD> <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD> <!--RAM中系统运行后,将files文件夹下的镜像烧录 -->
<!--burn the kernel to NAND: -->
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_kernel% 0 0">Erasing Kernel partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/zImage" ifdev="MX6UL">Sending kernel zImage</CMD>
<CMD state="Updater" type="push" body="send" file="files/zImage" ifdev="MX6ULL">Sending kernel zImage</CMD>
<CMD state="Updater" type="push" body="$ nandwrite -p /dev/mtd%part_kernel% -p $FILE">Flashing Kernel</CMD> <CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_dtb% 0 0">Erasing dtb partition</CMD>
<CMD state="Updater" type="push" body="send" file="files/mys-imx6ul%lite%-%6uldtb%-%nanddtb%.dtb" ifdev="MX6ULL">Sending Device Tree file</CMD>
<CMD state="Updater" type="push" body="$ nandwrite -p /dev/mtd%part_dtb% -p $FILE">Flashing dtb</CMD> <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST> <LIST name="NAND-rootfs" desc="Choose NAND as media">
<!-- 将两个%号之间的参数使用vbs脚本和cfg.ini文件中的值进行替换 -->
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6UL">Loading U-boot</CMD>
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%lite%%6uluboot%-ddr%ddrsize%_%nand%.imx" ifdev="MX6ULL">Loading U-boot</CMD> <!-- 下载firmware下的镜像到CPU的RAM中直接运行,当系统跑起来之后再烧录镜像到EMMC中。不同的CPU型号下载的地址不同 -->
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x12000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Kernel.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x80800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL MX6ULL">Loading Kernel.</CMD> <CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x12C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Initramfs.</CMD>
<CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x83800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL MX6ULL">Loading Initramfs.</CMD> <CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6UL">Loading device tree.</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul%lite%-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6ULL">Loading device tree.</CMD> <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD> <!--RAM中系统运行后,将files文件夹下的镜像烧录 -->
<!--burn the rootfs to NAND: -->
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_rootfs% 0 0">Erasing rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ ubiformat /dev/mtd%part_rootfs%"/>
<CMD state="Updater" type="push" body="$ ubiattach /dev/ubi_ctrl -m %part_rootfs%">Attaching UBI partition</CMD>
<CMD state="Updater" type="push" body="$ ubimkvol /dev/ubi0 -Nrootfs -m"/>
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mtd%part_rootfs%"/>
<CMD state="Updater" type="push" body="$ mount -t ubifs ubi0:rootfs /mnt/mtd%part_rootfs%"/> <CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mtd%part_rootfs%" file="files/%rootfs_name%-mys6ul%lite%14x14.rootfs.tar.bz2" ifdev="MX6ULL">Sending and writting rootfs</CMD>
<CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>
<CMD state="Updater" type="push" body="$ umount /mnt/mtd%part_rootfs%">Unmounting rootfs partition</CMD> <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST> </UCL>

在工具根目录 增加自己板子的vbs文件  mfgtool2-linux-mys-6ulx-nand.vbs

Set wshShell = CreateObject("WScript.shell")
wshShell.run "mfgtool2.exe -c ""Wh Linux Update"" -l ""NAND-kernel"" -s ""lite=l"" -s ""6uluboot=14x14evk"" -s ""nand=nand"" -s ""6uldtb=14x14-evk"" -s ""nanddtb=gpmi-weim"" -s ""part_uboot=0"" -s ""part_kernel=1"" -s ""part_dtb=2"" -s ""part_rootfs=3"" -s ""ddrsize=256"" -s ""rootfs_name=core-image-base"""
Set wshShell = Nothing

测试烧录内核和启动成功。

MFGTool2 的使用的更多相关文章

  1. MFGTool2批量操作

    /********************************************************************************* * MFGTool2批量操作 * ...

  2. I.MX6 Manufacturing Tool V2 (MFGTool2) Update Command List (UCL) User Guide translate

    Manufacturing Tool V2 (MFGTool2) Update Command List (UCL) User Guide Contents(目录) Contents(目录)     ...

  3. I.MX6Q MfgTool2 ucl2.xml eMMC

    /**************************************************************************** * I.MX6Q MfgTool2 ucl2 ...

  4. I.MX6 Manufacturing Tool V2 (MFGTool2) ucl2.xml hacking

    <!-- * Copyright (C) 2010-2013, Freescale Semiconductor, Inc. All Rights Reserved. * The CFG elem ...

  5. I.MX6 Manufacturing Tool V2 (MFGTool2) Emmc mksdcard-android.sh hacking

    #!/bin/bash # 参考文章: # . Shell特殊变量:Shell $, $#, $*, $@, $?, $$和命令行参数 # http://c.biancheng.net/cpp/vie ...

  6. I.MX6 Manufacturing Tool V2 (MFGTool2) Emmc mksdcard.sh hacking

    #!/bin/sh # 参考文章: # . MFGTool Emmc mksdcard.sh MFGTool Emmc mksdcard.sh comment # http://jordonwu.gi ...

  7. imx6 MFG TOOL 分析

    之前分析过mfgtool的内容,最近从官网下载,返现新版的mfgtool工具将imx6各种版本的linux/android都使用一个工具进行烧录.所以从新分析一下. 新版与旧版的一个区别是烧写使用的u ...

  8. I.MX6 mfgtool2-android-mx6q-sabresd-emmc.vbs hacking

    /******************************************************************** * I.MX6 mfgtool2-android-mx6q- ...

  9. 痞子衡嵌入式:恩智浦i.MXRT系列微控制器量产神器RT-Flash用户指南

    RT Flash English | 中文 1 软件概览 1.1 介绍 RT-Flash是一个专为基于NXP i.MX RT系列芯片的产品量产而设计的工具,其功能与官方MfgTool2工具类似,但是解 ...

随机推荐

  1. 自动部署Springboot项目脚本小脚本

    #!/bin/bash echo '自动部署Springboot项目脚本...' # aaa.jar 项目jar包 pid=`ps -ef|grep aaa.jar|grep -v grep|grep ...

  2. Python中print()函数的用法

    print()函数用于打印输出 1.函数语法: print(values,sep=' ',end='\n') sep和end是print()函数常用参数 参数sep是一次打印多个元素时的间隔符号,默认 ...

  3. testlink在win7下的安装\配置\使用

    1.xampp >解压并安装xampp >在安装目录下点击setup_xampp(这一步是为了初始化一些环境的配置) >再启动xampp-control,运行Apache和MySQL ...

  4. XSS闯关挑战(1-15)

    第一关 关键代码: 这一关两处的输出都没做任何防护,直接将用户的输入拼接到输出里面. payload: 第二关 使用上一关的payload显示如下 闭合一下标签就好了. 第三关 htmlspecial ...

  5. 【Python机器学习实战】感知机和支持向量机学习笔记(三)之SVM的实现

    前面已经对感知机和SVM进行了简要的概述,本节是SVM算法的实现过程用于辅助理解SVM算法的具体内容,然后借助sklearn对SVM工具包进行实现. SVM算法的核心是SMO算法的实现,首先对SMO算 ...

  6. Unity 不规则按钮实现

    1.先重写Image类,实现对Image图形范围的重写: 2.对不规则按钮添加Polygon Collider2D组件,调整大小圈中要点击的范围: 3.将重写的Image类添加到不规则按钮上时,需要移 ...

  7. javaSE面向对象编程

    面向对象编程 构造器 构造器就是和类名相同但无返回类型的方法. public class Person { //一个类即使什么都不写,它也会存在一个方法 //显示的定义构造器 String name; ...

  8. SQL语法 - WHERE 子句

    WHERE 子句用于规定选择的标准. 语法 SELECT 列名称 FROM 表名称 WHERE 列 运算符 值 下面的运算符可在 WHERE 子句中使用: 操作符 描述 = 等于 <> 不 ...

  9. 保护亿万数据安全,Spring有“声明式事务”绝招

    摘要:点外卖时,你只需考虑如何拼单:选择出行时,你只用想好目的地:手机支付时,你只需要保证余额充足.但你不知道这些智能的背后,是数以亿计的强大数据的支持,这就是数据库的力量.那么庞大数据的背后一定会牵 ...

  10. Go的Channel发送和接收

    先来看一道面试题: 对已经关闭的 chan 进行读写,会怎么样?为什么? 在上一篇学习 Go 协程的文章中,知道 go 关键字可以用来开启一个 goroutine 进行任务处理,但多个任务之间如果需要 ...