From mboxrd@z Thu Jan 1 00:00:00 1970 From: Victor Librado Date: Tue, 03 Jul 2007 11:14:40 +0200 Subject: [U-Boot-Users] u-boot fw_setenv does not write In-Reply-To: <1183405876.9292.23.camel@jaalaptop> References: <46891B8F.3020200@bioingenieria.es> <1183405876.9292.23.camel@jaalaptop> Message-ID: <468A1380.30607@bioingenieria.es> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Yes, cat /dev/mtd1 shows the content and the environment variables. Also linux mtd-utils, flash_eraseall, nandwrite works ... It seems a problem writing nand in fw_setenv # ./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 It erases but cannot write. Indeed rebooting starts with the default environment. Kernel printk: nand_write: Attempt to write not page aligned data What may happens? Any with fw_setenv working compiled for arm architecture and uclibc? Victor Librado Sancho Departamento I+D ------------------------------------------------------------------------ Jeff Angielski escribi?: > On Mon, 2007-07-02 at 17:36 +0200, Victor Librado wrote: > >> u-boot environment tool fw_setenv does not work when writing the >> environment to flash. Working with at91sam9260ek running kernel 2.6.20. >> > > >> 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? >> > > There is nothing special about the u-boot env. The parameters are in > human readable format if you dump the contents [or used to be last time > I looked]. And the fw_xxx tools just access the flash through the > normal MTD layer. > > With this in mind, can you access that block using the standard > utilities? cat? dd? einfo? erase? etc. If not, your MTD > configuration for your board is broken. > > >