public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Integrating new MTD/jffs2 into 2.4.18 kernel
@ 2002-07-25 12:25 Steven Hein
  2002-07-25 13:14 ` Jörn Engel
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Hein @ 2002-07-25 12:25 UTC (permalink / raw)
  To: linux-mtd

Hello,

I am running on an ARM platform using the 2.4.18 kernel with 2.4.18-rmk7
patch.  I'm using the MTD NAND flash support, and I'm having problems
running a jffs2 filesystem on a NAND flash device  (not a root
filesystem,
just a writable "scratch" directory).

Using a snapshot from yesterday, I tried to integrate the jffs2 from
the snapshot into my kernel.  But there were a few issues:
- include/linux/crc32.h but expected by the files in fs/jffs2
- zlib.[ch] were not in the jffs2 dir as they were previously

I tried fixing these, but still ended up missing the zlib_deflate*
functions.....

So my question is:   is there a place I can grab the MTD/jffs2 stuff
to drop directly into a 2.4.18-rmk7 kernel?   Or, is there a
procedure somewhere describing how to integrate the latest MTD
from CVS (especially jffs2) into the latest 2.4.x kernel?

Thanks in advance!

Steve


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Integrating new MTD/jffs2 into 2.4.18 kernel
  2002-07-25 12:25 Integrating new MTD/jffs2 into 2.4.18 kernel Steven Hein
@ 2002-07-25 13:14 ` Jörn Engel
  2002-07-25 13:28   ` David Woodhouse
  0 siblings, 1 reply; 5+ messages in thread
From: Jörn Engel @ 2002-07-25 13:14 UTC (permalink / raw)
  To: Steven Hein; +Cc: linux-mtd

On Thu, 25 July 2002 07:25:08 -0500, Steven Hein wrote:
> I am running on an ARM platform using the 2.4.18 kernel with 2.4.18-rmk7
> patch.  I'm using the MTD NAND flash support, and I'm having problems
> running a jffs2 filesystem on a NAND flash device  (not a root
> filesystem,
> just a writable "scratch" directory).
> 
> Using a snapshot from yesterday, I tried to integrate the jffs2 from
> the snapshot into my kernel.  But there were a few issues:
> - include/linux/crc32.h but expected by the files in fs/jffs2
> - zlib.[ch] were not in the jffs2 dir as they were previously
> 
> I tried fixing these, but still ended up missing the zlib_deflate*
> functions.....
> 
> So my question is:   is there a place I can grab the MTD/jffs2 stuff
> to drop directly into a 2.4.18-rmk7 kernel?   Or, is there a
> procedure somewhere describing how to integrate the latest MTD
> from CVS (especially jffs2) into the latest 2.4.x kernel?

You might want to take a look at a current -ac kernel. I had the same
problems (and more), merging with a modified 2.4.2 kernel. Basically,
whenever there was something missing, I took a look into the -ac
kernel, modified mine accordingly, and went on to the next problem.

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.

Joern

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Integrating new MTD/jffs2 into 2.4.18 kernel
  2002-07-25 13:14 ` Jörn Engel
@ 2002-07-25 13:28   ` David Woodhouse
  2002-07-25 15:45     ` Steven Hein
  0 siblings, 1 reply; 5+ messages in thread
From: David Woodhouse @ 2002-07-25 13:28 UTC (permalink / raw)
  To: Jörn Engel; +Cc: Steven Hein, linux-mtd

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Integrating new MTD/jffs2 into 2.4.18 kernel
  2002-07-25 13:28   ` David Woodhouse
@ 2002-07-25 15:45     ` Steven Hein
  2002-07-25 16:35       ` David Woodhouse
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Hein @ 2002-07-25 15:45 UTC (permalink / raw)
  To: linux-mtd

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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Integrating new MTD/jffs2 into 2.4.18 kernel
  2002-07-25 15:45     ` Steven Hein
@ 2002-07-25 16:35       ` David Woodhouse
  0 siblings, 0 replies; 5+ messages in thread
From: David Woodhouse @ 2002-07-25 16:35 UTC (permalink / raw)
  To: Steven Hein; +Cc: linux-mtd

ssh@sgi.com said:
>  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....) 

Copy CVS:mtd/include/linux/mtd/compatmac.h to linux/include/mtd/compatmac.h


--
dwmw2

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-07-25 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-25 12:25 Integrating new MTD/jffs2 into 2.4.18 kernel Steven Hein
2002-07-25 13:14 ` Jörn Engel
2002-07-25 13:28   ` David Woodhouse
2002-07-25 15:45     ` Steven Hein
2002-07-25 16:35       ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox