[BACK]Return to BUILDING CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/BUILDING between version 1.108 and 1.122.2.1

version 1.108, 2014/08/03 09:28:43 version 1.122.2.1, 2017/03/20 06:51:32
Line 1 
Line 1 
 BUILDING(8)                 System Manager's Manual                BUILDING(8)  BUILDING(8)                 System Manager's Manual                BUILDING(8)
   
 NAME  NAME
      BUILDING -- Procedure for building NetBSD from source code.       BUILDING - Procedure for building NetBSD from source code.
   
 REQUIREMENTS  REQUIREMENTS
      NetBSD is designed to be buildable on most POSIX-compliant host systems.       NetBSD is designed to be buildable on most POSIX-compliant host systems.
Line 77  FILES
Line 77  FILES
                     any of these directories are missing, they will be skipped                      any of these directories are missing, they will be skipped
                     during the build.                      during the build.
   
      x11/           ``Reachover'' build structure for X11R6; the source is in       external/mit/xorg/
                     X11SRCDIR.                      ``Reachover'' build structure for modular Xorg; the source
                       is in X11SRCDIR.
   
        extsrc/        ``Reachover'' build structure for externally added
                       programs and libraries; the source is in EXTSRCSRCDIR.
   
    Build tree layout     Build tree layout
      The NetBSD build tree is described in hier(7), and the release layout is       The NetBSD build tree is described in hier(7), and the release layout is
