Prepared by Michael Brinke-Engel (mikebren@sco.com) and Ronald Joe Record (rr@sco.com)
Drives tested on SCO platforms include:
Target platforms | Status for cdrecord-1.8a19 |
---|---|
SCO OpenServer 5.0.0 | unsupported (no SCSIUSERCMD2) |
SCO OpenServer 5.0.2 | unsupported (no SCSIUSERCMD2) |
SCO OpenServer 5.0.4 | fully working incl. FIFO (**) |
SCO OpenServer 5.0.5 | fully working incl. FIFO (**) |
SCO UnixWare 2.1.3 | fully working incl. FIFO |
UnixWare 7.0.1 | fully working incl. FIFO |
UnixWare 7.1 | fully working incl. FIFO |
** = without changed sense req.
Driver | PTF required |
---|---|
c8xx | ptf7047 |
qlc1020 | ptf7048 (***) |
adsl | ptf7049 |
adsb | ptf7062 |
dak | ptf7063 |
*** = this works on UnixWare 7.0.1 only
These PTF's are necessary to overcome the limit of 512 bytes per logical block in any scsi passthrough command on these controllers. Please make sure that you don't override these PTF's with any vendor supplied hba unless you know that the 512 byte limit is also fixed with the new vendor supplied driver.
The above controllers are known to have this limitation, but - this does not imply that there is no other hba showing the same limitation.
!!! These PTF's are not necessary when using UnixWare 7.1 !!!
SCO OpenServer / UnixWare Useage, Porting and Build Notes
Status : 10-May-1999
Used codebase : cdrecord-1.8a19
Compilation platforms
OpenServer :
Default values and /etc/default/cdrecord
Default values can be set for the following options in
/etc/default/cdrecord.
For example: CDR_FIFOSIZE=8m or CDR_SPEED=2
Each line that follows a label contains a TAB separated list of items. Currently, three items are recognized: the SCSI ID of the drive, the default speed that should be used for this drive and the default FIFO size that should be used for this drive. The values for speed and fifosize may be set to -1 to tell cdrecord to use the global defaults. A typical line may look this:
teac1=0,5,0 4 8m yamaha=1,6,0 -1 -1This tells cdrecord that a drive named teac1 is at scsibus 0, target 5, lun 0 and should be used with speed 4 and a FIFO size of 8 MB. A second drive may be found at scsibus 1, target 6, lun 0 and uses the default speed and the default FIFO size.
The standard LINUX device addressing method does not work on UnixWare & OpenServer as we don't have a generic scsi driver. That's also the reason, why the -scanbus option of cdrecord does not work. The current implementation of the -scanbus option of cdrecord is bound to the existence of the /dev/scg driver.
As OpenServer and UnixWare don't have a generic scsi drivers, we have to use the target driver (Srom on OSR and SC01 on UW) to access the attached CD-Writers.
This therefore changes the idea of specifying the original
bus, id, lunparameters to be
number-of-cd-device, id, lunas the target driver allow only to open the cd-rom device, which are on OpenServer:
/dev/rcd0, /etc/rcd1 ...and on UnixWare:
/dev/rcdrom/cdrom1, /dev/rcdrom/cdrom2 ....So if the cd-writer has the special device node /dev/rcd1 (and ID=6, LUN=0), then the parameters would be:
# cdrecord dev=1,6,0 ....SO DON'T USE THE LINUX "BUS, ID, LUN" METHOD DESCRIBED IN THE MAN-PAGE,
THE NUMBERING SCHEME IS AS FOLLOWS
cdrecord dev=X,Y,Z ... with X = the number of the cdrom device For OpenServer this is: 0 for /dev/rcd0, 1 for /dev/rcd1 etc. For UnixWare this is: 1 for /dev/rcdrom/cdrom1, 2 for /dev/rcdrom/cdrom2 etc. Y = the scsi id due to the fact of using the special device node for the scsi passthru, it does not matter at all, what id we give to cdrecord, as only the number of the cdrom device is used to open the device node Remember, we don't have a generic scsi driver interface! Z = the lun Again, the same applies to the lun as to the id!The other and more clear method is to use the whole special device node as the device id as in the following example (NOTE the different syntax):
On OpenServer:
# cdrecord dev=/dev/rcd1:6,0 ...will use the /dev/rcd1 device as the writer (again ignoring the id and lun)
and on UnixWare:
# cdrecord dev=/dev/rcdrom/cdrom1:4,0 ...will use the /dev/rcdrom/cdrom1 device as the writer (also ignoring id and lun).
Either of the two methods can be used to specify the device in the /etc/default/cdrecord file.
To backup data to your CD Recorder:
Make ISO File System listed below takes everything in and below your working directory and creates the image file /tmp/outfile. You can take a look at the mkisofs options to see what these actually do, but they work.
mkisofs -L -l -v -r -o /tmp/outfile .note you will have one additional file called rr_moved which is an empty directory. The -r keeps anything from being written into that directory.
cdrecord -v -dev=/dev/rcdrom/cdrom2:0,5,0 /tmp/outfile speed=4
This should explain the /dev/cdrom2:0,5,0 . The order of controller, lun, Target ID, was dictated by the CDRECORD command. The system that this was run on has a CD on SCSI 0 and the Yamaha CDRW at SCSI 1.
# cd /dev/cdrom # ls -lia total 20 34285 drwxrwxr-x 2 root root 96 Apr 5 10:52 . 27 drwxrwxr-x 26 root sys 10240 Apr 6 04:32 .. 34287 brw-rw-rw- 2 root sys 110, 0 Apr 5 10:52 c0b0t4l0 34293 brw-rw-rw- 2 root sys 110, 1 Apr 5 10:52 c0b0t5l0 34287 brw-rw-rw- 2 root sys 110, 0 Apr 5 10:52 cdrom1 34293 brw-rw-rw- 2 root sys 110, 1 Apr 5 10:52 cdrom2
mkdir /cdrwThe CDRW requires the -r command.
mount -r -F cdfs /dev/cdrom/cdrom2 /cdrw
All below changes are necessary for the current version as Joerg has not yet fully incorporated all SCO changes to compile the standard distribution out of the box.
Joerg wants to check another way of implementing the necessary changes to compile on UnixWare in order to avoid special handling of cdrecord common source (see issue 1).
Source Code Changes :
<= line 255: #ifndef UNIXWARE #define SC_PARITY #endif line 402: #ifndef UNIXWARE #define scb u_scb.Scb #endif
<= global replacement ? scb -> u_scb.Scb
<= global replacement ? scb -> u_scb.Scb
<= line 80: #ifndef UNIXWARE #if defined (HAVE_STRINGS_H) && (HAVE_STRINGS_H == 1) #include#endif #endif /*UNIXWARE */
=> always use usleep() from cdrecord instead of OpenServer usleep() usleep() from cdrecord will use select() instead modified line 98: #if !defined(HAVE_USLEEP) || defined(OPENSERVER)
<= Fixed priocntl() parameter setup for UnixWare This would not really be needed, but to make sure there are no problems with wrong structure elements. modified from line 1914 on: #ifndef UNIXWARE movebytes(info.pc_clinfo, &rtinfo, sizeof(rtinfo_t)); #else rtinfo.rt_maxpri = (short) info.pc_cid; #endif /* set priority to max */ rtparam.rt_pri = rtinfo.rt_maxpri - pri; rtparam.rt_tqsecs = 0; rtparam.rt_tqnsecs = RT_TQDEF; param.pc_cid = info.pc_cid; #ifndef UNIXWARE movebytes(&rtparam, param.pc_clparms, sizeof(rtparms_t)); #else param.pc_clparms[0] = (long) rtparam.rt_pri; param.pc_clparms[1] = (long) rtparam.rt_tqsecs; param.pc_clparms[2] = (long) rtparam.rt_tqnsecs; #endif
SCO OpenServer 5:
./conf/config.guess <= modified (-> UW7)
SCO OpenServer 5.0.X:
./libscg/scsi-openserver.c <= renamed
Cdrecord 1.8.11 build notes for OpenServer and Unixware:
Just place the (each renamed to smake) smake-binaries in any directory in your search path of your compile machines and go the extraction directory of the source and run smake. For example:
You extracted the source into /home/skunk/cdrecord-1.8.11
a) cd /home/skunk/cdrecord-1.8.11
b)
c) copy the ./cdrecord/OBJ/i386-sco-cc/cdrecord
or the ./cdrecord/OBJ/x86at-unixware-cc/cdrecord
binaries to a place where you want them to reside for testing.
I have two dot-files in the root of the sourcetree called
.copy and .copu
.copy = copy the OpenServer binaries (cdrecord, mkisofs, cdda2wav)
into the $HOME/bin directory on the compile machine.
.copu = copy the UnixWare binaries (cdrecord, mkisofs, cdda2wav)
into the $HOME/bin directory on the compile machine.
I my case this makes sense as I have the source on OpenServer and use
a NFS mount on a UnixWare machine to compile the same sourcetree on UW2/7.
This is pretty much the same as what Joerg, the original author, does to
support the rather hugh amount of different platforms.
NOTE: On both platforms, you will need to have the standard devsys
installed to have access to cc *and* makedepend.
Let me know if you have any questions or problems compiling the source
on your machines.