2010-01-20 00:05:05     u-boot 能否只占用128K的nor flash空间?

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

2010-01-20 00:05:05     u-boot 能否只占用128K的nor flash空间?

billy zhou (UNITED STATES)

Message: 84783   

 

因空间不够的原因。需要把u-boot从目前占用256K空间,减少到只占用128k Nor Flash空间。

 

试过erase 20020000 200fffff

 

cp.b 1000000 20020000 e0000

 

但reset后,u-boot所有参数被清空了,而且bootm 20020000;echo也无法正常运行

 

 

 

请帮忙解决这个问题,非常感谢!

QuoteReplyEditDelete

 

 

2010-01-20 03:59:00     Re: u-boot 能否只占用128K的nor flash空间?

Barry Song (CHINA)

Message: 84843   

 

Read "int saveenv(void)" in common/env_flash.c, you are easy to know how to modify. Change CONFIG_ENV_ADDR in include/configs/your-board.h to an address which will not be covered by kernel.

 

-barry

QuoteReplyEditDelete

 

 

2010-01-20 21:03:09     Re: u-boot 能否只占用128K的nor flash空间?

billy zhou (UNITED STATES)

Message: 84870   

 

更改

 

#define CFG_ENV_ADDR            0x20020000

#define    CFG_ENV_SECT_SIZE        0x10000

环境变量地址占用0x20020000- 0x2002ffff空间。 可以正常使用

 

 

 

但是更改

 

#define CFG_ENV_ADDR            0x2001c000

#define    CFG_ENV_SECT_SIZE        0x4000

 

UBOOT> saveenv                                                                

Saving Environment to Flash...                                                

Error: start address not on sector boundary

 

 

无法正常使用saveenv

 

 

 

能否不使用NorFlash的空间,或者改用sdram的空间?

QuoteReplyEditDelete

 

 

2010-01-20 22:03:14     Re: u-boot 能否只占用128K的nor flash空间?

Sonic Zhang (CHINA)

Message: 84871   

 

Read your nor flash spec and define CFG_ENV_ADDR to be the boundary of one sector before 128k address. You should shrink the binary size of your uboot to less than 128k - 16k as well.

Attachments

    Outcomes