[U-Boot-Users] Error reading environment with fw_printenv

Wolfgang Denk wd at denx.de
Wed Jan 5 14:09:56 CET 2005


In message <6.0.1.1.0.20050105115518.01ed50d8 at 192.168.2.1> you wrote:
> 
> I'm running fw_printenv tools on the target (ARM9 running Linux 2.6.9-rc2).
> MTD partitions work fine (tried to read some bytes with dd).

Can you read the envrionment sector (use a  combination  of  bs+  and
skip= options with "dd" to get the right offset) ?

> When the function flash_io (fw_env.c) tries to read the CRC and the flags,
> the function read reads just one byte instead of 5 as specified
> by len parameter ((line 538)):

You mean the return code of read() is 1? Can you show me  the  strace
output for this?

> Is it correct to assume that the read actually reads the specified number 
> of bytes?

On a MTD device it should, unless it encounteres EOF. Are  yoiu  sure
your configuration is OK?

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"One thing they don't tell you about doing  experimental  physics  is
that sometimes you must work under adverse conditions... like a state
of sheer terror."                                    - W. K. Hartmann




More information about the U-Boot mailing list