[Arm-netbook] u-boot spl bss section clean problem

Manuel Braga mul.braga at gmail.com
Tue Feb 21 19:11:02 GMT 2012


On Tue, 21 Feb 2012 22:13:15 +0800 Tom Cubie <mr.hipboi at gmail.com>
wrote:
> Hi,
>     i met this problem on u-boot spl. In u-boot relocate_code, there
> is a routine clean the .bss section in start.S(code here[1]), but
> there is not bss section in my build. The u-boot-spl.map file is
> here [2]. I looked the register when calling clear_bss routine, r0
> and r1 are both 0x50000000, so the clear loop never stops. Can anyone
> tell me why no bss section after the buid? The u-boot code is at [3].
> 
> [1] http://nopaste.us/5923.html
> [2] http://nopaste.us/5922.html
> [3]
> http://git.hands.com/?p=u-boot.git;a=shortlog;h=refs/heads/lichee-dev-mmc

Hi, i don't have any experience with u-boot, but just downloaded and
compiled, and is as you say, the bss section has size zero.
If this is wrong or right, i don't know.

But as by the linker script(u-boot-spl.lds) 
       .bss :
        {
                . = ALIGN(4);
                __bss_start = .;
                *(.bss*)
                . = ALIGN(4);
                __bss_end__ = .;
        } >.sdram

if there isn't any .bss* objects, __bss_end__ will be equal to
__bss_start, you saw in the registers both set to 0x50000000


Shouldn't clear_bss also handle this case of zero size?
In other arm cpus start.S, clear_bss is totaly removed with
#ifndef CONFIG_SPL_BUILD, but for arm7 is not.
Isn't here the problem?



More information about the arm-netbook mailing list