blkmtd.o, JumpTec Dimm-PC woes
David Woodhouse
dwmw2 at infradead.org
Wed Jun 11 17:11:45 EDT 2003
On Wed, 2003-06-11 at 18:35, Chris Marston wrote:
> I'm working on a project using embedded linux on a JumpTec Dimm-PC (the Elan
> SC520 model). The JumpTec (supposedly) emulates a full PC with IDE, etc, so
> up till now, we've been able to get by quite happily with a homegrown
> slack-based distro with a minix FS (the final product will be mostly ro, so
> wear levelling is unnecessary). Recently, however, we noticed that our
> development units were beginning to corrupt data on writes, well before the
> MTBF of their flash. It turns out that the DIMM-PC carries out a good chunk
> of its IDE-emulating chicanery in the BIOS. Any OS can happily talk to the
> fictitious hard drive on its own, but, without the help of the BIOS, it won't
> properly erase sectors before using them. Thus, because Linux cold-shoulders
> the BIOS, sectors on the (SanDisk NAND) flash aren't getting erased properly,
> and, over time, the boards become unusable.
The ideal solution to this is to ditch the crap that pretends to be IDE
_altogether_ and talk to the NAND flash directly. Do you have decent
docs -- is that feasible?
> I'm thinking that the best way to handle this is to use blkmtd.o and then use
> JFFS2, eraseall, etc. Unfortunately, I can't figure out how or where to talk
> to the mtd device created by blkmtd.o. I've tried utils/MAKEDEV and
> /dev/ftla0, and /dev/nftla0, but (eg. eraseall /dev/ftla0) complains that
> there's no such device or address.
eraseall works on the '/dev/mtdN' or '/dev/mtd/N' device nodes (the
latter with devfs, the former without). In order for those to be
present, you must enable CONFIG_MTD_CHAR.
Don't bother with FTL and NFTL -- those are 'translation layers' for
making flash pretend to be a hard drive, and your flash is already
making that pretence for you.
--
dwmw2
More information about the linux-mtd
mailing list