On 02/19/07 18:01, Thomas De Schampheleire wrote:
On http://opensolaris.org/os/community/on/devref_toc/devref_4/ I read that it
is possible to compile only parts of the kernel using make/dmake directly. This
would speed up compilation in test phases.
However, when I modify a file, for example uts/common/disp/disp.c, and then run
cd uts
dmake common/disp
I get: `common/disp/' is up to date.
uts/common contains common source, but it is not the place you build objects
derived
from that source (whether interactively or through nightly). Source in
common contributes to 'genunix' and to common (to sparc and x86, that is)
drivers, kernel modules etc.
Most of the build directories are located at $SRC/uts/sparc and
$SRC/uts/intel. Some common code may nevertheless be built using
architecture-specific compile flags etc, so some build directories
appear in places such as $SRC/uts/sun4u/genunix.
disp.c compiles into genunix. So to compile incremental changes
made to that file you want to recompile genunix - $SRC/intel/genunix.
It is easy to be caught out here. For example you'll find that 'unix',
the architecture-specific component of the kernel, is compiled in
a zillion places each with subtlely different setup (eg NCPU, see
$SRC/sun4u/{starcat,starfire,serengeti}/unix for example (many more).
That's why it is often safer to stick to nightly -i or compile
at the level of usr/src or usr/src/uts. When I'm developing in
uts I almost always dmake install in uts regardless of which
files I'm changing - if the workspace is already built it only takes
a few minutes typically.
Cheers
Gavin
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code