NAND Writing: Difference between revisions

From OLPC
Jump to navigation Jump to search
(Added recipe for copying files.)
m (added developers category tag)
Line 26: Line 26:


Note that the "umount" command will sometimes take a while to finish.
Note that the "umount" command will sometimes take a while to finish.

[[Category:Developers]]

Revision as of 23:31, 2 November 2006

Some recipes for putting filesystems onto NAND FLASH. See also Installing_to_NAND.

Bad Block Table Messed Up

This is a recipe for erasing the NAND Flash and rewriting it, in the event that the bad block table is potentially messed up.

Boot from a USB key, passing the cmdline argument "cafe_nand.skipbbt=1"

Login as root

modprobe mtdchar
flash_eraseall -j /dev/mtd0
nandwrite -p /dev/mtd0 build131.img

Reboot, and the BBT should be recreated as cafe_nand loads, based on the bad blocks found during formatting.

Copying Stuff on as Files

This is for when you don't have a preformatted JFFS2 image and you just want to make an empty filesystem and copy on some files.

 modprobe mtdchar
 flash_eraseall -j /dev/mtd0
 mount -tjffs2 mtd0 /mnt
 # Now use cp, or tar, or whatever to copy files into /mnt
 umount /mnt

Note that the "umount" command will sometimes take a while to finish.