大家好,最近板子换了颗5.0版本的emmc后uboot就启动不了,以前的旧板子是4.4的可以正常启动
U-Boot 2014.04 (Mar 22 2017 - 14:17:58)
CPU: Freescale i.MX6Q rev1.5 at 792 MHz
CPU: Temperature 33 C, calibration data: 0x5884df7d
Reset cause: POR
Board: MX6-SabreSD
I2C: ready
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
MMC init failed (一直提示初始化失败)
Using default environment
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In: serial
Out: serial
Err: serial
mmc2(part 0) is current device
Net: Phy not found
PHY reset timed out
FEC [PRIME]
Warning: failed to set MAC address
Normal Boot
Hit any key to stop autoboot: 0
mmc2(part 0) is current device
Booting from net ...
*** ERROR: `ethaddr' not set
*** ERROR: `ethaddr' not set
Bad Linux ARM zImage magic!
我看了其他论坛也有人出现过这个,但没人给出有用的结论,不知道这里是否有人遇到过这个问题,kernel中有emmc版本的判断这个我知道,不知道uboot中是否也有这样的判断呢?
Hi, HongBo Liu
I faced this "MMC init failed" issue after I change the board boot kind. Originally the customized board is boot from SPI flash, I change to boot from eMMC, then this failed issue happened.
I found the reason of this issue, in the mmc_get_env_devno() function, it will get teh mmc device number, this is number is set by board_mmc_init() function. My emmc is 0 when boot from SPI flash, when boot from eMMC, the eMMC is set to 1.
int mmc_get_env_devno(void)
{
u32 soc_sbmr = readl(SRC_BASE_ADDR + 0x4);
u32 dev_no;
u32 bootsel;
bootsel = (soc_sbmr & 0x000000FF) >> 6 ;
/* If not boot from sd/mmc, use default value */
if (bootsel != 1)
return CONFIG_SYS_MMC_ENV_DEV;
/* BOOT_CFG2[3] and BOOT_CFG2[4] */
dev_no = (soc_sbmr & 0x00001800) >> 11;
/* need ubstract 1 to map to the mmc3 device id
* see the comments in board_mmc_init function
*/
if (2 == dev_no)
//dev_no--;
dev_no = CONFIG_SYS_MMC_ENV_DEV; => I fix this issue by modify the device number
return dev_no;
}
BR,
Xiao
Hi,
You can refer to the document I created in our communityEMMC 5.0 and EMMC 5.1 work on i.MX6 ,hope this can help you. You neeed to modify the value of card->ext_csd.rev.
Have a great day,
Rita
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------