modules & options

Matthew Dillon dillon at
Sun Sep 5 10:18:01 PDT 2004

:> is it on purpose that the modules built with buildkernel do not honor 
:> the options in the kernel config?
:seems so. I don't agree with that, though.
:> Is there a way to achieve what I want (kldload vesa but keep debugging 
:> output)?
:# Try and detect whether we are being built for a specific kernel
:.if defined(MAKEOBJDIRPREFIX) && 
:# .PATH searches only work for targes without source
:.if !exists(opt_vesa.h)
:         touch ${.TARGET}
:this means: iff the module is built by the kernel Makefile (which sets 
:MAKEOBJDIRPREFIX appropriately) and iff opt_vesa.h is found, then the 
:kernel opt_vesa.h is picked up. Else the "default" (which should be 
:used for modules to be used for most people, i.e. GENERIC ABI 
:compatibility) should be generated.
:we should use this for every KLD, in my opinion.
:   simon

    I'd say 'maybe', though the mechanism should be to 'cp' the opt file
    into the module objdir rather then to use .PATH to access the kernel
    objdir.  .PATH is too dangerous to be used in that manner.

					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>

More information about the Kernel mailing list