• NXP官方MfgTools工具使用


    1、前言

    MfgTools软件工具是NXP官方进行提供的用于I.MX系列的SoC进行系统烧写的一个软件,能在Windows系统上使用,通过USB OTG接口完成系统烧写,一般在开发板进行量产的时候进行使用,能提高系统的烧写效率,当然,肯定也能在系统调试时使用,对于该软件的获取,直接去NXP官方网站上即可获取。

    2、MfgTools基本原理

    接下来,将对MfgTools的系统烧写基本原理进行简单介绍,软件下载解压后,目录如下所示:

    可以看到,MfgTools软件目录下的目录和文件非常多,但是我们并不需要全部了解和关心,了解进行系统烧写时需要用到和修改的就好,软件目录下的MfgTool2.exe就是烧写软件,以.vbs结尾的文件就是烧写的配置文件,该软件能支持多款I.MX系统的SoC系统烧写,还能支持Nand Flash、eMMC和SD卡等存储介质系统烧写,因此,在对每一款SoC进行系统烧写之前,肯定要进行配置,指定好需要烧写的芯片以及存储介质,.vbs结尾的文件就是配置脚本,能直接双击运行,例如,下面的.vbs脚本功能:

    脚本文件 功能
    mfgtool2-yocto-mx-evk-emmc.vbs NXP官方evk评估板的eMMC烧写脚本
    mfgtool2-yocto-mx-evk-nand.vbs NXP官方evk评估板的Nand Flash烧写脚本

    MfgTools烧写的基本原理为将目标板的启动模式设置为Serial Downloader模式(BOOT_MODE[1:0]=01),然后通过USB OTG接口将uboot、Linux kernel和dtb等下载到DRAM内存中,然后将DRAM里面的Linux系统启动起来,接下来通过这个启动的Linux系统将目标镜像固化到Nand Flash、eMMC或SD卡等,所以整个固件烧写的过程大致可以分为两个阶段进行。

    接下来,看看该软件烧写的固件在哪里,进入到下面的目录:

    L4.1.15_2.0.0-ga_mfg-toolsmfgtools-without-rootfsmfgtoolsProfilesLinuxOS Firmware

    该目录打开后,如下:

    我们主要关注的是files和firmware这两个文件夹,还有ucl2.xml文件,其中files和firmware目录中保存了我们需要烧写的固件,files文件夹中保存了需要固化到存储介质的镜像文件,firmware文件夹中保存了我们需要在DRAM中启动的Linux系统镜像,ucl2.xml文件描述了整个烧写过程,决定了我们要向哪个SoC烧写哪个固件,因此这些文件夹和目录非常重要,必须要清晰地了解。

    在了解这些文件之前,先来看看前面介绍到.vbs脚本文件,例如mfgtool2-yocto-mx-evk-nand.vbs,烧写Nand Flash的配置脚本,该文件代码如下:

    Set wshShell = CreateObject("WScript.shell")
    wshShell.run "mfgtool2.exe -c ""linux"" -l ""NAND Flash"" -s 
    ""sxuboot=sabreauto"" -s ""sxdtb=sabreauto"" -s
    ""6uluboot=14x14evk"" -s ""6uldtb=14x14-evk"" -s
    ""board=sabreauto"" -s ""nand=nand"" -s ""nanddtb=gpmi-weim"" -s
    ""part_uboot=0"" -s ""part_kernel=1"" -s ""part_dtb=2"" -s ""part_rootfs=3"" " Set wshShell = Nothing

    可以看到,该脚本运行了目录下的mfgtool2.exe软件,并且定义了一堆的变量,变量都有相应的值,对于i.mx6ul这款SoC从Nand Flash中启动,总结一些重要的变量,如下:

    "6uluboot=14x14evk"
    "6uldtb=14x14-evk"
    "nand=nand"
    "nanddtb=gpmi-weim"
    "part_uboot=0"
    "part_kernel=1"
    "part_dtb=2"
    "part_rootfs=3"

    得到了这些变量后,接下来,我们看看ucl2.xml文件,该文件将决定烧写什么固件,怎么烧写,先来看看该文件的整体框架,如下所示:

    可以看到,整个.xml文件是从"<UCL>"开始,然后以"</UCL>"结束,"<CFG>"到"</CFG>"之间貌似是配置相关的内容,判断当前是在给I.MX系列的哪个SoC进行镜像烧写,并且具有很多个<LIST>描述的内容,"<LIST>"和"</LIST>"之间很明显是针对不同存储介质所要执行的烧写命令。

    接下来,展开其中的一个"<LIST>"进行讲解,以烧写Nand Flash存储介质这个"<LIST>"为例看看相关的命令,在上面已经提及过,MfgTools软件烧写大致分为两个阶段,第一阶段是通过USB OTG接口将uboot、Linux kernel和dtb等下载到DRAM中,并将该Linux系统进行启动,第二阶段则是通过这个启动的Linux系统将目标镜像固化到存储介质中,烧写Nand Flash的"<LIST>"代码如下:

      <LIST name="NAND Flash" desc="Choose NAND as media">
        
        <!--load the uboot to DRAM: -->
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6q%plus%%board%_%nand%.imx" ifdev="MX6Q">Loading U-boot</CMD>
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6dl%board%_%nand%.imx" ifdev="MX6D">Loading U-boot</CMD>
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6sx%sxuboot%_%nand%.imx" ifdev="MX6SX">Loading U-boot</CMD>
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx7d%7duboot%_%nand%.imx" ifdev="MX7D">Loading U-boot</CMD>
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%6uluboot%_%nand%.imx" ifdev="MX6UL">Loading U-boot</CMD>
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%lite%%6uluboot%_%nand%.imx" ifdev="MX6ULL">Loading U-boot</CMD>
    
        <!--load the kernel to DRAM: -->
        <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>
    
        <!--load the initramfs to DRAM: -->
        <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>
    
        <!--load the dtb to DRAM: -->
        <CMD state="BootStrap" type="load" file="firmware/zImage-imx6q%plus%-%board%-%nanddtb%.dtb" address="0x18000000"
            loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading device tree.</CMD>
        <CMD state="BootStrap" type="load" file="firmware/zImage-imx6dl-%board%-%nanddtb%.dtb" address="0x18000000"
            loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6D">Loading device tree.</CMD>
        <CMD state="BootStrap" type="load" file="firmware/zImage-imx6sx-%sxdtb%-%nanddtb%.dtb" address="0x83000000"
                    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SX">Loading device tree.</CMD>
        <CMD state="BootStrap" type="load" file="firmware/zImage-imx7d-%7ddtb%-%nanddtb%.dtb" address="0x83000000"
                    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX7D">Loading device tree.</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>
    
        <!--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-imx6q%plus%%board%_%nand%.imx" ifdev="MX6Q">Sending U-Boot</CMD>
        <CMD state="Updater" type="push" body="send" file="files/u-boot-imx6dl%board%_%nand%.imx" ifdev="MX6D">Sending U-Boot</CMD>
        <CMD state="Updater" type="push" body="send" file="files/u-boot-imx6sx%sxuboot%_%nand%.imx" ifdev="MX6SX">Sending U-Boot</CMD>
        <CMD state="Updater" type="push" body="send" file="files/u-boot-imx7d%7duboot%_%nand%.imx" ifdev="MX7D">Sending U-Boot</CMD>
        <CMD state="Updater" type="push" body="send" file="files/u-boot-imx6ul%6uluboot%_%nand%.imx" ifdev="MX6UL">Sending u-boot.bin</CMD>
        <CMD state="Updater" type="push" body="send" file="files/u-boot-imx6ul%lite%%6uluboot%_%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">Sending kernel zImage</CMD>
        <CMD state="Updater" type="push" body="$ nandwrite -p /dev/mtd%part_kernel% -p $FILE">Flashing Kernel</CMD>
    
        <!--burn the dtb to NAND: -->
        <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-imx6q%plus%-%board%-%nanddtb%.dtb" ifdev="MX6Q">Sending Device Tree file</CMD>
        <CMD state="Updater" type="push" body="send" file="files/zImage-imx6dl-%board%-%nanddtb%.dtb" ifdev="MX6D">Sending Device Tree file</CMD>
        <CMD state="Updater" type="push" body="send" file="files/zImage-imx6sx-%sxdtb%-%nanddtb%.dtb" ifdev="MX6SX">Sending Device Tree file</CMD>
        <CMD state="Updater" type="push" body="send" file="files/zImage-imx7d-%7ddtb%-%nanddtb%.dtb" ifdev="MX7D">Sending Device Tree file</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.tar.bz2" ifdev="MX6SL MX6D MX6Q MX6SX">Sending and writting rootfs</CMD>
        <CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mtd%part_rootfs%" file="files/rootfs_nogpu.tar.bz2" ifdev="MX6UL MX7D 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>

    接下来,我们将分两个阶段对这些代码进行分析,从代码中可以看到,对固件的烧写会进行设备的判断,毕竟该软件适用于NXP中I.MX系列的SoC烧写,将以i.mx6ul这款SoC进行举例分析,看看这两个阶段到底是烧写了哪些固件。

    第一阶段的代码如下:

        <!--load the uboot to DRAM: -->
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6q%plus%%board%_%nand%.imx" ifdev="MX6Q">Loading U-boot</CMD>
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6dl%board%_%nand%.imx" ifdev="MX6D">Loading U-boot</CMD>
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6sx%sxuboot%_%nand%.imx" ifdev="MX6SX">Loading U-boot</CMD>
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx7d%7duboot%_%nand%.imx" ifdev="MX7D">Loading U-boot</CMD>
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%6uluboot%_%nand%.imx" ifdev="MX6UL">Loading U-boot</CMD>
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%lite%%6uluboot%_%nand%.imx" ifdev="MX6ULL">Loading U-boot</CMD>
    
        <!--load the kernel to DRAM: -->
        <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>
    
        <!--load the initramfs to DRAM: -->
        <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>
    
        <!--load the dtb to DRAM: -->
        <CMD state="BootStrap" type="load" file="firmware/zImage-imx6q%plus%-%board%-%nanddtb%.dtb" address="0x18000000"
            loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading device tree.</CMD>
        <CMD state="BootStrap" type="load" file="firmware/zImage-imx6dl-%board%-%nanddtb%.dtb" address="0x18000000"
            loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6D">Loading device tree.</CMD>
        <CMD state="BootStrap" type="load" file="firmware/zImage-imx6sx-%sxdtb%-%nanddtb%.dtb" address="0x83000000"
                    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SX">Loading device tree.</CMD>
        <CMD state="BootStrap" type="load" file="firmware/zImage-imx7d-%7ddtb%-%nanddtb%.dtb" address="0x83000000"
                    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX7D">Loading device tree.</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>

    "<CMD>"命令从上到下执行,如果当前的SoC为i.mx6ul的话,也就是dev="MX6UL",那么将会先执行下面的"<CMD>"将uboot下载到DRAM内存中:

    <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%6uluboot%_%nand%.imx" ifdev="MX6UL">Loading U-boot</CMD>

    可以知道下载的固件文件是在firmware目录下,文件为:

    file ="firmware/u-boot-imx6ul%6uluboot%_%nand%.imx"

    在上面对.vbs文件进行分析的时候,已经对其中的变量进行总结了,如下:

    "6uluboot=14x14evk"
    "nand=nand"

    将其替换后,也就是该"<CMD>"执行后,对于i.mx6ul这款SoC将会下载下面这个uboot文件到DRAM中:

    file ="firmware/u-boot-imx6ul14x14evk_nand.imx"

    接下来,将会执行下一个"<CMD>",将会将kernel下载到DRAM中,如下:

    <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>

    可以看到,kernel下载到DRAM的0x80800000内存地址中,要下载的kernel固件如下:

    file="firmware/zImage"

    继续执行下一个"<CMD>",将会将initramfs下载到DRAM中,如下:

    <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>

    可以看到,initramfs被下载到DRAM的0x83800000内存地址中,下载的固件为:

    file="firmware/%initramfs%"

    继续执行下一个"<CMD>",将dtb固件下载到DRAM中,如下:

    <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>

    可以看到,dtb将被下载到DRAM的0x83000000内存地址中,下载的固件为:

    file="firmware/zImage-imx6ul-%6uldtb%-%nanddtb%.dtb"

    将其中的变量替换后,下载的dtb固件如下:

    file="firmware/zImage-imx6ul-14x14evk-gpmi-weim.dtb"

    在第一阶段的最后,则是Jumping to OS image,应该就是去启动这个已经下载到DRAM的Linux系统,从而进入到系统烧写的第二个阶段,在看第二阶段的代码前,先总结一下第一阶段烧写了哪些固件,基于i.mx6ul这款SoC,下载到DRAM的固件如下:

    固件 下载文件
    uboot firmware/u-boot-imx6ul14x14evk_nand.imx
    kernel firmware/zImage
    initramfs firmware/%initramfs%
    dtb firmware/zImage-imx6ul-14x14evk-gpmi-weim.dtb

    接下来,继续分析第二阶段的代码,该阶段则是通过启动的Linux系统将需要烧写的镜像固化到目标板存储介质中,首先是烧写uboot到Nand Flash的"<CMD>",如下:

    <!--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-imx6q%plus%%board%_%nand%.imx" ifdev="MX6Q">Sending U-Boot</CMD>
    <CMD state="Updater" type="push" body="send" file="files/u-boot-imx6dl%board%_%nand%.imx" ifdev="MX6D">Sending U-Boot</CMD>
    <CMD state="Updater" type="push" body="send" file="files/u-boot-imx6sx%sxuboot%_%nand%.imx" ifdev="MX6SX">Sending U-Boot</CMD>
    <CMD state="Updater" type="push" body="send" file="files/u-boot-imx7d%7duboot%_%nand%.imx" ifdev="MX7D">Sending U-Boot</CMD>
    <CMD state="Updater" type="push" body="send" file="files/u-boot-imx6ul%6uluboot%_%nand%.imx" ifdev="MX6UL">Sending u-boot.bin</CMD>
    <CMD state="Updater" type="push" body="send" file="files/u-boot-imx6ul%lite%%6uluboot%_%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>

    在烧写uboot之前,需要执行下面的"<CMD>"将Nand Flash中存储uboot的区域进行擦除:

    <CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%part_uboot% 0 0">Erasing Boot partition</CMD>

    将其中的变量进行替换后,也就是会执行下面的命令进行擦除Nand Flash中uboot的区域:

    flash_erase /dev/mtd0 0 0

    对于i.mx6ul这款SoC,接下来会执行下面的"<CMD>",通过USB OTG接口发送要固化的uboot固件:

    <CMD state="Updater" type="push" body="send" file="files/u-boot-imx6ul%6uluboot%_%nand%.imx" ifdev="MX6UL">Sending u-boot.bin</CMD>

    同样道理,将其中的变量替换后,也就得到了要固化的uboot的文件,如下:

    file ="files/u-boot-imx6ul14x14evk_nand.imx"

    接下来,就是执行下面这个"<CMD>"进行uboot固件烧写:

    <CMD state="Updater" type="push" body="$ kobs-ng init -x -v --chip_0_device_path=/dev/mtd%part_uboot% $FILE">Flashing Bootloader</CMD>

    对该语句还不是很懂,先跳过该分析。

    继续往下分析,就是烧写kernel到Nand Flash的"<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">Sending kernel zImage</CMD>
    <CMD state="Updater" type="push" body="$ nandwrite -p /dev/mtd%part_kernel% -p $FILE">Flashing Kernel</CMD>

    同样是先擦除Nand Flash中存储kernel镜像的区域,执行的是下面的命令进行擦除:

    flash_erase /dev/mtd1 0 0

    接下来,通过USB OTG接口将kernel zImage发送,并使用下面的命令,将kernel固化到目标板的Nand Flash中:

    nandwrite -p /dev/mtd1 -p $FILE

    烧写的kernel固件为:

    file="files/zImage"

    接下来,继续分析,则是烧写dtb到Nand Flash的"<CMD>",代码如下所示:

        <!--burn the dtb to NAND: -->
        <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-imx6q%plus%-%board%-%nanddtb%.dtb" ifdev="MX6Q">Sending Device Tree file</CMD>
        <CMD state="Updater" type="push" body="send" file="files/zImage-imx6dl-%board%-%nanddtb%.dtb" ifdev="MX6D">Sending Device Tree file</CMD>
        <CMD state="Updater" type="push" body="send" file="files/zImage-imx6sx-%sxdtb%-%nanddtb%.dtb" ifdev="MX6SX">Sending Device Tree file</CMD>
        <CMD state="Updater" type="push" body="send" file="files/zImage-imx7d-%7ddtb%-%nanddtb%.dtb" ifdev="MX7D">Sending Device Tree file</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>

    同样是先使用flash_erase命令擦除Nand Flash中存储dtb区域,使用的是下面的命令:

    flash_erase /dev/mtd2 0 0

    对于i.mx6ul这款SoC的话,要烧写的dtb固件为:

    file="files/zImage-imx6ul-%6uldtb%-%nanddtb%.dtb"

    将其中的变量进行替换后,也就是下面的文件:

    file="files/zImage-imx6ul-14x14-evk-gpmi-weim.dtb"

    最后,则是烧写rootfs到Nand Flash的"<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.tar.bz2" ifdev="MX6SL MX6D MX6Q MX6SX">Sending and writting rootfs</CMD>
    <CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mtd%part_rootfs%" file="files/rootfs_nogpu.tar.bz2" ifdev="MX6UL MX7D 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> 

    同样也是要先使用flash_erase命令,将Nand Flash中存储rootfs的区域进行擦除,先执行下面的命令:

    flash_erase /dev/mtd3 0 0

    接下来就是进行rootfs的烧写,根文件系统的格式为ubifs,对于i.mx6ul这款SoC是没有GPU的,因此烧写的是下面的rootfs:

    file="files/rootfs_nogpu.tar.bz2"

    到这里,对第二阶段的系统烧写过程就介绍完了,接下来,基于i.mx6ul这款SoC,总结一下在第二阶段烧写了哪些文件:

    固件 文件
    uboot files/u-boot-imx6ul14x14evk_nand.imx
    kernel files/zImage
    dtb files/zImage-imx6ul-14x14-evk-gpmi-weim.dtb
    rootfs files/rootfs_nogpu.tar.bz2

    这就是整个MfgTools软件工具的大致烧写原理,所以当你打开files和firmware文件夹的时候,会发现里面保存了大量的uboot和kernel等固件,都是针对于NXP官方基于I.MX系统的SoC的评估板而定制的,弄懂了大致的烧写原理和烧写的文件后,接下来就可以进行MfgTools软件的定制了,编译好相关的固件后,修改相应的代码,从而适配自己定制的目标板。

    3、MfgTools更新固件

    在对MfgTools软件的基本烧写原理有大致的了解后,接下来,我们去使用这款软件去更新我们目标板的固件,笔者使用的是盈鹏飞公司研发生产的核心板CoM-P6UL(SoC:I.MX6UL,RAM:256MB,Nand Flash:256MB),如下:

    先编译和构建好我们需要烧写的uboot、kernel、dtb和rootfs相关固件,如下所示:

    接下来,将要烧写的固件文件名依次改成,上面分析MfgTools基本原理总结出来的文件名称,并将files和firmware的文件进行替换,当然,你也可以修改.vbs脚本配置文件和.xml文件,只要烧写的文件名称对应即可,修改后文件名后,如下:

    对应的文件名修改完成后,依次将对应的文件替换到files和firmware目录即可,这时候,我们需要烧写到Nand Flash的固件就准备好了。

    接下来,将目标板的启动方式设置为启动模式设置为Serial Downloader模式(BOOT_MODE[1:0]=01),然后通过USB OTG接口将目标板和PC进行连接,待驱动安装完成后,进入MfgTools软件目录,双击打开需要烧写的.vbs配置脚本文件,如下脚本:

    mfgtool2-yocto-mx-evk-nand.vbs

    打开软件后,如下所示,表示PC端和目标板已经成功连接,可以进行烧写了:

    在点击Start按钮烧写之前,可以通过usb to serial将调试的串口进行打开,能看到整个烧写过程打印的log,接下来点击Start开始烧写,如果固件没有问题的话,烧写成功如下:

    接下来,点击Stop按钮停止固件烧写,并点击Exit按钮退出MfgTools软件即可。

    最后,将目标板的启动方式设置为启动模式设置为Internal Boot模式(BOOT_MODE[1:0]=10),将调试串口打开,并重新对目标板上电,启动更新好的固件系统。

    使用软件更新固件时,串口打印的log如下:

    U-Boot 2016.03-g38d84df-dirty (Feb 21 2020 - 12:16:13 +0800)
    
    CPU:   Freescale i.MX6UL rev1.0 528 MHz (running at 396 MHz)
    CPU:   Industrial temperature grade (-40C to 105C) at 33C
    Reset cause: POR
    Board: MX6UL 14x14 COMP6UL
    I2C:   ready
    DRAM:  256 MiB
    NAND:  256 MiB
    MMC:   FSL_SDHC: 0, FSL_SDHC: 1
    *** Warning - bad CRC, using default environment
    
    Display: TFT43AB (480x272)
    Video: 480x272x24
    In:    serial
    Out:   serial
    Err:   serial
    Net:   Board Net Initialization Failed
    No ethernet found.
    Boot from USB for mfgtools
    Use default environment for                              mfgtools
    Run bootcmd_mfg: run mfgtool_args;bootz ${loadaddr} ${initrd_addr} ${fdt_addr};
    Hit any key to stop autoboot:  0
    Kernel image @ 0x80800000 [ 0x000000 - 0x554130 ]
    ## Loading init Ramdisk from Legacy Image at 83800000 ...
       Image Name:   fsl-image-mfgtool-initramfs-imx6
       Image Type:   ARM Linux RAMDisk Image (gzip compressed)
       Data Size:    8591032 Bytes = 8.2 MiB
       Load Address: 00000000
       Entry Point:  00000000
       Verifying Checksum ... OK
    ## Flattened Device Tree blob at 83000000
       Booting using the fdt blob at 0x83000000
       Using Device Tree in place at 83000000, end 8300beef
    Modify /soc/aips-bus@02000000/bee@02044000:status disabled
    ft_system_setup for mx6
    
    Starting kernel ...
    
    Booting Linux on physical CPU 0x0
    Linux version 4.1.15+ (bamboo@yb6) (gcc version 5.3.0 (GCC) ) #1 SMP PREEMPT Fri Sep 16 18:10:49 CDT 2016
    CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    Machine model: Freescale i.MX6 UltraLite 14x14 EVK Board
    Reserved memory: failed to allocate memory for node 'linux,cma'
    cma: Failed to reserve 320 MiB
    Memory policy: Data cache writealloc
    PERCPU: Embedded 12 pages/cpu @8fdd3000 s16716 r8192 d24244 u49152
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
    Kernel command line: console=ttymxc0,115200 rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.removable=1 g_mass_storage.file=/fat g_mass_storage.ro=1 g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF g_mass_storage.iSerialNumber= mtdparts=gpmi-nand:4m(boot),16m(kernel),512k(dtb),-(rootfs) clk_ignore_unused
    PID hash table entries: 1024 (order: 0, 4096 bytes)
    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    Memory: 240812K/262144K available (6903K kernel code, 320K rwdata, 2416K rodata, 384K init, 423K bss, 21332K reserved, 0K cma-reserved, 0K highmem)
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
        vmalloc : 0x90800000 - 0xff000000   (1768 MB)
        lowmem  : 0x80000000 - 0x90000000   ( 256 MB)
        pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
        modules : 0x7f000000 - 0x7fe00000   (  14 MB)
          .text : 0x80008000 - 0x80921fd8   (9320 kB)
          .init : 0x80922000 - 0x80982000   ( 384 kB)
          .data : 0x80982000 - 0x809d2080   ( 321 kB)
           .bss : 0x809d5000 - 0x80a3ee54   ( 424 kB)
    SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Preemptible hierarchical RCU implementation.
            Additional per-CPU info printed with stalls.
            RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
    RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
    NR_IRQS:16 nr_irqs:16 16
    mxc_clocksource_init 24000000
    Switching to timer-based delay loop, resolution 41ns
    sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    Console: colour dummy device 80x30
    Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    CPU: Testing write buffer coherency: ok
    /cpus/cpu@0 missing clock-frequency property
    CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    Setting up static identity map for 0x80008280 - 0x800082f0
    Brought up 1 CPUs
    SMP: Total of 1 processors activated (48.00 BogoMIPS).
    CPU: All CPU(s) started in SVC mode.
    devtmpfs: initialized
    device-tree: Duplicate name in lcdif@021c8000, renamed to "display#1"
    VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
    clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    pinctrl core: initialized pinctrl subsystem
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    cpuidle: using governor ladder
    cpuidle: using governor menu
    hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    hw-breakpoint: maximum watchpoint size is 8 bytes.
    imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
    mxs-dma 1804000.dma-apbh: initialized
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    i2c i2c-0: IMX I2C adapter registered
    i2c i2c-0: can't use DMA
    i2c i2c-1: IMX I2C adapter registered
    i2c i2c-1: can't use DMA
    Linux video capture interface: v2.00
    pps_core: LinuxPPS API ver. 1 registered
    pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    PTP clock support registered
    Advanced Linux Sound Architecture Driver Initialized.
    Switched to clocksource mxc_timer1
    NET: Registered protocol family 2
    TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 2048 bind 2048)
    UDP hash table entries: 256 (order: 1, 8192 bytes)
    UDP-Lite hash table entries: 256 (order: 1, 8192 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.
    Trying to unpack rootfs image as initramfs...
    Freeing initrd memory: 8392K (83800000 - 84032000)
    imx rpmsg driver is registered.
    Bus freq driver module loaded
    futex hash table entries: 256 (order: 2, 16384 bytes)
    VFS: Disk quotas dquot_6.6.0
    VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    NFS: Registering the id_resolver key type
    Key type id_resolver registered
    Key type id_legacy registered
    jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
    fuse init (API version 7.23)
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    imx-weim 21b8000.weim: Driver registered.
    backlight supply power not found, using dummy regulator
    21c8000.lcdif supply lcd not found, using dummy regulator
    mxsfb 21c8000.lcdif: failed to find mxc display driver
    Console: switching to colour frame buffer device 60x34
    mxsfb 21c8000.lcdif: initialized
    imx-sdma 20ec000.sdma: no event needs to be remapped
    imx-sdma 20ec000.sdma: loaded firmware 3.3
    imx-sdma 20ec000.sdma: initialized
    2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 20, base_baud = 5000000) is a IMX
    console [ttymxc0] enabled
    21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 234, base_baud = 5000000) is a IMX
    imx sema4 driver is registered.
    [drm] Initialized drm 1.1.0 20060810
    [drm] Initialized vivante 1.0.0 20120216 on minor 0
    brd: module loaded
    loop: module loaded
    nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
    nand: Micron MT29F2G08ABAEAWP
    nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
    gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
    Bad block table found at page 131008, version 0x01
    Bad block table found at page 130944, version 0x01
    4 cmdlinepart partitions found on MTD device gpmi-nand
    Creating 4 MTD partitions on "gpmi-nand":
    0x000000000000-0x000000400000 : "boot"
    0x000000400000-0x000001400000 : "kernel"
    0x000001400000-0x000001480000 : "dtb"
    0x000001480000-0x000010000000 : "rootfs"
    gpmi-nand 1806000.gpmi-nand: driver registered.
    20b4000.ethernet supply phy not found, using dummy regulator
    pps pps0: new PPS source ptp0
    fec 20b4000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
    fec 20b4000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: da:8d:aa:a3:59:c6
    libphy: fec_enet_mii_bus: probed
    fec 20b4000.ethernet eth0: registered PHC device 0
    2188000.ethernet supply phy not found, using dummy regulator
    pps pps1: new PPS source ptp1
    fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
    fec 2188000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 66:a2:80:79:e8:dc
    fec 2188000.ethernet eth1: registered PHC device 1
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    ehci-mxc: Freescale On-Chip EHCI Host driver
    usbcore: registered new interface driver usb-storage
    2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
    2184000.usb supply vbus not found, using dummy regulator
    2184200.usb supply vbus not found, using dummy regulator
    ci_hdrc ci_hdrc.1: EHCI Host Controller
    ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
    ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    Mass Storage Function, version: 2009/09/11
    LUN: removable file: (no medium)
    LUN: removable read only file: /fat
    Number of LUNs=1
    Number of LUNs=1
    g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
    g_mass_storage gadget: g_mass_storage ready
    mousedev: PS/2 mouse device common for all mice
    input: 20cc000.snvs:snvs-powerkey as /devices/platform/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0
    input: iMX6UL TouchScreen Controller as /devices/platform/soc/2000000.aips-bus/2040000.tsc/input/input1
    snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
    i2c /dev entries driver
    IR NEC protocol handler initialized
    IR RC5(x/sz) protocol handler initialized
    IR RC6 protocol handler initialized
    IR JVC protocol handler initialized
    IR Sony protocol handler initialized
    IR SANYO protocol handler initialized
    IR Sharp protocol handler initialized
    IR MCE Keyboard/mouse protocol handler initialized
    IR XMP protocol handler initialized
    pxp-v4l2 pxp_v4l2: initialized
    imx2-wdt 20bc000.wdog: use WDOG_B to reboot.
    imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
    sdhci: Secure Digital Host Controller Interface driver
    sdhci: Copyright(c) Pierre Ossman
    sdhci-pltfm: SDHCI platform and OF driver helper
    /soc/aips-bus@02100000/usdhc@02190000: voltage-ranges unspecified
    sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO
    sdhci-esdhc-imx 2190000.usdhc: No vqmmc regulator found
    mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    NET: Registered protocol family 10
    sit: IPv6 over IPv4 tunneling driver
    NET: Registered protocol family 17
    Key type dns_resolver registered
    Registering SWP/SWPB emulation handler
    g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage
    snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01 00:00:00 UTC (0)
    VSD_3V3: disabling
    can-3v3: disabling
    clk: Not disabling unused clocks
    ALSA device list:
    usb 1-1: new high-speed USB device number 2 using ci_hdrc
      No soundcards found.
    Freeing unused kernel memory: 384K (80922000 - 80982000)
    Starting UTP
    uuc 0.5 [built Sep 16 2016 02:36:28]
    UTP: Waiting for device to appear
    UTP: file/device node /dev/utp already exists
    cpu_id is 0
    UTP: received command '$ mount -t debugfs debugfs /sys/kernel/debug'
    UTP: executing "mount -t debugfs debugfs /sys/kernel/debug"
    UTP: sending Success to kernel for command $ mount -t debugfs debugfs /sys/kernel/debug.
    hub 1-1:1.0: USB hub found
    hub 1-1:1.0: 4 ports detected
    utp_poll: pass returned.
    UTP: received command '$ flash_erase /dev/mtd0 0 0'
    UTP: executing "flash_erase /dev/mtd0 0 0"
    Erasing 128 Kibyte @ 3e0000 -- 100 % complete
    UTP: sending Success to kernel for command $ flash_erase /dev/mtd0 0 0.
    utp_poll: pass returned.
    UTP: received command 'send'
    UTP: sending Success to kernel for command send.
    UTP: received command '$ kobs-ng init -x -v --chip_0_device_path=/dev/mtd0 $FILE'
    UTP: executing "kobs-ng init -x -v --chip_0_device_path=/dev/mtd0 $FILE"
    MTD CONFIG:
      chip_0_device_path = "/dev/mtd0"
      chip_1_device_path = "(null)"
      search_exponent = 2
      data_setup_time = 80
      data_hold_time = 60
      address_setup_time = 25
      data_sample_time = 6
      row_address_size = 3
      column_address_size = 2
      read_command_code1 = 0
      read_command_code2 = 48
      boot_stream_major_version = 1
      boot_stream_minor_version = 0
      boot_stream_sub_version = 0
      ncb_version = 3
      boot_stream_1_address = 0
      boot_stream_2_address = 0
             -- We add the 1k-padding to the uboot.
    .tmp_kobs_ng: verifying using key '00000000000000000000000000000000'
    .tmp_kobs_ng: is a valid bootstream for key '00000000000000000000000000000000'
    mtd: use new bch layout raw access mode
    mtd: opening: "/dev/mtd0"
    NFC geometry :
            ECC Strength       : 4
            Page Size in Bytes : 2084
            Metadata size      : 10
            ECC Chunk Size in byte : 512
            ECC Chunk count        : 4
            Block Mark Byte Offset : 2018
            Block Mark Bit Offset  : 4
    ====================================================
    mtd: opened '/dev/mtd0' - '(null)'
    mtd: max_boot_stream_size_in_bytes = 1572864
    mtd: boot_stream_size_in_bytes = 471040
    mtd: boot_stream_size_in_pages = 230
    mtd: #1 0x00100000 - 0x00280000 (0x00173000)
    mtd: #2 0x00280000 - 0x00400000 (0x002f3000)
    FCB
      m_u32Checksum = 0x00000000
      m_u32FingerPrint = 0x20424346
      m_u32Version = 0x01000000
      m_NANDTiming.m_u8DataSetup = 80
      m_NANDTiming.m_u8DataHold = 60
      m_NANDTiming.m_u8AddressSetup = 25
      m_NANDTiming.m_u8DSAMPLE_TIME = 6
      m_u32PageDataSize = 2048
      m_u32TotalPageSize = 2112
      m_u32SectorsPerBlock = 64
      m_u32NumberOfNANDs = 0
      m_u32TotalInternalDie = 0
      m_u32CellType = 0
      m_u32EccBlockNEccType = 2
      m_u32EccBlock0Size = 512
      m_u32EccBlockNSize = 512
      m_u32EccBlock0EccType = 2
      m_u32MetadataBytes = 10
      m_u32NumEccBlocksPerPage = 3
      m_u32EccBlockNEccLevelSDK = 0
      m_u32EccBlock0SizeSDK = 0
      m_u32EccBlockNSizeSDK = 0
      m_u32EccBlock0EccLevelSDK = 0
      m_u32NumEccBlocksPerPageSDK = 0
      m_u32MetadataBytesSDK = 0
      m_u32EraseThreshold = 0
      m_u32Firmware1_startingPage = 512
      m_u32Firmware2_startingPage = 1280
      m_u32PagesInFirmware1 = 230
      m_u32PagesInFirmware2 = 230
      m_u32DBBTSearchAreaStartAddress = 256
      m_u32BadBlockMarkerByte = 2018
      m_u32BadBlockMarkerStartBit = 4
      m_u32BBMarkerPhysicalOffset = 2048
      m_u32BCHType = 0
      m_NANDTMTiming.m_u32TMTiming2_ReadLatency = 0
      m_NANDTMTiming.m_u32TMTiming2_PreambleDelay = 0
      m_NANDTMTiming.m_u32TMTiming2_CEDelay = 0
      m_NANDTMTiming.m_u32TMTiming2_PostambleDelay = 0
      m_NANDTMTiming.m_u32TMTiming2_CmdAddPause = 0
      m_NANDTMTiming.m_u32TMTiming2_DataPause = 0
      m_NANDTMTiming.m_u32TMSpeed = 0
      m_NANDTMTiming.m_u32TMTiming1_BusyTimeout = 0
      m_u32DISBBM = 0
      m_u32BBMarkerPhysicalOffsetInSpareData = 0
      m_u32OnfiSyncEnable = 0
      m_NANDONFITiming.m_u32ONFISpeed = 0
      m_NANDONFITiming.m_u32ONFITiming_ReadLatency = 0
      m_NANDONFITiming.m_u32ONFITiming_CEDelay = 0
      m_NANDONFITiming.m_u32ONFITiming_PreambleDelay = 0
      m_NANDONFITiming.m_u32ONFITiming_PostambleDelay = 0
      m_NANDONFITiming.m_u32ONFITiming_CmdAddPause = 0
      m_NANDONFITiming.m_u32ONFITiming_DataPause = 0
      m_NANDONFITiming.m_u32ONFITiming_BusyTimeout = 0
      m_u32DISBBSearch = 0
      m_u32RandomizerEnable = 0
      m_u32ReadRetryEnable = 0
      m_u32ReadRetrySeqLength = 0
    DBBT
      m_u32Checksum = 0x00000000
      m_u32FingerPrint = 0x54424244
      m_u32Version = 0x01000000
      m_u32DBBTNumOfPages = 0
    Firmware: image #0 @ 0x100000 size 0x73000 - available 0x180000
    Firmware: image #1 @ 0x280000 size 0x73000 - available 0x180000
    -------------- Start to write the [ FCB ] -----
    mtd: erasing @0:0x0-0x20000
    mtd: Writing FCB0 [ @0:0x0 ] (840) *
    mtd: erasing @0:0x20000-0x40000
    mtd: Writing FCB1 [ @0:0x20000 ] (840) *
    mtd: erasing @0:0x40000-0x60000
    mtd: Writing FCB2 [ @0:0x40000 ] (840) *
    mtd: erasing @0:0x60000-0x80000
    mtd: Writing FCB3 [ @0:0x60000 ] (840) *
    mtd_commit_bcb(FCB): status 0
    
    -------------- Start to write the [ DBBT ] -----
    mtd: erasing @0:0x80000-0xa0000
    mtd: Writing DBBT0 [ @0:0x80000 ] (800) *
    mtd: erasing @0:0xa0000-0xc0000
    mtd: Writing DBBT1 [ @0:0xa0000 ] (800) *
    mtd: erasing @0:0xc0000-0xe0000
    mtd: Writing DBBT2 [ @0:0xc0000 ] (800) *
    mtd: erasing @0:0xe0000-0x100000
    mtd: Writing DBBT3 [ @0:0xe0000 ] (800) *
    mtd_commit_bcb(DBBT): status 0
    
    ---------- Start to write the [ .tmp_kobs_ng ]----
    mtd: Writting .tmp_kobs_ng: #0 @0: 0x00100000 - 0x00173000
    mtd: erasing @0:0x100000-0x120000
    mtd: erasing @0:0x120000-0x140000
    mtd: erasing @0:0x140000-0x160000
    mtd: erasing @0:0x160000-0x180000
    mtd: We write one page for save guard. *
    mtd: Writting .tmp_kobs_ng: #1 @0: 0x00280000 - 0x002f3000
    mtd: erasing @0:0x280000-0x2a0000
    mtd: erasing @0:0x2a0000-0x2c0000
    mtd: erasing @0:0x2c0000-0x2e0000
    mtd: erasing @0:0x2e0000-0x300000
    mtd: We write one page for save guard. *
    UTP: sending Success to kernel for command $ kobs-ng init -x -v --chip_0_device_path=/dev/mtd0 $FILE.
    utp_poll: pass returned.
    UTP: received command '$ flash_erase /dev/mtd1 0 0'
    UTP: executing "flash_erase /dev/mtd1 0 0"
    Erasing 128 Kiutp_poll: pass returned.mplete
    Erasing 128 Kibyte @ fe0000 -- 100 % complete
    UTP: sending Success to kernel for command $ flash_erase /dev/mtd1 0 0.
    UTP: received command 'send'
    UTP: sending Success to kernel for command send.
    UTP: received command '$ nandwrite -p /dev/mtd1 -p $FILE'
    UTP: executing "nandwrite -p /dev/mtd1 -p $FILE"
    Writing data to block 0 at offset 0x0
    Writing data to block 1 at offset 0x20000
    Writing data to block 2 at offset 0x40000
    random: nonblocking pool is initialized
    Writing data to block 3 at offset 0x60000
    Writing data to block 4 at offset 0x80000
    Writing data to block 5 at offset 0xa0000
    Writing data to block 6 at offset 0xc0000
    Writing data to block 7 at offset 0xe0000
    Writing data to block 8 at offset 0x100000
    Writing data to block 9 at offset 0x120000
    Writing data to block 10 at offset 0x140000
    Writing data to block 11 at offset 0x160000
    Writing data to block 12 at offset 0x180000
    Writing data to block 13 at offset 0x1a0000
    Writing data to block 14 at offset 0x1c0000
    Writing data to block 15 at offset 0x1e0000
    Writing data to block 16 at offset 0x200000
    Writing data to block 17 at offset 0x220000
    Writing data to block 18 at offset 0x240000
    Writing data to block 19 at offset 0x260000
    Writing data to block 20 at offset 0x280000
    Writing data to block 21 at offset 0x2a0000
    Writing data to block 22 at offset 0x2c0000
    Writing data to block 23 at offset 0x2e0000
    Writing data to block 24 at offset 0x300000
    Writing data to block 25 at offset 0x320000
    Writing data to block 26 at offset 0x340000
    Writing data to block 27 at offset 0x360000
    Writing data to block 28 at offset 0x380000
    Writing data to block 29 at offset 0x3a0000
    Writing data to block 30 at offset 0x3c0000
    Writing data to block 31 at offset 0x3e0000
    Writing data to block 32 at offset 0x400000
    Writing data to block 33 at offset 0x420000
    Writing data to block 34 at offset 0x440000
    Writing data to block 35 at offset 0x460000
    Writing data to block 36 at offset 0x480000
    Writing data to block 37 at offset 0x4a0000
    Writing data to block 38 at offset 0x4c0000
    Writing data to block 39 at offset 0x4e0000
    Writing data to block 40 at offset 0x500000
    Writing data to block 41 at offset 0x520000
    Writing data to block 42 at offset 0x540000
    UTP: sending Success to kernel for command $ nandwrite -p /dev/mtd1 -p $FILE.
    utp_poll: pass returned.
    UTP: received command '$ flash_erase /dev/mtd2 0 0'
    UTP: executing "flash_erase /dev/mtd2 0 0"
    Erasing 128 Kibyte @ 60000 -- 100 % complete
    UTP: sending Success to kernel for command $ flash_erase /dev/mtd2 0 0.
    utp_poll: pass returned.
    UTP: received command 'send'
    UTP: sending Success to kernel for command send.
    UTP: received command '$ nandwrite -p /dev/mtd2 -p $FILE'
    UTP: executing "nandwrite -p /dev/mtd2 -p $FILE"
    Writing data to block 0 at offset 0x0
    UTP: sending Success to kernel for command $ nandwrite -p /dev/mtd2 -p $FILE.
    utp_poll: pass returned.
    UTP: received command '$ flash_erase /dev/mtd3 0 0'
    UTP: executing "flash_erase /dev/mtd3 0 0"
    Erasing 128 Kibutp_poll: pass returned.mplete
    Erasing 128 Kibyte @ eae0000 -- 99 % complete flash_erase: Skipping bad block at 0eb00000
    flash_erase: Skipping bad block at 0eb20000
    flash_erase: Skipping bad block at 0eb40000
    flash_erase: Skipping bad block at 0eb60000
    Erasing 128 Kibyte @ eb60000 -- 100 % complete
    UTP: sending Success to kernel for command $ flash_erase /dev/mtd3 0 0.
    UTP: received command '$ ubiformat /dev/mtd3'
    UTP: executing "ubiformat /dev/mtd3"
    ubiformat: mtd3 (nand), size 246939648 bytes (235.5 MiB), 1884 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
    libscan: scanning eraseblock 1883 -- 100 % complete
    ubiformat: 1880 eraseblocks are supposedly empty
    ubiformat: 4 bad eraseblocks found, numbers: 1880, 1881, 1882, 1883
    ubiformat: formutp_poll: pass returned.- 97 % complete
    ubiformat: formattiubi0: attaching mtd3- 97 % complete
    ubiformat: formatting eraseblock 1883 -- 100 % complete
    UTP: sending Success to kernel for command $ ubiformat /dev/mtd3.
    UTP: received command '$ ubiattach /dev/ubi_ctrl -m 3'
    UTP: executing "ubiattach /dev/ubi_ctrl -m 3"
    ubi0: scanning is finished
    ubi0: attached mtd3 (name "rootfs", size 235 MiB)
    ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
    ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
    ubi0: good PEBs: 1880, bad PEBs: 4, corrupted PEBs: 0
    ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
    ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 2137670860
    ubi0: available PEBs: 1840, total reserved PEBs: 40, PEBs reserved for bad PEB handling: 36
    ubi0: background thread "ubi_bgt0d" started, PID 63
    UBI device number 0, total 1880 LEBs (238714880 bytes, 227.7 MiB), available 1840 LEBs (233635840 bytes, 222.8 MiB), LEB size 126976 bytes (124.0 KiB)
    UTP: sending Success to kernel for command $ ubiattach /dev/ubi_ctrl -m 3.
    utp_poll: pass returned.
    UTP: received command '$ ubimkvol /dev/ubi0 -Nrootfs -m'
    UTP: executing "ubimkvol /dev/ubi0 -Nrootfs -m"
    Set volume size to 233635840
    Volume ID 0, size 1840 LEBs (233635840 bytes, 222.8 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
    UTP: sending Success to kernel for command $ ubimkvol /dev/ubi0 -Nrootfs -m.
    utp_poll: pass returned.
    UTP: received command '$ mkdir -p /mnt/mtd3'
    UTP: executing "mkdir -p /mnt/mtd3"
    UTP: sending Success to kernel for command $ mkdir -p /mnt/mtd3.
    utp_poll: pass returned.
    UTP: received command '$ mount -t ubifs ubi0:rootfs /mnt/mtd3'
    UTP: executing "mount -t ubifs ubi0:rootfs /mnt/mtd3"
    UBIFS (ubi0:0): default file-system created
    UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 67
    UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
    UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
    UBIFS (ubi0:0): FS size: 232112128 bytes (221 MiB, 1828 LEBs), journal size 11681792 bytes (11 MiB, 92 LEBs)
    UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB)
    UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID DF2F1515-2CA8-4BAC-9B5A-E6617BD743BC, small LPT model
    UTP: sending Success to kernel for command $ mount -t ubifs ubi0:rootfs /mnt/mtd3.
    utp_poll: pass returned.
    UTP: received command 'pipe tar -jxv -C /mnt/mtd3'
    pid is 68, UTP: executing "tar -jxv -C /mnt/mtd3"
    UTP: sending Success to kernel for command pipe tar -jxv -C /mnt/mtd3.
    ./
    ./opt/
    ./linuxrc
    ./mnt/
    ./var/
    ./var/log
    ./var/cache
    ./var/tmp
    ./var/spool
    ./var/lib/
    ./var/lib/alsa/
    ./var/lib/misc
    ./var/empty/
    ./var/run
    ./var/lock
    ./var/www/
    ./bin/
    ./bin/mknod
    ./bin/ash
    ./bin/chgrp
    ./bin/mv
    ./bin/sync
    ./bin/date
    ./bin/printenv
    ./bin/mt
    ./bin/sed
    ./bin/zcat
    ./bin/fgrep
    ./bin/echo
    ./bin/busybox
    ./bin/linux32
    ./bin/touch
    ./bin/pipe_progress
    ./bin/getopt
    ./bin/mkdir
    ./bin/gunzip
    ./bin/uname
    ./bin/chown
    ./bin/dumpkmap
    ./bin/sleep
    ./bin/hostname
    ./bin/rmdir
    ./bin/cpio
    ./bin/nice
    ./bin/pidof
    ./bin/mktemp
    ./bin/egrep
    ./bin/df
    ./bin/bash
    ./bin/setserial
    ./bin/cat
    ./bin/ln
    ./bin/tar
    ./bin/ping
    ./bin/mount
    ./bin/netstat
    ./bin/stty
    ./bin/more
    ./bin/true
    ./bin/grep
    ./bin/dnsdomainname
    ./bin/fdflush
    ./bin/vi
    ./bin/mountpoint
    ./bin/cp
    ./bin/run-parts
    ./bin/dd
    ./bin/kill
    ./bin/umount
    ./bin/catv
    ./bin/chmod
    ./bin/dmesg
    ./bin/su
    ./bin/ps
    ./bin/lsattr
    ./bin/false
    ./bin/gzip
    ./bin/rm
    ./bin/chattr
    ./bin/ls
    ./bin/setarch
    ./bin/usleep
    ./bin/watch
    ./bin/linux64
    ./bin/sh
    ./bin/login
    ./bin/pwd
    ./sys/
    ./etc/
    ./etc/hosts
    ./etc/boa/
    ./etc/boa/boa.conf
    ./etc/network/
    ./etc/network/if-up.d/
    ./etc/network/if-down.d/
    ./etc/network/if-post-down.d/
    ./etc/network/interfaces
    ./etc/network/if-pre-up.d/
    ./etc/network/if-pre-up.d/wait_iface
    ./etc/mime.types
    ./etc/udev/
    ./etc/udev/udev.conf
    ./etc/udev/rules.d/
    ./etc/services
    ./etc/ssl/
    ./etc/ssl/private/
    ./etc/ssl/man/
    ./etc/ssl/man/man7/
    ./etc/ssl/man/man5/
    ./etc/ssl/man/man1/
    ./etc/ssl/man/man3/
    ./etc/ssl/openssl.cnf
    ./etc/ssl/certs/
    ./etc/ssl/misc/
    ./etc/protocols
    ./etc/profile.d/
    ./etc/profile.d/umask.sh
    ./etc/issue
    ./etc/fstab
    ./etc/hostname
    ./etc/ssh/
    ./etc/ssh/moduli
    ./etc/ssh/ssh_config
    ./etc/ssh/sshd_config
    ./etc/wpa_supplicant.conf
    ./etc/shadow
    ./etc/nsswitch.conf
    ./etc/profile
    ./etc/init.d/
    ./etc/init.d/S10udev
    ./etc/init.d/S40network
    ./etc/init.d/rcS
    ./etc/init.d/S20urandom
    ./etc/init.d/S50sshd
    ./etc/init.d/rcK
    ./etc/init.d/S01logging
    ./etc/passwd
    ./etc/mtab
    ./etc/group
    ./etc/resolv.conf
    ./etc/libnl/
    ./etc/libnl/classid
    ./etc/libnl/pktloc
    ./etc/inputrc
    ./etc/os-release
    ./etc/inittab
    ./proc/
    ./tmp/
    ./root/
    ./media/
    ./lib/
    ./lib/libatomic.so.1.1.0
    ./lib/libatomic.so.1
    ./lib/udev/
    ./lib/udev/cdrom_id
    ./lib/udev/mtd_probe
    ./lib/udev/scsi_id
    ./lib/udev/ata_id
    ./lib/udev/rules.d/
    ./lib/udev/rules.d/80-net-name-slot.rules
    ./lib/udev/rules.d/60-cdrom_id.rules
    ./lib/udev/rules.d/70-mouse.rules
    ./lib/udev/rules.d/80-drivers.rules
    ./lib/udev/rules.d/60-persistent-v4l.rules
    ./lib/udev/rules.d/50-udev-default.rules
    ./lib/udev/rules.d/60-block.rules
    ./lib/udev/rules.d/60-persistent-storage.rules
    ./lib/udev/rules.d/75-probe_mtd.rules
    ./lib/udev/rules.d/78-sound-card.rules
    ./lib/udev/rules.d/64-btrfs.rules
    ./lib/udev/rules.d/60-persistent-storage-tape.rules
    ./lib/udev/rules.d/60-drm.rules
    ./lib/udev/rules.d/75-net-description.rules
    ./lib/udev/rules.d/60-evdev.rules
    ./lib/udev/rules.d/60-persistent-alsa.rules
    ./lib/udev/rules.d/60-serial.rules
    ./lib/udev/rules.d/60-persistent-input.rules
    ./lib/udev/v4l_id
    ./lib/udev/collect
    ./lib/libiw.so.30
    ./lib/libblkid.so.1
    ./lib/libuuid.so.1.3.0
    ./lib/ld-linux-armhf.so.3
    ./lib/libgcc_s.so.1
    ./lib/arm-linux-gnueabihf/
    ./lib/arm-linux-gnueabihf/libpthread-2.19-2014.07.so
    ./lib/arm-linux-gnueabihf/libm.so.6
    ./lib/arm-linux-gnueabihf/libnss_files.so.2
    ./lib/arm-linux-gnueabihf/librt-2.19-2014.07.so
    ./lib/arm-linux-gnueabihf/libnsl-2.19-2014.07.so
    ./lib/arm-linux-gnueabihf/libpthread.so.0
    ./lib/arm-linux-gnueabihf/libcrypt-2.19-2014.07.so
    ./lib/arm-linux-gnueabihf/libresolv.so.2
    ./lib/arm-linux-gnueabihf/libdl-2.19-2014.07.so
    ./lib/arm-linux-gnueabihf/libresolv-2.19-2014.07.so
    ./lib/arm-linux-gnueabihf/libnss_dns-2.19-2014.07.so
    ./lib/arm-linux-gnueabihf/libc-2.19-2014.07.so
    ./lib/arm-linux-gnueabihf/librt.so.1
    ./lib/arm-linux-gnueabihf/libc.so.6
    ./lib/arm-linux-gnueabihf/libutil.so.1
    ./lib/arm-linux-gnueabihf/libm-2.19-2014.07.so
    ./lib/arm-linux-gnueabihf/libnsl.so.1
    ./lib/arm-linux-gnueabihf/libnss_files-2.19-2014.07.so
    ./lib/arm-linux-gnueabihf/libutil-2.19-2014.07.so
    ./lib/arm-linux-gnueabihf/libnss_dns.so.2
    ./lib/arm-linux-gnueabihf/libcrypt.so.1
    ./lib/arm-linux-gnueabihf/libdl.so.2
    ./lib/libudev.so.1
    ./lib/ld-2.19-2014.07.so
    ./lib/libiw.so
    ./lib/libuuid.so.1
    ./lib/libblkid.so.1.1.0
    ./lib/libudev.so.1.6.3
    ./lib32
    ./run/
    ./usr/
    ./usr/bin/
    ./usr/bin/basename
    ./usr/bin/abxtest
    ./usr/bin/uptime
    ./usr/bin/scp
    ./usr/bin/ssh-add
    ./usr/bin/aserver
    ./usr/bin/awk
    ./usr/bin/head
    ./usr/bin/clear
    ./usr/bin/microcom
    ./usr/bin/canlogserver
    ./usr/bin/sftp
    ./usr/bin/tftp
    ./usr/bin/whoami
    ./usr/bin/poff
    ./usr/bin/fold
    ./usr/bin/sha1sum
    ./usr/bin/canplayer
    ./usr/bin/dc
    ./usr/bin/cansniffer
    ./usr/bin/eject
    ./usr/bin/lsz
    ./usr/bin/ssh-agent
    ./usr/bin/lzcat
    ./usr/bin/crontab
    ./usr/bin/unlink
    ./usr/bin/traceroute
    ./usr/bin/seq
    ./usr/bin/asc2log
    ./usr/bin/less
    ./usr/bin/isotpdump
    ./usr/bin/xargs
    ./usr/bin/cansend
    ./usr/bin/mesg
    ./usr/bin/tail
    ./usr/bin/strings
    ./usr/bin/tee
    ./usr/bin/cut
    ./usr/bin/unzip
    ./usr/bin/ssh-keyscan
    ./usr/bin/isotpperf
    ./usr/bin/sha256sum
    ./usr/bin/isotpserver
    ./usr/bin/expr
    ./usr/bin/lspci
    ./usr/bin/log2asc
    ./usr/bin/nslookup
    ./usr/bin/sha3sum
    ./usr/bin/hostid
    ./usr/bin/pon
    ./usr/bin/unix2dos
    ./usr/bin/od
    ./usr/bin/cksum
    ./usr/bin/cangw
    ./usr/bin/printf
    ./usr/bin/yes
    ./usr/bin/pcretest
    ./usr/bin/lzma
    ./usr/bin/[[
    ./usr/bin/canfdtest
    ./usr/bin/wc
    ./usr/bin/ipcrm
    ./usr/bin/cmp
    ./usr/bin/diff
    ./usr/bin/flock
    ./usr/bin/du
    ./usr/bin/slcan_attach
    ./usr/bin/isotptun
    ./usr/bin/[
    ./usr/bin/realpath
    ./usr/bin/tty
    ./usr/bin/killall
    ./usr/bin/tr
    ./usr/bin/fuser
    ./usr/bin/mkfifo
    ./usr/bin/lsof
    ./usr/bin/isotprecv
    ./usr/bin/which
    ./usr/bin/hexdump
    ./usr/bin/bunzip2
    ./usr/bin/dos2unix
    ./usr/bin/ssh
    ./usr/bin/mkpasswd
    ./usr/bin/chvt
    ./usr/bin/amixer
    ./usr/bin/slcand
    ./usr/bin/can-calc-bit-timing
    ./usr/bin/ipcs
    ./usr/bin/env
    ./usr/bin/readlink
    ./usr/bin/sha512sum
    ./usr/bin/cangen
    ./usr/bin/sort
    ./usr/bin/top
    ./usr/bin/last
    ./usr/bin/test
    ./usr/bin/chrt
    ./usr/bin/id
    ./usr/bin/sz
    ./usr/bin/aplay
    ./usr/bin/md5sum
    ./usr/bin/udevadm
    ./usr/bin/lsusb
    ./usr/bin/deallocvt
    ./usr/bin/passwd
    ./usr/bin/patch
    ./usr/bin/free
    ./usr/bin/logger
    ./usr/bin/renice
    ./usr/bin/logname
    ./usr/bin/dirname
    ./usr/bin/ar
    ./usr/bin/ssh-keygen
    ./usr/bin/unlzma
    ./usr/bin/openvt
    ./usr/bin/bzcat
    ./usr/bin/uniq
    ./usr/bin/madplay
    ./usr/bin/truncate
    ./usr/bin/log2long
    ./usr/bin/isotpsniffer
    ./usr/bin/telnet
    ./usr/bin/lrz
    ./usr/bin/rz
    ./usr/bin/who
    ./usr/bin/resize
    ./usr/bin/pcregrep
    ./usr/bin/nohup
    ./usr/bin/bcmserver
    ./usr/bin/slcanpty
    ./usr/bin/reset
    ./usr/bin/wget
    ./usr/bin/vlock
    ./usr/bin/canbusload
    ./usr/bin/setkeycodes
    ./usr/bin/arecord
    ./usr/bin/setsid
    ./usr/bin/xz
    ./usr/bin/xzcat
    ./usr/bin/uudecode
    ./usr/bin/unxz
    ./usr/bin/isotpsend
    ./usr/bin/uuencode
    ./usr/bin/find
    ./usr/bin/candump
    ./usr/bin/time
    ./usr/bin/install
    ./usr/share/
    ./usr/share/locale/
    ./usr/share/bash-completion/
    ./usr/share/bash-completion/completions/
    ./usr/share/bash-completion/completions/kmod
    ./usr/share/bash-completion/completions/uuidgen
    ./usr/share/alsa/
    ./usr/share/alsa/ucm/
    ./usr/share/alsa/ucm/broadwell-rt286/
    ./usr/share/alsa/ucm/broadwell-rt286/HiFi
    ./usr/share/alsa/ucm/broadwell-rt286/broadwell-rt286.conf
    ./usr/share/alsa/ucm/tegraalc5632/
    ./usr/share/alsa/ucm/tegraalc5632/tegraalc5632.conf
    ./usr/share/alsa/ucm/PAZ00/
    ./usr/share/alsa/ucm/PAZ00/Record.conf
    ./usr/share/alsa/ucm/PAZ00/HiFi.conf
    ./usr/share/alsa/ucm/PAZ00/PAZ00.conf
    ./usr/share/alsa/ucm/PandaBoardES/
    ./usr/share/alsa/ucm/PandaBoardES/hifi
    ./usr/share/alsa/ucm/PandaBoardES/record
    ./usr/share/alsa/ucm/PandaBoardES/hifiLP
    ./usr/share/alsa/ucm/PandaBoardES/FMAnalog
    ./usr/share/alsa/ucm/PandaBoardES/PandaBoardES.conf
    ./usr/share/alsa/ucm/PandaBoardES/voiceCall
    ./usr/share/alsa/ucm/PandaBoardES/voice
    ./usr/share/alsa/ucm/chtrt5645/
    ./usr/share/alsa/ucm/chtrt5645/HiFi.conf
    ./usr/share/alsa/ucm/chtrt5645/chtrt5645.conf
    ./usr/share/alsa/ucm/SDP4430/
    ./usr/share/alsa/ucm/SDP4430/hifi
    ./usr/share/alsa/ucm/SDP4430/record
    ./usr/share/alsa/ucm/SDP4430/SDP4430.conf
    ./usr/share/alsa/ucm/SDP4430/hifiLP
    ./usr/share/alsa/ucm/SDP4430/FMAnalog
    ./usr/share/alsa/ucm/SDP4430/voiceCall
    ./usr/share/alsa/ucm/SDP4430/voice
    ./usr/share/alsa/ucm/GoogleNyan/
    ./usr/share/alsa/ucm/GoogleNyan/GoogleNyan.conf
    ./usr/share/alsa/ucm/GoogleNyan/HiFi.conf
    ./usr/share/alsa/ucm/VEYRON-I2S/
    ./usr/share/alsa/ucm/VEYRON-I2S/HiFi.conf
    ./usr/share/alsa/ucm/VEYRON-I2S/VEYRON-I2S.conf
    ./usr/share/alsa/ucm/PandaBoard/
    ./usr/share/alsa/ucm/PandaBoard/hifi
    ./usr/share/alsa/ucm/PandaBoard/record
    ./usr/share/alsa/ucm/PandaBoard/hifiLP
    ./usr/share/alsa/ucm/PandaBoard/FMAnalog
    ./usr/share/alsa/ucm/PandaBoard/voiceCall
    ./usr/share/alsa/ucm/PandaBoard/PandaBoard.conf
    ./usr/share/alsa/ucm/PandaBoard/voice
    ./usr/share/alsa/ucm/DAISY-I2S/
    ./usr/share/alsa/ucm/DAISY-I2S/HiFi.conf
    ./usr/share/alsa/ucm/DAISY-I2S/DAISY-I2S.conf
    ./usr/share/alsa/smixer.conf
    ./usr/share/alsa/topology/
    ./usr/share/alsa/topology/sklrt286/
    ./usr/share/alsa/topology/sklrt286/hdmi2_pt_out-cpr-9.bin
    ./usr/share/alsa/topology/sklrt286/hdmi1_pt_out-cpr-7.bin
    ./usr/share/alsa/topology/sklrt286/codec0_out-cpr-4.bin
    ./usr/share/alsa/topology/sklrt286/dmic01_hifi_in-cpr-3.bin
    ./usr/share/alsa/topology/sklrt286/media0_out-mo.bin
    ./usr/share/alsa/topology/sklrt286/codec0_in-cpr-1.bin
    ./usr/share/alsa/topology/sklrt286/hdmi3_pt_out-cpr-12.bin
    ./usr/share/alsa/topology/sklrt286/codec1_out-mo.bin
    ./usr/share/alsa/topology/sklrt286/media0_in-mi.bin
    ./usr/share/alsa/topology/sklrt286/skl_i2s.conf
    ./usr/share/alsa/topology/sklrt286/hdmi3_pt_out-cpr-11.bin
    ./usr/share/alsa/topology/sklrt286/hdmi1_pt_out-cpr-8.bin
    ./usr/share/alsa/topology/sklrt286/codec0_in-mi.bin
    ./usr/share/alsa/topology/sklrt286/media0_out-cpr-6.bin
    ./usr/share/alsa/topology/sklrt286/media0_in-cpr-0.bin
    ./usr/share/alsa/topology/sklrt286/codec1_out-cpr-5.bin
    ./usr/share/alsa/topology/sklrt286/dmic01_hifi_in-mi.bin
    ./usr/share/alsa/topology/sklrt286/codec0_out-mo.bin
    ./usr/share/alsa/topology/sklrt286/hdmi2_pt_out-cpr-10.bin
    ./usr/share/alsa/topology/broadwell/
    ./usr/share/alsa/topology/broadwell/broadwell.conf
    ./usr/share/alsa/pcm/
    ./usr/share/alsa/pcm/front.conf
    ./usr/share/alsa/pcm/surround41.conf
    ./usr/share/alsa/pcm/surround21.conf
    ./usr/share/alsa/pcm/center_lfe.conf
    ./usr/share/alsa/pcm/rear.conf
    ./usr/share/alsa/pcm/dmix.conf
    ./usr/share/alsa/pcm/hdmi.conf
    ./usr/share/alsa/pcm/surround71.conf
    ./usr/share/alsa/pcm/default.conf
    ./usr/share/alsa/pcm/surround40.conf
    ./usr/share/alsa/pcm/modem.conf
    ./usr/share/alsa/pcm/surround50.conf
    ./usr/share/alsa/pcm/dsnoop.conf
    ./usr/share/alsa/pcm/dpl.conf
    ./usr/share/alsa/pcm/surround51.conf
    ./usr/share/alsa/pcm/iec958.conf
    ./usr/share/alsa/pcm/side.conf
    ./usr/share/alsa/cards/
    ./usr/share/alsa/cards/FireWave.conf
    ./usr/share/alsa/cards/AU8830.conf
    ./usr/share/alsa/cards/FWSpeakers.conf
    ./usr/share/alsa/cards/Echo_Echo3G.conf
    ./usr/share/alsa/cards/SI7018.conf
    ./usr/share/alsa/cards/ICH.conf
    ./usr/share/alsa/cards/PMacToonie.conf
    ./usr/share/alsa/cards/CMI8738-MC8.conf
    ./usr/share/alsa/cards/VIA8237.conf
    ./usr/share/alsa/cards/EMU10K1.conf
    ./usr/share/alsa/cards/VIA686A.conf
    ./usr/share/alsa/cards/SI7018/
    ./usr/share/alsa/cards/SI7018/sndoc-mixer.alisp
    ./usr/share/alsa/cards/SI7018/sndop-mixer.alisp
    ./usr/share/alsa/cards/ATIIXP-MODEM.conf
    ./usr/share/alsa/cards/Aureon71.conf
    ./usr/share/alsa/cards/CS46xx.conf
    ./usr/share/alsa/cards/aliases.alisp
    ./usr/share/alsa/cards/ENS1371.conf
    ./usr/share/alsa/cards/VIA8233.conf
    ./usr/share/alsa/cards/NFORCE.conf
    ./usr/share/alsa/cards/Aureon51.conf
    ./usr/share/alsa/cards/aliases.conf
    ./usr/share/alsa/cards/FM801.conf
    ./usr/share/alsa/cards/ATIIXP-SPDMA.conf
    ./usr/share/alsa/cards/ES1968.conf
    ./usr/share/alsa/cards/Loopback.conf
    ./usr/share/alsa/cards/VIA8233A.conf
    ./usr/share/alsa/cards/Maestro3.conf
    ./usr/share/alsa/cards/CA0106.conf
    ./usr/share/alsa/cards/ICH4.conf
    ./usr/share/alsa/cards/ENS1370.conf
    ./usr/share/alsa/cards/VX222.conf
    ./usr/share/alsa/cards/VXPocket440.conf
    ./usr/share/alsa/cards/AU8810.conf
    ./usr/share/alsa/cards/CMI8738-MC6.conf
    ./usr/share/alsa/cards/RME9636.conf
    ./usr/share/alsa/cards/Audigy2.conf
    ./usr/share/alsa/cards/PS3.conf
    ./usr/share/alsa/cards/ICH-MODEM.conf
    ./usr/share/alsa/cards/EMU10K1X.conf
    ./usr/share/alsa/cards/RME9652.conf
    ./usr/share/alsa/cards/AACI.conf
    ./usr/share/alsa/cards/AU8820.conf
    ./usr/share/alsa/cards/ICE1724.conf
    ./usr/share/alsa/cards/SB-XFi.conf
    ./usr/share/alsa/cards/CMI8338-SWIEC.conf
    ./usr/share/alsa/cards/PC-Speaker.conf
    ./usr/share/alsa/cards/CMI8788.conf
    ./usr/share/alsa/cards/ICE1712.conf
    ./usr/share/alsa/cards/HDA-Intel.conf
    ./usr/share/alsa/cards/PMac.conf
    ./usr/share/alsa/cards/CMI8338.conf
    ./usr/share/alsa/cards/GUS.conf
    ./usr/share/alsa/cards/USB-Audio.conf
    ./usr/share/alsa/cards/YMF744.conf
    ./usr/share/alsa/cards/Audigy.conf
    ./usr/share/alsa/cards/ATIIXP.conf
    ./usr/share/alsa/cards/VXPocket.conf
    ./usr/share/alsa/cards/TRID4DWAVENX.conf
    ./usr/share/alsa/alsa.conf
    ./usr/share/alsa/sndo-mixer.alisp
    ./usr/share/alsa/alsa.conf.d/
    ./usr/share/alsa/alsa.conf.d/README
    ./usr/share/terminfo/
    ./usr/share/terminfo/a/
    ./usr/share/terminfo/a/ansi
    ./usr/share/terminfo/x/
    ./usr/share/terminfo/x/xterm-color
    ./usr/share/terminfo/x/xterm-xfree86
    ./usr/share/terminfo/x/xterm
    ./usr/share/terminfo/p/
    ./usr/share/terminfo/p/putty-vt100
    ./usr/share/terminfo/p/putty
    ./usr/share/terminfo/v/
    ./usr/share/terminfo/v/vt100
    ./usr/share/terminfo/v/vt100-putty
    ./usr/share/terminfo/v/vt220
    ./usr/share/terminfo/v/vt102
    ./usr/share/terminfo/v/vt200
    ./usr/share/terminfo/l/
    ./usr/share/terminfo/l/linux
    ./usr/share/terminfo/s/
    ./usr/share/terminfo/s/screen
    ./usr/share/udhcpc/
    ./usr/share/udhcpc/default.script.d/
    ./usr/share/udhcpc/default.script
    ./usr/lib/
    ./usr/lib/libpcreposix.so
    ./usr/lib/libpcreposix.so.0
    ./usr/lib/boa/
    ./usr/lib/boa/boa_indexer
    ./usr/lib/libid3tag.so.0.3.0
    ./usr/lib/libipset.so.3
    ./usr/lib/libmnl.so.0.1.0
    ./usr/lib/libnl-idiag-3.so.200.22.0
    ./usr/lib/libudev.so
    ./usr/lib/libhistory.so
    ./usr/lib/libwpa_client.so
    ./usr/lib/libid3tag.so
    ./usr/lib/libz.so
    ./usr/lib/libnl-route-3.so.200.22.0
    ./usr/lib/libnl-genl-3.so.200
    ./usr/lib/libnl-nf-3.so
    ./usr/lib/libhistory.so.6.3
    ./usr/lib/libnl-genl-3.so.200.22.0
    ./usr/lib/libnl-nf-3.so.200
    ./usr/lib/libnl-xfrm-3.so.200
    ./usr/lib/libmad.so
    ./usr/lib/libpcreposix.so.0.0.4
    ./usr/lib/libnl-idiag-3.so.200
    ./usr/lib/libnl-nf-3.so.200.22.0
    ./usr/lib/libz.so.1
    ./usr/lib/libid3tag.so.0
    ./usr/lib/libasound.so
    ./usr/lib/libncurses.so.5
    ./usr/lib/libasound.so.2.0.0
    ./usr/lib/pppd/
    ./usr/lib/pppd/2.4.7/
    ./usr/lib/pppd/2.4.7/rp-pppoe.so
    ./usr/lib/pppd/2.4.7/passwordfd.so
    ./usr/lib/pppd/2.4.7/openl2tp.so
    ./usr/lib/pppd/2.4.7/minconn.so
    ./usr/lib/pppd/2.4.7/pppol2tp.so
    ./usr/lib/pppd/2.4.7/passprompt.so
    ./usr/lib/pppd/2.4.7/pppoatm.so
    ./usr/lib/pppd/2.4.7/winbind.so
    ./usr/lib/libmnl.so
    ./usr/lib/libncurses.so.5.9
    ./usr/lib/libkmod.so.2.3.1
    ./usr/lib/libkmod.so.2
    ./usr/lib/libnl-xfrm-3.so
    ./usr/lib/libreadline.so.6.3
    ./usr/lib/libmad.so.0.2.1
    ./usr/lib/libmnl.so.0
    ./usr/lib/libncurses.so
    ./usr/lib/libblkid.so
    ./usr/lib/libnl-route-3.so.200
    ./usr/lib/libkmod.so
    ./usr/lib/libhistory.so.6
    ./usr/lib/libz.so.1.2.8
    ./usr/lib/libssl.so.1.0.0
    ./usr/lib/libssl.so
    ./usr/lib/libipset.so.3.6.0
    ./usr/lib/libcrypto.so.1.0.0
    ./usr/lib/libreadline.so
    ./usr/lib/libpcre.so
    ./usr/lib/libnl-route-3.so
    ./usr/lib/libnl-genl-3.so
    ./usr/lib/libuuid.so
    ./usr/lib/libpcre.so.1.2.7
    ./usr/lib/libpcre.so.1
    ./usr/lib/terminfo
    ./usr/lib/libcrypto.so
    ./usr/lib/libnl-3.so
    ./usr/lib/libasound.so.2
    ./usr/lib/libnl-3.so.200
    ./usr/lib/libmad.so.0
    ./usr/lib/libipset.so
    ./usr/lib/libnl-idiag-3.so
    ./usr/lib/libreadline.so.6
    ./usr/lib/alsa-lib/
    ./usr/lib/alsa-lib/smixer/
    ./usr/lib/alsa-lib/smixer/smixer-hda.so
    ./usr/lib/alsa-lib/smixer/smixer-sbase.so
    ./usr/lib/alsa-lib/smixer/smixer-ac97.so
    ./usr/lib/libnl-xfrm-3.so.200.22.0
    ./usr/lib/libnl-3.so.200.22.0
    ./usr/lib32
    ./usr/libexec/
    ./usr/libexec/ssh-keysign
    ./usr/libexec/sftp-server
    ./usr/libexec/ssh-pkcs11-helper
    ./usr/sbin/
    ./usr/sbin/fdformat
    ./usr/sbin/chroot
    ./usr/sbin/boa
    ./usr/sbin/chat
    ./usr/sbin/rdate
    ./usr/sbin/sshd
    ./usr/sbin/ipset
    ./usr/sbin/deluser
    ./usr/sbin/ether-wake
    ./usr/sbin/i2cdetect
    ./usr/sbin/ubirename
    ./usr/sbin/pppdump
    ./usr/sbin/dnsd
    ./usr/sbin/i2cset
    ./usr/sbin/i2cget
    ./usr/sbin/pppd
    ./usr/sbin/loadfont
    ./usr/sbin/pppstats
    ./usr/sbin/i2cdump
    ./usr/sbin/killall5
    ./usr/sbin/crond
    ./usr/sbin/inetd
    ./usr/sbin/wpa_cli
    ./usr/sbin/fbset
    ./usr/sbin/wpa_passphrase
    ./usr/sbin/arping
    ./usr/sbin/wpa_supplicant
    ./usr/sbin/delgroup
    ./usr/sbin/readprofile
    ./usr/sbin/adduser
    ./usr/sbin/addgroup
    ./usr/sbin/setlogcons
    ./usr/sbin/iw
    UTP: received command 'frf'
    ./usr/sbin/pppoe-discovery
    ./dev/
    ./dev/shm/
    ./dev/log
    ./dev/console
    ./dev/pts/
    ./sbin/
    ./sbin/syslogd
    ./sbin/fstrim
    ./sbin/setconsole
    ./sbin/fdisk
    ./sbin/watchdog
    ./sbin/init
    ./sbin/hwclock
    ./sbin/rmmod
    ./sbin/iwpriv
    ./sbin/sysctl
    ./sbin/switch_root
    ./sbin/uevent
    ./sbin/devmem
    ./sbin/swapoff
    ./sbin/iproute
    ./sbin/iwlist
    ./sbin/ifup
    ./sbin/vconfig
    ./sbin/iprule
    ./sbin/start-stop-daemon
    ./sbin/modprobe
    ./sbin/makedevs
    ./sbin/pivot_root
    ./sbin/losetup
    ./sbin/halt
    ./sbin/fsck
    ./sbin/iplink
    ./sbin/lsmod
    ./sbin/swapon
    ./sbin/ip
    ./sbin/insmod
    ./sbin/ifconfig
    ./sbin/reboot
    ./sbin/blkid
    ./sbin/freeramdisk
    ./sbin/hdparm
    ./sbin/mkswap
    ./sbin/udevd
    ./sbin/getty
    ./sbin/iwgetid
    ./sbin/udevadm
    ./sbin/iwconfig
    ./sbin/arp
    ./sbin/poweroff
    ./sbin/iwspy
    ./sbin/klogd
    ./sbin/sulogin
    ./sbin/runlevel
    ./sbin/nameif
    ./sbin/iptunnel
    ./sbin/ifdown
    ./sbin/route
    ./sbin/ipaddr
    ./sbin/mdev
    ./sbin/udhcpc
    ./sbin/loadkmap
    UTP: closing the file
    UTP: sending Success to kernel for command frf.
    utp_poll: pass returned.
    UTP: received command '$ umount /mnt/mtd3'
    UTP: executing "umount /mnt/mtd3"
    UBIFS (ubi0:0): un-mount UBI device 0
    UBIFS (ubi0:0): background thread "ubifs_bgt0_0" stops
    UTP: sending Success to kernel for command $ umount /mnt/mtd3.
    utp_poll: pass returned.
    UTP: received command '$ echo Update Complete!'
    UTP: executing "echo Update Complete!"
    Update Complete!
    UTP: sending Success to kernel for command $ echo Update Complete!.
    utp_poll: pass returned.
    View Code

    4、小结

    本文主要简单介绍了NXP官方的MfgTools软件的使用方式,并对其进行固件烧写的基本原理进行了介绍,并以Nand Flash启动的目标板CoM-P6UL为例,介绍了使用改软件进行固件更新的简单步骤。

  • 相关阅读:
    jquery ajax和php实现返回值 json类型
    jQuery一句话实现多选框全选/取消
    九宫格拼图 支持44 55等
    php通过$_SERVER['HTTP_USER_AGENT']获取浏览器useAgent
    微信刮刮卡代码
    从QQ网站中提取的纯JS省市区三级联动
    Codeigniter+PHPExcel导出数据到Excel文件
    flv视频播放器停止时带图片
    html5+js实现刮刮卡效果
    解决Tensorflow 使用时cpu编译不支持警告:that this TensorFlow binary was not compiled to use: AVX AVX2
  • 原文地址:https://www.cnblogs.com/Cqlismy/p/12342156.html
Copyright © 2020-2023  润新知