Memory Technology Device (MTD) Subsystem for Linux

xiaoxiao2021-03-06  51

Memory Technology Device (MTD) Subsystem for Linux

Design AIMS

We're Working On a Generic Linux Subsystem for Memory Devices, Especially Flash Devices.

......................

Hardware drivers need to know nothing about the storage formats used, such as FTL, FFS2, etc., but will only need to provide simple routines for read, write and erase. Presentation of the device's contents to the user in an appropriate form will be Handled by the Upper Layers of the system.

Mailing List and IRC

There is a mailing list for discussion of MTD development:. Http://www.infradead.org/~dwmw2/email.html Please do not post to the mailing list without first reading my notes on etiquette Please read also the section about. kernel versions below Full archives are available at http://lists.infradead.org/pipermail/linux-mtd/. to subscribe, go here or send "subscribe" in the body of a mail to linux-mtd-request @ lists. infradead.org NOTE:. DO NOT SEND YOUR SUBSCRIPTION REQUEST tO THE LIST ITSELF.SEND IT tO linux-mtd-request@lists.infradead.org AS THE ABOVE SAYS There is a CVS log mailing list to keep you informed of CVS commits. To Subscribe, Go Here Note: This List is read Only: #mtd on Irc.ipv6.freenode.net or Irc.Freenode.net

Download and CVS

Very occasionally, I make snapshot releases. Now that the MTD code is in the 2.4 kernel, it's become even rarer. Your best option is to obtain the latest code from CVS, by following the instructions below. We do break the CVS build occasionally, But We're Also Fairly Good At Fixing It Quickly WHEN We do So.nOt: Due to The Red Hat IS Department Pulling The Plug On The Machines WITHOUT NOTESSIBLE VIA IPV6 Only.

Getting ipv6 isn't hard. If you have an ipv4 address on a network interface (E.g. Eth0), And a Version of Red Hat Linux NEWER THAN RHL7, IT'S SIMPLE:

echo networking_ipv6 = yes >> / etc / sysconfig / network

echo ipv6_defaultdev = tun6to4 >> / etc / sysconfig / network

Echo ipv6init = yes >> / etc / sysconfig / network-scripts / ifcfg-eth0

Echo IPv6To4init = YES >> / etc / sysconfig / network-scripts / ifcfg-eth0

/ SBIN / Service Network Restart

IF you have a firewall you need to make it let ip protocol # 41 (IPv6 in IPv4) in and out. Other Distributions and Other OPERATING SYSTEMS Also Support 6to4. Even Windows Can do IT.

Assuming You Have IPv6, Access To CVS Is Done over SSH Rather Than PServer:

EXPORT CVS_RSH = `Which SSH`

CVS -D: Ext: anoncvs@cvs.infradead.org: / home / cvs co MTD

If You can't Access Anoncvs for Some Reason, Daily Snapshots Are Also Available At ftp://ftp.uk.linux.org/pub/people/dwmw2/mtd/cvs/

Kernel Versions

The MTD Code in The Linux Kernel Is Updated from MTD CVS in KERNEL VERSION 2.6.NEWEST ONLY.

The MTD CVS works most of the time with kernels from the 2.4 series too. The MTD code which is available in the 2.4 series kernel source is maintainence only and will not be updated, except for bug fixes. If you need functionality from the current MTD code for your 2.4 kernel and for whatever reason, you can use the CVS code and patch your kernel yourself. you need at least kernel version 2.4.26. Kernels below 2.4.26 are considered as outdated and obsolete.The MTD community is neither able nor interested to provide support for ancient kernels. either move yourself and update to a recent kernel. If you use a vendor supplied kernel, please get support from your kernel vendor. Do not ask on the mailinglist for help with such problems. you are either .

THE MOVED TO A MAINTAINENCE INLY MODE The Near Future. This Will Relieve US from a Lot of Compatibility Crap and lets US Concentrate On The Further Development in The 2.6 Series.

Installation

Check out sources from CVS or download a snapshot and untar it. Change to the top directory and read INSTALL. Change to subdir patches. There you find a script patchin.sh. It is highly recommended to use this script, as it is aware of different kernel versions, pristine or already patched kernels. This script applies all the neccecary changes to your kernel source including the often discussed shared zlib patches. your kernel source must be configured already, as the script retrieves information from Makefile in your kernel source.The script takes following options: -c copy files into kernel tree instead of linking files-j include jffs (2) filesystemsAs last argument you have to give the path of your kernel tree This must be an absolute path.The difference between linking and copying. FILES INTO The Kernel Tree Is, That Copying Gives You a Modified Kernel Tree, Which Can Be Handled by CVS AS It Contains No Symlinks. Lining The Files Has Two Advantages. 1. All your kernel trees can shar e the same MTD source.2. You can have more than one MTD source eg. a stable and an unstable and use it with your kernel tree (s) by changing the link to the directories. Assumed you have two MTD versions (stable and unstable) and those are located in source, then the directory listing of source shows: mtd -> / source / mtd.stablemtd.stablemtd.unstableIf you want to build with your stable MTD source, set the mtd link to mtd.stable else to MTD.unStable. Don't forget to make clean, if you switch the links.

