|
<UCL>
<CFG>
<STATE name="BootStrap" dev="MX6Q" vid="15A2" pid="0054"/>
<STATE name="BootStrap" dev="MX6D" vid="15A2" pid="0061"/>
<STATE name="Updater" dev="MSC" vid="066F" pid="37FF"/>
</CFG> <!--定义全局变量-->
<!--ucl2.xml将烧录过程分成两个阶段:BootStrap和Updater-->
<!--dev、vid和pid:分别对应两个阶段的设备名、设备对应连接的USB vid和pid号-->
<!--针对imx6系列,在 BootStrap阶段,有效的设备名只有MX6Q、MX6D。在Updater阶段,有效的设备名只有MSC-->
<LIST name="Debug-LOAD_UBOT2Memory" desc="Target OS: u-boot">
<!--选择的OS Seled 为: Debug-LOAD_UBOT2Memory-->
<CMD state="BootStrap" type="boot" body="BootStrap" file ="image-L4.1.15-uboot/uboot-%ek_name%-%ek_spec%.imx">boot: u-boot</CMD>
<!--根据 cfg.ini 文件中定义的 name 选择-->
<CMD state="BootStrap" type="jump">jump</CMD>
</LIST>
<LIST name="Update-UBOT&KERN" desc="Target OS: u-boot">
<!--选择的OS Seled 为: Update-UBOT&KERN-->
<CMD state="BootStrap" type="boot" body="BootStrap" file ="mfgfiles-L4.1.15/uboot-%ek_name%-%ek_spec%.imx">boot: u-boot</CMD>
<!--通过定义的有效设备进行选择下载对应的文件到RAM中-->
<CMD state="BootStrap" type="load" file="mfgfiles-L4.1.15/mfg-zImage-myimx6a9" address="0x12000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">load: zImage(mfg)</CMD>
<!--由定义的设备选择对应文件目录的mfg-zImage-myimx6a9到RAM的0x12000000处-->
<CMD state="BootStrap" type="load" file="mfgfiles-L4.1.15/fsl-image-mfgtool-initramfs" address="0x12C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">load: initramfs</CMD>
<!--由定义的设备选择对应文件目录的fsl-image-mfgtool-initramfs到RAM的0x12C00000处-->
<CMD state="BootStrap" type="load" file="mfgfiles-L4.1.15/%ek_name%-%ek_spec%.dtb" address="0x18000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">load: dtb</CMD>
<!--由定义的设备选择对应文件目录的dtb到RAM的0x18000000处-->
<CMD state="BootStrap" type="jump">jump</CMD>
<!--通知内嵌ROM代码跳转到内存中的镜像执行-->
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd0 0 0">exec flash_erase</CMD>
<!--擦除/dev/mtd0 0 0 flash的内容-->
<CMD state="Updater" type="push" body="send" file="image-L4.1.15-uboot/uboot-%ek_name%-%ek_spec%.imx">send: u-boot</CMD>
<!--创建设备节点, 解压u-boot.imx-->
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=1k seek=1">write u-boot</CMD>
<!--dd命令烧写u-boot-->
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblkxp1">mkdir /mnt/mmcblkxp1</CMD>
<CMD state="Updater" type="push" body="$ mount -t vfat /dev/mmcblk3p1 /mnt/mmcblkxp1">mount vfat</CMD>
<!--创建目录并挂载fat分区-->
<CMD state="Updater" type="push" body="send" file="image-L4.1.15-uboot/my_logo.bmp">send: logo</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk3 bs=1 seek=1048576 skip=54">write logo</CMD>
<!--烧写logo图-->
<CMD state="Updater" type="push" body="send" file="image-L4.1.15-uboot/my_environment.scr">send: environment</CMD>
<CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblkxp1/my_environment.scr">write environment</CMD>
<!--u-boot环境变量-->
<CMD state="Updater" type="push" body="send" file="image-L4.1.15-kernel/zImage-myimx6a9">send: zImage</CMD>
<CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblkxp1/zImage-myimx6a9">write zImage</CMD>
<!--烧写内核-->
<CMD state="Updater" type="push" body="send" file="image-L4.1.15-dtb/%ek_name%-%ek_spec%.dtb">send: dtb</CMD>
<CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblkxp1/%ek_name%-%ek_spec%.dtb">write dtb</CMD>
<!--烧写dtb-->
<CMD state="Updater" type="push" body="$ umount /mnt/mmcblkxp1">umount /mnt/mmcblkxp1</CMD>
<!--卸载分区-->
<CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>
<LIST name="Linux-4.1.15" desc="Target OS: Linux-4.1.15">
<!--选择的OS Seled 为: Linux-4.1.15-->
<CMD state="BootStrap" type="boot" body="BootStrap" file ="mfgfiles-L4.1.15/uboot-%ek_name%-%ek_spec%.imx">boot: u-boot</CMD>
<!--通过定义的有效设备进行选择下载对应的文件到RAM中-->
<CMD state="BootStrap" type="load" file="mfgfiles-L4.1.15/mfg-zImage-myimx6a9" address="0x12000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">load: zImage(mfg)</CMD>
<!--由定义的设备选择对应文件目录的mfg-zImage-myimx6a9到RAM的0x12000000处-->
<CMD state="BootStrap" type="load" file="mfgfiles-L4.1.15/fsl-image-mfgtool-initramfs" address="0x12C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">load: initramfs</CMD>
<!--由定义的设备选择对应文件目录的fsl-image-mfgtool-initramfs到RAM的0x12C00000处-->
<CMD state="BootStrap" type="load" file="mfgfiles-L4.1.15/%ek_name%-%ek_spec%.dtb" address="0x18000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">load: dtb</CMD>
<!--由定义的设备选择对应文件目录的dtb到RAM的0x18000000处-->
<CMD state="BootStrap" type="jump">jump</CMD>0
<!--通知内嵌ROM代码跳转到内存中的镜像执行-->
<CMD state="Updater" type="push" body="send" file="mfgfiles-L4.1.15/mksdcard-4115.sh.tar">send: mksdcard</CMD>
<!--下载对应的mksdcard-4115.sh.tar-->
<CMD state="Updater" type="push" body="$ tar xf $FILE ">tar mksdcard</CMD>
<!--类型是push,此句在目标机上执行 创建设备节点, 解压脚本文件-->
<CMD state="Updater" type="push" body="$ sh mksdcard.sh /dev/mmcblk3">sh mksdcard</CMD>
<!--执行分区脚本-->
<CMD state="Updater" type="push" body="$ flash_erase /dev/mtd0 0 0">exec flash_erase</CMD>
<!--擦除/dev/mtd0 0 0 flash的内容-->
<CMD state="Updater" type="push" body="send" file="image-L4.1.15-uboot/uboot-%ek_name%-%ek_spec%.imx">send: u-boot</CMD>
<!--创建设备节点, 解压u-boot.imx-->
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mtd0 bs=1k seek=1">write u-boot</CMD>
<!--dd命令烧写u-boot-->
<CMD state="Updater" type="push" body="$ mkfs.vfat /dev/mmcblk3p1">mkfs.vfat</CMD>
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblkxp1">mkdir /mnt/mmcblkxp1</CMD>
<CMD state="Updater" type="push" body="$ mount -t vfat /dev/mmcblk3p1 /mnt/mmcblkxp1">mount vfat</CMD>
<!--格式化FAT分区,创建目录并挂载分区-->
<CMD state="Updater" type="push" body="send" file="image-L4.1.15-uboot/my_logo.bmp">send: logo</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk3 bs=1 seek=1048576 skip=54">write logo</CMD>
<!--烧写logo图-->
<CMD state="Updater" type="push" body="send" file="image-L4.1.15-uboot/my_environment.scr">send: environment</CMD>
<CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblkxp1/my_environment.scr">write environment</CMD>
<!--烧写uboot环境变量-->
<CMD state="Updater" type="push" body="send" file="image-L4.1.15-dtb/%ek_name%-%ek_spec%.dtb">send: dtb</CMD>
<CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblkxp1/%ek_name%-%ek_spec%.dtb">write dtb</CMD>
<!--烧写dtb-->
<CMD state="Updater" type="push" body="send" file="image-L4.1.15-kernel/zImage-myimx6a9">send: zImage</CMD>
<CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblkxp1/zImage-myimx6a9">write zImage</CMD>
<!--烧写内核-->
<CMD state="Updater" type="push" body="$ umount /mnt/mmcblkxp1">umount /mnt/mmcblkxp1</CMD>
<!--卸载fat分区-->
<CMD state="Updater" type="push" body="$ mkfs.ext4 -F -j /dev/mmcblk3p2">mkfs.ext</CMD>
<!--mkfs.ext4格式化文件系统分区-->
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblkxp2">mkdir /mnt/mmcblkxp2</CMD>
<CMD state="Updater" type="push" body="$ mount -t ext4 /dev/mmcblk3p2 /mnt/mmcblkxp2">mount ext</CMD>
<!--创建存放的目录并挂载-->
<CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblkxp2" file="image-L4.1.15-rootfs/%my_rootfs%">pipe: rootfs</CMD>
<CMD state="Updater" type="push" body="frf">frf: rootfs</CMD>
<!--利用pipe传输大数据,解压文件系统-->
<CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblkxp2" file="image-L4.1.15-kernel/kernel-modules-myimx6a9.tar.bz2">pipe: modules</CMD>
<CMD state="Updater" type="push" body="frf">frf: modules</CMD>
<!--刷新,等待数据传送完成-->
<!--利用pipe传输大数据,解压模块文件-->
<CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt" file="image-L4.1.15-update/L4115-rootfs-config.tar.bz2">pipe: configs</CMD>
<CMD state="Updater" type="push" body="frf">frf: config</CMD>
<CMD state="Updater" type="push" body="$ sh /mnt/myzr-rootfs-config /mnt/mmcblkxp2 %ek_name% %my_rootfs% normal">sh configs</CMD>
<CMD state="Updater" type="push" body="frf">frf: config</CMD>
<!--利用pipe传输大数据,解压L4115-rootfs-config.tar.bz2文件,执行脚本文件-->
<CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblkxp2" file="image-L4.1.15-update/L4115-rootfs-update.tar.bz2">pipe: update</CMD>
<CMD state="Updater" type="push" body="frf">frf: update</CMD>
<!--利用pipe传输大数据,解压L4115-rootfs-update.tar.bz2文件-->
<CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblkxp2" file="image-L4.1.15-update/my-demo.tar.bz2">pipe: demo</CMD>
<CMD state="Updater" type="push" body="frf">frf: demo</CMD>
<!--利用pipe传输大数据,解压demo文件-->
<CMD state="Updater" type="push" body="$ umount /mnt/mmcblkxp2">umount /mnt/mmcblkxp2</CMD>
<!--卸载文件-->
<CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>
</UCL>
|
|