[U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXIto NAND_SUNXI

Olliver Schinagl oliver+list at schinagl.nl
Fri Sep 18 13:43:38 CEST 2015


Hans de Goede <hdegoede <at> redhat.com> writes:

Hey Hans,
> 
> We eventually want to add full nand support, since it makes no sense
> to build SPL with nand support and u-boot without, or the other way
> around, a single option will suffice.
> 
> Renaming the Kconfig option now makes things easier when we add full
> nand support in the future.
> 
> The "obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o" is moved to an
> "ifdef CONFIG_SPL_BUILD" block in the Makefile.
> 
> Signed-off-by: Hans de Goede <hdegoede <at> redhat.com>
> ---
>  board/sunxi/board.c            |  2 +-
>  drivers/mtd/nand/Kconfig       | 18 +++++++++---------
>  drivers/mtd/nand/Makefile      |  2 +-
>  include/configs/sunxi-common.h |  2 +-
>  4 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index d411e96..9c855f6 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
>  <at>  <at>  -108,7 +108,7  <at>  <at>  int dram_init(void)
>  	return 0;
>  }
> 
> -#if defined(CONFIG_SPL_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
> +#if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)

While I agree this being a good way forward, the latest (and probably this
change included) break nand support entirely and cause link errors when
enabeling sunxi nand.

sunxi-bsp/u-boot-sunxi/drivers/mtd/nand/nand.c:104: undefined reference to
`board_nand_init' (which is from board/sunxi/board.c:144)

I think it's wise (for now) to remove the && defined(CONFIG_SPL_BUILD) and
re-add this guard later.

By removing we atleast can still build u-boot with nand support (thus
opening the option of testing and patches for users) and don't break
previously working systems.



More information about the U-Boot mailing list