jffs2 and nand 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.
Quoted 7 lines · Alex Karev
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:
Quoted 8 lines
#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) ?
Signature · 3 lines
Best Regards, Artem B. Bityuckiy, St.-Petersburg, Russia.
Quoted 18 lines · Artem B. Bityuckiy
Quoted 5 lines · Alex Karev
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:
Quoted 10 lines
#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.
Quoted 4 lines
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.
/
Quoted 11 lines · Alex Karev
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-04And 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 <[email protected]> recently ported the latest MTD snapshot to a 2.4 kernel. You may ask him for a patch/help.
Signature · 3 lines
Best Regards, Artem B. Bityuckiy, St.-Petersburg, Russia.
Quoted 1 line
1. enable JFFS3 debugging level 1
Oops, surely JFFS2, not JFFS3 :-)
Signature · 3 lines
Best Regards, Artem B. Bityuckiy, St.-Petersburg, Russia.
Quoted 3 lines · Artem B. Bityuckiy
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
Quoted 10 lines · Thomas Gleixner
Quoted 5 lines · Artem B. Bityuckiy
1. enable JFFS3 debugging level 1
2. copy as few as possible files to your flash which is enough just to reproduce the problem.
Quoted 6 lines
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.
Hi Alex,
Quoted 9 lines
Quoted 8 lines
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-04And 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< ---
Quoted 7 lines
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 <[email protected]> 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
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.
Quoted 7 lines
Quoted 4 lines
The best would be if you would adopt the *latest* MTD snapshot to your kernel. Martin Egholm Nielsen <[email protected]> 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?
Quoted 15 lines
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.shscript...3) Configure the kernel for JFFS2
( 3½) If "non-standard" board, change the "proper" (vague - I know) mtd
Makefileto 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...
Quoted 8 lines
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,
Signature · 6 lines
Gianluca Renzi Eptar s.r.l. Via Celletta 8/B 40026 Imola (BO) ITALY Tel.: +39-0542-609060 Fax.: +39-0542-609054
Quoted 5 lines · Gianluca
Quoted 3 lines
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
Quoted 1 line · Alex Karev
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.
Signature · 1 line
dwmw2