Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/planix-v0/sys/src/9/pcboot/mkfile – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
# build pxe loaders (from pxe + pbs) and disk loaders (disk + usb)
2
objtype=386
3
</$objtype/mkfile
4
 
5
TARG=\
6
	9boot\
7
	9bootpbs\
8
	9load\
9
	9loadusb\
10
 
11
BIN=/386
12
 
13
PXEBASE=0x80007c00
14
PBSBASE=0x80010000
15
# assume we've been decompressed into place by our header.
16
# BOOTBASE must match expand.c's Kerneladdr|KZERO; +0x20 allows for a.out header
17
BOOTBASE=0x80900020
18
EXTRACOPIES=
19
 
20
SFX=''				# defaults
21
BASE=boot
22
 
23
ONPROC=$NPROC
24
NPROC=1				# don't build all boot flavours at once
25
 
26
%.$O:	%.s
27
	$AS $AFLAGS $stem.s
28
 
29
%.$O:	%.c
30
	$CC $CFLAGS $stem.c
31
 
32
all:V: $TARG
33
 
34
install:V: 9boot.install 9bootpbs.install 9load.install 9loadusb.install
35
 
36
pcclean pclean:V:
37
	@ { cd ../pc && mk clean }
38
clean:V:
39
	rm -f 8.* bootmain bootmain.c
40
	@ {
41
		rfork ne; bind bootmkfile mkfile
42
		CONF=bootpbs SFX=pbs mk clean
43
		BASE=load CONF=loadusb mk clean
44
		BASE=load CONF=loadusb SFX=pxe mk clean
45
		for (BASE in boot load)
46
			CONF=$BASE mk clean
47
	}
48
 
49
%.calls:
50
	@ { rfork ne; bind bootmkfile mkfile
51
	KTZERO=$PXEBASE CONF=boot mk $target }
52
 
53
#
54
# pxe-loaded pxe loader
55
#
56
9bootmain 9bootmaindebug:V:
57
	cp boot bootmain
58
	@ { rfork ne; bind bootmkfile mkfile
59
	KTZERO=$BOOTBASE CONF=bootmain NPROC=$ONPROC
60
	mk all }
61
 
62
# creating $O.expand also creates $O.expanddebug, out of mk's sight
63
9boot:D: $O.expand 9bootmaindebug
64
	cp 9bootmaindebug 9bootdebug		# for 9boot.install
65
	{ cat $O.expand; strip -o /fd/1 9bootmaindebug | gzip -9 } >$target
66
 
67
# creating 9boot also creates 9bootdebug, out of mk's sight
68
9boot.install:V: 9boot
69
	cp 9boot 9bootdebug /$objtype/ &
70
	for(i in $EXTRACOPIES)
71
		{ 9fs $i && cp $prereq /n/$i/$objtype && echo -n $i... & }
72
	wait
73
	echo
74
 
75
#
76
# disk-resident pxe loader, loaded by pbs
77
#
78
9bootpbs:V:
79
	@ { rfork ne; bind bootmkfile mkfile
80
	KTZERO=$PBSBASE CONF=bootpbs SFX=pbs
81
	NPROC=$ONPROC START=l16r.$O; mk all }
82
 
83
9bootpbs.install:V: 9bootpbs
84
	@ { rfork ne; bind bootmkfile mkfile
85
	KTZERO=$PBSBASE CONF=bootpbs SFX=pbs
86
	NPROC=$ONPROC START=l16r.$O; mk install }
87
 
88
#
89
# disk-resident disk loaders, loaded by pbs
90
#
91
9load:V:
92
	@ { rfork ne; bind bootmkfile mkfile
93
	KTZERO=$PBSBASE BASE=load CONF=load
94
	NPROC=$ONPROC START=l16r.$O; mk all }
95
 
96
9load.install:V: 9load
97
	@ { rfork ne; bind bootmkfile mkfile
98
	KTZERO=$PBSBASE BASE=load CONF=load
99
	NPROC=$ONPROC START=l16r.$O; mk install }
100
 
101
9loadusb:V:
102
	@ { rfork ne; bind bootmkfile mkfile
103
	KTZERO=$PBSBASE BASE=load CONF=loadusb
104
	NPROC=$ONPROC START=l16r.$O; mk all }
105
 
106
9loadusb.install:V: 9loadusb
107
	@ { rfork ne; bind bootmkfile mkfile
108
	KTZERO=$PBSBASE BASE=load CONF=loadusb
109
	NPROC=$ONPROC START=l16r.$O; mk install }
110
 
111
#
112
# pxe-loaded disk loaders for convenient debugging only
113
#
114
9loadpxe:V:
115
	@ { rfork ne; bind bootmkfile mkfile
116
	KTZERO=$PXEBASE BASE=load CONF=loadpxe SFX=pxe
117
	NPROC=$ONPROC START=l16r.$O; mk all }
118
 
119
9loadpxe.install:V: 9loadpxe
120
	@ { rfork ne; bind bootmkfile mkfile
121
	KTZERO=$PXEBASE BASE=load CONF=loadpxe SFX=pxe
122
	NPROC=$ONPROC START=l16r.$O; mk install }
123
 
124
9loadusbpxe:V:
125
	@ { rfork ne; bind bootmkfile mkfile
126
	KTZERO=$PXEBASE BASE=load CONF=loadusbpxe SFX=pxe
127
	NPROC=$ONPROC START=l16r.$O; mk all }
128
 
129
9loadusbpxe.install:V: 9loadusbpxe
130
	@ { rfork ne; bind bootmkfile mkfile
131
	KTZERO=$PXEBASE BASE=load CONF=loadusbpxe SFX=pxe
132
	NPROC=$ONPROC START=l16r.$O; mk install }
133
 
134
#
135
# 8.expand: the decompressing header for 9boot
136
#
137
# for pbs, 0x10000 (64K), for pxe, 0x7c00 (31K)
138
LOADADDR=0x7c00
139
 
140
cga.tiny.$O expand.$O: expand.h inflate.guts.c
141
 
142
$O.expand: ldecomp.$O cga.tiny.$O expand.$O
143
	$LD -o $target^debug -R1 -T$LOADADDR $prereq
144
	$LD -o $target   -H3 -R1 -T$LOADADDR $prereq