xxx715 发表于 2020-4-8 12:19:12

关于MFGtools烧录的问题(L4.9.88_2.0.0_mfg-tool)

本帖最后由 xxx715 于 2020-4-8 12:28 编辑

1.运行MFGtools之前,是否需要修改cfg.ini?(我的板子版本为256MB DDR,256MB NAND)查看cfg.ini里面的
board = SabreSD


name = SDCard

board = sabresd
mmc = 0
sxuboot=sabresd
sxdtb=sdb
7duboot=sabresd
7ddtb=sdb
6uluboot=14x14ddr3arm2
6uldtb=14x14-ddr3-arm2
6ulldtb=14x14-ddr3-arm2
slldtb=evk
slluboot=evk
7ulpdtb=evk
7ulpuboot=evk
ldo=
plus=
initramfs=fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot
seek = 1
sxnor=qspi2
7dnor=qspi1
6ulnor=qspi1
nor_part=0
android_m4_image=placeholder

上面红色部分是否需要修改?

2.如果模板采用mfgtool2-yocto-mx-sabresd-nand.vbs文档运行:
Set wshShell = CreateObject("WScript.shell")
wshShell.run "mfgtool2.exe -c ""linux"" -l ""NAND Flash"" -s ""board=sabreauto"" -s ""sxuboot=sabreauto"" -s ""sxdtb=sabreauto"" -s ""nand=nand"" -s ""nanddtb=gpmi-weim"" -s ""part_uboot=0"" -s ""part_kernel=1"" -s ""part_dtb=2"" -s ""part_rootfs=4""   "
是否需要修改为你们提供的烧录模板mfgtool2-yocto-mx-evk-256mnand.vbs文档中
Set wshShell = CreateObject("WScript.shell")
wshShell.run "mfgtool2.exe -c ""linux"" -l ""256m NAND Flash"" -s ""sxuboot=sabreauto""-s ""sxdtb=sabreauto"" -s ""6uluboot=14x14evk"" -s ""6uldtb=14x14-evk"" -s ""board=sabreauto"" -s ""nand=nand"" -s ""nanddtb=gpmi-256m"" -s ""part_uboot=0"" -s ""part_kernel=1"" -s ""part_dtb=2"" -s ""part_rootfs=3""   "
Set wshShell = Nothing
3.将贵司提供的如下烧写文档:
u-boot-256mnand.imx
zImage
imx6ul-14x14-evk-gpmi-c2-256m-7-1024x600.dtb
rootfs-console.tar.bz2
分别改名如下:
u-boot-imx6ul14x14evk_nand.imx
zImage
zImage-imx6ul-14x14-evk-gpmi-weim.dtb
rootfs_nogpu.tar.bz2
其中将不含根文件系统的三个文档拷贝到:\L4.9.88_2.0.0_mfg-tool\mfgtools\Profiles\Linux\OS Firmware\firmware
将含根文件系统的四个文档拷贝到:\L4.9.88_2.0.0_mfg-tool\mfgtools\Profiles\Linux\OS Firmware\files
5.将目标板上的拨码设置为8 off,1234567 on
6.右键点击mfgtool2-yocto-mx-sabresd-nand.vbs打开方式选择mfgtool,出现如下图片

xxx715 发表于 2020-4-8 12:20:13

本帖最后由 xxx715 于 2020-4-8 12:26 编辑

后面待续,到目前为止有没有什么操作错误?

xxx715 发表于 2020-4-8 12:24:25

mfgtool日志文件显示如下:

