[U-Boot] [PATCH] omap: spl: fix build break due to changes in FAT

Wolfgang Denk wd at denx.de
Tue Oct 4 17:38:38 CEST 2011


Dear Aneesh V,

In message <1317741066-31121-1-git-send-email-aneesh at ti.com> you wrote:
> From: a0393566local (none) <a0393566local at ula0393566>
> 
> FAT library now uses malloc() and free(). But SPL doesn't
> have heap until now. Setup a heap in SDRAM to fix this issue.
> 
> However this increases SPL footprint beyond the available SRAM
> budget. So, compile out some fancy features in the SDARM init
> bring back footprint under control
> 
> CC: Sandeep Paulraj <s-paulraj at ti.com>
> CC: Wolfgang Denk <wd at denx.de>
> Signed-off-by: Aneesh V <aneesh at ti.com>

I think it is a bad idea to go this way.

We should face the fact that SPL code is running before proper
relocation to RAM, and thus there are certain limitations.

Certain parts of the code, including file system code, has not been
written with such limitations in mind.  It makes use of functions that
are not available in SPL code, or of features that are not available
in SPL code (like a heap, or a virtually unlimited stack).

You may be lucky here, and your test cases with the FFAT code may
actually work.  But I would not bet on it.


U-Boot has not been designed to run complex code like file systemes
before relocation, and SPL code _is_ before relocation.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Lead me not into temptation... I can find it myself.


More information about the U-Boot mailing list