[U-Boot] Fwd: u-boot.img size limit for spl fat load ?

Hello Albert,
First tank you so much for inversting your time for replying.
I put some printf in the code and SPL is hanging in spl_load_image_fat function.
I also enable the DEBUG messages here the complete log file :
http://pastebin.com/raw.php?i=BwUJXDDb So I suspect that SPL is not allocating enough memory to load u-boot.img but I can't find where this size limit is set and where I can change it.
Cheers,
Ayoub
2015-01-19 8:08 GMT+01:00 Albert ARIBAUD albert.u.boot@aribaud.net:
Hello Ayoub,
On Fri, 16 Jan 2015 15:42:37 +0100, Ayoub Zaki ayoub.zaki@googlemail.com wrote:
Hello list,
I'm using u-boot-2014.10 and trying to build it with LCD support for
the
Beaglebone black to include a Boot logo image. It seems that spl hangs while fat loading a 2.8MB sized u-boot.img ! I reduced the the logo header file and rebuild u-boot, that worked
for a
1.6MB sized u-boot.img. Is there any size limit for u-boot ? how to increase the memory
allocated
by spl ?
There should not be a size limit for SPL fat load.
What may happen is that SPL code is overwritten before it exits, or U-Boot itself is corrupted after being loaded.
I assume you've seen the SPL banner and not the U-Boot one; that alone does not tell us whether SPL or U-Boot did hang. Can you build U-boot with debug enabled? If this results in too big an SPL image, then try and at least enable debug for the image chainloading parts, so that you can see how far SPL code gets run.
Thanks you.
No problem.
Amicalement,
Albert.

Hello Ayoub,
On Mon, 19 Jan 2015 10:35:56 +0100, Ayoub Zaki ayoub.zaki@googlemail.com wrote:
Hello Albert,
First tank you so much for inversting your time for replying.
I put some printf in the code and SPL is hanging in spl_load_image_fat function.
I also enable the DEBUG messages here the complete log file :
http://pastebin.com/raw.php?i=BwUJXDDb So I suspect that SPL is not allocating enough memory to load u-boot.img but I can't find where this size limit is set and where I can change it.
This could be an explanation, but so could be loading the U-Boot image over SPL BSS if it resides in DDR, or SPL malloc'ed data; and I guess that if the U-Boot image file size was smaller than a hard-coded limit, there would be a warning or even an error.
Can you check CONFIG_SPL_BSS_* and CONFIG_SYS_SPL_MALLOC_* definitions against CONFIG_SYS_TEXT_BASE and file size?
Cheers,
Ayoub
Amicalement,

I checked the SPL Memory allocations :
CONFIG_SYS_SPL_MALLOC_START="(CONFIG_SPL_BSS_START_ADDR + CONFIG_SPL_BSS_MAX_SIZE)" CONFIG_SPL_TEXT_BASE=0x402F0400 CONFIG_SPL_BSS_MAX_SIZE=0x80000 CONFIG_SPL_BSS_START_ADDR=0x80a00000
My U-boot.img is arround 2.8MB
I increased the CONFIG_SPL_BSS_MAX_SIZE to 0x400000 but it did not improve the result, for me is not clear how to play/adjust those values ?
2015-01-19 10:54 GMT+01:00 Albert ARIBAUD albert.u.boot@aribaud.net:
Addition:
Can you check CONFIG_SPL_BSS_* and CONFIG_SYS_SPL_MALLOC_* definitions against CONFIG_SYS_TEXT_BASE and file size?
Same goes for SPL stack if it is placed in DDR.
Amicalement,
Albert.

CONFIG_SYS_TEXT_BASE=0x80800000 and CONFIG_SPL_BSS_START_ADDR=0x80a00000 So the maximal size of u-boot to avoid a memory address colision is 0x200000 = 2MB !
2015-01-19 13:20 GMT+01:00 Ayoub Zaki ayoub.zaki@googlemail.com:
I checked the SPL Memory allocations :
CONFIG_SYS_SPL_MALLOC_START="(CONFIG_SPL_BSS_START_ADDR + CONFIG_SPL_BSS_MAX_SIZE)" CONFIG_SPL_TEXT_BASE=0x402F0400 CONFIG_SPL_BSS_MAX_SIZE=0x80000 CONFIG_SPL_BSS_START_ADDR=0x80a00000
My U-boot.img is arround 2.8MB
I increased the CONFIG_SPL_BSS_MAX_SIZE to 0x400000 but it did not improve the result, for me is not clear how to play/adjust those values ?
2015-01-19 10:54 GMT+01:00 Albert ARIBAUD albert.u.boot@aribaud.net:
Addition:
Can you check CONFIG_SPL_BSS_* and CONFIG_SYS_SPL_MALLOC_* definitions against CONFIG_SYS_TEXT_BASE and file size?
Same goes for SPL stack if it is placed in DDR.
Amicalement,
Albert.

I set TEXT_BASE to :
#define CONFIG_SYS_TEXT_BASE 0x80600000
Now u-boot.img can be up to 4MB sized and it solved my problem :)
Thank you very much for your help.
2015-01-19 13:25 GMT+01:00 Ayoub Zaki ayoub.zaki@googlemail.com:
CONFIG_SYS_TEXT_BASE=0x80800000 and CONFIG_SPL_BSS_START_ADDR=0x80a00000 So the maximal size of u-boot to avoid a memory address colision is 0x200000 = 2MB !
2015-01-19 13:20 GMT+01:00 Ayoub Zaki ayoub.zaki@googlemail.com:
I checked the SPL Memory allocations :
CONFIG_SYS_SPL_MALLOC_START="(CONFIG_SPL_BSS_START_ADDR + CONFIG_SPL_BSS_MAX_SIZE)" CONFIG_SPL_TEXT_BASE=0x402F0400 CONFIG_SPL_BSS_MAX_SIZE=0x80000 CONFIG_SPL_BSS_START_ADDR=0x80a00000
My U-boot.img is arround 2.8MB
I increased the CONFIG_SPL_BSS_MAX_SIZE to 0x400000 but it did not improve the result, for me is not clear how to play/adjust those values ?
2015-01-19 10:54 GMT+01:00 Albert ARIBAUD albert.u.boot@aribaud.net:
Addition:
Can you check CONFIG_SPL_BSS_* and CONFIG_SYS_SPL_MALLOC_* definitions against CONFIG_SYS_TEXT_BASE and file size?
Same goes for SPL stack if it is placed in DDR.
Amicalement,
Albert.

Hello Ayoub,
On Mon, 19 Jan 2015 13:33:30 +0100, Ayoub Zaki ayoub.zaki@googlemail.com wrote:
I set TEXT_BASE to :
#define CONFIG_SYS_TEXT_BASE 0x80600000
Now u-boot.img can be up to 4MB sized and it solved my problem :)
Thank you very much for your help.
No problem. :)
Amicalement,

where you edit it? i have same problem too
-- Sent from: http://u-boot.10912.n7.nabble.com/
participants (3)
-
Albert ARIBAUD
-
Ayoub Zaki
-
laksonobudi