bareboxenv on userspace - wrong crc on env

Vanhauwaert Wouter W.Vanhauwaert at TELEVIC.com
Fri Oct 11 10:08:15 EDT 2013


> -----Original Message-----
> From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
> Sent: donderdag 29 augustus 2013 20:44
> To: Vanhauwaert Wouter
> Cc: barebox at 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)



More information about the barebox mailing list