* [U-Boot-Users] help:error occured when 'saveenv'
@ 2007-10-23 12:19 xbc_5419
2007-10-24 2:01 ` Sughosh Ganu
2007-11-01 6:08 ` Verma
0 siblings, 2 replies; 3+ messages in thread
From: xbc_5419 @ 2007-10-23 12:19 UTC (permalink / raw)
To: u-boot
hi,
i have been trying to port the u-boot 1.2.0 to my board which based on the at91rm9200.
when running the 'saveenv' ,it promted out
"Saving Environment to Flash...
Error: start address not on sector boundary"
my flash is MT-28F128J3, which has 128 128KB(x16bit) erase blocks,in the include/configs/myboard.h i defined the
#define PHYS_FLASH_1 0x10000000
#define PHYS_FLASH_SIZE 0x1000000 /* 16 megs main flash */
#define CFG_FLASH_BASE PHYS_FLASH_1
#define CFG_MAX_FLASH_BANKS 1
#define CFG_MAX_FLASH_SECT 128
#define CFG_ENV_IS_IN_FLASH 1
#ifdef CONFIG_SKIP_LOWLEVEL_INIT
#define CFG_ENV_ADDR (PHYS_FLASH_1 + 0x60000) /* after u-boot.bin */
#define CFG_ENV_SIZE 0x10000 /* sectors are 64K here */
#else
#define CFG_ENV_ADDR (PHYS_FLASH_1 + 0xe000) /* between boot.bin and u-boot.bin.gz */
#define CFG_ENV_SIZE 0x2000 /* 0x8000 */
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
what can i do to fix it ...??
Any help will be appreciated....thanks you...
Best Regards
Jack Xu
2007-10-23
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20071023/34cedeea/attachment.htm
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] help:error occured when 'saveenv'
2007-10-23 12:19 [U-Boot-Users] help:error occured when 'saveenv' xbc_5419
@ 2007-10-24 2:01 ` Sughosh Ganu
2007-11-01 6:08 ` Verma
1 sibling, 0 replies; 3+ messages in thread
From: Sughosh Ganu @ 2007-10-24 2:01 UTC (permalink / raw)
To: u-boot
Hi,
> when running the 'saveenv' ,it promted out
>
> "Saving Environment to Flash...
> Error: start address not on sector boundary"
>
> #define PHYS_FLASH_1 0x10000000
> #define PHYS_FLASH_SIZE 0x1000000 /* 16 megs main flash */
> #define CFG_FLASH_BASE PHYS_FLASH_1
> #define CFG_MAX_FLASH_BANKS 1
> #define CFG_MAX_FLASH_SECT 128
>
> #define CFG_ENV_IS_IN_FLASH 1
> #ifdef CONFIG_SKIP_LOWLEVEL_INIT
> #define CFG_ENV_ADDR (PHYS_FLASH_1 + 0x60000) /* after u-boot.bin */
This seems ok, as the above address is on the sector boundary
(multiple of 128k).
> #define CFG_ENV_SIZE 0x10000 /* sectors are 64K here */
> #else
> #define CFG_ENV_ADDR (PHYS_FLASH_1 + 0xe000) /* between
> #boot.bin and u-boot.bin.gz */
This seems to be the problem area. Change the offset 0xe000
so that the address is a multiple of 128k.
--
sughosh
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] help:error occured when 'saveenv'
2007-10-23 12:19 [U-Boot-Users] help:error occured when 'saveenv' xbc_5419
2007-10-24 2:01 ` Sughosh Ganu
@ 2007-11-01 6:08 ` Verma
1 sibling, 0 replies; 3+ messages in thread
From: Verma @ 2007-11-01 6:08 UTC (permalink / raw)
To: u-boot
Hi Jack Xu,
When we want to write any data on to an address location of the flash
device,this address location should match with
any sector starting address.
In your case,the flash address where you want the environment variables to
be copied, does not seem to
be the beginning address of any flash sector .
Verifying the address value where you want to write with the sector start
addresses , might solve your problem.
Regards,
Verma.
xbc_5419 wrote:
>
> hi,
>
> i have been trying to port the u-boot 1.2.0 to my board which based on the
> at91rm9200.
>
> when running the 'saveenv' ,it promted out
>
> "Saving Environment to Flash...
> Error: start address not on sector boundary"
>
> my flash is MT-28F128J3, which has 128 128KB(x16bit) erase blocks,in the
> include/configs/myboard.h i defined the
> #define PHYS_FLASH_1 0x10000000
> #define PHYS_FLASH_SIZE 0x1000000 /* 16 megs main flash */
> #define CFG_FLASH_BASE PHYS_FLASH_1
> #define CFG_MAX_FLASH_BANKS 1
> #define CFG_MAX_FLASH_SECT 128
>
> #define CFG_ENV_IS_IN_FLASH 1
> #ifdef CONFIG_SKIP_LOWLEVEL_INIT
> #define CFG_ENV_ADDR (PHYS_FLASH_1 + 0x60000) /* after
> u-boot.bin */
> #define CFG_ENV_SIZE 0x10000 /* sectors are 64K here */
> #else
> #define CFG_ENV_ADDR (PHYS_FLASH_1 + 0xe000) /* between boot.bin
> and u-boot.bin.gz */
> #define CFG_ENV_SIZE 0x2000 /* 0x8000 */
> #endif /* CONFIG_SKIP_LOWLEVEL_INIT */
>
> what can i do to fix it ...??
> Any help will be appreciated....thanks you...
>
>
> Best Regards
>
> Jack Xu
> 2007-10-23
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
>
--
View this message in context: http://www.nabble.com/help%3Aerror-occured-when-%27saveenv%27-tf4677078.html#a13523939
Sent from the Uboot - Users mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-01 6:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 12:19 [U-Boot-Users] help:error occured when 'saveenv' xbc_5419
2007-10-24 2:01 ` Sughosh Ganu
2007-11-01 6:08 ` Verma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox