[U-Boot] [PATCH v2 06/22] Add generic spl infrastructure

Aneesh V aneesh at ti.com
Tue May 17 08:54:34 CEST 2011


Hi Scott,

On Tuesday 17 May 2011 12:02 AM, Scott Wood wrote:
> On Sun, 15 May 2011 20:51:24 +0530
> Aneesh V<aneesh at ti.com>  wrote:
>
>> diff --git a/Makefile b/Makefile
>> index 384a59e..d3f4bef 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -289,6 +289,22 @@ LDPPFLAGS += \
>>   	$(shell $(LD) --version | \
>>   	  sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
>>
>> +ifeq ($(CONFIG_NAND_U_BOOT),y)
>> +NAND_SPL = nand_spl
>> +U_BOOT_NAND = $(obj)u-boot-nand.bin
>> +endif
>> +
>> +ifeq ($(CONFIG_SPL),y)
>> +.PHONEY : SPL
>> +ALL += SPL
>> +endif
>> +
>> +ifeq ($(CONFIG_ONENAND_U_BOOT),y)
>> +ONENAND_IPL = onenand_ipl
>> +U_BOOT_ONENAND = $(obj)u-boot-onenand.bin
>> +ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
>> +endif
>> +
>>   __OBJS := $(subst $(obj),,$(OBJS))
>>   __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
>>
>> @@ -402,8 +418,13 @@ $(obj)u-boot.lds: $(LDSCRIPT)
>>   		$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P -<$^>$@
>>
>>   nand_spl:	$(TIMESTAMP_FILE) $(VERSION_FILE) depend
>> +
>> +$(NAND_SPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) depend
>
> You are reverting part of e935a374dbe5c745fdde05b2b07ced0bbe70887f.  Merge
> accident?
>

Oops! That indeed seems like a merge accident. I will correct it in the
next version.

>> @@ -1141,12 +1163,14 @@ clobber:	clean
>>   	@rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL)
>>   	@rm -f $(obj)u-boot.kwb
>>   	@rm -f $(obj)u-boot.imx
>> +	@rm -f $(obj)MLO
>
> What is MLO?

MLO is the name of SPL created for OMAP. ROM code expects a file with
this name as the first image when it boots from FAT.

>
>> diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
>> index 2a84d27..2ce020e 100644
>> --- a/arch/arm/include/asm/global_data.h
>> +++ b/arch/arm/include/asm/global_data.h
>> @@ -89,6 +89,11 @@ typedef	struct	global_data {
>>   #define GD_FLG_DISABLE_CONSOLE	0x00040	/* Disable console (in&  out)		*/
>>   #define GD_FLG_ENV_READY	0x00080	/* Environment imported into hash table	*/
>>
>> +#ifdef CONFIG_PRELOADER
>> +/* SPL works from internal RAM. gd pointer can be in .data section */
>> +#define DECLARE_GLOBAL_DATA_PTR     extern gd_t *gd
>> +#else
>>   #define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("r8")
>> +#endif
>
> Is this appropriate for all ARM boards (e.g. those currently using
> nand_spl)?

None of the SPL's other than this one seems to be using global data
today. If anybody wants to use it this seems to be the logical option
for me because by definition SPL runs from some kind of RAM so global
data can be placed in the .data section of SPL.

best regards,
Aneesh


More information about the U-Boot mailing list