DragonFly BSD
DragonFly kernel List (threaded) for 2004-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: modules & options


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 5 Sep 2004 10:14:08 -0700 (PDT)

:> 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)?
:
:yes:
:
:# Try and detect whether we are being built for a specific kernel
:.if defined(MAKEOBJDIRPREFIX) && 
:exists(${MAKEOBJDIRPREFIX}/opt_global.h)
:CFLAGS+=  -I${MAKEOBJDIRPREFIX}
:.PATH: ${MAKEOBJDIRPREFIX}
:.endif
:
:...
:
:opt_vesa.h:
:# .PATH searches only work for targes without source
:.if !exists(opt_vesa.h)
:         touch ${.TARGET}
:.endif
:
:
: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.
:
:cheers
:   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.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]