How to cleanup holes for successfully jffs2 booting with uboot?

Philippe Gagnon philippe.gagnon at novariant.com
Wed Nov 18 17:24:09 EST 2009


Hello,

I'm running uboot 1.3.4 and linux 2.6.29.2. I'm booting on a NOR flash
with a JFFS2 filesystem.

When updating the boot NOR flash files with new kernel, ramdisk and dtb
files, I have to cleanup the NOR jffs2 partition by triggering the jffs2
garbage collector (jffs2_gcd_mtd0) several times. Without cleaning the
jffs2 partition, sometimes uboot is unable to reboot.

My suspicion is that uboot doesn't support holes in the jffs2 boot
partition. I found a note in uboot that reinforces that doubt.

>From linux prompt, I would like to cleanup holes in the NOR jffs2
partition in a efficient manner. Right now, I'm triggering the jffs2
garbage collector (jffs2_gcd_mtd0) a lot of times. I'm also using
jffs2dump to inspect the JFFS2 partition. I stop to trigger the garbage
collector when the "jffs2dump -c /dev/mtd0 | grep name" gives a single
record for each file name. This process can last for several minutes
(from 2 to 20 minutes). This process duration is too long for our
application.

Any advices on how to better cleanup JFFS2 holes from linux prompt?

Anyone have similar issues with uboot and jffs2 boot partition? What is
your workaround?

Thanks in advance

Philippe Gagnon



More information about the linux-mtd mailing list