blob: a194ee9b046a9ec58698d04a0702b3a5702bd700 (
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
|
#!/bin/rc
if(~ $#debug 1 && ~ $debug yes)
flag x +
if not
debug=0
if(~ $debug yes) echo env...
sysname=gnot
font=/lib/font/bit/lucidasans/typelatin1.7.font
for (i in '#P' '#f' '#m' '#t' '#v') {
if(~ $debug yes) echo bind $i
bind -a $i /dev >/dev/null >[2=1]
}
if(~ $debug yes) echo binddev done
for(disk in /dev/sd??) {
if(test -f $disk/data && test -f $disk/ctl){
disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null
# if(~ $#nosddma 0)
# echo dma on >$disk/ctl
# if(~ $#nosdrwm 0)
# echo rwm on >$disk/ctl
}
}
for (i in /sys/log/*) {
if(~ $debug yes) echo bind $i
bind /dev/null $i
}
if(~ $debug yes) echo bindlog done
bind -a '#l' /net >/dev/null >[2=1]
dossrv
boota:
boota: # again, just in case a timeout made the earlier one fail
cp /n/a:/plan9.ini /tmp/plan9.orig
if(! ~ $cdboot yes){
pci >/n/a:/pci.txt >[2]/dev/null
cp /dev/kmesg /n/a:/boot.txt >[2]/dev/null
}
# restore a partial install
if(test -f /n/a:/9inst.cnf)
cp /n/a:/9inst.cnf /tmp/vars
# make vgadb easier to edit
if(test -f /n/a:/vgadb)
cp /n/a:/vgadb /lib/vgadb
aux/vmware
# configure loopback device without touching /net/ndb
{
echo bind loopback /dev/null
echo add 127.0.0.1 255.255.255.0
} >/net/ipifc/clone
if(~ $#dmamode 0)
dmamode=ask
if(~ $dmamode ask){
echo -n 'use DMA for ide drives[yes]: '
dmamode=`{read}
if(~ $#dmamode 0)
dmamode=yes
}
if(~ $dmamode yes)
for(i in /dev/sd*/ctl)
if(test -f $i)
{echo dma on; echo rwm on >[2]/dev/null} >$i
if(~ $installmode ask){
echo -n 'install mode is (text, graphics)[graphics]: '
installmode=`{read}
if(~ $#installmode 0)
installmode=graphics
}
if(~ $installmode text){
mouseport=()
vgasize=()
monitor=()
}
if not
installmode=graphics
if(~ $mouseport ask){
echo -n 'mouseport is (ps2, ps2intellimouse, 0, 1, 2)[ps2]: '
mouseport=`{read}
if(~ $#mouseport 0)
mouseport=ps2
}
if(~ $vgasize ask){
echo -n 'vgasize [640x480x8]: '
vgasize=`{read}
if(~ $#vgasize 0)
vgasize=640x480x8
}
if(~ $monitor ask){
echo -n 'monitor is [xga]: '
monitor=`{read}
if(~ $#monitor 0)
monitor=xga
}
if(~ $#mouseport 1) {
aux/mouse $mouseport
if(~ $#vgasize 1 && ! ~ $vgasize '') {
vgasize=`{echo $vgasize}
if(! ~ $cdboot yes)
aux/vga -vip $vgasize >/n/a:/vgainfo.txt
sleep 2 # wait for floppy to finish
aux/vga -l $vgasize
if(! ~ $#novgaaccel 0)
echo -n 'hwaccel off' >'#v/vgactl' >[2]/dev/null
if(! ~ $#novgablank 0)
echo -n 'hwblank off' >'#v/vgactl' >[2]/dev/null
}
}
|