Copyright © Copyright (c) 2002 Brad Fritz, LEAF project; http://sf.net/projects/leaf Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation. A copy of the license can be found at http://www.fsf.org/copyleft/fdl.html .
| Revision History | ||
|---|---|---|
| Revision 0.5 | 2002-10-20 | BF |
| initial revison | ||
Table of Contents
These instructions describe how to modify a stock Bering floppy disk image to run from a M-Systems DiskOnChip. They were tested using Bering v1.0-stable on an Advantech PCA-6145B single board computer with a 4 MB DiskOnChip 2000. It is assumed that you have the ability to boot your DoC-enabled device from a floppy drive during setup.
Comments on this section should be sent to Brad Fritz at
<bradfritz at users.sourceforge.net>. This is revision
$Revision: 1.6 $. Please include the revision number with any comments.
Obtain a working Bering v1.0-stable or newer boot floppy and perform the following steps:
Download the appropriate MTD modules for your DoC from the
modules/2.4.18/kernel/drivers/mtd directory of
the Bering modules tree. For DiskOnChip 2000 products, you will need
mtdcore.o, docecc.o,
doc2000.o, docprobe.o and
nftl.o. The docecc.o,
doc2000.o, and docprobe.o
modules are in the mtd/devices subdirectory.
Download a fdisk package (or equivalent) that contains the mkfs.msdos, fdisk and syslinux commands.
Copy the modules and the fdisk package to your Bering floppy disk. If there is not enough room, you can delete Bering packages that you do not need or use a second MS-DOS formatted floppy disk.
Boot the floppy you prepared in the previous step.
Mount the floppy disk, move the DoC modules to the
/boot/lib/modules directory, and stage the fdisk
package.
mount -t msdos /dev/fd0u1680 /mnt
cd /mnt
mv mtdcore.o docecc.o doc2000.o docprobe.o nftl.o /boot/lib/modules
mv fdisk.lrp /tmp
cd /
umount /mnt
Edit /boot/etc/modules and add the
following lines. The order of the lines is very
important.
mtdcore
docecc
doc2000
docprobe
nftl
It is a good idea to make sure there is a blank line at
the end of the /boot/etc/modules file.
Backup the initrd package.
If you do not backup initrd, your changes will not be transferred to the DoC in step 4.
Load the MTD modules:
cd /boot/lib/modules
insmod ./mtdcore.o
insmod ./docecc.o
insmod ./doc2000.o
insmod ./docprobe.o
insmod ./nftl.o
After insmoding the docprobe.o
module, you should see output that looks similar to:
Possible DiskOnChip with unknown ChipID FF found at 0xc8000
Possible DiskOnChip with unknown ChipID FF found at 0xca000
Possible DiskOnChip with unknown ChipID FF found at 0xcc000
[..]
DiskOnChip 2000 found at address 0xD8000
Ignoring DiskOnChip 2000 at 0xDA000 - already configured
Ignoring DiskOnChip 2000 at 0xDC000 - already configured
Ignoring DiskOnChip 2000 at 0xDE000 - already configured
Possible DiskOnChip with unknown ChipID FF found at 0xe0000
Possible DiskOnChip with unknown ChipID FF found at 0xe2000
[..]
Verify the DoC has been recognized by running cat /proc/mtd. The output should look similar to:
dev: size erasesize name
mtd0: 00400000 00002000 "DiskOnChip 2000"
Install the fdisk package:
cd /tmp
lrpkg -i fdisk
Partition the DoC. Run fdisk /dev/nftla and create a single DOS 12-bit FAT partition and set it to active. The hex code for DOS 12-bit FAT is 0x1.
Create an MS-DOS filesystem on the DoC by running mkfs.msdos /dev/nftla1.
Mount the newly created filesystem and copy the Bering files to it.
mkdir /doc
mount -t msdos /dev/nftla1 /doc
mount -t msdos /dev/fd0u1680 /mnt
cp /mnt/* /doc
umount /mnt
Edit the DoC /doc/syslinux.cfg file and
remove the PKGPATH=/dev/fd0u1680 parameter and
change the boot parameter to boot=/dev/nftla1:msdos.
Unmount the DoC partition with umount /doc.
Make the DoC bootable by running syslinux -s /dev/nftla1.
Remove the floppy disk or unhook the floppy drive and reboot your Bering device. If the BIOS of the device is properly configured, Bering should now boot from the DoC.