uboot移植:Error: start and/or end address not on sector boundary
我在移植uboot从nandfalsh启动时,saveenv时候出现这个,请问该如何修改。my2440.h文件中nandflash设置部分:#if defined(CONFIG_CMD_NAND)
#define CONFIG_SYS_NAND_BASE 0x4e000000
#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_MTD_NAND_VERIFY_WRITE 1
#define NAND_SAMSUNG_LP_OPTIONS 1 //大页要添加这个
#define CONFIG_NAND_S3C2440 1
#define CONFIG_S3C2440_NAND_BOOT 1
#undef CONFIG_ENV_IS_IN_FLASH
#define CONFIG_ENV_IS_IN_NAND 1 /* 环境变量的保存位置 */
#define NAND_CTL_BASE 0x4E000000
#define oNFCONF 0x00
#define oNFCONT 0x04
#define oNFADDR 0x0c
#define oNFDATA 0x10
#define oNFCMD 0x08
#define oNFSTAT 0x20
#define oNFECC 0x2c
#define CONFIG_ENV_OFFSET 0x40000
#define CONFIG_ENV_SIZE 0x20000
#endif 我设置了#define CONFIG_ENV_IS_IN_NAND 1
可是启动时还是
Saving Environment to Flash...
Error: start and/or end address not on sector boundary
这是为什么呀 我在common/cmd_flash.c和common/cmd_nvedit.c里边添加代码;
#if defined(CONFIG_ENV_IS_IN_NAND)
printf("Have defined CONFIG_ENV_IS_IN_NAND \n");
#else
printf("Have not defined CONFIG_ENV_IS_IN_NAND");
#endif
测试CONFIG_ENV_IS_IN_NAND都是被宏定义过了
测试结果是
Have defined CONFIG_ENV_IS_IN_NAND
Saving Environment to Flash...
Have defined CONFIG_ENV_IS_IN_NAND
Error: start and/or end address not on sector boundary 没人遇见过吗?还是我自己解决了
把common/libcommon.a删了,重新编译,好了
求高人解释libcommon.a是做什么用的? 楼上的把你的操作方式和错误信息截图发下 chenghaodx 发表于 2011-4-24 17:13 static/image/common/back.gif
我设置了#define CONFIG_ENV_IS_IN_NAND 1
可是启动时还是
Saving Environment to Flash...
错误信息已经告诉你了,你的环境变量的起始位置没有Page对齐,好好看看你的nandflash的datasheet,看一页大小是多少,然后再设置,这个值不是随便给的~
页:
[1]