Mainline u-boot with custom i.mx28 board fails to boot

cancel
Showing results for 
Search instead for 
Did you mean: 

Mainline u-boot with custom i.mx28 board fails to boot

Jump to solution
1,000 Views
semihhazar
Contributor II

Hi All,

Our custom i.mx28 board fails to boot via USB Recovery Mode. I've used Yocto to build a toolchain (arm-poky-linux-gnueabi 4.8.1) and created a new board for u-boot, compiled and created the u-boot.sb file.

Using mxsldr to transfer the sb file I see HTLLCLLC on the debug console and then the board resets, goes back to recovery mode.

I've enabled CONFIG_SPL_SERIAL_SUPPORT and put in a few serial_puts in spl code and it seems SPL stage is running without any problems. I also wrote a very basic DDR test code which writes and reads data from memory and there seems to be no problems.

To track the error I've placed a debug("!") at the beginning of board_init_f function (assuming this is the earliest place I can test) but I see no output. I also tried lighting up one of the LEDs, but that didn't work either. So I'm assuming second stage is not running at all?

I also tried m28evk_config and it behaves exactly, but spits out an 'Undefined Ins' before going to reset.

What else can I check?

Labels (2)
Tags (2)
0 Kudos
1 Solution
80 Views
semihhazar
Contributor II

Dear Marek,

Thank you for your reply. I've tried printing the DRAM size both in the mainline and the imx branch. Both prints 8KB whereas it should've been 64MB.

Further investigation showed that the DDR2 initialization values were wrong. I've changed them and now it boots. I'm trying to run some memory tests and see everything is working properly.

BR,

Semih

View solution in original post

0 Kudos
2 Replies
80 Views
MarekVasut
Senior Contributor I

1) Clone git.denx.de Git - u-boot/u-boot-imx.git/shortlog

2) Enable CONFIG_SPL_SERIAL_SUPPORT in include/configs/mxs.h

3) Edit arch/arm/cpu/arm926ejs/mxs/spl_boot.c and in mxs_common_spl_init() just below data->boot_mode_idx = bootmode; add:

printf("dram_size=%08x mode=%08x\n", data->mem_dram_size, data->boot_mode_idx);

Inspect if the DRAM size in the output (that's the detected DRAM size) matches your actual DRAM size.

If not, try a dirty temporary workaround. Add data->mem_dram_size = <your dram size>; and see if you can boot.

What I can see from the output is that you get HTLLCLLC , which means the U-Boot itself got loaded and was executed. It is well possible the DRAM size is wrong and this U-Boot cannot relocate at the end of the DRAM.

81 Views
semihhazar
Contributor II

Dear Marek,

Thank you for your reply. I've tried printing the DRAM size both in the mainline and the imx branch. Both prints 8KB whereas it should've been 64MB.

Further investigation showed that the DDR2 initialization values were wrong. I've changed them and now it boots. I'm trying to run some memory tests and see everything is working properly.

BR,

Semih

View solution in original post

0 Kudos