For the IOM component, the IOM source files are merged into the component's build directory, <work_dir>/build_IOM. In this directory, exports.1st is produced by the mkmerge command. This directory relies on the profile file to ensure that the NUCLEUS component is merged before the IOM component.
Look in further detail at the IOM build directory by listing the contents of the <work_dir>/build-IOM/src/os/iom/sys directory. This directory contains four files and two symbolic links:
Table 4-9 Files Generated in src/os/iom/sysFile | Description |
Makefile | the Makefile of the directory, produced by mkmk |
N_iom.r | the IOM actor |
all.dp | dependency file, produced by make depend and getExport |
sys_agglo.mk | internal Makefile, used when linking the configurable actor, to copy files from the src directory to the obj directory |
Table 4-10 Symbolic links in src/os/iom/sys
Symbolic Link | Description |
sys.bf | the build file |
sys.df | the definition file |
The contents of the symbolic link files, sys.bf and sys.df, the Makefile and the /sys/lib/gen/common.mf file are given here.
The sys.df file, defines the INCLUDES and DEFINES variables.
INCLUDES=" \ -Isys/include \ -Ibsd \ -Ibsd/sys \ -I${OS_DIR}/include/sys \ -Ibsd/machine \ -I${OS_DIR}/include/machine \ -I${OS_DIR}/include/chorus/iom \ -I${OS_DIR}/include/chorus \ -I${OS_DIR}/include/chorus/cx \ -I${NUCLEUS_DIR}/include/chorus \ -I${IOM_DIR}/include \ -I${OS_DIR}/include \ -I${NUCLEUS_DIR}/include \ -I${OS_DIR}/include/stdc \ -I${NUCLEUS_DIR}/include/stdc" DEFINES="$DEFINES -DKERNEL -D_KERNEL -D__FreeBSD__ / -DINET -DNO_CACHE -DMSDOSFS -DNFS -DIOM_MALLOC -DSHARED_FD"
In this example, S_LIBS contains the list of libraries used to link the IOM component. The ConfigurableActor rule is also used to link the IOM component.
S_LIBS = $(IOM_DIR)/lib/os/iom/sys/lib/ufs.a \ $(IOM_DIR)/lib/os/iom/sys/lib/disk.a \ $(IOM_DIR)/lib/os/iom/sys/lib/gen.a \ $(IOM_DIR)/lib/os/iom/sys/lib/mem.a \ $(IOM_DIR)/lib/os/iom/sys/lib/unresolved.a \ $(NUCLEUS_DIR)/lib/stdc/libC.a \ $(NUCLEUS_DIR)/lib/embedded/libebd.s.a \ $(NUCLEUS_DIR)/lib/cpu/cpu.s.a \ $(OS_DIR)/lib/classix/libcx.a \ $(NUCLEUS_DIR)/lib/classix/libsys.s.a ConfigurableActor(N_iom.r, $(S_LIBS))
The Makefile generated by mkmk contains two parts. View the contents of the Makefile. The first part has a list of the definitions of variables as defined in Table 4-2, Table 4-3, Table 4-4 and Table 4-5. The second part contains preprocessed copies of the .bf, .lf, and .mf files found in the work directory. In this example there is only a .bf file present in the work directory.
# # This makefile is generated automatically # in build-IOM/src/os/iom/sys # ... BDIR = <work_dir> BNAME = sys MPATH = build-IOM/src/os/iom/sys DEFINES = -DNDEBUG -DKERNEL -D_KERNEL -D__FreeBSD__ -DINET \ -DNO_CACHE -DMSDOSFS -DNFS -DIOM_MALLOC -DSHARED_FD INCLUDES = -Isys/include -Ibsd -Ibsd/sys -I/<work_dir>/build-OS/include/sys -Ibsd/machine \ -I/<work_dir>/build-OS/include/machine \ -I/<work_dir>/build-OS/include/chorus/iom \ ... FEXCEPTION = OFF FFPU = ON FOPTIM = ON FPROF = OFF ... FAMILY = ppc60x COMPILER = gcc VARIABLES = OS_DIR IOM_DIR NUCLEUS_DIR DRV_DIR SUB_DIRS = bsd sys EXTRA_DIRS = BFILES = sys.bf MFILES = DFILES = sys.df MODULES = OS_DIR = <work_dir>/build-OS IOM_DIR = <work_dir>/build-IOM NUCLEUS_DIR = <work_dir>/build-NUCLEUS DRV_DIR = <work_dir>/build-DRV include $(BDIR)/Paths include $(DEVTOOLS_DIR)/tgt-make/shared.rf # produced from sys.bf -- begin S_LIBS = $(IOM_DIR)/lib/os/iom/sys/lib/ufs.a \ $(IOM_DIR)/lib/os/iom/sys/lib/disk.a \ $(IOM_DIR)/lib/os/iom/sys/lib/gen.a \ $(IOM_DIR)/lib/os/iom/sys/lib/mem.a \ $(IOM_DIR)/lib/os/iom/sys/lib/unresolved.a \ $(NUCLEUS_DIR)/lib/stdc/libC.a \ $(NUCLEUS_DIR)/lib/embedded/libebd.s.a \ $(NUCLEUS_DIR)/lib/cpu/cpu.s.a \ $(OS_DIR)/lib/classix/libcx.a \ $(NUCLEUS_DIR)/lib/classix/libsys.s.a BINARY += N_iom.r N_iom.r: $(S_LIBS) $(MKLINK) -r -c -e _start -o N_iom.r -B $(S_LIBS) # produced from sys.bf -- end include all.dp include $(DEVTOOLS_DIR)/tgt-make/mktgt.rf
To examine a directory that has a .mf file, go to the <work_dir>/build-IOM/src/os/iom/sys/sys/lib/gen directory. List the contents of the common.mf file:
... C__SRCS = \ insremque.c ovbcopy.c memstat.c iomRqTask.c util.c
The .mf files contain the definition of variables and nothing else. These variables are listed in Table 4-5.
The Makefile listed above for the IOM component, located at <work_dir>/build-IOM/src/os/iom/sys, includes a dependency file, all.dp. This dependency file is located in the same directory as the Makefile. In the IOM component, the all.dp file contains the list of files upon which the linked binary files, such as actors or libraries, are dependent. The -export lines at the top of the file are used by getExport during the link phase. In this example, as the directory contains no object file, these lines are empty.
host% head all.dp # automatically generated file # -export ALL : # -export SUP : # -export USR : N_iom.r: bsd/dev/conf/all.dp N_iom.r: bsd/dev/conf/conf.o N_iom.r: bsd/dev/console/all.dp N_iom.r: bsd/dev/console/console.o N_iom.r: bsd/dev/flash/all.dp N_iom.r: bsd/dev/flash/flashdrv.o ... N_iom.r: all.dp