Booting Linux from DiskOnChip HOWTO
Prev |  | Next

# 1. Introduction

## 1.1. Why this document?

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.

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.

## 1.2. NFTL vs. INFTL

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: http://ftp.arm.linux.org.uk/pub/people/dwmw2/mtd/cvs/mtd/docboot/.

An INFTL device is organized as follows:

> IPL

> Media Header

> Partition 0 (BDK or BDTL)

> (Optional) Partition 1(BDK or BDTL)

> .. Up to at most Partition 3

Under Linux MTD partitions are created for each partition listed in the INFTL partition table. Thus up to 5 MTD devices are created.

By contrast the NFTL device is organized as follows:

> Firmware

> Media Header

> BDTL Data

Under Linux, normally two MTD devices will be created.

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)

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 patching the kernel; an approach which is ill-advised.

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 http://lists.infradead.org/pipermail/linux-mtd/2004-August/010165.html.

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:

    INFTL no longer supports the old DiskOnChip drivers loaded via docprobe.
    Please use the new diskonchip driver under the NAND subsystem.

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.

## 1.3. Practical goals

This document aims to act as a guide to:

- Use M-Systems DiskOnChip 2000 TSOP as an additional storage drive along with an IDE HDD running Linux on it.

- Install Linux on DiskOnChip 2000 TSOP and boot Linux from it.

- Install the Development Tool-Chain so as to compile and execute programs directly on DiskOnChip.

The method described here has been tested for DiskOnChip 2000 TSOP 256MB and DiskOnChip 2000 TSOP 384MB.

Prev | Home | Next
Booting Linux from DiskOnChip HOWTO |  | Reference configuration