[Yaffs] YAFFS2 on Linux checked in
James Newell
jnewell@wgate.com
Fri, 17 Dec 2004 11:01:57 -0500
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_000_01C4E451.BC0C1990
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C4E451.BC0C1990"
------_=_NextPart_001_01C4E451.BC0C1990
Content-Type: text/plain;
charset="windows-1252"
Using the attached Makefile (for a Montavista 2.4.18 xscale kernel) from the
original yaffs Makefile.
I don't have the new MTD working with this kernel (I don't have a choice to
upgrade to a new kernel either). So, I patched the yaffs_fs.c file, and
only used the yaffs_mtdif.c (not sure if this will break anything yet).
It compiles now with warnings. I will look into the warnings first then
give it a try on my target machine.
I've included the small patch, and the Makefile (you will have to modify it
to work in your build system).
Jim Newell
[jnewell@ya yaffs2]$ make
xscale_be-gcc -c -D__KERNEL__ -DMODULE -DCONFIG_YAFFS_YAFFS2
-DCONFIG_YAFFS2_RAM_ENABLED -DCONFIG_YAFFS_MTD_ENABLED
-DCONFIG_YAFFS_USE_GENER
IC_RW -DCONFIG_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_USE_NANDECC
-DCONFIG_YAFFS_USE_OLD_MTD -I../../kernel/include -O2 -Wall yaffs_fs.c -o
yaffs_fs.o
yaffs_fs.c: In function `yaffs_internal_read_super':
yaffs_fs.c:1411: warning: unsigned int format, pointer arg (arg 2)
yaffs_fs.c:1412: warning: unsigned int format, pointer arg (arg 2)
yaffs_fs.c:1413: warning: unsigned int format, pointer arg (arg 2)
yaffs_fs.c:1414: warning: unsigned int format, pointer arg (arg 2)
yaffs_fs.c:1415: warning: unsigned int format, pointer arg (arg 2)
yaffs_fs.c:1512: warning: assignment from incompatible pointer type
yaffs_fs.c:1526: warning: assignment from incompatible pointer type
yaffs_fs.c:1296: warning: `dev' might be used uninitialized in this function
yaffs_fs.c: At top level:
yaffs_fs.c:1586: warning: `yaffs_internal_read_super_ram' defined but not
used
yaffs_fs.c:1590: warning: `yaffs_internal_read_super_mtd' defined but not
used
yaffs_fs.c:1595: warning: `yaffs2_internal_read_super_ram' defined but not
used
yaffs_fs.c:1599: warning: `yaffs2_internal_read_super_mtd' defined but not
used
yaffs_fs.c:1727: warning: `my_proc_ram_write_entry' defined but not used
yaffs_fs.c:1801: warning: `yaffs_proc_ram_write' defined but not used
xscale_be-gcc -c -D__KERNEL__ -DMODULE -DCONFIG_YAFFS_YAFFS2
-DCONFIG_YAFFS2_RAM_ENABLED -DCONFIG_YAFFS_MTD_ENABLED
-DCONFIG_YAFFS_USE_GENER
IC_RW -DCONFIG_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_USE_NANDECC
-DCONFIG_YAFFS_USE_OLD_MTD -I../../kernel/include -O2 -Wall yaffs_guts.c -
o yaffs_guts.o
yaffs_guts.c: In function `yaffs_FlushFilesChunkCache':
yaffs_guts.c:3491: warning: `lowest' might be used uninitialized in this
function
yaffs_guts.c:3494: warning: `chunkWritten' might be used uninitialized in
this function
yaffs_guts.c: At top level:
yaffs_guts.c:68: warning: `yaffs_CountBits' defined but not used
yaffs_guts.c:2015: warning: `yaffs_CheckObjectHashSanity' defined but not
used
yaffs_guts.c:598: warning: `yaffs_HandleReadDataError' defined but not used
yaffs_guts.c:584: warning: `yaffs_RewriteBufferedBlock' defined but not used
yaffs_guts.c:613: warning: `yaffs_CheckWrittenBlock' defined but not used
yaffs_guts.c:2313: warning: `yaffs_DumpBlockStats' defined but not used
xscale_be-gcc -c -D__KERNEL__ -DMODULE -DCONFIG_YAFFS_YAFFS2
-DCONFIG_YAFFS2_RAM_ENABLED -DCONFIG_YAFFS_MTD_ENABLED
-DCONFIG_YAFFS_USE_GENER
IC_RW -DCONFIG_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_USE_NANDECC
-DCONFIG_YAFFS_USE_OLD_MTD -I../../kernel/include -O2 -Wall yaffs_ramem.c
-o yaffs_ramem.o
xscale_be-gcc -c -D__KERNEL__ -DMODULE -DCONFIG_YAFFS_YAFFS2
-DCONFIG_YAFFS2_RAM_ENABLED -DCONFIG_YAFFS_MTD_ENABLED
-DCONFIG_YAFFS_USE_GENER
IC_RW -DCONFIG_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_USE_NANDECC
-DCONFIG_YAFFS_USE_OLD_MTD -I../../kernel/include -O2 -Wall yaffs_mtdif.c
-o yaffs_mtdif.o
xscale_be-gcc -c -D__KERNEL__ -DMODULE -DCONFIG_YAFFS_YAFFS2
-DCONFIG_YAFFS2_RAM_ENABLED -DCONFIG_YAFFS_MTD_ENABLED
-DCONFIG_YAFFS_USE_GENER
IC_RW -DCONFIG_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_USE_NANDECC
-DCONFIG_YAFFS_USE_OLD_MTD -I../../kernel/include -O2 -Wall yaffs_ecc.c -o
yaffs_ecc.o
xscale_be-gcc -c -D__KERNEL__ -DMODULE -DCONFIG_YAFFS_YAFFS2
-DCONFIG_YAFFS2_RAM_ENABLED -DCONFIG_YAFFS_MTD_ENABLED
-DCONFIG_YAFFS_USE_GENER
IC_RW -DCONFIG_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_USE_NANDECC
-DCONFIG_YAFFS_USE_OLD_MTD -I../../kernel/include -O2 -Wall yaffs_packedta
gs1.c -o yaffs_packedtags1.o
xscale_be-gcc -c -D__KERNEL__ -DMODULE -DCONFIG_YAFFS_YAFFS2
-DCONFIG_YAFFS2_RAM_ENABLED -DCONFIG_YAFFS_MTD_ENABLED
-DCONFIG_YAFFS_USE_GENER
IC_RW -DCONFIG_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_USE_NANDECC
-DCONFIG_YAFFS_USE_OLD_MTD -I../../kernel/include -O2 -Wall yaffs_packedta
gs2.c -o yaffs_packedtags2.o
yaffs_packedtags2.c: In function `yaffs_UnpackTags2':
yaffs_packedtags2.c:45: warning: passing arg 3 of `yaffs_ECCCorrectOther'
discards qualifiers from pointer target type
xscale_be-gcc -c -D__KERNEL__ -DMODULE -DCONFIG_YAFFS_YAFFS2
-DCONFIG_YAFFS2_RAM_ENABLED -DCONFIG_YAFFS_MTD_ENABLED
-DCONFIG_YAFFS_USE_GENER
IC_RW -DCONFIG_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_USE_NANDECC
-DCONFIG_YAFFS_USE_OLD_MTD -I../../kernel/include -O2 -Wall yaffs_ramem2k.
c -o yaffs_ramem2k.o
xscale_be-gcc -c -D__KERNEL__ -DMODULE -DCONFIG_YAFFS_YAFFS2
-DCONFIG_YAFFS2_RAM_ENABLED -DCONFIG_YAFFS_MTD_ENABLED
-DCONFIG_YAFFS_USE_GENER
IC_RW -DCONFIG_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_USE_NANDECC
-DCONFIG_YAFFS_USE_OLD_MTD -I../../kernel/include -O2 -Wall yaffs_tagscomp
at.c -o yaffs_tagscompat.o
yaffs_tagscompat.c:484: warning: `yaffs_CheckWrittenBlock' defined but not
used
yaffs_tagscompat.c:488: warning: `yaffs_HandleWriteChunkOk' defined but not
used
yaffs_tagscompat.c:492: warning: `yaffs_HandleUpdateChunk' defined but not
used
yaffs_tagscompat.c:496: warning: `yaffs_HandleWriteChunkError' defined but
not used
yaffs_tagscompat.c:311: warning: `yaffs_CheckChunkErased' defined but not
used
yaffs_tagscompat.c:509: warning: `yaffs_VerifyCompare' defined but not used
xscale_be-ld -r yaffs_fs.o yaffs_guts.o yaffs_ramem.o yaffs_mtdif.o
yaffs_ecc.o yaffs_packedtags1.o yaffs_packedtags2.o yaffs_ramem2k.o yaff
s_tagscompat.o -o yaffs2.o
mkdir -p /usr/proj/ojopvp/dev_jnewell/utils/install-bin
cp -p yaffs2.o /usr/proj/ojopvp/dev_jnewell/utils/install-bin
-----Original Message-----
From: Charles Manning [mailto:manningc2@actrix.gen.nz]
Sent: Thursday, December 16, 2004 11:47 PM
To: yaffs@lists.aleph1.co.uk
Subject: [Yaffs] YAFFS2 on Linux checked in
The YAFFS2 for Linux stuff to work with mtd is now checked in.
I have tested this with a mtd "device" that is actually ram dressed up to
look like nand.
Let the sports begin!
-- Charles
_______________________________________________
yaffs mailing list
yaffs@stoneboat.aleph1.co.uk
http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.804 / Virus Database: 546 - Release Date: 11/30/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.804 / Virus Database: 546 - Release Date: 11/30/2004
------_=_NextPart_001_01C4E451.BC0C1990
Content-Type: text/html;
charset="windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dwindows-1252">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Yaffs] YAFFS2 on Linux checked in</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Using the attached Makefile (for a Montavista 2.4.18 =
xscale kernel) from the original yaffs Makefile.</FONT>
<BR><FONT SIZE=3D2>I don't have the new MTD working with this kernel (I =
don't have a choice to upgrade to a new kernel either). So, I =
patched the yaffs_fs.c file, and only used the yaffs_mtdif.c (not sure =
if this will break anything yet). </FONT></P>
<P><FONT SIZE=3D2>It compiles now with warnings. I will look into =
the warnings first then give it a try on my target machine.</FONT>
</P>
<P><FONT SIZE=3D2>I've included the small patch, and the Makefile (you =
will have to modify it to work in your build system).</FONT>
</P>
<P><FONT SIZE=3D2>Jim Newell</FONT>
</P>
<P><FONT SIZE=3D2>[jnewell@ya yaffs2]$ make</FONT>
<BR><FONT SIZE=3D2>xscale_be-gcc -c -D__KERNEL__ -DMODULE =
-DCONFIG_YAFFS_YAFFS2 -DCONFIG_YAFFS2_RAM_ENABLED =
-DCONFIG_YAFFS_MTD_ENABLED -DCONFIG_YAFFS_USE_GENER</FONT></P>
<P><FONT SIZE=3D2>IC_RW -DCONFIG_SHORT_NAMES_IN_RAM =
-DCONFIG_YAFFS_USE_NANDECC -DCONFIG_YAFFS_USE_OLD_MTD =
-I../../kernel/include -O2 -Wall yaffs_fs.c -o</FONT></P>
<P><FONT SIZE=3D2>yaffs_fs.o</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c: In function =
`yaffs_internal_read_super':</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1411: warning: unsigned int format, =
pointer arg (arg 2)</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1412: warning: unsigned int format, =
pointer arg (arg 2)</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1413: warning: unsigned int format, =
pointer arg (arg 2)</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1414: warning: unsigned int format, =
pointer arg (arg 2)</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1415: warning: unsigned int format, =
pointer arg (arg 2)</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1512: warning: assignment from =
incompatible pointer type</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1526: warning: assignment from =
incompatible pointer type</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1296: warning: `dev' might be used =
uninitialized in this function</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c: At top level:</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1586: warning: =
`yaffs_internal_read_super_ram' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1590: warning: =
`yaffs_internal_read_super_mtd' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1595: warning: =
`yaffs2_internal_read_super_ram' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1599: warning: =
`yaffs2_internal_read_super_mtd' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1727: warning: `my_proc_ram_write_entry' =
defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_fs.c:1801: warning: `yaffs_proc_ram_write' =
defined but not used</FONT>
<BR><FONT SIZE=3D2>xscale_be-gcc -c -D__KERNEL__ -DMODULE =
-DCONFIG_YAFFS_YAFFS2 -DCONFIG_YAFFS2_RAM_ENABLED =
-DCONFIG_YAFFS_MTD_ENABLED -DCONFIG_YAFFS_USE_GENER</FONT></P>
<P><FONT SIZE=3D2>IC_RW -DCONFIG_SHORT_NAMES_IN_RAM =
-DCONFIG_YAFFS_USE_NANDECC -DCONFIG_YAFFS_USE_OLD_MTD =
-I../../kernel/include -O2 -Wall yaffs_guts.c -</FONT></P>
<P><FONT SIZE=3D2>o yaffs_guts.o</FONT>
<BR><FONT SIZE=3D2>yaffs_guts.c: In function =
`yaffs_FlushFilesChunkCache':</FONT>
<BR><FONT SIZE=3D2>yaffs_guts.c:3491: warning: `lowest' might be used =
uninitialized in this function</FONT>
<BR><FONT SIZE=3D2>yaffs_guts.c:3494: warning: `chunkWritten' might be =
used uninitialized in this function</FONT>
<BR><FONT SIZE=3D2>yaffs_guts.c: At top level:</FONT>
<BR><FONT SIZE=3D2>yaffs_guts.c:68: warning: `yaffs_CountBits' defined =
but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_guts.c:2015: warning: =
`yaffs_CheckObjectHashSanity' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_guts.c:598: warning: =
`yaffs_HandleReadDataError' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_guts.c:584: warning: =
`yaffs_RewriteBufferedBlock' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_guts.c:613: warning: `yaffs_CheckWrittenBlock' =
defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_guts.c:2313: warning: `yaffs_DumpBlockStats' =
defined but not used</FONT>
<BR><FONT SIZE=3D2>xscale_be-gcc -c -D__KERNEL__ -DMODULE =
-DCONFIG_YAFFS_YAFFS2 -DCONFIG_YAFFS2_RAM_ENABLED =
-DCONFIG_YAFFS_MTD_ENABLED -DCONFIG_YAFFS_USE_GENER</FONT></P>
<P><FONT SIZE=3D2>IC_RW -DCONFIG_SHORT_NAMES_IN_RAM =
-DCONFIG_YAFFS_USE_NANDECC -DCONFIG_YAFFS_USE_OLD_MTD =
-I../../kernel/include -O2 -Wall yaffs_ramem.c</FONT></P>
<P><FONT SIZE=3D2>-o yaffs_ramem.o</FONT>
<BR><FONT SIZE=3D2>xscale_be-gcc -c -D__KERNEL__ -DMODULE =
-DCONFIG_YAFFS_YAFFS2 -DCONFIG_YAFFS2_RAM_ENABLED =
-DCONFIG_YAFFS_MTD_ENABLED -DCONFIG_YAFFS_USE_GENER</FONT></P>
<P><FONT SIZE=3D2>IC_RW -DCONFIG_SHORT_NAMES_IN_RAM =
-DCONFIG_YAFFS_USE_NANDECC -DCONFIG_YAFFS_USE_OLD_MTD =
-I../../kernel/include -O2 -Wall yaffs_mtdif.c</FONT></P>
<P><FONT SIZE=3D2>-o yaffs_mtdif.o</FONT>
<BR><FONT SIZE=3D2>xscale_be-gcc -c -D__KERNEL__ -DMODULE =
-DCONFIG_YAFFS_YAFFS2 -DCONFIG_YAFFS2_RAM_ENABLED =
-DCONFIG_YAFFS_MTD_ENABLED -DCONFIG_YAFFS_USE_GENER</FONT></P>
<P><FONT SIZE=3D2>IC_RW -DCONFIG_SHORT_NAMES_IN_RAM =
-DCONFIG_YAFFS_USE_NANDECC -DCONFIG_YAFFS_USE_OLD_MTD =
-I../../kernel/include -O2 -Wall yaffs_ecc.c -o</FONT></P>
<P><FONT SIZE=3D2> yaffs_ecc.o</FONT>
<BR><FONT SIZE=3D2>xscale_be-gcc -c -D__KERNEL__ -DMODULE =
-DCONFIG_YAFFS_YAFFS2 -DCONFIG_YAFFS2_RAM_ENABLED =
-DCONFIG_YAFFS_MTD_ENABLED -DCONFIG_YAFFS_USE_GENER</FONT></P>
<P><FONT SIZE=3D2>IC_RW -DCONFIG_SHORT_NAMES_IN_RAM =
-DCONFIG_YAFFS_USE_NANDECC -DCONFIG_YAFFS_USE_OLD_MTD =
-I../../kernel/include -O2 -Wall yaffs_packedta</FONT></P>
<P><FONT SIZE=3D2>gs1.c -o yaffs_packedtags1.o</FONT>
<BR><FONT SIZE=3D2>xscale_be-gcc -c -D__KERNEL__ -DMODULE =
-DCONFIG_YAFFS_YAFFS2 -DCONFIG_YAFFS2_RAM_ENABLED =
-DCONFIG_YAFFS_MTD_ENABLED -DCONFIG_YAFFS_USE_GENER</FONT></P>
<P><FONT SIZE=3D2>IC_RW -DCONFIG_SHORT_NAMES_IN_RAM =
-DCONFIG_YAFFS_USE_NANDECC -DCONFIG_YAFFS_USE_OLD_MTD =
-I../../kernel/include -O2 -Wall yaffs_packedta</FONT></P>
<P><FONT SIZE=3D2>gs2.c -o yaffs_packedtags2.o</FONT>
<BR><FONT SIZE=3D2>yaffs_packedtags2.c: In function =
`yaffs_UnpackTags2':</FONT>
<BR><FONT SIZE=3D2>yaffs_packedtags2.c:45: warning: passing arg 3 of =
`yaffs_ECCCorrectOther' discards qualifiers from pointer target =
type</FONT>
<BR><FONT SIZE=3D2>xscale_be-gcc -c -D__KERNEL__ -DMODULE =
-DCONFIG_YAFFS_YAFFS2 -DCONFIG_YAFFS2_RAM_ENABLED =
-DCONFIG_YAFFS_MTD_ENABLED -DCONFIG_YAFFS_USE_GENER</FONT></P>
<P><FONT SIZE=3D2>IC_RW -DCONFIG_SHORT_NAMES_IN_RAM =
-DCONFIG_YAFFS_USE_NANDECC -DCONFIG_YAFFS_USE_OLD_MTD =
-I../../kernel/include -O2 -Wall yaffs_ramem2k.</FONT></P>
<P><FONT SIZE=3D2>c -o yaffs_ramem2k.o</FONT>
<BR><FONT SIZE=3D2>xscale_be-gcc -c -D__KERNEL__ -DMODULE =
-DCONFIG_YAFFS_YAFFS2 -DCONFIG_YAFFS2_RAM_ENABLED =
-DCONFIG_YAFFS_MTD_ENABLED -DCONFIG_YAFFS_USE_GENER</FONT></P>
<P><FONT SIZE=3D2>IC_RW -DCONFIG_SHORT_NAMES_IN_RAM =
-DCONFIG_YAFFS_USE_NANDECC -DCONFIG_YAFFS_USE_OLD_MTD =
-I../../kernel/include -O2 -Wall yaffs_tagscomp</FONT></P>
<P><FONT SIZE=3D2>at.c -o yaffs_tagscompat.o</FONT>
<BR><FONT SIZE=3D2>yaffs_tagscompat.c:484: warning: =
`yaffs_CheckWrittenBlock' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_tagscompat.c:488: warning: =
`yaffs_HandleWriteChunkOk' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_tagscompat.c:492: warning: =
`yaffs_HandleUpdateChunk' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_tagscompat.c:496: warning: =
`yaffs_HandleWriteChunkError' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_tagscompat.c:311: warning: =
`yaffs_CheckChunkErased' defined but not used</FONT>
<BR><FONT SIZE=3D2>yaffs_tagscompat.c:509: warning: =
`yaffs_VerifyCompare' defined but not used</FONT>
<BR><FONT SIZE=3D2>xscale_be-ld -r yaffs_fs.o yaffs_guts.o =
yaffs_ramem.o yaffs_mtdif.o yaffs_ecc.o yaffs_packedtags1.o =
yaffs_packedtags2.o yaffs_ramem2k.o yaff</FONT></P>
<P><FONT SIZE=3D2>s_tagscompat.o -o yaffs2.o</FONT>
<BR><FONT SIZE=3D2>mkdir -p =
/usr/proj/ojopvp/dev_jnewell/utils/install-bin</FONT>
<BR><FONT SIZE=3D2>cp -p yaffs2.o =
/usr/proj/ojopvp/dev_jnewell/utils/install-bin </FONT>
</P>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Charles Manning [<A =
HREF=3D"mailto:manningc2@actrix.gen.nz">mailto:manningc2@actrix.gen.nz</=
A>] </FONT>
<BR><FONT SIZE=3D2>Sent: Thursday, December 16, 2004 11:47 PM</FONT>
<BR><FONT SIZE=3D2>To: yaffs@lists.aleph1.co.uk</FONT>
<BR><FONT SIZE=3D2>Subject: [Yaffs] YAFFS2 on Linux checked in</FONT>
</P>
<P><FONT SIZE=3D2>The YAFFS2 for Linux stuff to work with mtd is now =
checked in.</FONT>
</P>
<P><FONT SIZE=3D2>I have tested this with a mtd "device" that =
is actually ram dressed up to look like nand.</FONT>
</P>
<P><FONT SIZE=3D2>Let the sports begin!</FONT>
</P>
<P><FONT SIZE=3D2>-- Charles</FONT>
</P>
<P><FONT =
SIZE=3D2>_______________________________________________</FONT>
<BR><FONT SIZE=3D2>yaffs mailing list</FONT>
<BR><FONT SIZE=3D2>yaffs@stoneboat.aleph1.co.uk</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs" =
TARGET=3D"_blank">http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo=
/yaffs</A></FONT>
</P>
<P><FONT SIZE=3D2>---</FONT>
<BR><FONT SIZE=3D2>Incoming mail is certified Virus Free.</FONT>
<BR><FONT SIZE=3D2>Checked by AVG anti-virus system (<A =
HREF=3D"http://www.grisoft.com" =
TARGET=3D"_blank">http://www.grisoft.com</A>).</FONT>
<BR><FONT SIZE=3D2>Version: 6.0.804 / Virus Database: 546 - Release =
Date: 11/30/2004</FONT>
<BR><FONT SIZE=3D2> </FONT>
<BR>
<BR><FONT SIZE=3D2>---<BR>
Outgoing mail is certified Virus Free.<BR>
Checked by AVG anti-virus system (<A HREF=3D"http://www.grisoft.com" =
TARGET=3D"_blank">http://www.grisoft.com</A>).<BR>
Version: 6.0.804 / Virus Database: 546 - Release Date: 11/30/2004<BR>
</FONT>
<BR><FONT SIZE=3D2> </FONT>=20
</P>
<P><FONT FACE=3D"Arial" SIZE=3D2 COLOR=3D"#000000"></FONT><FONT =
FACE=3D"Arial" SIZE=3D2 COLOR=3D"#000000"></FONT>
</BODY>
</HTML>
------_=_NextPart_001_01C4E451.BC0C1990--
------_=_NextPart_000_01C4E451.BC0C1990
Content-Type: application/octet-stream;
name="Makefile"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="Makefile"
#Makefile for YAFFS as a module=0A=
#=0A=
# NB this is not yet suitable for putting into the kernel tree.=0A=
# YAFFS: Yet another FFS. A NAND-flash specific file system. =0A=
#=0A=
# Copyright (C) 2002 Aleph One Ltd.=0A=
# for Toby Churchill Ltd and Brightstar Engineering=0A=
#=0A=
# Created by Charles Manning <charles@aleph1.co.uk>=0A=
#=0A=
# This program is free software; you can redistribute it and/or =
modify=0A=
# it under the terms of the GNU General Public License version 2 as=0A=
# published by the Free Software Foundation.=0A=
#=0A=
# $Id: Makefile,v 1.2 2004/08/12 21:29:27 jwurtz Exp $=0A=
#=0A=
=0A=
## Change or override KERNELDIR to your kernel=0A=
## comment out USE_xxxx if you don't want these features.=0A=
=0A=
KERNELDIR =3D ../../kernel=0A=
=0A=
=0A=
REVHOME :=3D ../../..=0A=
USES =3D $(REVHOME)/uses=0A=
include $(USES)=0A=
=0A=
FLASHIU_TOOLS_D =3D $(REVHOME)/utils/install-bin=0A=
=0A=
## Change if you are using a cross-compiler=0A=
MAKETOOLS =3D xscale_be-=0A=
=0A=
CC=3D$(MAKETOOLS)gcc=0A=
LD=3D$(MAKETOOLS)ld=0A=
=0A=
# Configurations...=0A=
# Comment out the stuff you don't want.=0A=
#=0A=
=0A=
# CONFIG_YAFFS_YAFFS2=0A=
USE_YAFFS_VERSION =3D -DCONFIG_YAFFS_YAFFS2=0A=
=0A=
# CONFIG_YAFFS_RAM_ENABLED.=0A=
# This adds the yaffsram file system support. Nice for testing on x86, =
but uses 2MB of RAM.=0A=
# Don't enable for NAND-based targets.=0A=
=0A=
USE_RAM_FOR_TEST =3D -DCONFIG_YAFFS2_RAM_ENABLED=0A=
=0A=
=0A=
# CONFIG_YAFFS_MTD_ENABLED.=0A=
# This adds the yaffs file system support for working with a NAND =
mtd.=0A=
=0A=
USE_MTD =3D -DCONFIG_YAFFS_MTD_ENABLED=0A=
=0A=
# CONFIG_YAFFS_USE_OLD_MTD=0A=
# Enable this to use the old MTD stuff that did not have yaffs =
support.=0A=
# You can use this to get around compilation problems, but the best=0A=
# thing to do is to upgrade your MTD support. You will get better =
speed.=0A=
=0A=
USE_OLD_MTD =3D -DCONFIG_YAFFS_USE_OLD_MTD=0A=
=0A=
USE_MTDIF =3D yaffs_mtdif.o=0A=
=0A=
# CONFIG_YAFFS_USE_NANDECC=0A=
# This enables the ECC functions of the generic MTD-NAND driver.=0A=
# This will not work if you are using the old mtd.=0A=
#=0A=
# NB UseNANDECC does not work at present with yaffsram.=0A=
=0A=
USE_NANDECC =3D -DCONFIG_YAFFS_USE_NANDECC=0A=
=0A=
# CONFIG_YAFFS_ECC_WRONG_ORDER=0A=
# This makes yaffs_ecc.c use the same ecc byte order as=0A=
# Steven Hill's nand_ecc.c. If not set, then you get the=0A=
# same ecc byte order as SmartMedia.=0A=
=0A=
#USE_WRONGECC =3D -DCONFIG_YAFFS_ECC_WRONG_ORDER=0A=
=0A=
# CONFIG_YAFFS_USE_GENERIC_RW=0A=
# Use generic_read/generic_write for reading/writing files. This =
enables the use of the Linux=0A=
# file caching layer.=0A=
#=0A=
# If you disable this, then caching is disabled and file read/write is =
direct.=0A=
=0A=
USE_GENERIC_RW =3D -DCONFIG_YAFFS_USE_GENERIC_RW=0A=
=0A=
# CONFIG_YAFFS_USE_HEADER_FILE_SIZE=0A=
# When the flash is scanned, two file sizes are constructed:=0A=
# * The size taken from the object header for the file.=0A=
# * The size figured out by scanning the data chunks.=0A=
# If this option is enabled, then the object header size is used, =
otherwise the scanned size is used.=0A=
# Suggest leaving this disabled.=0A=
=0A=
#USE_HEADER_FILE_SIZE =3D -DCONFIG_YAFFS_USE_HEADER_FILE_SIZE=0A=
=0A=
#CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK=0A=
# Enabling this turns off the test that chunks are erased in flash =
before writing to them.=0A=
# this is safe, since the write verification will fail.=0A=
# Suggest enabling the test (ie. keep the following line commented) =
during development to help debug things.=0A=
=0A=
#IGNORE_CHUNK_ERASED =3D -DCONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK=0A=
=0A=
#CONFIG_YAFFS_DISABLE_WRITE_VERIFY=0A=
# I am severely reluctant to provide this config. Disabling the =
verification is not a good thing to do=0A=
# since NAND writes can fail silently.=0A=
# Disabling the write verification will cause your teeth to rot, rats =
to eat your corn and give you split ends.=0A=
# You have been warned. ie. Don't uncomment the following line.=0A=
=0A=
#IGNORE_WRITE_VERIFY =3D -DCONFIG_YAFFS_DISBLE_WRITE_VERIFY=0A=
=0A=
#CONFIG_YAFFS_SHORT_NAMES_IN_RAM=0A=
# If this config is set, then short names are stored with the =
yaffs_Object=0A=
# This costs an extra 16 bytes of RAM per object, but makes look-ups =
faster.=0A=
=0A=
ENABLE_SHORT_NAMES_IN_RAM =3D -DCONFIG_SHORT_NAMES_IN_RAM=0A=
=0A=
# End of configuration options.=0A=
=0A=
YAFFS_CONFIGS =3D $(USE_YAFFS_VERSION) \=0A=
$(USE_RAM_FOR_TEST) \=0A=
$(USE_MTD) \=0A=
$(USE_GENERIC_RW) \=0A=
$(USE_HEADER_FILE_SIZE) \=0A=
$(IGNORE_CHUNK_ERASED) \=0A=
$(IGNORE_WRITE_VERIFY) \=0A=
$(ENABLE_SHORT_NAMES_IN_RAM) \=0A=
$(USE_NANDECC) \=0A=
$(USE_OLD_MTD) \=0A=
$(USE_WRONGECC)=0A=
=0A=
CFLAGS =3D -D__KERNEL__ -DMODULE $(YAFFS_CONFIGS) =
-I$(KERNELDIR)/include -O2 -Wall=0A=
=0A=
=0A=
OBJS =3D yaffs_fs.o \=0A=
yaffs_guts.o \=0A=
yaffs_ramem.o \=0A=
$(USE_MTDIF) \=0A=
yaffs_ecc.o \=0A=
yaffs_packedtags1.o \=0A=
yaffs_packedtags2.o \=0A=
yaffs_ramem2k.o \=0A=
yaffs_tagscompat.o=0A=
=0A=
install: all=0A=
mkdir -p $(FLASHIU_TOOLS_D)=0A=
cp -p yaffs2.o $(FLASHIU_TOOLS_D)=0A=
=0A=
all: yaffs2.o=0A=
=0A=
$(OBJS): %.o: %.c Makefile=0A=
$(CC) -c $(CFLAGS) $< -o $@=0A=
=0A=
yaffs2.o: $(OBJS)=0A=
$(LD) -r $(OBJS) -o $@=0A=
=0A=
clean:=0A=
rm -f $(OBJS) corei yaffs2.o=0A=
=0A=
------_=_NextPart_000_01C4E451.BC0C1990
Content-Type: application/octet-stream;
name="yaffs_fs.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="yaffs_fs.diff"
Index: yaffs_fs.c=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /home/aleph1/cvs/yaffs2/yaffs_fs.c,v=0A=
retrieving revision 1.1=0A=
diff -c -r1.1 yaffs_fs.c=0A=
*** yaffs_fs.c 17 Dec 2004 04:39:04 -0000 1.1=0A=
--- yaffs_fs.c 17 Dec 2004 15:58:28 -0000=0A=
***************=0A=
*** 1413,1420 ****=0A=
T(YAFFS_TRACE_OS,(" write %x\n",mtd->write));=0A=
T(YAFFS_TRACE_OS,(" readoob %x\n",mtd->read_oob));=0A=
T(YAFFS_TRACE_OS,(" writeoob %x\n",mtd->write_oob));=0A=
! T(YAFFS_TRACE_OS,(" block_isbad %x\n",mtd->block_isbad));=0A=
T(YAFFS_TRACE_OS,(" block_markbad %x\n",mtd->block_markbad));=0A=
T(YAFFS_TRACE_OS,(" oobblock %d\n",mtd->oobblock));=0A=
T(YAFFS_TRACE_OS,(" oobsize %d\n",mtd->oobsize));=0A=
T(YAFFS_TRACE_OS,(" erasesize %d\n",mtd->erasesize));=0A=
--- 1413,1422 ----=0A=
T(YAFFS_TRACE_OS,(" write %x\n",mtd->write));=0A=
T(YAFFS_TRACE_OS,(" readoob %x\n",mtd->read_oob));=0A=
T(YAFFS_TRACE_OS,(" writeoob %x\n",mtd->write_oob));=0A=
! #ifndef CONFIG_YAFFS_USE_OLD_MTD =0A=
! T(YAFFS_TRACE_OS,(" block_isbad %x\n",mtd->block_isbad));=0A=
T(YAFFS_TRACE_OS,(" block_markbad %x\n",mtd->block_markbad));=0A=
+ #endif=0A=
T(YAFFS_TRACE_OS,(" oobblock %d\n",mtd->oobblock));=0A=
T(YAFFS_TRACE_OS,(" oobsize %d\n",mtd->oobsize));=0A=
T(YAFFS_TRACE_OS,(" erasesize %d\n",mtd->erasesize));=0A=
***************=0A=
*** 1424,1431 ****=0A=
--- 1426,1435 ----=0A=
{=0A=
// Check for version 2 style functions=0A=
if(!mtd->erase ||=0A=
+ #ifndef CONFIG_YAFFS_USE_OLD_MTD=0A=
!mtd->block_isbad ||=0A=
!mtd->block_markbad ||=0A=
+ #endif=0A=
!mtd->read ||=0A=
!mtd->write ||=0A=
#ifndef CONFIG_YAFFS_USE_OLD_MTD=0A=
------_=_NextPart_000_01C4E451.BC0C1990--