Installing and booting Bering from a M-Systems DiskOnChip

Objectives

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.3 $. Please include the revision number with any comments.


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.