Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 02 Jan 2011 01:07:39 -0800
From:      perryh@pluto.rain.com
To:        freebsd-questions@freebsd.org
Subject:   kernel config =?> kernel code
Message-ID:  <4d20405b.peoSjXlhfff4u/n7%perryh@pluto.rain.com>

next in thread | raw e-mail | index | archive | help
This feels like a really dumb (as in, the answer should be obvious)
question, but so far it has eluded me:  Given an option name in the
kernel configuration file, how -- exactly -- does the directive to
include or exclude that option get translated into particular code
(source lines, .o files, symbols, etc.) that are thereby included in
or excluded from the kernel?

For example, the presence or absence of GEOM_PART_BSD or
GEOM_PART_MBR presumably results in the inclusion or exclusion
of _some_ code _somewhere_, but I've been unable to figure out
how the correspondence is established.  There's a mapping from
option names to .h files in conf/options -- both GEOM_PART_BSD
and GEOM_PART_MBR map to opt_geom.h -- and I suppose this is
what causes config to create lines like

  #define GEOM_PART_MBR 1

and

  #define GEOM_PART_BSD 1

in <kernelname>/opt_geom.h, but I haven't found any #ifdef's
or other uses of those symbols anywhere under /usr/src/sys or
/usr/obj.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4d20405b.peoSjXlhfff4u/n7%perryh>