mirror of
https://github.com/DoctorWkt/unix-jun72.git
synced 2026-02-09 18:01:54 +00:00
42 lines
987 B
Bash
Executable File
42 lines
987 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# assemble the sources
|
|
#
|
|
|
|
# settings; should contain something like:
|
|
# APOUT=/tmp/apout2.3alpha2/apout
|
|
# APOUT_ROOT=/tmp/v7
|
|
. tools/assemv7.cfg
|
|
|
|
export APOUT_ROOT
|
|
COLD=0
|
|
if [ "$1" = "cold" ] ; then
|
|
COLD=1
|
|
fi
|
|
echo "COLD: $COLD"
|
|
|
|
tools/rebuild
|
|
|
|
# fix "mount" issue which 1ed as cant deal with
|
|
# and also fix up the vector table in u0.s since
|
|
# the result is a slightly different format a.out that doesnt
|
|
# include the header in the text segment
|
|
test -d build || mkdir build
|
|
for f in rebuilt/u?.s ; do
|
|
b=`basename $f`
|
|
if [ $COLD = 1 ] ; then
|
|
sed -e 's/.*init by copy.*/4;4;unkni;0;fpsym;0/' \
|
|
-e 's/\[systm-inode\]\\\//-109./' \
|
|
-e 's/cold = 0/cold = 1/' < $f > build/$b
|
|
else
|
|
sed -e 's/.*init by copy.*/4;4;unkni;0;fpsym;0/' \
|
|
-e 's/\[systm-inode\]\\\//-109./' < $f > build/$b
|
|
fi
|
|
done
|
|
|
|
cd build
|
|
$APOUT $APOUT_ROOT/bin/as ../sys1.s u?.s
|
|
$APOUT $APOUT_ROOT/bin/nm a.out |sort > a.out.syms
|
|
../tools/ml
|
|
|