2017-09-10 20:35:23 +00:00
|
|
|
CONF=pc
|
|
|
|
CONFLIST=pc pcf pccpuf
|
2011-03-30 12:46:40 +00:00
|
|
|
EXTRACOPIES=
|
|
|
|
#EXTRACOPIES=lookout boundary # copy to these servers on install
|
|
|
|
|
|
|
|
objtype=386
|
|
|
|
</$objtype/mkfile
|
|
|
|
p=9
|
|
|
|
|
|
|
|
# must match mem.h
|
|
|
|
KTZERO=0xF0100020
|
2019-01-04 01:51:29 +00:00
|
|
|
APBOOTSTRAP=0xF0007000
|
|
|
|
REBOOTADDR=0x11000
|
2011-03-30 12:46:40 +00:00
|
|
|
|
|
|
|
DEVS=`{rc ../port/mkdevlist $CONF}
|
|
|
|
|
|
|
|
PORT=\
|
|
|
|
alarm.$O\
|
|
|
|
alloc.$O\
|
|
|
|
allocb.$O\
|
|
|
|
auth.$O\
|
|
|
|
cache.$O\
|
|
|
|
chan.$O\
|
|
|
|
dev.$O\
|
|
|
|
edf.$O\
|
|
|
|
fault.$O\
|
|
|
|
page.$O\
|
|
|
|
parse.$O\
|
|
|
|
pgrp.$O\
|
|
|
|
portclock.$O\
|
|
|
|
print.$O\
|
|
|
|
proc.$O\
|
|
|
|
qio.$O\
|
|
|
|
qlock.$O\
|
2016-08-27 18:42:31 +00:00
|
|
|
random.$O\
|
2011-03-30 12:46:40 +00:00
|
|
|
rdb.$O\
|
|
|
|
rebootcmd.$O\
|
|
|
|
segment.$O\
|
2013-05-21 17:45:40 +00:00
|
|
|
syscallfmt.$O\
|
2011-03-30 12:46:40 +00:00
|
|
|
sysfile.$O\
|
|
|
|
sysproc.$O\
|
|
|
|
taslock.$O\
|
|
|
|
tod.$O\
|
|
|
|
xalloc.$O\
|
|
|
|
|
|
|
|
OBJ=\
|
|
|
|
l.$O\
|
|
|
|
cga.$O\
|
|
|
|
i8253.$O\
|
|
|
|
i8259.$O\
|
|
|
|
main.$O\
|
|
|
|
memory.$O\
|
|
|
|
mmu.$O\
|
|
|
|
trap.$O\
|
2017-06-25 20:22:58 +00:00
|
|
|
bootargs.$O\
|
2011-03-30 12:46:40 +00:00
|
|
|
$CONF.root.$O\
|
|
|
|
$CONF.rootc.$O\
|
|
|
|
$DEVS\
|
|
|
|
$PORT\
|
|
|
|
|
|
|
|
LIB=\
|
|
|
|
/$objtype/lib/libmemlayer.a\
|
|
|
|
/$objtype/lib/libmemdraw.a\
|
|
|
|
/$objtype/lib/libdraw.a\
|
|
|
|
/$objtype/lib/libip.a\
|
|
|
|
/$objtype/lib/libc.a\
|
|
|
|
/$objtype/lib/libsec.a\
|
|
|
|
/$objtype/lib/libmp.a\
|
2011-07-10 12:14:23 +00:00
|
|
|
/$objtype/lib/libfis.a\
|
2012-06-17 21:12:19 +00:00
|
|
|
/$objtype/lib/libaml.a\
|
2018-12-11 07:44:34 +00:00
|
|
|
/$objtype/lib/libdtracy.a\
|
2011-03-30 12:46:40 +00:00
|
|
|
|
|
|
|
ETHER=`{echo devether.c ether*.c | sed 's/\.c/.'$O'/g'}
|
2013-01-19 00:23:34 +00:00
|
|
|
AUDIO=`{echo devaudio.c audio*.c | sed 's/\.c/.'$O'/g'}
|
2011-03-30 12:46:40 +00:00
|
|
|
VGA=`{echo devvga.c screen.c vga*.c | sed 's/\.c/.'$O'/g'}
|
|
|
|
SDEV=`{echo devsd.c sd*.c | sed 's/\.c/.'$O'/g'}
|
|
|
|
|
|
|
|
$p$CONF: $CONF.c $OBJ $LIB
|
|
|
|
$CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
|
|
|
|
$LD -o $target -T$KTZERO -l $OBJ $CONF.$O $LIB
|
|
|
|
size $target
|
|
|
|
|
|
|
|
# don't strip the gzipped kernels -- too frustrating when that's all you have!
|
|
|
|
$p%.gz:D: $p%
|
|
|
|
gzip -9 <$p$stem >$p$stem.gz
|
|
|
|
|
|
|
|
|
|
|
|
# pcflop and pccd need all the space they can get
|
|
|
|
9pcflop.gz:D: 9pcflop
|
|
|
|
strip -o /fd/1 9pcflop | gzip -9 >9pcflop.gz
|
|
|
|
|
|
|
|
9pccd.gz:D: 9pccd
|
|
|
|
strip -o /fd/1 9pccd | gzip -9 >9pccd.gz
|
|
|
|
|
|
|
|
|
2011-04-14 16:08:41 +00:00
|
|
|
install:V: $p$CONF
|
|
|
|
cp $p$CONF /$objtype/
|
2011-03-30 12:46:40 +00:00
|
|
|
for(i in $EXTRACOPIES)
|
|
|
|
import $i / /n/$i && cp $p$CONF $p$CONF.gz /n/$i/$objtype/
|
|
|
|
|
|
|
|
<../boot/bootmkfile
|
|
|
|
<../port/portmkfile
|
|
|
|
<|../port/mkbootrules $CONF
|
|
|
|
|
2018-02-11 17:08:03 +00:00
|
|
|
$ETHER: ../port/etherif.h ../port/netif.h
|
2013-01-19 00:23:34 +00:00
|
|
|
$AUDIO: ../port/audioif.h
|
2011-03-30 12:46:40 +00:00
|
|
|
ether8003.$O ether8390.$O: ether8390.h
|
2013-07-09 16:52:01 +00:00
|
|
|
etheryuk.$O: yukdump.h
|
2011-03-30 12:46:40 +00:00
|
|
|
$VGA mouse.$O: screen.h /sys/include/memdraw.h
|
2014-02-01 09:23:17 +00:00
|
|
|
vgavesa.$O: /386/include/ureg.h
|
2011-03-30 12:46:40 +00:00
|
|
|
devfloppy.$O: floppy.h
|
|
|
|
archmp.$O mp.$O: apbootstrap.h
|
|
|
|
apic.$O archmp.$O mp.$O: mp.h
|
2014-02-01 09:23:17 +00:00
|
|
|
squidboy.$O: mp.h
|
2011-03-30 12:46:40 +00:00
|
|
|
$SDEV: ../port/sd.h
|
|
|
|
sd53c8xx.$O: sd53c8xx.i
|
|
|
|
sdiahci.$O: ahci.h
|
|
|
|
devaoe.$O sdaoe.$O: ../port/aoe.h
|
|
|
|
main.$O: init.h reboot.h
|
|
|
|
wavelan.$O: wavelan.c ../pc/wavelan.c ../pc/wavelan.h
|
|
|
|
etherwavelan.$O: etherwavelan.c ../pc/wavelan.h
|
2017-07-16 20:33:24 +00:00
|
|
|
devusb.$O usbuhci.$O usbohci.$O usbehci.$O usbehcipc.$O usbxhci.$O: ../port/usb.h
|
2015-03-25 16:42:51 +00:00
|
|
|
usbehci.$O usbehcipc.$O: usbehci.h
|
2011-03-30 12:46:40 +00:00
|
|
|
trap.$O: /sys/include/tos.h
|
|
|
|
uartaxp.$O: uartaxp.i
|
2018-04-12 21:50:10 +00:00
|
|
|
ethermii.$O: ethermii.h
|
|
|
|
ether8169.$O: ethermii.h
|
|
|
|
etherdp83820.$O: ethermii.h
|
|
|
|
etherigbe.$O: ethermii.h
|
|
|
|
ethervgbe.$O: ethermii.h
|
|
|
|
ethervt6102.$O: ethermii.h
|
|
|
|
ethervt6105m.$O: ethermii.h
|
2011-03-30 12:46:40 +00:00
|
|
|
etherm10g.$O: etherm10g2k.i etherm10g4k.i
|
2018-02-11 17:08:03 +00:00
|
|
|
etheriwl.$O: ../port/wifi.h
|
|
|
|
etherwpi.$O: ../port/wifi.h
|
|
|
|
etherrt2860.$O: ../port/wifi.h
|
2011-03-30 12:46:40 +00:00
|
|
|
|
|
|
|
init.h:D: ../port/initcode.c init9.c
|
|
|
|
$CC ../port/initcode.c
|
|
|
|
$CC init9.c
|
|
|
|
$LD -l -R1 -s -o init.out init9.$O initcode.$O /386/lib/libc.a
|
|
|
|
{echo 'uchar initcode[]={'
|
|
|
|
xd -1x <init.out |
|
|
|
|
sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
|
|
|
|
echo '};'} > init.h
|
|
|
|
|
2019-01-04 01:51:29 +00:00
|
|
|
reboot.h:D: rebootcode.s mem.h
|
2011-03-30 12:46:40 +00:00
|
|
|
$AS rebootcode.s
|
2019-01-04 01:51:29 +00:00
|
|
|
$LD -l -s -T$REBOOTADDR -R4 -o reboot.out rebootcode.$O
|
2011-03-30 12:46:40 +00:00
|
|
|
{echo 'uchar rebootcode[]={'
|
|
|
|
xd -1x reboot.out |
|
|
|
|
sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
|
|
|
|
echo '};'} > reboot.h
|
|
|
|
|
2019-01-04 01:51:29 +00:00
|
|
|
apbootstrap.h:D: apbootstrap.s mem.h
|
2011-03-30 12:46:40 +00:00
|
|
|
$AS $prereq
|
|
|
|
$LD -o apbootstrap.out -T$APBOOTSTRAP -R4 -l -s apbootstrap.$O
|
|
|
|
{echo 'uchar apbootstrap[]={'
|
|
|
|
xd -1x apbootstrap.out |
|
|
|
|
sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
|
|
|
|
echo '};'} > $target
|
|
|
|
|
|
|
|
sd53c8xx.i: sd53c8xx.n
|
|
|
|
aux/na $prereq > $target
|
|
|
|
|
|
|
|
uartaxp.i: a100p.cp
|
|
|
|
{echo 'static uchar uartaxpcp[] = {'
|
|
|
|
xd -1x $prereq |
|
|
|
|
sed -e 's/^[0-9a-f]+ //' -e '/^$/d' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
|
|
|
|
echo '};'
|
|
|
|
} > $target
|
|
|
|
|
2011-05-04 10:33:59 +00:00
|
|
|
etherm10g%.i: etherm10g%.fw
|
|
|
|
{echo 'static char fw'^$stem^'[] = {'
|
|
|
|
xd -1x $prereq |
|
|
|
|
sed -e 's/^[0-9a-f]+ //' -e '/^$/d' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
|
|
|
|
echo '};'
|
|
|
|
} > $target
|
|
|
|
|
2011-03-30 12:46:40 +00:00
|
|
|
acid:V:
|
|
|
|
8c -a -w -I. i8253.c>acid
|
|
|
|
|
|
|
|
%.checkether:VQ:
|
|
|
|
for (i in ether*.c){
|
|
|
|
x=`{echo $i | sed 's/\.c//'}
|
|
|
|
if(! ~ $x ether8390 && ! grep -s '^ '^$x^'([ ]|$)' $stem)
|
|
|
|
echo $x not included in $stem
|
|
|
|
}
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%.checkvga:VQ:
|
|
|
|
for (i in vga*.c){
|
|
|
|
x=`{echo $i | sed 's/\.c//'}
|
|
|
|
if(! ~ $x vga vgax vgasavage && ! grep -s '^ '^$x^'([ ]|$)' $stem)
|
|
|
|
echo $x not included in $stem
|
|
|
|
}
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
checkdist:VQ:
|
|
|
|
for(i in pcdisk pcflop)
|
|
|
|
for(j in checkvga checkether)
|
|
|
|
mk $i.$j
|
|
|
|
|
|
|
|
%.clean:V:
|
|
|
|
rm -f $stem.c [9bz]$stem [9bz]$stem.gz boot$stem.* reboot.h apbootstrap.h init.h
|