Can i access the barebox env from linux

Alexander Aring alex.aring at gmail.com
Sun Mar 30 20:12:11 EDT 2014


Hi,

On Fri, Mar 28, 2014 at 10:52:41AM +0100, Alexander Aring wrote:
> On Fri, Mar 28, 2014 at 03:04:40PM +0530, Ashutosh Singh wrote:
> > ya i tried with that too please have a look over barebox log after reboot:
> > 
> > nand: ONFI param page 0 valid
> > nand: ONFI flash detected ...
> > nand: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron MT29F4G08ABADAH4),
> > page size: 2048, OOB size: 64
> > malloc space: 0x83ff4000 -> 0x87ff3fff (size 64 MiB)
> > err -74
> well, 74 is EBADMSG.
> 
> I run a 'grep -nr "EBADMSG" .' into the current barebox directory and it
> seems that the uncompress env functions doesn't return this errno. So
> maybe your enviroment is correct (I can't check it I need a hexdump for
> this).
> 
> 
> What I can see is:
> ./drivers/mtd/nand/nand_base.c:1464:		return -EBADMSG;
> ./drivers/mtd/nand/nand_base.c:1739:		return -EBADMSG;
> ./drivers/mtd/nand/nand_ecc.c:192:	return -EBADMSG;
> 
> 
> and especially "./drivers/mtd/nand/nand_ecc.c", try to enable more debug
> functionality in barebox "make menuconfig" there exist some option to
> enable set some debug level in "Debugging  --->".
> 
> Or maybe try to instrument the code there to see if it's really some ecc
> failure.
> 

today I tested it with nandsim but I can't use a real barebox to read
the environment.

I used nandwrite and nanddump afterwards. Maybe you can run a easy test,
too. Read the image back after you ran nandwrite and extract the image
wit bareboxenv. Then we know the env is successful written and there
exists some other problem between linux<->barebox.

... and please keep the mailinglist in cc.

- Alex




More information about the barebox mailing list