Since google doesn't really want to be friendly and put howto compile onnv-gate at the top I thought this quick-start guide would maybe be helpful to others.
Two small disclaimers:
- I'm working on a side project which changes all this for the better and could use help
- I apologize if this entry is hard to read. There's five steps and you'll have to read the notes since your env could differ from mine.
Prerequisites:
- Patched SunStudio 12
- Fixed patchadd
- onbld tools
- closed bins
Note: Currently, snv_103 onnv-gate requires SS12 (SunStudio 12)
http://developers.sun.com/sunstudio/
Here's how to fix patchadd if you haven't done so already
In this specific example I'm pulling revision 103..
# cd some/place/you/have/enough/space
(I build all my gates in /usr/local/src so will use that from now on.)
Step 1. Pull the onnv-gate source
# hg clone -r onnv_103 ssh://anon@hg.opensolaris.org/hg/onnv/onnv-gate
# We cd to onnv-gate only once because I assume you are doing this start-to-finish
# cd onnv-gate
Step 2. Copy and modify opensolaris.sh
# cp usr/src/tools/env/opensolaris.sh .
# vi opensolaris.sh # Or your favorite editor
STAFF
(Change to your current user)
GATE
(Change from testws to onnv-gate)
CODEMGR_WS
( Change from /export/$GATE to /usr/local/src/$GATE or adjust as your path differs)
Step 3. Install onbld tools
Visit: http://dlc.sun.com/osol/on/downloads/b103/ # or bNNN for your revision of choice
Download: SUNWonbld.i386.tar.bz2
# bzip2 -dc /path/to/SUNWonbld-i386.tar.bz2 | tar xf -
# pkgadd -d onbld SUNWonbld # You'll have to be root to do this
# rm -rf /path/to/SUNWonbld
Note: You should add /opt/onbld/bin:/opt/onbld/bin/i386 to your path.. You'll need it later
Step 4. Unpack closed binaries
Note: Needed for now, but myself and others are working on removing this in OSUNIX
Download : on-closed-bins.i386.tar.bz2
# bzip2 -dc on-closed-bins.i386.tar.bz2 | tar xf -
Step 5. Building onnv-gate (fun part right?)
Choice 1. Whole thing and wait
# nightly ./opensolaris.sh &
Choice 2. Pick an area
# bldenv -d ./opensolarish.sh ; cd usr/src/somewhere ; dmake
Note: Must use posix make or dmake
Note:
kernel is in usr/src/uts which you have to build manually
Feel like hacking libc? usr/src/lib/libc
Congratulations! You've survived the Sun gauntlet for compiling onnv-gate for the first time.
Tips:
Adding this will save you time since the default opensolaris.sh will compile everything *twice* without it. (By twice I mean.. compiler with sun studio and 2nd secret shadow pass with gcc)
export CW_NO_SHADOW=