Documentation

There is now some MTD API documentation available It's a little out of date -. The API has been evolving over the last few months as we encounter strange pieces of hardware that we had not anticipated, and occasionally when I'd just overlooked something blatantly obvious Volunteers to update the docs are welcome 13th Feb 2001:... A mtd-jffs-HOWTO is now also available under CVS Not all topics are covered yet, but it's a start 5th May 2002:. A NAND Flash document is now available . IT Covers Some Technical Topics About Nand and FileSystems and Contains A FAQ. 1st June 2004: a Nand Flash API Document Is Now Available.booting

You Can Now Replace The Firmware on The Diskonchip 2000, and Possibly Also The Diskonchip Millennium, with a Version of GNU GRUB Which Runs Directly from the Flash.

The Patches To make Grub aware of the diskonchip and the nftl format Used on it, Along With A First-Stage Loader To Load Grub Itself Into Memory from The Diskonchip, Are IN The CVS Repository.

MTD User Modules

THESE ARE THE CURRENTLY THESE ARE The MODULES WHICH PROVIDE INTERFCES CURRENTLY. The user modules currently planned include:

Raw character access: A character device which allows direct access to the underlying memory Useful for creating filesystems on the devices, before using some of the translation drivers below, or for raw storage on infrequently-changed flash, or RAM devices Raw block accessA.. block device driver which allows you to pretend that the flash is a normal device with sensible sector size. It actually works by caching a whole flash erase block in RAM, modifying it as requested, then erasing the whole block and writing back the modified data. This allows you to use normal filesystems on flash parts Obviously it's not particularly robust when you are writing to it -. you lose a whole erase block's worth of data if your read / modify / erase / rewrite cycle actually goes read / modify / erase / poweroff. But for development, and for setting up filesystems which are actually going to be mounted read-only in production units, it should be fine. There is also a read-only version of this driver which does not hav e the capacity to do the caching and erase / writeback, mainly for use with uCLinux where the extra RAM requirement was considered too large. Flash Translation Layer (FTL) NFTLBlock device drivers which implement an FTL / NFTL filesystem on the underlying memory device. FTL is fully functional. NFTL is currently working for both reading and writing, but could probably do with some more field testing before being used on production systems. Journalling Flash File System, v2This provides a filesystem directly on the flash, rather than emulating a block device For more information, see sources.redhat.com.mtd Hardware Device Drivers

These provide physical access to memory devices, and are not used directly - they are accessed through the user modules above.On-board memoryMany PC chipsets are incapable of correctly caching system memory above 64M or 512M A driver exists which allows you to use this. memory with the linux-mtd system. PCMCIA devicesPCMCIA flash (not CompactFlash but real flash) cards are now supported by the pcmciamtd driver in CVS. Common Flash Interface (CFI) onboard NOR flashThis is a common solution and is well-tested and supported, . most often using JFFS2 or cramfs file systems Onboard NAND flashNAND flash is rapidly overtaking NOR flash due to its larger size and lower cost; JFFS2 support for NAND flash is approaching production quality M-Systems' DiskOnChip 2000 and MillenniumThe DiskOnChip 2000, Millennium and. Millennium Plus Devices Should Be Fully Supported, Using Their Native NFTL AND INFTL 'Translation Layers'. Support for Jffs2 on Diskonchip 2000 And Millennium Is Also Operational Altho UGH LACKING Proper Support for Bad Block Handling.

CompactFlash -. Http://www.compactflash.org/CompactFlash emulates an IDE disk, either through the PCMCIA-ATA standard, or by connecting directly to an IDE interface As such, it has no business being on this page, as to the Best of My Knowledge It Doesn't Have Any Alternative Method of Accessing The Flash - You Have To Use The Ide Emulation - I Mention It Here for Completeness.

JFFS3 (Journalling Flash File System Version 3)

There is some activity to create the third generation of the JFFS file system.We are mainly discussing JFFS3 design issues now. A summary of the discussion is available in the JFFS3 design issues document (pdf, html) .JFFS3 FAQ

Q: What is the fs / jffs3 in The MTD CVS Repository? A: this is currently almost The Same as Jffs2 Fernc Havasi's "Summary" Patch Applied (One CAN Find It At http://www.inf.u-szeged. hu / jffs2 /) Some other minor improvements have been committed Q:.. How can I participate in JFFS3 development A:?.. You may discuss JFFS3 design issues in the mailing list JFFS2 and JFFS3-related questions may be asked there either If you have any non-x86 board and Linux working there, you may help us running our checksum test and provide us your results.David Woodhouse $ Id: index.html, v 1.42 2005/01/24 16:18:38 dedekind Exp $

转载请注明原文地址:https://www.9cbs.com/read-61542.html

New Post(0)