Editing and compiling FreeBSD source

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Sep 17 12:49:09 PDT 2004


On 2004-09-17 21:31, Andrew Novikov <mymuss at gmail.com> wrote:
> On Tue, 14 Sep 2004 08:54:02 +0000, cantarella at senffnet.com.br wrote:
> > This is my first e-mail for this list.
> > I am interested in studing to better understand FreeBSD?s source code.
> > With 'make buildkernel' and 'make installkernel' is it possible to
> > compile the changes that I have made?
> > The changes are simple (just some printf). I am just beginning this
> > trip through FreeBSD?s source code.
>
> yes, as long as your changes were made under /usr/src/sys/

If the changes are trivial (i.e. just an extra printf() call, as
suggested above) you might even get away with something faster:

	# cd /usr/src
	# make -DNOCLEAN buildkernel

or even, by directly using "make" in the object directory, i.e.:

	# cd /usr/obj/usr/src/sys/SOLERO
	# make && make install

Before you start taking such shortcuts though, you should definitely get
acquainted with the build process of FreeBSD.  The Handbook contains an
entire chapter on building and installing from the sources.  Please read
it carefully.  As many times as it takes...

Regards,
Giorgos



More information about the freebsd-hackers mailing list