有个问题 请问一下,原IM6的EMMC是SANDISK 4.41版,现在因为EMMC停产,EMMC换成5.1版的,按照官方的方法说是5.1版EMMC要降成4.41版来使用,修改了LTIB里的LINUX EMMC驱动:
/* workaround: support emmc 4.5 cards to work at emmc 4.4 mode */
if (card->ext_csd.rev >
printk(KERN_ERR "%s: unrecognised EXT_CSD revision %d\n",
mmc_hostname(card->host), card->ext_csd.rev);
err = -EINVAL;
goto out;
}
生成uImage,放到Profiles\MX6Q Linux Update\OS Firmware下,但MFGTOOL一直卡在<CMD state="Updater" type="push" body="$ echo 1 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access boot partition 1</CMD>这一行 ,即显示access boot partition 1,不再往下执行,这种情况要怎么改?
CPU是IMX6Q, 用的LTIB L3.0.35_4.1.0, MFGTOOL也是对应的
EMMC驱动mmc.c修改了这里,完全按官方的方法改的
/* workaround: support emmc 4.5 cards to work at emmc 4.4 mode */
if (card->ext_csd.rev >
printk(KERN_ERR "%s: unrecognised EXT_CSD revision %d\n",
mmc_hostname(card->host), card->ext_csd.rev);
err = -EINVAL;
goto out;
}
不知道为什么 > 8)不见了
Yes, you only need the modify the rev as we recommend, does it work well now?
I followed the method NXP recommanded, but the mfgtool can not work well, it always stops on
"<CMD state="Updater" type="push" body="$ echo 1 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access boot partition 1</CMD>"
the mfgtool log error info:
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ ls /dev/*
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1024 count=16
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ echo 1 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config
ModuleID[2] LevelID[1]: PortMgrDlg(0)--MxHidDevice--Command Push(no file) excute failed
If cancel this command, mfgtool seems to write complete, but the device can not start.
Could you tell me why?
Have you rebuild the the firmware uImage used for MfgTool ? You need to rebuild the uImage for Mfgtool, and then Update the uImage in Mfgtool .
Yes, I have, and replaced the uImage for mfgtool.
the ucl2.xml :
<UCL>
<CFG>
<STATE name="BootStrap" dev="MX6Q" vid="15A2" pid="0054"/>
<STATE name="Updater" dev="MSC" vid="066F" pid="37FF"/>
</CFG>
<LIST name="SabreSD-eMMC" desc="Choose eMMC Linux as media">
<CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-mx6q-sabresd.bin" >Loading U-boot</CMD>
<CMD state="BootStrap" type="load" file="uImage" address="0x10800000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Kernel.</CMD>
<CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot" address="0x10C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Initramfs.</CMD>
<CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>
<!-- UBOOT -->
<CMD state="Updater" type="push" body="$ ls /dev/*"/>
<CMD state="Updater" type="push" body="$ dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1024 count=16">clean up u-boot parameter</CMD>
<CMD state="Updater" type="push" body="$ echo 1 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access boot partition 1</CMD>
<CMD state="Updater" type="push" body="send" file="files/u-boot.imx">Sending U-Boot</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=512 seek=2">write U-Boot to sd card</CMD>
<CMD state="Updater" type="push" body="$ echo 8 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access user partition and enable boot partion 1 to boot</CMD>
<!-- KERNEL -->
<CMD state="Updater" type="push" body="send" file="files/kernel.bin">Sending kernel uImage</CMD>
<CMD state="Updater" type="push" body="$ dd if=$FILE of=/dev/mmcblk0 bs=1M seek=1 conv=fsync">write kernel image to sd card</CMD>
<!-- make 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/mmcblk0"> Partitioning...</CMD>
<CMD state="Updater" type="push" body="$ mkfs.ext4 -j /dev/mmcblk0p1">Formatting rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ mkfs.ext4 -j /dev/mmcblk0p2">Formatting rootfs partition</CMD>
<!-- ROOT -->
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk0p1"/>
<CMD state="Updater" type="push" body="$ mount -t ext4 /dev/mmcblk0p1 /mnt/mmcblk0p1"/>
<CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblk0p1" file="files/rootfs.tar.bz2">Sending and writting rootfs</CMD>
<CMD state="Updater" type="push" body="frf">Finishing rootfs write</CMD>
<!-- SOFT -->
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk0p2"/>
<CMD state="Updater" type="push" body="$ mount -t ext4 /dev/mmcblk0p2 /mnt/mmcblk0p2"/>
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk0p2/firmware"/>
<CMD state="Updater" type="push" body="send" file="files/fpga.bin">Sending FPGA firmware </CMD>
<CMD state="Updater" type="push" body="$ cp $FILE /mnt/mmcblk0p2/firmware/fpga_firmware.bin">write FPGA firmware </CMD>
<CMD state="Updater" type="push" body="$ mkdir -p /mnt/mmcblk0p2/app"/>
<CMD state="Updater" type="push" body="pipe tar -jxv -C /mnt/mmcblk0p2/app" file="files/soft.tar.bz2">Sending and writting app</CMD>
<CMD state="Updater" type="push" body="frf">Finishing app write</CMD>
<CMD state="Updater" type="push" body="$ umount /mnt/mmcblk0p2">Unmounting config partition</CMD>
<CMD state="Updater" type="push" body="$ umount /mnt/mmcblk0p1">Unmounting rootfs partition</CMD>
<CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>
</UCL>