zyp568 发表于 2019-2-1 06:26:47

MfgTool烧写镜像至SD卡失败

烧写EMMC是成功的,烧写SD则失败,
配置:
<LIST name="MAX6Q-SDCard-Android" desc="Choose SD Card as media">
        <CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot.imx" ifdev="MX6Q">Loading U-boot</CMD>
        <CMD state="BootStrap" type="load" file="firmware/zImage_mfgtool" address="0x12000000"
                loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Kernel.</CMD>
        <CMD state="BootStrap" type="load" file="firmware/zImage_mfgtool" address="0x80800000"
                loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6SL MX6SX MX7D MX6UL">Loading Kernel.</CMD>
        <CMD state="BootStrap" type="load" file="firmware/fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot" address="0x12C00000"
                loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q MX6D">Loading Initramfs.</CMD>
        <CMD state="BootStrap" type="load" file="firmware/imx6q-sabresd.dtb" address="0x18000000"
                loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" ifdev="MX6Q">Loading device tree.</CMD>
        <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

        <!-- create partition -->
        <CMD state="Updater" type="push" body="send" file="mksdcard-android.sh.tar">Sending partition shell</CMD>
        <CMD state="Updater" type="push" body="$ tar xf $FILE "> Partitioning...</CMD>
        <CMD state="Updater" type="push" body="$ sh mksdcard-android.sh /dev/mmcblk2"> Partitioning...</CMD>
       
        <!-- burn uboot -->
        <CMD state="Updater" type="push" body="send" file="files/android/u-boot.imx">Sending u-boot.bin</CMD>
        <CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk%mmc% bs=1k seek=384 conv=fsync count=129">clear u-boot arg</CMD>
        <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc% bs=1k seek=1 conv=fsync">write u-boot.bin to sd card</CMD>

        <CMD state="Updater" type="push" body="$ ls -l /dev/mmc* ">Formatting sd partition</CMD>

        <CMD state="Updater" type="push" body="send" file="files/android/boot.img">Sending and writting boot.img</CMD>
        <CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc%p1">write boot.img</CMD>


        <CMD state="Updater" type="push" body="$ mkfs.ext4 /dev/mmcblk%mmc%p5">Formatting system partition</CMD>
        <CMD state="Updater" type="push" body="$ mkfs.ext4 /dev/mmcblk%mmc%p6">Formatting cache partition</CMD>

        <CMD state="Updater" type="push" body="$ mkfs.ext4 /dev/mmcblk%mmc%p7">Formatting device partition</CMD>
        <CMD state="Updater" type="push" body="$ mount -o remount,size=600M rootfs /">change size of tmpfs</CMD>
        <CMD state="Updater" type="push" body="send" file="files/android/system.img">Sending system.img</CMD>
        <CMD state="Updater" type="push" body="$ simg2img $FILE /dev/mmcblk%mmc%p5">writting sparse system.img</CMD>
        <!-- Write userdata.img is optional, for some customer this is needed, but it's optional. -->
        <!-- Also, userdata.img will have android unit test, you can use this to do some auto test. -->
        <!--        <CMD state="Updater" type="push" onError="ignore" body="pipe dd of=/dev/mmcblk0p7" file="file/android/userdate.img"> Sending userdata.img(optional) </CMD>
        <CMD state="Updater" type="push" body="frf">flush the memory.</CMD>-->
        <CMD state="Updater" type="push" body="pipe dd of=/dev/mmcblk%mmc%p2 bs=512" file="files/android/recovery.img">Sending and writting recovery.img</CMD>
        <CMD state="Updater" type="push" body="$ sync">Sync file system</CMD>
        <CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>

        <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>LOG:
DLL version: 2.6.2
...
ModuleID LevelID: ExecuteCommand--Push, Body is send
ModuleID LevelID: ExecuteCommand--Push, Body is $ tar xf $FILE
ModuleID LevelID: ExecuteCommand--Push, Body is $ sh mksdcard-android.sh /dev/mmcblk2
ModuleID LevelID: ExecuteCommand--Push, Body is send
ModuleID LevelID: ExecuteCommand--Push, Body is $ dd if=/dev/zero of=/dev/mmcblk2 bs=1k seek=384 conv=fsync count=129
ModuleID LevelID: ExecuteCommand--Push, Body is $ dd if=$FILE of=/dev/mmcblk2 bs=1k seek=1 conv=fsync
ModuleID LevelID: ExecuteCommand--Push, Body is $ ls -l /dev/mmc*
ModuleID LevelID: ExecuteCommand--Push, Body is send
ModuleID LevelID: ExecuteCommand--Push, Body is $ dd if=$FILE of=/dev/mmcblk2p1
ModuleID LevelID: ExecuteCommand--Push, Body is $ mkfs.ext4 /dev/mmcblk2p5
ModuleID LevelID: PortMgrDlg(0)--MSCDevice--Command Push(no file) excute failed
ModuleID LevelID: CmdOperation, current command executed failed, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: ExecuteCommand--Push, Body is $ mkfs.ext4 /dev/mmcblk2p5
ModuleID LevelID: PortMgrDlg(0)--MSCDevice--Command Push(no file) excute failed
ModuleID LevelID: CmdOperation, current command executed failed, so SetEvent(hDevCanDeleteEvent)
ModuleID LevelID: CCmdOpreation thread is Closed
ModuleID LevelID: CCmdOpreation thread is Closed
ModuleID LevelID: DeviceManager::OnMsgDeviceEvent() - EVENT_KILL
ModuleID LevelID: CMyExceptionHandler::OnMsgExceptionEvent() - KillExceptionHandlerThread
ModuleID LevelID: Exception Handler thread is closed
ModuleID LevelID: delete MxHidDeviceClass
ModuleID LevelID: Device Manager thread is closed应该是 mkfs.ext4 /dev/mmcblk2p5 出错了,请教原因?


页: [1]
查看完整版本: MfgTool烧写镜像至SD卡失败