[U-Boot] cpu/arm926ejs/start.S question
Andre Renaud
andre at bluewatersys.com
Thu Jul 7 23:38:52 CEST 2011
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
More information about the U-Boot
mailing list