[U-Boot] [PATCH v6] AT91SAM9*: Change kernel address in dataflash to match u-boot's size

Andreas Bießmann andreas.devel at googlemail.com
Mon Jul 2 14:01:00 CEST 2012


Dear Alexandre Belloni,

On 02.07.2012 13:37, Alexandre Belloni wrote:
> On at91sam platforms, u-boot grew larger than the allocated size in
> dataflash, the layout was:
> bootstrap  0x00000000
> ubootenv   0x00004200
> uboot      0x00008400
> kernel     0x00042000
> 
> u-boot with the defconfig doesn't seem to fit in 0x42000 - 0x8400 =
> 0x39C00 bytes anymore.
> 
> Now, the layout is:
> bootstrap  0x00000000
> ubootenv   0x00004200
> uboot      0x00008400
> kernel     0x00084000
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni at piout.net>
> ---
> Changes for v2:
> - changed the layout as per Marek's recommendation
> Changes for v3:
> - prefixed the patch title with AT91SAM9*:
> Changes for v4:
> - changed the layout again as per Ulf Samuelsson's request:
> http://lists.denx.de/pipermail/u-boot/2012-February/118988.html
> Changes for v5:
> - also update partition list
> Changes for v6:
> - rebase on latest u-boot-atmel
> 
>  board/atmel/at91sam9260ek/partition.c |    2 +-
>  board/atmel/at91sam9261ek/partition.c |    2 +-
>  board/atmel/at91sam9263ek/partition.c |    2 +-
>  board/atmel/at91sam9rlek/partition.c  |    2 +-
>  include/configs/at91sam9260ek.h       |    5 +++--
>  include/configs/at91sam9261ek.h       |    5 +++--
>  include/configs/at91sam9263ek.h       |    2 +-
>  include/configs/at91sam9rlek.h        |    3 ++-
>  8 files changed, 13 insertions(+), 10 deletions(-)
> 
> diff --git a/board/atmel/at91sam9260ek/partition.c b/board/atmel/at91sam9260ek/partition.c
> index 2629c67..842bb89 100644
> --- a/board/atmel/at91sam9260ek/partition.c
> +++ b/board/atmel/at91sam9260ek/partition.c
> @@ -35,6 +35,6 @@ dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
>  	{0x00000000, 0x000041FF, FLAG_PROTECT_SET,   0, "Bootstrap"},
>  	{0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"},
>  	{0x00008400, 0x00041FFF, FLAG_PROTECT_SET,   0, "U-Boot"},
> -	{0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0,	"Kernel"},
> +	{0x00084000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0,	"Kernel"},

really sorry for that, I should have seen it before. Shouldn't we also
make the U-Boot partition greater when we move the start of kernel
partition?
Can you please send another version, rest is fine (checkpatch, apply
cleanly, no build errors).

>  	{0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0,	"FS"},
>  };

<snip>

> diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
> index 07b1968..ef25fa5 100644
> --- a/include/configs/at91sam9260ek.h
> +++ b/include/configs/at91sam9260ek.h
> @@ -187,7 +187,7 @@
>  #define CONFIG_ENV_OFFSET		0x4200
>  #define CONFIG_ENV_ADDR		(CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET)
>  #define CONFIG_ENV_SIZE		0x4200
> -#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
> +#define CONFIG_BOOTCOMMAND	"cp.b 0xC0084000 0x22000000 0x210000; bootm"

also sorry, but size is wrong here! We reduced the partition to
0x1CE000, it is about 1.8 MiB now and not 2 MiB as before.

Best regards

Andreas Bießmann


More information about the U-Boot mailing list