Skip to content

alhazred/onarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

		     OpenSolaris Buildable Source

#ident	"@(#)README.opensolaris.tmpl	1.2	07/05/03 SMI"

Note: if this is your first OpenSolaris installation, please see the
currently known issues section below to see the minimum build of
Solaris Express - Community Release required to build and install
OpenSolaris.  Either an initial install or an upgrade will work,
provided you use the "Entire Distribution" metacluster.

This delivery of the Buildable Source consists of 4 or 5 pieces:

1. encumbered binaries tarball (on-closed-bins-DATE.PLATFORM.tar.bz2)
2. compiler (Sun Studio 11 is the preferred compiler, and it is free
   for OpenSolaris community members.  You can also use gcc; more on
   that below.)
3. ON build tools package (SUNWonbld-DATE.PLATFORM.tar.bz2)
4. Pre-built BFU archives (on-bfu-DATE.PLATFORM.tar.bz2)
5. source tarball (on-src-DATE.tar.bz2; numbered builds only)

If you just want to install the pre-built archives, you'll need the ON
build tools and the BFU archives.  The tar file will unpack the
archives into archives-DATE/PLATFORM/ (e.g.,
archives-20050612/i386/).  You should review Section A
(changes since the last delivery) and Section B (known issues) before
following the BFU instructions in the Developer's Reference 
(http://www.opensolaris.org/os/community/onnv/devref_toc/).

If you want to build from source, you will need the source, compiler,
ON tools, and "extras" tools.  The encumbered binaries tarball contains
complete binaries (libraries, kernel modules, commands) that are
compatible with the source.  These are binaries that cannot be built
using only the source tarball for one reason or another.  If you wish
to build the kernel (or some portion of it), or if you wish to build a
complete set of installable archives, you will want the encumbered
binaries.

Currently, to obtain source, you can either download the
on-src-DATE.tar.bz2 tarball if you are downloading a build-synchronised
delivery.  Or, you can checkout from the Mercurial repository at
(please see instructions at: http://opensolaris.org/os/project/onnv/)

The buildable source contains the source for our high key-strength
crypto, known as the Encryption Kit (SUNWcry, SUNWcryr, SUNWcryptoint).
Please note that certain countries restrict the redistribtuion of
high key-strength crypto.  If you live in one of these countries,
it is your responsibility to ensure that you are complying with your
country's laws in this area.

For general questions on the buildable source, please ask on the
OpenSolaris Help discussion list (opensolaris-help <at> opensolaris
<dot> org).  For detailed comments about the code, please use
OpenSolaris Code discussion list.  Please note that the mailing lists
are configured to only allow posts via the web forum interface or from
list subscribers.


Currently Known Issues
----------------------
	These were some of the major known issues at the time of this
delivery.  The most recent list is available on the OpenSolaris.org
website in the Nevada community at:
http://opensolaris.org/os/community/onnv/known_issues/

The current minimum SXCR build needed to build the OpenSolaris sources
is Nevada build 76.

1. The sources cannot be used to generate Solaris (pkgadd(1m))
   packages.  (CRs 6414822, 6370204.)

2. "Install -i" has not been tested on all platforms.  It is known not
   to work for the lw8 platform (CR 4818202).

3. Cross-compilation between SPARC and x86 is not supported.  But
   builds on x86 systems (amd64 or i386) will build both amd64 and
   i386 binaries.

   This is unlikely to be fixed any time soon.  If you want to build
   both SPARC and x86, your choices are (a) create two workspaces, or
   (b) access a single workspace using NFS.  If you use a single
   workspace, you'll want to do a "make clean" or "make clobber"
   before building the other platform.  Note that nightly(1) will do a
   "make clobber" for you.

4. You may see console warnings like

     Feb 26 13:55:48 magneto sshd[100804]: libpkcs11: Cannot load PKCS#11
      library /usr/lib/security/pkcs11_softtoken_extra.so.  dlerror:
      ld.so.1: /usr/lib/ssh/sshd: fatal:
      /usr/lib/security/pkcs11_softtoken_extra.so: open failed: No
      such file or directory. See cryptoadm(1M). Skipping this plug-in.
     Feb 26 13:55:48 magneto sshd[100804]: Kerberos mechanism library
      initialization error: unknown error.

   These messages can be ignored unless you need working crypto (e.g.,
   Kerberos).  To fix, change pkcs11_softtoken_extra.so to
   pkcs11_softtoken.so in /etc/crypto/pkcs11.conf and do "svcadm
   restart cryptosvc".

5. bfu needs to be cleaned up so that it can easily handle flag days
   when run externally. This has been coded and mostly tested (CR
   4865419).  This will also fix the "could not copy" error messages.

6. Zones depends on SVR4 packaging data, which is not available in
   OpenSolaris itself currently.  Therefore Zones will not work unless
   your distribution vendor provides packages.  Note that BFU understands
   Zones, so that BFUing on top of a distribution, such as Solaris Express,
   that includes package support will work and will also update any
   existing Zones you may have configured.



Installing from Source
----------------------

Once you have downloaded the tarballs that you need, here are the
steps to build the sources.

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).

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 with the Solaris Developer
   Express release is Studio 12, which is not the standard compiler
   for OpenSolaris code.  If you use Studio 12, you will need to set
   __SSNEXT to the null string in your environment file.  Please do
   report problems with Studio 12, particularly if the problem goes
   away when you use Studio 11 (the current standard compiler).

   If you already have the Studio 11 compiler installed, you can use
   it, provided you have the following patches installed:

     SPARC:
     120760-07 Sun Studio 11: Compiler Common patch for Sun C C++ F77 F95
     121017-02 Sun Studio 11: Patch for Sun C++ 5.8 compiler
     121021-02 Sun Studio 11: Patch for Fortran 95 Dynamic Libraries
     121019-02 Sun Studio 11: Patch for Fortran 95 8.2 Compiler
     121015-02 Sun Studio 11: Patch for Sun C 5.8 compiler

     x86:
     120759-06 Sun Studio 11_x86: Sun Compiler Common patch for x86 backend
     121016-02 Sun Studio 11_x86: Patch for Sun C_x86 5.8 Compiler
     121018-02 Sun Studio 11_x86: Patch for Sun C++ 5.8 compiler

   You may find it easier to install the Studio 11 compilers using the
   tarballs, rather than installing them as packages.

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) to remove the old package.

3b. Install the current onbld tools.

   - The SUNWonbld package is a pkgadd-format directory that has been
     archived using tar and bzip2.  Unpack it in a temporary directory and
     use pkgadd(1M) to install it.  For example:

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

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.

   - (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.<mmdd>).
   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).