public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* jffs2 and nand mtd
@ 2005-08-11  7:31 Alex Karev
  2005-08-11  7:39 ` Artem B. Bityuckiy
  2005-08-11  8:33 ` David Woodhouse
  0 siblings, 2 replies; 11+ messages in thread
From: Alex Karev @ 2005-08-11  7:31 UTC (permalink / raw)
  To: linux-mtd

Hello

While we mount empty jffs2 and then copying  files it's ok, after 
remount/reboot. the files have zero gaps ~2kb at some (stable?) 
locations, and filesytem is broken that way.
install procedure following:

#flash_eraseall -j /dev/mtd0
#mount -t jffs2 /dev/mtdblock0 /mnt
#cp ...
    at this stage files looks ok.
#umount
#mount
    zero gaps appear in data on flash and lot of debug info with some 
Eeps, sometimes kernel panic.


Also we try to use mkfs.jffs2, same result.

#mkfs.jffs2 -e 0x4000 -l -n ....     or #mkfs.jffs2 -e 0x4000 -p -l -n 
.... with different variations.

#flash_eraseall -j /dev/mtd0
#nandwrite -j /dev/mtd0 root_fs.jffs2
#mount ...
#umount ...
#mount ...
... usually have debug output, sometimes kernel panic.

Hardware:
ST VEGA PC.
General SW BIOS with extension.
SAMSUNG NAND K9F2808U0C. ports: 0x300 data, 0x301 cmd; erase block 16Kb 
according documentation. no ecc 16Mb

Software:
Our NAND driver implementation, derived from edb7312.c
2 partition
Linux kernel 2.4.29 with patch from mtd c vs.

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

* Re: jffs2 and nand mtd
  2005-08-11  7:31 jffs2 and nand mtd Alex Karev
@ 2005-08-11  7:39 ` Artem B. Bityuckiy
  2005-08-11  8:07   ` Alex Karev
  2005-08-11  8:33 ` David Woodhouse
  1 sibling, 1 reply; 11+ messages in thread
From: Artem B. Bityuckiy @ 2005-08-11  7:39 UTC (permalink / raw)
  To: Alex Karev; +Cc: linux-mtd

On Thu, 2005-08-11 at 11:31 +0400, Alex Karev wrote:
> Hello
> 
> While we mount empty jffs2 and then copying  files it's ok, after 
> remount/reboot. the files have zero gaps ~2kb at some (stable?) 
> locations, and filesytem is broken that way.
> install procedure following:
> 
> #flash_eraseall -j /dev/mtd0
> #mount -t jffs2 /dev/mtdblock0 /mnt
> #cp ...
>     at this stage files looks ok.
> #umount
> #mount
>     zero gaps appear in data on flash and lot of debug info with some 
> Eeps, sometimes kernel panic.
Hmm, could you please report which MTD snapshot do you use (date) ?

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

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

* Re: jffs2 and nand mtd
  2005-08-11  7:39 ` Artem B. Bityuckiy
@ 2005-08-11  8:07   ` Alex Karev
  2005-08-11  8:29     ` Artem B. Bityuckiy
  0 siblings, 1 reply; 11+ messages in thread
From: Alex Karev @ 2005-08-11  8:07 UTC (permalink / raw)
  To: dedekind; +Cc: linux-mtd

Artem B. Bityuckiy wrote:

>On Thu, 2005-08-11 at 11:31 +0400, Alex Karev wrote:
>  
>
>>Hello
>>
>>While we mount empty jffs2 and then copying  files it's ok, after 
>>remount/reboot. the files have zero gaps ~2kb at some (stable?) 
>>locations, and filesytem is broken that way.
>>install procedure following:
>>
>>#flash_eraseall -j /dev/mtd0
>>#mount -t jffs2 /dev/mtdblock0 /mnt
>>#cp ...
>>    at this stage files looks ok.
>>#umount
>>#mount
>>    zero gaps appear in data on flash and lot of debug info with some 
>>Eeps, sometimes kernel panic.
>>    
>>
>Hmm, could you please report which MTD snapshot do you use (date) ?
>
>  
>
We don't know how to find real date of snapshot but
we follow stages for 2.4 kernels mentioned in 
http://www.linux-mtd.infradead.org/source.html#kernelversions

