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

Scott Wood scottwood at freescale.com
Mon May 16 20:32:31 CEST 2011


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?

> @@ -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?

> 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)?

-Scott



More information about the U-Boot mailing list