Installation (from source) Quickstart
en

Installation (from source) Quickstart

[begin README tag - do not delete]

Once you have downloaded the tarballs that you need, here are the
steps to build the sources.  Additional information, including
configuration guidelines for your build machine, is available at
Section 1.3 of the ON Developers Reference: 

  http://hub.opensolaris.org/bin/view/Community+Group+on/devref_1#H13QuickStart


Suppose you are using /export/testws as your workspace.

1. cd to /export/testws and unpack the sources and encumbered
   binaries, e.g.,

    $ bzcat on-src-DATE.tar.bz2 | tar xf -
    $ bzcat on-closed-bins-DATE.PLATFORM.tar.bz2 | tar xf -

   The sources will unpack into "usr/src" and the binaries will unpack
   into "closed/root_PLATFORM" (i.e., closed/root_i386 or
   closed/root_sparc).  Don't unpack the crypto tarball (but see Step
   5 below).

2. Install the compiler according to the instructions at the download
   site.  (Of course, if the compilers have not changed since you last
   installed them, there is no need to install them again.)  The result
   should have the compilers installed in /opt/SUNWspro.

   Please note that the compiler that comes bundled with OpenSolaris
   releases is probably not the correct compiler for building
   OpenSolaris components.

3a. Remove the existing onbld tools, if any.

   - If this is the first time you are installing build tools, skip ahead
     to step 3b.

   - Otherwise, use pkgrm(1M) or the uninstall subcommand of pkg(1) to remove
     the old package.

3b. Install the current onbld tools.

   - The SUNWonbld tarball is an archive of the /opt/onbld directory.
     Unpack it in a temporary directory and then move the opt/onbld
     directory into /opt.  For example: 

        # cd /var/tmp 
        # bzip2 -dc /path/to/SUNWonbld-DATE.PLATFORM.tar.bz2 | tar xf -
        # mv onbld/opt/onbld /opt

4. Update your environment and login dot-files if this is the first
   time you have installed the compiler and/or build tools.

   - Add /opt/SUNWspro/bin and /opt/onbld/bin to your $PATH. 
   - Either remove /usr/ucb from your $PATH, or put it at the end.

5. Create an environment file to guide tools like nightly(1) and
   bldenv(1).  

   - copy /export/testws/usr/src/tools/env/opensolaris.sh to
     /export/testws.  It doesn't have to go in /export/testws, but
     that's a convenient place to put it.  Nor do you have to keep the
     name opensolaris.sh, but that's the name we'll use in these notes.

     Then make the following changes in your opensolaris.sh:

   - change GATE to the name of the top-level directory (e.g.,
     "testws").

   - change CODEMGR_WS to the top-level path (e.g., "/export/testws").

   - change STAFFER to your login.

   - change ON_CRYPTO_BINS to point to your crypto tarball.

   - (optional) customize VERSION.  This is the string that "uname -v"
     will print.

6. To build a complete set of archives, cd to /export/testws, utter

    nightly ./opensolaris.sh &

   and find something else to work on for a few hours.  You can
   monitor the build's progress using ptree(1).  nightly(1) will send
   mail to $MAILTO when it has finished.  

   The results mail from nightly(1) will have an overview of the build
   results.  A copy of the mail text and a more detailed log file will
   be available in the workspace (/export/testws/log/log.YYYY-MM-DD.HH:MM).
   Pieces of the detailed log are also available under usr/src.  For
   example, usr/src/install-i386.out will have the log from the x86
   "make install" part of the build.

   By default nightly(1) will do a "clobber" build, which includes a
   "make clobber" and blowing away any files that earlier builds
   installed into $ROOT (/export/testws/proto/root_PLATFORM).  To
   bypass these steps, do an incremental build with "nightly -i
   ./opensolaris.sh &".

7. To build a specific component, first use bldenv(1) to set up
   various environment variables, then cd to the subtree that you want
   to build.  For example:

    $ cd /export/testws
    $ bldenv -d ./opensolaris.sh
    [status information from bldenv]
    $ cd usr/src/cmd/vi
    $ dmake all

   To build the kernel, run dmake(1) from usr/src/uts.

If you encounter errors, try running with a clean environment:
$ env - HOME=$HOME SHELL=$SHELL DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY \
TERM=$TERM LOGNAME=$LOGNAME LANG=C LC_ALL=C PAGER=less MANPATH=$MANPATH \
/opt/onbld/bin/bldenv ./opensolaris.sh

Please see the Developer's Reference for information on how to install
kernels (using Install(1)) and archives (using BFU).

[end README tag - do not delete]
Tags:
Created by admin on 2009/10/26 12:09
Last modified by Richard Lowe on 2010/04/03 02:42

XWiki Enterprise 2.7.1.34853 - Documentation