FreeBSD Device Driver Writer's Guide : Linking Into the Kernel. : Standard Model : config(8)
Previous: Adding your device to the config file.
Next: Making device nodes.

4.1.4. config(8)the kernel.

Now with our config file in hand, we can create a kernel compile directory. This is done by simply typing:

# config KERNEL
where KERNEL is the name of your config file. Config creates a compile tree for you kernel in /usr/src/sys/compile/KERNEL. It creates the Makefile, some .c files, and some .h files with macros defining the number of each device in your kernel.

Now you can go to the compile directory and build. Each time you run config, your previous build tree will be removed, unless you config with a -n. If you have config'ed and compiled a GENERIC kernel, you can ``make links'' to avoid compiling a few files on each iteration. I typically run

# make depend links all
followed by a ``make install'' when the kernel is done to my liking.


FreeBSD Device Driver Writer's Guide : Linking Into the Kernel. : Standard Model : config(8)
Previous: Adding your device to the config file.
Next: Making device nodes.
freebsd-questions@freebsd.org