[U-Boot] [PATCH] mpc83xx: Add NAND boot support for MPC8315E-RDB boards

Kumar Gala galak at kernel.crashing.org
Thu Nov 19 20:17:36 CET 2009


On Nov 19, 2009, at 8:34 AM, Anton Vorontsov wrote:

> The core support for NAND booting is there already, so this patch
> is pretty straightforward.
>
> There is one trick though: top level Makefile expects nand_spl to
> be in nand_spl/board/$(BOARDDIR), but we can fully reuse the code
> from mpc8313erdb boards, and so to not duplicate the code we just
> symlink nand_spl/board/freescale/mpc8315erdb to mpc8313erdb.
>
> Signed-off-by: Anton Vorontsov <avorontsov at ru.mvista.com>
> ---
> MAKEALL                                   |    1 +
> Makefile                                  |   11 ++++
> board/freescale/mpc8315erdb/config.mk     |    6 ++
> board/freescale/mpc8315erdb/mpc8315erdb.c |   42 +++++++++++++
> board/freescale/mpc8315erdb/sdram.c       |    7 ++
> include/configs/MPC8315ERDB.h             |   90 ++++++++++++++++++++ 
> +++------
> 6 files changed, 138 insertions(+), 19 deletions(-)
>
> diff --git a/MAKEALL b/MAKEALL
> index d63c5c2..821e3e8 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -360,6 +360,7 @@ LIST_83xx="		\
> 	MPC8313ERDB_33	\
> 	MPC8313ERDB_NAND_66	\
> 	MPC8315ERDB	\
> +	MPC8315ERDB_NAND	\
> 	MPC8323ERDB	\
> 	MPC832XEMDS	\
> 	MPC832XEMDS_ATM	\
> diff --git a/Makefile b/Makefile
> index bcb3fe9..77e73f1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2291,8 +2291,19 @@ MPC8313ERDB_NAND_66_config: unconfig
> 		echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk ; \
> 	fi ;
>
> +MPC8315ERDB_NAND_config \
> MPC8315ERDB_config: unconfig
> +	if [ "$(findstring _NAND_,$@)" ] ; then \
> +		$(XECHO) -n "...NAND..." ; \
> +		echo "TEXT_BASE = 0x00100000" > \
> +			$(obj)board/freescale/mpc8315erdb/config.tmp ; \
> +		echo "#define CONFIG_NAND_U_BOOT" >>$(obj)include/config.h ; \
> +		ln -sf mpc8313erdb nand_spl/board/freescale/mpc8315erdb ; \
> +	fi ;
> 	@$(MKCONFIG) -a MPC8315ERDB ppc mpc83xx mpc8315erdb freescale
> +	@if [ "$(findstring _NAND_,$@)" ] ; then \
> +		echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk ; \
> +	fi ;

Use the new -t option to mkconfig.

>
> MPC8323ERDB_config:	unconfig
> 	@$(MKCONFIG) -a MPC8323ERDB ppc mpc83xx mpc8323erdb freescale

- k



More information about the U-Boot mailing list