I may have worked out why after writing to NAND using our kernel PBL tool doesn't load the old stuff from NAND.
I think the problem is to do with the format of the OOB data and/or ECC format.
I tried to modify the kernel parameters of the old kernel using our kernel and MTD tools rather the PBL tool (as I hadn't updated the NAND writing routines). I dumped /dev/mtd1 to my USB stick and created a modified version with the changed command line. After flashing my modified version of mtd1 to my E3 I power cycled it and it just sat there. Fortunately PBL still works and so I booted our kernel and re-flashed the original image and power cycled again, but my E3 still didn't boot the old kernel.
My guess is that PBL is doing a badblobk check on the flash as it searches for images and find's the pages that I have modified are bad and thus refuses to load them.
If I'm right then is could be a problem trying to get PBL to load u-boot. Flashing u-boot with pbltool should mean that PBL could load u-boot, but it might scan the entire flash for images and give up because it thinks there are too many bad images, or if it can't find enough images (I'm not sure how PBL handles loading stuff from flash, does it boot the first image with the correct header or just it know it needs to find 3 or more valid images).
Mark
___________________________________________________________ NEW Yahoo! Cars - sell your car and browse thousands of new and used cars online! http://uk.cars.yahoo.com/
On Sun, Mar 12, 2006 at 12:02:45PM +0000, Mark Underwood wrote:
I may have worked out why after writing to NAND using our kernel PBL tool doesn't load the old stuff from NAND.
I think the problem is to do with the format of the OOB data and/or ECC format.
I tried to modify the kernel parameters of the old kernel using our kernel and MTD tools rather the PBL tool (as I hadn't updated the NAND writing routines). I dumped /dev/mtd1 to my USB stick and created a modified version with the changed command line. After flashing my modified version of mtd1 to my E3 I power cycled it and it just sat there. Fortunately PBL still works and so I booted our kernel and re-flashed the original image and power cycled again, but my E3 still didn't boot the old kernel.
My guess is that PBL is doing a badblobk check on the flash as it searches for images and find's the pages that I have modified are bad and thus refuses to load them.
I think you said on IRC you'd been using nandwrite to write the block; I have successfully written a block containing a MEM and LDR block to mtdblock1 using dd and had PBL detect and print the details of the MEM block and seemingly load the LDR block (certainly it stopped scanning the NAND at the point instead of continuing as it did before I stored the blocks).
However I haven't yet had luck getting PBL to actually load a LDR block and spawn u-boot. I'm not sure if it's loading and trying to run it, or failing to load it, so I think I'm going to have to go back to basics and start out with a simply "Hello World" LDR replacement to confirm it's getting loaded so I can work out if it's that or u-boot at fault.
Not quite sure when I'll get round to it. Unfortunately work's been a bit hectic so far this month and I haven't had as much time as I'd have liked to get this sorted.
J.