mirror of
https://github.com/akuker/RASCSI.git
synced 2024-09-12 09:55:00 +00:00
* Initial RTC skeleton * Added device info * Added TEST UNIT READY * Fixed command dispatcher * First untested naive implementation * Comment update * Code cleanup * More code cleanup * Updated date/time encoding * Updated versioning * Use standard RaSCSI INQUIRY version for SCRT device * Manpage update * Added shortcut for SCRT type * Added support for rtc "filename" * RTC supports LUNs > 0 * Fixed LUN count * Renaming * Renaming * Manpage update * Initial naive implementation * SCRA is removable * Updated command list * Added controller field * Shut down works, bus free phase is not yet entered * Clear caches on shutdown * Expose BusFree() * Moved code * Logging update * Moved code * Moved code * Added comment * Logging update * Code cleanup * Service device is not removable anymore (was only needed for testing) * Manpage update * Added comment * Comment update * Version update * Renaming * Comment update * Comment update * Renaming * Fixed typo * Added convenience method * Property handling optimization * Code cleanup * Code cleanup * Code cleanup, introduced base class * Added TODO * More code cleanup * Removed unnecessary assignments * Moved code * Removed forward declaration * Added base class * INclude cleanup * Moved scsi_command enum * Fixed warnings * Addressing circular dependencies * Removed duplicate enum * include file cleanup * Include cleanup * Reduced dependencies to Disk class (replaced by Device), fixed TODO * Include cleanup * PrimaryDevice implements ReportLuns * Inheritance update * Removed duplicate code * Moved code to base class * Cleanup * Removed duplicate field * Updated command dispatchign * Comment update * Moved code * Updated method visibilities * Moved MODE SENSE/MODE SELECT base code
116 lines
5.7 KiB
Groff
116 lines
5.7 KiB
Groff
.TH rascsi 1
|
|
.SH NAME
|
|
rascsi \- Emulates SCSI devices using the Raspberry Pi GPIO pins
|
|
.SH SYNOPSIS
|
|
.B rascsi
|
|
[\fB\-F\f® \fIFOLDER\fR]
|
|
[\fB\-L\f® \fILOG_LEVEL\fR]
|
|
[\fB\-P\f® \fIACCESS_TOKEN_FILE\fR]
|
|
[\fB\-R\fR \fISCAN_DEPTH\fR]
|
|
[\fB\-h\fR]
|
|
[\fB\-n\fR \fIVENDOR:PRODUCT:REVISION\fR]
|
|
[\fB\-p\f® \fIPORT\fR]
|
|
[\fB\-r\fR \fIRESERVED_IDS\fR]
|
|
[\fB\-n\fR \fITYPE\fR]
|
|
[\fB\-v\fR]
|
|
[\fB\-z\fR \fILOCALE\fR]
|
|
[\fB\-IDn:[u]\fR \fIFILE\fR]
|
|
[\fB\-HDn[:u]\fR \fIFILE\fR]...
|
|
.SH DESCRIPTION
|
|
.B rascsi
|
|
Emulates SCSI devices using the Raspberry Pi GPIO pins.
|
|
.PP
|
|
In the arguments to RaSCSI, one or more SCSI (-IDn[:u]) or SASI (-HDn[:u]) devices can be specified.
|
|
The number (n) after the ID or HD identifier specifies the ID number for that device. The optional number (u) specifies the LUN (logical unit) for that device. The default LUN is 0.
|
|
For SCSI: The ID is limited from 0-7. However, typically SCSI ID 7 is reserved for the "initiator" (the host computer). The LUN is limited from 0-31. Note that SASI is considered rare and only used on very early Sharp X68000 computers.
|
|
.PP
|
|
RaSCSI will determine the type of device based upon the file extension of the FILE argument.
|
|
hdf: SASI Hard Disk image (XM6 SASI HD image - typically only used with X68000)
|
|
hds: SCSI Hard Disk image (generic, non-removable)
|
|
hdr: SCSI Hard Disk image (generic, removable)
|
|
hdn: SCSI Hard Disk image (NEC GENUINE)
|
|
hdi: SCSI Hard Disk image (Anex86 HD image)
|
|
nhd: SCSI Hard Disk image (T98Next HD image)
|
|
hda: SCSI Hard Disk image (APPLE GENUINE - typically used with Mac SCSI emulation)
|
|
mos: SCSI Magneto-optical image (XM6 SCSI MO image - typically only used with X68000)
|
|
iso: SCSI CD-ROM image (ISO 9660 image)
|
|
|
|
For example, if you want to specify an Apple-compatible HD image on ID 0, you can use the following command:
|
|
sudo rascsi -ID0 /path/to/drive/hdimage.hda
|
|
|
|
Once RaSCSI starts, it will open a socket (default port is 6868) to allow external management commands.
|
|
If another process is using the rascsi port, RaSCSI will terminate, since it is likely another instance of RaSCSI.
|
|
Once RaSCSI has initialized, the rasctl utility can be used to send commands.
|
|
|
|
To quit RaSCSI, press Control + C. If it is running in the background, you can kill it using an INT signal.
|
|
|
|
.SH OPTIONS
|
|
.TP
|
|
.BR \-b\fI " " \fIBLOCK_SIZE
|
|
The optional block size. For SCSI drives 512, 1024, 2048 or 4096 bytes, default size is 512 bytes. For SASI drives 256 or 1024 bytes, default is 256 bytes.
|
|
.TP
|
|
.BR \-F\fI " " \fIFOLDER
|
|
The default folder for image files. For files in this folder no absolute path needs to be specified. The initial default folder is '~/images'.
|
|
.TP
|
|
.BR \-L\fI " " \fILOG_LEVEL
|
|
The rascsi log level (trace, debug, info, warn, err, critical, off). The default log level is 'info'.
|
|
.TP
|
|
.BR \-P\fI " " \fIACCESS_TOKEN_FILE
|
|
Enable authentication and read the access token from the specified file. The access token file must be owned by root and must be readable by root only.
|
|
.TP
|
|
.BR \-R\fI " " \fISCAN_DEPTH
|
|
Scan for image files recursively, up to a depth of SCAN_DEPTH. Depth 0 means to ignore any folders within the default image filder. Be careful when using this option with many sub-folders in the default image folder. The default depth is 1.
|
|
.TP
|
|
.BR \-h\fI " " \fI
|
|
Show a help page.
|
|
.TP
|
|
.BR \-n\fI " " \fIVENDOR:PRODUCT:REVISION
|
|
Set the vendor, product and revision for the device, to be returned with the INQUIRY data. A complete set of name components must be provided. VENDOR may have up to 8, PRODUCT up to 16, REVISION up to 4 characters. Padding with blanks to the maxium length is automatically applied. Once set the name of a device cannot be changed.
|
|
.TP
|
|
.BR \-p\fI " " \fIPORT
|
|
The rascsi server port, default is 6868.
|
|
.TP
|
|
.BR \-r\fI " " \fIRESERVED_IDS
|
|
Comma-separated list of IDs to reserve.
|
|
.BR \-p\fI " " \fITYPE
|
|
The optional case-insensitive device type (SAHD, SCHD, SCRM, SCCD, SCMO, SCBR, SCDP, SCHS). If no type is specified for devices that support an image file, rascsi tries to derive the type from the file extension.
|
|
.TP
|
|
.BR \-v\fI " " \fI
|
|
Display the rascsi version.
|
|
.TP
|
|
.BR \-z\fI " "\fILOCALE
|
|
Overrides the default locale for client-faces error messages. The client can override the locale.
|
|
.TP
|
|
.BR \-ID\fIn[:u] " " \fIFILE
|
|
n is the SCSI ID number (0-7). u (0-31) is the optional LUN (logical unit). The default LUN is 0.
|
|
.IP
|
|
FILE is the name of the image file to use for the SCSI device. For devices that do not support an image file (SCBR, SCDP, SCHS) a dummy name must be provided.
|
|
.TP
|
|
.BR \-HD\fIn[:u] " " \fIFILE
|
|
n is the SASI ID number (0-15). The effective SASI ID is calculated as n/2, the effective SASI LUN is calculated is the remainder of n/2. Alternatively the n:u syntax can be used, where ns is the SASI ID (0-7) and u the LUN (0-1).
|
|
.IP
|
|
FILE is the name of the image file to use for the SASI device.
|
|
.IP
|
|
Note: SASI usage is rare, and is typically limited to early Unix workstations and Sharp X68000 systems.
|
|
|
|
.SH EXAMPLES
|
|
Launch RaSCSI with no emulated drives attached:
|
|
rascsi
|
|
|
|
Launch RaSCSI with an Apple hard drive image as ID 0 and a CD-ROM as ID 2
|
|
rascsi -ID0 /path/to/harddrive.hda -ID2 /path/to/cdimage.iso
|
|
|
|
Launch RaSCSI with a removable SCSI drive image as ID 0 and the raw device file /dev/hdb (e.g. a USB stick) and a DaynaPort network adapter as ID 6:
|
|
rascsi -ID0 -t scrm /dev/hdb -ID6 -t scdp daynaport
|
|
|
|
To create an empty, 100MB HD image, use the following command:
|
|
dd if=/dev/zero of=/path/to/newimage.hda bs=512 count=204800
|
|
|
|
In case the fallocate command is available a much faster alternative to the dd command is:
|
|
fallocate -l 104857600 /path/to/newimage.hda
|
|
|
|
.SH SEE ALSO
|
|
rasctl(1), scsimon(1), rasdump(1), sasidump(1)
|
|
|
|
Full documentation is available at: <https://www.github.com/akuker/RASCSI/wiki/>
|