Re: Integrating new MTD/jffs2 into 2.4.18 kernel

Steven Hein
2002-07-25T15:45:37Z

David, Joern,

Thanks for the help! My jffs2 filesystem is now working in NAND flash!

For the benefit of others, here's a summary of what I needed to do
to get this going.

Here's generally what I needed to do.

1) apply the patch ftp://ftp.kernel.org/pub/linux/kernel/people/dwmw2/shared-zliblinux-2.4.19-pre10-shared-zlib.bz2

NOTE: I am running linux-2.4.18 + linux-2.4.18-rmk7 ARM patch,
which already contains some parts of the above patch. So, I had
to go through the patch and grab the parts I needed. If this
is the case for you.....

a) copy CVS:mtd/lib/zlib_inflate and CVS:mtd/lib/zlib_deflate
to linux/lib
b) modify linux/lib Makefile as indicated in the above patch
c) remove linux/fs/inflate_fs
e) modify linux/fs/Makefile and linux/fs/cramfs/uncompress.c
as indicated in the above patch
f) add the line "source lib/Config.in" to arch/<yours>/Config.in
(as is done in the above patch)
*) I think that's all I needed....basically I went through the above
patch and applied everything in it by hand.

2) remove linux/fs/jffs2

3) copy CVS:mtd/fs/jffs2 to linux/fs/jffs2

4) copy fs/jffs2/crc32.h to linux/include/linux/crc32.h

5) in linux/fs/jffs2/file.c, there is a reference to PageUptodate()
that must be changed to Page_Uptodate() (looks like this syntax
changed from 2.4 to 2.5 kernel....)

6) apply the following patch to linux/fs/Config.in:

diff -uNr linux/fs/Config.in linux.new_jffs2/fs/Config.in
--- linux/fs/Config.in Mon Feb 25 13:38:07 2002
+++ linux.new_jffs2/fs/Config.in Thu Jul 25 10:05:41 2002
@@ -42,6 +42,7 @@
dep_tristate 'Journalling Flash File System v2 (JFFS2) support' CONFIG_JFFS2_FS $CONFIG_MTD
if [ "$CONFIG_JFFS2_FS" = "y" -o "$CONFIG_JFFS2_FS" = "m" ] ; then
int 'JFFS2 debugging verbosity (0 = quiet, 2 = noisy)' CONFIG_JFFS2_FS_DEBUG 0
+ dep_bool ' JFFS2 support for NAND flash (EXPERIMENTAL)' CONFIG_JFFS2_FS_NAND $CONFIG_EXPERIMENTAL
fi
tristate 'Compressed ROM file system support' CONFIG_CRAMFS
bool 'Virtual memory file system support (former shm fs)' CONFIG_TMPFS

Once I did that, I had a working, writable JFFS2 filesystem running
on NAND flash.

Thanks again for the help!!

Steve

David Woodhouse wrote:
>
> joern@wohnheim.fh-wedel.de said:
> > My guess is that you need the zlib stuff in the kernel lib, you
> > should have linux/lib/zlib_inflate and linux/lib/zlib_deflate in your
> > source plus some modifications in arch/<yours>/config.in, lib/Makefile
> > and include/linux/zlib.h. Roughly.
>
> ftp://ftp.??.kernel.org/pub/linux/kernel/people/dwmw2/shared-zlib/linux-2.4.19-pre10-shared-zlib.bz2
>
> And I think you may need to copy fs/jffs2/crc32.h to include/linux/crc32.h
> or something similar.
>
> --
> dwmw2
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steve Hein (ssh@sgi.com) Engineering Diagnostics/Software
Silicon Graphics, Inc.
1168 Industrial Blvd. Phone: (715) 726-8410
Chippewa Falls, WI 54729 Fax: (715) 726-6715
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~