public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Helmut Raiger <helmut.raiger@hale.at>
To: u-boot@lists.denx.de
Subject: [U-Boot] Is there a working  2011 version of u-boot on i.MX31?
Date: Thu, 26 May 2011 18:11:26 +0200	[thread overview]
Message-ID: <4DDE7BAE.7020408@hale.at> (raw)

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.

             reply	other threads:[~2011-05-26 16:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26 16:11 Helmut Raiger [this message]
2011-05-26 17:30 ` [U-Boot] Is there a working 2011 version of u-boot on i.MX31? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DDE7BAE.7020408@hale.at \
    --to=helmut.raiger@hale.at \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox