在网盘中下载了mfgtools压缩包,开发板通过use接OTG,上电后在mfgtools上点击Start按钮,可以依次看到以下过程:Loading Uboot,Loading Kernel,Loading Initramfs,Jumping to OS image,在出现Jumping to OS image后,立即出现No Device Connected,停留在No Device Connected 不再进行第二阶段的烧写,不知道是什么原因。并且随即开发板会加载出来一个大小是0.98M的空盘,开发板显示图中内容,请问怎么解决呢?@weidongshan@Yuxuan
- 看报错信息,说的是 emmc 初始化的时候,遇到 io 错误;可以考虑增强固件 dtb 中的 emmc 管脚驱动力来尝试;
- 如果 100ask 官方烧录工具能烧录,就用官方的工具好了;如果不行,建议走售后;
简单分析一下 mfgtools 的烧录过程;
双击运行 buildroot-image-100ask_100ask-ddr512m-emmc4g.vbs,会调用 MfgTool2.exe,并设定一些参数;
之后的执行过程可以看 100ask_imx6ull-mfgtools_20200211\Profiles\Linux\OS Firmware\ucl2.xml 文件
主要看 这一项;
<LIST name="eMMC" desc="Choose eMMC as media">
<!-- %lite% 这样的为变量引用,在上面的 vbs 文件中定义 -->
<!-- 加载 firmware 下的 u-boot 固件,名为:u-boot-imx6ull14x14_ddr512_emmc.imx -->
<CMD state="BootStrap" type="boot" body="BootStrap" file ="firmware/u-boot-imx6ul%lite%%6uluboot%_ddr%ddrsize%_emmc.imx" ifdev="MX6ULL">Loading U-boot</CMD>
<!-- 加载 firmware 下的 u-boot 固件,名为:zImage -->
<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>
<!-- 加载 firmware 下的 initramfs 固件,名为:fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot-->
<!-- 在 vbs 同级的 cfg.ini 文件中定义 -->
<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>
<!-- 加载 firmware 下的 dtb 固件,名为:zImage-imx6ull-14x14-emmc.dtb-->
<CMD state="BootStrap" type="load" file="firmware/zImage-imx6ul%lite%-%6uldtb%-emmc.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>
<!-- 加载 ucl2.xml 同级 mksdcard.sh.tar 固件,主要是给 emmc 分区格式化用的 -->
<!-- create partition -->
<CMD state="Updater" type="push" body="send" file="mksdcard.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.sh /dev/mmcblk%mmc%"> Partitioning...</CMD>
<!-- 以下就是烧录的具体实现 -->
<!-- burn uboot -->
<CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk%mmc% bs=1k seek=768 conv=fsync count=8">clear u-boot arg</CMD>
<!-- access boot partition -->
<CMD state="Updater" type="push" body="$ echo 0 > /sys/block/mmcblk%mmc%boot0/force_ro">access boot partition 1</CMD>
<CMD state="Updater" type="push" body="send" file="files/u-boot-dtb.imx" ifdev="MX6ULL">Sending u-boot.bin</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk%mmc%boot0 bs=512 seek=2">write U-Boot to sd card</CMD>
<CMD state="Updater" type="push" body="$ echo 1 > /sys/block/mmcblk%mmc%boot0/force_ro"> re-enable read-only access </CMD>
<CMD state="Updater" type="push" body="$ mmc bootpart enable 1 1 /dev/mmcblk%mmc%">enable boot partion 1 to boot</CMD>
<!-- create fat partition -->
<CMD state="Updater" type="push" body="$ while [ ! -e /dev/mmcblk%mmc%p1 ]; do sleep 1; echo \"waiting...\"; done ">Waiting for the partition ready</CMD>
<CMD state="Updater" type="push" body="$ mkfs.vfat /dev/mmcblk%mmc%p1">Formatting rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk%mmc%p1"/>
<CMD state="Updater" type="push" body="$ mount -t vfat /dev/mmcblk%mmc%p1 /mnt/mmcblk%mmc%p1"/>
<!-- burn zImage -->
<CMD state="Updater" type="push" body="send" file="files/zImage" ifdev="MX6ULL">Sending kernel zImage</CMD>
<CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblk%mmc%p1/zImage">write kernel image to sd card</CMD>
<!-- burn dtb -->
<CMD state="Updater" type="push" body="send" file="files/100ask_imx6ull-14x14.dtb" ifdev="MX6ULL">Sending Device Tree file</CMD>
<CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblk%mmc%p1/100ask_imx6ull-14x14.dtb" ifdev="MX6ULL">write device tree to sd card</CMD>
<!-- burn boot script -->
<CMD state="Updater" type="push" body="send" file="files/boot-emmc-ddr%ddrsize%.scr" ifdev="MX6ULL">Sending Device Tree file</CMD>
<CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblk%mmc%p1/boot.scr" ifdev="MX6ULL MX6UL">write device tree to sd card</CMD>
<!-- burn m4 demo bins-->
<CMD state="Updater" type="push" body="$ umount /mnt/mmcblk%mmc%p1">Unmounting vfat partition</CMD>
<!-- burn rootfs -->
<CMD state="Updater" type="push" body="$ mkfs.ext3 -F -E nodiscard /dev/mmcblk%mmc%p2">Formatting rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk%mmc%p2"/>
<CMD state="Updater" type="push" body="$ mount -t ext3 /dev/mmcblk%mmc%p2 /mnt/mmcblk%mmc%p2"/>
<CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblk%mmc%p2" file="files/%rootfs%" ifdev="MX6ULL MX6UL">Sending and writting rootfs</CMD>
<CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>
<CMD state="Updater" type="push" body="$ umount /mnt/mmcblk%mmc%p2">Unmounting rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>