Writing a disk driver
Here are some guidelines when writing a new disk driver (for release 2.3.6).
This is similar to writing a new display driver, except that the Disk driver is statically linked with the boot image. Lets assume you are writing a new SCSI driver.
26 Aug 2001 - Copyright © 2001 ETH Zürich. All rights reserved.
- Development of a SCSI disk driver is best done on a system with both an IDE and a SCSI disk in it (Alternatively, you can use a second IDE-based PC for cross-development). You install Oberon on the IDE disk, and develop and test the SCSI module using this IDE installation.
- The source code of existing drivers can be used for reference, e.g. IDEDisk.Mod and AHA1520Disk.Mod in Source1.Arc. Your disk driver module (e.g. MyDisk) must have an Install command, which installs the GetBlocks, PutBlocks and GetParams procedures in module Disk.
- While developing the driver, you can use all facilities of the Oberon system (Texts, etc.), but in the final version you are not allowed to import modules higher than Disk in the module hierarchy.
- Once your module is working, it can be integrated in the system for final testing. One way to do this is to make an exact copy of your installed Oberon partition from the IDE disk to the SCSI disk. This can be done by writing a disk block copying command that imports Disk (with the IDE driver installed) and MyDisk (the SCSI driver).
- To statically link your new module (MyDisk.Obj) with the inner core of the system, use the command:
BootLinker.Link test.bin \list \refs \integrate 1000H Kernel Disk MyDisk FileDir Files Modules ~. A static image test.bin and a log file test.bin.Link are produced.
- To write the new inner core to a boot diskette, use the command: FDInstall.CreateBootFloppy test.bin MT="PS2" TracePort="1" TraceBPS="19200" Display="VGA." Init="b81200cd10" \ ~. Replace the config strings with relevant values for your setup. Booting this diskette will load the new inner core, which will then proceed to load the system from the SCSI partition using the new MyDisk module.
- Please contribute your source to the ETH for integration in the release.
E-Mail: oberon-web at inf.ethz.ch