xref: /titanic_44/usr/src/tools/env/developer.sh (revision fb9f9b975cb9214fec5dab37d461199adab9b964)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate# with the License.
87c478bd9Sstevel@tonic-gate#
97c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate# and limitations under the License.
137c478bd9Sstevel@tonic-gate#
147c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate#
207c478bd9Sstevel@tonic-gate# CDDL HEADER END
217c478bd9Sstevel@tonic-gate#
227c478bd9Sstevel@tonic-gate#
237c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
267c478bd9Sstevel@tonic-gate# Use is subject to license terms.
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate#	Configuration variables for the runtime environment of the nightly
297c478bd9Sstevel@tonic-gate# build script and other tools for construction and packaging of releases.
307c478bd9Sstevel@tonic-gate# This script is sourced by 'nightly' and 'bldenv' to set up the environment
317c478bd9Sstevel@tonic-gate# for the build. This example is suitable for building a developers workspace,
327c478bd9Sstevel@tonic-gate# which will contain the resulting packages and archives. It is based off
337c478bd9Sstevel@tonic-gate# the onnv release. It sets NIGHTLY_OPTIONS to make nightly do:
347c478bd9Sstevel@tonic-gate#	creates cpio archives for bfu (-a)
357c478bd9Sstevel@tonic-gate#	runs 'make check' (-C)
367c478bd9Sstevel@tonic-gate#	DEBUG and non-DEBUG builds (-D)
377c478bd9Sstevel@tonic-gate#	runs lint in usr/src (-l plus the LINTDIRS variable)
387c478bd9Sstevel@tonic-gate#	sends mail on completion (-m and the MAILTO variable)
397c478bd9Sstevel@tonic-gate#	creates packages for PIT/RE (-p)
407c478bd9Sstevel@tonic-gate#	checks for changes in ELF runpaths (-r)
417c478bd9Sstevel@tonic-gate#	use dmake instead of pmake (-d)
427c478bd9Sstevel@tonic-gate#
437c478bd9Sstevel@tonic-gateNIGHTLY_OPTIONS="-aCDlmprd";		export NIGHTLY_OPTIONS
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gate# This is a variable for the rest of the script - GATE doesn't matter to
467c478bd9Sstevel@tonic-gate# nightly itself
477c478bd9Sstevel@tonic-gateGATE=onnv-bugfixes;			export GATE
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gate# CODEMGR_WS - where is your workspace at (or what should nightly name it)
507c478bd9Sstevel@tonic-gateCODEMGR_WS="/builds/$GATE";			export CODEMGR_WS
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gate# PARENT_WS is used to determine the parent of this workspace. This is
537c478bd9Sstevel@tonic-gate# for the options that deal with the parent workspace (such as where the
547c478bd9Sstevel@tonic-gate# proto area will go).
557c478bd9Sstevel@tonic-gatePARENT_WS="/ws/onnv-gate";			export PARENT_WS
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gate# CLONE_WS is the workspace nightly should do a bringover from. Since it's
587c478bd9Sstevel@tonic-gate# going to bringover usr/src, this could take a while, so we use the
597c478bd9Sstevel@tonic-gate# clone instead of the gate (see the gate's README).
607c478bd9Sstevel@tonic-gateCLONE_WS="/ws/onnv-clone";			export CLONE_WS
617c478bd9Sstevel@tonic-gate
62*fb9f9b97Skupfer# This flag controls whether to build the closed source.  If
63*fb9f9b97Skupfer# undefined, nightly(1) and bldenv(1) will set it according to whether
64*fb9f9b97Skupfer# the closed tree is present.
65*fb9f9b97Skupfer# CLOSED_IS_PRESENT="yes";		export CLOSED_IS_PRESENT
66*fb9f9b97Skupfer
677c478bd9Sstevel@tonic-gate# The bringover, if any, is done as STAFFER.
687c478bd9Sstevel@tonic-gate# Set STAFFER to your own login as gatekeeper or developer
697c478bd9Sstevel@tonic-gate# The point is to use group "staff" and avoid referencing the parent
707c478bd9Sstevel@tonic-gate# workspace as root.
717c478bd9Sstevel@tonic-gate# Some scripts optionally send mail messages to MAILTO.
727c478bd9Sstevel@tonic-gate#
737c478bd9Sstevel@tonic-gateSTAFFER=nobody;				export STAFFER
747c478bd9Sstevel@tonic-gateMAILTO=$STAFFER;			export MAILTO
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gate# The project (see project(4)) under which to run this build.  If not
777c478bd9Sstevel@tonic-gate# specified, the build is simply run in a new task in the current project.
787c478bd9Sstevel@tonic-gateBUILD_PROJECT=;				export BUILD_PROJECT
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gate# You should not need to change the next four lines
817c478bd9Sstevel@tonic-gateLOCKNAME="`basename $CODEMGR_WS`_nightly.lock"; export LOCKNAME
827c478bd9Sstevel@tonic-gateATLOG="$CODEMGR_WS/log";			export ATLOG
837c478bd9Sstevel@tonic-gateLOGFILE="$ATLOG/nightly.log";			export LOGFILE
847c478bd9Sstevel@tonic-gateMACH=`uname -p`;				export MACH
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gate# REF_PROTO_LIST - for comparing the list of stuff in your proto area
877c478bd9Sstevel@tonic-gate# with. Generally this should be left alone, since you want to see differences
887c478bd9Sstevel@tonic-gate# from your parent (the gate).
897c478bd9Sstevel@tonic-gate#
907c478bd9Sstevel@tonic-gateREF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gate# where cpio archives of the OS are placed. Usually this should be left
937c478bd9Sstevel@tonic-gate# alone too.
947c478bd9Sstevel@tonic-gateCPIODIR="${CODEMGR_WS}/archives/${MACH}/nightly";	export CPIODIR
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gate#
977c478bd9Sstevel@tonic-gate#	build environment variables, including version info for mcs, motd,
987c478bd9Sstevel@tonic-gate# motd, uname and boot messages. Mostly you shouldn't change this except
997c478bd9Sstevel@tonic-gate# when the release slips (nah) or you move an environment file to a new
1007c478bd9Sstevel@tonic-gate# release
1017c478bd9Sstevel@tonic-gate#
1027c478bd9Sstevel@tonic-gateROOT="$CODEMGR_WS/proto/root_${MACH}";	export ROOT
1037c478bd9Sstevel@tonic-gateSRC="$CODEMGR_WS/usr/src";         	export SRC
1047c478bd9Sstevel@tonic-gateVERSION="$GATE";			export VERSION
1057c478bd9Sstevel@tonic-gate
1067c478bd9Sstevel@tonic-gate# the source product has no SCCS history, and is modified to remove source
1077c478bd9Sstevel@tonic-gate# that cannot be shipped. EXPORT_SRC is where the clear files are copied, then
1087c478bd9Sstevel@tonic-gate# modified with 'make EXPORT_SRC'.
1097c478bd9Sstevel@tonic-gateEXPORT_SRC="$CODEMGR_WS/export_src";    export EXPORT_SRC
1107c478bd9Sstevel@tonic-gate
1117c478bd9Sstevel@tonic-gate# CRYPT_SRC is similar to EXPORT_SRC, but after 'make CRYPT_SRC' the files in
1127c478bd9Sstevel@tonic-gate# xmod/cry_files are saved. They are dropped on the exportable source to create
1137c478bd9Sstevel@tonic-gate# the domestic build.
1147c478bd9Sstevel@tonic-gateCRYPT_SRC="$CODEMGR_WS/crypt_src";      export CRYPT_SRC
1157c478bd9Sstevel@tonic-gate
1167c478bd9Sstevel@tonic-gate#
1177c478bd9Sstevel@tonic-gate# the RELEASE and RELEASE_DATE variables are set in Makefile.master;
1187c478bd9Sstevel@tonic-gate# there might be special reasons to override them here, but that
1197c478bd9Sstevel@tonic-gate# should not be the case in general
1207c478bd9Sstevel@tonic-gate#
1217c478bd9Sstevel@tonic-gate# RELEASE="5.10.1";			export RELEASE
1227c478bd9Sstevel@tonic-gate# RELEASE_DATE="October 2007";		export RELEASE_DATE
1237c478bd9Sstevel@tonic-gate
1247c478bd9Sstevel@tonic-gate# proto area in parent for optionally depositing a copy of headers and
1257c478bd9Sstevel@tonic-gate# libraries corresponding to the protolibs target
1267c478bd9Sstevel@tonic-gate# not applicable given the NIGHTLY_OPTIONS
1277c478bd9Sstevel@tonic-gate#
1287c478bd9Sstevel@tonic-gatePARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gate#
1317c478bd9Sstevel@tonic-gate#       package creation variable. you probably shouldn't change this either.
1327c478bd9Sstevel@tonic-gate#
1337c478bd9Sstevel@tonic-gatePKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly";	export PKGARCHIVE
1347c478bd9Sstevel@tonic-gate
1357c478bd9Sstevel@tonic-gate# we want make to do as much as it can, just in case there's more than
1367c478bd9Sstevel@tonic-gate# one problem.
1377c478bd9Sstevel@tonic-gateMAKEFLAGS=k;	export MAKEFLAGS
1387c478bd9Sstevel@tonic-gate
1397c478bd9Sstevel@tonic-gate# Magic variable to prevent the devpro compilers/teamware from sending
1407c478bd9Sstevel@tonic-gate# mail back to devpro on every use.
1417c478bd9Sstevel@tonic-gateUT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
1427c478bd9Sstevel@tonic-gate
1437c478bd9Sstevel@tonic-gate# Build tools - don't set these unless you know what you're doing.  These
1447c478bd9Sstevel@tonic-gate# variables allows you to get the compilers and onbld files locally or
1457c478bd9Sstevel@tonic-gate# through cachefs.  Set BUILD_TOOLS to pull everything from one location.
1467c478bd9Sstevel@tonic-gate# Alternately, you can set ONBLD_TOOLS to where you keep the contents of
1477c478bd9Sstevel@tonic-gate# SUNWonbld and SPRO_ROOT to where you keep the compilers.
1487c478bd9Sstevel@tonic-gate#
1497c478bd9Sstevel@tonic-gate#BUILD_TOOLS=/opt;				export BUILD_TOOLS
1507c478bd9Sstevel@tonic-gate#ONBLD_TOOLS=/opt/onbld;			export ONBLD_TOOLS
1517c478bd9Sstevel@tonic-gate#SPRO_ROOT=/opt/SUNspro;			export SPRO_ROOT
1527c478bd9Sstevel@tonic-gate
1537c478bd9Sstevel@tonic-gate# This goes along with lint - it is a series of the form "A [y|n]" which
1547c478bd9Sstevel@tonic-gate# means "go to directory A and run 'make lint'" Then mail me (y) the
1557c478bd9Sstevel@tonic-gate# difference in the lint output. 'y' should only be used if the area you're
1567c478bd9Sstevel@tonic-gate# linting is actually lint clean or you'll get lots of mail.
1577c478bd9Sstevel@tonic-gate# You shouldn't need to change this though.
1587c478bd9Sstevel@tonic-gate#LINTDIRS="$SRC y";	export LINTDIRS
1597c478bd9Sstevel@tonic-gate
1607c478bd9Sstevel@tonic-gate#
1617c478bd9Sstevel@tonic-gate# NT server for realmode builds
1627c478bd9Sstevel@tonic-gate#
1637c478bd9Sstevel@tonic-gate#NTSERVER=<hostname>;			export NTSERVER
1647c478bd9Sstevel@tonic-gate
1657c478bd9Sstevel@tonic-gate#
1667c478bd9Sstevel@tonic-gate# Reference to IA32 IHV workspace, proto area and packages
1677c478bd9Sstevel@tonic-gate#
1687c478bd9Sstevel@tonic-gate#IA32_IHV_WS=/ws/${GATE}-ihv;				export IA32_IHV_WS
1697c478bd9Sstevel@tonic-gate#IA32_IHV_ROOT=$IA32_IHV_WS/proto/root_i386;		export IA32_IHV_ROOT
1707c478bd9Sstevel@tonic-gate#IA32_IHV_PKGS=$IA32_IHV_WS/packages/i386/nightly;	export IA32_IHV_PKGS
1717c478bd9Sstevel@tonic-gate
1727c478bd9Sstevel@tonic-gate#
1737c478bd9Sstevel@tonic-gate# Reference to binary-only IA32 IHV packages (for boot floppy construction)
1747c478bd9Sstevel@tonic-gate#
1757c478bd9Sstevel@tonic-gate#IA32_IHV_BINARY_PKGS=/ws/${GATE}_ihv_bin
1767c478bd9Sstevel@tonic-gate#export IA32_IHV_BINARY_PKGS
1777c478bd9Sstevel@tonic-gate
1787c478bd9Sstevel@tonic-gate#
1797c478bd9Sstevel@tonic-gate# Boot floppy proto area
1807c478bd9Sstevel@tonic-gate#
1817c478bd9Sstevel@tonic-gate#DCB_ROOT="${CODEMGR_WS}/proto/root_dcb_${MACH}"
1827c478bd9Sstevel@tonic-gate#BOOTFLOPPY_ROOT="${CODEMGR_WS}/proto/root_BootFloppy_${MACH}"
1837c478bd9Sstevel@tonic-gate#export DCB_ROOT
1847c478bd9Sstevel@tonic-gate#export BOOTFLOPPY_ROOT
1857c478bd9Sstevel@tonic-gate
1867c478bd9Sstevel@tonic-gate#
1877c478bd9Sstevel@tonic-gate# Destination for sparc realmode package SUNWrmodu
1887c478bd9Sstevel@tonic-gate#
1897c478bd9Sstevel@tonic-gate#SPARC_RM_PKGARCHIVE="${CODEMGR_WS}/packages/sparc_realmode/nightly"
1907c478bd9Sstevel@tonic-gate#export SPARC_RM_PKGARCHIVE
1917c478bd9Sstevel@tonic-gate
1927c478bd9Sstevel@tonic-gate# REF_PROTO_LIST_DCB & REF_PROTO_LIST_BOOTFLOPPY
1937c478bd9Sstevel@tonic-gate# To compare the list of stuff in your DCB and BootFloppy proto areas
1947c478bd9Sstevel@tonic-gate# against. Generally this should be left alone, since you want to see
1957c478bd9Sstevel@tonic-gate# differences from your parent (the gate).
1967c478bd9Sstevel@tonic-gate#
1977c478bd9Sstevel@tonic-gate#REF_PROTO_LIST_DCB=$PARENT_WS/usr/src/realmode/proto_list_dcb_${MACH}
1987c478bd9Sstevel@tonic-gate#REF_PROTO_LIST_BOOTFLOPPY=$PARENT_WS/usr/src/realmode/proto_list_bootfloppy_${MACH}
1997c478bd9Sstevel@tonic-gate#export REF_PROTO_LIST_DCB
2007c478bd9Sstevel@tonic-gate#export REF_PROTO_LIST_BOOTFLOPPY
2017c478bd9Sstevel@tonic-gate
2027c478bd9Sstevel@tonic-gate# Set this flag to 'n' to disable the automatic validation of the dmake
2037c478bd9Sstevel@tonic-gate# version in use.  The default is to check it.
2047c478bd9Sstevel@tonic-gate#CHECK_DMAKE=y
2057c478bd9Sstevel@tonic-gate
2067c478bd9Sstevel@tonic-gate# Set this flag to 'n' to disable the use of 'checkpaths'.  The default,
2077c478bd9Sstevel@tonic-gate# if the 'N' option is not specified, is to run this test.
2087c478bd9Sstevel@tonic-gate#CHECK_PATHS=y
2097c478bd9Sstevel@tonic-gate
2107c478bd9Sstevel@tonic-gate# Set this flag to 'y' to enable the use of elfsigncmp to validate the
2117c478bd9Sstevel@tonic-gate# output of elfsign.  Doing so requires that 't' be set in NIGHTLY_OPTIONS.
2127c478bd9Sstevel@tonic-gate# The default is to not verify them.
2137c478bd9Sstevel@tonic-gate#VERIFY_ELFSIGN=n
214a5c06a9eSmike_s
215a5c06a9eSmike_s# BRINGOVER_FILES is the list of files nightly passes to bringover.
216*fb9f9b97Skupfer# If not set the default is "usr", but it can be used for bringing
217a5c06a9eSmike_s# over deleted_files or other nifty directories.
218*fb9f9b97Skupfer#BRINGOVER_FILES="usr deleted_files"
219