[U-Boot] cpu/arm926ejs/start.S question
Simon Glass
sjg at chromium.org
Fri Jul 8 00:34:23 CEST 2011
Hi Andre,
On Thu, Jul 7, 2011 at 2:38 PM, Andre Renaud <andre at bluewatersys.com> wrote:
> 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?
>
We have a similar thing with Tegra, and have built something into the USB
download script which prepends the needed data. In this case it needs to be
signed so it isn't possible to just include it in the U-Boot source, anyway.
I suppose
cat preload.bin u-boot.bin >u-boot.out
is no good?
Regards,
Simon
>
> Regards,
> Andre
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
More information about the U-Boot
mailing list