Chapter 12. Installing and booting Bering from a M-Systems DiskOnChip

Revision History
Revision 0.52002-10-20BF
initial revison

Table of Contents

Step 1: prepare the boot floppy
Step 2: configure Bering for DoC booting
Step 3: prepare the DoC
Step 4: reboot
Thanks to...


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 . This is revision $Revision: 1.6 $. Please include the revision number with any comments.

Step 1: prepare the boot floppy

Obtain a working Bering v1.0-stable or newer boot floppy and perform the following steps:

  1. 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.

  2. Download a fdisk package (or equivalent) that contains the mkfs.msdos, fdisk and syslinux commands.

  3. 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.

Step 2: configure Bering for DoC booting

  1. Boot the floppy you prepared in the previous step.

  2. 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
  3. Edit /boot/etc/modules and add the following lines. The order of the lines is very important.


    It is a good idea to make sure there is a blank line at the end of the /boot/etc/modules file.

  4. Backup the initrd package.


    If you do not backup initrd, your changes will not be transferred to the DoC in step 4.

Step 3: prepare the DoC

  1. Load the MTD modules:

    cd /boot/lib/modules
    insmod ./mtdcore.o
    insmod ./docecc.o
    insmod ./doc2000.o
    insmod ./docprobe.o
    insmod ./nftl.o
  2. 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
  3. 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"
  4. Install the fdisk package:

    cd /tmp
    lrpkg -i fdisk
  5. 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.

  6. Create an MS-DOS filesystem on the DoC by running mkfs.msdos /dev/nftla1.

  7. 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
  8. Edit the DoC /doc/syslinux.cfg file and remove the PKGPATH=/dev/fd0u1680 parameter and change the boot parameter to boot=/dev/nftla1:msdos.

  9. Unmount the DoC partition with umount /doc.

  10. Make the DoC bootable by running syslinux -s /dev/nftla1.

Step 4: reboot

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.

Thanks to...

Jacques Nilo and Eric Wolzak for creating Bering, all the LEAF developers for their contributions, and Mike Noyes for his support of the LEAF project and great work to encourage continuous improvement.