Re: [Yaffs] YAFFS on kernel 2.4

Startseite
Anhänge:
Nachricht
+ (text/plain)
Nachricht löschen
Nachricht beantworten
Autor: Ramesh Chaurasiya
Datum:  
To: Nick Bane
CC: Yaffs
Betreff: Re: [Yaffs] YAFFS on kernel 2.4
>> Hi,
>> In 2.4 series there is no patch available for kernel 2.4.25 for XScale.
>> You suggested to get 2.4.25, this time I took the following from 2.4.25
>> 1. entire "fs" directory
>Only fs/yaffs is needed there plus a config/makefile patch to use it.
> > 2. entire "driver/mtd/nand" directory
> It might be that more than the nand bit of mtd is required. To be honest I have forgotten how patched the mtd tree is. A diff against a stock kernel would help. I hope you aren't mixing mtd distros. They tend to go as a single unit. Onto what are you grafting it?


Oh for mtd I mixed up the things from 2.4.19 and 2.4.25, I'll try
taking entire mtd from 2.4.25

> > 3. whatever files that were required to get kernel compiled that
> > includes various header files, many files from "drivers/mtd" source
> > files from directory "lib" etc etc.
> >
> lib is slightly surprising.


That was required by crc related stuff.

> > Here also (after mounting yaffs partition) I am getting the same error
> > "cp: cannot create regular file `abc': Cannot allocate memory"
> > and finally "df" shows that there is no space on the NAND partition.
> >
> This must be an oob spare area problem. There may be "bad stuff" in the oob spare area that needs erasing. If you erase the nand completely and mount it (I hope its not your rootfs) there should be only lost+found and free space. If df shows lots spare then the problem is very probably a mismatch between ecc versions.


Yes this happens if I erase the entire partition and then mount
- df shows that entire partion is free (with lost+found directory) and then
- if I copy any data on to NAND partion it takes too much time and
eventually gives the error "cp: cannot create regular file `abc':
Cannot allocate memory" and then
- df shows entire partition is filled.

But here I am trying to get it without ecc support first!
I couldnt find the source for utils (mkyaffs) on
husaberg.toby-churchill.com and therefore I am using the one that I
downloaded from CVS some time back and made a change (initialization
of eccpos member as done in drivers/mtd/nand/nand.c) in two files
- utils/mkyaffs.c and
- fs/yaffs_mtdif.c as shown below

struct nand_oobinfo yaffs_oobinfo = {
    useecc: 1,
    //eccpos: {8, 9, 10, 13, 14, 15}
    eccpos: {0, 1, 2, 3, 6, 7}    //As initialized in drivers/mtd/nand/nand.c
};


Can mkyaffs be the problem here?
Could you please tell me from where I can get utils and hence mkyaffs
that is compatible with the 2.4.25 kernel source for balloon?


> > >From NAND flash point of view I am using the code from kernel 2.4.25,
> > which worked for you, so why its giving that error OR is there
> > anything which I am doing wrong? Please help me to fix it up.
> >
> This is indeed perplexing and should have nothing to do with pxa. Charles?



Thanks,
Ramesh





> > On 6/17/05, Nick Bane <> wrote:
> > > > Hi,
> > > > Source for kernel 2.4.19 is also there at husaberg.toby-churchill.com,
> > > > I am working on PXA 255 board with kernel 2.4.19 as no patches are
> > > > available for kernel 2.4.25 for XScale.
> > > > I got the NAND flash worked on 2.6 kernel (tried jffs2) but for some
> > > > reasons, I have to stick with the 2.4 kernel.
> > > >
> > > I haven't maitained 2.4.29 for a long while now. I consider ot
> > obsolete. However, I believe it to have worked fine with the
> > mtd/yaffs at that time.
> > >
> > > > I used 2.4.19 from the above site, I got YAFFS mounted successfully
> > > > command "df" shows entire partition is empty but if I copy any data on
> > > > to the NAND partition it takes too much time and finally gives error
> > > > message
> > > > "cp: cannot create regular file `abc': Cannot allocate memory"
> > > > Now "df" shows that there is no space on the device
> > > > Can any one help me out to fix it up.
> > > >
> > > Hmm. I remember that one. I am pretty sure it was fixed in
> > later versions of the kernel+yaffs.
> > >
> > >
> > > > The source that I got doing wget from husaberg.toby-churchill.com, has
> > > > few files missing and is not getting compiled therefore from that
> > > > source I used ...
> > > > 1. fs/yaffs
> > > > 2. mtd/mtdpart.c
> > > > 3. drivers/mtd/nand and
> > > > 4. required header files only (can this be the reason for?)
> > > > Is anywhere tar compressed archive available for same source?
> > > >
> > > I suggest trying a wget of the 2.4.25 series. The latest can be
> > downloaded via viewcvs and/or subversion.
> > >
> > >
> > >
> > > Nick