NAND Boot Issue

Sascha Hauer s.hauer at pengutronix.de
Tue Oct 18 04:23:56 EDT 2011


On Tue, Oct 18, 2011 at 09:35:38AM +0200, Kamel BOUHARA wrote:
> I tried with a zImage, here is what I'm getting :
> 
> barebox:/ bootz /dev/nand0.kernel.bb
> invalid magic 0x00002018
> 
> And here the ls -l /dev/nand0.* output :
> 
>  barebox:/ ls -l /dev/nand0.*
> crw-------     393216 /dev/nand0.barebox.bb
> crw-------     131072 /dev/nand0.bareboxenv.bb
> crw-------    2883584 /dev/nand0.kernel.bb
> crw-------  533200896 /dev/nand0.root.bb
> crw-------  533667840 /dev/nand0.root
> crw-------    2764800 /dev/nand0.kernel
> crw-------     131072 /dev/nand0.bareboxenv
> crw-------     307200 /dev/nand0.barebox
> 
> Here is how I did my kernel and root partitions, following this steps :
> 
> addpart /dev/nand0 300k(barebox)ro,128k(bareboxenv),2700k(kernel),-(root)

Ok, that puts some light into this. Please make sure your partitions are
aligned to eraseblock boundaries, usually 128k. so:

addpart /dev/nand0 512k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)

barebox currently does not enforce this, it's probably time to change
this. Unaligned partitions are fine, but the partition code should mark
them as readonly.
Currently we have no way of passing the eraseblocksize through to the
partition code, so it's not trivial to enforce alignment.

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 |



More information about the barebox mailing list