old-www/HOWTO/Disk-on-Chip-HOWTO/intro.html

263 lines
6.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Introduction</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Booting Linux from DiskOnChip HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Booting Linux from DiskOnChip HOWTO"
HREF="index.html"><LINK
REL="NEXT"
TITLE="Reference configuration"
HREF="refconf.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Booting Linux from DiskOnChip HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="index.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="refconf.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="intro"
></A
>1. Introduction</H1
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="why"
></A
>1.1. Why this document?</H2
><P
>DiskOnChip (DOC) is a flash drive that is manufactured by M-Systems. The use of flash drives is emerging as a substitute for Hard Disks in embedded devices. Embedded Linux is gaining popularity as the operating system of choice in the embedded systems community; as such, there is an increased demand for embedded systems that can boot into Linux from flash drives.</P
><P
>Much of the documentation currently available on the subject is either incorrect or incomplete; the presentation of the information which is provided by such documents is likely to confuse novice users.</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="NFTL"
></A
>1.2. NFTL vs. INFTL</H2
><P
>Another fundamental problem is that most of the documents assume the DiskOnChip to be a NFTL (NAND Flash Translation Layer) device, and proceed to describe the booting process for NFTL devices. DiskOnChip architectures come in two variants, each of which requires different booting procedures: NFTL and INFTL (Inverse NFTL). Dan Brown, who has written a boot loader known as DOCBoot, explains the differences between these variants in a README document, which is included with the DOCBoot package: <A
HREF="http://ftp.arm.linux.org.uk/pub/people/dwmw2/mtd/cvs/mtd/docboot/"
TARGET="_top"
>http://ftp.arm.linux.org.uk/pub/people/dwmw2/mtd/cvs/mtd/docboot/</A
>.</P
><P
>An INFTL device is organized as follows:</P
><A
NAME="AEN38"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>IPL</P
><P
>Media Header</P
><P
>Partition 0 (BDK or BDTL)</P
><P
>(Optional) Partition 1(BDK or BDTL)</P
><P
>.. Up to at most Partition 3</P
></BLOCKQUOTE
><P
>Under Linux MTD partitions are created for each partition listed in the INFTL partition table. Thus up to 5 MTD devices are created.</P
><P
>By contrast the NFTL device is organized as follows:</P
><A
NAME="AEN46"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>Firmware</P
><P
>Media Header</P
><P
>BDTL Data</P
></BLOCKQUOTE
><P
>Under Linux, normally two MTD devices will be created.</P
><P
>According to the above excerpt, the process used by the boot loader when fetching the kernel image for an INFTL device is different from the method used for NFTL devices, since both devices have different physical layouts. (repetitive)</P
><P
>Using a 2.4.x kernel for an INFTL DiskOnChip device is complicated by the lack of native support in pre-2.6.x kernels (although native NFTL support is present). Such functionality is only available by <EM
>patching</EM
> the kernel; an approach which is ill-advised.</P
><P
>Patching the kernel with external INFTL support is discouraged; the developers of the MTD driver, the open source driver available for DiskOnChip, are apprehensive of this approach as well. For more information on this matter, feel free to peruse the mailing list conversation on the subject at <A
HREF="http://lists.infradead.org/pipermail/linux-mtd/2004-August/010165.html"
TARGET="_top"
>http://lists.infradead.org/pipermail/linux-mtd/2004-August/010165.html</A
>.</P
><P
>The drivers that provide native INFTL support in the 2.6.x kernels failed to identify the DiskonChip device used for this exercise, and the following message was reported by the system:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;INFTL no longer supports the old DiskOnChip drivers loaded via docprobe.
Please use the new diskonchip driver under the NAND subsystem.
</PRE
></FONT
></TD
></TR
></TABLE
><P
>So then we decided to use the drivers provided by M-Systems (manufacturer of DiskOnChip). However, according to the documentation provided by the vendor on these drivers, they were designed for NFTL devices only. As such, we decided to write this HOWTO which will address the use of INFTL devices. We have taken special care to remove any ambiguity in the steps and also tried to give reasons for the need of a particular step so as to make things logically clear. We have explained things in such a way that a person with less experience on Linux can also follow the steps.</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="aims"
></A
>1.3. Practical goals</H2
><P
>This document aims to act as a guide to:</P
><P
></P
><UL
><LI
><P
>Use M-Systems DiskOnChip 2000 TSOP as an additional storage drive along with an IDE HDD running Linux on it.</P
></LI
><LI
><P
>Install Linux on DiskOnChip 2000 TSOP and boot Linux from it.</P
></LI
><LI
><P
>Install the Development Tool-Chain so as to compile and execute programs directly on DiskOnChip.</P
></LI
></UL
><P
>The method described here has been tested for DiskOnChip 2000 TSOP 256MB and DiskOnChip 2000 TSOP 384MB.</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="refconf.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Booting Linux from DiskOnChip HOWTO</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Reference configuration</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>