/...
cd mtd/
/cvs update -dP -D 2005-03-04

And then apply some patch which we found at list archive to make  
*getlink* works for JFFS2.



/

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

* Re: jffs2 and nand mtd
  2005-08-11  8:07   ` Alex Karev
@ 2005-08-11  8:29     ` Artem B. Bityuckiy
  2005-08-11  8:32       ` Artem B. Bityuckiy
                         ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Artem B. Bityuckiy @ 2005-08-11  8:29 UTC (permalink / raw)
  To: Alex Karev; +Cc: linux-mtd

On Thu, 2005-08-11 at 12:07 +0400, Alex Karev wrote:
> We don't know how to find real date of snapshot but
> we follow stages for 2.4 kernels mentioned in 
> http://www.linux-mtd.infradead.org/source.html#kernelversions
> 
> /...
> cd mtd/
> /cvs update -dP -D 2005-03-04
> 
> And then apply some patch which we found at list archive to make  
> *getlink* works for JFFS2.
> 
Well, there is a note that this snapshot doesn't have to work:

"NOTE: That is just a snapshot. It isn't a release version or a branch;
it's known to be broken in ways which will corrupt data, and we don't
care. The bugs got fixed later but the patches will never be backported.
The date quoted just happens to be the date at which the unstable
development tree was last observed to compile for the ancient 2.4
kernel. You should not use it, and you should not expect it to work."

Gaps in files sound very odd - I didn't ever observe this. If you're
able to:

1. enable JFFS3 debugging level 1
2. copy as few as possible files to your flash which is enough just to
reproduce the problem.
3. mount / umount
4. gather *all* the JFFS2 output, not just the last messages (from
dmesg).


I'll glance at this. But in general me (and most MTD folks I know) are
*not* interested in digging old MTD/JFFS2.

The best would be if you would adopt the *latest* MTD snapshot to your
kernel. Martin Egholm Nielsen <martin@egholm-nielsen.dk> recently ported
the latest MTD snapshot to a 2.4 kernel. You may ask him for a
patch/help.

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

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

* Re: jffs2 and nand mtd
  2005-08-11  8:29     ` Artem B. Bityuckiy
@ 2005-08-11  8:32       ` Artem B. Bityuckiy
  2005-08-11  8:35       ` Thomas Gleixner
  2005-08-11  9:42       ` Martin Egholm Nielsen
  2 siblings, 0 replies; 11+ messages in thread
From: Artem B. Bityuckiy @ 2005-08-11  8:32 UTC (permalink / raw)
  To: Alex Karev; +Cc: linux-mtd

> 1. enable JFFS3 debugging level 1
Oops, surely JFFS2, not JFFS3 :-) 

-- 
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.

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

* Re: jffs2 and nand mtd
  2005-08-11  7:31 jffs2 and nand mtd Alex Karev
  2005-08-11  7:39 ` Artem B. Bityuckiy
@ 2005-08-11  8:33 ` David Woodhouse
  1 sibling, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2005-08-11  8:33 UTC (permalink / raw)
  To: Alex Karev; +Cc: linux-mtd

On Thu, 2005-08-11 at 11:31 +0400, Alex Karev wrote:
> Linux kernel 2.4.29 with patch from mtd c vs.

NAND flash is not supported on the 2.4 kernel. Please update to a
current kernel.

-- 
dwmw2

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

* Re: jffs2 and nand mtd
  2005-08-11  8:29     ` Artem B. Bityuckiy
  2005-08-11  8:32       ` Artem B. Bityuckiy
@ 2005-08-11  8:35       ` Thomas Gleixner
  2005-08-11  9:58         ` Alex Karev
  2005-08-11  9:42       ` Martin Egholm Nielsen
  2 siblings, 1 reply; 11+ messages in thread
