[U-Boot-Users] [bug] arm920t start.S fails to compile with large CFG_MALLOC_LEN
Andrew Dyer
amdyer at gmail.com
Mon Jul 9 19:08:17 CEST 2007
On 7/9/07, Andrew Dyer <amdyer at gmail.com> wrote:
> In cpu/arm920t/start.S the macro get_bad_stack assumes that
> (CONFIG_STACKSIZE+CFG_MALLOC_LEN) will fit in a 16-bit constant. I am
> trying to do a build where CFG_MALLOC_LEN is much larger (need
> buffering for gzip splash screen decompression). Assembly of the file
> fails with errors due to invalid constants.
>
> the macro looks like this:
>
> .macro get_bad_stack
> ldr r13, _armboot_start @ setup our mode stack
> sub r13, r13, #(CONFIG_STACKSIZE+CFG_MALLOC_LEN)
OK, I fixed it for my case by changing this section to 2 subtracts like so:
sub r13, r13, #(CONFIG_STACKSIZE)
sub r13, r13, #(CFG_MALLOC_LEN)
This will still break with defines that can't be encoded in the ARM
constant field (8 bit constant shifted by an even number of bit
positions). It appears this construct appears in a bunch of ARM
start.S files.
Any opinions on how this should get fixed? I'm happy to cook up a
patch if there is consensus on what to do.
--
Hardware, n.:
The parts of a computer system that can be kicked.
More information about the U-Boot
mailing list