diff mbox

[U-Boot,v2,4/5] Fix env address for Sheevaplug board

Message ID 505D6631.70205@doukki.net
State Changes Requested
Delegated to: Prafulla Wadaskar
Headers show

Commit Message

DrEagle Sept. 22, 2012, 7:18 a.m. UTC
Fix env address for Sheevaplug board
Move env address and offset from 0x60000 to 0x80000

Signed-off-by: drEagle <dreagle@doukki.net>
---
 include/configs/sheevaplug.h |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Prafulla Wadaskar Sept. 24, 2012, 8:46 a.m. UTC | #1
> -----Original Message-----
> From: u-boot-bounces@lists.denx.de [mailto:u-boot-
> bounces@lists.denx.de] On Behalf Of DrEagle
> Sent: 22 September 2012 12:48
> To: DrEagle
> Cc: Lior Amsalem; u-boot@lists.denx.de; uboot@doukki.net
> Subject: [U-Boot] [PATCH v2 4/5] Fix env address for Sheevaplug board
> 
> 
> Fix env address for Sheevaplug board
> Move env address and offset from 0x60000 to 0x80000
> 
> Signed-off-by: drEagle <dreagle@doukki.net>
> ---
>  include/configs/sheevaplug.h |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/include/configs/sheevaplug.h
> b/include/configs/sheevaplug.h
> index 7d710bf..a10e825 100644
> --- a/include/configs/sheevaplug.h
> +++ b/include/configs/sheevaplug.h
> @@ -71,9 +71,8 @@
>   * it has to be rounded to sector size
>   */
>  #define CONFIG_ENV_SIZE			0x20000	/* 128k */
> -#define CONFIG_ENV_ADDR			0x60000
> -#define CONFIG_ENV_OFFSET		0x60000	/* env starts here */
> -
> +#define CONFIG_ENV_ADDR			0x80000
> +#define CONFIG_ENV_OFFSET		0x80000	/* env starts here */

Why do you need this shift?

Regards...
Prafulla . ..
DrEagle Sept. 26, 2012, 5:35 a.m. UTC | #2
Le 24/09/2012 10:46, Prafulla Wadaskar a écrit :
> 
> 
>> -----Original Message-----
>> From: u-boot-bounces@lists.denx.de [mailto:u-boot-
>> bounces@lists.denx.de] On Behalf Of DrEagle
>> Sent: 22 September 2012 12:48
>> To: DrEagle
>> Cc: Lior Amsalem; u-boot@lists.denx.de; uboot@doukki.net
>> Subject: [U-Boot] [PATCH v2 4/5] Fix env address for Sheevaplug board
>>
>>
>> Fix env address for Sheevaplug board
>> Move env address and offset from 0x60000 to 0x80000
>>
>> Signed-off-by: drEagle <dreagle@doukki.net>
>> ---
>>  include/configs/sheevaplug.h |    5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/configs/sheevaplug.h
>> b/include/configs/sheevaplug.h
>> index 7d710bf..a10e825 100644
>> --- a/include/configs/sheevaplug.h
>> +++ b/include/configs/sheevaplug.h
>> @@ -71,9 +71,8 @@
>>   * it has to be rounded to sector size
>>   */
>>  #define CONFIG_ENV_SIZE			0x20000	/* 128k */
>> -#define CONFIG_ENV_ADDR			0x60000
>> -#define CONFIG_ENV_OFFSET		0x60000	/* env starts here */
>> -
>> +#define CONFIG_ENV_ADDR			0x80000
>> +#define CONFIG_ENV_OFFSET		0x80000	/* env starts here */
> 
> Why do you need this shift?

Because the size of the new u-boot binary overlap the actual env offset.
If you reset the env or save env with a new u-boot, the code is corrupt, and noo boot anymore.

This shift fix this.

> Regards...
> Prafulla . .. 
>
Prafulla Wadaskar Sept. 26, 2012, 7:33 a.m. UTC | #3
> -----Original Message-----
> From: DrEagle [mailto:dreagle@doukki.net]
> Sent: 26 September 2012 11:06
> To: Prafulla Wadaskar
> Cc: DrEagle; u-boot@lists.denx.de; uboot@doukki.net
> Subject: Re: [U-Boot] [PATCH v2 4/5] Fix env address for Sheevaplug
> board
> 
> Le 24/09/2012 10:46, Prafulla Wadaskar a écrit :
> >
> >
> >> -----Original Message-----
> >> From: u-boot-bounces@lists.denx.de [mailto:u-boot-
> >> bounces@lists.denx.de] On Behalf Of DrEagle
> >> Sent: 22 September 2012 12:48
> >> To: DrEagle
> >> Cc: Lior Amsalem; u-boot@lists.denx.de; uboot@doukki.net
> >> Subject: [U-Boot] [PATCH v2 4/5] Fix env address for Sheevaplug
> board
> >>
> >>
> >> Fix env address for Sheevaplug board
> >> Move env address and offset from 0x60000 to 0x80000
> >>
> >> Signed-off-by: drEagle <dreagle@doukki.net>
> >> ---
> >>  include/configs/sheevaplug.h |    5 ++---
> >>  1 file changed, 2 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/include/configs/sheevaplug.h
> >> b/include/configs/sheevaplug.h
> >> index 7d710bf..a10e825 100644
> >> --- a/include/configs/sheevaplug.h
> >> +++ b/include/configs/sheevaplug.h
> >> @@ -71,9 +71,8 @@
> >>   * it has to be rounded to sector size
> >>   */
> >>  #define CONFIG_ENV_SIZE			0x20000	/* 128k */
> >> -#define CONFIG_ENV_ADDR			0x60000
> >> -#define CONFIG_ENV_OFFSET		0x60000	/* env starts here */
> >> -
> >> +#define CONFIG_ENV_ADDR			0x80000
> >> +#define CONFIG_ENV_OFFSET		0x80000	/* env starts here */
> >
> > Why do you need this shift?
> 
> Because the size of the new u-boot binary overlap the actual env
> offset.
> If you reset the env or save env with a new u-boot, the code is
> corrupt, and noo boot anymore.
> 
> This shift fix this.

Then this will be valid for all the boards on which MMC support is being enabled, right?

In that case for sheevaplug, make this change in one patch in your next version (i.e. relocating ENV offset, and enabling MMC support)

Regards...
Prafulla . . .
diff mbox

Patch

diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 7d710bf..a10e825 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -71,9 +71,8 @@ 
  * it has to be rounded to sector size
  */
 #define CONFIG_ENV_SIZE			0x20000	/* 128k */
-#define CONFIG_ENV_ADDR			0x60000
-#define CONFIG_ENV_OFFSET		0x60000	/* env starts here */
-
+#define CONFIG_ENV_ADDR			0x80000
+#define CONFIG_ENV_OFFSET		0x80000	/* env starts here */
 /*
  * Default environment variables
  */