
Dear Udi,
in message 01qhav4dc6n97kctt8ob8f9qsjrva8v3sm@4ax.com you wrote:
Yes, I know about these - what I meant was that the D.O.C support is still at the sector level, without any filesystem support.
Right.
IMHO all filesystem stuff for U-Boot should be split into a separate layer (standalone applications acting as second stage bootstrap loaders).
As far as I know (correct me if I'm wrong), NFTL does block-level remapping of bad blocks as well as wear levering by constantly changing the logical<>physical sector mapping on each write (so that if you write the same "logical" sector 1000 times it would spread over all the flash).
So they claim to do.
If my understanding is accurate, how can I use the U-Boot raw sectors without disturbing the NFTL mapping that is handled by the Linux MTD package?
I think that the "binary partition" is not subject to this, i. e. you can do direct I/O with the binary partition on the DoC.
Besides, I've peeked into the D.O.C code in U-boot and it's full of NFTL references. In fact, as far as I can see, binary partitions are part of NFTL.
Yes.
I've been looking at the files in fs/fdos/... and the CMD_FDC, CMD_FDOS code which calls them., and I see it contains complete code to read a FAT filesystem.
Something to be cleaned up and implemented in a more general way...
I understand from the above that I don't need it, but just for the sake of understanding - couldn't I drop the NFTL+normal filesystem and use JFFS2 over the raw D.O.C sectors, since JFFS2 does bad block mapping and wear levering (or does it??)
I don't know if it is possible to extend the size of the binary partition to cover the whole device.
OK, so where to I stand now?
- My kernel correctly identifies the D.O.C but for some reason manages
to mount it only partially. /dev/mtdchar0 is non functional, but /dev/nftla seems to work between reboots. I can correctly partition the D.O.C using fdisk, and the format is kept when I leave fdisk and re-run it, btu once I reboot, all the partitioning done is lost.
That rings a bell to me. We fixed exactly such a problem once.
In the old version of the code some internal data structures of the NFTL driver, which are initialized only at boot-time, become invalid after you run nftl_format.
See my message "DOC / NFTL problem, and fix" from Aug 28, 2002, to the MTD mailing list: http://lists.infradead.org/pipermail/linux-mtd/2002-August/005853.html I don't know if they ever accepted the patch, and/or if it is included with your version of the MTD tools. Just in case I attach this patch again below.
I think this part of my questions should be sent to the MTD list I guess.
Agreed.
Best regards,
Wolfgang Denk