Setting Up a Build Machine for OpenSolaris

There are currently two options you can choose from for building OpenSolaris (exactly the ON gate) -- OpenSolaris 2008.05 and Solaris Express Community Edition (SXCE). As an experiment and learning exercise for myself I decided to start from a scratch and use both of these distributions to set up a build machine. The text below contains the main links I used to get the necessary information and also a lot of wisdom I got from Solaris RPE build masters in Prague -- Vlada Kotal and Vita Batrla.

Iso Images

In the time of writing this blog I used images based on b93 and b94 sources and closed binaries (closed-bins). Download links to both distributions can be found at Downloads web page (part of OpenSolaris web site). OpenSolaris 2008.05 can be also downloaded from opensolaris.com web.

SXCE: Link to SXCE leads to Sun's Downlad Center, which requires a simple registration. If you have already an SDN account you can use this one.

OpenSolaris 2008.05 OpenSolaris 2008.05 can be downloaded directly (no registration is needed) or via BitTorrent. Since the goal is to use the OpenSolaris 2008.05 for building OpenSolaris then the following has to be considered: OpenSolaris 2008.05 is based on Nevada (ON) build 86. OpenSolaris should not be built on a machine, which is more than 2 builds behind the current sources, so it is necessary to update the vanilla OpenSolaris 2008.05 to the most recent development builds. Another option is to download the latest iso image produced, which is based on build 93. The image can be downloaded via BitTorrent or directly from Blastwave mirrors in Santa Clara and Beijing.

OS Installation

I installed both SXCE and OpenSolaris 2008.05 in Parallels virtual machine. Note, that SXCE now also supports ZFS root, so I installed both systems as ZFS only.

Tools

The following tools are needed:

  • Download and install Sun Studio 11 compilers and tools . Do not worry about the language selection (Chinese-Simplified). Again, a simple registration is required, your SDN account can be used.
  • Download the latest ON developer tools (onbld) and install them.
  • OpenSolaris 2008.05: Install Mercurial, Java compiler (SUNj6dev for 32 bit and SUNWj6dvx for 64 bit), and gcc packages (gcc will also install header files):
    $ pfexec pkg install SUNWmercurial
    $ pfexec pkg install SUNWgcc
    $ pfexec pkg install SUNWj6dev
  • Set up you PATH, so output of
    echo $PATH | awk -F':' '{ for (i=1; i<=NF; i++)\\
    printf("%d\\t%s\\n", i, $i); }'

    will look like the following (thanks to Vlad for this tip):
    1 /sbin
    2 /usr/bin
    3 /usr/sbin
    4 /usr/ccs/bin
    5 /opt/onbld/bin
    6 /opt/onbld/bin/i386
    7 /opt/SUNWspro/bin
    8 /usr/sfw/bin
    9 /usr/sfw/sbin
  • Add /opt/SUNWspro/man and /opt/onbld/man to your MANPATH.

Prepare a Workspace

It is a good idea to create a separate ZFS file system for your workspace, for example:
# zfs create rpool/export/workspaces
# zfs set mountpoint="/export/workspaces"\\
rpool/export/workspaces

Get the Sources

How to obtain ON sources and closed-bins is described at the ON/Nevada (ONNV) project web page.

  • Switch to you directory for workspaces and get the ON sources from Mercurial repository:
    hg clone\\
    ssh://anon@hg.opensolaris.org/hg/onnv/onnv-gate
  • Download the closed-bins:
    wget\\
    http://dlc.sun.com/osol/on/downloads/nightly-bins/\\
    on-closed-bins-latest.i386.tar.bz2

    and unpack them inside the onnv-gate directory
    bzcat on-closed-bins-latest.i386.tar.bz2 | tar xf -

Build the ON Gate

The following links provide the necessary information about building the ON gate:

Once you read through the links above you know where to get the opensolaris.sh script. Edit inside it the following variables:
GATE=onnv-gate
CODEMGR_WS="/export/workspaces/$GATE"
STAFFER=your_login

Now you are ready to run the build:
$ nohup nightly ./opensolaris.sh &
and monitor it:
tail -f onnv-gate/log/nightly.log | grep ===
Comments:

Post a Comment:
Comments are closed for this entry.
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today