Typically, a driver component is a ChorusOS operating system supervisor actor written in 'C' programming language. This type of component (named devx for the example) is usually composed of the following files:
A header file (named devxProp.h) defining properties which are specific to this devx driver component. This file should be visible from the component(s) responsible for building the associated device tree node (to create the node's properties). This may be the boot program or any other "probe only" driver component.
An implementation file (devx.c) which contains the C code for the driver component. Note that for very big driver components, there may be multiple .c files. Note also that the hardware related definitions and constants are sometimes extracted from the .c file and put in a header file (devx.h) where use is restricted to the implementation file.
An Imakefile that is used to generate a Makefile (through the imake tool) in order to compile and link the driver component. Refer to the make and imake sections in "ChorusOS 4.0 Introduction", and the imake header file (see the TOOLS directory: installation_directory/platformtype-bin/dtool) for details about the imake macros that are available to build driver components.
Below is a typical example of an Imakefile, which exports a ravenProp.h file, compiles a raven.c implementation file and then builds a D_raven.r driver actor which is embedded in the archive.
CSRCS = raven.c OBJS = $(CSRCS:.c=.o) BuiltinDriver(D_raven.r, $(OBJS), $(DRV_LIBS)) DistProgram(D_raven.r, $(DRV_DIST_BIN)$(REL_DIR)) Depend($(CSRCS)) FILES = ravenProp.h DistFile($(FILES),)$(REL_DIR),$(DRV_DIST_INC)$(REL_DIR))