1.\" Copyright (c) 2000 2.\" Mike W. Meyer 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $FreeBSD$ 26.\" 27.Dd May 3, 2020 28.Dt BUILD 7 29.Os 30.Sh NAME 31.Nm build 32.Nd information on how to build the system 33.Sh DESCRIPTION 34The sources for the 35.Fx 36system and its applications are contained in three different directories, 37normally 38.Pa /usr/src , 39.Pa /usr/doc , 40and 41.Pa /usr/ports . 42These directories may be initially empty or non-existent until updated with 43.Xr svn 1 44or 45.Xr svnlite 1 46or 47.Xr portsnap 8 . 48Directory 49.Pa /usr/src 50contains the 51.Dq "base system" 52sources, which is loosely defined as the things required to rebuild 53the system to a useful state. 54Directory 55.Pa /usr/doc 56contains the source for the system documentation, excluding the manual 57pages. 58Directory 59.Pa /usr/ports 60contains a tree that provides a consistent interface for building and 61installing third party applications. 62For more information about the ports build process, see 63.Xr ports 7 . 64.Pp 65The 66.Xr make 1 67command is used in each of these directories to build and install the 68things in that directory. 69Issuing the 70.Xr make 1 71command in any directory or 72subdirectory of those directories has the same effect as issuing the 73same command in all subdirectories of that directory. 74With no target specified, the things in that directory are just built. 75.Pp 76A source tree is allowed to be read-only. 77As described in 78.Xr make 1 , 79objects are usually built in a separate object directory hierarchy 80specified by the environment variable 81.Va MAKEOBJDIRPREFIX , 82or under 83.Pa /usr/obj 84if variable 85.Va MAKEOBJDIRPREFIX 86is not set. 87The canonical object directory is described in the documentation for the 88.Cm buildworld 89target below. 90.Pp 91The build may be controlled by defining 92.Xr make 1 93variables described in the 94.Sx ENVIRONMENT 95section below, and by the variables documented in 96.Xr make.conf 5 . 97.Pp 98The following list provides the names and actions for the targets 99supported by the build system: 100.Bl -tag -width ".Cm cleandepend" 101.It Cm analyze 102Run Clang static analyzer against all objects and present output on stdout. 103.It Cm check 104Run tests for a given subdirectory. 105The default directory used is 106.Pa ${.OBJDIR} , 107but the check directory can be changed with 108.Pa ${CHECKDIR} . 109.It Cm checkworld 110Run the 111.Fx 112test suite on installed world. 113.It Cm clean 114Remove any files created during the build process. 115.It Cm cleandepend 116Remove the 117.Pa ${.OBJDIR}/${DEPENDFILE}* 118files generated by prior 119.Dq Li "make" 120and 121.Dq Li "make depend" 122steps. 123.It Cm cleandir 124Remove the canonical object directory if it exists, or perform 125actions equivalent to 126.Dq Li "make clean cleandepend" 127if it does not. 128This target will also remove an 129.Pa obj 130link in 131.Pa ${.CURDIR} 132if that exists. 133.Pp 134It is advisable to run 135.Dq Li "make cleandir" 136twice: the first invocation will remove the canonical object directory 137and the second one will clean up 138.Pa ${.CURDIR} . 139.It Cm depend 140Generate a list of build dependencies in file 141.Pa ${.OBJDIR}/${DEPENDFILE} . 142Per-object dependencies are generated at build time and stored in 143.Pa ${.OBJDIR}/${DEPENDFILE}.${OBJ} . 144.It Cm install 145Install the results of the build to the appropriate location in the 146installation directory hierarchy specified in variable 147.Va DESTDIR . 148.It Cm obj 149Create the canonical object directory associated with the current 150directory. 151.It Cm objlink 152Create a symbolic link to the canonical object directory in 153.Pa ${.CURDIR} . 154.It Cm tags 155Generate a tags file using the program specified in the 156.Xr make 1 157variable 158.Va CTAGS . 159The build system supports 160.Xr ctags 1 161and 162.Nm "GNU Global" . 163.El 164.Pp 165The other supported targets under directory 166.Pa /usr/src 167are: 168.Bl -tag -width ".Cm distributeworld" 169.It Cm buildenv 170Spawn an interactive shell with environment variables set up for 171building the system or individual components. 172For cross-building the target architecture needs to be specified with 173.Xr make 1 174variables 175.Va TARGET_ARCH 176and 177.Va TARGET . 178.Pp 179This target is only useful after a complete toolchain (including 180the compiler, linker, assembler, headers and libraries) has been 181built; see the 182.Cm toolchain 183target below. 184.It Cm buildworld 185Build everything but the kernel, configure files in 186.Pa etc , 187and 188.Pa release . 189The object directory can be changed from the default 190.Pa /usr/obj 191by setting the 192.Pa MAKEOBJDIRPREFIX 193.Xr make 1 194variable. 195The actual build location prefix used 196depends on the 197.Va WITH_UNIFIED_OBJDIR 198option from 199.Xr src.conf 5 . 200If enabled it is 201.Pa ${MAKEOBJDIRPREFIX}${.CURDIR}/${TARGET}.${TARGET_ARCH} 202for all builds. 203If disabled it is 204.Pa ${MAKEOBJDIRPREFIX}${.CURDIR} 205for native builds, and 206.Pa ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH}${.CURDIR} 207for cross builds and native builds with variable 208.Va CROSS_BUILD_TESTING 209set. 210.It Cm cleanworld 211Attempt to clean up targets built by a preceding 212.Cm buildworld , 213or similar step built from this source directory. 214.It Cm cleanuniverse 215When 216.Va WITH_UNIFIED_OBJDIR 217is enabled, attempt to clean up targets built by a preceding 218.Cm buildworld , 219.Cm universe , 220or similar step, for any architecture built from this source directory. 221.It Cm distributeworld 222Distribute everything compiled by a preceding 223.Cm buildworld 224step. 225Files are placed in the directory hierarchy specified by 226.Xr make 1 227variable 228.Va DISTDIR . 229This target is used while building a release; see 230.Xr release 7 . 231.It Cm native-xtools 232This target builds a cross-toolchain for the given 233.Sy TARGET 234and 235.Sy TARGET_ARCH , 236as well as a select list of static userland tools for the host system. 237This is intended to be used in a jail where QEMU is used to improve 238performance by avoiding emulating binaries that do not need to be emulated. 239.Sy TARGET 240and 241.Sy TARGET_ARCH 242should be defined. 243.It Cm native-xtools-install 244Installs the results to 245.Pa ${DESTDIR}/${NXTP} 246where 247.Va NXTP 248defaults to 249.Pa nxb-bin . 250.Sy TARGET 251and 252.Sy TARGET_ARCH 253must be defined. 254.It Cm packageworld 255Archive the results of 256.Cm distributeworld , 257placing the results in 258.Va DISTDIR . 259This target is used while building a release; see 260.Xr release 7 . 261.It Cm installworld 262Install everything built by a preceding 263.Cm buildworld 264step into the directory hierarchy pointed to by 265.Xr make 1 266variable 267.Va DESTDIR . 268.Pp 269If installing onto an NFS file system and running 270.Xr make 1 271with the 272.Fl j 273option, make sure that 274.Xr rpc.lockd 8 275is running on both client and server. 276See 277.Xr rc.conf 5 278on how to make it start at boot time. 279.It Cm toolchain 280Create the build toolchain needed to build the rest of the system. 281For cross-architecture builds, this step creates a cross-toolchain. 282.It Cm universe 283For each architecture, 284execute a 285.Cm buildworld 286followed by a 287.Cm buildkernel 288for all kernels for that architecture, 289including 290.Pa LINT . 291This command takes a long time. 292.It Cm kernels 293Like 294.Cm universe 295with 296.Va WITHOUT_WORLDS 297defined so only the kernels for each architecture are built. 298.It Cm worlds 299Like 300.Cm universe 301with 302.Va WITHOUT_KERNELS 303defined so only the worlds for each architecture are built. 304.It Cm update 305Get updated sources as configured in 306.Xr make.conf 5 . 307.It Cm targets 308Print a list of supported 309.Va TARGET 310/ 311.Va TARGET_ARCH 312pairs for world and kernel targets. 313.It Cm tinderbox 314Execute the same targets as 315.Cm universe . 316In addition print a summary of all failed targets at the end and 317exit with an error if there were any. 318.It Cm toolchains 319Create a build toolchain for each architecture supported by the build system. 320.It Cm xdev 321Builds and installs a cross-toolchain and sysroot for the given 322.Sy TARGET 323and 324.Sy TARGET_ARCH . 325The sysroot contains target library and headers. 326The target is an alias for 327.Cm xdev-build 328and 329.Cm xdev-install . 330The location of the files installed can be controlled with 331.Va DESTDIR . 332The target location in 333.Va DESTDIR 334is 335.Pa ${DESTDIR}/${XDTP} 336where 337.Va XDTP 338defaults to 339.Pa /usr/${XDDIR} 340and 341.Va XDDIR 342defaults to 343.Pa ${TARGET_ARCH}-freebsd . 344.It Cm xdev-build 345Builds for the 346.Cm xdev 347target. 348.It Cm xdev-install 349Installs the files for the 350.Cm xdev 351target. 352.It Cm xdev-links 353Installs autoconf-style symlinks to 354.Pa ${DESTDIR}/usr/bin 355pointing into the xdev toolchain in 356.Pa ${DESTDIR}/${XDTP} . 357.El 358.Pp 359Kernel specific build targets in 360.Pa /usr/src 361are: 362.Bl -tag -width ".Cm distributekernel" 363.It Cm buildkernel 364Rebuild the kernel and the kernel modules. 365The object directory can be changed from the default 366.Pa /usr/obj 367by setting the 368.Pa MAKEOBJDIRPREFIX 369.Xr make 1 370variable. 371.It Cm installkernel 372Install the kernel and the kernel modules to directory 373.Pa ${DESTDIR}/boot/kernel , 374renaming any pre-existing directory with this name to 375.Pa kernel.old 376if it contained the currently running kernel. 377The target directory under 378.Pa ${DESTDIR} 379may be modified using the 380.Va INSTKERNNAME 381and 382.Va KODIR 383.Xr make 1 384variables. 385.It Cm distributekernel 386Install the kernel to the directory 387.Pa ${DISTDIR}/kernel/boot/kernel . 388This target is used while building a release; see 389.Xr release 7 . 390.It Cm packagekernel 391Archive the results of 392.Cm distributekernel , 393placing the results in 394.Va DISTDIR . 395This target is used while building a release; see 396.Xr release 7 . 397.It Cm kernel 398Equivalent to 399.Cm buildkernel 400followed by 401.Cm installkernel 402.It Cm kernel-toolchain 403Rebuild the tools needed for kernel compilation. 404Use this if you did not do a 405.Cm buildworld 406first. 407.It Cm reinstallkernel 408Reinstall the kernel and the kernel modules, overwriting the contents 409of the target directory. 410As with the 411.Cm installkernel 412target, the target directory can be specified using the 413.Xr make 1 414variable 415.Va INSTKERNNAME . 416.El 417.Pp 418Convenience targets for cleaning up the install destination directory 419denoted by variable 420.Va DESTDIR 421include: 422.Bl -tag -width ".Cm delete-old-libs" 423.It Cm check-old 424Print a list of old files and directories in the system. 425.It Cm delete-old 426Delete obsolete base system files and directories interactively. 427When 428.Li -DBATCH_DELETE_OLD_FILES 429is specified at the command line, the delete operation will be 430non-interactive. 431The variables 432.Va DESTDIR , 433.Va TARGET_ARCH 434and 435.Va TARGET 436should be set as with 437.Dq Li "make installworld" . 438.It Cm delete-old-libs 439Delete obsolete base system libraries interactively. 440This target should only be used if no third party software uses these 441libraries. 442When 443.Li -DBATCH_DELETE_OLD_FILES 444is specified at the command line, the delete operation will be 445non-interactive. 446The variables 447.Va DESTDIR , 448.Va TARGET_ARCH 449and 450.Va TARGET 451should be set as with 452.Dq Li "make installworld" . 453.El 454.Sh ENVIRONMENT 455Variables that influence all builds include: 456.Bl -tag -width ".Va MAKEOBJDIRPREFIX" 457.It Va DEBUG_FLAGS 458Defines a set of debugging flags that will be used to build all userland 459binaries under 460.Pa /usr/src . 461When 462.Va DEBUG_FLAGS 463is defined, the 464.Cm install 465and 466.Cm installworld 467targets install binaries from the current 468.Va MAKEOBJDIRPREFIX 469without stripping, 470so that debugging information is retained in the installed binaries. 471.It Va DESTDIR 472The directory hierarchy prefix where built objects will be installed. 473If not set, 474.Va DESTDIR 475defaults to the empty string. 476.It Va MAKEOBJDIRPREFIX 477Defines the prefix for directory names in the tree of built objects. 478Defaults to 479.Pa /usr/obj 480if not defined. 481This variable should only be set in the environment or 482.Pa /etc/src-env.conf 483and not via 484.Pa /etc/make.conf 485or 486.Pa /etc/src.conf 487or the command line. 488.It Va NO_WERROR 489If defined, compiler warnings will not cause the build to halt, 490even if the makefile says otherwise. 491.It Va WITH_CTF 492If defined, the build process will run the DTrace CTF conversion 493tools on built objects. 494.El 495.Pp 496Additionally, builds in 497.Pa /usr/src 498are influenced by the following 499.Xr make 1 500variables: 501.Bl -tag -width ".Va SUBDIR_OVERRIDE" 502.It Va KERNCONF 503Overrides which kernel to build and install for the various kernel 504make targets. 505It defaults to 506.Cm GENERIC . 507.It Va KERNCONFDIR 508Overrides the directory in which 509.Va KERNCONF 510and any files included by 511.Va KERNCONF 512should be found. 513Defaults to 514.Pa sys/${ARCH}/conf . 515.It Va KERNFAST 516If set, the build target 517.Cm buildkernel 518defaults to setting 519.Va NO_KERNELCLEAN , 520.Va NO_KERNELCONFIG , 521and 522.Va NO_KERNELOBJ . 523When set to a value other than 524.Cm 1 525then 526.Va KERNCONF 527is set to the value of 528.Va KERNFAST . 529.It Va LOCAL_DIRS 530If set, this variable supplies a list of additional directories relative to 531the root of the source tree to build as part of the 532.Cm everything 533target. 534The directories are built in parallel with each other, 535and with the base system directories. 536Insert a 537.Va .WAIT 538directive at the beginning of the 539.Va LOCAL_DIRS 540list to ensure all base system directories are built first. 541.Va .WAIT 542may also be used as needed elsewhere within the list. 543.It Va LOCAL_ITOOLS 544If set, this variable supplies a list of additional tools that are used by the 545.Cm installworld 546and 547.Cm distributeworld 548targets. 549.It Va LOCAL_LIB_DIRS 550If set, this variable supplies a list of additional directories relative to 551the root of the source tree to build as part of the 552.Cm libraries 553target. 554The directories are built in parallel with each other, 555and with the base system libraries. 556Insert a 557.Va .WAIT 558directive at the beginning of the 559.Va LOCAL_DIRS 560list to ensure all base system libraries are built first. 561.Va .WAIT 562may also be used as needed elsewhere within the list. 563.It Va LOCAL_MTREE 564If set, this variable supplies a list of additional mtrees relative to the 565root of the source tree to use as part of the 566.Cm hierarchy 567target. 568.It Va LOCAL_TOOL_DIRS 569If set, this variable supplies a list of additional directories relative to 570the root of the source tree to build as part of the 571.Cm build-tools 572target. 573.It Va LOCAL_XTOOL_DIRS 574If set, this variable supplies a list of additional directories relative to 575the root of the source tree to build as part of the 576.Cm cross-tools 577target. 578.It Va PORTS_MODULES 579A list of ports with kernel modules that should be built and installed 580as part of the 581.Cm buildkernel 582and 583.Cm installkernel 584process. 585.Bd -literal -offset indent 586make PORTS_MODULES=emulators/kqemu-kmod kernel 587.Ed 588.It Va STRIPBIN 589Command to use at install time when stripping binaries. 590Be sure to add any additional tools required to run 591.Va STRIPBIN 592to the 593.Va LOCAL_ITOOLS 594.Xr make 1 595variable before running the 596.Cm distributeworld 597or 598.Cm installworld 599targets. 600See 601.Xr install 1 602for more details. 603.It Va SUBDIR_OVERRIDE 604Override the default list of sub-directories and only build the 605sub-directory named in this variable. 606If combined with 607.Cm buildworld 608then all libraries and includes, and some of the build tools will still build 609as well. 610Specifying 611.Cm -DNO_LIBS , 612and 613.Cm -DWORLDFAST 614will only build the specified directory as was done historically. 615When combined with 616.Cm buildworld 617it is necesarry to override 618.Va LOCAL_LIB_DIRS 619with any custom directories containing libraries. 620This allows building a subset of the system in the same way as 621.Cm buildworld 622does using its sysroot handling. 623This variable can also be useful when debugging failed builds. 624.Bd -literal -offset indent 625make some-target SUBDIR_OVERRIDE=foo/bar 626.Ed 627.It Va TARGET 628The target hardware platform. 629This is analogous to the 630.Dq Nm uname Fl m 631output. 632This is necessary to cross-build some target architectures. 633For example, cross-building for ARM64 machines requires 634.Va TARGET_ARCH Ns = Ns Li aarch64 635and 636.Va TARGET Ns = Ns Li arm64 . 637If not set, 638.Va TARGET 639defaults to the current hardware platform, unless 640.Va TARGET_ARCH 641is also set, in which case it defaults to the appropriate 642value for that architecture. 643.It Va TARGET_ARCH 644The target machine processor architecture. 645This is analogous to the 646.Dq Nm uname Fl p 647output. 648Set this to cross-build for a different architecture. 649If not set, 650.Va TARGET_ARCH 651defaults to the current machine architecture, unless 652.Va TARGET 653is also set, in which case it defaults to the appropriate 654value for that platform. 655Typically, one only needs to set 656.Va TARGET . 657.El 658.Pp 659Builds under directory 660.Pa /usr/src 661are also influenced by defining one or more of the following symbols, 662using the 663.Fl D 664option of 665.Xr make 1 : 666.Bl -tag -width ".Va -DNO_KERNELCONFIG" 667.It Va LOADER_DEFAULT_INTERP 668Defines what interpreter the default loader program will have. 669Valid values include 670.Dq 4th , 671.Dq lua , 672and 673.Dq simp . 674This creates the default link for 675.Pa /boot/loader 676to the loader with that interpreter. 677It also determines what interpreter is compiled into 678.Pa userboot . 679.It Va NO_CLEANDIR 680If set, the build targets that clean parts of the object tree use the 681equivalent of 682.Dq make clean 683instead of 684.Dq make cleandir . 685.It Va NO_CLEAN 686If set, no object tree files are cleaned at all. 687This is the default when 688.Va WITH_META_MODE 689is used with 690.Xr filemon 4 691loaded. 692See 693.Xr src.conf 5 694for more details. 695Setting 696.Va NO_CLEAN 697implies 698.Va NO_KERNELCLEAN , 699so when 700.Va NO_CLEAN 701is set no kernel objects are cleaned either. 702.It Va NO_CTF 703If set, the build process does not run the DTrace CTF conversion tools 704on built objects. 705.It Va NO_SHARE 706If set, the build does not descend into the 707.Pa /usr/src/share 708subdirectory (i.e., manual pages, locale data files, timezone data files and 709other 710.Pa /usr/src/share 711files will not be rebuild from their sources). 712.It Va NO_KERNELCLEAN 713If set, the build process does not run 714.Dq make clean 715as part of the 716.Cm buildkernel 717target. 718.It Va NO_KERNELCONFIG 719If set, the build process does not run 720.Xr config 8 721as part of the 722.Cm buildkernel 723target. 724.It Va NO_KERNELOBJ 725If set, the build process does not run 726.Dq make obj 727as part of the 728.Cm buildkernel 729target. 730.It Va NO_DOCUPDATE 731If set, the update process does not update the source of the 732.Fx 733documentation as part of the 734.Dq make update 735target. 736.It Va NO_LIBS 737If set, the libraries phase will be skipped. 738.It Va NO_OBJWALK 739If set, no object directories will be created. 740This should only be used if object directories were created in a 741previous build and no new directories are connected. 742.It Va NO_PORTSUPDATE 743If set, the update process does not update the Ports tree as part of the 744.Dq make update 745target. 746.It Va NO_WWWUPDATE 747If set, the update process does not update the www tree as part of the 748.Dq make update 749target. 750.It Va WORLDFAST 751If set, the build target 752.Cm buildworld 753defaults to setting 754.Va NO_CLEAN , 755.Va NO_OBJWALK , 756and will skip most bootstrap phases. 757It will only bootstrap libraries and build all of userland. 758This option should be used only when it is known that none of the bootstrap 759needs changed and that no new directories have been connected to the build. 760.El 761.Pp 762Builds under directory 763.Pa /usr/doc 764are influenced by the following 765.Xr make 1 766variables: 767.Bl -tag -width ".Va DOC_LANG" 768.It Va DOC_LANG 769If set, restricts the documentation build to the language subdirectories 770specified as its content. 771The default action is to build documentation for all languages. 772.El 773.Pp 774Builds using the 775.Cm universe 776and related targets are influenced by the following 777.Xr make 1 778variables: 779.Bl -tag -width ".Va MAKE_JUST_KERNELS" 780.It Va JFLAG 781Pass the value of this variable to each 782.Xr make 1 783invocation used to build worlds and kernels. 784This can be used to enable multiple jobs within a single architecture's build 785while still building each architecture serially. 786.It Va MAKE_JUST_KERNELS 787Only build kernels for each supported architecture. 788.It Va MAKE_JUST_WORLDS 789Only build worlds for each supported architecture. 790.It Va WITHOUT_WORLDS 791Only build kernels for each supported architecture. 792.It Va WITHOUT_KERNELS 793Only build worlds for each supported architecture. 794.It Va UNIVERSE_TARGET 795Execute the specified 796.Xr make 1 797target for each supported architecture instead of the default action of 798building a world and one or more kernels. 799This variable implies 800.Va WITHOUT_KERNELS . 801.It Va TARGETS 802Only build the listed targets instead of each supported architecture. 803.It Va EXTRA_TARGETS 804In addition to the supported architectures, build the semi-supported 805architectures. 806A semi-supported architecture has build support in the 807.Fx 808tree, but receives significantly less testing and is generally for 809fringe uses that do not have a wide appeal. 810.El 811.Sh FILES 812.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact 813.It Pa /usr/doc/Makefile 814.It Pa /usr/doc/share/mk/doc.project.mk 815.It Pa /usr/ports/Mk/bsd.port.mk 816.It Pa /usr/ports/Mk/bsd.sites.mk 817.It Pa /usr/share/examples/etc/make.conf 818.It Pa /usr/src/Makefile 819.It Pa /usr/src/Makefile.inc1 820.El 821.Sh EXAMPLES 822For an 823.Dq approved 824method of updating your system from the latest sources, please see the 825.Sx COMMON ITEMS 826section in 827.Pa src/UPDATING . 828.Pp 829The following sequence of commands can be used to cross-build the 830system for the armv6 architecture on an amd64 host: 831.Bd -literal -offset indent 832cd /usr/src 833make TARGET_ARCH=armv6 buildworld buildkernel 834make TARGET_ARCH=armv6 DESTDIR=/clients/arm installworld installkernel 835.Ed 836.Sh HISTORY 837The 838.Nm 839manpage first appeared in 840.Fx 4.3 . 841.Sh SEE ALSO 842.Xr cc 1 , 843.Xr install 1 , 844.Xr make 1 , 845.Xr svn 1 , 846.Xr svnlite 1 , 847.Xr make.conf 5 , 848.Xr src.conf 5 , 849.Xr arch 7 , 850.Xr ports 7 , 851.Xr release 7 , 852.Xr tests 7 , 853.Xr config 8 , 854.Xr mergemaster 8 , 855.Xr portsnap 8 , 856.Xr reboot 8 , 857.Xr shutdown 8 858.Sh AUTHORS 859.An Mike W. Meyer Aq Mt mwm@mired.org 860