trying to customize nand images with block2mtd

Bryan Berry bryan.berry at gmail.com
Thu Apr 17 04:26:53 EDT 2008


hey guys,

I am trying to customize a os703 image without booting up into Sugar. I
am using the following currently, but getting some stttrrraaaange
errors.

http://wiki.laptop.org/go/Mounting_jffs2_images

here is what I have done
losetup /dev/loop0 os703.img
modprobe block2mtd block2mtd=/dev/loop4 
cat /proc/mtd    # inspect status
mkdir mtd
modprobe jffs2
mount -t jffs2 mtd0 mtd

make changes
then umount /mnt/mtd
modprobe -r block2mtd
losetup -d /dev/loop0

How to create new crc:
git clone git://git.fedoraproject.org/git/pilgrim
cd pilgrim/crcimg
make
./crcimg myfile.img

Then I take my new images and copy it to an XO with the command

copy-nand u:\newimage.img
It successfully writes over the current flash image

Then I type in boot at the Forth prompt. This produces a ton of JFFS2
warnings "bad summary on node" on boot and ends in a page fault

Any ideas?

The "Mounting jffs2 images" wiki page says the following

"If you want to write to the image, you may need to pad it with several
blocks of 0xFFFF bytes."

I have no idea how to do this. Would this solve my problem and if so,
could someone explain to me how to do it? thanks

-- 
Bryan W. Berry
Systems Engineer
OLE Nepal, http://www.olenepal.org




More information about the Devel mailing list