mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* bareboxenv on userspace - wrong crc on env
@ 2013-08-29  9:24 Vanhauwaert Wouter
  2013-08-29 10:44 ` Yi Qingliang
  2013-08-29 18:44 ` Sascha Hauer
  0 siblings, 2 replies; 6+ messages in thread
From: Vanhauwaert Wouter @ 2013-08-29  9:24 UTC (permalink / raw)
  To: barebox

Hello all, 

I'm having issues accessing my barebox environment from within linux....

My barebox and environment are located on a SPI NOR flash.
This boots ok, and barebox is able to save its environment to it.

When I want to load it in userspace through:

$ bareboxenv -l /mnt /dev/mtd1
Or 
$ dd if=/dev/mtd1 /tmp/barebox
Or 
$ dd if=/dev/mdtblock1 /tmp/barebox

Result is:
Wrong crc on env

However it's working fine in barebox itself

What can be wron?

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

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

* Re: bareboxenv on userspace - wrong crc on env
  2013-08-29  9:24 bareboxenv on userspace - wrong crc on env Vanhauwaert Wouter
@ 2013-08-29 10:44 ` Yi Qingliang
  2013-08-29 11:35   ` Vanhauwaert Wouter
  2013-08-29 18:44 ` Sascha Hauer
  1 sibling, 1 reply; 6+ messages in thread
From: Yi Qingliang @ 2013-08-29 10:44 UTC (permalink / raw)
  To: barebox; +Cc: Vanhauwaert Wouter

On Thursday, August 29, 2013 11:24:41 AM Vanhauwaert Wouter wrote:
> Hello all,
> 
> I'm having issues accessing my barebox environment from within linux....
> 
> My barebox and environment are located on a SPI NOR flash.
> This boots ok, and barebox is able to save its environment to it.
> 
> When I want to load it in userspace through:
> 
> $ bareboxenv -l /mnt /dev/mtd1
> Or
> $ dd if=/dev/mtd1 /tmp/barebox
> Or
> $ dd if=/dev/mdtblock1 /tmp/barebox
> 
> Result is:
> Wrong crc on env
> 
> However it's working fine in barebox itself
> 
> What can be wron?

maybe the ecc mode for nand flash is different in barebox and in kernel, you 
should check the config for barebox and kernel.

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

-- 
Nanjing Jilong
Yi Qingliang
niqingliang2003@gmail.com

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

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

* RE: bareboxenv on userspace - wrong crc on env
  2013-08-29 10:44 ` Yi Qingliang
@ 2013-08-29 11:35   ` Vanhauwaert Wouter
  2013-08-30  2:29     ` Yi Qingliang
  0 siblings, 1 reply; 6+ messages in thread
From: Vanhauwaert Wouter @ 2013-08-29 11:35 UTC (permalink / raw)
  To: Yi Qingliang, barebox

> -----Original Message-----
> From: Yi Qingliang [mailto:niqingliang2003@gmail.com]
> Sent: donderdag 29 augustus 2013 12:44
> To: barebox@lists.infradead.org
> Cc: Vanhauwaert Wouter
> Subject: Re: bareboxenv on userspace - wrong crc on env
> 
> On Thursday, August 29, 2013 11:24:41 AM Vanhauwaert Wouter wrote:
> > Hello all,
> >
> > I'm having issues accessing my barebox environment from within linux....
> >
> > My barebox and environment are located on a SPI NOR flash.
> > This boots ok, and barebox is able to save its environment to it.
> >
> > When I want to load it in userspace through:
> >
> > $ bareboxenv -l /mnt /dev/mtd1
> > Or
> > $ dd if=/dev/mtd1 /tmp/barebox
> > Or
> > $ dd if=/dev/mdtblock1 /tmp/barebox
> >
> > Result is:
> > Wrong crc on env
> >
> > However it's working fine in barebox itself
> >
> > What can be wron?
> 
> maybe the ecc mode for nand flash is different in barebox and in kernel, you
> should check the config for barebox and kernel.
> 

It's SPI NOR flash...


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

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

* Re: bareboxenv on userspace - wrong crc on env
  2013-08-29  9:24 bareboxenv on userspace - wrong crc on env Vanhauwaert Wouter
  2013-08-29 10:44 ` Yi Qingliang
@ 2013-08-29 18:44 ` Sascha Hauer
  2013-10-11 14:08   ` Vanhauwaert Wouter
  1 sibling, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2013-08-29 18:44 UTC (permalink / raw)
  To: Vanhauwaert Wouter; +Cc: barebox

On Thu, Aug 29, 2013 at 11:24:41AM +0200, Vanhauwaert Wouter wrote:
> Hello all, 
> 
> I'm having issues accessing my barebox environment from within linux....
> 
> My barebox and environment are located on a SPI NOR flash.
> This boots ok, and barebox is able to save its environment to it.
> 
> When I want to load it in userspace through:
> 
> $ bareboxenv -l /mnt /dev/mtd1
> Or 
> $ dd if=/dev/mtd1 /tmp/barebox
> Or 
> $ dd if=/dev/mdtblock1 /tmp/barebox
> 
> Result is:
> Wrong crc on env
> 
> However it's working fine in barebox itself
> 
> What can be wron?

The only idea I have is that /dev/mtd1 might not be the place where
barebox stores it's environment, maybe because of different probe order
in the kernel or different partition layout. Could you send a hexdump of
the first 256 bytes or so of /dev/mtd1?

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] 6+ messages in thread

* Re: bareboxenv on userspace - wrong crc on env
  2013-08-29 11:35   ` Vanhauwaert Wouter