DLL version: 2.7.0
Wednesday, April 08, 2020 11:22:31   Start new logging
ModuleID LevelID: CMyExceptionHandler thread is running
ModuleID LevelID: new MxHidDeviceClass
ModuleID LevelID: new MxHidDevice
ModuleID LevelID: new MxHidDeviceClass
ModuleID LevelID: new MxHidDevice
ModuleID LevelID: new MxHidDeviceClass
ModuleID LevelID: new MxHidDevice
ModuleID LevelID: new MxHidDeviceClass
ModuleID LevelID: new MxHidDevice
ModuleID LevelID: new MxHidDeviceClass
ModuleID LevelID: new MxHidDevice
ModuleID LevelID: new MxHidDeviceClass
ModuleID LevelID: new MxHidDevice
ModuleID LevelID: new MxHidDeviceClass
ModuleID LevelID: new MxHidDevice
ModuleID LevelID: new MxHidDeviceClass
ModuleID LevelID: new MxHidDevice
ModuleID LevelID: new MxHidDeviceClass
ModuleID LevelID: new MxHidDevice
ModuleID LevelID: Device Manager thread is running
ModuleID LevelID: Can't set m_hStopEvent before it initialized or it already stop

ModuleID LevelID: CmdOperation device chagned and reset to state 0
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: ExecuteCommand--Boot, File is I:\L4.9.88_2.0.0_mfg-tool\mfgtools\Profiles\Linux\OS Firmware\firmware\u-boot-imx6ul14x14ddr3arm2_sd.imx
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: ExecuteCommand--Load, File is I:\L4.9.88_2.0.0_mfg-tool\mfgtools\Profiles\Linux\OS Firmware\firmware\zImage, address is 0x80800000
ModuleID LevelID: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: ExecuteCommand--Load, File is I:\L4.9.88_2.0.0_mfg-tool\mfgtools\Profiles\Linux\OS Firmware\firmware\fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot, address is 0x83800000
ModuleID LevelID: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: ExecuteCommand--Load, File is I:\L4.9.88_2.0.0_mfg-tool\mfgtools\Profiles\Linux\OS Firmware\firmware\zImage-imx6ul-14x14-ddr3-arm2.dtb, address is 0x83000000
ModuleID LevelID: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: ExecuteCommand--Jump
ModuleID LevelID: *********MxHidDevice Jump to Ramkernel successfully!**********
ModuleID LevelID: CmdOperation, current state command has been finished and the last command is successful, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation device chagned and reset to state 0
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CmdOperation, skip current command, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: ExecuteCommand--Boot, File is I:\L4.9.88_2.0.0_mfg-tool\mfgtools\Profiles\Linux\OS Firmware\firmware\u-boot-imx6ul14x14ddr3arm2_sd.imx

xxx715 发表于 2020-4-8 12:26:00

本帖最后由 xxx715 于 2020-4-8 12:27 编辑

上面是在没修改配置文件时,运行的mfgtools日志结果;并没有调用我保存的那四个烧录文件。

xxx715 发表于 2020-4-8 13:14:22

仔细对比了飞凌和飞思卡的UCL2.xml文件,发现飞凌的文件确实已经裁剪。看来只需要按照裁剪后的文档改写相关文件名了,我再试试。

xxx715 发表于 2020-4-11 16:33:06

自己动手修改配置文件cfg.ini如下:

chip = Linux


board = SabreSD


name = 256m NAND Flash


board = sabresd

6uluboot=14x14evk
6uldtb=14x14-evk-c2-7-1024x600

nand=256m-nand
nanddtb=gpmi-256m

initramfs=fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot

port_uboot=0
port_logo=1
port_kernel=2
port_dtb=3
port_rootfs=4
自己编写UCL2.xml文档如下:

<UCL>
<CFG>
    <STATE name="BootStrap" dev="MX6UL" vid="15A2" pid="007D"/>
    <STATE name="Updater"   dev="MSC" vid="066F" pid="37FF"/>
</CFG>

   <LIST name="256m NAND Flash" desc="Choose 256MNAND 256m ddr as media">

        <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="load" file="firmware/zImage" address="0x80800000"
                loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6UL">Loading Kernel.</CMD>
        <CMD state="BootStrap" type="load" file="firmware/%initramfs%" address="0x83800000"
                loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6UL">Loading Initramfs.</CMD>
        <CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
                loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6UL">Loading device tree.</CMD>
       
        <CMD state="BootStrap" type="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%port_uboot% 0 0">Erasing Boot partition</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="$ kobs-ng init -x -v --chip_0_device_path=/dev/mtd%port_uboot% $FILE">Flashing Bootloader</CMD>

        <!--burn the kernel to NAND: -->
        <CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%port_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%port_kernel% -p $FILE">Flashing Kernel</CMD>
       
