Rebrand project to PiSCSI (#1016)

* Rebrand project to PiSCSI
- rascsi ->piscsi
- rasctl -> scsictl
- rasdump -> scsidump
- ras* -> piscsi* (rasutil -> piscsi_util, etc.)

* Refined the formatting and wording of the app startup banner
* Kept some references to rascsi and rasctl where backwards compatibility is concerned
* Point to the new github repo URL

Co-authored-by: nucleogenic <nr@nucleogenic.com>
Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
This commit is contained in:
Daniel Markstedt 2022-12-05 09:58:23 -08:00 committed by GitHub
parent 12068cafb8
commit 52c2aa474f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
274 changed files with 2341 additions and 2380 deletions

View File

@ -2,8 +2,8 @@
/* /*
# Paths to include # Paths to include
!/docker/backend/rascsi_wrapper.sh !/docker/backend/piscsi_wrapper.sh
!/docker/web/start.sh !/docker/web/web_start_wrapper.sh
!/doc !/doc
!/python !/python
!/cpp !/cpp
@ -22,7 +22,7 @@
**/*.pyc **/*.pyc
**/__pycache__ **/__pycache__
**/.pytest_cache **/.pytest_cache
**/rascsi_interface_pb2.py **/piscsi_interface_pb2.py
**/report.xml **/report.xml
**/.idea **/.idea

View File

@ -3,7 +3,7 @@
- Which version of Pi are you using: - Which version of Pi are you using:
- Which github revision of software: - Which github revision of software:
- Which board version: - Which board version:
- Which computer is the RaSCSI connected to: - Which computer is the PiSCSI connected to:
# Describe the issue # Describe the issue

View File

@ -53,10 +53,10 @@ jobs:
# supports .ZIP files. # supports .ZIP files.
# This is workaround for https://github.com/actions/upload-artifact/issues/38 # This is workaround for https://github.com/actions/upload-artifact/issues/38
- name: Tar binary output - name: Tar binary output
run: tar -czvf ${{ env.debug_flag_filename }}rascsi-${{ inputs.connect-type }}.tar.gz ./bin run: tar -czvf ${{ env.debug_flag_filename }}piscsi-${{ inputs.connect-type }}.tar.gz ./bin
- name: Upload binaries - name: Upload binaries
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ env.debug_flag_filename }}arm-binaries-${{ inputs.connect-type }}.tar.gz name: ${{ env.debug_flag_filename }}arm-binaries-${{ inputs.connect-type }}.tar.gz
path: cpp/${{ env.debug_flag_filename }}rascsi-${{ inputs.connect-type }}.tar.gz path: cpp/${{ env.debug_flag_filename }}piscsi-${{ inputs.connect-type }}.tar.gz

View File

@ -10,28 +10,28 @@ on:
jobs: jobs:
fullspec: fullspec:
uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop
with: with:
connect-type: "FULLSPEC" connect-type: "FULLSPEC"
standard: standard:
uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop
with: with:
connect-type: "STANDARD" connect-type: "STANDARD"
aibom: aibom:
uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop
with: with:
connect-type: "AIBOM" connect-type: "AIBOM"
gamernium: gamernium:
uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop
with: with:
connect-type: "GAMERNIUM" connect-type: "GAMERNIUM"
# The fullspec connection board is the most common # The fullspec connection board is the most common
debug-fullspec: debug-fullspec:
uses: akuker/RASCSI/.github/workflows/arm_cross_compile.yml@develop uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop
with: with:
connect-type: "FULLSPEC" connect-type: "FULLSPEC"
debug-flag: true debug-flag: true

View File

@ -26,25 +26,25 @@ jobs:
run: make -j $(nproc) test run: make -j $(nproc) test
- name: Run unit tests - name: Run unit tests
run: (set -o pipefail && bin/fullspec/rascsi_test | tee rascsi_test_log.txt) run: (set -o pipefail && bin/fullspec/piscsi_test | tee piscsi_test_log.txt)
- name: Upload logs - name: Upload logs
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: rascsi_test_log.txt name: piscsi_test_log.txt
path: cpp/rascsi_test_log.txt path: cpp/piscsi_test_log.txt
sonarcloud: sonarcloud:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
if: github.repository == 'akuker/RASCSI' if: github.repository == 'PiSCSI/piscsi'
env: env:
SOURCES: cpp SOURCES: cpp
BUILD_WRAPPER_OUT_DIR: "$HOME/.build_wrapper_out" # Directory where build-wrapper output will be placed BUILD_WRAPPER_OUT_DIR: "$HOME/.build_wrapper_out" # Directory where build-wrapper output will be placed
SONAR_SCANNER_VERSION: 4.7.0.2747 SONAR_SCANNER_VERSION: 4.7.0.2747
SONAR_SERVER_URL: "https://sonarcloud.io" SONAR_SERVER_URL: "https://sonarcloud.io"
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_PROJECT_KEY: "akuker_RASCSI" SONAR_PROJECT_KEY: "akuker_PISCSI"
SONAR_ORGANIZATION: "rascsi" SONAR_ORGANIZATION: "piscsi"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:

View File

@ -1,4 +1,4 @@
name: Generate a RaSCSI OS image, based upon the official Rapsberry Pi OS name: Generate a PiSCSI OS image, based upon the official Rapsberry Pi OS
# Controls when the workflow will run # Controls when the workflow will run
on: on:
@ -22,13 +22,13 @@ jobs:
# TODO: I don't think this step is needed.... # TODO: I don't think this step is needed....
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout RaSCSI - name: Checkout PiSCSI
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
path: RASCSI path: PISCSI
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout RaSCSI - name: Checkout PiSCSI
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: akuker/pi-gen repository: akuker/pi-gen
@ -40,8 +40,8 @@ jobs:
- name: Configure the build - name: Configure the build
run: | run: |
echo ----------------------------------------------------- echo -----------------------------------------------------
echo "IMG_NAME=RaSCSI-$GITHUB_RUN_ID" > config echo "IMG_NAME=PiSCSI-$GITHUB_RUN_ID" > config
echo "TARGET_HOSTNAME=rascsi" >> config echo "TARGET_HOSTNAME=piscsi" >> config
echo "ENABLE_SSH=1" >> config echo "ENABLE_SSH=1" >> config
echo "LOCALE_DEFAULT=en_US.UTF-8" >> config echo "LOCALE_DEFAULT=en_US.UTF-8" >> config
echo "KEYBOARD_KEYMAP=us" >> config echo "KEYBOARD_KEYMAP=us" >> config

1
.gitignore vendored
View File

@ -10,6 +10,7 @@ core
__pycache__ __pycache__
current current
rascsi_interface_pb2.py rascsi_interface_pb2.py
piscsi_interface_pb2.py
messages.pot messages.pot
messages.mo messages.mo
report.xml report.xml

View File

