| Date Of Receipt: 24-SEP-1993 08:45:24.56
From: ABYSS::werme "Eric Werme USG"
To: abyss::amway
CC: abyss::odehelp, abyss::cascio
Subj: Re: ODE access
> Rich Cascio directed me to you. If you are not the correct person, please
> redirect my inquiry, as required.
odehelp: Please scan this to see if I've missed anything.
> I need to be setup as an ODE developer for the AdvFS project. I also
> need a pointer to any documentation on ODE and related source control
> and submit procedures.
First, you need access to the source pools. I believe you need to send mail
to admin asking for that and a Kerberos password to go with it.
ODE docs live on /share/lastin/usr/sde/ode2.0/doc/docps, accessible from
production systems as /usr/sde/ode2.0/doc/docps.
I think the most important file is dug.ps. tutorial.ps my be interesting.
Local build documentation is on /usr/sde/osf1/doc. The important files are
ag-userguide.ps, kernel-build-rules, srequest.1, and agmaint.help. These are
woefully out-of-date. Have fun, drop in (3T66) when you become woefully
confused. Building utilities is fairly easy, building a kernel is very
black magic. For non-kernel build information, you cand send mail to
odehelp. For kernel build help, be prepared to wade through a 1.5MB
Makefile. (Gack!)
Here are some shell scripts that are solelt responsible for maintaining
several people's sanity. The need a little work to behave with
gold, but I haven't had a chance to polish that yet.
Return-Path: werme
Received: by abyss.zk3.dec.com (5.65/DEC-USSG-ZK3-ULTRIX-09/27/91);
id AA29136; Tue, 2 Mar 1993 10:25:03 -0500
Date: Tue, 2 Mar 1993 10:25:03 -0500
From: werme (Eric Werme USSG)
To: maria
Cc: werme
Subject: The Ric Werme ODE kernel development tools
One of the problems with the ODE/sandbox environment at DEC is that it
was setup by release engineering folks and is not as polished an
environment for engineers, especially those of us who build kernels.
There are a few things that are not well documented that ease the
kernel building task, and let you build a kernel with recompiling
the world.
I've written a few shell scripts that made my life a lot easier, and have
recently made them generic enough so that anyone else can use them without
having to duplicate my environment.
The key tools are sblinks and sbpop, the rest are just helpful.
The tools are:
sblinks: I have a number of symbolic links so I don't have to wade through
the ODE tree all the time. This shell script makes them.
I often jump between sandboxes, and it's easy to use this
script to follow my current sandbox. sblinks is called from
sbpop, below.
sbpop: This populates a sandbox with all the stuff you need to build a
kernel. The result is that I can:
% mksb -back alpha.nightly sandbox
% workon -sb sandbox
% sbpop
% cd ~/ksrc
% build ALINGO_
% cp vmunix /
The "build ALINGO_" command will compile a couple dozen files that
are dependent on the conf/ALINGO options, but they only take a
few minutes. sbpop will substitute the name of your workstation,
if that's where you are building a kernel.
The -c option to sbpop copies all OS sources and objects. The objects
stuff has a bug due to mklinks -copy screwing up copying symbolic
links. It's not to hard to patch back together, but I haven't had
a chance to bash around the bug with some sbpop additions.
mketags: This make a gnuemacs TAGS file of most of the kernel.
trim: Discards most of the crap emitted by makefiles.
aliases: Here are a couple aliases that make life a little easier:
alias buc build BINARY_ MAKE_ARGS=\"\!\*\"
alias bul build ALINGO_
So I can say:
% buc nfs_vnodeops.o sys_syscalls.o
% bul
and have a new vmunix. The buc expands into
build BINARY_ MAKE_ARGS="nfs_vnodeops.o sys_syscalls.o"
sblinks: ------------------------------------------------------------
#!/bin/csh -f
# Usage: Either: workon [ -sb sandbox-name ] ; sblinks
# or: sblinks sandbox-name [ sandbox-path ]
# This script creates several useful symbolic links from your top level
# directory to various ODE locations. These are:
#
# ksrc: Kernel source directory (where you compile and link kernels)
# kobj: Kernel object directory (your .o files are in ~/kobj/BINARY)
# klink: Backing source tree (so you can readily see un-bco'd source)
#
# usrc: Like the kernel trees, but for the top of the usr hierarchy
# uobj
# ulink
#
# ssrc: Sandbox source, one notch above ksrc and usrc (rarely used)
# slink: Ditto, but one notch above klink and ulink (also rarely used,
# but good to get to ~/slink/isl/data/OSF120.mi)
# If you aren't in a sandbox and haven't specified "sandbox-path", this
# script digs assumes you have a single hierarchy for your sandboxes
# and digs it out of your .sandboxrc file. It looks for a line like:
# base * /usr/werme/sb
# If you have multiple hierarchies, it won't work and you'll have to explicitly
# specify the path. The path can be either absolute (i.e. starting with /)
# or relative to the current directory.
if ( $#argv < 1 ) then
if ( $?SANDBOX == 0 ) then
echo 'Usage: sblinks sandbox-name [ sandbox-path ]'
echo 'or: workon -sb sandbox-name ; sblinks'
exit 1
else
set sb = $SANDBOX
endif
else
set sb = $1
endif
if ( $#argv < 2 ) then
if ( $?SOURCEBASE ) then
set sbpath = $SOURCEBASE
set sbpath = $sbpath:h
set sbpath = $sbpath:h
else
set sbpath = `grep '^base \*' ~/.sandboxrc | awk '{ print $3 }'`
endif
else
echo $2 | grep -q '^/'
if ( $status ) then
set sbpath = $cwd/$2
else
set sbpath = $2
endif
endif
cd ~
if ( ! -d $sbpath/$sb ) then
echo $sbpath/$sb is not a directory
exit 1
endif
rm -f klink kobj ksrc slink ssrc ulink uobj usrc
ln -s $sbpath/$sb/link/src/kernel klink
ln -s $sbpath/$sb/obj/alpha/kernel kobj
ln -s $sbpath/$sb/src/kernel ksrc
ln -s $sbpath/$sb/link/src slink
ln -s $sbpath/$sb/src ssrc
ln -s $sbpath/$sb/link/src/usr ulink
ln -s $sbpath/$sb/obj/alpha/usr uobj
ln -s $sbpath/$sb/src/usr usrc
sbpop: ------------------------------------------------------------
#!/bin/csh -f
# Usage: sbpop [-c] [target]
# This script populates (via mklinks) a new sandbox and prepares it for
# building a new kernel. If target is not specified, then it defaults to
# `hostname`, minus any domainname and converted to upper case. If the
# script can't find a configuration file in /usr/sys/conf or the sandbox,
# the target will fall back to GENERIC.
# The -c option tells mklinks to copy the files instead of setting up symbolic
# links. In our flaky network, this makes kernel builds go much faster, but
# you will not benefit from updates to your backed tree and will probably
# want to remake the sandbox occasionally. Bug: mklinks -copy screws up
# several symbolic links, and I haven't hacked the script to get around the
# problem.
if ( $?SOURCEBASE == 0 ) then
echo 'Usage: workon -sb sandbox-name'
echo ' sbpop [-c] [target]'
exit 1
endif
if ( $1 == -c || $1 == -copy ) then
set copy = "-copy"
shift
else
set copy = ""
endif
if ( $#argv >= 1 ) then
set target = ` echo $1 | tr '[a-z]' '[A-Z]' `
else
set target = ` hostname | sed -e 's/[.].*$//' | tr '[a-z]' '[A-Z]' `
endif
set sbpath = $SOURCEBASE
set sbpath = $sbpath:h
if ( ! -d $sbpath ) then
echo $SOURCEBASE is not a directory
exit 1
endif
sblinks $SANDBOX $sbpath:h
mkdir -p $sbpath/src/kernel $sbpath/src/usr $sbpath/obj/alpha/{kernel/conf,usr}
if ( ! -f /usr/sys/conf/$target && ! -f $sbpath/obj/alpha/kernel/conf/$target ) then
echo "sbpop: Can't find /usr/sys/conf/$target or"
echo " $sbpath/obj/alpha/kernel/conf/$target,"
echo " will target for GENERIC"
echo " "
set target = GENERIC
endif
if ($target != GENERIC && -f /usr/sys/conf/$target ) \
cp /usr/sys/conf/$target $sbpath/obj/alpha/kernel/conf
cd $sbpath/obj/alpha/kernel
foreach i ( BINARY arch bin conf data dec dli include io kern net sec src streams vfs )
echo sbpop: Filling kernel directory $i.
if ( ! -d $i ) mkdir $i
mklinks -auto $copy $i
end
cd $sbpath/export
mklinks -auto $copy .
if ($copy == -copy) then
cd $sbpath/src
mklinks -auto $copy kernel
endif
cd ~/ksrc
build ${target}_config
ln -s ../../obj/alpha/kernel/$target/vmunix
echo 'sbpop: Should be ready for: cd ~/ksrc; build' ${target}_
mketags: ------------------------------------------------------------
#!/bin/csh -f
#set echo
set dir = ~/klink
#set dir = ~/ksrc [Use ~/ksrc if you did sbpop -c]
etags $dir/arch/alpha{,/fp,/hal}/*.[ch]
etags -a $dir/{builtin,cdfs,conf,data}/*.[ch]
etags -a $dir/dec/{lat,machine{,/mips{,/PMAX{,/stand}}}}/*.[ch]
etags -a $dir/{io/cam,dli}/*.[ch]
etags -a $dir/mach{,/alpha}/*.[ch]
etags -a $dir/mips{,/PMAX{,/stand}}/*.[ch]
etags -a $dir/{mmax,msfs,procfs,s5fs,sec,streams,streamsm,sys,sysV}/*.[ch]
etags -a $dir/{bsd,kern,klm}/*.[ch]
etags -a $dir/{net,netinet,nfs,rpc,rpcsvc}/*.[ch]
etags -a $dir/{ufs,vfs,vm}/*.[ch]
trim: ------------------------------------------------------------
#!/bin/csh
#little hack to junk all the options and directory paths on executables that
#show up in kernel build logs.
if ($#argv == 1) then
set file = $1
else
set file = ""
endif
sed -e 's/ -[^ ]*//g' -e 's/[a-zA-Z.]*\///g' $file
------------------------------------------------------------
|