From: Thomas Gleixner @ 2005-08-11  8:35 UTC (permalink / raw)
  To: dedekind; +Cc: Alex Karev, linux-mtd

On Thu, 2005-08-11 at 12:29 +0400, Artem B. Bityuckiy wrote:

> 1. enable JFFS3 debugging level 1
> 2. copy as few as possible files to your flash which is enough just to
> reproduce the problem.

After unmount, please create a dump of your FLASH partition with
nanddump and put it somewhere for download.

tglx

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

* Re: jffs2 and nand mtd
  2005-08-11  8:29     ` Artem B. Bityuckiy
  2005-08-11  8:32       ` Artem B. Bityuckiy
  2005-08-11  8:35       ` Thomas Gleixner
@ 2005-08-11  9:42       ` Martin Egholm Nielsen
  2005-08-11 14:42         ` Gianluca
  2 siblings, 1 reply; 11+ messages in thread
From: Martin Egholm Nielsen @ 2005-08-11  9:42 UTC (permalink / raw)
  To: linux-mtd

Hi Alex,

>>We don't know how to find real date of snapshot but
>>we follow stages for 2.4 kernels mentioned in 
>>http://www.linux-mtd.infradead.org/source.html#kernelversions
>>
>>/...
>>cd mtd/
>>/cvs update -dP -D 2005-03-04
>>
>>And then apply some patch which we found at list archive to make  
>>*getlink* works for JFFS2.
> Well, there is a note that this snapshot doesn't have to work:
--- 8< 8< 8< ---
> I'll glance at this. But in general me (and most MTD folks I know) are
> *not* interested in digging old MTD/JFFS2.

> The best would be if you would adopt the *latest* MTD snapshot to your
> kernel. Martin Egholm Nielsen <martin@egholm-nielsen.dk> recently ported
> the latest MTD snapshot to a 2.4 kernel. You may ask him for a
> patch/help.
I'll help - I don't think I can create a patch that'll work directly, so 
let's see if we can get CVS HEAD up and running - step by step...

1 )Start by fetching the source from CVS 
(http://www.linux-mtd.infradead.org/source.html)

2) Patch it in - enter the patches directory and run the patchin.sh 
script...

3) Configure the kernel for JFFS2

( 3½) If "non-standard" board, change the "proper" (vague - I know) mtd 
Makefile to include the flash-driver for your system...)

4) Try making a new kernel - this will certainly fail, since many of the 
macro's checking (and fixing) for kernel less than 2.6 has been removed...

To fix the many errors in 4), you can actually compare the complaining 
files from HEAD with the ones from 2005-03-04. Many, if not all, the 
required macro's are there.
Otherwise, I can try to see if I can create a patch/diff output stating 
the differences.
Or, finally, you can post the errors here, or privately (not so noisy, 
but others may benefit - even if 2.4 is abandoned :-)), and we can 
fix'em together...

BR,
  Martin

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

* Re: jffs2 and nand mtd
  2005-08-11  8:35       ` Thomas Gleixner
@ 2005-08-11  9:58         ` Alex Karev
  0 siblings, 0 replies; 11+ messages in thread
From: Alex Karev @ 2005-08-11  9:58 UTC (permalink / raw)
  To: tglx; +Cc: linux-mtd

Thomas Gleixner wrote:

>On Thu, 2005-08-11 at 12:29 +0400, Artem B. Bityuckiy wrote:
>
>  
>
>>1. enable JFFS3 debugging level 1
>>2. copy as few as possible files to your flash which is enough just to
>>reproduce the problem.
>>    
>>
>
>After unmount, please create a dump of your FLASH partition with
>nanddump and put it somewhere for download.
>
>tglx
>  
>
Thanks to all for fast response, I'll try 2.6 while attempting to get 
correct corrent snapshot patchs for 2.4.

Here is logs and broken file example for curious:
http://pol3.comintern.ru/mtdlog/mtdlog.tar.gz

Alex.

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

* Re: jffs2 and nand mtd
  2005-08-11  9:42       ` Martin Egholm Nielsen
