TI技术人员,你好!
现在客户的板子是根据BBK的板子来设计的,具体资源为:
1.MMC0接外部SD卡
2.MMC1接8G Byte Toushiba emmc, Support emmc 5.1,(THGBMHG6C1BAIL)
3.512M Byte DDR3 memory
4.Can boot from SD card.
我帮客户修改了驱动部分mmc.c 来支持emmc5.1, 因为ext_csd.rev的Error back值为8, 所以修改 (card->ext_csd.rev > 6) to(card->ext_csd.rev > 8) .
修改后客户的板子可以读取到emmc1的信息,并且可以使用sfdisk命令来格式化emmc1.
if (card->ext_csd.rev > 8) {
pr_err("%s: unrecognised EXT_CSD revision %d\n",
mmc_hostname(card->host), card->ext_csd.rev);
err = -EINVAL;
goto out;
}
wpi@ubuntu:~$ /home/wpi/ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/drivers/mmc/core/mmc.c
Print info:
[ 2.056518] mmcblk1: mmc1:0001 008G30 7.28 GiB
[ 2.061676] mmcblk1boot0: mmc1:0001 008G30 partition 1 4.00 MiB
[ 2.068481] mmcblk1boot1: mmc1:0001 008G30 partition 2 4.00 MiB
[ 2.077819] mmcblk1: p1 p2 p3 p4
[ 2.088195] mmcblk1boot1: unknown partition table
[ 2.097473] mmcblk1boot0: unknown partition table
[ 2.129730] kjournald starting. Commit interval 5 seconds
[ 2.135742] EXT3-fs (mmcblk0p2): recovery complete
[ 2.215667] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[ 2.223114] VFS: Mounted root (ext3 filesystem) readonly on device 179:2.
[ 2.231323] Freeing init memory: 236K
之后我将启动程序拷贝到emmc1:
并且修改了uboot的启动项,具体修改如下:
将nandboot 强行修改为mmcboot,将 mmc0 改为mmc1,具体正确与否也不知道,但是修改之后可以启动ML0,U-boot,Kernel,
请帮忙check修改是否正确,代码如下:
#define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x80200000\0" \
"kloadaddr=0x80007fc0\0" \
"fdtaddr=0x80F80000\0" \
"fdt_high=0xffffffff\0" \
"rdaddr=0x81000000\0" \
"bootfile=uImage\0" \
"fdtfile=\0" \
"console=ttyO0,115200n8\0" \
"optargs=\0" \
"mtdids=" MTDIDS_DEFAULT "\0" \
"mtdparts=" MTDPARTS_DEFAULT "\0" \
"dfu_alt_info_mmc=" DFU_ALT_INFO_MMC "\0" \
"dfu_alt_info_emmc=rawemmc mmc 1 3751936\0" \
"dfu_alt_info_nand=" DFU_ALT_INFO_NAND "\0" \
"mmcdev=1\0" \
"mmcroot=/dev/mmcblk1p2 ro\0" \
"mmcrootfstype=ext3 rootwait\0" \
……..
#define CONFIG_BOOTCOMMAND \
"mmc dev ${mmcdev}; if mmc rescan; then " \
"echo SD/MMC found on device ${mmcdev};" \
"if run loadbootenv; then " \
"echo Loaded environment from ${bootenv};" \
"run importbootenv;" \
"fi;" \
"if test -n $uenvcmd; then " \
"echo Running uenvcmd …;" \
"run uenvcmd;" \
"fi;" \
"if run loaduimagefat; then " \
"run mmcboot;" \
"elif run loaduimage; then " \
"run mmcboot;" \
"else " \
"echo Could not find ${bootfile} ;" \
"fi;" \
"else " \
"run mmcboot;" \
"fi;" \
现在的情况是MLO,U-boot,Kernel都能够启动,但是会停止在:
[ 1.938446] Waiting for root device /dev/mmcblk1p2…
我找了www.deyisupport.com & http://e2e.ti.com ,都没能找到有效的解决方法,请帮忙分析原因,或者给一个将外部SD卡的程序烧写到内部emmc
的步骤以及U-boot & Kernel需要做哪些修改的文档,谢谢!
目前客户问题卡在这里已经两周,请帮忙尽快解决,谢谢!
备注:
我个人认为问题可能出在文件系统或者kernel上,或者U-boot传递给Kernel的参数有问题,MLO,U-boot,Kernel能启动说明emmc的驱动没什么
大问题。
Jian Zhou:
这篇文档参考过么:
http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/73278.aspx