M-Systems Flash Disk Pioneers 91-SR-005-10-7L, DiskOnChip User Manual

Installation Manual IM-DOC-021
Using the DiskOnChip® with Linux OS
DEC-99
Using the DiskOnChip with Linux OS
LIMITED WARRANTY
(a) M-Systems warrants that the Licensed Software — prior to modification and adaptation by Licensee — will conform to the documentation provided by M-Systems. M-Systems does not warrant that
the Licensed Software will meet the needs of the Licensee or of any particular customer of Licensee, nor does it make any representations whatsoever about Licensed Software that has been modified or adapted by Licensee.
(b) Subsection (a) above sets forth Licensee’s sole and exclusive remedies with regard to the Licensed Software.
M-SYSTEMS MAKES NO OTHER WARRANTIES, EXPRESS OR IMPLIED, WITH RESPECT TO THE LICENSED SOFTWARE, INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THERE ARE NO OTHER WARRANTIES WITH RESPECT TO THE LICENSED SOFTWARE ARISING FROM ANY COURSE OF DEALING, USAGE, OR TRADE OR OTHERWISE.
IN NO EVENT SHALL M-SYSTEMS BE LIABLE TO LICENSEE FOR LOST PROFITS OR OTHER INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, WHETHER UNDER THIS AGREEMENT, IN TORT OR OTHERWISE.
(c) Licensee shall not make any promise, representation, warranty or guaranty on behalf of M­Systems with respect to the Licensed Software except as expressly set forth herein.
Please note: The Licensed Software is not warranted to operate without failure. Accordingly, in any use of the Licensed Software in life support systems or other applications where failure could cause injury or loss of life, the Licensed Software should only be incorporated in systems designed with appropriate and sufficient redundancy or back-up features.
91-SR-005-10-7L REV. 2.0 2
Using the DiskOnChip with Linux OS
Contents
1 Introduction...................................................................................................................................4
2 Hardware Requirements for the DiskOnChip ..........................................................................4
3 Requirements for Installation of the DiskOnChip into Linux.................................................5
3.1 Utilities Diskette Content.........................................................................................................5
3.2 Linux Driver for DiskOnChip...................................................................................................6
4 Installing the DiskOnChip as an Additional Drive....................................................................7
4.1 Updating the Firmware............................................................................................................7
4.2 Integrating the TrueFFS driver into Linux................................................................................7
5 Booting Linux from the DiskOnChip........................................................................................13
5.1 Creating a Root File System.................................................................................................13
6 Troubleshooting.........................................................................................................................16
7 Additional Information and Tools .............................................................................................18
Appendix I: Making a Root File System ...........................................................................................19
Appendix II: Booting from a HDD when the DiskOnChip Firmware is Active ............................22
Appendix III: Applying a Patch Manually..........................................................................................23
How to Contact Us.............................................................................................................................25
91-SR-005-10-7L REV. 2.0 3
Using the DiskOnChip with Linux OS
1 Introduction
M-Systems’ DiskOnChip is a family of flash disks. It contains built-in firmware that provides full hard disk emulation and allows the DiskOnChip to operate as a boot device.
When used under Linux, the DiskOnChip is managed by a device driver, based on M-Systems’ TrueFFS (True Flash File System) technology. The TrueFFS driver is attached to the standard Linux file system [ext2].
M-Systems provides two different TrueFFS drivers for Linux. One driver supports kernel versions 2.0.## and the other driver supports kernel versions 2.2.##. This Installation Manual can be used for both drivers. When there are differences in the installation, it will be pointed out in the text.
This Installation Manual note is intended for system integrators designing with the DiskOnChip 2000 or DiskOnChip Millennium and describes how the DiskOnChip can be installed as an additional disk or as a boot device under Linux.
It is assumed that the reader is familiar with the Operating System in use. While the hardware requirements of the DiskOnChip will be briefly discussed, the main part of this
installation manual is related to software installation. This will include basic driver installation and boot issues.
2 Hardware Requirements for the DiskOnChip
Originally designed for PC environments, the DiskOnChip can also be used in different hardware environments. The minimum requirements are a 12-bit address bus, an 8-bit data bus, and three active low control signals (CE#, OE#, WR#). Following is a drawing of the DiskOnChip and its pins. For more detailed information of the DiskOnChip hardware environment, refer to the various DiskOnChip Datasheets or to the following Application Notes:
AP-DOC-10 “Designing with the DiskOnChip”
AP-DOC-30 “Designing with the DiskOnChip Millennium in a RISC Environment”
AP-DOC-31 “Designing with the DiskOnChip Millennium in a PC Environment”
91-SR-005-10-7L REV. 2.0 4
Using the DiskOnChip with Linux OS
3
25
A12 A11 A10 A9
A8
A7 A6
8
A5 A4
A3
A2 A1 A0
17
D1
D6
SA8
SA3
SD1
SD6
Active Low Chip Enable
Active Low Output Enable
Active Low Write
CE
WR
30
1
SA12 SA11 SA10
SA9
SA7 SA6 SA5 SA4
SA2 SA1 SA0
NC
2
NC (A16) NC (A15)
29
NC (A14)
28
NC (A13)
4
23 26 27
DiskOnChip
5 6 7
9 10 11 12
22 24 31
OE
VCC
GND
D0
D2 D3 D4 D5
D7
32
16
13 14 15
18 19 20 21
5V
0.1
SD0
SD2 SD3 SD4 SD5
SD7
Figure 1: DiskOnChip Pins
3 Requirements for Installation of the DiskOnChip into Linux
In order to prepare the DiskOnChip to boot Linux, the following software programs and tools are required:
Linux should be installed on your HDD. It is possible to check the kernel version by typing the command
uname -r.
The Linux kernel sources should be installed in Linux (if you don’t have them, refer to kernel-HOWTO at
http://sunsite.unc.edu/LDP/ ).
If you are about to install Linux, make sure that you also install the kernel sources package and that it is possible to pass a full compilation of your sources.
A DOS boot diskette or a HDD that boots DOS.
M-Systems’ DiskOnChip DOS utilities diskette.
M-Systems’ TrueFFS driver for Linux.
Note: The latest Disk OnChip DOS utilites can be downloaded from M-System’ website: www.m -sys.com.
3.1 Utilities Diskette Content
The following files are needed from the DiskOnChip DOS utilities diskette:
91-SR-005-10-7L REV. 2.0 5
Using the DiskOnChip with Linux OS
dformat dupdate docpmap doc121.ex
b doc2.fff
Note: The file doc2.fff can be found in the \AP012 directory when using DiskOnChip DOS utilities version 1.21 or higher.
DiskOnChip formatting utility Utility for updating DiskOnChip firmware Utility to retrieve information about the DiskOnChip DiskOnChip firmware image. “121” is the firmware version, the actual diskette might
contain higher versions of the firmware, e.g. doc122.exb, doc123.exb, etc. Alternative firmware image for the DiskOnChip
3.2 Linux Driver for DiskOnChip
The compressed file driver.tgz contains the following files:
/usr/src/linux/drivers/block/flash_doc/flobj.obj TrueFFS device driver core object file /usr/src/linux/drivers/block/flash_doc/fldrvlnx.c Source code for driver integration with
kernel /usr/src/linux/drivers/block/flash_doc/makefile TrueFFS driver’s makefile /tmp/doc-driver/lilo-patch Patch for Lilo to make pLilo /tmp/doc-driver/plilo Linux loader, patched to use with the
DiskOnChip /tmp/doc-driver/lilo.conf Lilo sample configuration file /tmp/doc-driver/boot.b Boot loader, udpated to use with
DiskOnChip /tmp/doc-driver/copy2doc Sample scripts, aid tool to create a root file
system /tmp/doc-driver/pam.d/other File meant only for Redhat & Caldera,
defines permission access /tmp/doc-driver/samplefs.txt Sample root file system listing /tmp/doc-driver/doc-patch-2.0.## Patch for kernel sources 2.0.## (only
attached to TrueFFS driver for kernel
versions 2.0.##) /tmp/doc-driver/doc-patch-example Example patch for kernel sources 2.2.##
(only attached to TrueFFS driver for kernel
versions 2.2.##)
Note: The included patch files are different for the two TrueFFS drivers. When using the TrueFFS driver for kernel versions 2.2.##, the kernel needs to patched manually and only an example patch file (/tmp/doc-driver/doc-patch-example) is provided. Refer to appendix III on how to manually patch your kernel.
91-SR-005-10-7L REV. 2.0 6
Using the DiskOnChip with Linux OS
4 Installing the DiskOnChip as an Addit ional Drive
Before the DiskOnChip can be used as the boot disk for Linux (see Chapter 5), it first needs to be installed as an additional disk in the system (Linux is booted from a HDD). This chapter describes how to prepare the DiskOnChip and Linux to configure the DiskOnChip as an additional disk in the system. To achieve this, the firmware on the DiskOnChip needs to be updated (par. 4.1) and then the TrueFFS device driver needs to be integrated into Linux (par. 4.2). This is done as follows:
1. Configure Linux with the required devices (par. 4.2.1 Preparing Linux for Integration).
2. Add the TrueFFS driver to the kernel and recompile the kernel (par. 4.2.2 Adding the Driver to the
Kernel).
3. Boot the compiled kernel from your HDD (par. 4.2.3 Booting the Compiled Kernel from HDD).
4. Create a Linux partition on the DiskOnChip (par. 4.2.4 Creating a Linux Partition on the
DiskOnChip).
5. Create a native Linux file system on the DiskOnChip (par. 4.2.5 Creating a Native Linux File System
on the DiskOnChip).
4.1 Updating the Firmware
Before the DiskOnChip can be used as the boot disk or as an additional disk in Linux, it needs to be formatted with the alternative firmware image.
1. Plug the DiskOnChip into its socket and boot DOS from your HDD.
2. Format the DiskOnChip with the alternative firmware:
dformat /win:d000 /s:doc2.fff /y
Note: If you receive the error: “No DiskOnChip 2000 (R) was found at D000:0”, then run the DOS command docpmap /i to find out at which address the DiskOnChip is located.
4.2 Integrating the TrueFFS dri ver into Linux
4.2.1 Preparing Linux for Integration
To prepare Linux for integration of the driver, perform the following steps:
Note: To perform these steps, you must be logged in as the superuser (root).
91-SR-005-10-7L REV. 2.0 7
Using the DiskOnChip with Linux OS
1. The floppy drive must be active. Verify this by typing:
# mount If the /dev/fd0 doesn’t appear in the first column, type:
# mount/dev/fd0 /mnt From this point, it is assumed that the diskette that contains the TrueFFS driver for Linux is mounted at
/mnt.
2. The kernel sources must be installed. To check this, type:
# ls /usr/src/linux
If this directory exists, then the kernel sources are installed. If not, refer to http://sunsite.unc.edu /LDP/ or type:
zcat /usr/doc/HOWTO/Kernel-HOWTO.gz | more
3. Unzip and untar the file driver.tgz, located on your diskette, as follows:
# cd /tmp # mkdir temp # cd temp # tar -zxvf /mnt/driver.tgz # cp -rf . / # cd .. # rm -fr temp # cd /usr/src/linux/
4. If you are installing the TrueFFS driver for kernel versions 2.0. ##, type the following command:
# patch -p0 < /tmp/doc-driver/doc-patch-2.0.##
This will patch the current kernel sources to include the TrueFFS driver for Linux (with ## = kernel version). Notice that the patch for the kernel is working only on original kernel sources, and that the patch is version specific. In case the utility patch is not available in your Linux environment, refer to Chapter 6 “Troubleshooting”.
Note: If you are installing the TrueFFS driver for kernel versions 2.2.##, the kernel sourced need to be patched manually (see Appendix III "Applying a patch manually"). For your reference, an example patch file is included with the driver.
91-SR-005-10-7L REV. 2.0 8
Loading...
+ 17 hidden pages