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-tools\mfgtools-without-rootfs\mfgtools\Profiles\Linux\OS 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.
4、小結
本文主要簡單介紹了NXP官方的MfgTools軟件的使用方式,並對其進行固件燒寫的基本原理進行了介紹,並以Nand Flash啟動的目標板CoM-P6UL為例,介紹了使用改軟件進行固件更新的簡單步驟。