From: Andre Renaud <andre@bluewatersys.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] cpu/arm926ejs/start.S question
Date: Fri, 08 Jul 2011 09:38:52 +1200 [thread overview]
Message-ID: <4E16276C.3080303@bluewatersys.com> (raw)
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
next reply other threads:[~2011-07-07 21:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-07 21:38 Andre Renaud [this message]
2011-07-07 22:34 ` [U-Boot] cpu/arm926ejs/start.S question 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
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=4E16276C.3080303@bluewatersys.com \
--to=andre@bluewatersys.com \
--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