@ 2005-08-11 14:42         ` Gianluca
  2005-08-11 15:20           ` Thomas Gleixner
  0 siblings, 1 reply; 11+ messages in thread
From: Gianluca @ 2005-08-11 14:42 UTC (permalink / raw)
  To: linux-mtd

Hello,
we are working on an embedded system, but the only kernel it supports it is 
2.4.x series (microblaze based)
It has nand flash we are just wrote our drivers, but if mtd support for 2.4.x 
lacks, we cannot use them with any filesystem.

> > The best would be if you would adopt the *latest* MTD snapshot to your
> > kernel. Martin Egholm Nielsen <martin@egholm-nielsen.dk> recently ported
> > the latest MTD snapshot to a 2.4 kernel. You may ask him for a
> > patch/help.
>
> I'll help - I don't think I can create a patch that'll work directly, so
> let's see if we can get CVS HEAD up and running - step by step...
We are very glad if you "DIFFed" your harddrive mtd 2.4 sources, so it will be 
much simpler for us using them directly instead of downloading the latest 
release, then using the older macros... is it error prone doing in the 
following way?

>
> 1 )Start by fetching the source from CVS
> (http://www.linux-mtd.infradead.org/source.html)
>
> 2) Patch it in - enter the patches directory and run the patchin.sh
> script...
>
> 3) Configure the kernel for JFFS2
>
> ( 3½) If "non-standard" board, change the "proper" (vague - I know) mtd
> Makefile to include the flash-driver for your system...)
>
> 4) Try making a new kernel - this will certainly fail, since many of the
> macro's checking (and fixing) for kernel less than 2.6 has been removed...
>
> To fix the many errors in 4), you can actually compare the complaining
> files from HEAD with the ones from 2005-03-04. Many, if not all, the
> required macro's are there.
> Otherwise, I can try to see if I can create a patch/diff output stating
> the differences.
> Or, finally, you can post the errors here, or privately (not so noisy,
> but others may benefit - even if 2.4 is abandoned :-)), and we can
> fix'em together...
Anyway we will feel a lot of better if 2.4 support will NOT be abandoned at 
all, expecially for small footprint project like embedded system.

Best regards,
-- 
Gianluca Renzi
Eptar s.r.l.
Via Celletta 8/B
40026 Imola (BO) ITALY
Tel.:	+39-0542-609060
Fax.:	+39-0542-609054

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

* Re: jffs2 and nand mtd
  2005-08-11 14:42         ` Gianluca
@ 2005-08-11 15:20           ` Thomas Gleixner
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Gleixner @ 2005-08-11 15:20 UTC (permalink / raw)
  To: Gianluca; +Cc: linux-mtd

On Thu, 2005-08-11 at 16:42 +0200, Gianluca wrote:
> > Or, finally, you can post the errors here, or privately (not so noisy,
> > but others may benefit - even if 2.4 is abandoned :-)), and we can
> > fix'em together...
> Anyway we will feel a lot of better if 2.4 support will NOT be abandoned at 
> all, expecially for small footprint project like embedded system.

We will feel a lot better if this WHINING stops finally.

This move was announced for long. The only result was whining. We
hindered nobody to take care of this, but as you can see nobody stood up
to do the work.

tglx

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

end of thread, other threads:[~2005-08-11 15:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-11  7:31 jffs2 and nand mtd Alex Karev
2005-08-11  7:39 ` Artem B. Bityuckiy
2005-08-11  8:07   ` Alex Karev
2005-08-11  8:29     ` Artem B. Bityuckiy
2005-08-11  8:32       ` Artem B. Bityuckiy
2005-08-11  8:35       ` Thomas Gleixner
2005-08-11  9:58         ` Alex Karev
2005-08-11  9:42       ` Martin Egholm Nielsen
2005-08-11 14:42         ` Gianluca
2005-08-11 15:20           ` Thomas Gleixner
2005-08-11  8:33 ` David Woodhouse

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