[U-Boot] [PATCH v2] Nand boot: Add nand boot support for MPC8569mds board

Scott Wood scottwood at freescale.com
Wed Jan 27 22:13:05 CET 2010


On Mon, Jan 18, 2010 at 07:03:28PM +0800, Liu Yu wrote:
> This patch add nand boot support for MPC8569mds board.
> 
> Signed-off-by: Liu Yu <yu.liu at freescale.com>
> ---
> v2:
> change subject and commit message.
> 
>  MAKEALL                                         |    1 +
>  Makefile                                        |    3 +-
>  board/freescale/mpc8569mds/config.mk            |    9 ++
>  board/freescale/mpc8569mds/tlb.c                |   11 ++
>  include/configs/MPC8569MDS.h                    |   64 +++++++++++-
>  nand_spl/board/freescale/mpc8569mds/Makefile    |  133 +++++++++++++++++++++++
>  nand_spl/board/freescale/mpc8569mds/nand_boot.c |   75 +++++++++++++
>  7 files changed, 292 insertions(+), 4 deletions(-)
>  create mode 100644 nand_spl/board/freescale/mpc8569mds/Makefile
>  create mode 100644 nand_spl/board/freescale/mpc8569mds/nand_boot.c
> 
> diff --git a/MAKEALL b/MAKEALL
> index a6d0f20..2b303f8 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -403,6 +403,7 @@ LIST_85xx="		\
>  	MPC8560ADS	\
>  	MPC8568MDS	\
>  	MPC8569MDS	\
> +	MPC8569MDS_NAND \
>  	MPC8572DS	\
>  	MPC8572DS_36BIT	\
>  	P2020DS		\
> diff --git a/Makefile b/Makefile
> index 1abe64a..3e3d11b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2477,8 +2477,9 @@ MPC8555CDS_config:	unconfig
>  MPC8568MDS_config:	unconfig
>  	@$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8568mds freescale
>  
> +MPC8569MDS_NAND_config \
>  MPC8569MDS_config:	unconfig
> -	@$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8569mds freescale
> +	@$(MKCONFIG) -t $(@:_config=) MPC8569MDS ppc mpc85xx mpc8569mds freescale

An MPC8569MDS_ATM target has been merged upstream.  I'll merge this as is,
but I recommend adding (and testing) a config that supports both NAND and
ATM, unless that is an impossible config for whatever reason.

You may want to consider doing something like this:
# Options: NAND ATM
MPC8569MDS%config: unconfig
	@$(MKCONFIG) -t $(@:_config=) MPC8569MDS ppc mpc85xx mpc8569mds freescale

BTW, I get this when building MPC8569 (either base or ATM, but not NAND, and
not new with this patch) with gcc 4.2.1 and binutils 2.18 (but not gcc 4.0.2
and binutils 2.16.1):

powerpc-linux-ld: u-boot: section `.text' can't be allocated in segment 0
powerpc-linux-ld: final link failed: Bad value

If I compile with the bad toolchain but link with the good one, it works, so
it seems to be a binutils/linker script issue, not a code size issue.

It seems to be related to not overriding RESET_VECTOR_ADDRESS, and thus
having the BSS at zero (or rather, 0x10).  mpc8544ds mpc8548cds also don't
do this, and I see the same problem there, but I don't see it on e.g.
mpc8572ds or p2020ds which do.

-Scott


More information about the U-Boot mailing list