2008-03-06 22:14:11     region ram is full!?

Document created by Aaronwu Employee on Sep 17, 2013
Version 1Show Document
  • View in full screen mode

2008-03-06 22:14:11     region ram is full!?

zk sunk (CHINA)

Message: 52179    I download u-boot  src from svn yestoday, and use new toolchain(blackfin-toolchain-uclinux-SVN.i386.tar.bz2).

On my board connect a usb controller--SL811HS with bf531. And it have a spi flash only,

so boot mode can only be BFIN_BOOT_SPI_MASTER.

 

If define CONFIG_USB_STORAGE ,  when great u-boot.bin there is an error:

bfin-uclinux-ld.real: region ram is full (u-boot section .bss)

 

I also used older u-boot(svn-882), this version can great u-boot.bin and u-boot.ldr

I download u-boot.bin via com, and it can run correctly, usb disk work fine.  So I think my usb driver is fine.

But bf531 can not  boot using this u-boot.ldr

 

Any suggestion? Sorry about my English.

TranslateQuoteReplyEditDelete

 

 

2008-03-07 00:20:08     Re: region ram is full!?

Mike Frysinger (UNITED STATES)

Message: 52183    it means your compiled code is too full for the regions defined in your board's linker script

QuoteReplyEditDelete

 

 

2008-03-07 02:20:36     Re: region ram is full!?

zk sunk (CHINA)

Message: 52187    thanks.

 

If I change CFG_MONITOR_LEN from 256k to 400k, u-boot.bin can be generate, but u-boot.ldr error.

 

Creating LDR u-boot.ldr ...

Adding DXE 'u-boot' ... [initcode 284] [jump block] [ELF block: 143760 @ 0x01F9C000] [ELF block: 44 @ 0xFFA0000C] [ELF block: 264740 @ 0x01FBF1BC] make: *** [u-boot.ldr] Segmentation fault

make: *** Deleting file `u-boot.ldr'

 

I don't know clearly about CFG_MONITOR, but CFG_MONITOR_BASE is in sdram right?

Why I can not change it bigger? How should I do to?

TranslateQuoteReplyEditDelete

 

 

2008-03-07 11:10:46     Re: region ram is full!?

Mike Frysinger (UNITED STATES)

Message: 52196    ldr-utils should not segfault ... please post the "u-boot" file as an attachment

 

what version of the toolchain are you using ?

QuoteReplyEditDelete

 

 

2008-03-07 19:45:34     Re: region ram is full!?

zk sunk (CHINA)

Message: 52209    # bfin-uclinux-ldr -V

ldr-utils-cvs: ldr.c compiled Oct 25 2007

$Id: ldr.c 1866 2007-10-18 02:18:19Z vapier $

 

# bfin-uclinux-gcc -v

Using built-in specs.

Target: bfin-uclinux

Configured with: /usr/local/src/blackfin/svn/toolchain/trunk/gcc-4.1/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=bfin-uclinux --prefix=/usr/local/src/blackfin/toolchains/20071025/out-uclinux --enable-threads=posix --with-sysroot=/usr/local/src/blackfin/toolchains/20071025/out-uclinux/bfin-uclinux/runtime --disable-libstdcxx-pch --disable-symvers --disable-libssp --enable-version-specific-runtime-libs --enable-__cxa_atexit

Thread model: posix

gcc version 4.1.2 (ADI svn)

 

I guess my u-boot.bin file can run on bf533-ezkit board.

file.tar.bz2

TranslateQuoteReplyEditDelete

 

 

2008-03-08 04:14:09     Re: region ram is full!?

Mike Frysinger (UNITED STATES)

Message: 52212    you posted the binary files, not the original elf

 

i need the file named "u-boot"

QuoteReplyEditDelete

 

 

2008-03-08 04:25:32     Re: region ram is full!?

zk sunk (CHINA)

Message: 52213    sorry,

u-boot

TranslateQuoteReplyEditDelete

 

 

2008-03-08 04:41:09     Re: region ram is full!?

Mike Frysinger (UNITED STATES)

Message: 52214    i think i'll also need the file cpu/blackfin/initcode.o

 

it doesnt segfault for me ... but i'm not testing adding an initblock

 

also post the command that was run ... you posted the output of the ldr command, but not of make running ldr

QuoteReplyEditDelete

 

 

2008-03-08 04:58:05     Re: region ram is full!?

zk sunk (CHINA)

Message: 52215    bfin-uclinux-objcopy --gap-fill=0xff -O srec u-boot u-boot.srec

bfin-uclinux-objcopy --gap-fill=0xff -O ihex u-boot u-boot.hex

bfin-uclinux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin

./tools/envcrc --binary > env-ldr.o

bfin-uclinux-ldr -T bf533-0.3 -f -c u-boot.ldr u-boot --use-vmas --initcode cpu/blackfin/initcode.o --punchit $((0x30000)):$((0x1000)):env-ldr.o

Creating LDR u-boot.ldr ...

Adding DXE 'u-boot' ... [initcode 284] [jump block] [ELF block: 143760 @ 0x01F9C000] [ELF block: 44 @ 0xFFA0000C] [ELF block: 264740 @ 0x01FBF1BC] make: *** [u-boot.ldr] Segmentation fault

make: *** Deleting file `u-boot.ldr'

