[U-Boot-Users] u-boot fw_setenv does not write

Victor Librado vlibrado at bioingenieria.es
Mon Jul 2 17:36:47 CEST 2007


u-boot environment tool fw_setenv does not work when writing the 
environment to flash. Working with at91sam9260ek running kernel 2.6.20.

These are the traces:

# ./fw_setenv bootdelay 4
Warning: Bad CRC, using default environment
Unlocking flash...
Done
Erasing old environment...
Done
Writing environment to /dev/mtd1...
CRC write error on /dev/mtd1: Invalid argument
Error: can't write fw_env to flash

Kernel printk:
nand_write: Attempt to write not page aligned data

In /etc/fw_env.config configuration:
$ more fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundand
# environment sector is assumed present.

# MTD device name       Device offset   Env. size       Flash sector size
/dev/mtd1               0x80000         0x20000         0x20000

Offset and environmet size as defined in myboard.h for u-boot 
compilation. I suppose flash sector size is the erase (block size).

Any help please?

 

Victor Librado Sancho
Departamento I+D
------------------------------------------------------------------------




More information about the U-Boot mailing list