The config Command BSD−Like Kernel Configuration Approach

23.3.3 The config Command

The config command is used to configure the systems kernel and is sometimes named autoconfig, or something else that denotes its autonomous nature. Here, the BSD−type SunOS config command is briefly described The syntax of the command is: usretcconfig [−fgnp ] [−o obj dir ] config_file config builds system configuration files. It performs the preparation necessary for building a new system kernel. The config_file named on the command line describes the kernel to be made in terms of options desired in the system, table sizes, and device drivers to be included. Running config, requires several input files located in the current directory typically the conf subdirectory of the system source including your config_file. If the directory named ..config_file does not exist, config will create one. One of config s output files is a makefile, which is used with make to build the kernel. config must be run from the conf subdirectory of the system source in a typical Sun environment, from usrsharesyssun{2,3,3x,4,4c }conf. Watch for errors while config is running. Never use a kernel that config has complained about; the results are unpredictable. If config completes successfully, the directory can be changed to the ..config_file directory, where it has placed the new makefile, and make can be used to build a kernel. The output files placed in this directory include ioconf.c, which contains a description of IO devices attached to the system; mbglue.s, which contains short assembly language routines used for vectored interrupts; a makefile, which is used by make to build the system; a set of header files device_name.h which contain a number of various devices that may be compiled into the kernel, and a set of swap configuration files which contain definitions for the disk areas to be used for the root filesystem, swapping, and system dumps. The available options are: −f Set up the makefile for fast builds, which is accomplished by building a vmunix.o file that includes all the .o files that have no source. This reduces the number of files that have to be stated during a system build. Prelinking all the files for which no source exists into another file, which is then linked in place of all of these files when the kernel is made, performs the reduction. This makefile is faster because it does not state the object files during the build. −g Get the current version of a missing source file from its SCCS history, if possible. −n Do not do the make depend. Normally, config will do the make depend automatically. If this option is used, config will print Dont forget to do a make 574 −p Configure the system for profiling. This option is only available for systems with full source releases. −o obj_dir Use ..obj_dir instead of ..OBJ as the directory to find the object files when the corresponding source file is not present, in order to generate the files necessary to compile and link your kernel. Note that there are differences among kernel configuration commands of different UNIX flavors and types; always consult the available documentation

23.4 Other Flavored Kernel Reconfigurations