From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Tue, 04 Oct 2011 17:38:38 +0200 Subject: [U-Boot] [PATCH] omap: spl: fix build break due to changes in FAT In-Reply-To: <1317741066-31121-1-git-send-email-aneesh@ti.com> References: <1317741066-31121-1-git-send-email-aneesh@ti.com> Message-ID: <20111004153838.3CD0018E5B3A@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Aneesh V, In message <1317741066-31121-1-git-send-email-aneesh@ti.com> you wrote: > From: a0393566local (none) > > 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 > CC: Wolfgang Denk > Signed-off-by: Aneesh V 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.