USG_PG3/usr/source/rc/util.rc

:	creat boot utilities in "/usr/mdec" and "/usr/mdec/tu"
:	$1 = {mt | ht}		tu10 ro tu16 magtape hardware
echo 
echo BOOT utilities - /usr/mdec/ - /usr/mdec/tu/

if $1x = x	echo tu10 magtape assumed

chdir ../util
echo copy.s ;	as copy.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/copy
echo dldr.s ;	as dldr.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/dldr
echo dli.s ;	as dli.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/dli
echo dtf.s ;	as dtf.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/dtf
echo list.s ;	as list.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/list
echo rkf.s ;	as rkf.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/rkf
echo uboot.s ;	as uboot.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/uboot
						cp /usr/mdec/tu/uboot /usr/mdec/uboot

ed - tboot.s
/^\.mt/s/[01]/1/
/^\.tc/s/[01]/0/
/^\.tu/s/[01]/0/
w
q
echo "tboot.s(mt)" ;	as tboot.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/mtboot
			if $1x != htx	cp /usr/mdec/tu/mtboot /usr/mdec/mboot

ed - tboot.s
/^\.mt/s/[01]/0/
/^\.tc/s/[01]/1/
/^\.tu/s/[01]/0/
w
q
echo "tboot.s(tc)" ;	as tboot.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/tcboot
					cp /usr/mdec/tu/tcboot /usr/mdec/tboot

ed - tboot.s
/^\.mt/s/[01]/0/
/^\.tc/s/[01]/0/
/^\.tu/s/[01]/1/
w
q
echo "tboot.s(tu)" ;	as tboot.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/tuboot
			if $1x = htx	cp /usr/mdec/tu/tuboot /usr/mdec/mboot


ed - hpboot.s
/^\.hp/s/[01]/1/
/^\.hs/s/[01]/0/
/^\.rf/s/[01]/0/
/^\.rk/s/[01]/0/
/^\.rp/s/[01]/0/
w
q
echo "hpboot.s(hp)" ;	as hpboot.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/hpboot

ed - hpboot.s
/^\.hp/s/[01]/0/
/^\.hs/s/[01]/1/
/^\.rf/s/[01]/0/
/^\.rk/s/[01]/0/
/^\.rp/s/[01]/0/
w
q
echo "hpboot.s(hs)" ;	as hpboot.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/hsboot

ed - hpboot.s
/^\.hp/s/[01]/0/
/^\.hs/s/[01]/0/
/^\.rf/s/[01]/1/
/^\.rk/s/[01]/0/
/^\.rp/s/[01]/0/
w
q
echo "hpboot.s(rf)" ;	as hpboot.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/rfboot

ed - hpboot.s
/^\.hp/s/[01]/0/
/^\.hs/s/[01]/0/
/^\.rf/s/[01]/0/
/^\.rk/s/[01]/1/
/^\.rp/s/[01]/0/
w
q
echo "hpboot.s(rk)" ;	as hpboot.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/rkboot

ed - hpboot.s
/^\.hp/s/[01]/0/
/^\.hs/s/[01]/0/
/^\.rf/s/[01]/0/
/^\.rk/s/[01]/0/
/^\.rp/s/[01]/1/
w
q
echo "hpboot.s(rp)" ;	as hpboot.s ;	strip a.out ;	mv -f a.out /usr/mdec/tu/rpboot


:	misc. for /usr/sys and /usr/lib

echo load ;	cp load /usr/sys/load
echo mkconf.c ;	cc -O -s mkconf.c mkdata.c ;	mv -f a.out /usr/sys/conf/mkconf

chdir /usr/mdec/tu
chmod 755 copy dldr dli dtf list rkf uboot
chown bin copy dldr dli dtf list rkf uboot
chmod 755 mtboot tcboot tuboot hpboot hsboot rfboot rkboot rpboot
chown bin mtboot tcboot tuboot hpboot hsboot rfboot rkboot rpboot
chdir /usr/mdec
chmod 755 uboot mboot tboot
chown bin uboot mboot tboot

chmod 755 /usr/sys/load /usr/sys/conf/mkconf
chown bin /usr/sys/load /usr/sys/conf/mkconf