initcode.o

TranslateQuoteReplyEditDelete

 

 

2008-03-08 06:04:18     Re: region ram is full!?

Mike Frysinger (UNITED STATES)

Message: 52216    your CFG_ENV_OFFSET Is clearly wrong ... 0x30000 makes no sense on a BF533-EZKIT (and probably any other board)

 

i'll add handling to ldr-utils for such invalid scenarios so it doesnt segfault

QuoteReplyEditDelete

 

 

2008-03-09 20:49:39     Re: region ram is full!?

zk sunk (CHINA)

Message: 52230    I think CFG_ENV_OFFSET is env address in my flash, why I can not set it to 192K???

TranslateQuoteReplyEditDelete

 

 

2008-03-09 20:55:58     Re: region ram is full!?

Mike Frysinger (UNITED STATES)

Message: 52232    there is nothing wrong with setting CFG_ENV_OFFSET to any random sector, you just cant enable embedding of the environment

QuoteReplyEditDelete

 

 

2008-03-09 21:19:56     Re: region ram is full!?

zk sunk (CHINA)

Message: 52234    I am sure I haven't define ENV_IS_EMBEDDED

TranslateQuoteReplyEditDelete

 

 

2008-03-09 21:26:13     Re: region ram is full!?

Mike Frysinger (UNITED STATES)

Message: 52235    ENV_IS_EMBEDDED applies only to bypass boot mode, not any of the LDR based boot modes

 

there was a bug where --punchit was added even when ENV_IS_EMBEDDED_CUSTOM was not defined, but ive fixed that now

QuoteReplyEditDelete

 

 

2008-03-09 21:51:14     Re: region ram is full!?

zk sunk (CHINA)

Message: 52236    when I defined ENV_IS_EMBEDDED_CUSTOM, have the same error

TranslateQuoteReplyEditDelete

 

 

2008-03-09 22:01:41     Re: region ram is full!?

Mike Frysinger (UNITED STATES)

Message: 52237    i said embedding the environment like that is wrong

QuoteReplyEditDelete

 

 

2008-03-09 22:53:16     Re: region ram is full!?

zk sunk (CHINA)

Message: 52240    ok, what can I do now?

please tell me why this erroe  relate with  CONFIG_USB_STORAGE?

If I don't define CONFIG_USB_STORAGE everything is fine.

TranslateQuoteReplyEditDelete

 

 

2008-03-10 11:13:30     Re: region ram is full!?

Mike Frysinger (UNITED STATES)

Message: 52267    as i also said, i fixed a bug related to LDRs and not embedding the environment in the latest svn trunk ... so you should update to that and test again

 

as for the USB option, it will build a lot of more files, so everything shifts/increases

QuoteReplyEditDelete

 

 

2008-03-13 22:31:41     Re: region ram is full!?

new kernel (CHINA)

Message: 52495    Hi Mike,

  As you said:  " ENV_IS_EMBEDDED applies only to bypass boot mode, not any of the LDR based boot modes

 

there was a bug where --punchit was added even when ENV_IS_EMBEDDED_CUSTOM was not defined, but ive fixed that now "

 

Could you tell me where do you fix in SVN ?

QuoteReplyEditDelete

 

 

2008-03-13 23:09:03     Re: region ram is full!?

Mike Frysinger (UNITED STATES)

Message: 52497    you can view the history:

http://blackfin.uclinux.org/gf/project/u-boot/scmsvn/

Attachments

Outcomes