@ -3,7 +3,7 @@ BSD 3-Clause License
Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
Copyright (C) 2014-2020 GIMONS Copyright (C) 2014-2020 GIMONS
Copyright (c) 2020-2021 akuker Copyright (c) 2020-2021 akuker
Copyright (c) RaSCSI project contributors (github.com/akuker/rascsi) Copyright (c) PiSCSI project contributors (github.com/PiSCSI/piscsi)
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@ -1,10 +1,10 @@
# What is RaSCSI Reloaded? # What is PiSCSI?
RaSCSI Reloaded is a virtual SCSI device emulator that runs on a Raspberry Pi. It runs in userspace, and can emulate several SCSI devices at one time. There is a control interface to attach / detach drives during runtime, as well as insert and eject removable media. This project is aimed at users of vintage Macintosh and Atari computers and more (see [compatibility list](https://github.com/akuker/RASCSI/wiki/Compatibility)) from the 1980's and 1990's. PiSCSI is a virtual SCSI device emulator that runs on a Raspberry Pi. It runs in userspace, and can emulate several SCSI devices at one time. There is a control interface to attach / detach drives during runtime, as well as insert and eject removable media. This project is aimed at users of vintage Macintosh and Atari computers and more (see [compatibility list](https://github.com/PiSCSI/piscsi/wiki/Compatibility)) from the 1980's and 1990's.
Please check out the full story with much more detail on the [wiki](https://github.com/akuker/RASCSI/wiki)! Please check out the full story with much more detail on the [wiki](https://github.com/PiSCSI/piscsi/wiki)!
# How do I contribute? # How do I contribute?
RaSCSI Reloaded is using the <a href="https://datasift.github.io/gitflow/IntroducingGitFlow.html">Gitflow Workflow</a>. A quick overview: PiSCSI is using the <a href="https://datasift.github.io/gitflow/IntroducingGitFlow.html">Gitflow Workflow</a>. A quick overview:
- The *master* branch should always reflect the contents of the last stable release - The *master* branch should always reflect the contents of the last stable release
- The *develop* branch should contain the latest tested & approved updates. Pull requests should be used to merge changes into develop. - The *develop* branch should contain the latest tested & approved updates. Pull requests should be used to merge changes into develop.
@ -13,11 +13,11 @@ RaSCSI Reloaded is using the <a href="https://datasift.github.io/gitflow/Introdu
Typically, releases will only be planned every few months. Typically, releases will only be planned every few months.
When you are ready to contribute code to RaSCSI Reloaded, follow the <a href="https://docs.github.com/en/get-started/quickstart/contributing-to-projects">GitHub Forking and Pull Request workflow</a> to create your own fork where you can make changes, and then contribute it back to the project. Please remember to always make Pull Requests against the *develop* branch. When you are ready to contribute code to PiSCSI, follow the <a href="https://docs.github.com/en/get-started/quickstart/contributing-to-projects">GitHub Forking and Pull Request workflow</a> to create your own fork where you can make changes, and then contribute it back to the project. Please remember to always make Pull Requests against the *develop* branch.
If you want to add a new translation, or improve upon an existing one, please follow the <a href="https://github.com/akuker/RASCSI/blob/develop/python/web/README.md#localizing-the-web-interface">instructions in the Web Interface README</a>. Once the translation is complete, please use the same workflow as above to contribute it to the project. If you want to add a new translation, or improve upon an existing one, please follow the <a href="https://github.com/PiSCSI/piscsi/tree/master/python/web#localizing-the-web-interface">instructions in the Web Interface README</a>. Once the translation is complete, please use the same workflow as above to contribute it to the project.
<a href="https://www.tindie.com/stores/landogriffin/?ref=offsite_badges&utm_source=sellers_akuker&utm_medium=badges&utm_campaign=badge_large"><img src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-larges.png" alt="I sell on Tindie" width="200" height="104"></a>[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-orange.svg)](https://sonarcloud.io/summary/new_code?id=akuker_RASCSI) <a href="https://www.tindie.com/stores/landogriffin/?ref=offsite_badges&utm_source=sellers_akuker&utm_medium=badges&utm_campaign=badge_large"><img src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-larges.png" alt="I sell on Tindie" width="200" height="104"></a>[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-orange.svg)](https://sonarcloud.io/summary/new_code?id=akuker_PISCSI)
# GitHub Sponsors # GitHub Sponsors
Thank you to all of the GitHub sponsors who support the development community! Thank you to all of the GitHub sponsors who support the development community!

2
cpp/.gitignore vendored
View File

@ -7,7 +7,7 @@
*.vcd *.vcd
*.json *.json
*.html *.html
rascsi.dat piscsi.dat
obj obj
bin bin
coverage coverage

View File

@ -41,7 +41,7 @@ ifeq "$(GCCVERSION10)" "1"
endif endif
## CONNECT_TYPE=FULLSPEC : Specify the type of RaSCSI board type ## CONNECT_TYPE=FULLSPEC : Specify the type of PiSCSI board type
## that you are using. The typical options are ## that you are using. The typical options are
## STANDARD or FULLSPEC. The default is FULLSPEC ## STANDARD or FULLSPEC. The default is FULLSPEC
## * THIS IS TYPICALLY THE ONLY COMPILE OPTION YOU ## * THIS IS TYPICALLY THE ONLY COMPILE OPTION YOU
@ -53,90 +53,90 @@ ifdef CONNECT_TYPE
CXXFLAGS += -DCONNECT_TYPE_$(CONNECT_TYPE) CXXFLAGS += -DCONNECT_TYPE_$(CONNECT_TYPE)
endif endif
RASCSI = rascsi PISCSI = piscsi
RASCTL = rasctl SCSICTL = scsictl
RASDUMP = rasdump SCSIDUMP = scsidump
SCSIMON = scsimon SCSIMON = scsimon
RASCSI_TEST = rascsi_test PISCSI_TEST = piscsi_test
SCSILOOP = scsiloop SCSILOOP = scsiloop
SYSTEMD_CONF = /etc/systemd/system/rascsi.service SYSTEMD_CONF = /etc/systemd/system/piscsi.service
RSYSLOG_CONF = /etc/rsyslog.d/rascsi.conf RSYSLOG_CONF = /etc/rsyslog.d/piscsi.conf
RSYSLOG_LOG = /var/log/rascsi.log RSYSLOG_LOG = /var/log/piscsi.log
USR_LOCAL_BIN = /usr/local/bin USR_LOCAL_BIN = /usr/local/bin
MAN_PAGE_DIR = /usr/local/man/man1 MAN_PAGE_DIR = /usr/local/man/man1
DOC_DIR = ../doc DOC_DIR = ../doc
COVERAGE_DIR = coverage COVERAGE_DIR = coverage
COVERAGE_FILE = rascsi.dat COVERAGE_FILE = piscsi.dat
OS_FILES = os_integration OS_FILES = os_integration
OBJDIR := obj/$(shell echo $(CONNECT_TYPE) | tr '[:upper:]' '[:lower:]') OBJDIR := obj/$(shell echo $(CONNECT_TYPE) | tr '[:upper:]' '[:lower:]')
BINDIR := bin/$(shell echo $(CONNECT_TYPE) | tr '[:upper:]' '[:lower:]') BINDIR := bin/$(shell echo $(CONNECT_TYPE) | tr '[:upper:]' '[:lower:]')
BIN_ALL = \ BIN_ALL = \
$(BINDIR)/$(RASCSI) \ $(BINDIR)/$(PISCSI) \
$(BINDIR)/$(RASCTL) \ $(BINDIR)/$(SCSICTL) \
$(BINDIR)/$(SCSIMON) \ $(BINDIR)/$(SCSIMON) \
$(BINDIR)/$(RASDUMP) \ $(BINDIR)/$(SCSIDUMP) \
$(BINDIR)/$(SCSILOOP) $(BINDIR)/$(SCSILOOP)
SRC_PROTOC = rascsi_interface.proto SRC_PROTOC = piscsi_interface.proto
SRC_GENERATED = $(GENERATED_DIR)/rascsi_interface.pb.cpp SRC_GENERATED = $(GENERATED_DIR)/piscsi_interface.pb.cpp
SRC_PROTOBUF = \ SRC_PROTOBUF = \
shared/protobuf_util.cpp \ shared/protobuf_util.cpp \
shared/protobuf_serializer.cpp shared/protobuf_serializer.cpp
SRC_SHARED = \ SRC_SHARED = \
shared/rascsi_version.cpp \ shared/piscsi_version.cpp \
shared/rasutil.cpp shared/piscsi_util.cpp
SRC_RASCSI_CORE = $(shell find ./rascsi -name '*.cpp') SRC_PISCSI_CORE = $(shell find ./piscsi -name '*.cpp')
SRC_RASCSI_CORE += $(shell find ./controllers -name '*.cpp') SRC_PISCSI_CORE += $(shell find ./controllers -name '*.cpp')
SRC_RASCSI_CORE += $(shell find ./devices -name '*.cpp') SRC_PISCSI_CORE += $(shell find ./devices -name '*.cpp')
SRC_RASCSI_CORE += $(shell find ./hal -name '*.cpp') SRC_PISCSI_CORE += $(shell find ./hal -name '*.cpp')
SRC_RASCSI = rascsi.cpp SRC_PISCSI = piscsi.cpp
SRC_SCSIMON = scsimon.cpp SRC_SCSIMON = scsimon.cpp
SRC_SCSIMON += $(shell find ./monitor -name '*.cpp') SRC_SCSIMON += $(shell find ./monitor -name '*.cpp')
SRC_SCSIMON += $(shell find ./hal -name '*.cpp') SRC_SCSIMON += $(shell find ./hal -name '*.cpp')
SRC_RASCTL_CORE = $(shell find ./rasctl -name '*.cpp') SRC_SCSICTL_CORE = $(shell find ./scsictl -name '*.cpp')
SRC_RASCTL = rasctl.cpp SRC_SCSICTL = scsictl.cpp
SRC_RASDUMP = rasdump.cpp SRC_SCSIDUMP = scsidump.cpp
SRC_RASDUMP += $(shell find ./rasdump -name '*.cpp') SRC_SCSIDUMP += $(shell find ./scsidump -name '*.cpp')
SRC_RASDUMP += $(shell find ./hal -name '*.cpp') SRC_SCSIDUMP += $(shell find ./hal -name '*.cpp')
SRC_RASCSI_TEST = $(shell find ./test -name '*.cpp') SRC_PISCSI_TEST = $(shell find ./test -name '*.cpp')
SRC_RASCSI_TEST += $(shell find ./rasdump -name '*.cpp') SRC_PISCSI_TEST += $(shell find ./scsidump -name '*.cpp')
SRC_RASCSI_TEST += $(shell find ./monitor -name '*.cpp') SRC_PISCSI_TEST += $(shell find ./monitor -name '*.cpp')
SRC_SCSILOOP = scsiloop.cpp SRC_SCSILOOP = scsiloop.cpp
SRC_SCSILOOP += $(shell find ./scsiloop -name '*.cpp') SRC_SCSILOOP += $(shell find ./scsiloop -name '*.cpp')
SRC_SCSILOOP += $(shell find ./hal -name '*.cpp') SRC_SCSILOOP += $(shell find ./hal -name '*.cpp')
vpath %.h ./ ./shared ./controllers ./devices ./monitor ./hal \ vpath %.h ./ ./shared ./controllers ./devices ./monitor ./hal \
./hal/boards ./hal/pi_defs ./rascsi ./rasctl ./rasdump \ ./hal/boards ./hal/pi_defs ./piscsi ./scsictl ./scsidump \
./scsiloop ./scsiloop
vpath %.cpp ./ ./shared ./controllers ./devices ./monitor ./hal \ vpath %.cpp ./ ./shared ./controllers ./devices ./monitor ./hal \
./hal/boards ./hal/pi_defs ./rascsi ./rasctl ./rasdump \ ./hal/boards ./hal/pi_defs ./piscsi ./scsictl ./scsidump \
./scsiloop ./test ./scsiloop ./test
vpath %.o ./$(OBJDIR) vpath %.o ./$(OBJDIR)
vpath ./$(BINDIR) vpath ./$(BINDIR)
OBJ_RASCSI_CORE := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASCSI_CORE:%.cpp=%.o))) OBJ_PISCSI_CORE := $(addprefix $(OBJDIR)/,$(notdir $(SRC_PISCSI_CORE:%.cpp=%.o)))
OBJ_RASCSI := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASCSI:%.cpp=%.o))) OBJ_PISCSI := $(addprefix $(OBJDIR)/,$(notdir $(SRC_PISCSI:%.cpp=%.o)))
OBJ_RASCTL_CORE := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASCTL_CORE:%.cpp=%.o))) OBJ_SCSICTL_CORE := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSICTL_CORE:%.cpp=%.o)))
OBJ_RASCTL := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASCTL:%.cpp=%.o))) OBJ_SCSICTL := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSICTL:%.cpp=%.o)))
OBJ_RASDUMP := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASDUMP:%.cpp=%.o))) OBJ_SCSIDUMP := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSIDUMP:%.cpp=%.o)))
OBJ_SCSIMON := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSIMON:%.cpp=%.o))) OBJ_SCSIMON := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSIMON:%.cpp=%.o)))
OBJ_RASCSI_TEST := $(addprefix $(OBJDIR)/,$(notdir $(SRC_RASCSI_TEST:%.cpp=%.o))) OBJ_PISCSI_TEST := $(addprefix $(OBJDIR)/,$(notdir $(SRC_PISCSI_TEST:%.cpp=%.o)))
OBJ_SCSILOOP := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSILOOP:%.cpp=%.o))) OBJ_SCSILOOP := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SCSILOOP:%.cpp=%.o)))
OBJ_SHARED := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SHARED:%.cpp=%.o))) OBJ_SHARED := $(addprefix $(OBJDIR)/,$(notdir $(SRC_SHARED:%.cpp=%.o)))
OBJ_PROTOBUF := $(addprefix $(OBJDIR)/,$(notdir $(SRC_PROTOBUF:%.cpp=%.o))) OBJ_PROTOBUF := $(addprefix $(OBJDIR)/,$(notdir $(SRC_PROTOBUF:%.cpp=%.o)))
@ -151,7 +151,7 @@ TEST_WRAPS = -Wl,--wrap=fopen64
# The following will include all of the auto-generated dependency files (*.d) # The following will include all of the auto-generated dependency files (*.d)
# if they exist. This will trigger a rebuild of a source file if a header changes # if they exist. This will trigger a rebuild of a source file if a header changes
ALL_DEPS := $(patsubst %.o,%.d,$(OBJ_RASCSI_CORE) $(OBJ_RASCTL_CORE) $(OBJ_RASCSI) $(OBJ_RASCTL) $(OBJ_RASDUMP) $(OBJ_SCSIMON) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_RASCSI_TEST) $(OBJ_SCSILOOP)) ALL_DEPS := $(patsubst %.o,%.d,$(OBJ_PISCSI_CORE) $(OBJ_SCSICTL_CORE) $(OBJ_PISCSI) $(OBJ_SCSICTL) $(OBJ_SCSIDUMP) $(OBJ_SCSIMON) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_PISCSI_TEST) $(OBJ_SCSILOOP))
-include $(ALL_DEPS) -include $(ALL_DEPS)
$(OBJDIR) $(BINDIR): $(OBJDIR) $(BINDIR):
@ -165,7 +165,7 @@ $(SRC_GENERATED) : $(SRC_PROTOC)
@echo "-- Generating protobuf-based source files" @echo "-- Generating protobuf-based source files"
mkdir -p $(GENERATED_DIR) mkdir -p $(GENERATED_DIR)
protoc --cpp_out=$(GENERATED_DIR) $(SRC_PROTOC) protoc --cpp_out=$(GENERATED_DIR) $(SRC_PROTOC)
mv $(GENERATED_DIR)/rascsi_interface.pb.cc $@ mv $(GENERATED_DIR)/piscsi_interface.pb.cc $@
$(OBJ_GENERATED) : $(SRC_GENERATED) $(OBJ_GENERATED) : $(SRC_GENERATED)
$(CXX) $(CXXFLAGS) -c $< -o $@ $(CXX) $(CXXFLAGS) -c $< -o $@
@ -183,46 +183,46 @@ $(OBJ_GENERATED) : $(SRC_GENERATED)
.PHONY: all ALL docs test coverage lcov .PHONY: all ALL docs test coverage lcov
all: $(BIN_ALL) docs all: $(BIN_ALL) docs
test: $(BINDIR)/$(RASCSI_TEST) test: $(BINDIR)/$(PISCSI_TEST)
$(BINDIR)/$(RASCSI_TEST) $(BINDIR)/$(PISCSI_TEST)
coverage: CXXFLAGS += --coverage coverage: CXXFLAGS += --coverage
coverage: test coverage: test
lcov: CXXFLAGS += --coverage lcov: CXXFLAGS += --coverage
lcov: test lcov: test
lcov -q -c -d . --include '*/cpp/*' -o $(COVERAGE_FILE) --exclude '*/test/*' --exclude '*/interfaces/*' --exclude '*/rascsi_interface.pb*' lcov -q -c -d . --include '*/cpp/*' -o $(COVERAGE_FILE) --exclude '*/test/*' --exclude '*/interfaces/*' --exclude '*/piscsi_interface.pb*'
genhtml -q -o $(COVERAGE_DIR) --legend $(COVERAGE_FILE) genhtml -q -o $(COVERAGE_DIR) --legend $(COVERAGE_FILE)
docs: $(DOC_DIR)/rascsi_man_page.txt $(DOC_DIR)/rasctl_man_page.txt $(DOC_DIR)/scsimon_man_page.txt $(DOC_DIR)/rasdump_man_page.txt $(DOC_DIR)/scsiloop_man_page.txt docs: $(DOC_DIR)/piscsi_man_page.txt $(DOC_DIR)/scsictl_man_page.txt $(DOC_DIR)/scsimon_man_page.txt $(DOC_DIR)/scsidump_man_page.txt $(DOC_DIR)/scsiloop_man_page.txt
$(SRC_RASCSI_CORE) $(SRC_RASCTL_CORE) : $(OBJ_GENERATED) $(SRC_PISCSI_CORE) $(SRC_SCSICTL_CORE) : $(OBJ_GENERATED)
$(BINDIR)/$(RASCSI): $(SRC_GENERATED) $(OBJ_RASCSI_CORE) $(OBJ_RASCSI) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR) $(BINDIR)/$(PISCSI): $(SRC_GENERATED) $(OBJ_PISCSI_CORE) $(OBJ_PISCSI) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_RASCSI_CORE) $(OBJ_RASCSI) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lpcap -lprotobuf -lstdc++fs $(CXX) $(CXXFLAGS) -o $@ $(OBJ_PISCSI_CORE) $(OBJ_PISCSI) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lpcap -lprotobuf -lstdc++fs
$(BINDIR)/$(RASCTL): $(SRC_GENERATED) $(OBJ_RASCTL_CORE) $(OBJ_RASCTL) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR) $(BINDIR)/$(SCSICTL): $(SRC_GENERATED) $(OBJ_SCSICTL_CORE) $(OBJ_SCSICTL) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_RASCTL_CORE) $(OBJ_RASCTL) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lprotobuf $(CXX) $(CXXFLAGS) -o $@ $(OBJ_SCSICTL_CORE) $(OBJ_SCSICTL) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lprotobuf
$(BINDIR)/$(RASDUMP): $(OBJ_RASDUMP) $(OBJ_SHARED) | $(BINDIR) $(BINDIR)/$(SCSIDUMP): $(OBJ_SCSIDUMP) $(OBJ_SHARED) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_RASDUMP) $(OBJ_SHARED) $(CXX) $(CXXFLAGS) -o $@ $(OBJ_SCSIDUMP) $(OBJ_SHARED)
$(BINDIR)/$(SCSIMON): $(OBJ_SCSIMON) $(OBJ_SHARED) | $(BINDIR) $(BINDIR)/$(SCSIMON): $(OBJ_SCSIMON) $(OBJ_SHARED) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_SCSIMON) $(OBJ_SHARED) $(CXX) $(CXXFLAGS) -o $@ $(OBJ_SCSIMON) $(OBJ_SHARED)
$(BINDIR)/$(RASCSI_TEST): $(SRC_GENERATED) $(OBJ_RASCSI_CORE) $(OBJ_RASCTL_CORE) $(OBJ_RASCSI_TEST) $(OBJ_RASCTL_TEST) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR) $(BINDIR)/$(PISCSI_TEST): $(SRC_GENERATED) $(OBJ_PISCSI_CORE) $(OBJ_SCSICTL_CORE) $(OBJ_PISCSI_TEST) $(OBJ_SCSICTL_TEST) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) | $(BINDIR)
$(CXX) $(CXXFLAGS) $(TEST_WRAPS) -o $@ $(OBJ_RASCSI_CORE) $(OBJ_RASCTL_CORE) $(OBJ_RASCSI_TEST) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lpcap -lprotobuf -lstdc++fs -lgmock -lgtest $(CXX) $(CXXFLAGS) $(TEST_WRAPS) -o $@ $(OBJ_PISCSI_CORE) $(OBJ_SCSICTL_CORE) $(OBJ_PISCSI_TEST) $(OBJ_SHARED) $(OBJ_PROTOBUF) $(OBJ_GENERATED) -lpthread -lpcap -lprotobuf -lstdc++fs -lgmock -lgtest
$(BINDIR)/$(SCSILOOP): $(OBJ_SHARED) $(OBJ_SCSILOOP) | $(BINDIR) $(BINDIR)/$(SCSILOOP): $(OBJ_SHARED) $(OBJ_SCSILOOP) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_SHARED) $(OBJ_SCSILOOP) $(CXX) $(CXXFLAGS) -o $@ $(OBJ_SHARED) $(OBJ_SCSILOOP)
# Phony rules for building individual utilities # Phony rules for building individual utilities
.PHONY: $(RASCSI) $(RASCTL) $(RASDUMP) $(SCSIMON) $(RASCSI_TEST) $(SCSILOOP) .PHONY: $(PISCSI) $(SCSICTL) $(SCSIDUMP) $(SCSIMON) $(PISCSI_TEST) $(SCSILOOP)
$(RASCSI) : $(BINDIR)/$(RASCSI) $(PISCSI) : $(BINDIR)/$(PISCSI)
$(RASCTL) : $(BINDIR)/$(RASCTL) $(SCSICTL) : $(BINDIR)/$(SCSICTL)
$(RASDUMP) : $(BINDIR)/$(RASDUMP) $(SCSIDUMP) : $(BINDIR)/$(SCSIDUMP)
$(SCSIMON) : $(BINDIR)/$(SCSIMON) $(SCSIMON) : $(BINDIR)/$(SCSIMON)
$(RASCSI_TEST): $(BINDIR)/$(RASCSI_TEST) $(PISCSI_TEST): $(BINDIR)/$(PISCSI_TEST)
$(SCSILOOP) : $(BINDIR)/$(SCSILOOP) $(SCSILOOP) : $(BINDIR)/$(SCSILOOP)
## clean : Remove all of the object files, intermediate ## clean : Remove all of the object files, intermediate
@ -233,28 +233,28 @@ clean:
## install : Copies all of the man pages to the correct location ## install : Copies all of the man pages to the correct location
## Copies the binaries to a global install location ## Copies the binaries to a global install location
## Configures the Systemd and RSyslog services to auto-run RaSCSI ## Configures the Systemd and RSyslog services to auto-run PiSCSI
## * This target needs to be run with sudo (ex: sudo make install) ## * This target needs to be run with sudo (ex: sudo make install)
## * Before running this, you need to stop the rascsi service if ## * Before running this, you need to stop the piscsi service if
## * it is already running: ## * it is already running:
## * sudo systemctl stop rascsi ## * sudo systemctl stop piscsi
## * After running this, you will need to reboot or run: ## * After running this, you will need to reboot or run:
## * sudo systemctl daemon-reload ## * sudo systemctl daemon-reload
## * sudo systemctl restart rsyslog ## * sudo systemctl restart rsyslog
## * sudo systemctl enable rascsi ## * sudo systemctl enable piscsi
## * sudo systemctl start rascsi ## * sudo systemctl start piscsi
.PHONY: install .PHONY: install
install: \ install: \
$(MAN_PAGE_DIR)/rascsi.1 \ $(MAN_PAGE_DIR)/piscsi.1 \
$(MAN_PAGE_DIR)/rasctl.1 \ $(MAN_PAGE_DIR)/scsictl.1 \
$(MAN_PAGE_DIR)/scsimon.1 \ $(MAN_PAGE_DIR)/scsimon.1 \
$(MAN_PAGE_DIR)/scsiloop.1 \ $(MAN_PAGE_DIR)/scsiloop.1 \
$(MAN_PAGE_DIR)/rasdump.1 \ $(MAN_PAGE_DIR)/scsidump.1 \
$(USR_LOCAL_BIN)/$(RASCTL) \ $(USR_LOCAL_BIN)/$(SCSICTL) \
$(USR_LOCAL_BIN)/$(RASCSI) \ $(USR_LOCAL_BIN)/$(PISCSI) \
$(USR_LOCAL_BIN)/$(SCSIMON) \ $(USR_LOCAL_BIN)/$(SCSIMON) \
$(USR_LOCAL_BIN)/$(SCSILOOP) \ $(USR_LOCAL_BIN)/$(SCSILOOP) \
$(USR_LOCAL_BIN)/$(RASDUMP) \ $(USR_LOCAL_BIN)/$(SCSIDUMP) \
$(SYSTEMD_CONF) \ $(SYSTEMD_CONF) \
$(RSYSLOG_CONF) \ $(RSYSLOG_CONF) \
$(RSYSLOG_LOG) $(RSYSLOG_LOG)
@ -283,8 +283,8 @@ $(RSYSLOG_CONF) : $(OS_FILES)/$(notdir $(RSYSLOG_CONF))
$(RSYSLOG_LOG) : $(RSYSLOG_LOG) :
@echo "-- Creating $@" @echo "-- Creating $@"
touch /var/log/rascsi.log touch /var/log/piscsi.log
chown root:adm /var/log/rascsi.log chown root:adm /var/log/piscsi.log
$(MAN_PAGE_DIR)/: $(MAN_PAGE_DIR)/:
echo "-- Creating directory $@" echo "-- Creating directory $@"