<!--burn the logo to NAND: -->
        <CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%port_logo% 0 0">Erasing Logo partition</CMD>
        <CMD state="Updater" type="push" body="send" file="files/logo.bmp">Sending Logo zImage</CMD>
        <CMD state="Updater" type="push" body="$ nandwrite -p /dev/mtd%port_logo% -p $FILE">Flashing Logo</CMD>

<!--burn the dtb to NAND: -->       
        <CMD state="Updater" type="push" body="$ flash_erase /dev/mtd%port_dtb% 0 0">Erasing dtb partition</CMD>
        <CMD state="Updater" type="push" body="send" file="files/dtb/zImage-imx6ul-%6uldtb%-%nanddtb%.dtb" ifdev="MX6UL">Sending Device Tree file</CMD>
        <CMD state="Updater" type="push" body="$ nandwrite -p /dev/mtd%port_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-console.tar.bz2" ifdev="MX6UL">Sending and writting rootfs</CMD>
        <CMD state="Updater" type="push" body="frf">Finishing rootfs software write</CMD>
        <CMD state="Updater" type="push" body="$ umount /mnt/mtd%part_rootfs%">Unmounting rootfs partition</CMD>
       
        <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>

</UCL>
上面只是烧录最简单的五个文档:imx,zImage,dtb,logo,rootfs;不成功。mfgtool.log文档如下:
DLL version: 2.7.0
Saturday, April 11, 2020 15:39:41   Start new logging
ModuleID LevelID: CMyExceptionHandler thread is running
ModuleID LevelID: new MxHidDeviceClass
ModuleID LevelID: Device Manager thread is running
ModuleID LevelID: Can't set m_hStopEvent before it initialized or it already stop

