Hello, <div><br></div><div>I want to recover some parameters from my NAND flash by using saveenv and loadenv but It does not work:</div><div><br></div><div>First I have used a big env0 partition to be sure bad blocks don't bother me.</div>
<div><br></div><div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class="Apple-tab-span" style="white-space:pre"> </span>devfs_add_partition("nand0", 0x00000, 0xF0000, PARTITION_FIXED, "env_raw");<br><span class="Apple-tab-span" style="white-space:pre"> </span>dev_add_bb_dev("env_raw", "env0");</blockquote>
</div><div><br></div><div>Then I try to edit,save & load /env/config</div><div><br></div><div><div style>wrs-02:0B:AD:C0:FF:EE# edit /<span class="il" style="background-image:initial;background-color:rgb(255,255,204)">env</span>/config</div>
<div style><div><br></div><div>Then I change the eth0.addr</div><div><br></div><div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
eth0.ethaddr=72:0B:AD:C0:FF:EE<br>PS1="wrs-$eth0.ethaddr# "</blockquote></div><div><br></div><div>Ctrl+D</div><div><br></div><div>wrs-02:0B:AD:C0:FF:EE# . /<span class="il" style="background-image:initial;background-color:rgb(255,255,204)">env</span>/config </div>
<div><div>wrs-72:0B:AD:C0:FF:EE# saveenv </div><div>saving <span class="il" style="background-image:initial;background-color:rgb(255,255,204)">environment</span></div><div>wrs-72:0B:AD:C0:FF:EE# <span class="il" style="background-image:initial;background-color:rgb(255,255,204)">loadenv</span> </div>
<div>loading <span class="il" style="background-image:initial;background-color:rgb(255,255,204)">environment</span> from /dev/env0</div><div>err -74</div><div>err -74</div><div>wrong crc on <span class="il" style="background-image:initial;background-color:rgb(255,255,204)">env</span></div>
</div></div></div><div><br></div><div>And if I reboot barebox I still load the default environment</div><div><br></div><div><div>NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron NAND 512MiB 1,8V 16-b)</div><div>
Scanning device for bad blocks </div>
<div>Bad eraseblock 0 at 0x00000000 </div></div><div><div>err -74 </div><div>envfs: wrong magic on /dev/env0 </div>
<div>no valid environment found on /dev/env0. Using default environment </div><div>running /env/bin/init... </div><div><br></div><div>Moreover, I have noticed that each time I use saveenv command it add another bad block, and that sometime It does read something in /dev/env0 but without anything in /env</div>
<div><br></div><div><div>NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron NAND 512MiB 1,8V 16-b)</div><div>Scanning device for bad blocks </div><div>Bad eraseblock 0 at 0x00000000 </div>
<div>Bad eraseblock 1 at 0x00020000 </div><div>Bad eraseblock 2 at 0x00040000 </div><div>Bad eraseblock 665 at 0x05320000 </div>
<div>Bad eraseblock 1553 at 0x0c220000 </div><div>Bad eraseblock 1712 at 0x0d600000 </div><div>Bad eraseblock 1997 at 0x0f9a0000 </div>
<div>Bad eraseblock 2182 at 0x110c0000 </div><div><div>Malloc space: 0x73b00000 -> 0x73efffff (size 4 MB) </div><div>Stack space : 0x73af8000 -> 0x73b00000 (size 32 kB) </div>
<div>read: No error </div><div>running /env/bin/init... </div></div></div><div><br></div><div>Someone know what I am doing wrong? </div><div> </div>
<span style="font-family:'Times New Roman';font-size:medium">--</span><br style="font-family:'Times New Roman';font-size:medium"><div style="font-family:'Times New Roman';font-size:medium"><a href="http://www.sevensols.com/" target="_blank"><img src="http://www.sevensols.com/logos/logo-118x90.png"></a> <a href="http://www.sevensecurity.es" style="margin-left:10px" target="_blank"><img src="http://www.sevensols.com/logos/logo-7Sec-216x90.png"></a></div>
<br style="font-family:'Times New Roman';font-size:medium"><div style="font-family:'Times New Roman';font-size:medium"><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse;line-height:15px"><b><span lang="EN-US" style="font-family:'Caecilia LT Std Light',serif;color:rgb(16,138,208)">Benoit RAT LAMY</span></b></span></div>
<div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px;font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><span lang="EN-US" style="font-family:'Caecilia LT Std Light',serif;color:rgb(16,138,208)">Engineer (Sw) \ Ingeniero (Sw)</span></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px;font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><span lang="EN-US" style="font-family:'Caecilia LT Std Light',serif;color:rgb(16,138,208)">fix. <b>(+34) 958 285 024</b></span></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px;font-size:13px;border-collapse:collapse"><span style="color:rgb(16,138,208);font-family:'Caecilia LT Std Light',serif">cel. </span><b style="color:rgb(16,138,208);font-family:'Caecilia LT Std Light',serif">(+34) 617 989 123</b></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px;font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><span lang="EN-US" style="font-family:'Caecilia LT Std Light',serif;color:rgb(16,138,208)">e-mail: <a href="mailto:benoit@sevensols.com" target="_blank"><font color="#339999">benoit@sevensols.com</font></a></span></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px;font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><span lang="ES-TRAD" style="font-family:'Caecilia LT Std Light',serif"><span style="text-decoration:none"><font color="#339999"><a href="http://www.sevensols.com/" target="_blank">www.sevensols.com</a> / </font></span></span></b><span lang="ES-TRAD" style="font-family:'Caecilia LT Std Light',serif;color:rgb(16,138,208)"></span><b><span lang="ES-TRAD" style="font-family:'Caecilia LT Std Light',serif"><font color="#339999"><a href="http://www.sevensecurity.es" target="_blank">www.sevensecurity.es</a></font></span></b></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px;font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><span lang="ES-TRAD" style="font-family:'Caecilia LT Std Light',serif;color:rgb(16,138,208)">_________________________________</span></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px;font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><span lang="ES-TRAD" style="font-family:'Caecilia LT Std Light',serif;color:rgb(16,138,208)">C/ Baza, parcela 19 Nave 3 \ Polígono Ind. Juncaril \</span></b></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><span style="font-family:'Caecilia LT Std Light',serif;color:rgb(16,138,208)">18210 - PELIGROS - GRANADA –SPAIN</span></b></p>
</div><br>
</div>