mirror of
https://github.com/akuker/RASCSI.git
synced 2024-09-12 09:55:00 +00:00
* Fixed buster compile-time issue
* Host services inherit from ModePageDevice
* Call base class
* Visibility update
* Updated includes
* Updated dispatcher
* Added TODOs
* Logging update
* Code cleanup
* Use namespace instead of class for ScsiDefs
* Renaming
* Cleanup
* Use dispatcher template in order to remove duplicate code
* Updated all dispatchers
* Clean up commands
* Removed duplicate code
* Removed duplicate code
* Updated template definition
* Fixed typo
* Fixed warning
* Code cleanup
* Device list must be static
* Cleanup
* Logging update
* Added comments
* Cleanup
* Base class update
* SCSIBR is not a subclass of Disk anymore, but of PrimaryDevice
* Updated includes
* Fixed compile-time issue on the Pi
* Header file cleanup
* Interface cleanup
* Removed wrong override
* include file cleanup
* Removed obsolete usage of streams
* Removed more stream usages
* Stream usage cleanup
* Include cleanup
* Renaming
* Include cleanup
* Interface update
* SCLP device skeleton
* Initial RELEASE/RESERVE UNIT
* Added full set of commands
* Extracted command phase code
* Stripped SCSI controller code
* Removed unused code
* Commented out code
* Initial naive implementation
* Added debug output
* Disable printing for now
* Updated file handling
* Updated DataOut()
* Added comment
* Updated assertion
* Comment update
* Updated assertion
* Code cleanup
* Reset bytes to transfer
* Reverted change
* Refactoring
* Moved assertion
* Updated ReceiveBytes()
* Removed override
* Added interface
* Code cleanup
* Updated TEST UNIT READY
* Added flag for byte-oriented transfer
* Updated TEST UNIT READY
* Length handling update
* Updated bytecount handling
* Fixed warning
* Added TODO
* Updated assertion
* Enabled priting
* Updated error handling
* Code cleanup
* Logging update
* First working version
* Use temporary file
* Logging update
* Handle parameters
* Updated format string
* Updated logging
* File handling update
* Code cleanup
* Fixed buffer size
* Updated file handling
* Manpage update
* Initial reservation handling
* Updated reservation handling
* Initial reservation testing
* Remember initiator ID
* Extract initiator ID
* Updated SCSI initiator ID handling
* Logging update
* Added reservation timeout
* Updated timeout handling
* Code cleanup
* Only pass initiator ID to *SCSI* controller
* Added comments
* Added comment
* Implemented STOP PRINT
* Comment update
* Comment update
* Comment update
* Added comment
* Comment update
* Removed useless comments
* Updated printer parameter handling
* Updated parameter handling
* Manpage update
* Manpage update
* Comment update
* Default printer product name update
* Renaming
* Updated logging
* Logging update
* Logging update
* Comment update
* Code cleanup
* Added printer shortcut
* Comment update
* Comment update
* Output formatting update
* Updated error handling
* Code cleanup
* More cleanup
* Revert "More cleanup"
This reverts commit 05708986ee
.
* Output formatting update
* Output format update
* Sort parameters
* Comment update
* Improved parsing of parameters
* Manpage update
* Updated SCSI level
* Removed magic constants
* Removed magic constant
* Template update
* Template usage update
* Get rid of SASIDEV for printer
* Get rid of SASIDEV for host services
* Moved initiator_id field
* Moved field
* Moved field
* Added comment
* Error handling must use effective LUN
* Removed obsolete casts
* Removed unused method declarations
* Comment update
* Code cleanup
* More code cleanup
* Optimization
* Removed duplicate code
* Logging update
* Fixed warning
* Code cleanup
* Added TODOs
* TODO update
* Backwards compatibility update
* Comment update
157 lines
7.1 KiB
Plaintext
157 lines
7.1 KiB
Plaintext
!! ------ THIS FILE IS AUTO_GENERATED! DO NOT MANUALLY UPDATE!!!
|
||
!! ------ The native file is rascsi.1. Re-run 'make docs' after updating\n\n
|
||
rascsi(1) General Commands Manual rascsi(1)
|
||
|
||
NAME
|
||
rascsi - Emulates SCSI devices using the Raspberry Pi GPIO pins
|
||
|
||
SYNOPSIS
|
||
rascsi [-F[u00AE] FOLDER] [-L[u00AE] LOG_LEVEL] [-P[u00AE] ACCESS_TO‐
|
||
KEN_FILE] [-R SCAN_DEPTH] [-h] [-n VENDOR:PRODUCT:REVISION] [-p[u00AE]
|
||
PORT] [-r RESERVED_IDS] [-n TYPE] [-v] [-z LOCALE] [-IDn:[u] FILE]
|
||
[-HDn[:u] FILE]...
|
||
|
||
DESCRIPTION
|
||
rascsi Emulates SCSI devices using the Raspberry Pi GPIO pins.
|
||
|
||
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 lim‐
|
||
ited from 0-31. Note that SASI is considered rare and only used on very
|
||
early Sharp X68000 computers.
|
||
|
||
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 al‐
|
||
low 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.
|
||
|
||
OPTIONS
|
||
-b BLOCK_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.
|
||
|
||
-F FOLDER
|
||
The default folder for image files. For files in this folder no
|
||
absolute path needs to be specified. The initial default folder
|
||
is '~/images'.
|
||
|
||
-L LOG_LEVEL
|
||
The rascsi log level (trace, debug, info, warn, err, critical,
|
||
off). The default log level is 'info'.
|
||
|
||
-P ACCESS_TOKEN_FILE
|
||
Enable authentication and read the access token from the speci‐
|
||
fied file. The access token file must be owned by root and must
|
||
be readable by root only.
|
||
|
||
-R SCAN_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.
|
||
|
||
-h Show a help page.
|
||
|
||
-n VENDOR:PRODUCT:REVISION
|
||
Set the vendor, product and revision for the device, to be re‐
|
||
turned with the INQUIRY data. A complete set of name components
|
||
must be provided. VENDOR may have up to 8, PRODUCT up to 16, RE‐
|
||
VISION up to 4 characters. Padding with blanks to the maxium
|
||
length is automatically applied. Once set the name of a device
|
||
cannot be changed.
|
||
|
||
-p PORT
|
||
The rascsi server port, default is 6868.
|
||
|
||
-r RESERVED_IDS
|
||
Comma-separated list of IDs to reserve. -p TYPE The optional
|
||
case-insensitive device type (SAHD, SCHD, SCRM, SCCD, SCMO,
|
||
SCBR, SCDP, SCLP, SCHS). If no type is specified for devices
|
||
that support an image file, rascsi tries to derive the type from
|
||
the file extension.
|
||
|
||
-v Display the rascsi version.
|
||
|
||
-z LOCALE
|
||
Overrides the default locale for client-faces error messages.
|
||
The client can override the locale.
|
||
|
||
-IDn[:u] FILE
|
||
n is the SCSI ID number (0-7). u (0-31) is the optional LUN
|
||
(logical unit). The default LUN is 0.
|
||
|
||
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, SCLP,
|
||
SCHS) the filename may have a special meaning or a dummy name
|
||
can be provided. For SCBR and SCDP it is an optioinal priori‐
|
||
tized list of network interfaces, e.g. "inter‐
|
||
faces=eth0,eth1,wlan0". For SCLP it is the print command to be
|
||
used and a reservation timeout in seconds, e.g. "cmd=lp
|
||
-oraw:timeout=60".
|
||
|
||
-HDn[:u] FILE
|
||
n is the SASI ID number (0-15). The effective SASI ID is calcu‐
|
||
lated as n/2, the effective SASI LUN is calculated is the re‐
|
||
mainder 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).
|
||
|
||
FILE is the name of the image file to use for the SASI device.
|
||
|
||
Note: SASI usage is rare, and is typically limited to early Unix
|
||
workstations and Sharp X68000 systems.
|
||
|
||
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 de‐
|
||
vice 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
|
||
|
||
SEE ALSO
|
||
rasctl(1), scsimon(1), rasdump(1), sasidump(1)
|
||
|
||
Full documentation is available at:
|
||
<https://www.github.com/akuker/RASCSI/wiki/>
|
||
|
||
rascsi(1)
|