|
|
DataMuseum.dkPresents historical artifacts from the history of: Regnecentalen RC-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Regnecentalen RC-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T U m
Length: 3726 (0xe8e)
Types: TextFile
Notes: UNIX file
Names: »mkunix«
└─⟦69f23ffa1⟧ Bits:30004042/kconfig2.imd SW95705I 386/ix Multi-user Release 1.2
└─⟦69f23ffa1⟧ UNIX Filesystem
└─⟦this⟧ »kc/new/etc/mkunix«
# Copyright (c) 1984 AT&T
# All Rights Reserved
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
# The copyright notice above does not evidence any
# actual or intended publication of such source code.
#
# Copyrighted as an unpublished work.
# (c) Copyright 1987 INTERACTIVE Systems Corporation
# All rights reserved.
#
# RESTRICTED RIGHTS
#
# These programs are supplied under a license. They may be used,
# disclosed, and/or copied only as permitted under such license
# agreement. Any copy must contain the above copyright notice and
# this restricted rights notice. Use, copying, and/or disclosure
# of the programs is strictly prohibited unless otherwise provided
# in the license agreement.
#
#ident "@(#)mkunix.sh 1.13.1.1 - 88/05/31"
# Build a kernel in a $CONF tree.
# Note: the correct i386 config must be first in your $PATH.
# For cross builds, it should be $ROOT/i386/bin/config.
# /etc/config will work only if you're running UNIX V.3/386
if [ -d $ROOT/etc/atconf/bin ]
then
CC=${CC:-$ROOT/etc/atconf/bin/kerncc}
LD=${LD:-$ROOT/etc/atconf/bin/kernld}
STRIP=${STRIP:-$ROOT/etc/atconf/bin/kernst}
else
CC=${CC:-/bin/cc}
LD=${LD:-/bin/ld}
STRIP=${STRIP:-/bin/strip}
fi
if [ -z "$CONFIG" ]
then
if [ -f $ROOT/i386/bin/config ]
then
CONFIG=$ROOT/i386/bin/config
else
if [ -x $ROOT/etc/config ]
then
CONFIG=$ROOT/etc/config
else
CONFIG=/etc/config
fi
fi
fi
CONF=${CONF:-$ROOT/etc/atconf}
SYSTEM=${SYSTEM:-system.std}
while [ "$1" != "" ]
do
case $1 in
-s) shift; SYSTEM=$1; shift;;
-c) shift; CONF=$1; shift;;
*) echo "usage: mkunix [-c confdir] [-s system]";
exit 1;;
esac
done
cd $CONF; CONF=`pwd` # expand to full name
INCRT=${INCRT:-$ROOT/usr/include}
[ -d $CONF/../sys ] && INCRT=$CONF/.. # if in development environment, use
# development sys directory
CFLAGS="-O -I$INCRT -DAT386 -DVPIX -DKDVT -DVIANET -DHBTCP -I$CONF/tmp -DINKERNEL
$MORECPP"
# get version number from version file (start it at 1 if not already there)
VERSION=$CONF/tmp/Version
SYSSUFFIX=`expr $SYSTEM : '.*\.\(.*\)'`
if grep "^$SYSSUFFIX " $VERSION >/dev/null 2>&1
then :
else echo "$SYSSUFFIX 1" >>$VERSION
fi
set `grep "^$SYSSUFFIX " $VERSION`
version=$2
UNIX=$CONF/kernels/unix.$SYSSUFFIX.$version
# run config and compile conf.c
echo
echo "running config..."
$CONFIG -s $SYSTEM -c $CONF # creates config.h, conf.c, modlist
[ $? != 0 ] && { echo config failed; exit 1; }
cd $CONF/tmp
echo "#undef VER\n#define VER \"$version\"" >>config.h
echo "compiling conf.c..."
$CC -c $CFLAGS conf.c
[ $? != 0 ] && { echo $CC conf.c failed; exit 1; }
OFILES=tmp/conf.o
cd $CONF/modules
echo "compiling space.c and stubs.c modules..."
for i in `cat $CONF/tmp/modlist`
do
if [ ! -d $i ] ; then
{ echo Module: $i missing from $CONF/modules; exit 1; }
fi
done
for i in *
do
[ -d $i ] || continue
cd $i
if grep \^$i\$ $CONF/tmp/modlist >/dev/null
then
if [ -f space.c ]
then
$CC -c $CFLAGS space.c
[ $? != 0 ] &&
{ echo $CC `pwd`/space.c failed; exit 1; }
fi
rm -f stubs.o
OFILES=$OFILES\ modules/$i/*.o
else
if [ -f stubs.c ]
then
$CC -c $CFLAGS stubs.c
[ $? != 0 ] &&
{ echo $CC `pwd`/stubs.c failed; exit 1; }
OFILES="$OFILES modules/$i/stubs.o"
fi
fi
cd ..
done
cd $CONF
echo "linking the kernel..."
$LD -o $UNIX vuifile $OFILES
[ $? != 0 ] && { echo "kernel link failed: $LD -o $UNIX vuifile $OFILES"
exit 1; }
grep -v "^$SYSSUFFIX " $VERSION >${VERSION}xxx
mv ${VERSION}xxx $VERSION
echo $SYSSUFFIX `expr $version + 1` >>$VERSION
echo "stripping the kernel..."
$STRIP -x $UNIX
echo $UNIX made.
if [ "$DEBUGGER" ]
then
echo "running unixsyms on the kernel..."
unixsyms $UNIX
fi
exit 0