*BSD News Article 25074


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!bunyip.cc.uq.oz.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!news.kei.com!sol.ctr.columbia.edu!usc!math.ohio-state.edu!cyber2.cyberstore.ca!nntp.cs.ubc.ca!unixg.ubc.ca!acs.ucalgary.ca!cpsc.ucalgary.ca!xenlink!fsa.ca!deraadt
From: deraadt@fsa.ca (Theo de Raadt)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Predefined SCSI devices in NetBSD-0.9 ?
Date: 15 Dec 93 09:09:17
Organization: little lizard city
Lines: 49
Message-ID: <DERAADT.93Dec15090917@newt.fsa.ca>
References: <2eme9p$jo4@mips.arb-phys.uni-dortmund.de>
NNTP-Posting-Host: newt.fsa.ca
In-reply-to: wb@arb-phys.uni-dortmund.de's message of 15 Dec 1993 08:27:53 +0100

In article <2eme9p$jo4@mips.arb-phys.uni-dortmund.de> wb@arb-phys.uni-dortmund.de (Wilhelm B. Kloke) writes:
   In NetBSD-0.9-current, I find the stuff handling predefined SCSI devices
   removed from scsiconf.c.

Julians `predefined scsi devices' code got ripped out, and the config mechanism
was improved. What you ask for is still doable, and much more flexible (rather
than editing the scsi code for the kernel, you edit the config program. Julians'
ugly hack means that you cannot build multiple kernels from the same kernel
tree).

>   I agree that this was a bad solution, anyway. I would prefer a direct mapping
>   from dcsi device no's to minor dev no's, as it is handled in some SysV systems
>   I know of (A/UX and Risc/OS).

You can almost cause this mapping yourself. The NetBSD config program handles
this in much the same way that SunOS does it. It's not quite a direct mapping,
but it's fairly powerful...

controller      ahb0    at isa? bio irq 11 drq 5 vector ahbintr
disk            sd0     at ahb0 flags 0 drive 000
disk            sd1     at ahb0 flags 0 drive 010
disk            sd2     at ahb0 flags 0 drive 020
disk            sd3     at ahb0 flags 0 drive 040
tape            st0     at ahb0 flags 1 drive 030
tape            st1     at ahb0 flags 1 drive 050
disk            cd0     at ahb0 flags 2 drive 060
disk            sd4     at ahb0 flags 0 drive ?
disk            sd5     at ahb0 flags 0 drive ?
tape            st2     at ahb0 flags 1 drive ?
disk            cd1     at ahb0 flags 2 drive ?

`flags' has these values
	0 standard disk drive
	1 tape drive
	2 cdrom drive

`drive' is defined in this way
	(first, realize that the leading 0 means it's octal)
	scsi-id * 8 + lun, so 051 would mean: scsi-id #5, lun #1.
	a value of `?' picks up any scsi-id/lun combination which is
	still unassigned.

>   But I urgently need a way to use devices which are not available at boot
>   time, as they may be used on other machines.

This is harder. I don't think this can be done with the any of the scsi
systems floating around.
--
This space not left unintentionally unblank.		deraadt@fsa.ca