[U-Boot] [fw_printenv should open device as O_SYNC]

Guennadi Liakhovetski lg at denx.de
Wed Sep 10 22:34:55 CEST 2008


On Wed, 10 Sep 2008, Mari Ivan-AIM018 wrote:

> Hi all,
>  
> We have hit the following issue in a board with 2 flash banks.
>  
> First I set some env variable in U-boot, using fw_setenv, then
> immediately I switch the banks. But as the buffers have not yet been
> flushed to the mtd driver, the bank switching leaves the flash in
> corrupted state.

Isn't this a bug in the respective MTD driver then? You should be able to 
open as many file-descriptors to different mtd devices as you like and be 
able to operate on them simultaneously. Or doesn't it work like that?

> I ve modified the fw_env.c file to open the mtd O_SYNC and it works
> fine.
>  
> If it is OK I can submit a patch for this.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


More information about the U-Boot mailing list