[U-Boot] Is there a working 2011 version of u-boot on i.MX31?

Helmut Raiger helmut.raiger at hale.at
Thu May 26 18:11:26 CEST 2011


Hi,

     I tried to upgrade my 2010/09 version of u-boot for our i.MX31 
board, fixed the stuff needed for the new relocation scheme and ... 
nothing, ... no prompt, so I compiled for mx31pdk (without any change of 
source code) as it is very similar (RAM setup, etc.) and this also shows 
no action on the uart (DEBUG is on).

After some hours of JTAG debugging I finally found that not even 
board_early_init_f is called (neither for mx31pdk nor for our board). 
Tracking down the assembler stuff in start.S and board.c shows that:

1) relocation is done at the end of 'board_init_f'
2) all early init functions are called at the very start of 'board_init_f'
3) these init functions are stored in an array of function pointers 
'init_sequence', which is initialized data and which is not initialized yet.
4) the C-code in general is linked using -pie, but the compiler flag 
-PIE (or -PIC) is missing, so code is not really position independent. 
It is linked for the RAM addresses (0x87f00000), but relocation is not 
yet done.
5) uboot dies when the first function (board_early_init_f) should be called.

Adding -PIE in arch/arm/cpu/arm1136/config.mk and putting initialized 
arrays (with constant values) into the text segment (__attribute__ 
((section (".text")) improves the situation, but butts out a little 
further down the road. I stopped at this point.

There also seems to be a problem with the setup of gd in 'board_init_f' 
which is placed at exactly the same position where start.S sets the 
initial stack pointer (in internal RAM). I think this was not intended.

On the other hand I found several patches in the last months about 
changes in the mx31pdk code which suggest a running uboot port for mx31pdk.

Can someone clarify what I'm missing?
Helmut



--
Scanned by MailScanner.



More information about the U-Boot mailing list