AnsweredAssumed Answered

U-boot 2016.03bootlogo problem

Question asked by 贾继中 贾继中 on Jun 15, 2018
Latest reply on Jun 17, 2018 by 贾继中 贾继中

Hi qiang

I have patched uboot2016.03 from fsl-yocto-L4.1.15_2.1.0-ga with L4.1.15_GA1.2.0_uboot_logo_keep_patch_2017-01-06.zip

after dd bmp file to emmc by following command,uboot print MMC: no card present,can't read bmp file from emmc

sudo dd if=./logo1.bmp of=/dev/mmcblk3 bs=1 seek=1048576 skip=54

 

I then modified the board_late_init function,it's print bellow debug messages

 

//boot log

U-Boot 2016.03 (Jun 15 2018 - 22:19:23 +0800)

CPU: Freescale i.MX6Q rev1.5 996 MHz (running at 792 MHz)
CPU: Extended Commercial temperature grade (-20C to 105C) at 57C
Reset cause: WDOG
Board: myimx6-ek314
I2C: ready
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
In: serial
Out: serial
Err: serial
mmc is 2
MMC: no card present
mmc init failed!
config_ipu_lvds_clk: freq = 448000000.
config_ipu_lvds_clk: set pll2_pfd0 clock to 450MHz, divider = 21.
switch to partitions #0, OK

 

 

//board late init

int board_late_init(void)
{
#ifdef CONFIG_UBOOT_LOGO_ENABLE
unsigned int size = DISPLAY_WIDTH * DISPLAY_HEIGHT * (DISPLAY_BPP / 8);
unsigned char * pData;
unsigned int start, count;
int i, bmpReady = 0;
char *fs_argv[5];
char addr[17];
char part[3];
int mmc_dev = mmc_get_env_devno();
struct mmc *mmc = find_mmc_device(board_mmc_get_env_dev(mmc_dev));

sprintf(addr, "%lx", CONFIG_FB_BASE);
sprintf(part, "%d:%s", mmc_dev, getenv("mmcpart"));
pData = (unsigned char *)CONFIG_FB_BASE;

fs_argv[0] = "fatload";
fs_argv[1] = "mmc";
fs_argv[2] = part;
fs_argv[3] = addr;
fs_argv[4] = getenv("bootlogobmp");

// if (fs_argv[4])
// {
// if (!do_fat_fsload(NULL, 0, 5, fs_argv)) {
// bmpReady = 1;
// }
// }
printf("mmc is %d\n", mmc_dev);
if (bmpReady == 0)
{
if (mmc) {
if (mmc_init(mmc) == 0) {//can not found emm there!
start = ALIGN(UBOOT_LOGO_BMP_ADDR, mmc->read_bl_len) / mmc->read_bl_len;
count = ALIGN(size, mmc->read_bl_len) / mmc->read_bl_len;
printf("reading bmp data...\n");
mmc->block_dev.block_read(mmc_dev, start, count, pData);
bmpReady = 1;
}
else{
printf("mmc init failed!\n");
}
}
}

if (bmpReady == 0) {
// Fill RGB frame buffer
// Red
for (i = 0; i < (DISPLAY_WIDTH * DISPLAY_HEIGHT * (DISPLAY_BPP / 8) / 3); i += (DISPLAY_BPP / 8)) {
#if (DISPLAY_BPP == 16)
pData[i + 0] = 0x00;
pData[i + 1] = 0xF8;
#else
pData[i + 0] = 0x00;
pData[i + 1] = 0x00;
pData[i + 2] = 0xFF;
#endif
}

Outcomes