mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Problem with loadenv from /dev/env0
@ 2012-06-11 11:53 Benoit RAT
  2012-06-11 11:57 ` Sascha Hauer
  2012-06-11 11:58 ` Alexander Shiyan
  0 siblings, 2 replies; 5+ messages in thread
From: Benoit RAT @ 2012-06-11 11:53 UTC (permalink / raw)
  To: barebox


[-- Attachment #1.1: Type: text/plain, Size: 2229 bytes --]

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=72:0B:AD:C0:FF:EE
> PS1="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?

--
<http://www.sevensols.com/>  <http://www.sevensecurity.es>

*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ígono Ind. Juncaril \*

*18210 - PELIGROS - GRANADA –SPAIN*

[-- Attachment #1.2: Type: text/html, Size: 8306 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

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

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

* Re: Problem with loadenv from /dev/env0
  2012-06-11 11:53 Problem with loadenv from /dev/env0 Benoit RAT
@ 2012-06-11 11:57 ` Sascha Hauer
  2012-06-11 11:59   ` Benoit RAT
  2012-06-11 11:58 ` Alexander Shiyan
  1 sibling, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2012-06-11 11:57 UTC (permalink / raw)
  To: Benoit RAT; +Cc: barebox

On Mon, Jun 11, 2012 at 01:53:13PM +0200, Benoit RAT wrote:
> 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=72:0B:AD:C0:FF:EE
> > PS1="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

What hardware was this again?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

* Re: Problem with loadenv from /dev/env0
  2012-06-11 11:53 Problem with loadenv from /dev/env0 Benoit RAT
  2012-06-11 11:57 ` Sascha Hauer
@ 2012-06-11 11:58 ` Alexander Shiyan
  1 sibling, 0 replies; 5+ messages in thread
From: Alexander Shiyan @ 2012-06-11 11:58 UTC (permalink / raw)
  To: Benoit RAT; +Cc: barebox


[-- Attachment #1.1: Type: text/plain, Size: 550 bytes --]

Hello.

Mon, 11 Jun 2012 13:53:13 +0200 от Benoit RAT <benoit@sevensols.com>:
...
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/configAnd if I reboot barebox I still load the default environmentCan you do saveenv before?

[-- Attachment #1.2: Type: text/html, Size: 1416 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

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

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

* Re: Problem with loadenv from /dev/env0
  2012-06-11 11:57 ` Sascha Hauer
@ 2012-06-11 11:59   ` Benoit RAT
  2012-06-11 12:05     ` Benoit RAT
  0 siblings, 1 reply; 5+ messages in thread
From: Benoit RAT @ 2012-06-11 11:59 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox


[-- Attachment #1.1: Type: text/plain, Size: 1793 bytes --]

Sorry I forgot,

It is based on pm9g45 board

--
 <http://www.sevensols.com/>  <http://www.sevensecurity.es>

*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ígono Ind. Juncaril \*

*18210 - PELIGROS - GRANADA –SPAIN*



On Mon, Jun 11, 2012 at 1:57 PM, Sascha Hauer <s.hauer@pengutronix.de>wrote:

> On Mon, Jun 11, 2012 at 01:53:13PM +0200, Benoit RAT wrote:
> > 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=72:0B:AD:C0:FF:EE
> > > PS1="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
>
> What hardware was this again?
>
> Sascha
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>

[-- Attachment #1.2: Type: text/html, Size: 6088 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

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

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

* Re: Problem with loadenv from /dev/env0
  2012-06-11 11:59   ` Benoit RAT
@ 2012-06-11 12:05     ` Benoit RAT
  0 siblings, 0 replies; 5+ messages in thread
From: Benoit RAT @ 2012-06-11 12:05 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox


[-- Attachment #1.1: Type: text/plain, Size: 2758 bytes --]

@alexander:

wrs-02:0B:AD:C0:FF:EE# saveenv
saving environment
Skipping bad block at 0x00000000
Skipping bad block at 0x00020000
Skipping bad block at 0x00040000
Skipping bad block at 0x00060000
Skipping bad block at 0x00080000
Skipping bad block at 0x000a0000
Skipping bad block at 0x000c0000

then I reboot

read: No error

running /env/bin/init...

not found


--
 <http://www.sevensols.com/>  <http://www.sevensecurity.es>

*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ígono Ind. Juncaril \*

*18210 - PELIGROS - GRANADA –SPAIN*



On Mon, Jun 11, 2012 at 1:59 PM, Benoit RAT <benoit@sevensols.com> wrote:

> Sorry I forgot,
>
> It is based on pm9g45 board
>
>
> --
>  <http://www.sevensols.com/>  <http://www.sevensecurity.es>
>
> *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ígono Ind. Juncaril \*
>
> *18210 - PELIGROS - GRANADA –SPAIN*
>
>
>
> On Mon, Jun 11, 2012 at 1:57 PM, Sascha Hauer <s.hauer@pengutronix.de>wrote:
>
>> On Mon, Jun 11, 2012 at 01:53:13PM +0200, Benoit RAT wrote:
>> > 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=72:0B:AD:C0:FF:EE
>> > > PS1="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
>>
>> What hardware was this again?
>>
>> Sascha
>>
>> --
>> Pengutronix e.K.                           |                             |
>> Industrial Linux Solutions                 | http://www.pengutronix.de/ |
>> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0
>>  |
>> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555|
>>
>
>

[-- Attachment #1.2: Type: text/html, Size: 11176 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
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:[~2012-06-11 12:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-11 11:53 Problem with loadenv from /dev/env0 Benoit RAT
2012-06-11 11:57 ` Sascha Hauer
2012-06-11 11:59   ` Benoit RAT
2012-06-11 12:05     ` Benoit RAT
2012-06-11 11:58 ` Alexander Shiyan

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