2012年7月13日 星期五

Freebsd buildkernel

according to /usr/src/Makefile{,inc1}:
  1. "mkdir ${KRNLOBJDIR}"
  2. Generate makefiles, header files, etc. of the desired kernel config to build directory by "config -d "
  3. *** following commands run in build directory (to use makefiles generated by config) ***
    1. "make cleandir"
    2. "make obj"
    3. build tools, mostly aicasm assembler (for Adaptec SCSI controllers) by "make -f ${AICASM_MAKEFILE} obj depend all"
    4. "make depend"
    5. "make all"
Basic freebsd makefile-based build steps:
  1. Clean build directory
    make cleandir
  2. Build directory tree for object files. Not the object files themselves. They are built in "make all"
    make obj
  3. Build dependencies to .depend of each directories
    make depend
  4. The actual compilation 
    make all
>>>TODO<<<
Makefile and directory structure generated by config