public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] cpu/arm926ejs/start.S question
@ 2011-07-07 21:38 Andre Renaud
  2011-07-07 22:34 ` Simon Glass
  2011-07-08  0:54 ` Fabio Estevam
  0 siblings, 2 replies; 10+ messages in thread
From: Andre Renaud @ 2011-07-07 21:38 UTC (permalink / raw)
  To: u-boot

Hello,
I am working on an i.MX25 board, and would like to know the recommended
mechanism for putting code in before the first instruction in the
executable, but outside the *_spl system.

Basically, the i.MX25 has a smart boot rom in the CPU, which will
extract the first block, and interpret it (as data, rather than
instructions). However, if I just use the linker script to put this
block before start.S, then U-Boot relocation gets messed up, as _start
is now not the beginning of the image, and a lot of the calculated
offsets are wrong.

At the moment I have this working with the following change in start.S:
--- cpu/arm926ejs/start.S       (revision 36)
+++ cpu/arm926ejs/start.S       (working copy)
@@ -53,6 +53,9 @@

 .globl _start
 _start:
+#ifdef CONFIG_PRE_START_INCLUDE
+#include CONFIG_PRE_START_INCLUDE
+#endif
        b       reset
 #ifdef CONFIG_PRELOADER
 /* No exception handlers in preloader */

and I then #define CONFIG_PRE_START_INCLUDE to be the assembler for the
i.MX25 specific boot code.

Is there a nicer way to go about this?

Regards,
Andre

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

end of thread, other threads:[~2011-07-11 15:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 21:38 [U-Boot] cpu/arm926ejs/start.S question Andre Renaud
2011-07-07 22:34 ` Simon Glass
2011-07-07 22:40   ` Andre Renaud
2011-07-08  0:54 ` Fabio Estevam
2011-07-08  1:20   ` Andre Renaud
2011-07-08  1:38     ` Fabio Estevam
2011-07-08  1:42       ` Andre Renaud
2011-07-08  6:13     ` Stefano Babic
2011-07-11  4:59   ` Andre Renaud
2011-07-11 15:00     ` Fabio Estevam

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