modules & options

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Sun Sep 5 08:03:58 PDT 2004


On 05.09.2004, at 14:34, Sascha Wildner wrote:
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
--
/"\
\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News
Attachment:
PGP.sig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00003.pgp
Type: application/octet-stream
Size: 186 bytes
Desc: "Description: This is a digitally signed message part"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20040905/9c3dbc32/attachment-0018.obj>


More information about the Kernel mailing list