1 .\" Copyright (c) 2018 Edward Tomasz Napierala <trasz@FreeBSD.org>
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\" notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\" notice, this list of conditions and the following disclaimer in the
10 .\" documentation and/or other materials provided with the distribution.
12 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
13 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
16 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 development is split into three major subprojects: doc, ports, and src.
35 Doc is the documentation, such as the
40 .Lk https://docs.FreeBSD.org/en/books/fdp-primer/
42 Ports, described further in
44 are the way to build, package, and install third party software.
47 .Lk https://docs.FreeBSD.org/en/books/porters-handbook/
49 The last one, src, revolves around the source code for the base system,
50 consisting of the kernel, and the libraries and utilities commonly called
53 The Committer's Guide, describing topics relevant to all committers,
56 .Lk https://docs.freebsd.org/en/articles/committers-guide/
59 src development takes place in the project-hosted
60 Git repository, located at:
62 .Lk https://git.FreeBSD.org/src.git
66 .Lk ssh://git@gitrepo.FreeBSD.org/src.git
68 There is also a list of public, read-only Git mirrors at:
70 .Lk https://docs.FreeBSD.org/en/books/handbook/mirrors/#external-mirrors
74 Git branch represents CURRENT;
75 all changes are first committed to CURRENT and then usually cherry-picked
76 back to STABLE, which refers to Git branches such as
78 Every few years a new STABLE is branched from CURRENT,
79 with an incremented major version number.
80 Releases are then branched off STABLE and numbered with consecutive minor
83 The layout of the source tree is described in its
86 Build instructions can be found in
90 Kernel programming interfaces (KPIs) are documented in section 9
94 Regression test suite is described in
96 For coding conventions, see
99 To ask questions regarding development, use the mailing lists,
100 such as freebsd-arch@ and freebsd-hackers@:
102 .Lk https://lists.FreeBSD.org
104 To get your patches integrated into the main
106 repository use Phabricator;
107 it is a code review tool that allows other developers to review the changes,
108 suggest improvements, and, eventually, allows them to pick up the change and
111 .Lk https://reviews.FreeBSD.org
115 build and test status of CURRENT and STABLE branches,
116 the continuous integration system is at:
118 .Lk https://ci.FreeBSD.org
121 Check out the CURRENT branch, build it, and install, overwriting the current
123 .Bd -literal -offset indent
124 git clone https://git.FreeBSD.org/src.git src
126 make -sj8 buildworld buildkernel installkernel
131 .Bd -literal -offset indent
133 make -j8 installworld
137 Rebuild and reinstall a single piece of userspace, in this
140 .Bd -literal -offset indent
142 make clean all install
145 Quickly rebuild and reinstall the kernel, only recompiling the files
146 changed since last build; note that this will only work if the full kernel
147 build has been completed in the past, not on a fresh source tree:
148 .Bd -literal -offset indent
150 make -sj8 kernel KERNFAST=1
155 for another CPU architecture,
156 first prepare your source tree by building the cross-toolchain:
157 .Bd -literal -offset indent
159 make -sj8 toolchain TARGET_ARCH=aarch64
162 Afterwards, to build and install a single piece of userspace, use:
163 .Bd -literal -offset indent
165 make buildenv TARGET_ARCH=aarch64
166 make clean all install DESTDIR=/clients/arm
169 Likewise, to quickly rebuild and reinstall the kernel, use:
170 .Bd -literal -offset indent
172 make buildenv TARGET_ARCH=aarch64
173 make -sj8 kernel KERNFAST=1 DESTDIR=/clients/arm
188 manual page was originally written by
189 .An Matthew Dillon Aq Mt dillon@FreeBSD.org
194 It was since extensively modified by
195 .An Eitan Adler Aq Mt eadler@FreeBSD.org
196 to reflect the repository conversion from
197 .Lk https://www.nongnu.org/cvs/ CVS
199 .Lk https://subversion.apache.org/ Subversion .
200 It was rewritten from scratch by
201 .An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org