How to cleanup holes for successfully jffs2 booting with uboot?

Joakim Tjernlund joakim.tjernlund at transmode.se
Wed Nov 18 17:49:28 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?

Nope, the idea to fix your problem this way isn't sane.

Fix the u-boot JFFS2 code instead. I know there are patches
floating around on the list that fixes various issues, possibly yours
too.

  Jocke




More information about the linux-mtd mailing list