[U-Boot] [PATCH 5/5] MX5:MX53: add initial support for MX53EVK board

Albert ARIBAUD albert.aribaud at free.fr
Thu Dec 16 11:48:08 CET 2010


Le 16/12/2010 11:17, Jason Liu a écrit :

> diff --git a/arch/arm/cpu/armv7/u-boot.lds b/arch/arm/cpu/armv7/u-boot.lds
> index 5725c30..7b6ab66 100644
> --- a/arch/arm/cpu/armv7/u-boot.lds
> +++ b/arch/arm/cpu/armv7/u-boot.lds
> @@ -34,6 +34,7 @@ SECTIONS
>   	. = ALIGN(4);
>   	.text	:
>   	{
> +		*(.ivt)

NAK. This IVT looks suspiciously like an IPL or header for some 
bootloader to me. It should not be part of u-boot, but should be built 
separately then glued to u-boot.bin like is done for NAND bootings. 
U-boot LDS files for ARM should always start with the reset and 
exception vectors, i.e. start.o.

>   		arch/arm/cpu/armv7/start.o	(.text)
>   		*(.text)
>   	}

> diff --git a/board/freescale/mx53evk/ivt.S b/board/freescale/mx53evk/ivt.S
> new file mode 100755
> index 0000000..f7a176f
> --- /dev/null
> +++ b/board/freescale/mx53evk/ivt.S
> @@ -0,0 +1,289 @@
> +/*
> + * Copyright (C) 2010 Freescale Semiconductor, Inc.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * .word with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include<config.h>
> +
> +.section ".ivt"
> +
> +ivt_header:         .word 0x402000D1    /* Tag=0xD1, Len=0x0020, Ver=0x40 */
> +app_code_jump_v:    .word (0xF8006400 + (plugin_start - CONFIG_SYS_TEXT_BASE))
> +reserv1:            .word 0x0
> +dcd_ptr:            .word 0x0
> +boot_data_ptr:      .word (0xF8006400 + (boot_data - CONFIG_SYS_TEXT_BASE))
> +self_ptr:           .word (0xF8006400 + (ivt_header - CONFIG_SYS_TEXT_BASE))
> +app_code_csf:       .word 0x0
> +reserv2:            .word 0x0
> +boot_data:          .word 0xF8006000
> +image_len:          .word 2*1024
> +plugin:             .word 0x1
> +
> +/* Second IVT to give entry point into the bootloader copied to DDR */
> +ivt2_header:        .word 0x402000D1    /*Tag=0xD1, Len=0x0020, Ver=0x40 */
> +app2_code_jump_v:   .word _start        /*Entry point for the bootloader */
> +reserv3:            .word 0x0
> +dcd2_ptr:           .word 0x0
> +boot_data2_ptr:     .word boot_data2
> +self_ptr2:          .word ivt2_header
> +app_code_csf2:      .word 0x0
> +reserv4:            .word 0x0
> +boot_data2:         .word (CONFIG_SYS_TEXT_BASE - 0x400)
> +image_len2:         .word (_end - CONFIG_SYS_TEXT_BASE)
> +plugin2:            .word 0x0
> +
> +
> +/* Here starts the plugin code */
> +plugin_start:
> +	/* Save the return address and the function arguments */

The entry point of u-boot should be the reset vector. Obviously this is 
not a reset vector, and looks more like a hook that some ROM code 
expects to call as a subroutine. In any case, it should not be the entry 
code of u-boot.

Please consider refactoring this into two different binaries as NAND 
boot does.

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list