ModuleID LevelID: DeviceManager::DevChangeWnd::OnDeviceChange() - DEVICE_ARRIVAL_EVT(\\?\USB#VID_15A2&PID_007D#6&70bf5e9&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed})
ModuleID LevelID: DeviceManager::DevChangeWnd::OnDeviceChange() - end
ModuleID LevelID: DeviceManager::OnMsgDeviceEvent() - DEVICE_ARRIVAL_EVT(\\?\USB#VID_15A2&PID_007D#6&70bf5e9&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed})
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath--DeviceListType_Current, _devices.size: 0
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath() - DeviceListType_New--index: 0
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath() - DeviceListType_New--devPath: \\?\hid#vid_05b8&pid_3271&mi_01&col03#8&16abda76&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath() - DeviceListType_New--index: 1
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath() - DeviceListType_New--devPath: \\?\hid#vid_05b8&pid_3271&mi_00#8&37bbe38&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath() - DeviceListType_New--index: 2
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath() - DeviceListType_New--devPath: \\?\hid#vid_15a2&pid_007d#7&20eba110&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
ModuleID LevelID: new MxHidDevice
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath--DeviceListType_New, devInstPathToFind: USB\VID_15A2&PID_007D\6&70BF5E9&0&1, _deviceInstanceID: USB\VID_15A2&PID_007D\6&70BF5E9&0&1
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath--DeviceListType_New, Find the device, Port: 1
ModuleID LevelID: DeviceClass::AddUsbDevice() successful USB#VID_15A2&PID_007D#6&70BF5E9&0&1#{A5DCBF10-6530-11D2-901F-00C04FB951ED} add to current list, retrycount: 0
ModuleID LevelID: DeviceManager::OnMsgDeviceEvent() - DEVICE_ARRIVAL_EVT, vid_15a2&pid_007d, Hub:2-Port:1
ModuleID LevelID: DeviceManager::OnMsgDeviceEvent() - DEVICE_ARRIVAL_EVT, Notify
ModuleID LevelID: CmdOpreation--OnDeviceChangeNotify, Volume Arrive/Remove or Device Arrive/Remove
ModuleID LevelID: CmdOpreation--OnDeviceChangeNotify, m_p_usb_port is not NULL, so only refresh
ModuleID LevelID: CmdOpreation--OnDeviceChangeNotify, Volume/Device Arrive
ModuleID LevelID: CmdOpreation--set m_hDeviceArriveEvent.
ModuleID LevelID: CmdOpreation--WaitforEvents device arrive1
ModuleID LevelID: CmdOperation device chagned and reset to state 0
ModuleID LevelID: ExecuteCommand--Boot, File is I:\mfgtools-tronyen\Profiles\Linux\OS Firmware\firmware\u-boot-imx6ul14x14evk_256m-nand.imx
ModuleID LevelID: ExecuteCommand--Load, File is I:\mfgtools-tronyen\Profiles\Linux\OS Firmware\firmware\zImage, address is 0x80800000
ModuleID LevelID: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID LevelID: ExecuteCommand--Load, File is I:\mfgtools-tronyen\Profiles\Linux\OS Firmware\firmware\fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot, address is 0x83800000
ModuleID LevelID: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID LevelID: ExecuteCommand--Load, File is I:\mfgtools-tronyen\Profiles\Linux\OS Firmware\firmware\zImage-imx6ul-14x14-evk-c2-7-1024x600-gpmi-256m.dtb, address is 0x83000000
ModuleID LevelID: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID LevelID: ExecuteCommand--Jump
ModuleID LevelID: *********MxHidDevice Jump to Ramkernel successfully!**********
ModuleID LevelID: CmdOperation, current state command has been finished and the last command is successful, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: DeviceManager::DevChangeWnd::OnDeviceChange() - DEVICE_REMOVAL_EVT(\\?\USB#VID_15A2&PID_007D#6&70bf5e9&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed})
ModuleID LevelID: DeviceManager::DevChangeWnd::OnDeviceChange() - end
ModuleID LevelID: DeviceManager::OnMsgDeviceEvent() - DEVICE_REMOVAL_EVT(\\?\USB#VID_15A2&PID_007D#6&70bf5e9&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed})
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath--DeviceListType_Current, _devices.size: 1
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath--DeviceListType_Current, devInstPathToFind: USB\VID_15A2&PID_007D\6&70BF5E9&0&1, _deviceInstanceID: USB\VID_15A2&PID_007D\6&70BF5E9&0&1
ModuleID LevelID: DeviceClass::FindDeviceByUsbPath--DeviceListType_Current, Find the device
ModuleID LevelID: DeviceManager::OnMsgDeviceEvent() - DEVICE_REMOVAL_EVT, vid_15a2&pid_007d, Hub:2-Port:1
ModuleID LevelID: DeviceManager::OnMsgDeviceEvent() - DEVICE_REMOVAL_EVT, Notify
ModuleID LevelID: CmdOpreation--OnDeviceChangeNotify, Volume Arrive/Remove or Device Arrive/Remove
ModuleID LevelID: CmdOpreation--OnDeviceChangeNotify, m_p_usb_port is not NULL, so only refresh
ModuleID LevelID: CmdOpreation--OnDeviceChangeNotify, Volume/Device Remove
ModuleID LevelID: CmdOpreation--set m_hDeviceRemoveEvent.
ModuleID LevelID: CmdOpreation--WaitforEvents device remove1
最后日志文件显示重启USB:
ModuleID LevelID: CmdOpreation--OnDeviceChangeNotify, m_p_usb_port is not NULL, so only refresh
mfgtools卡在下面界面:

xxx715 发表于 2020-4-11 16:36:33

贴图如下:

xxx715 发表于 2020-4-11 16:38:42

请飞凌技术大拿,帮我分析一下,问题到底出在什么地方?

zhichao 发表于 2020-4-11 17:12:42

我们提供了可用的烧写工具和镜像,您可以直接使用,没有改过你说的文件,您可自行尝试

疯子的小欢喜 发表于 2021-5-12 10:44:19

楼主解决了没有,我也是用得NXP官方mfgtool烧录,用的是官方的linux和uboot。也是出现no device connetced
页: [1]
查看完整版本: 关于MFGtools烧录的问题(L4.9.88_2.0.0_mfg-tool)