1. Remove a rather strangely gratuitous bit of profanity
[unix-history] / contrib / configit / ConfigIt
CommitLineData
a298d207
GCI
1#!/usr/bin/perl
2#
6ad7895a
JH
3# Copyright (c) 1994 GB Data Consulting
4# All rights reserved.
a298d207 5#
6ad7895a
JH
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
9# 1. Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution.
14# 3. The name of the Author may not be used to endorse or promote products
15# derived from this software without specific prior written permission.
a298d207 16# 4. This license extends only to network distributed versions.
6ad7895a
JH
17# All even number versions are non-network.
18# THIS SOFTWARE IS PROVIDED BY GB DATA AND CONTRIBUTORS ``AS IS'' AND
19# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21# ARE DISCLAIMED. IN NO EVENT SHALL GB DATA OR CONTRIBUTORS BE LIABLE
22# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28# SUCH DAMAGE.
a298d207
GCI
29#
30#
31#
32#
33# $Id:$
34#
6ad7895a
JH
35
36&config;
37&standard_devices;
38&menu;
39
40sub menu {
41system "clear";
42
43print " ConfigIt!\n";
44print " A auto-configuration system\n";
45print "\n\n\n";
46
47print " 1 Disk devices\n";
48print " 2 Serial devices\n";
49print " 3 Network devices\n";
50print " 4 Console devices\n";
51print " 5 Tape devices\n";
52print " 6 Misc devices and options\n";
a298d207 53print " 7 Parallel devices\n";
6ad7895a
JH
54print "\n\n";
55print "Please enter you choice or q to quit: ";
56chop ($choice = <STDIN>);
57
a298d207 58if ($choice eq ('q' || 'Q'))
6ad7895a
JH
59 {
60 print (CONFIG "\n\n\n");
61 close CONFIG;
62 exit; }
6ad7895a
JH
63 elsif ($choice == 1)
64 { &disk_devices; }
65 elsif ($choice == 2 && !$serdevsflag)
66 { &serial_devices; }
67 elsif ($choice == 3 && !$netdevsflag)
68 { &network_devices; }
69 elsif ($choice == 4)
70 { &console_devices; }
71 elsif ($choice == 5)
72 { &tape_devices; }
73 elsif ($choice == 6)
74 { &misc_dev_option; }
a298d207
GCI
75 elsif ($choice == 7)
76 { &parallel_ports; }
6ad7895a
JH
77 else
78 { &menu; }
79&menu;
80
81}
82
83
84sub config {
85system "clear";
86print " ConfigIt!\n";
87print " A Auto-configuration System\n\n";
88print "Please enter the name of your system: ";
89chop ($systemname = <STDIN>);
90$systemname =~ tr/a-z/A-Z/;
91open (CONFIG, ">>$systemname");
92
93}
94
95
96sub config_serial_devices {
97print (CONFIG "\n#Multi-port Config\n");
98print "Multi-port Comm-Cards are not supported at this time....\n\n";
99sleep 3;
100
101}
102
103
104sub console_devices {
105system "clear";
106print " Console Devices\n\n";
107print " 1 Syscons\n";
108print " 2 Pccons\n";
109print "\n\n\n";
110print "Please enter your choice (q or Q to quit): ";
111chop ($cdevs = <STDIN>);
112
113if ($cdevs == 1 && !$condevsflag)
114 { &syscons; }
115elsif ($cdevs == 2 && !$condevsflag)
116 { &pccons; }
117elsif ($cdevs eq 'q')
118 { return; }
119elsif ($cdevs eq 'Q')
120 { return; }
121else {
122 &console_devices; }
123}
124
125
126
127sub disk_devices {
128
6ad7895a
JH
129 system "clear";
130 local ($choice);
131 print " Disk Device Sub-section\n\n";
132 print " 1 WD drives\n";
133 print " 2 SCSI drives\n";
134 print " 3 Floppy & QIC-40/80 Drives\n";
135 print " 4 Mitsumi CD-ROM Drive\n";
136 print "\n\n";
137 print "Please enter your choice: ";
138 chop ($choice = <STDIN>);
139
a298d207 140 if ($choice eq ('q' || 'Q'))
6ad7895a
JH
141 { return; }
142 elsif ($choice == 1 && !$wdflag)
143 { &wd_drives; }
144 elsif ($choice == 2 && !$scsidevflag)
145 { &scsi_drives; }
146 elsif ($choice == 3 && !$floppyflag)
147 { &floppy_drives; }
148 elsif ($choice == 4 && !$mitsumiflag)
149 { &mitsumi_drive; }
150 else
151 { &disk_devices; }
152}
153
154
155sub doonecard {
a298d207 156$cardnum = @_[0];
6ad7895a
JH
157
158system "clear";
159print " 1 AT&T EN100/STARLAN 10\n";
160print " 2 ISOLAN AT 4141-0\n or ISOLINK 4110\n";
161print " 3 WD/SMC 8003 & 8013\n";
162print " 4 SMC Ultra Elite 16\n";
163print " 5 3com 3c503\n";
164print " 6 NE1000/NE2000\n";
a298d207 165print "\n\nPlease enter the type of network card number $cardnum : ";
6ad7895a
JH
166chop ($netcardchoice = <STDIN>);
167print "Please enter the port (in hex) address of the card: ";
168chop ($netcardadd = <STDIN>);
169print "Please enter the irq of the card: ";
170chop ($netcardirq = <STDIN>);
a298d207 171
6ad7895a
JH
172if ($netcardchoice != 2)
173 { print "Please enter the I/O mem of the card: ";
174 chop ($netcardiomem = <STDIN>);
175 }
a298d207
GCI
176
177if ($netcardchoice != (2 || 1))
178 {
179 if ($ednum < 1) {
180 $cardty = 'ed0';
181 $ednum++;
182 } else {
183 $cardty = "ed$ednum";
184 $ednum++;
185 }
186 $interp = 'edintr';
187 }
188
189if ($netcardchoice == 2)
190 {
191 if ($isnum < 1) {
192 $cardty = 'is0';
193 $isnum++;
194 } else {
195 $cardty = "is$isnum";
196 $isnum++;
197 }
198 $interp = 'isintr';
199 }
200
201if ($netcardchoice == 1)
202 {
203 if ($ienum < 1) {
204 $cardty = 'ie0';
205 $ienum++;
206 } else {
207 $cardty = "ie$ienum";
208 $ienum++
209 }
210 $interp = 'ieintr';
211 }
212
213print (CONFIG "device $cardty at isa? port $netcardadd net irq $netcardirq iomem $netcardiomem vector $interp\n");
6ad7895a
JH
214
215}
216
217
218sub floppy_drives
219{
220$floppyflag = 1;
221system "clear";
a298d207
GCI
222print (CONFIG "\n#Disk devices\n\n");
223
6ad7895a
JH
224print "How many floppys do you have?: ";
225chop ($flch = <STDIN>);
226if ($flch > 0)
227 {
228 print (CONFIG "controller fdc0 at isa? port \"IO_FD1\" bio irq 6 drq 2 vector fdintr\n");
229 print (CONFIG "disk fd0 at fdc0 drive 0\n");
230 print (CONFIG "disk fd1 at fdc0 drive 1\n");
231 }
232if ($flch > 0)
233 {
234 print "Do you have a QIC-40/80 drive?: ";
235 chop ($qic40 = <STDIN>);
236 if ($qic40 eq 'y' || $qic40 eq 'Y')
237 {
238 print (CONFIG "tape ft0 at fdc0 drive 2\n");
239 }
240 }
241}
242
243
244sub misc_dev_option {
245system "clear";
246$miscdevflag = 1;
247print (CONFIG "\n# Misc Devices\n");
248print "Do you want kernel tracing?: ";
249chop ($ktrace = <STDIN>);
a298d207 250if ($ktrace eq ('y' || 'Y'))
6ad7895a
JH
251 {
252 print (CONFIG "options KTRACE\n");
253 }
254print "Do you want kernel debugging?: ";
255chop ($kddb = <STDIN>);
a298d207 256if ($kddb eq ('y' || 'Y'))
6ad7895a
JH
257 {
258 print (CONFIG "pseudo-device ddb\n");
259 }
260print "Do you want fast symlinks?: ";
261chop ($fastlinks = <STDIN>);
a298d207 262if ($fastlinks eq ('y' || 'Y'))
6ad7895a
JH
263 {
264 print (CONFIG "options FASTLINKS\n");
265 }
266print "Do you want PC file system support?: ";
267chop ($pcfs = <STDIN>);
a298d207 268if ($pcfs eq ('y' || 'Y'))
6ad7895a
JH
269 {
270 print (CONFIG "options PCFS\n");
271 }
272print "Do you want Memory File System support?: ";
273chop ($mfs = <STDIN>);
a298d207 274if ($mfs eq ('y' || 'Y'))
6ad7895a
JH
275 {
276 print (CONFIG "options MFS\n");
277 }
278print "Do you want QUOTA support?: ";
279chop ($quota = <STDIN>);
a298d207 280if ($quota eq ('y' || 'Y'))
6ad7895a
JH
281 {
282 print (CONFIG "options QUOTA\n");
283 }
284print "Do you want FIFO support?: ";
285chop ($fifo = <STDIN>);
a298d207 286if ($fifo eq ('y' || 'Y'))
6ad7895a
JH
287 {
288 print (CONFIG "options FIFO\n");
289 }
290print "Do you want ISO File System support?: ";
291chop ($isofs = <STDIN>);
a298d207 292if ($isofs eq ('y' || 'Y'))
6ad7895a
JH
293 {
294 print (CONFIG "options ISOFS\n");
295 }
296
297}
298
299
300sub mitsumi_drive {
301system "clear";
302$mitsumiflag = 1;
a298d207 303print (CONFIG "\n#Disk devices\n\n");
6ad7895a
JH
304
305print "What address (hex) is the mitsumi controller at?: ";
306chop ($mitadd = <STDIN>);
307print "What interupt is the mitsumi controller at?: ";
308chop ($mitint = <STDIN>);
309print (CONFIG "device mcd at isa? port $mitadd bio irq $mitint vector mcdint\n");
310}
311
a298d207
GCI
312#
313# Multi-port support for serial_devices.pl
314#
315# $Id:$
316#
317
318
319sub multiport {
320$numstandm = @_[0];
321system "clear";
322print "NOTE: Only 1 multiport card is supported by ConfigIt.\n";
323print "Please enter the number of ports on the card: ";
324 chop ($multinum = <STDIN>);
325print "Please enter the starting port of the card: ";
326 chop ($startm = <STDIN>);
327print "Please enter the port number of the master port or 0 if none: ";
328 chop ($multimaster = <STDIN>);
329print "Please enter the intrupt of the card: ";
330 chop ($multiint = <STDIN>);
331print (CONFIG "\n#Multi-port serial devices\n\n");
332print (CONFIG "options \"COM_MULTIPORT\"\n");
333
334$portm = $startm;
335$startm =~ tr/a-z/A-Z/;
336
337 for ($i = 1; $i < $multinum + 1; $i++) {
338 $siom = $i + $numstandm;
339 $siom = $siom - 1;
340 if ($siom < 10) { $sio = "sio0"; } else { $sio = "sio"; }
341
342 if ($multimaster != $i) {
343 print (CONFIG "device $sio$siom at isa? port $portm flags 0x501 vector siointr\n");
344 } else {
345 print (CONFIG "device $sio$siom at isa? port $portm tty irq $multiint flags 0x501 vector siointr\n");
346 }
347$portm =~ tr/A-Z/a-z/;
348$numorig = hex ("$portm");
349$numadd = hex ("0x08");
350$numend = $numadd + $numorig;
351$endm = sprintf ("%lx", $numend);
352$end1m = $endm;
353$portm = "0x$end1m";
354$portm =~ tr/a-z/A-Z/;
355
356 }
357if ($numstandm > 0) { &standard_serial; }
358}
6ad7895a
JH
359
360sub network_devices {
361system "clear";
362$netdevsflag = 1;
363print (CONFIG "\n# Network devices\n");
a298d207
GCI
364print "How many networking cards do you have: ";
365chop ($numnet = <STDIN>);
366
367if ($numnet != 0) {
368for ($i = 1; $i <= $numnet ; $i++)
369{
370 &doonecard($i);
6ad7895a 371 }
a298d207
GCI
372}
373
6ad7895a
JH
374print "Do you need the SLIP device in the kernel?: ";
375chop ($slipch = <STDIN>);
a298d207 376if ($slipch eq ('y' || 'Y'))
6ad7895a 377 {
a298d207
GCI
378 print "How many slip devices do you need: ";
379 chop ($slipno = <STDIN>);
380 print (CONFIG "pseudo-device slip $slipno\n");
6ad7895a 381 }
a298d207 382
6ad7895a
JH
383print "Do you need the PPP device in the kernel?: ";
384chop ($pppch = <STDIN>);
a298d207 385if ($pppch eq ('y' || 'Y'))
6ad7895a 386 {
a298d207
GCI
387 print "How many PPP devices do you need: ";
388 chop ($pppno = <STDIN>);
389 print (CONFIG "pseudo-device ppp $pppno\n");
6ad7895a 390 }
a298d207 391
6ad7895a
JH
392print "Do you want Berkeley Packet Filter support?: ";
393chop ($bpf = <STDIN>);
a298d207 394if ($bpf eq ('y' || 'Y'))
6ad7895a
JH
395 {
396 print (CONFIG "pseudo-device bpf\n");
397 }
a298d207 398
6ad7895a
JH
399print "Do you want Internetwork Gateway support?: ";
400chop ($gateway = <STDIN>);
a298d207 401if ($gateway eq ('y' || 'Y'))
6ad7895a
JH
402 {
403 print (CONFIG "option GATEWAY\n");
404 }
a298d207 405
6ad7895a
JH
406print "Do you want NFS support?: ";
407chop ($nfs = <STDIN>);
a298d207 408if ($nfs eq ('y' || 'Y'))
6ad7895a
JH
409 {
410 print (CONFIG "option NFS\n");
411 }
a298d207 412
6ad7895a
JH
413print "How many pty's do you want?: ";
414chop ($ptyno = <STDIN>);
a298d207 415if ($ptyno eq ('y' || 'Y'))
6ad7895a
JH
416 {
417 print (CONFIG "pseudo-device pty $ptyno\n");
418 }
419
420}
421
422
a298d207
GCI
423#
424#
425#
426
427sub parallel_ports {
428
429print "How many parallel ports do you have: ";
430 chop ($paranum = <STDIN>);
431
432if ($paranum) {
433print (CONFIG "\n#Parallel devices\n\n");
434
435for ($i = 1; $i <= $paranum; $i++) {
436 $lpanum = $i - 1;
437 print "Please enter the address for parallel port number $i : ";
438 chop ($paraport = <STDIN>);
439 print "If you are running with out interupts on this port please\n";
440 print "anwser 0 to the following question.\n";
441 print "Please enter the interupt for parallel port number $i : ";
442 chop ($paraint = <STDIN>);
443 if ($paraint) {
444 print (CONFIG "device lpa$lpanum at isa? port $paraport tty irq $paraint vector lptintr\n");
445 } else {
446 print (CONFIG "device lpa$lpanum at isa? port $paraport tty vector lptintr\n");
447 }
448
449 }
450
451 }
452
453}
454
6ad7895a
JH
455sub pccons {
456$condevsflag = 1;
457print (CONFIG "\n# Console devices\n\n");
458print (CONFIG "device pc0 at isa? port \"IO_KBD\" tty irq 1 vector pcrint\n");
459
460}
461
462
463sub scsi_drives {
464$scsidevsflag = 1;
465system "clear";
a298d207 466print (CONFIG "\n# SCSI Devices\n\n");
6ad7895a
JH
467print " 1 Adaptec 1542/Bustec 542\n";
468print " 2 Adaptec 1742\n";
469print " 3 Bustec 742\n";
470print " 4 Ultrastore 14F/34F\n";
471print "\n\n";
472print "Enter your choice or q to quit: ";
473chop ($scsicho = <STDIN>);
474
475if ($scsicho eq 'q' || $scsicho eq 'Q')
476 {
477 return;
478 }
479elsif ($scsicho == 1)
480 {
481 $scsicard = "aha0";
482 $scsiio = "\"IO_AHA0\"";
483 $scsiint = "ahaintr";
484 }
485elsif ($scsicho == 2)
486 {
487 $scsicard = "ahb0";
488 $scsiint = "ahbintr";
489 }
490elsif ($scsicho == 3)
491 {
492 $scsicard = "bt0";
493 $scsiio = "\"IO_BT0\"";
494 $scsiint = "btintr";
495 }
496elsif ($scsicho == 4)
497 {
498 $scsicard = "uha0";
499 $scsiio = "\"IO_UHA0\"";
500 $scsiio = "uhaintr";
501 }
502else { &scsi_drives; }
503
504if ($scsicho == 2)
505 {
506 print "Please enter the interupt the AHA-1742 is on: ";
507 chop ($scsiirq = <STDIN>);
508 print (CONFIG "contoller ahb0 at isa? bio irq $scsiirq vector $scsiint\n");
509 }
510elsif ($scsicho == 1 || $scsicho == 4)
511 {
512 print "Please enter the interupt the SCSI controller is on: ";
513 chop ($scsiirq = <STDIN>);
514 print "Please enter the dma channel the SCSI controller is on: ";
515 chop ($scsidrq = <STDIN>);
516 print (CONFIG "controller $scsicard at isa? port $scsiio bio irq $scsiirq drq $scsidrq vector $scsiint\n");
517 }
518else
519 {
520 print "Please enter the interupt the SCSI controller is on: ";
521 chop ($scsiirq = <STDIN>);
522 print (CONFIG "controller $scsicard at isa? port $scsiio bio irq $scsiirq vector $scsiint\n");
523 }
524
525print (CONFIG "device sd0\n");
526print (CONFIG "device sd1\n");
527print (CONFIG "device sd2\n");
528print (CONFIG "device sd3\n");
529print (CONFIG "device st1\n");
530print (CONFIG "device st2\n");
531print (CONFIG "device cd0\n");
532
533}
534
a298d207
GCI
535#
536# Do serial ports, only standard ones are here
537#
538#
6ad7895a
JH
539
540sub serial_devices {
541system "clear";
542$serdevsflag = 1;
6ad7895a 543
a298d207
GCI
544print "Do you have a multi-port card (Non-standard serial card): ";
545 chop ($multicard = <STDIN>);
546print "Please enter the number of standard serial ports you have: ";
547 chop ($numstand = <STDIN>);
6ad7895a 548
a298d207
GCI
549 if ($multicard eq ( 'y' || 'Y')) {
550 print "Please enter the number of standard serial ports you also have: ";
551 &multiport($numstand);
552 } else {
553 &standard_serial($numstand);
554 }
555print "Do you wish to have bidirectionl serial ports: ";
556 chop ($bidir = <STDIN>);
557 if ($bidir eq ('y' || 'Y')) {
558 print (CONFIG "options \"COM_BIDIR\"\n");
559 }
6ad7895a
JH
560}
561
562
563sub standard_devices {
564system "clear";
565print "What timezone are you in? (cst = 6): ";
566chop ($time = <STDIN>);
567print "What type of cpu do you have? ( 386 or 486 ): ";
568chop ($cputype = <STDIN>);
569
570if ($cputype == 386)
571 {
572 print "Do you have a 387?: ";
573 chop ($mathco = <STDIN>);
574 }
575
576if ($cputype == 486)
577 {
578 print "Is it a DX or SX?: ";
579 chop ($dxsx = <STDIN>);
580 if ($dxsz eq 'SX' || $dxsx eq 'sx')
581 {
582 $mathco = 'n';
583 }
584 }
585
a298d207
GCI
586chop ($date = `date`);
587chop ($whoami = `whoami`);
588
589print (CONFIG "\n#\n#Config file for $systemname\n");
590print (CONFIG "#Generated by ConfigIt!\n");
591print (CONFIG "#Generated at $date by $whoami\n#\n#\n\n");
592
593print (CONFIG "#Generic Items\n\n");
6ad7895a
JH
594print (CONFIG "machine \"i386\"\n");
595print (CONFIG "cpu \"I","$cputype","_CPU\"\n");
a298d207 596
6ad7895a
JH
597if ($mathco eq 'n' || $mathco eq 'N')
598 {
a298d207
GCI
599 print "Do you wish to use the new math emulator (its better): ";
600 chop ($choicesti = <STDIN>);
601 if ($choicesti eq ('y' || 'Y')) {
602 print (CONFIG "options GPL_MATH_EMULATE\n");
603 } else {
6ad7895a
JH
604 print (CONFIG "options MATH_EMULATE\n");
605 }
a298d207
GCI
606}
607
608print "The following is used to set certain parameters.\n";
609print "Please enter the number of users you expect: ";
610 chop ($maxusers = <STDIN>);
611if ($maxusers <= 10) { $maxusers = 10; }
6ad7895a 612print (CONFIG "ident $systemname\n");
a298d207 613print (CONFIG "maxusers $maxusers\n");
6ad7895a
JH
614print (CONFIG "maxfdescs 2000\n");
615print (CONFIG "timezone $time dst\n");
616print (CONFIG "options \"COMPAT_43\"\n");
617print (CONFIG "options UCONSOLE\n");
618print (CONFIG "options XSERVER\n");
619print (CONFIG "options INET\n");
620print "What device is root on? (e.g. \"wd0\"): ";
621chop ($root = <STDIN>);
a298d207
GCI
622if ($root) {
623$roots = "root on $root";
624} else { print "ABORTING you must have a root!\n"; exit; }
625
6ad7895a
JH
626print "What device is swap on? (e.g. \"wd0\" or \"wd0 and wd1\"): ";
627chop ($swap = <STDIN>);
a298d207
GCI
628if ($swap) {
629$swaps = "swap on $swap";
630}
6ad7895a
JH
631print "What device is dump on? (e.g. \"wd0\"): ";
632chop ($dump = <STDIN>);
a298d207
GCI
633if ($dumps) {
634$dumps = "dumps on $dump";
635}
636
637print (CONFIG "config \"386bsd\" $roots $swaps $dumps \n");
6ad7895a
JH
638print (CONFIG "pseudo-device vnodepager\n");
639print (CONFIG "pseudo-device swappager\n");
640print (CONFIG "pseudo-device devpager\n");
641print (CONFIG "pseudo-device ether\n");
642print (CONFIG "pseudo-device loop\n");
643print (CONFIG "pseudo-device log\n");
644print (CONFIG "pseudo-device speaker\n");
645print (CONFIG "device isa0\n");
646
647}
648
649
a298d207
GCI
650#
651# Do standard serial ports
652#
653
654sub standard_serial {
655$sernumss = @_[0];
656
657 print "Are the $sernumss standard ports at the standard location and interup: ";
658 chop ($standss = <STDIN>);
659if ($standss eq ('y' || 'Y')) {
660
661 if ($sernumss == 0 || $sernumss > 4)
662 { print "invalid number of serial ports!!\n\n";
663 print "Please hit any key to continue.";
664 while (!($kbhit = <STDIN>)) {}
665 &serial_devices;}
666
667 if ($sernumss < 3) {
668 print (CONFIG "\n#Standard serial devices\n\n");
669 print (CONFIG "device sio00 at isa? port \"IO_COM1\" tty irq 4 vector siointr\n");
670 print (CONFIG "device sio01 at isa? port \"IO_COM2\" tty irq 3 vector siointr\n");
671 } else {
672 print (CONFIG "\n#Standard serial devices\n\n");
673 print (CONFIG "device sio00 at isa? port \"IO_COM1\" tty irq 4 vector siointr\n");
674 print (CONFIG "device sio01 at isa? port \"IO_COM2\" tty irq 3 vector siointr\n");
675 print (CONFIG "device sio02 at isa? port \"IO_COM3\" tty irq 5 vector siointr\n");
676 print (CONFIG "device sio03 at isa? port \"IO_COM4\" tty irq 9 vector siointr\n"); }
677
678} else {
679 print (CONFIG "\n#Standard serial devices\n\n");
680
681 for ($i = 1;$i <= $sernum;$i++) {
682 print "Please enter the intrupt for serial port number $i: ";
683 chop ($intt = <STDIN>);
684 print "Please enter the address for serial port number $i: ";
685 chop ($portk = <STDIN>);
686 $iik = $i - 1;
687 print (CONFIG "device sio0$iik at isa port $portk tty irq $intt vector siointr\n");
688
689 }
690 }
691}
692
693
6ad7895a
JH
694
695sub syscons {
696print (CONFIG "\n#Console device\n");
697
698$condevsflag = 1;
699system "clear";
700print (CONFIG "device sc0 at isa? port \"IO_KBD\" tty irq 1 vector scintr\n");
701print "How many virtual terminals do you want? (max 8): ";
702chop ($numvty = <STDIN>);
703if ($numvty == 0 || $numvty > 8)
704 { $numvty = 1; }
705print (CONFIG "options \"NCONS=$numvty\"\n");
706print (CONFIG "options \"STAR_SAVER\"\n");
707print (CONFIG "options \"FADE_SAVER\"\n");
708print (CONFIG "options \"SNAKE_SAVER\"\n");
709print (CONFIG "options \"BLANK_SAVER\"\n");
710
711}
712
713
714sub tape_devices
715{
716system "clear";
a298d207 717print (CONFIG "\n# QIC-02 Tape devices\n\n");
6ad7895a
JH
718$tapdevsflag = 1;
719print "Do you have a QIC-02 tape drive?: ";
720chop ($qic02 = <STDIN>);
a298d207 721if ($qic02 eq ('y' || 'Y'))
6ad7895a
JH
722 {
723print "What address is it at? (Hex): ";
724chop ($qic02add = <STDIN>);
725print "What interupt is it at?: ";
726chop ($qic02int = <STDIN>);
727print (CONFIG "device wt0 at isa? port $qic02add bio irq $qic02int drq 1 vector wtintr\n");
728 }
729}
730
731
732sub wd_drives {
733 $wdflag = 1;
734 local ($choice);
735 system "clear";
a298d207
GCI
736 print (CONFIG "\n#Disk devices\n\n");
737
6ad7895a
JH
738 print " WD Drive Configuration\n\n";
739 print "How many WD drives do you have (Max of 4): ";
740 chop ($choice = <STDIN>);
741
742 if ($choice >= 3 ) {
743 print "\n";
744 print (CONFIG "controller wdc0 at isa? port \"IO_WD1\" bio irq 14 vector wdintr\n");
745 print "\n";
746 print (CONFIG "disk wd0 at wdc0 drive 0\n");
747 print (CONFIG "disk wd1 at wdc1 drive 1\n");
748 print (CONFIG "controller wdc1 at isa? port \"IO_WD2\" bio irq 15 vector wdintr\n");
749 print (CONFIG "disk wd2 at wdc1 drive 0\n");
750 print (CONFIG "disk wd3 at wdc1 drive 1\n");
751 print "\n";
752 } else {
753 print "\n";
754 print (CONFIG "controller wdc0 at isa? port \"IO_WD1\" bio irq 14 vector wdintr\n");
755 print "\n";
756 print (CONFIG "disk wd0 at wdc0 drive 0\n");
757 print (CONFIG "disk wd1 at wdc0 drive 1\n");
758 print "\n";
759 }
760}
761