All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] u-boot fw_setenv does not write
@ 2007-07-02 15:36 Victor Librado
  2007-07-02 19:51 ` Jeff Angielski
  0 siblings, 1 reply; 3+ messages in thread
From: Victor Librado @ 2007-07-02 15:36 UTC (permalink / raw)
  To: u-boot


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
------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] u-boot fw_setenv does not write
  2007-07-02 15:36 [U-Boot-Users] u-boot fw_setenv does not write Victor Librado
@ 2007-07-02 19:51 ` Jeff Angielski
  2007-07-03  9:14   ` Victor Librado
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Angielski @ 2007-07-02 19:51 UTC (permalink / raw)
  To: u-boot

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.
<snip>
> 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.


-- 
Jeff Angielski
The PTR Group
www.theptrgroup.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] u-boot fw_setenv does not write
  2007-07-02 19:51 ` Jeff Angielski
@ 2007-07-03  9:14   ` Victor Librado
  0 siblings, 0 replies; 3+ messages in thread
From: Victor Librado @ 2007-07-03  9:14 UTC (permalink / raw)
  To: u-boot


 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.
>>     
> <snip>
>   
>> 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.
>
>
>   

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-03  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-02 15:36 [U-Boot-Users] u-boot fw_setenv does not write Victor Librado
2007-07-02 19:51 ` Jeff Angielski
2007-07-03  9:14   ` Victor Librado

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.