mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* writing environment in NAND flash
@ 2011-02-25  9:31 Vanalme Filip
  0 siblings, 0 replies; 5+ messages in thread
From: Vanalme Filip @ 2011-02-25  9:31 UTC (permalink / raw)
  To: barebox

I have problems to save my environment settings. Although I set e.g. the MAC address and some other values and do the saveenv command, after reset, all settings have disappeared.
In the logging on the console port, I detected this :
"wrong crc on env
no valid environment found on /dev/env0. Using default environment"

That will be, of course, the cause why the settings disappear.
Further investigation with debugging enabled in nand_imx.c showed that Barebox reads 4 pages when starting up (0x80..0x83). That looks OK, because the environment's size is 6156 bytes. So, indeen 4 pages needed. However, when saving the environment, I only see appear one page write, i.e. on page 0x80. Of course, when reading back the four pages, the 2nd, 3rd and 4th page have all FF because they have never been written (causing a wrong CRC). Any idea why I only see 1 page write when saving the environment although the size is 6156 bytes ? Any hints where to look in the sources ?

Thanks in advance !



Filip


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread
* writing environment in NAND flash
@ 2011-02-25 13:50 Vanalme Filip
  2011-02-25 13:56 ` Juergen Beisert
  2011-02-25 14:13 ` Vanalme Filip
  0 siblings, 2 replies; 5+ messages in thread
From: Vanalme Filip @ 2011-02-25 13:50 UTC (permalink / raw)
  To: barebox

I have problems to save my environment settings. Although I set e.g. the MAC address and some other values and do the saveenv command, after reset, all settings have disappeared.
In the logging on the console port, I detected this :
"wrong crc on env
no valid environment found on /dev/env0. Using default environment"

That will be, of course, the cause why the settings disappear.
Further investigation with debugging enabled in nand_imx.c showed that Barebox reads 4 pages when starting up (0x80..0x83). That looks OK, because the environment's size is 6156 bytes. So, indeen 4 pages needed. However, when saving the environment, I only see appear one page write, i.e. on page 0x80. Of course, when reading back the four pages, the 2nd, 3rd and 4th page have all FF because they have never been written (causing a wrong CRC). Any idea why I only see 1 page write when saving the environment although the size is 6156 bytes ? Any hints where to look in the sources ?

Thanks in advance !



Filip

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2011-02-25 15:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-25  9:31 writing environment in NAND flash Vanalme Filip
2011-02-25 13:50 Vanalme Filip
2011-02-25 13:56 ` Juergen Beisert
2011-02-25 14:13 ` Vanalme Filip
2011-02-25 15:25   ` Vanalme Filip

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox