blob: fa90808a716ac1b9a940eaaaa2e2c6e96dd80338 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
CONF=pc64
CONFLIST=pc64 pccpu64
objtype=amd64
</$objtype/mkfile
p=9
# must match mem.h
KTZERO=0xffffffff80110000
APBOOTSTRAP=0xffffffff80007000
REBOOTADDR=0x11000
DEVS=`{rc ../port/mkdevlist $CONF}
PORT=\
alarm.$O\
alloc.$O\
allocb.$O\
auth.$O\
cache.$O\
chan.$O\
dev.$O\
edf.$O\
fault.$O\
memmap.$O\
page.$O\
parse.$O\
pgrp.$O\
portclock.$O\
print.$O\
proc.$O\
qio.$O\
qlock.$O\
random.$O\
rdb.$O\
rebootcmd.$O\
segment.$O\
syscallfmt.$O\
sysfile.$O\
sysproc.$O\
taslock.$O\
tod.$O\
xalloc.$O\
userinit.$O\
OBJ=\
l.$O\
cga.$O\
i8253.$O\
i8259.$O\
main.$O\
memory.$O\
mmu.$O\
trap.$O\
bootargs.$O\
$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/libsec.a\
/$objtype/lib/libmp.a\
/$objtype/lib/libc.a\
/$objtype/lib/libfis.a\
/$objtype/lib/libaml.a\
/$objtype/lib/libdtracy.a\
ETHER=`{cd ../pc; echo devether.c ether*.c | sed 's/\.c/.'$O'/g'}
AUDIO=`{cd ../pc; echo devaudio.c audio*.c | sed 's/\.c/.'$O'/g'}
VGA=`{cd ../pc; echo devvga.c screen.c vga*.c | sed 's/\.c/.'$O'/g'}
SDEV=`{cd ../pc; echo devsd.c sd*.c | sed 's/\.c/.'$O'/g'}
$p$CONF: $OBJ $CONF.$O $LIB
$LD -o $target -T$KTZERO -R4096 -l $prereq
size $target
install:V: $p$CONF
cp $p$CONF /$objtype/
for(i in $EXTRACOPIES)
import $i / /n/$i && cp $p$CONF $p$CONF.gz /n/$i/$objtype/
# copies generated by the rule below
PCHEADERS=usbehci.h screen.h mp.h io.h ahci.h \
yukdump.h
REPCH=`{echo $PCHEADERS | sed 's/\.h//g; s/ /|/g'}
^($REPCH)\.h:R: ../pc/\1.h
cp $prereq .
REPCC=`{../port/mkfilelist ../pc}
^($REPCC)\.$O:R: '../pc/\1.c'
$CC $CFLAGS -I. -. ../pc/$stem1.c
<../boot/bootmkfile
<../port/portmkfile
<|../port/mkbootrules $CONF
l.$O rebootcode.$O apbootstrap.$O: mem.h
$ETHER: ../port/etherif.h ../port/netif.h
$AUDIO: ../port/audioif.h
ether8003.$O ether8390.$O: ether8390.h
etheryuk.$O: yukdump.h
$VGA mouse.$O: screen.h /sys/include/memdraw.h
vgavesa.$O: /386/include/ureg.h
mp.$O: mp.h apbootstrap.i
apic.$O squidboy.$O: mp.h
archmp.$O archacpi.$O: mp.h
sd53c8xx.$O: ../pc/sd53c8xx.i
../pc/sd53c8xx.i: ../pc/sd53c8xx.n
cd ../pc && mk sd53c8xx.i
$SDEV: ../port/sd.h
sdiahci.$O: ahci.h
devaoe.$O sdaoe.$O: ../port/aoe.h
main.$O: rebootcode.i
devusb.$O usbuhci.$O usbohci.$O usbehci.$O usbehcipc.$O usbxhci.$O: ../port/usb.h
usbehci.$O usbehcipc.$O: usbehci.h
trap.$O main.$O: /sys/include/tos.h
ether8169.$O: ../port/ethermii.h
etherdp83820.$O: ../port/ethermii.h
etherigbe.$O: ../port/ethermii.h
ethervgbe.$O: ../port/ethermii.h
ethervt6102.$O: ../port/ethermii.h
ethervt6105m.$O: ../port/ethermii.h
etheriwl.$O: ../port/wifi.h
etherwpi.$O: ../port/wifi.h
etherrt2860.$O: ../port/wifi.h
initcode.out: init9.$O initcode.$O /$objtype/lib/libc.a
$LD -l -R1 -s -o $target $prereq
$O.rebootcode: rebootcode.$O
$LD -l -R1 -s -o $target -T$REBOOTADDR $prereq
rebootcode.out: $O.rebootcode
dd -if $prereq(1) -of $target -bs 1 -iseek 40
$O.apbootstrap: apbootstrap.$O
$LD -l -R1 -s -o $target -T$APBOOTSTRAP $prereq
apbootstrap.out: $O.apbootstrap
dd -if $prereq(1) -of $target -bs 1 -iseek 40
sd53c8xx.i: sd53c8xx.n
aux/na $prereq > $target
acid:V:
$CC -a -w main.c>acid
%.clean:V:
rm -f $stem.c [9bz]$stem [9bz]$stem.gz boot$stem.* $O.rebootcode $O.apbootstrap $PCHEADERS
|