[U-Boot] Master branch broken for omap4_panda (SPL_BUILD)

Aneesh V aneesh at ti.com
Tue Oct 4 17:37:14 CEST 2011


Dear Wolfgang,

On Tuesday 04 October 2011 08:21 PM, Wolfgang Denk wrote:
> Dear Aneesh V,
>
> In message<4E8B1508.7020706 at ti.com>  you wrote:
>>
>> Yes, I tried this just now and I am also facing this issue. I can fix
>> the build issue using the following change. But that doesn't solve the
>> problem. We do not have heap in SPL. So, this is a real serious problem
>> for any SPL that has FAT support. I will try to setup a heap in SDRAM
>> as soon as I get some time to work on this.
>
> All file system code has been designed and implemented to run AFTER
> relocation.  Access to a FAT file system is not supposed to happen
> from SPL code.

SPL does call relocate_code() but defeats it by passing the relocation
target same as the SPL_TEXT_BASE.

OMAP has traditionally supported booting from the FAT partition of an
external SD card. The ROM code can pick up the SPL from the FAT
partition and SPL should pick up u-boot from there too. Some of our
boards like OMAP4 Panda have only an SD slot for non-volatile memory
and no flash memory installed. Of course we could use the SD card in
raw mode. But the FAT mode is much more convenient for many users. If
FAT is not supported in SPL, it will be a major regression compared to
x-loader and a show-stopper for us.

I have submitted a patch to fix the problem reported in this thread and
FAT boot is working fine again.

However, I am worried about the increasing footprint of SPL. The main
contributors are MMC and FAT. x-loader, with all it's short-comings,
does the same job with a smaller footprint. NAND has a custom driver
for SPL while MMC and FAT doesn't have. I don't think it's practical
either. However, I wonder if these drivers could be scaled down in size
for SPL with some '#ifdef CONFIG_SPL_BUILD's. I wish if somebody could
look into this.

best regards,
Aneesh


More information about the U-Boot mailing list