* [U-Boot-Users] problems with CRC in fw_printenv and fw_setenv utility and use
@ 2008-01-12 0:09 u-boot user
2008-01-14 8:00 ` Markus Klotzbücher
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: u-boot user @ 2008-01-12 0:09 UTC (permalink / raw)
To: u-boot
Hello all,
I have built the binary fw_printenv by using mtd-user.h from mtd-utils on
the internet as it fw_printenv won't compile it without using that file. So
I have used mtd-user.h and mtd-abi.h. The contents of my configuration file
are
# MTD device name Device offset Env. size Flash sector size
/dev/mtd1 0x0000 0x4000 0x4000
When I run fw_printenv it complained with error Warning : Bad CRC using
default environment in env_init function in fw_env.c source code. To gain a
better understanding I print the value crc1 calculated using
crc32(0,environment.data,ENV_SIZE). The value it prints is CRC
computed:FE641197
If I print the environment.crc value it is D0CA8A0E. As the checksum values
are different crc1_ok is not set and I get the error. Any clue as to why
these values would be different?
When I use the fw_setenv utility to set an environment variable it gives the
following errors
Writing CRC value to flash: D0C78567
Unlocking flash...
Other dev values are: 0
Current dev value: 0
Done
Erasing old environment...
MTD erase error on /dev/mtd1: Invalid argument
Error: can't write fw_env to flash
I want to be able to set bootvars and print bootvars from user space Linux
code. Linux has support for mtd-utils we tested the mtd-utils interface.
I look forward to your replies. I appreciate your help.
Thanks and Regards
--
View this message in context: http://www.nabble.com/problems-with-CRC-in-fw_printenv-and-fw_setenv-utility-and-use-tp14767876p14767876.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] problems with CRC in fw_printenv and fw_setenv utility and use
2008-01-12 0:09 [U-Boot-Users] problems with CRC in fw_printenv and fw_setenv utility and use u-boot user
@ 2008-01-14 8:00 ` Markus Klotzbücher
2008-02-15 16:32 ` techie_vasu
2008-02-15 16:33 ` techie_vasu
2 siblings, 0 replies; 5+ messages in thread
From: Markus Klotzbücher @ 2008-01-14 8:00 UTC (permalink / raw)
To: u-boot
u-boot user <aparna_badve@yahoo.com> writes:
> I have built the binary fw_printenv by using mtd-user.h from mtd-utils on
> the internet as it fw_printenv won't compile it without using that
> file. So
So you're obviously not using the newest version of U-Boot, what you
should. Make sure to read the updated README in tools/env/.
> I have used mtd-user.h and mtd-abi.h. The contents of my configuration file
> are
> # MTD device name Device offset Env. size Flash sector size
> /dev/mtd1 0x0000 0x4000 0x4000
Is this in /etc/ ?
> When I run fw_printenv it complained with error Warning : Bad CRC using
> default environment in env_init function in fw_env.c source code. To gain a
> better understanding I print the value crc1 calculated using
> crc32(0,environment.data,ENV_SIZE). The value it prints is CRC
> computed:FE641197
> If I print the environment.crc value it is D0CA8A0E. As the checksum values
> are different crc1_ok is not set and I get the error. Any clue as to why
> these values would be different?
Probably some mismatch between the information in your config file and
the real environment. Where is you're environment located in flash? Is
your mtd partitioning right? What does
$ cat /proc/mtd
show?
> When I use the fw_setenv utility to set an environment variable it gives the
> following errors
> Writing CRC value to flash: D0C78567
> Unlocking flash...
> Other dev values are: 0
> Current dev value: 0
> Done
> Erasing old environment...
> MTD erase error on /dev/mtd1: Invalid argument
> Error: can't write fw_env to flash
Weird. I would guess your MTD partitioning is wrong.
Best regards
Markus Klotzbuecher
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] problems with CRC in fw_printenv and fw_setenv utility and use
2008-01-12 0:09 [U-Boot-Users] problems with CRC in fw_printenv and fw_setenv utility and use u-boot user
2008-01-14 8:00 ` Markus Klotzbücher
@ 2008-02-15 16:32 ` techie_vasu
2008-02-15 17:19 ` Markus Klotzbücher
2008-02-15 16:33 ` techie_vasu
2 siblings, 1 reply; 5+ messages in thread
From: techie_vasu @ 2008-02-15 16:32 UTC (permalink / raw)
To: u-boot
Hello,
Can you please tell me how to build the fw_setenv and fw_printenv using
the mtd-user.h file? I am new to Linux. Please help. I don't see mtd/ in
proc/ directory.
Thanks
u-boot user wrote:
>
> Hello all,
>
> I have built the binary fw_printenv by using mtd-user.h from mtd-utils on
> the internet as it fw_printenv won't compile it without using that file.
> So I have used mtd-user.h and mtd-abi.h. The contents of my configuration
> file are
> # MTD device name Device offset Env. size Flash sector size
> /dev/mtd1 0x0000 0x4000 0x4000
>
> When I run fw_printenv it complained with error Warning : Bad CRC using
> default environment in env_init function in fw_env.c source code. To gain
> a better understanding I print the value crc1 calculated using
> crc32(0,environment.data,ENV_SIZE). The value it prints is CRC
> computed:FE641197
> If I print the environment.crc value it is D0CA8A0E. As the checksum
> values are different crc1_ok is not set and I get the error. Any clue as
> to why these values would be different?
>
> When I use the fw_setenv utility to set an environment variable it gives
> the following errors
> Writing CRC value to flash: D0C78567
> Unlocking flash...
> Other dev values are: 0
> Current dev value: 0
> Done
> Erasing old environment...
> MTD erase error on /dev/mtd1: Invalid argument
> Error: can't write fw_env to flash
>
> I want to be able to set bootvars and print bootvars from user space Linux
> code. Linux has support for mtd-utils we tested the mtd-utils interface.
>
> I look forward to your replies. I appreciate your help.
>
> Thanks and Regards
>
--
View this message in context: http://www.nabble.com/problems-with-CRC-in-fw_printenv-and-fw_setenv-utility-and-use-tp14767876p15502924.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] problems with CRC in fw_printenv and fw_setenv utility and use
2008-01-12 0:09 [U-Boot-Users] problems with CRC in fw_printenv and fw_setenv utility and use u-boot user
2008-01-14 8:00 ` Markus Klotzbücher
2008-02-15 16:32 ` techie_vasu
@ 2008-02-15 16:33 ` techie_vasu
2 siblings, 0 replies; 5+ messages in thread
From: techie_vasu @ 2008-02-15 16:33 UTC (permalink / raw)
To: u-boot
Hello,
Can you please tell me how to build the fw_setenv and fw_printenv using
the mtd-user.h file? I am new to Linux. Please help. I don't see mtd/ in
proc/ directory.
Thanks
u-boot user wrote:
>
> Hello all,
>
> I have built the binary fw_printenv by using mtd-user.h from mtd-utils on
> the internet as it fw_printenv won't compile it without using that file.
> So I have used mtd-user.h and mtd-abi.h. The contents of my configuration
> file are
> # MTD device name Device offset Env. size Flash sector size
> /dev/mtd1 0x0000 0x4000 0x4000
>
> When I run fw_printenv it complained with error Warning : Bad CRC using
> default environment in env_init function in fw_env.c source code. To gain
> a better understanding I print the value crc1 calculated using
> crc32(0,environment.data,ENV_SIZE). The value it prints is CRC
> computed:FE641197
> If I print the environment.crc value it is D0CA8A0E. As the checksum
> values are different crc1_ok is not set and I get the error. Any clue as
> to why these values would be different?
>
> When I use the fw_setenv utility to set an environment variable it gives
> the following errors
> Writing CRC value to flash: D0C78567
> Unlocking flash...
> Other dev values are: 0
> Current dev value: 0
> Done
> Erasing old environment...
> MTD erase error on /dev/mtd1: Invalid argument
> Error: can't write fw_env to flash
>
> I want to be able to set bootvars and print bootvars from user space Linux
> code. Linux has support for mtd-utils we tested the mtd-utils interface.
>
> I look forward to your replies. I appreciate your help.
>
> Thanks and Regards
>
--
View this message in context: http://www.nabble.com/problems-with-CRC-in-fw_printenv-and-fw_setenv-utility-and-use-tp14767876p15502930.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot-Users] problems with CRC in fw_printenv and fw_setenv utility and use
2008-02-15 16:32 ` techie_vasu
@ 2008-02-15 17:19 ` Markus Klotzbücher
0 siblings, 0 replies; 5+ messages in thread
From: Markus Klotzbücher @ 2008-02-15 17:19 UTC (permalink / raw)
To: u-boot
techie_vasu <deepavas@gmail.com> writes:
> Can you please tell me how to build the fw_setenv and fw_printenv
> using
Please make sure to read tools/env/README from *top of tree* U-Boot
sources.
> the mtd-user.h file? I am new to Linux. Please help. I don't see mtd/ in
> proc/ directory.
What kernel version? Looks like you have not compiled in mtd support.
Best regards
Markus Klotzbuecher
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-02-15 17:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-12 0:09 [U-Boot-Users] problems with CRC in fw_printenv and fw_setenv utility and use u-boot user
2008-01-14 8:00 ` Markus Klotzbücher
2008-02-15 16:32 ` techie_vasu
2008-02-15 17:19 ` Markus Klotzbücher
2008-02-15 16:33 ` techie_vasu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox