Home | History | Annotate | only in /onnv/onnv-gate/usr/src/tools
Up to higher level directory
NameDateSize
abi/06-Nov-2007
aw/06-Nov-2007
bfuld/06-Nov-2007
codereview/06-Nov-2007
codesign/06-Nov-2007
cscope-fast/06-Nov-2007
ctf/06-Nov-2007
cw/06-Nov-2007
depcheck/06-Nov-2007
elfextract/06-Nov-2007
elfsign/06-Nov-2007
env/06-Nov-2007
fastfs/06-Nov-2007
findunref/06-Nov-2007
gk/06-Nov-2007
install.bin/06-Nov-2007
lintdump/06-Nov-2007
Makefile06-Mar-20082.6K
Makefile.targ03-Apr-20081.1K
Makefile.tools06-Nov-20072.5K
mbh_patch/06-Nov-2007
ndrgen/06-Nov-2007
opensolaris/06-Nov-2007
pmodes/06-Nov-2007
protocmp/06-Nov-2007
protolist/06-Nov-2007
README.tools06-Nov-200711.7K
req.flg30-Apr-20081.5K
scripts/09-May-2008
stabs/06-Nov-2007
SUNWmrtools/06-Nov-2007
SUNWonbld/06-Nov-2007
tokenize/06-Nov-2007

README.tools

      1 #
      2 # CDDL HEADER START
      3 #
      4 # The contents of this file are subject to the terms of the
      5 # Common Development and Distribution License (the "License").
      6 # You may not use this file except in compliance with the License.
      7 #
      8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9 # or http://www.opensolaris.org/os/licensing.
     10 # See the License for the specific language governing permissions
     11 # and limitations under the License.
     12 #
     13 # When distributing Covered Code, include this CDDL HEADER in each
     14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15 # If applicable, add the following below this CDDL HEADER, with the
     16 # fields enclosed by brackets "[]" replaced with your own identifying
     17 # information: Portions Copyright [yyyy] [name of copyright owner]
     18 #
     19 # CDDL HEADER END
     20 #
     21 #
     22 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 #
     25 #ident	"%Z%%M%	%I%	%E% SMI"
     26 
     27 This directory contains the tools used to do a full build of the
     28 OS/Net workspace.  They usually live in the /opt/onbld directory on build
     29 machines. From here, 'make install' will build and install the tools
     30 in $ROOT/opt/onbld. If you like, 'make pkg' will build the SUNWonbld
     31 package in $(PKGARCHIVE). Installing that package will populate the
     32 /opt/onbld directory, and create a root account for building called 'gk',
     33 which uses csh and has a home directory of /opt/onbld/gk. You can
     34 use this account to do full builds with 'nightly'. You don't have to,
     35 but the 'gk' account has the path setup properly, has a .make.machines
     36 file for dmake, and has a .login that sets up for dmake.
     37 
     38 Layout of /opt/onbld
     39 --------------------
     40 
     41 /opt/onbld/etc/abi
     42 	contains Solaris ABI database (ABI_*.db) and exceptions
     43 	for ABI Auditing tool (intf_check).
     44 
     45 /opt/onbld/gk
     46 	gk account's home directory.
     47 
     48 /opt/onbld/bin
     49 	basic bin directory - contains scripts.
     50 
     51 /opt/onbld/bin/${MACH}
     52 	architecture-specific bin directory for binaries.
     53 
     54 /opt/onbld/env
     55 	build environment files.
     56 
     57 /opt/onbld/man
     58 	rudimentary man pages for some of the tools.
     59 
     60 
     61 Tool Summary
     62 ------------
     63 
     64 bfu
     65 	bonwick/faulkner upgrade. Loads a set of cpio archives created
     66 	by 'mkbfu' onto a machine, either live or on alternate root
     67 	and /usr filesystems. Attempts to preserve important files,
     68 	but may require manual intervention before reboot to resolve
     69 	changes to preserved files.
     70 
     71 bfuld
     72 	Used by bfu to survive getting a new runtime linker when extracting
     73 	new cpio archives onto a live system. Patches binaries to use
     74 	a saved runtime linker in /tmp during the bfu process.
     75 	Not run by anything but bfu.
     76 
     77 bldenv
     78 	companion to 'nightly.' Takes the same environment file you
     79 	used with 'nightly,' and starts a shell with the environment
     80 	set up the same way as 'nightly' set it up. This is useful
     81 	if you're trying to quickly rebuild portions of a workspace
     82 	built by 'nightly'. 'ws' should not be used for this since it
     83 	sets the environment up differently and may cause everything
     84 	to rebuild (because of different -I or -L paths).
     85 
     86 build_cscope
     87 	builds cscope databases in the uts, the platform subdirectories
     88 	of uts, and in usr/src. Uses cscope-fast.
     89 
     90 check_rtime
     91 	checks ELF attributes used by ELF dynamic objects in the proto area.
     92 	Used by 'nightly's -r option, to check a number of ELF runtime
     93 	attributes for consistency with common build rules.  nightly uses
     94 	the -o option to simplify the output for diffing with previous
     95 	build results.  It also uses the -i option to obtain NEEDED and RUNPATH
     96 	entries, which help detect changes in software dependencies and makes
     97 	sure objects don't have any strange runpaths like /opt/SUNWspro/lib.
     98 
     99 checkproto
    100 	Runs protocmp and protolist on a workspace (or uses the environment
    101 	variable CODEMGR_WS to determine the workspace). Checks the proto area
    102 	against the packages.
    103 
    104 codereview
    105 	Given two filenames, creates a postscript file with the file 
    106 	differences highlighted.
    107 
    108 codesign
    109 	Tools for signing cryptographic modules using the official
    110 	Sun release keys stored on a remote signing server. This
    111 	directory contains signit, a client program for signing
    112 	files with the signing server; signproto, a shell script
    113 	that finds crypto modules in $ROOT and signs them using
    114 	signit; and codesign_server.pl, the code that runs on the
    115 	server. The codesign_server code is not used on an ON
    116 	build machine but is kept here for source control purposes.
    117 
    118 cscope-fast
    119 	The fast version of cscope that we use internally. Seems to work,
    120 	but may need more testing before it's placed in the gate. The source
    121 	just really needs to be here.
    122 	
    123 cstyle
    124 	checks C source for compliance with OS/Net guidelines.
    125 
    126 ctfconvert
    127 	Convert symbolic debugging information in an object file to the Compact
    128 	ANSI-C Type Format (CTF).
    129 
    130 ctfdump
    131 	Decode and display CTF data stored in a raw file or in an ELF file.
    132 
    133 ctfmerge
    134 	Merge the CTF data from one or more object files.
    135 
    136 depcheck
    137 	A tool to try an assess the dependencies of executables.  This tool 
    138 	is not a definitive dependency check, but it does use "strings" and 
    139 	"ldd" to gather as much information as it can.  The dependency check
    140 	tool can handle filenames and pkgnames.  Before using the dependency
    141 	checker you must build a database which reflects the properties and
    142 	files in your system.
    143 
    144 elfcmp
    145 	Compares two ELF modules (e.g. .o files, executables) section by
    146 	section.  Useful for determining whether "trivial" changes -
    147 	cstyle, lint, etc - actually changed the code.  The -S option
    148 	is used to test whether two binaries are the same except for
    149 	the elfsign signature.
    150 
    151 elfsign
    152 	Built from the same sources as the shipped elfsign(1), this
    153 	version is used in nightly -t builds to assure that the signing
    154 	process and format is the same as will be used on the target
    155 	system.
    156 
    157 elfsigncmp
    158 	This script can be used in lieu of elfsign during a build.
    159 	It uses elfsign to sign a copy of the object and elfcmp -S to
    160 	verify that the signing caused no damage before updating
    161 	the object to be signed.
    162 	
    163 findunref
    164 	Finds all files in a source tree that have access times older than a
    165 	certain time and are not in a specified list of exceptions.  Since
    166 	'nightly' timestamps the start of the build, and findunref uses its
    167 	timestamp (by default), this can be used to find all files that were
    168 	unreferenced during a nightly build).  Since some files are only used
    169 	during a SPARC or Intel build, 'findunref' needs to be run on
    170 	workspaces from both architectures and the results need to be merged.
    171 	For instance, if $INTELSRC and $SPARCSRC are set to the usr/src
    172 	directories of your Intel and SPARC nightly workspaces, then you
    173 	can merge the results like so:
    174 
    175 	$ findunref $INTELSRC $INTELSRC/tools/findunref/exception_list | \
    176 	  sort > ~/unref-i386.out
    177 	$ findunref $SPARCSRC $SPARCSRC/tools/findunref/exception_list | \
    178 	  sort > ~/unref-sparc.out
    179 	$ comm -12 ~/unref-i386.out ~/unref-sparc.out > ~/unref.out
    180 
    181 hdrchk
    182 	checks headers for compliance with OS/Net standards (form, includes,
    183 	C++ guards).
    184 
    185 install.bin
    186 	binary version of /usr/sbin/install. Used to be vastly faster
    187 	(since /usr/sbin/install is a shell script), but may only be a bit
    188 	faster now. One speedup includes avoiding the name service for the
    189 	well-known, never-changing password entries like 'root' and 'sys.'
    190 
    191 intf_check
    192 	detects and reports ABI versioning and stability problems.
    193 
    194 lintdump
    195 	dumps the contents of one or more lint libraries; see lintdump(1)
    196 
    197 keywords
    198 	checks files for proper SCCS keywords.
    199 
    200 makebfu
    201 	simple wrapper around 'mkbfu' for use outside nightly (when in a build
    202 	shell from 'ws' or 'bldenv'). 
    203 
    204 mkbfu
    205 	makes cpio archives out of the proto area suitable for bfu'ing.
    206 	Used by 'nightly' and 'makebfu'.
    207 
    208 ndrgen
    209 	Network Data Language (NDL) RPC protocol compiler to support DCE
    210 	RPC/MSRPC and SMB/CIFS.  ndrgen takes an input protocol definition
    211 	file (say, proto.ndl) and generates an output C source file
    212 	(proto_ndr.c) containing the Network Data Representation (NDR)
    213 	marshalling routines to implement the RPC protocol.
    214 
    215 nightly
    216 	nightly build script. Takes an environment (or 'env') file describing
    217 	such things as the workspace, the parent, and what to build. See
    218 	env/developer and env/gatekeeper for sample, hopefully well-commented
    219 	env files.
    220 
    221 pmodes
    222 	enforces proper file ownership and permissions in pkgmap and package
    223 	prototype* files.  converts files if necessary
    224 
    225 protocmp
    226 	compares proto lists and the package definitions. Used by nightly
    227 	to determine if the proto area matches the packages, and to detect
    228 	differences between a childs proto area and a parents.
    229 
    230 protocmp.terse
    231 	transforms the output of protocmp into something a bit more friendly
    232 
    233 protolist
    234 	create a list of what's in the proto area, to feed to protocmp.
    235 
    236 sccscp
    237 	copy a file under SCCS control to another location in a workspace.
    238 	also updates teamware's nametable.
    239 
    240 sccshist
    241 	Display the history, comments and diffs, of a file under SCCS
    242 	control.
    243 
    244 sccsmv
    245 	rename a file under SCCS control to another location in a workspace.
    246 	also updates teamware's nametable.
    247 
    248 sccsrm
    249 	delete a file under SCCS control workspace. also updates teamware's
    250 	nametable. Actually renames it to .del-<file>-`date` so that others
    251 	will see it move when it is brought over (in case they were working
    252 	on it).
    253 
    254 ws
    255 	creates a shell with the environment set up to build in the given
    256 	workspace. Used mostly for non-full-build workspaces, so it sets up
    257 	to pull headers and libraries from the proto area of the parent if
    258 	they aren't in the childs proto area.
    259 
    260 wx
    261 	A great workspace tool by bonwick. See wx.README for information
    262 	and warnings.
    263 
    264 tokenize
    265 	Used to build the sun4u boot block.
    266 
    267 webrev
    268 	Generates a set of HTML pages that show side-by-side diffs of
    269 	changes in your workspace, for easy communication of code
    270 	review materials.  Can automagically find edited files or use a
    271 	manually-generated list; knows how to use wx's active file for
    272 	lists of checked-out files and proposed SCCS comments.
    273 
    274 wsdiff
    275 	Detect object differences between two ON proto areas. Used by
    276 	nightly(1) to determine what changed between two builds. Handy
    277 	for identifying the set of built objects impacted by a given
    278 	source change. This information is needed for patch construction.
    279 
    280 
    281 How to do a full build
    282 ----------------------
    283 
    284 1. Find an environment file that might do what you want to do. If you're just
    285    a developer wanting to do a full build in a child of the gate, copy the
    286    'developer' environment file to a new name (private to you and/or the
    287    work being done in this workspace, to avoid collisions with others). Then
    288    edit the file and tailor it to your workspace. Remember that this file
    289    is a shell script, so it can do more than set environment variables.
    290 
    291 2. Login as 'gk' (or root, but your PATH and .make.machines for dmake will
    292    not be right). Run 'nightly' and give it your environment file as an
    293    option. 'nightly' will first look for your environment file in
    294    /opt/onbld/env, and if it's not there then it will look for it as an
    295    absolute or relative path. Some people put their environment files in
    296    their workspace to keep them close.
    297 
    298 3. When 'nightly' is complete, it will send a summary of what happened to
    299    $MAILTO. Usually, the less info in the mail the better. If you have failures,
    300    you can go look at the full log of what happened, generally in
    301    $CODEMGR_WS/log/log.<date>/nightly.log (the mail_msg it sent and the proto
    302    list are there too). You can also find the individual build logs, like
    303    'make clobber' and 'make install' output in $SRC, under names like
    304    clobber-${MACH}.out and install-${MACH}.out (for a DEBUG build). These
    305    will be smaller than nightly.log, and maybe more searchable.
    306 
    307 Files you have to update to add a tool
    308 --------------------------------------
    309 
    310 1.  Add the tool in its appropriate place.
    311 2.  Update the Makefile as required.
    312 3.  Update usr/src/tools/SUNWonbld/prototype_*.
    313 4.  Update usr/src/tools/README.tools (this file).
    314 5.  Repeat 1-4 for any man pages.
    315