[U-Boot] [RFC][PATCH 00/19] arm: add full relocation / cache support

Matthias Weißer weisserm at arcor.de
Thu Aug 5 11:23:13 CEST 2010


Hello Heiko

Am 05.08.2010 08:19, schrieb Heiko Schocher:
>> The board runs through my low level init (so DDR RAM is up) and later on
>> crashes in the first call to memset. I could not further debug this as I
>
> Where is this memset()? The first after low level init is in:
> arch/arm/lib/board.c board_init_f(), do you mean this?

Yes. That was the point it crashed.

> If so, then something must be wrong with your memory setup.

It was at more then one point :-)

> Hmmm... from where did your board boot? I tried it on the tx25
> board, which boots from nand. Do you boot from a NOR flash?

Yes. My board boots from NOR.

> If so you *must* change TEXT_BASE in config.mk (see:
> doc/README.arm-relocation line 45) in your board directory
> to where u-boot starts in flash!

I think I missed that point.

> Ah, yep, this seems to me the reason why it don;t work for you:
>
> found in the patchseries you pointed to
> http://lists.denx.de/pipermail/u-boot/2010-August/074688.html
>
> board/syteco/jadecpu/config.mk
> [...]
> +TEXT_BASE = 0x46000000
>
> change this to
>
> (as in include/configs/jadecpu.h is defined the following:
>
> +/*
> + * FLASH and environment organization
> + */
> +#define CONFIG_SYS_FLASH_BASE		0x10000000
> +#define CONFIG_SYS_MAX_FLASH_BANKS	1
> +#define CONFIG_SYS_MAX_FLASH_SECT	256
> +#define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_FLASH_BASE
> )
>
> +TEXT_BASE = 0x10000000
>
> and try it again.

I did that but the board still failed to boot and crashed at the first 
call to memset. So I had a "nice" debug session single stepping through 
the code with a lss file in parallel.

The reason it crashed so early was my setup of CONFIG_SYS_INIT_SP_ADDR 
which I set to the *beginning* of some 32k internal SRAM. And as the 
stack grows downwards it crashed right at the first push instruction.

So, I now have a running system with your patches and greatly improved 
uncompressing times of my boot images. We are now able to use compressed 
images which was not possible due to boot time restrictions in older 
versions. So it would be great if this stuff could go mainline.

Thanks,
Matthias


More information about the U-Boot mailing list