Line 197  CONFIGURATION
Line 201  CONFIGURATION
                  Note: build.sh will provide a default of destdir.MACHINE (in                   Note: build.sh will provide a default of destdir.MACHINE (in
                  the top-level .OBJDIR) unless run in `expert' mode.                   the top-level .OBJDIR) unless run in `expert' mode.
   
        EXTSRCSRCDIR
                    Directory containing sources of externally added programs and
                    libraries.  If specified, must be an absolute path.
   
                    Default: NETBSDRCDIR/../extsrc, if that exists; otherwise
                    /usr/extsrc.
   
      MAKECONF    The name of the make(1) configuration file.  Only settable in       MAKECONF    The name of the make(1) configuration file.  Only settable in
                  the process environment.                   the process environment.
   
Line 264  CONFIGURATION
Line 275  CONFIGURATION
   
                  Default: ``yes''                   Default: ``yes''
   
        MKEXTSRC    Can be set to ``yes'' or ``no''.  Indicates whether extsrc is
                    built from EXTSRCSRCDIR.
   
                    Default: ``no''
   
      MKHTML      Can be set to ``yes'' or ``no''.  Indicates whether       MKHTML      Can be set to ``yes'' or ``no''.  Indicates whether
                  preformatted HTML manual pages will be built and installed                   preformatted HTML manual pages will be built and installed
   
Line 333  CONFIGURATION
Line 349  CONFIGURATION
                  statically linked.                   statically linked.
   
                  Default: Platform dependent.  As of this writing, all                   Default: Platform dependent.  As of this writing, all
                  platforms except sh3 default to ``yes''.                   platforms except m68000 default to ``yes''.
   
      MKPICINSTALL       MKPICINSTALL
                  Can be set to ``yes'' or ``no''.  Indicates whether the ar(1)                   Can be set to ``yes'' or ``no''.  Indicates whether the ar(1)
Line 350  CONFIGURATION
Line 366  CONFIGURATION
                  by default at times due to toolchain problems with profiled                   by default at times due to toolchain problems with profiled
                  code.                   code.
   
      MKREPRO     Can be set to ``yes'' or ``no''.  Create reproducable builds.       MKREPRO     Can be set to ``yes'' or ``no''.  Create reproducible builds.
                  This enables different switches to make two builds from the                   This enables different switches to make two builds from the
                  same source tree result in the same build results.                   same source tree result in the same build results.
   
                  Default: ``no''                   Default: ``no'' This may be set to ``yes'' by giving build.sh
                    the -P option.
   
        MKREPRO_TIMESTAMP
                    Unix timestamp.  When MKREPRO is set, the timestamp of all
                    files in the sets will be set to this value.
   
                    Default: Unset.  This may be set automatically to the latest
                    source tree timestamp using cvslatest(1) by giving build.sh
                    the -P option.
   
      MKSHARE     Can be set to ``yes'' or ``no''.  Indicates whether files       MKSHARE     Can be set to ``yes'' or ``no''.  Indicates whether files
                  destined to reside in DESTDIR/usr/share will be built and                   destined to reside in DESTDIR/usr/share will be built and
Line 427  CONFIGURATION
Line 452  CONFIGURATION
                  USETOOLS is also set to ``no'' when using <bsd.*.mk> outside                   USETOOLS is also set to ``no'' when using <bsd.*.mk> outside
                  the NetBSD source tree.                   the NetBSD source tree.
   
      X11SRCDIR   Directory containing the X11R6 source.  If specified, must be       X11SRCDIR   Directory containing the modular Xorg source.  If specified,
                  an absolute path.  The main X11R6 source is found in                   must be an absolute path.  The main modular Xorg source is
                  X11SRCDIR/xfree/xc.                   found in X11SRCDIR/external/mit.
   
                  Default: NETBSDRCDIR/../xsrc, if that exists; otherwise                   Default: NETBSDRCDIR/../xsrc, if that exists; otherwise
                  /usr/xsrc.                   /usr/xsrc.
   
      X11FLAVOUR  The style of X11 cross-built, set to either ``Xorg'' or  
                  ``XFree86''.  
   
                  Default: ``Xorg'' on amd64, i386, macppc, shark and sparc64  
                  platforms, ``XFree86'' on everything else.  
   
    "make" variables for full builds     "make" variables for full builds
      These variables only affect the top level ``Makefile'' and do not affect       These variables only affect the top level ``Makefile'' and do not affect
      manually building subtrees of the NetBSD source code.       manually building subtrees of the NetBSD source code.
Line 632  BUILDING
Line 651  BUILDING
                    set (see above).                     set (see above).
   
      iso-image     Create a NetBSD installation CD-ROM image in the       iso-image     Create a NetBSD installation CD-ROM image in the
                    RELEASEDIR/iso directory.  The CD-ROM file system will have                     RELEASEDIR/images directory.  The CD-ROM file system will
                    a layout as described in release(7).                     have a layout as described in release(7).
   
                    For most machine types, the CD-ROM will be bootable, and                     For most machine types, the CD-ROM will be bootable, and
                    will automatically run the sysinst(8) menu-based                     will automatically run the sysinst(8) menu-based
Line 649  BUILDING
Line 668  BUILDING
                    the RELEASEDIR/RELEASEMACHINEDIR/installation/cdrom                     the RELEASEDIR/RELEASEMACHINEDIR/installation/cdrom
                    directory by ``make release''.  These smaller images                     directory by ``make release''.  These smaller images
                    usually contain the same tools as the larger images in                     usually contain the same tools as the larger images in
                    RELEASEDIR/iso, but do not contain additional content such                     RELEASEDIR/images, but do not contain additional content
                    as the distribution sets.                     such as the distribution sets.
   
                    Note that the mac68k port still uses an older method of                     Note that the mac68k port still uses an older method of
                    creating CD-ROM images.  This requires the mkisofs(1)                     creating CD-ROM images.  This requires the mkisofs(1)
Line 659  BUILDING
Line 678  BUILDING
   
      iso-image-source       iso-image-source
                    Create a NetBSD installation CD-ROM image in the                     Create a NetBSD installation CD-ROM image in the
                    RELEASEDIR/iso directory.  The CD-ROM file system will have                     RELEASEDIR/images directory.  The CD-ROM file system will
                    a layout as described in release(7).  It will have top                     have a layout as described in release(7).  It will have top
                    level directories for the machine type and source.                     level directories for the machine type and source.
   
                    For most machine types, the CD-ROM will be bootable, and                     For most machine types, the CD-ROM will be bootable, and
Line 678  BUILDING
Line 697  BUILDING
                    the RELEASEDIR/RELEASEMACHINEDIR/installation/cdrom                     the RELEASEDIR/RELEASEMACHINEDIR/installation/cdrom
                    directory by ``make release''.  These smaller images                     directory by ``make release''.  These smaller images
                    usually contain the same tools as the larger images in                     usually contain the same tools as the larger images in
                    RELEASEDIR/iso, but do not contain additional content such                     RELEASEDIR/images, but do not contain additional content
                    as the distribution sets.                     such as the distribution sets.
   
                    Note that the mac68k port still uses an older method of                     Note that the mac68k port still uses an older method of
                    creating CD-ROM images.  This requires the mkisofs(1)                     creating CD-ROM images.  This requires the mkisofs(1)
Line 706  BUILDING
Line 725  BUILDING
                    must have been performed with MKUNPRIVED=yes because ``make                     must have been performed with MKUNPRIVED=yes because ``make
                    install-image'' relies on information in DESTDIR/METALOG.                     install-image'' relies on information in DESTDIR/METALOG.
   
      live-image    Create NetBSD live images in the       live-image    Create NetBSD live images in the RELEASEDIR/images
                    RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage  
                    directory.  The live image contains all necessary files to                     directory.  The live image contains all necessary files to
                    boot NetBSD up to multi-user mode, including all files                     boot NetBSD up to multi-user mode, including all files
                    which should be extracted during installation, NetBSD                     which should be extracted during installation, NetBSD
Line 820  BUILDING
Line 838  BUILDING
                    symbol table and can be used for debugging (for example                     symbol table and can be used for debugging (for example
                    with a cross-gdb built by MKCROSSGDB).                     with a cross-gdb built by MKCROSSGDB).
   
        kernels       This command will build all kernels defined in port
                      specific release build procedure.
   
                      This command internally calls the kernel=kconf operation
                      for each found kernel configuration file.
   
      modules       This command will build kernel modules and install them       modules       This command will build kernel modules and install them
                    into DESTDIR.                     into DESTDIR.
   
Line 846  BUILDING
Line 870  BUILDING
   
      live-image    Perform ``make live-image''.       live-image    Perform ``make live-image''.
   
        list-arch     Prints a list of valid MACHINE and MACHINE_ARCH settings,
                      the default MACHINE_ARCH for each MACHINE, and aliases for
                      MACHINE/MACHINE_ARCH pairs, and then exits.  The -m or -a
                      options (or both) may be used to specify glob patterns that
                      will be used to narrow the list of results; for example,
                      ``build.sh -m 'evm*' -a '*arm*' list-arch'' will list all
                      known MACHINE/MACHINE_ARCH values in which either MACHINE
                      or ALIAS matches the pattern `evb*', and MACHINE_ARCH
                      matches the pattern `*arm*'.
   
      The following command line options alter the behaviour of the build.sh       The following command line options alter the behaviour of the build.sh
      operations described above:       operations described above:
   
      -a arch   Set the value of MACHINE_ARCH to arch.       -a arch   Set the value of MACHINE_ARCH to arch.  See the -m option for
                  more information.
   
      -B buildid       -B buildid
                Set the value of BUILDID to buildid.  This will also append the                 Set the value of BUILDID to buildid.  This will also append the
Line 908  BUILDING
Line 943  BUILDING
                relative path.  If the directory does not already exist,                 relative path.  If the directory does not already exist,
                build.sh will create it.                 build.sh will create it.
   
      -m mach   Set the value of MACHINE to mach, except in some special cases       -m mach   Set the value of MACHINE to mach, unless the mach argument is
                listed below.  This will also override any value of                 an alias that refers to a MACHINE/MACHINE_ARCH pair, in which
                MACHINE_ARCH in the process environment with a value deduced                 case both MACHINE and MACHINE_ARCH are set from the alias.
                from mach, unless -a is specified.  All cross builds require                 Such aliases are interpreted entirely by build.sh; they are not
                -m, but if unset on a NetBSD host, the host's value of MACHINE                 used by any other part of the build system.  The MACHINE_ARCH
                will be detected and used automatically.                 setting implied by mach will override any value of MACHINE_ARCH
                  in the process environment, but will not override a value set
                Some machines support multiple values for MACHINE_ARCH.  The                 by the -a option.  All cross builds require -m, but if unset on
                following special cases for the mach argument are defined to                 a NetBSD host, the host's value of MACHINE will be detected and
                set the listed values of MACHINE and MACHINE_ARCH:                 used automatically.
   
                      mach          MACHINE    MACHINE_ARCH                 See the list-arch operation for a way to get a list of valid
                      evbarm        evbarm     (not set)                 MACHINE and MACHINE_ARCH settings.
                      evbarm-eb     evbarm     armeb  
                      evbarm-el     evbarm     arm  
                      evbmips       evbmips    (not set)  
                      evbmips-eb    evbmips    mipseb  
                      evbmips-el    evbmips    mipsel  
                      evbsh3        evbsh3     (not set)  
                      evbsh3-eb     evbsh3     sh3eb  
                      evbsh3-el     evbsh3     sh3el  
                      sbmips        sbmips     (not set)  
                      sbmips-eb     sbmips     mipseb  
                      sbmips-el     sbmips     mipsel  
   
      -N noiselevel       -N noiselevel
                Set the ``noisyness'' level of the build, by setting                 Set the ``noisyness'' level of the build, by setting
Line 963  BUILDING
Line 987  BUILDING
                by the values of several variables and by the location of the                 by the values of several variables and by the location of the
                source directory.                 source directory.
   
                  Note that placing the obj directory location outside of the
                  default source tree hierarchy makes it easier to manually clear
                  out old files in the event the ``make cleandir'' operation is
                  unable to do so.  (See CAVEATS below.)
   
                  Note also that use of one of -M or -O is the only means of
                  building multiple machine architecture userlands from the same
                  source tree without cleaning between builds (in which case, one
                  would specify distinct obj locations for each).
   
      -o        Set the value of MKOBJDIRS to ``no''.  Otherwise, it will be       -o        Set the value of MKOBJDIRS to ``no''.  Otherwise, it will be
                automatically set to ``yes''.  This default is opposite to the                 automatically set to ``yes''.  This default is opposite to the
                behaviour when not using build.sh.                 behaviour when not using build.sh.
Line 1006  BUILDING
Line 1040  BUILDING
   
      -x        Set MKX11=yes.       -x        Set MKX11=yes.
   
        -Y extsrcdir
                  Set the value of EXTSRCSRCDIR to extsrcdir.  If a relative path
                  is specified, it will be converted to an absolute path before
                  being used.
   
        -y        Set MKEXTSRC=yes.
   
      -Z var    Unset ("zap") the environment variable var.  This is propagated       -Z var    Unset ("zap") the environment variable var.  This is propagated
                to the nbmake wrapper.                 to the nbmake wrapper.
   
Line 1064  HISTORY
Line 1105  HISTORY
      The build.sh based build scheme was introduced for NetBSD 1.6 as       The build.sh based build scheme was introduced for NetBSD 1.6 as
      USE_NEW_TOOLCHAIN, and re-worked to TOOLCHAIN_MISSING after that.       USE_NEW_TOOLCHAIN, and re-worked to TOOLCHAIN_MISSING after that.
   
 NetBSD                          August 3, 2014                          NetBSD  CAVEATS
        After significant updates to third-party components in the source tree,
        the ``make cleandir'' operation may be insufficient to clean out old
        files in object directories.  Instead, one may have to manually remove
        the files.  Consult the UPDATING file for notices concerning this.
   
   NetBSD                         February 20, 2017                        NetBSD

Legend:
Removed from v.1.108  
changed lines
  Added in v.1.122.2.1

CVSweb <webmaster@jp.NetBSD.org>