README FOR LINUX SONY CDU-535/531 DRIVER ======================================== This is the fifth release of the Sony CDU-535 (and 531) driver for Linux. There are no new features or bug fixes in this release. It just brings the patches up to the much anticipated 1.0 kernel. I do not think I have the documentation to add features like DMA support so if anyone else wants to pursue it or help me with it, please do. IMPORTANT: If you are using *any* release of this driver prior to 0.4, note that the device number has changed to 24 -- you will have to recreate your devices! (see CHANGES) This package contains a Linux device driver for the Sony CDU-535 CDROM drive. This is one of the older Sony drives with its own interface card (Sony bus). The DOS driver for this drive is named SONY_CDU.SYS - when you boot DOS your drive should be identified as a SONY CDU-535. The driver probably works with a CDU-531 also since that drive's documentation was used to write the driver -- Sony said they were very similar. One user reported that the driver worked on drives OEM'ed by Procomm, drive and interface board were labelled Procomm. The Linux driver is based on Corey Minyard's sonycd 0.3 driver for the CDU-31A. Ron Jeppesen just changed the commands that were sent to the drive to correspond to the CDU-535 commands and registers. There were enough changes to let bugs creep in but it seems to be stable. Ron was able to tar an entire CDROM (should read all blocks) and built ghostview and xfig off Walnut Creek's X11R5/GNU CDROM. xcdplayer and workman work with the driver. Others have used the driver without problems except those dealing with wait loops (fixed in third release). Like Minyard's original driver this one uses a polled interface (this is also the default setup for the DOS driver). It has not been tried with interrupts or DMA enabled on the board. REQUIREMENTS ============ - Sony CDU-535 drive, preferably without interrupts and DMA enabled on the card. - Drive must be set up as unit 1. Only the first unit will be recognized - Linux kernel source and gcc compiler FILES ===== README - this file sony535-0.5.patch - diffs to the kernel necessary for the driver CHANGES - list of changes between this version and previous versions of the driver INSTALLATION ============ 1. Untar the distribution someplace. (Ok, so you've already done that.) For the examples below I assume that you untar into the /usr/src/sony535-0.5 directory. cd /usr/src gunzip -c sony535-0.5.tar.gz | tar xvf - 2. Apply the patch sony535-0.5.patch in the directory that holds the Linux source directory (normally /usr/src). This is where you normally apply patches. i.e., if Linux is in /usr/src/linux, apply the patch in /usr/src. cd /usr/src patch -p0 & patch.log This will patch cleanly with the Linux 1.0 kernel. If you have applied other patches check patch.log to see if any of the patches failed. If they did, you will have to make the changes by hand. 3. If your Sony interface card is not at the default address of 0x340, you will have to modify the file linux/drivers/block/sonycd535.c, changing the CDU535_ADDRESS define on line 122 to the address on your board. If you are not sure of your board address, check the documentation and jumpers or check your CONFIG.SYS file under MSDOS. In CONFIG.SYS, the address is given using the /B parameter to the SONY_CDU.SYS driver (except don't put the 'H' at the end). Enter the same number in hex (put 0x in front of the number). 4. Make a device with major number 24, minor number 0. Use the command: mknod /dev/cdu535 b 24 0 Then create a symbolic link from /dev/cdu535 to /dev/cdrom: ln -s cdu535 /dev/cdrom This link will allow SCSI and Sony drive to be handled with the same drivers. Minyard wrote the Sony driver to have the same IOCTL interface as the SCSI driver, so commands should work fine on both. If you want to run something that expects a SCSI CDROM drive, create a symbolic from /dev/cdu535 to /dev/sr0 (useful for workman) rm /dev/sr0 ln -s cdu535 /dev/sr0 5. Reconfigure the kernel (make config) and answer "y" to the Sony CDU-535 CDROM prompt. Make sure you also answer "y" when it asks if you want the ISO9660 filesystem. This is the filesystem used by CD-ROMs. Do a "make dep", "make clean", then rebuild the kernel ("make"). Make a boot floppy using the command "make zdisk" (make sure a new floppy is in the A: drive). 6. Reboot and try it out. If all goes well you will get a message during startup saying that the Sony CDROM drive was found. The command to mount a CDROM is: mount -r -t iso9660 /dev/cdrom /cdrom (Make the directory /cdrom first if it does not already exist.) NOTES: ====== 1) The drive MUST be turned on when booting or it will not be recognized! 2) when the cdrom device is opened the eject button is disabled to keep the user from ejecting a mounted disk and replacing it with another. Unfortunately xcdplayer and workman also open the cdrom device so you have to use the eject button in the software. Keep this in mind if your cdrom player refuses to give up its disk -- exit workman or xcdplayer, or umount the drive if it has been mounted. THANKS ====== Many thanks to Ron Jeppesen (ronj.an@site007.saic.com) for getting this project off the ground. He wrote the initial release and the first two patches to this driver (0.1, 0.2, and 0.3). (aknowlegements from Ron Jeppesen in the 0.3 release:) Thanks to Corey Minyard who wrote the original CDU-31A driver on which this driver is based. Thanks to Ken Pizzini and Bob Blair who provided patches and feedback on the first release of this driver. Ken Pizzini ken@halcyon.com