Você está na página 1de 3

What I know, What I don't know: Share what

you know and what you don't know with Colin


Zou. :-)
Skip to content, navigation.

Build OpenSolaris Step by Step


The following are steps to build OpenSolaris. My co-workers and I figured out these steps according to
the documents on OpenSolaris.org. These steps are easy to follow and tested on Solaris Express build
63.
1. Download & Install Build Environment:
1.1 Download Compiler (Sun Studio is the preferred compiler, and it is free)
Install the compiler according to the instructions at the download site.
The result should have the compilers installed in /opt/SUNWspro.
1.2 Download ON build tools package (SUNWonbld.PLATFORM.tar.bz2)
http://dlc.sun.com/osol/on/downloads/current/
and install:
# cd $TEMP
# bunzip2 -c SUNWonbld.i386.tar.bz2 |tar xvf -
# yes y | pkgadd -d ./ SUNWonbld
1.3 Fetch ON (OS & Network) source code
# hg clone ssh://anon@hg.opensolaris.org/hg/onnv/onnv-gate
Source tar balls have been deprecated in favour of the onnv project's Mercurial repository. Please see
the onnv project page for more information on how to checkout/clone the repository to download the
source.
1.4 Download Encumbered binaries tarball (on-closed-bins[-nd].PLATFORM.tar.bz2) for debug
and non-debug version
http://dlc.sun.com/osol/on/downloads/current/
Need to extract from tarball and put root_i386 and root_i386-nd under $CODEMGR_WS/closed,
For example:
If the source code is in "/export/testws/usr/src", then the binaries will be in
"/export/testws/closed/root_PLATFORM"
(i.e., closed/root_i386 or closed/root_sparc). For non-debug version, it is closed/root_i386-nd or
closed/root_sparc-nd.
2. Environment setup

2.1 PATH
# PATH=/opt/SUNWspro/bin:/opt/onbld/bin:/opt/onbld/bin/i386:$PATH
2.2 Copy and set environment file
# cp usr/src/tools/env/opensolaris.sh /export/testws/
modify opensolaris.sh for your $CODEMGR_WS, $STAFF, $MAILTO settings
• change GATE to none or the name of the top-level directory (e.g., "testws").
• change CODEMGR_WS to the your workspace (e.g., "/export/testws").
• change STAFFER to your login (e.g., root).
• (optional) change MAILTO to you email address.
• (optional) customize VERSION. This is the string that "uname -v"
will print.
3. Build
3.1 Nightly Build (build the whole ON source)
# nightly ./opensolaris.sh & tail -f log/nightly.log
nightly options:
• -n: no bringover (default)
• -i: incremental build (no clobber)
• -D: do a build with DEBUG on
• -F: do not do a non-DEBUG build
3.2 Single module Build
• make a single module:
bldenv opensolaris.sh; cd usr/src/uts/intel/i915; make

[ Reference links]
• Building Opensolaris
• A Chinese Guide of OpenSolaris build (it's for snv_23 only, but is quite workable with current
builds)ON/Nevada project page
• Glossary(consolidation, gate, ON, Nevada, putback, workspace, WOS, etc.)
• Operating System/Networking (ON) Download Center
• OpenSolaris Download Center, which contains:
• ON source

• SUNWonbld

• on-closed-bins
Posted on: Oct 04, 2007
Posted by: colin
Category: Technology
Permanent link to this entry

Você também pode gostar