Page MenuHomeFreeBSD

D48693.id150017.diff
No OneTemporary

D48693.id150017.diff

diff --git a/share/man/man7/build.7 b/share/man/man7/build.7
--- a/share/man/man7/build.7
+++ b/share/man/man7/build.7
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 10, 2025
+.Dd January 27, 2025
.Dt BUILD 7
.Os
.Sh NAME
@@ -640,7 +640,7 @@
and
.Cm installkernel
process.
-.Bd -literal -offset indent
+.Bd -literal
make PORTS_MODULES=emulators/virtualbox-ose-kmod kernel
.Ed
.It Va LOCAL_MODULES
@@ -895,14 +895,21 @@
fringe uses that do not have a wide appeal.
.El
.Sh FILES
-.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact
+.Bl -tag -width "/usr/share/examples/etc/make.conf" -compact
.It Pa /usr/doc/Makefile
.It Pa /usr/doc/share/mk/doc.project.mk
.It Pa /usr/ports/Mk/bsd.port.mk
.It Pa /usr/ports/Mk/bsd.sites.mk
-.It Pa /usr/share/examples/etc/make.conf
.It Pa /usr/src/Makefile
.It Pa /usr/src/Makefile.inc1
+.Xr make 1
+infrastructure for each tree
+.It Pa /usr/share/examples/etc/make.conf
+example
+.Xr make.conf 5
+.It Pa /etc/src.conf
+src build configuration, see
+.Xr src.conf 5
.El
.Sh EXAMPLES
For an
@@ -911,15 +918,105 @@
.Sx COMMON ITEMS
section in
.Pa src/UPDATING .
+.Ss Build and upgrade system in place
+Check out the CURRENT branch, build it, and install,
+overwriting the current system:
+.Bd -literal -offset indent
+git clone https://git.FreeBSD.org/src.git src
+cd src
+make -sj8 buildworld buildkernel installkernel
+shutdown -r now
+.Ed
+.Pp
+After reboot, install userspace, merge configurations, and delete old
+files:
+.Bd -literal -offset indent
+cd src
+etcupdate -p
+make -j8 installworld
+etcupdate -B
+make delete-old
+reboot
+.Ed
+.Ss Build and upgrade a custom kernel in place
+Create a custom kernel configuration,
+.Va MYKERNEL ,
+by including an existing configuration and using
+.Cm device Ns / Ns Cm nodevice
+and
+.Cm options Ns / Ns Cm nooption
+to select and configure components:
+.Bd -literal -offset indent
+cd src
+cat >> EOF > sys/amd64/conf/MYKERNEL
+include GENERIC
+ident MYKERNEL
+nodevice sound
+EOF
+.Ed
.Pp
-The following sequence of commands can be used to cross-build the system for
-the arm64 (aarch64) architecture on a different host architecture, such as
-amd64:
+After creating the new kernel configuration, build it, and install,
+moving the old kernel to
+.Pa /boot/kernel.old/ :
+.Bd -literal -offset indent
+make -j8 kernel KERNCONF=MYKERNEL
+reboot
+.Ed
+.Ss Build and upgrade a single piece of userspace
+Rebuild and reinstall a single piece of userspace, in this
+case
+.Xr ls 1 :
+.Bd -literal -offset indent
+cd src/bin/ls
+make clean all install
+.Ed
+.Ss Build and upgrade a loadable kernel module
+Rebuild and reinstall a single loadable kernel module, in this case
+.Xr sound 4 :
+.Bd -literal -offset indent
+cd src/sys/modules/sound
+make all install clean cleandepend KMODDIR=/boot/kernel
+.Ed
+.Ss Quickly rebuild a kernel in place
+Quickly rebuild and reinstall the kernel, only recompiling the files
+changed since last build; note that this will only work if the full
+kernel build has been completed in the past, not on a fresh source tree:
+.Bd -literal -offset indent
+cd src
+make -sj8 kernel KERNFAST=1
+.Ed
+.Ss Cross-compiling for different architectures
+To rebuild parts of
+.Fx
+for another CPU architecture,
+first prepare your source tree by building the cross-toolchain:
+.Bd -literal -offset indent
+cd src
+make -sj8 toolchain TARGET_ARCH=aarch64
+.Ed
+.Pp
+The following sequence of commands can be used to cross-build the system
+for the arm64 (aarch64) architecture on a different host architecture,
+such as amd64:
.Bd -literal -offset indent
cd /usr/src
make TARGET=arm64 buildworld buildkernel
make TARGET=arm64 DESTDIR=/clients/arm64 installworld installkernel
.Ed
+.Pp
+Afterwards, to build and install a single piece of userspace, use:
+.Bd -literal -offset indent
+cd src/bin/ls
+make buildenv TARGET_ARCH=aarch64
+make clean all install DESTDIR=/clients/arm
+.Ed
+.Pp
+Likewise, to quickly rebuild and reinstall the kernel, use:
+.Bd -literal -offset indent
+cd src
+make buildenv TARGET_ARCH=aarch64
+make -sj8 kernel KERNFAST=1 DESTDIR=/clients/arm
+.Ed
.Sh SEE ALSO
.Xr cc 1 ,
.Xr install 1 ,
diff --git a/share/man/man7/development.7 b/share/man/man7/development.7
--- a/share/man/man7/development.7
+++ b/share/man/man7/development.7
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 19, 2025
+.Dd January 27, 2025
.Dt DEVELOPMENT 7
.Os
.Sh NAME
@@ -120,75 +120,13 @@
.Pp
.Lk https://ci.FreeBSD.org
.Sh FILES
-.Bl -compact -tag -width "/usr/src/tools/tools/git/git-arc.sh"
+.Bl -tag -compact -width "/usr/src/tools/tools/git/git-arc.sh"
.It Pa /usr/src/CONTRIBUTING.md
.Fx
contribution guidelines
.It Pa /usr/src/tools/tools/git/git-arc.sh
Phabricator review tooling
.El
-.Sh EXAMPLES
-Check out the CURRENT branch, build it, and install, overwriting the current
-system:
-.Bd -literal -offset indent
-git clone https://git.FreeBSD.org/src.git src
-cd src
-make -sj8 buildworld buildkernel installkernel
-shutdown -r now
-.Ed
-.Pp
-After reboot:
-.Bd -literal -offset indent
-cd src
-make -j8 installworld
-reboot
-.Ed
-.Pp
-Rebuild and reinstall a single piece of userspace, in this
-case
-.Xr ls 1 :
-.Bd -literal -offset indent
-cd src/bin/ls
-make clean all install
-.Ed
-.Pp
-Rebuild and reinstall a single loadable kernel module, in this case
-.Xr sound 4 :
-.Bd -literal -offset indent
-cd src/sys/modules/sound
-make all install clean cleandepend KMODDIR=/boot/kernel
-.Ed
-.Pp
-Quickly rebuild and reinstall the kernel, only recompiling the files
-changed since last build; note that this will only work if the full kernel
-build has been completed in the past, not on a fresh source tree:
-.Bd -literal -offset indent
-cd src
-make -sj8 kernel KERNFAST=1
-.Ed
-.Pp
-To rebuild parts of
-.Fx
-for another CPU architecture,
-first prepare your source tree by building the cross-toolchain:
-.Bd -literal -offset indent
-cd src
-make -sj8 toolchain TARGET_ARCH=aarch64
-.Ed
-.Pp
-Afterwards, to build and install a single piece of userspace, use:
-.Bd -literal -offset indent
-cd src/bin/ls
-make buildenv TARGET_ARCH=aarch64
-make clean all install DESTDIR=/clients/arm
-.Ed
-.Pp
-Likewise, to quickly rebuild and reinstall the kernel, use:
-.Bd -literal -offset indent
-cd src
-make buildenv TARGET_ARCH=aarch64
-make -sj8 kernel KERNFAST=1 DESTDIR=/clients/arm
-.Ed
.Sh SEE ALSO
.Xr git 1 ,
.Xr witness 4 ,

File Metadata

Mime Type
text/plain
Expires
Sat, Aug 22, 4:56 PM (10 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37089680
Default Alt Text
D48693.id150017.diff (6 KB)

Event Timeline