View File

@ -1,13 +1,13 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "devices/primary_device.h" #include "devices/primary_device.h"
#include "abstract_controller.h" #include "abstract_controller.h"

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet
@ -30,9 +30,9 @@ public:
static inline const int UNKNOWN_INITIATOR_ID = -1; static inline const int UNKNOWN_INITIATOR_ID = -1;
enum class rascsi_shutdown_mode { enum class piscsi_shutdown_mode {
NONE, NONE,
STOP_RASCSI, STOP_PISCSI,
STOP_PI, STOP_PI,
RESTART_PI RESTART_PI
}; };
@ -49,7 +49,7 @@ public:
// Get requested LUN based on IDENTIFY message, with LUN from the CDB as fallback // Get requested LUN based on IDENTIFY message, with LUN from the CDB as fallback
virtual int GetEffectiveLun() const = 0; virtual int GetEffectiveLun() const = 0;
virtual void ScheduleShutdown(rascsi_shutdown_mode) = 0; virtual void ScheduleShutdown(piscsi_shutdown_mode) = 0;
int GetTargetId() const { return target_id; } int GetTargetId() const { return target_id; }
int GetMaxLuns() const { return max_luns; } int GetMaxLuns() const { return max_luns; }

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
@ -13,7 +13,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "hal/gpiobus.h" #include "hal/gpiobus.h"
#include "hal/systimer.h" #include "hal/systimer.h"
#include "devices/interfaces/byte_writer.h" #include "devices/interfaces/byte_writer.h"
@ -108,29 +108,29 @@ void ScsiController::BusFree()
SetByteTransfer(false); SetByteTransfer(false);
if (shutdown_mode != rascsi_shutdown_mode::NONE) { if (shutdown_mode != piscsi_shutdown_mode::NONE) {
// Prepare the shutdown by flushing all caches // Prepare the shutdown by flushing all caches
for (const auto& device : GetControllerManager()->GetAllDevices()) { for (const auto& device : GetControllerManager()->GetAllDevices()) {
device->FlushCache(); device->FlushCache();
} }
} }
// When the bus is free RaSCSI or the Pi may be shut down. // When the bus is free PiSCSI or the Pi may be shut down.
// This code has to be executed in the bus free phase and thus has to be located in the controller. // This code has to be executed in the bus free phase and thus has to be located in the controller.
switch(shutdown_mode) { switch(shutdown_mode) {
case rascsi_shutdown_mode::STOP_RASCSI: case piscsi_shutdown_mode::STOP_PISCSI:
logger.Info("RaSCSI shutdown requested"); logger.Info("PiSCSI shutdown requested");
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
break; break;
case rascsi_shutdown_mode::STOP_PI: case piscsi_shutdown_mode::STOP_PI:
logger.Info("Raspberry Pi shutdown requested"); logger.Info("Raspberry Pi shutdown requested");
if (system("init 0") == -1) { if (system("init 0") == -1) {
logger.Error("Raspberry Pi shutdown failed: " + string(strerror(errno))); logger.Error("Raspberry Pi shutdown failed: " + string(strerror(errno)));
} }
break; break;
case rascsi_shutdown_mode::RESTART_PI: case piscsi_shutdown_mode::RESTART_PI:
logger.Info("Raspberry Pi restart requested"); logger.Info("Raspberry Pi restart requested");
if (system("init 6") == -1) { if (system("init 6") == -1) {
logger.Error("Raspberry Pi restart failed: " + string(strerror(errno))); logger.Error("Raspberry Pi restart failed: " + string(strerror(errno)));

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
@ -83,7 +83,7 @@ public:
// e.g. by using ifdef __arm__. Currently the unit tests require this method to be public. // e.g. by using ifdef __arm__. Currently the unit tests require this method to be public.
virtual void Execute(); virtual void Execute();
void ScheduleShutdown(rascsi_shutdown_mode mode) override { shutdown_mode = mode; } void ScheduleShutdown(piscsi_shutdown_mode mode) override { shutdown_mode = mode; }
private: private:
@ -117,6 +117,6 @@ private:
scsi_t scsi = {}; scsi_t scsi = {};
AbstractController::rascsi_shutdown_mode shutdown_mode = AbstractController::rascsi_shutdown_mode::NONE; AbstractController::piscsi_shutdown_mode shutdown_mode = AbstractController::piscsi_shutdown_mode::NONE;
}; };

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
@ -10,8 +10,8 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/log.h" #include "shared/log.h"
#include "shared/rasutil.h" #include "shared/piscsi_util.h"
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include <unistd.h> #include <unistd.h>
#include <poll.h> #include <poll.h>
#include <arpa/inet.h> #include <arpa/inet.h>
@ -28,7 +28,7 @@
#endif #endif
using namespace std; using namespace std;
using namespace ras_util; using namespace piscsi_util;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
@ -60,10 +60,10 @@ CTapDriver::~CTapDriver()
if (int br_socket_fd; (br_socket_fd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0) { if (int br_socket_fd; (br_socket_fd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0) {
LOGERROR("Can't open bridge socket: %s", strerror(errno)) LOGERROR("Can't open bridge socket: %s", strerror(errno))
} else { } else {
LOGDEBUG("brctl delif %s ras0", BRIDGE_NAME) LOGDEBUG("brctl delif %s piscsi0", BRIDGE_NAME)
if (!br_setif(br_socket_fd, BRIDGE_NAME, "ras0", false)) { //NOSONAR No exception is raised here if (!br_setif(br_socket_fd, BRIDGE_NAME, "piscsi0", false)) { //NOSONAR No exception is raised here
LOGWARN("Warning: Removing ras0 from the bridge failed.") LOGWARN("Warning: Removing piscsi0 from the bridge failed.")
LOGWARN("You may need to manually remove the ras0 tap device from the bridge") LOGWARN("You may need to manually remove the piscsi0 tap device from the bridge")
} }
close(br_socket_fd); close(br_socket_fd);
} }
@ -148,7 +148,7 @@ bool CTapDriver::Init(const unordered_map<string, string>& const_params)
// IFF_NO_PI for no extra packet information // IFF_NO_PI for no extra packet information
ifreq ifr = {}; ifreq ifr = {};
ifr.ifr_flags = IFF_TAP | IFF_NO_PI; ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
string dev = "ras0"; string dev = "piscsi0";
strncpy(ifr.ifr_name, dev.c_str(), IFNAMSIZ - 1); strncpy(ifr.ifr_name, dev.c_str(), IFNAMSIZ - 1);
LOGTRACE("Going to open %s", ifr.ifr_name) LOGTRACE("Going to open %s", ifr.ifr_name)
@ -315,18 +315,18 @@ bool CTapDriver::Init(const unordered_map<string, string>& const_params)
LOGINFO("%s is already available", BRIDGE_NAME) LOGINFO("%s is already available", BRIDGE_NAME)
} }
LOGTRACE("ip link set ras0 up") LOGTRACE("ip link set piscsi0 up")
if (!ip_link(ip_fd, "ras0", true)) { if (!ip_link(ip_fd, "piscsi0", true)) {
close(m_hTAP); close(m_hTAP);
close(ip_fd); close(ip_fd);
close(br_socket_fd); close(br_socket_fd);
return false; return false;
} }
LOGTRACE("brctl addif %s ras0", BRIDGE_NAME) LOGTRACE("brctl addif %s piscsi0", BRIDGE_NAME)
if (!br_setif(br_socket_fd, BRIDGE_NAME, "ras0", true)) { if (!br_setif(br_socket_fd, BRIDGE_NAME, "piscsi0", true)) {
close(m_hTAP); close(m_hTAP);
close(ip_fd); close(ip_fd);
close(br_socket_fd); close(br_socket_fd);
@ -378,8 +378,8 @@ void CTapDriver::OpenDump(const string& path) {
bool CTapDriver::Enable() const bool CTapDriver::Enable() const
{ {
const int fd = socket(PF_INET, SOCK_DGRAM, 0); const int fd = socket(PF_INET, SOCK_DGRAM, 0);
LOGDEBUG("%s: ip link set ras0 up", __PRETTY_FUNCTION__) LOGDEBUG("%s: ip link set piscsi0 up", __PRETTY_FUNCTION__)
const bool result = ip_link(fd, "ras0", true); const bool result = ip_link(fd, "piscsi0", true);
close(fd); close(fd);
return result; return result;
} }
@ -387,8 +387,8 @@ bool CTapDriver::Enable() const
bool CTapDriver::Disable() const bool CTapDriver::Disable() const
{ {
const int fd = socket(PF_INET, SOCK_DGRAM, 0); const int fd = socket(PF_INET, SOCK_DGRAM, 0);
LOGDEBUG("%s: ip link set ras0 down", __PRETTY_FUNCTION__) LOGDEBUG("%s: ip link set piscsi0 down", __PRETTY_FUNCTION__)
const bool result = ip_link(fd, "ras0", false); const bool result = ip_link(fd, "piscsi0", false);
close(fd); close(fd);
return result; return result;
} }

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
@ -22,7 +22,7 @@ using namespace std;
class CTapDriver class CTapDriver
{ {
static constexpr const char *BRIDGE_NAME = "rascsi_bridge"; static constexpr const char *BRIDGE_NAME = "piscsi_bridge";
public: public:
@ -37,8 +37,8 @@ public:
int Receive(uint8_t *buf); int Receive(uint8_t *buf);
int Send(const uint8_t *buf, int len); int Send(const uint8_t *buf, int len);
bool PendingPackets() const; // Check if there are IP packets available bool PendingPackets() const; // Check if there are IP packets available
bool Enable() const; // Enable the ras0 interface bool Enable() const; // Enable the piscsi0 interface
bool Disable() const; // Disable the ras0 interface bool Disable() const; // Disable the piscsi0 interface
void Flush(); // Purge all of the packets that are waiting to be processed void Flush(); // Purge all of the packets that are waiting to be processed
static uint32_t Crc32(const uint8_t *, int); static uint32_t Crc32(const uint8_t *, int);

View File

@ -1,13 +1,13 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2021-2022 Uwe Seimet // Copyright (C) 2021-2022 Uwe Seimet
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_version.h" #include "shared/piscsi_version.h"
#include "device.h" #include "device.h"
#include <cassert> #include <cassert>
#include <sstream> #include <sstream>
@ -18,7 +18,7 @@ using namespace std;
Device::Device(PbDeviceType type, int lun) : type(type), lun(lun) Device::Device(PbDeviceType type, int lun) : type(type), lun(lun)
{ {
ostringstream os; ostringstream os;
os << setw(2) << setfill('0') << rascsi_major_version << setw(2) << setfill('0') << rascsi_minor_version; os << setw(2) << setfill('0') << piscsi_major_version << setw(2) << setfill('0') << piscsi_minor_version;
revision = os.str(); revision = os.str();
} }

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2021-2022 Uwe Seimet // Copyright (C) 2021-2022 Uwe Seimet
@ -10,16 +10,16 @@
#pragma once #pragma once
#include "shared/log.h" #include "shared/log.h"
#include "generated/rascsi_interface.pb.h" #include "generated/piscsi_interface.pb.h"
#include <unordered_map> #include <unordered_map>
#include <string> #include <string>
using namespace std; using namespace std;
using namespace rascsi_interface; using namespace piscsi_interface;
class Device //NOSONAR The number of fields and methods is justified, the complexity is low class Device //NOSONAR The number of fields and methods is justified, the complexity is low
{ {
const string DEFAULT_VENDOR = "RaSCSI"; const string DEFAULT_VENDOR = "PiSCSI";
PbDeviceType type; PbDeviceType type;

View File

@ -1,13 +1,13 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2021-2022 Uwe Seimet // Copyright (C) 2021-2022 Uwe Seimet
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rasutil.h" #include "shared/piscsi_util.h"
#include "scsihd.h" #include "scsihd.h"
#include "scsihd_nec.h" #include "scsihd_nec.h"
#include "scsimo.h" #include "scsimo.h"
@ -24,8 +24,8 @@
#include <unistd.h> #include <unistd.h>
using namespace std; using namespace std;
using namespace rascsi_interface; using namespace piscsi_interface;
using namespace ras_util; using namespace piscsi_util;
DeviceFactory::DeviceFactory() DeviceFactory::DeviceFactory()
{ {
@ -139,7 +139,7 @@ shared_ptr<PrimaryDevice> DeviceFactory::CreateDevice(PbDeviceType type, int lun
case SCHS: case SCHS:
device = make_shared<HostServices>(lun); device = make_shared<HostServices>(lun);
// Since this is an emulation for a specific device the full INQUIRY data have to be set accordingly // Since this is an emulation for a specific device the full INQUIRY data have to be set accordingly
device->SetVendor("RaSCSI"); device->SetVendor("PiSCSI");
device->SetProduct("Host Services"); device->SetProduct("Host Services");
break; break;
@ -179,7 +179,7 @@ vector<string> DeviceFactory::GetNetworkInterfaces() const
while (tmp) { while (tmp) {
if (tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET && if (tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET &&
strcmp(tmp->ifa_name, "lo") && strcmp(tmp->ifa_name, "rascsi_bridge")) { strcmp(tmp->ifa_name, "lo") && strcmp(tmp->ifa_name, "piscsi_bridge")) {
const int fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); const int fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
ifreq ifr = {}; ifreq ifr = {};

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2021-2022 Uwe Seimet // Copyright (C) 2021-2022 Uwe Seimet
@ -15,10 +15,10 @@
#include <vector> #include <vector>
#include <unordered_set> #include <unordered_set>
#include <unordered_map> #include <unordered_map>
#include "generated/rascsi_interface.pb.h" #include "generated/piscsi_interface.pb.h"
using namespace std; using namespace std;
using namespace rascsi_interface; using namespace piscsi_interface;
class PrimaryDevice; class PrimaryDevice;

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -14,7 +14,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"
#include "disk.h" #include "disk.h"
#include <sstream> #include <sstream>

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet
@ -14,13 +14,13 @@
// //
// 1. Vendor-specific mode page 0x20 returns the current date and time, see mode_page_datetime // 1. Vendor-specific mode page 0x20 returns the current date and time, see mode_page_datetime
// //
// 2. START/STOP UNIT shuts down RaSCSI or shuts down/reboots the Raspberry Pi // 2. START/STOP UNIT shuts down PiSCSI or shuts down/reboots the Raspberry Pi
// a) !start && !load (STOP): Shut down RaSCSI // a) !start && !load (STOP): Shut down PiSCSI
// b) !start && load (EJECT): Shut down the Raspberry Pi // b) !start && load (EJECT): Shut down the Raspberry Pi
// c) start && load (LOAD): Reboot the Raspberry Pi // c) start && load (LOAD): Reboot the Raspberry Pi
// //
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "controllers/scsi_controller.h" #include "controllers/scsi_controller.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"
#include "host_services.h" #include "host_services.h"
@ -59,14 +59,14 @@ void HostServices::StartStopUnit() const
if (!start) { if (!start) {
if (load) { if (load) {
GetController()->ScheduleShutdown(AbstractController::rascsi_shutdown_mode::STOP_PI); GetController()->ScheduleShutdown(AbstractController::piscsi_shutdown_mode::STOP_PI);
} }
else { else {
GetController()->ScheduleShutdown(AbstractController::rascsi_shutdown_mode::STOP_RASCSI); GetController()->ScheduleShutdown(AbstractController::piscsi_shutdown_mode::STOP_PISCSI);
} }
} }
else if (load) { else if (load) {
GetController()->ScheduleShutdown(AbstractController::rascsi_shutdown_mode::RESTART_PI); GetController()->ScheduleShutdown(AbstractController::piscsi_shutdown_mode::RESTART_PI);
} }
else { else {
throw scsi_exception(sense_key::ILLEGAL_REQUEST, asc::INVALID_FIELD_IN_CDB); throw scsi_exception(sense_key::ILLEGAL_REQUEST, asc::INVALID_FIELD_IN_CDB);

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2021-2022 Uwe Seimet // Copyright (C) 2021-2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2021-2022 Uwe Seimet // Copyright (C) 2021-2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2021-2022 Uwe Seimet // Copyright (C) 2021-2022 Uwe Seimet
@ -24,7 +24,7 @@ public:
virtual void Inquiry() = 0; virtual void Inquiry() = 0;
virtual void ReportLuns() = 0; virtual void ReportLuns() = 0;
// Optional commands implemented by all RaSCSI device types // Optional commands implemented by all PiSCSI device types
virtual void RequestSense() = 0; virtual void RequestSense() = 0;
virtual void ReleaseUnit() = 0; virtual void ReleaseUnit() = 0;
virtual void ReserveUnit() = 0; virtual void ReserveUnit() = 0;

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2021-2022 Uwe Seimet // Copyright (C) 2021-2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet
@ -9,7 +9,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"
#include "mode_page_device.h" #include "mode_page_device.h"
#include <cstddef> #include <cstddef>

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -1,13 +1,13 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"
#include "primary_device.h" #include "primary_device.h"
#include <sstream> #include <sstream>
@ -24,7 +24,7 @@ bool PrimaryDevice::Init(const unordered_map<string, string>& params)
AddCommand(scsi_command::eCmdInquiry, [this] { Inquiry(); }); AddCommand(scsi_command::eCmdInquiry, [this] { Inquiry(); });
AddCommand(scsi_command::eCmdReportLuns, [this] { ReportLuns(); }); AddCommand(scsi_command::eCmdReportLuns, [this] { ReportLuns(); });
// Optional commands supported by all RaSCSI devices // Optional commands supported by all PiSCSI devices
AddCommand(scsi_command::eCmdRequestSense, [this] { RequestSense(); }); AddCommand(scsi_command::eCmdRequestSense, [this] { RequestSense(); });
AddCommand(scsi_command::eCmdReserve6, [this] { ReserveUnit(); }); AddCommand(scsi_command::eCmdReserve6, [this] { ReserveUnit(); });
AddCommand(scsi_command::eCmdRelease6, [this] { ReleaseUnit(); }); AddCommand(scsi_command::eCmdRelease6, [this] { ReleaseUnit(); });

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -1,13 +1,13 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "device_logger.h" #include "device_logger.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"
#include <cstring> #include <cstring>
@ -54,9 +54,9 @@ void scsi_command_util::ModeSelect(const DeviceLogger& logger, scsi_command cmd,
// drives support this, e.g FUJITSU M2624S // drives support this, e.g FUJITSU M2624S
// We are fine as long as the current sector size remains unchanged // We are fine as long as the current sector size remains unchanged
if (GetInt16(buf, offset + 12) != sector_size) { if (GetInt16(buf, offset + 12) != sector_size) {
// With rascsi it is not possible to permanently (by formatting) change the sector size, // With piscsi it is not possible to permanently (by formatting) change the sector size,
// because the size is an externally configurable setting only // because the size is an externally configurable setting only
logger.Warn("In order to change the sector size use the -b option when launching rascsi"); logger.Warn("In order to change the sector size use the -b option when launching piscsi");
throw scsi_exception(sense_key::ILLEGAL_REQUEST, asc::INVALID_FIELD_IN_PARAMETER_LIST); throw scsi_exception(sense_key::ILLEGAL_REQUEST, asc::INVALID_FIELD_IN_PARAMETER_LIST);
} }

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2020 akuker // Copyright (C) 2020 akuker
@ -19,12 +19,12 @@
// //
// Additional documentation and clarification is available at the // Additional documentation and clarification is available at the
// following link: // following link:
// - https://github.com/akuker/RASCSI/wiki/Dayna-Port-SCSI-Link // - https://github.com/PiSCSI/piscsi/wiki/Dayna-Port-SCSI-Link
// //
// Note: This requires a DaynaPort SCSI Link driver. // Note: This requires a DaynaPort SCSI Link driver.
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"
#include "scsi_daynaport.h" #include "scsi_daynaport.h"
#include <sstream> #include <sstream>
@ -208,7 +208,7 @@ int SCSIDaynaPort::Read(const vector<int>& cdb, vector<uint8_t>& buf, uint64_t)
// } // }
int size = rx_packet_size; int size = rx_packet_size;
if (size < 64) { if (size < 64) {
// A frame must have at least 64 bytes (see https://github.com/akuker/RASCSI/issues/619) // A frame must have at least 64 bytes (see https://github.com/PiSCSI/piscsi/issues/619)
// Note that this work-around breaks the checksum. As currently there are no known drivers // Note that this work-around breaks the checksum. As currently there are no known drivers
// that care for the checksum, and the Daynaport driver for the Atari expects frames of // that care for the checksum, and the Daynaport driver for the Atari expects frames of
// 64 bytes it was decided to accept the broken checksum. If a driver should pop up that // 64 bytes it was decided to accept the broken checksum. If a driver should pop up that

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2020 akuker // Copyright (C) 2020 akuker
@ -107,7 +107,7 @@ private:
}; };
scsi_resp_link_stats_t m_scsi_link_stats = { scsi_resp_link_stats_t m_scsi_link_stats = {
// TODO Remove this hard-coded MAC address, see https://github.com/akuker/RASCSI/issues/598 // TODO Remove this hard-coded MAC address, see https://github.com/PiSCSI/piscsi/issues/598
.mac_address = { byte{0x00}, byte{0x80}, byte{0x19}, byte{0x10}, byte{0x98}, byte{0xe3} }, .mac_address = { byte{0x00}, byte{0x80}, byte{0x19}, byte{0x10}, byte{0x98}, byte{0xe3} },
.frame_alignment_errors = 0, .frame_alignment_errors = 0,
.crc_errors = 0, .crc_errors = 0,

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
@ -16,7 +16,7 @@
// work with the Sharp X68000 operating system. // work with the Sharp X68000 operating system.
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"
#include "scsi_host_bridge.h" #include "scsi_host_bridge.h"
#include <arpa/inet.h> #include <arpa/inet.h>

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet
@ -29,7 +29,7 @@
// With STOP PRINT printing can be cancelled before SYNCHRONIZE BUFFER was sent. // With STOP PRINT printing can be cancelled before SYNCHRONIZE BUFFER was sent.
// //
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"
#include "scsi_printer.h" #include "scsi_printer.h"
#include <sys/stat.h> #include <sys/stat.h>

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet
@ -22,7 +22,7 @@ class SCSIPrinter : public PrimaryDevice, private ScsiPrinterCommands
{ {
static const int NOT_RESERVED = -2; static const int NOT_RESERVED = -2;
static constexpr const char *PRINTER_FILE_PATTERN = "/rascsi_sclp-XXXXXX"; static constexpr const char *PRINTER_FILE_PATTERN = "/piscsi_sclp-XXXXXX";
public: public:

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
@ -14,7 +14,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"
#include "scsicd.h" #include "scsicd.h"
#include <array> #include <array>

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
@ -13,7 +13,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "scsihd.h" #include "scsihd.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
@ -12,13 +12,13 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rasutil.h" #include "shared/piscsi_util.h"
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"
#include "scsihd_nec.h" #include "scsihd_nec.h"
#include <fstream> #include <fstream>
using namespace ras_util; using namespace piscsi_util;
using namespace scsi_command_util; using namespace scsi_command_util;
void SCSIHD_NEC::Open() void SCSIHD_NEC::Open()

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)
@ -12,7 +12,7 @@
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "scsi_command_util.h" #include "scsi_command_util.h"
#include "scsimo.h" #include "scsimo.h"

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp) // Copyright (C) 2001-2006 (ytanaka@ipc-tokai.or.jp)

View File

@ -1,13 +1,13 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/rascsi_exceptions.h" #include "shared/piscsi_exceptions.h"
#include "storage_device.h" #include "storage_device.h"
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
@ -36,7 +36,7 @@ void StorageDevice::ValidateFile()
throw io_exception("Drive capacity cannot exceed 2 TiB"); throw io_exception("Drive capacity cannot exceed 2 TiB");
} }
// TODO Check for duplicate handling of these properties (-> rascsi_executor.cpp) // TODO Check for duplicate handling of these properties (-> piscsi_executor.cpp)
if (access(filename.c_str(), W_OK)) { if (access(filename.c_str(), W_OK)) {
// Permanently write-protected // Permanently write-protected
SetReadOnly(true); SetReadOnly(true);

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
@ -84,4 +84,4 @@ const static int BPI_PIN_MSG = BPI_M2P_21; // MSG
const static int BPI_PIN_CD = BPI_M2P_23; // CD const static int BPI_PIN_CD = BPI_M2P_23; // CD
const static int BPI_PIN_IO = BPI_M2P_16; // IO const static int BPI_PIN_IO = BPI_M2P_16; // IO
const static int BPI_PIN_BSY = BPI_M2P_18; // BSY const static int BPI_PIN_BSY = BPI_M2P_18; // BSY
const static int BPI_PIN_SEL = BPI_M2P_24; // SEL const static int BPI_PIN_SEL = BPI_M2P_24; // SEL

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
@ -14,7 +14,7 @@
#include <string> #include <string>
// //
// RaSCSI standard (SCSI logic, standard pin assignment) // PiSCSI standard (SCSI logic, standard pin assignment)
// //
const std::string CONNECT_DESC = "FULLSPEC"; // Startup message const std::string CONNECT_DESC = "FULLSPEC"; // Startup message

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
@ -14,7 +14,7 @@
#include <string> #include <string>
// //
// RaSCSI standard (SCSI logic, standard pin assignment) // PiSCSI standard (SCSI logic, standard pin assignment)
// //
const std::string CONNECT_DESC = "STANDARD"; // Startup message const std::string CONNECT_DESC = "STANDARD"; // Startup message

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
@ -87,7 +87,7 @@ int GPIOBUS::CommandHandShake(vector<uint8_t> &buf)
// UltraSatan or GigaFile) that can directly be connected to the Atari's ACSI port also support ICD // UltraSatan or GigaFile) that can directly be connected to the Atari's ACSI port also support ICD
// semantics. I fact, these semantics have become a standard in the Atari world. // semantics. I fact, these semantics have become a standard in the Atari world.
// RaSCSI becomes ICD compatible by ignoring the prepended $1F byte before processing the CDB. // PiSCSI becomes ICD compatible by ignoring the prepended $1F byte before processing the CDB.
if (buf[0] == 0x1F) { if (buf[0] == 0x1F) {
SetREQ(ON); SetREQ(ON);

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
@ -74,7 +74,7 @@ using namespace std;
// False : 3.3V -> (CONVERT) -> Open collector output // False : 3.3V -> (CONVERT) -> Open collector output
// //
// 2:Positive logic specification (when using the conversion board for positive logic -> SCSI logic) // 2:Positive logic specification (when using the conversion board for positive logic -> SCSI logic)
// RaSCSI Adapter Rev.C @132sync etc. // PiSCSI Adapter Rev.C @132sync etc.
// //
// True : 3.3V -> (CONVERT) -> 0V // True : 3.3V -> (CONVERT) -> 0V
// False : 0V -> (CONVERT) -> Open collector output // False : 0V -> (CONVERT) -> Open collector output

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi (And Banana Pi) // for Raspberry Pi (And Banana Pi)
// //
// Copyright (c) 2012-2015 Ben Croston // Copyright (c) 2012-2015 Ben Croston
@ -277,13 +277,13 @@ bool GPIOBUS_BananaM2p::SetupSelEvent()
int gpio_fd = open(gpio_dev.c_str(), 0); int gpio_fd = open(gpio_dev.c_str(), 0);
if (gpio_fd == -1) { if (gpio_fd == -1) {
LOGERROR("Unable to open /dev/gpiochip0. Is RaSCSI already running?") LOGERROR("Unable to open /dev/gpiochip0. Is PiSCSI or RaSCSI already running?")
return false; return false;
} }
// Event request setting // Event request setting
LOGTRACE("%s Event request setting (pin sel: %d)", __PRETTY_FUNCTION__, gpio_pin) LOGTRACE("%s Event request setting (pin sel: %d)", __PRETTY_FUNCTION__, gpio_pin)
strncpy(selevreq.consumer_label, "RaSCSI", ARRAY_SIZE(selevreq.consumer_label)); strncpy(selevreq.consumer_label, "PiSCSI", ARRAY_SIZE(selevreq.consumer_label));
selevreq.lineoffset = gpio_pin; selevreq.lineoffset = gpio_pin;
selevreq.handleflags = GPIOHANDLE_REQUEST_INPUT; selevreq.handleflags = GPIOHANDLE_REQUEST_INPUT;
#if SIGNAL_CONTROL_MODE < 2 #if SIGNAL_CONTROL_MODE < 2
@ -297,7 +297,7 @@ bool GPIOBUS_BananaM2p::SetupSelEvent()
// Get event request // Get event request
if (ioctl(gpio_fd, GPIO_GET_LINEEVENT_IOCTL, &selevreq) == -1) { if (ioctl(gpio_fd, GPIO_GET_LINEEVENT_IOCTL, &selevreq) == -1) {
LOGERROR("selevreq.fd = %d %08X", selevreq.fd, (unsigned int)selevreq.fd) LOGERROR("selevreq.fd = %d %08X", selevreq.fd, (unsigned int)selevreq.fd)
LOGERROR("Unable to register event request. Is RaSCSI already running?") LOGERROR("Unable to register event request. Is PiSCSI or RaSCSI already running?")
LOGERROR("[%08X] %s", errno, strerror(errno)) LOGERROR("[%08X] %s", errno, strerror(errno))
close(gpio_fd); close(gpio_fd);
return false; return false;

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
@ -183,12 +183,12 @@ bool GPIOBUS_Raspberry::Init(mode_e mode)
// GPIO chip open // GPIO chip open
fd = open("/dev/gpiochip0", 0); fd = open("/dev/gpiochip0", 0);
if (fd == -1) { if (fd == -1) {
LOGERROR("Unable to open /dev/gpiochip0. Is RaSCSI already running?") LOGERROR("Unable to open /dev/gpiochip0. Is PiSCSI or RaSCSI already running?")
return false; return false;
} }
// Event request setting // Event request setting
strcpy(selevreq.consumer_label, "RaSCSI"); strcpy(selevreq.consumer_label, "PiSCSI");
selevreq.lineoffset = PIN_SEL; selevreq.lineoffset = PIN_SEL;
selevreq.handleflags = GPIOHANDLE_REQUEST_INPUT; selevreq.handleflags = GPIOHANDLE_REQUEST_INPUT;
#if SIGNAL_CONTROL_MODE < 2 #if SIGNAL_CONTROL_MODE < 2
@ -199,7 +199,7 @@ bool GPIOBUS_Raspberry::Init(mode_e mode)
// Get event request // Get event request
if (ioctl(fd, GPIO_GET_LINEEVENT_IOCTL, &selevreq) == -1) { if (ioctl(fd, GPIO_GET_LINEEVENT_IOCTL, &selevreq) == -1) {
LOGERROR("Unable to register event request. Is RaSCSI already running?") LOGERROR("Unable to register event request. Is PiSCSI or RaSCSI already running?")
close(fd); close(fd);
return false; return false;
} }

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker
@ -99,7 +99,7 @@ void SysTimer_AllWinner::disable_hs_timer()
uint32_t SysTimer_AllWinner::GetTimerLow() uint32_t SysTimer_AllWinner::GetTimerLow()
{ {
// RaSCSI expects the timer to count UP, but the Allwinner HS timer counts // PiSCSI expects the timer to count UP, but the Allwinner HS timer counts
// down. So, we subtract the current timer value from UINT32_MAX // down. So, we subtract the current timer value from UINT32_MAX
return UINT32_MAX - (hsitimer_regs->hs_tmr_curnt_lo_reg / 200); return UINT32_MAX - (hsitimer_regs->hs_tmr_curnt_lo_reg / 200);
} }

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 akuker // Copyright (C) 2022 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
@ -15,8 +15,8 @@
#include "hal/gpiobus_factory.h" #include "hal/gpiobus_factory.h"
#include "monitor/sm_reports.h" #include "monitor/sm_reports.h"
#include "shared/log.h" #include "shared/log.h"
#include "shared/rascsi_version.h" #include "shared/piscsi_version.h"
#include "shared/rasutil.h" #include "shared/piscsi_util.h"
#include <climits> #include <climits>
#include <csignal> #include <csignal>
#include <getopt.h> #include <getopt.h>
@ -25,7 +25,7 @@
#include <sys/time.h> #include <sys/time.h>
using namespace std; using namespace std;
using namespace ras_util; using namespace piscsi_util;
void ScsiMon::KillHandler(int) void ScsiMon::KillHandler(int)
{ {
@ -155,7 +155,7 @@ int ScsiMon::run(const vector<char *> &args)
#endif #endif
spdlog::set_pattern("%^[%l]%$ %v"); spdlog::set_pattern("%^[%l]%$ %v");
ras_util::Banner("SCSI Monitor Capture Tool"); piscsi_util::Banner("(SCSI Monitor Capture Tool)");
ParseArguments(args); ParseArguments(args);

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2022 Uwe Seimet // Copyright (C) 2022 Uwe Seimet

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.
@ -10,7 +10,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include "shared/log.h" #include "shared/log.h"
#include "shared/rascsi_version.h" #include "shared/piscsi_version.h"
#include "sm_reports.h" #include "sm_reports.h"
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
@ -66,11 +66,11 @@ pre {
static void print_copyright_info(ofstream& html_fp) static void print_copyright_info(ofstream& html_fp)
{ {
html_fp << "<table>" << endl \ html_fp << "<table>" << endl \
<< "<h1>RaSCSI scsimon Capture Tool</h1>" << endl \ << "<h1>PiSCSI scsimon Capture Tool</h1>" << endl \
<< "<pre>Version " << rascsi_get_version_string() \ << "<pre>Version " << piscsi_get_version_string() \
<< __DATE__ << " " << __TIME__ << endl \ << __DATE__ << " " << __TIME__ << endl \
<< "Copyright (C) 2016-2020 GIMONS" << endl \ << "Copyright (C) 2016-2020 GIMONS" << endl \
<< "Copyright (C) 2020-2021 Contributors to the RaSCSI project" << endl \ << "Copyright (C) 2020-2021 Contributors to the PiSCSI project" << endl \
<< "</pre></table>" << endl \ << "</pre></table>" << endl \
<< "<br>" << endl; << "<br>" << endl;
} }

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Powered by XM6 TypeG Technology. // Powered by XM6 TypeG Technology.

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2020-2021 akuker // Copyright (C) 2020-2021 akuker

View File

@ -1,6 +1,6 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// SCSI Target Emulator RaSCSI Reloaded // SCSI Target Emulator PiSCSI
// for Raspberry Pi // for Raspberry Pi
// //
// Copyright (C) 2020-2021 akuker // Copyright (C) 2020-2021 akuker

View File

@ -0,0 +1,2 @@
if $programname == 'PISCSI' then /var/log/piscsi.log
& stop

View File

@ -1,23 +1,23 @@
[Unit] [Unit]
Description=RaSCSI service Description=PiSCSI service
After=network.target After=network.target
[Service] [Service]
Type=simple Type=simple
Restart=always Restart=always
ExecStart=/usr/local/bin/rascsi -r 7 ExecStart=/usr/local/bin/piscsi -r 7
# Example 1: If you want to automatically attach a hard disk at startup, # Example 1: If you want to automatically attach a hard disk at startup,
# say an image called harddisk.hds on SCSI ID 1, change the ExecStart line to: # say an image called harddisk.hds on SCSI ID 1, change the ExecStart line to:
# #
# ExecStart=/usr/local/bin/rascsi -ID1 /home/pi/images/harddisk.hds # ExecStart=/usr/local/bin/piscsi -ID1 /home/pi/images/harddisk.hds
# #
# Example 2: If you want to reserve SCSI IDs to prevent usage, add '-r' followed by # Example 2: If you want to reserve SCSI IDs to prevent usage, add '-r' followed by
# comma-separated SCSI ID numbers; for instance IDs 0 and 7: # comma-separated SCSI ID numbers; for instance IDs 0 and 7:
# #
# ExecStart=/usr/local/bin/rascsi -r 0,7 # ExecStart=/usr/local/bin/piscsi -r 0,7
# #
ExecStop=/usr/local/bin/rasctl -X ExecStop=/usr/local/bin/scsictl -X
SyslogIdentifier=RASCSI SyslogIdentifier=PISCSI
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -1,5 +1,5 @@
# #
# Defines the 'rascsi_bridge' bridge that connects the RaSCSI network # Defines the 'piscsi_bridge' bridge that connects the PiSCSI network
# interface (ex DaynaPort SCSI/Link) to the outside world. # interface (ex DaynaPort SCSI/Link) to the outside world.
# #
# Depending upon your system configuration, you may need to update this # Depending upon your system configuration, you may need to update this
@ -7,7 +7,7 @@
# #
# This file should be place in /etc/network/interfaces.d # This file should be place in /etc/network/interfaces.d
auto rascsi_bridge auto piscsi_bridge
iface rascsi_bridge inet dhcp iface piscsi_bridge inet dhcp
bridge_ports eth0 bridge_ports eth0

Some files were not shown because too many files have changed in this diff Show More