我把MLO.spi和u-boot.img分别烧写到SPI FLASH的0x0和0x20000,然后设置从SPI启动。结果出现了如下的提示信息,一直卡在这里:
U-Boot SPL 2011.09 (Mar 19 2013 - 15:02:01)
Texas Instruments Revision detection unimplemented
Could not probe the EEPROM; something fundamentally wrong on the I2C bus.
read_eeprom() failure. continuing with ddr3
No daughter card present
Did not find a recognized configuration, assuming General purpose EVM in Profile 0 with Daughter board
SF: Detected W25Q64 with page size 4 KiB, total 8 MiB
我跟进去,找到了函数:spi_boot,然后打印出在内存CONFIG_SYS_TEXT_BASE的内容,和u-boot.img的内容是完全一样的,可是u-boot.img为什么就没有被执行呢?(注:我使用的是自己做的板子,用这个u-boot.img放到SD卡中,是可以被正常执行的)
void spi_boot(void)
{
struct spi_flash *flash;
void (*uboot)(void) __noreturn;
/*
* Load U-Boot image from SPI flash into RAM
*/
flash = spi_flash_probe(CONFIG_SPL_SPI_BUS, CONFIG_SPL_SPI_CS,
CONFIG_SF_DEFAULT_SPEED, SPI_MODE_3);
if (!flash) {
puts("failed.\n");
hang();
}
spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS,
CONFIG_SYS_SPI_U_BOOT_SIZE,
(void *) CONFIG_SYS_TEXT_BASE);
/*
* Jump to U-Boot image
*/
uboot = (void *) CONFIG_SYS_TEXT_BASE;
(*uboot)();
}