@ 2013-08-30  2:29     ` Yi Qingliang
  0 siblings, 0 replies; 6+ messages in thread
From: Yi Qingliang @ 2013-08-30  2:29 UTC (permalink / raw)
  To: Vanhauwaert Wouter; +Cc: barebox

On Thursday, August 29, 2013 01:35:06 PM Vanhauwaert Wouter wrote:
> > -----Original Message-----
> > From: Yi Qingliang [mailto:niqingliang2003@gmail.com]
> > Sent: donderdag 29 augustus 2013 12:44
> > To: barebox@lists.infradead.org
> > Cc: Vanhauwaert Wouter
> > Subject: Re: bareboxenv on userspace - wrong crc on env
> > 
> > On Thursday, August 29, 2013 11:24:41 AM Vanhauwaert Wouter wrote:
> > > Hello all,
> > > 
> > > I'm having issues accessing my barebox environment from within linux....
> > > 
> > > My barebox and environment are located on a SPI NOR flash.
> > > This boots ok, and barebox is able to save its environment to it.
> > > 
> > > When I want to load it in userspace through:
> > > 
> > > $ bareboxenv -l /mnt /dev/mtd1
> > > Or
> > > $ dd if=/dev/mtd1 /tmp/barebox
> > > Or
> > > $ dd if=/dev/mdtblock1 /tmp/barebox
> > > 
> > > Result is:
> > > Wrong crc on env
> > > 
> > > However it's working fine in barebox itself
> > > 
> > > What can be wron?
> > 
> > 
> 
> It's SPI NOR flash...
you can ignore the 'nand':

maybe the ecc mode for flash is different in barebox and in kernel,
you should check the config for barebox and kernel.

-- 
Nanjing Jilong
Yi Qingliang
niqingliang2003@gmail.com

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

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

* RE: bareboxenv on userspace - wrong crc on env
  2013-08-29 18:44 ` Sascha Hauer
@ 2013-10-11 14:08   ` Vanhauwaert Wouter
  0 siblings, 0 replies; 6+ messages in thread
From: Vanhauwaert Wouter @ 2013-10-11 14:08 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

> -----Original Message-----
> From: Sascha Hauer [mailto:s.hauer@pengutronix.de]
> Sent: donderdag 29 augustus 2013 20:44
> To: Vanhauwaert Wouter
> Cc: barebox@lists.infradead.org
> Subject: Re: bareboxenv on userspace - wrong crc on env
> 
> On Thu, Aug 29, 2013 at 11:24:41AM +0200, Vanhauwaert Wouter wrote:
> > Hello all,
> >
> > I'm having issues accessing my barebox environment from within linux....
> >
> > My barebox and environment are located on a SPI NOR flash.
> > This boots ok, and barebox is able to save its environment to it.
> >
> > When I want to load it in userspace through:
> >
> > $ bareboxenv -l /mnt /dev/mtd1
> > Or
> > $ dd if=/dev/mtd1 /tmp/barebox
> > Or
> > $ dd if=/dev/mdtblock1 /tmp/barebox
> >
> > Result is:
> > Wrong crc on env
> >
> > However it's working fine in barebox itself
> >
> > What can be wron?
> 
> The only idea I have is that /dev/mtd1 might not be the place where barebox
> stores it's environment, maybe because of different probe order in the kernel or
> different partition layout. Could you send a hexdump of the first 256 bytes or so
> of /dev/mtd1?
> 
> Sascha

I had general issues reading and writing spi nor flash in userspace (without being aware of it). Now it works, I can read / write from nor flash from within linux.
I can copy the barebox bootloader and uImage to it through dd and this works fine. I can also load my barebox environment, change things and write it back and read it back out.
However, when I restart my board afterwards, I get an invalid crc on superblock.

(Sorry, some kind of double post with my new topic today)

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

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

end of thread, other threads:[~2013-10-11 14:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-29  9:24 bareboxenv on userspace - wrong crc on env Vanhauwaert Wouter
2013-08-29 10:44 ` Yi Qingliang
2013-08-29 11:35   ` Vanhauwaert Wouter
2013-08-30  2:29     ` Yi Qingliang
2013-08-29 18:44 ` Sascha Hauer
2013-10-11 14:08   ` Vanhauwaert Wouter

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