From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from slsa667.piensasolutions.com ([217.76.150.252]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Se3Bj-0000lR-3f for barebox@lists.infradead.org; Mon, 11 Jun 2012 11:53:41 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-02.piensasolutions.com (Postfix) with ESMTP id D36B72A0AE4 for ; Mon, 11 Jun 2012 13:53:34 +0200 (CEST) Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by smtp-02.piensasolutions.com (Postfix) with ESMTPSA id 9BC672A0AAA for ; Mon, 11 Jun 2012 13:53:34 +0200 (CEST) Received: by eekd17 with SMTP id d17so2145898eek.36 for ; Mon, 11 Jun 2012 04:53:34 -0700 (PDT) MIME-Version: 1.0 From: Benoit RAT Date: Mon, 11 Jun 2012 13:53:13 +0200 Message-ID: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6566940440594279530==" Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Problem with loadenv from /dev/env0 To: barebox@lists.infradead.org --===============6566940440594279530== Content-Type: multipart/alternative; boundary=90e6ba615438e2cc7204c230ff5d --90e6ba615438e2cc7204c230ff5d Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hello, I want to recover some parameters from my NAND flash by using saveenv and loadenv but It does not work: First I have used a big env0 partition to be sure bad blocks don't bother me. devfs_add_partition("nand0", 0x00000, 0xF0000, PARTITION_FIXED, "env_raw")= ; > dev_add_bb_dev("env_raw", "env0"); Then I try to edit,save & load /env/config wrs-02:0B:AD:C0:FF:EE# edit /env/config Then I change the eth0.addr eth0.ethaddr=3D72:0B:AD:C0:FF:EE > PS1=3D"wrs-$eth0.ethaddr# " Ctrl+D wrs-02:0B:AD:C0:FF:EE# . /env/config wrs-72:0B:AD:C0:FF:EE# saveenv saving environment wrs-72:0B:AD:C0:FF:EE# loadenv loading environment from /dev/env0 err -74 err -74 wrong crc on env And if I reboot barebox I still load the default environment NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron NAND 512MiB 1,8V 16-b) Scanning device for bad blocks Bad eraseblock 0 at 0x00000000 err -74 envfs: wrong magic on /dev/env0 no valid environment found on /dev/env0. Using default environment running /env/bin/init... 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 NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron NAND 512MiB 1,8V 16-b) Scanning device for bad blocks Bad eraseblock 0 at 0x00000000 Bad eraseblock 1 at 0x00020000 Bad eraseblock 2 at 0x00040000 Bad eraseblock 665 at 0x05320000 Bad eraseblock 1553 at 0x0c220000 Bad eraseblock 1712 at 0x0d600000 Bad eraseblock 1997 at 0x0f9a0000 Bad eraseblock 2182 at 0x110c0000 Malloc space: 0x73b00000 -> 0x73efffff (size 4 MB) Stack space : 0x73af8000 -> 0x73b00000 (size 32 kB) read: No error running /env/bin/init... Someone know what I am doing wrong? -- *Benoit RAT LAMY* Engineer (Sw) \ Ingeniero (Sw) fix. *(+34) 958 285 024* cel. *(+34) 617 989 123* e-mail: benoit@sevensols.com *www.sevensols.com / **www.sevensecurity.es* _________________________________ *C/ Baza, parcela 19 Nave 3 \ Pol=EDgono Ind. Juncaril \* *18210 - PELIGROS - GRANADA =96SPAIN* --90e6ba615438e2cc7204c230ff5d Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hello,=A0

I want to recover some parameters from my NAND= flash by using saveenv and loadenv but It does not work:

First I have used a big env0 partition to be sure bad blocks don= 9;t bother me.

devfs_add_= partition("nand0", 0x00000, 0xF0000, PARTITION_FIXED, "env_r= aw");
dev_add_bb_dev("env_raw", "env0");

Then I try to edit,save & load /env/config

wrs-02:0B:AD:C0:FF:EE# edit /env/config

Then I change the eth0.addr

eth0.ethaddr=3D72:0B:AD:C0:FF:EE
PS1=3D"wrs-$eth0.ethaddr# "

Ctrl+D

wrs-02= :0B:AD:C0:FF:EE# . /env/config=A0
wrs-72:0B:AD:C0:FF:EE# saveenv=A0
saving=A0environment
wrs-72:0B:AD:C0:FF:EE#=A0loaden= v=A0
loading=A0environment=A0from /dev/env0
e= rr -74
err -74
wrong crc on=A0env<= /div>

And if I reboot barebox I still load = the default environment

NAND device: Manufact= urer ID: 0x2c, Chip ID: 0xbc (Micron NAND 512MiB 1,8V 16-b)
Scanning device for bad blocks =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
Bad eraseblock 0 at 0x00000000 =A0 =A0 =A0
err -7= 4 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0<= /div>
envfs: wrong magic on /dev/env0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0
no valid environment found on /dev/env0. Using default environment =A0= =A0 =A0 =A0 =A0 =A0 =A0
running /env/bin/init... =A0
<= br>
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

NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc = (Micron NAND 512MiB 1,8V 16-b)
Scanning device for bad blocks =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0
Bad eraseblock 0 at 0x00000000 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0
Bad eraseblock 1 at 0x00020000 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
Bad = eraseblock 2 at 0x00040000=A0
Bad eraseblock 665 at 0x05320000 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0
Bad eraseblock 1553 at 0x0c220000 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0
Bad er= aseblock 1712 at 0x0d600000 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0
Bad eraseblock 19= 97 at 0x0f9a0000 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0
Bad eraseblock 2182 at 0x110c0000=A0=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
Malloc = space: 0x73b00000 -> 0x73efffff (size =A04 MB) =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0
Stack space : 0x73af8000 ->= 0x73b00000 (size 32 kB) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0=A0
read: No error =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0
running /env/bin/init... =A0

=
Someone know what I am doing wrong?=A0
=A0=A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0
--
<= div style=3D"font-family:'Times New Roman';font-size:medium">=A0

Benoit RAT LAMY

Engineer (Sw) \ Ingeniero (= Sw)

fix.=A0(+34) 958 285 024<= /span>

c= el.=A0(+34) 617 989 123

e-mail:=A0benoit@sevensol= s.com

www.se= vensols.com=A0/=A0www.sevensecurity.es

______________________________= ___

C/ Baza, parcela 19 Nave 3= =A0 \ Pol=EDgono Ind. Juncaril \

18210 - PELIGROS - GRANADA =96SPAIN


--90e6ba615438e2cc7204c230ff5d-- --===============6566940440594279530== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox --===============6566940440594279530==--