1*7c478bd9Sstevel@tonic-gate# 2*7c478bd9Sstevel@tonic-gate# CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate# 4*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate# with the License. 8*7c478bd9Sstevel@tonic-gate# 9*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate# and limitations under the License. 13*7c478bd9Sstevel@tonic-gate# 14*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate# 20*7c478bd9Sstevel@tonic-gate# CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate# 22*7c478bd9Sstevel@tonic-gate# 23*7c478bd9Sstevel@tonic-gate#ident "%Z%%M% %I% %E% SMI" 24*7c478bd9Sstevel@tonic-gate# 25*7c478bd9Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 26*7c478bd9Sstevel@tonic-gate# Use is subject to license terms. 27*7c478bd9Sstevel@tonic-gate# 28*7c478bd9Sstevel@tonic-gate# Configuration variables for the runtime environment of the nightly 29*7c478bd9Sstevel@tonic-gate# build script and other tools for construction and packaging of releases. 30*7c478bd9Sstevel@tonic-gate# This script is sourced by 'nightly' and 'bldenv' to set up the environment 31*7c478bd9Sstevel@tonic-gate# for the build. This example is suitable for building a developers workspace, 32*7c478bd9Sstevel@tonic-gate# which will contain the resulting packages and archives. It is based off 33*7c478bd9Sstevel@tonic-gate# the onnv release. It sets NIGHTLY_OPTIONS to make nightly do: 34*7c478bd9Sstevel@tonic-gate# creates cpio archives for bfu (-a) 35*7c478bd9Sstevel@tonic-gate# runs 'make check' (-C) 36*7c478bd9Sstevel@tonic-gate# DEBUG and non-DEBUG builds (-D) 37*7c478bd9Sstevel@tonic-gate# runs lint in usr/src (-l plus the LINTDIRS variable) 38*7c478bd9Sstevel@tonic-gate# sends mail on completion (-m and the MAILTO variable) 39*7c478bd9Sstevel@tonic-gate# creates packages for PIT/RE (-p) 40*7c478bd9Sstevel@tonic-gate# checks for changes in ELF runpaths (-r) 41*7c478bd9Sstevel@tonic-gate# use dmake instead of pmake (-d) 42*7c478bd9Sstevel@tonic-gate# 43*7c478bd9Sstevel@tonic-gateNIGHTLY_OPTIONS="-aCDlmprd"; export NIGHTLY_OPTIONS 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate# This is a variable for the rest of the script - GATE doesn't matter to 46*7c478bd9Sstevel@tonic-gate# nightly itself 47*7c478bd9Sstevel@tonic-gateGATE=onnv-bugfixes; export GATE 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gate# CODEMGR_WS - where is your workspace at (or what should nightly name it) 50*7c478bd9Sstevel@tonic-gateCODEMGR_WS="/builds/$GATE"; export CODEMGR_WS 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gate# PARENT_WS is used to determine the parent of this workspace. This is 53*7c478bd9Sstevel@tonic-gate# for the options that deal with the parent workspace (such as where the 54*7c478bd9Sstevel@tonic-gate# proto area will go). 55*7c478bd9Sstevel@tonic-gatePARENT_WS="/ws/onnv-gate"; export PARENT_WS 56*7c478bd9Sstevel@tonic-gate 57*7c478bd9Sstevel@tonic-gate# CLONE_WS is the workspace nightly should do a bringover from. Since it's 58*7c478bd9Sstevel@tonic-gate# going to bringover usr/src, this could take a while, so we use the 59*7c478bd9Sstevel@tonic-gate# clone instead of the gate (see the gate's README). 60*7c478bd9Sstevel@tonic-gateCLONE_WS="/ws/onnv-clone"; export CLONE_WS 61*7c478bd9Sstevel@tonic-gate 62*7c478bd9Sstevel@tonic-gate# The bringover, if any, is done as STAFFER. 63*7c478bd9Sstevel@tonic-gate# Set STAFFER to your own login as gatekeeper or developer 64*7c478bd9Sstevel@tonic-gate# The point is to use group "staff" and avoid referencing the parent 65*7c478bd9Sstevel@tonic-gate# workspace as root. 66*7c478bd9Sstevel@tonic-gate# Some scripts optionally send mail messages to MAILTO. 67*7c478bd9Sstevel@tonic-gate# 68*7c478bd9Sstevel@tonic-gateSTAFFER=nobody; export STAFFER 69*7c478bd9Sstevel@tonic-gateMAILTO=$STAFFER; export MAILTO 70*7c478bd9Sstevel@tonic-gate 71*7c478bd9Sstevel@tonic-gate# The project (see project(4)) under which to run this build. If not 72*7c478bd9Sstevel@tonic-gate# specified, the build is simply run in a new task in the current project. 73*7c478bd9Sstevel@tonic-gateBUILD_PROJECT=; export BUILD_PROJECT 74*7c478bd9Sstevel@tonic-gate 75*7c478bd9Sstevel@tonic-gate# You should not need to change the next four lines 76*7c478bd9Sstevel@tonic-gateLOCKNAME="`basename $CODEMGR_WS`_nightly.lock"; export LOCKNAME 77*7c478bd9Sstevel@tonic-gateATLOG="$CODEMGR_WS/log"; export ATLOG 78*7c478bd9Sstevel@tonic-gateLOGFILE="$ATLOG/nightly.log"; export LOGFILE 79*7c478bd9Sstevel@tonic-gateMACH=`uname -p`; export MACH 80*7c478bd9Sstevel@tonic-gate 81*7c478bd9Sstevel@tonic-gate# REF_PROTO_LIST - for comparing the list of stuff in your proto area 82*7c478bd9Sstevel@tonic-gate# with. Generally this should be left alone, since you want to see differences 83*7c478bd9Sstevel@tonic-gate# from your parent (the gate). 84*7c478bd9Sstevel@tonic-gate# 85*7c478bd9Sstevel@tonic-gateREF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST 86*7c478bd9Sstevel@tonic-gate 87*7c478bd9Sstevel@tonic-gate# where cpio archives of the OS are placed. Usually this should be left 88*7c478bd9Sstevel@tonic-gate# alone too. 89*7c478bd9Sstevel@tonic-gateCPIODIR="${CODEMGR_WS}/archives/${MACH}/nightly"; export CPIODIR 90*7c478bd9Sstevel@tonic-gate 91*7c478bd9Sstevel@tonic-gate# 92*7c478bd9Sstevel@tonic-gate# build environment variables, including version info for mcs, motd, 93*7c478bd9Sstevel@tonic-gate# motd, uname and boot messages. Mostly you shouldn't change this except 94*7c478bd9Sstevel@tonic-gate# when the release slips (nah) or you move an environment file to a new 95*7c478bd9Sstevel@tonic-gate# release 96*7c478bd9Sstevel@tonic-gate# 97*7c478bd9Sstevel@tonic-gateROOT="$CODEMGR_WS/proto/root_${MACH}"; export ROOT 98*7c478bd9Sstevel@tonic-gateSRC="$CODEMGR_WS/usr/src"; export SRC 99*7c478bd9Sstevel@tonic-gateVERSION="$GATE"; export VERSION 100*7c478bd9Sstevel@tonic-gate 101*7c478bd9Sstevel@tonic-gate# the source product has no SCCS history, and is modified to remove source 102*7c478bd9Sstevel@tonic-gate# that cannot be shipped. EXPORT_SRC is where the clear files are copied, then 103*7c478bd9Sstevel@tonic-gate# modified with 'make EXPORT_SRC'. 104*7c478bd9Sstevel@tonic-gateEXPORT_SRC="$CODEMGR_WS/export_src"; export EXPORT_SRC 105*7c478bd9Sstevel@tonic-gate 106*7c478bd9Sstevel@tonic-gate# CRYPT_SRC is similar to EXPORT_SRC, but after 'make CRYPT_SRC' the files in 107*7c478bd9Sstevel@tonic-gate# xmod/cry_files are saved. They are dropped on the exportable source to create 108*7c478bd9Sstevel@tonic-gate# the domestic build. 109*7c478bd9Sstevel@tonic-gateCRYPT_SRC="$CODEMGR_WS/crypt_src"; export CRYPT_SRC 110*7c478bd9Sstevel@tonic-gate 111*7c478bd9Sstevel@tonic-gate# 112*7c478bd9Sstevel@tonic-gate# the RELEASE and RELEASE_DATE variables are set in Makefile.master; 113*7c478bd9Sstevel@tonic-gate# there might be special reasons to override them here, but that 114*7c478bd9Sstevel@tonic-gate# should not be the case in general 115*7c478bd9Sstevel@tonic-gate# 116*7c478bd9Sstevel@tonic-gate# RELEASE="5.10.1"; export RELEASE 117*7c478bd9Sstevel@tonic-gate# RELEASE_DATE="October 2007"; export RELEASE_DATE 118*7c478bd9Sstevel@tonic-gate 119*7c478bd9Sstevel@tonic-gate# proto area in parent for optionally depositing a copy of headers and 120*7c478bd9Sstevel@tonic-gate# libraries corresponding to the protolibs target 121*7c478bd9Sstevel@tonic-gate# not applicable given the NIGHTLY_OPTIONS 122*7c478bd9Sstevel@tonic-gate# 123*7c478bd9Sstevel@tonic-gatePARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT 124*7c478bd9Sstevel@tonic-gate 125*7c478bd9Sstevel@tonic-gate# 126*7c478bd9Sstevel@tonic-gate# package creation variable. you probably shouldn't change this either. 127*7c478bd9Sstevel@tonic-gate# 128*7c478bd9Sstevel@tonic-gatePKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly"; export PKGARCHIVE 129*7c478bd9Sstevel@tonic-gate 130*7c478bd9Sstevel@tonic-gate# we want make to do as much as it can, just in case there's more than 131*7c478bd9Sstevel@tonic-gate# one problem. 132*7c478bd9Sstevel@tonic-gateMAKEFLAGS=k; export MAKEFLAGS 133*7c478bd9Sstevel@tonic-gate 134*7c478bd9Sstevel@tonic-gate# Magic variable to prevent the devpro compilers/teamware from sending 135*7c478bd9Sstevel@tonic-gate# mail back to devpro on every use. 136*7c478bd9Sstevel@tonic-gateUT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING 137*7c478bd9Sstevel@tonic-gate 138*7c478bd9Sstevel@tonic-gate# Build tools - don't set these unless you know what you're doing. These 139*7c478bd9Sstevel@tonic-gate# variables allows you to get the compilers and onbld files locally or 140*7c478bd9Sstevel@tonic-gate# through cachefs. Set BUILD_TOOLS to pull everything from one location. 141*7c478bd9Sstevel@tonic-gate# Alternately, you can set ONBLD_TOOLS to where you keep the contents of 142*7c478bd9Sstevel@tonic-gate# SUNWonbld and SPRO_ROOT to where you keep the compilers. 143*7c478bd9Sstevel@tonic-gate# 144*7c478bd9Sstevel@tonic-gate#BUILD_TOOLS=/opt; export BUILD_TOOLS 145*7c478bd9Sstevel@tonic-gate#ONBLD_TOOLS=/opt/onbld; export ONBLD_TOOLS 146*7c478bd9Sstevel@tonic-gate#SPRO_ROOT=/opt/SUNspro; export SPRO_ROOT 147*7c478bd9Sstevel@tonic-gate 148*7c478bd9Sstevel@tonic-gate# This goes along with lint - it is a series of the form "A [y|n]" which 149*7c478bd9Sstevel@tonic-gate# means "go to directory A and run 'make lint'" Then mail me (y) the 150*7c478bd9Sstevel@tonic-gate# difference in the lint output. 'y' should only be used if the area you're 151*7c478bd9Sstevel@tonic-gate# linting is actually lint clean or you'll get lots of mail. 152*7c478bd9Sstevel@tonic-gate# You shouldn't need to change this though. 153*7c478bd9Sstevel@tonic-gate#LINTDIRS="$SRC y"; export LINTDIRS 154*7c478bd9Sstevel@tonic-gate 155*7c478bd9Sstevel@tonic-gate# 156*7c478bd9Sstevel@tonic-gate# NT server for realmode builds 157*7c478bd9Sstevel@tonic-gate# 158*7c478bd9Sstevel@tonic-gate#NTSERVER=<hostname>; export NTSERVER 159*7c478bd9Sstevel@tonic-gate 160*7c478bd9Sstevel@tonic-gate# 161*7c478bd9Sstevel@tonic-gate# Reference to IA32 IHV workspace, proto area and packages 162*7c478bd9Sstevel@tonic-gate# 163*7c478bd9Sstevel@tonic-gate#IA32_IHV_WS=/ws/${GATE}-ihv; export IA32_IHV_WS 164*7c478bd9Sstevel@tonic-gate#IA32_IHV_ROOT=$IA32_IHV_WS/proto/root_i386; export IA32_IHV_ROOT 165*7c478bd9Sstevel@tonic-gate#IA32_IHV_PKGS=$IA32_IHV_WS/packages/i386/nightly; export IA32_IHV_PKGS 166*7c478bd9Sstevel@tonic-gate 167*7c478bd9Sstevel@tonic-gate# 168*7c478bd9Sstevel@tonic-gate# Reference to binary-only IA32 IHV packages (for boot floppy construction) 169*7c478bd9Sstevel@tonic-gate# 170*7c478bd9Sstevel@tonic-gate#IA32_IHV_BINARY_PKGS=/ws/${GATE}_ihv_bin 171*7c478bd9Sstevel@tonic-gate#export IA32_IHV_BINARY_PKGS 172*7c478bd9Sstevel@tonic-gate 173*7c478bd9Sstevel@tonic-gate# 174*7c478bd9Sstevel@tonic-gate# Boot floppy proto area 175*7c478bd9Sstevel@tonic-gate# 176*7c478bd9Sstevel@tonic-gate#DCB_ROOT="${CODEMGR_WS}/proto/root_dcb_${MACH}" 177*7c478bd9Sstevel@tonic-gate#BOOTFLOPPY_ROOT="${CODEMGR_WS}/proto/root_BootFloppy_${MACH}" 178*7c478bd9Sstevel@tonic-gate#export DCB_ROOT 179*7c478bd9Sstevel@tonic-gate#export BOOTFLOPPY_ROOT 180*7c478bd9Sstevel@tonic-gate 181*7c478bd9Sstevel@tonic-gate# 182*7c478bd9Sstevel@tonic-gate# Destination for sparc realmode package SUNWrmodu 183*7c478bd9Sstevel@tonic-gate# 184*7c478bd9Sstevel@tonic-gate#SPARC_RM_PKGARCHIVE="${CODEMGR_WS}/packages/sparc_realmode/nightly" 185*7c478bd9Sstevel@tonic-gate#export SPARC_RM_PKGARCHIVE 186*7c478bd9Sstevel@tonic-gate 187*7c478bd9Sstevel@tonic-gate# REF_PROTO_LIST_DCB & REF_PROTO_LIST_BOOTFLOPPY 188*7c478bd9Sstevel@tonic-gate# To compare the list of stuff in your DCB and BootFloppy proto areas 189*7c478bd9Sstevel@tonic-gate# against. Generally this should be left alone, since you want to see 190*7c478bd9Sstevel@tonic-gate# differences from your parent (the gate). 191*7c478bd9Sstevel@tonic-gate# 192*7c478bd9Sstevel@tonic-gate#REF_PROTO_LIST_DCB=$PARENT_WS/usr/src/realmode/proto_list_dcb_${MACH} 193*7c478bd9Sstevel@tonic-gate#REF_PROTO_LIST_BOOTFLOPPY=$PARENT_WS/usr/src/realmode/proto_list_bootfloppy_${MACH} 194*7c478bd9Sstevel@tonic-gate#export REF_PROTO_LIST_DCB 195*7c478bd9Sstevel@tonic-gate#export REF_PROTO_LIST_BOOTFLOPPY 196*7c478bd9Sstevel@tonic-gate 197*7c478bd9Sstevel@tonic-gate# Set this flag to 'n' to disable the automatic validation of the dmake 198*7c478bd9Sstevel@tonic-gate# version in use. The default is to check it. 199*7c478bd9Sstevel@tonic-gate#CHECK_DMAKE=y 200*7c478bd9Sstevel@tonic-gate 201*7c478bd9Sstevel@tonic-gate# Set this flag to 'n' to disable the use of 'checkpaths'. The default, 202*7c478bd9Sstevel@tonic-gate# if the 'N' option is not specified, is to run this test. 203*7c478bd9Sstevel@tonic-gate#CHECK_PATHS=y 204*7c478bd9Sstevel@tonic-gate 205*7c478bd9Sstevel@tonic-gate# Set this flag to 'y' to enable the use of elfsigncmp to validate the 206*7c478bd9Sstevel@tonic-gate# output of elfsign. Doing so requires that 't' be set in NIGHTLY_OPTIONS. 207*7c478bd9Sstevel@tonic-gate# The default is to not verify them. 208*7c478bd9Sstevel@tonic-gate#VERIFY_ELFSIGN=n 209