public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Is there a working  2011 version of u-boot on i.MX31?
@ 2011-05-26 16:11 Helmut Raiger
  2011-05-26 17:30 ` Wolfgang Denk
  2011-05-27 10:26 ` Stefano Babic
  0 siblings, 2 replies; 11+ messages in thread
From: Helmut Raiger @ 2011-05-26 16:11 UTC (permalink / raw)
  To: u-boot

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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-06-06 14:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 16:11 [U-Boot] Is there a working 2011 version of u-boot on i.MX31? Helmut Raiger
2011-05-26 17:30 ` Wolfgang Denk
2011-05-26 19:01   ` Fabio Estevam
2011-05-27 10:26 ` Stefano Babic
2011-05-30  8:00   ` Helmut Raiger
2011-05-30 16:37     ` Helmut Raiger
2011-05-31 23:49     ` Fabio Estevam
2011-06-06 13:31       ` Helmut Raiger
2011-06-06 13:53         ` Fabio Estevam
2011-06-06 14:28         ` Stefano Babic
2011-06-06 14:32         ` Helmut Raiger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox