Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit b708974
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 15:03:15 2023 +0100

    Update

commit b2c311b
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 14:58:40 2023 +0100

    Update

commit 2b334fe
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 14:54:22 2023 +0100

    Update

commit c67807b
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 14:43:16 2023 +0100

    Fix typo

commit 917c80b
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 14:42:39 2023 +0100

    Update README

commit 6f6ec70
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 14:29:44 2023 +0100

    Update README

commit ff2522a
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 13:15:00 2023 +0100

    Cleanup

commit 567d708
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 13:09:01 2023 +0100

    Remove Sleep()

commit 756a522
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 12:58:58 2023 +0100

    Remove easyinstall

commit 7574f3e
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 12:54:09 2023 +0100

    Re-add cpp.yml

commit 6df7654
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 12:52:05 2023 +0100

    Remove SCSIHD_NEC

commit 6f708d2
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 12:31:17 2023 +0100

    Remove SCBR

commit 30bb555
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 12:16:14 2023 +0100

    Update includes

commit 18c84a7
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 12:10:59 2023 +0100

    Update jobs

commit 7d32815
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 12:03:10 2023 +0100

    Remove non-C++ files

commit f6208a5
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 12:00:47 2023 +0100

    Remove workflow files

commit bb3b373
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 11:58:27 2023 +0100

    Add scsiexec

commit d4ff468
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 11:43:13 2023 +0100

    Update postinst and .gitignore

commit 2069bb8
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 10:33:32 2023 +0000

    Initial debian build process

commit 3160fb6
Author: Uwe Seimet <Uwe.Seimet@seimet.de>
Date:   Fri Nov 24 09:19:57 2023 +0000

    Add initial packaging
  • Loading branch information
uweseimet committed Nov 24, 2023
1 parent fa2fd4d commit 42899c0
Show file tree
Hide file tree
Showing 260 changed files with 1,089 additions and 33,667 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/arm_cross_compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
working-directory: cpp
env:
APT_ARM_TOOLCHAIN: "gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf libspdlog-dev"
APT_LIBRARIES: "libspdlog-dev:armhf libpcap-dev:armhf libevdev2:armhf libev-dev:armhf protobuf-compiler libprotobuf-dev:armhf"
APT_LIBRARIES: "libspdlog-dev:armhf libpcap-dev:armhf protobuf-compiler libprotobuf-dev:armhf"
steps:
- uses: actions/checkout@v3

Expand Down
85 changes: 1 addition & 84 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- 'main'

env:
APT_PACKAGES: libspdlog-dev libpcap-dev libevdev2 libev-dev protobuf-compiler libgtest-dev libgmock-dev
APT_PACKAGES: libspdlog-dev libpcap-dev protobuf-compiler libgtest-dev libgmock-dev

jobs:
unit_tests:
Expand All @@ -33,86 +33,3 @@ jobs:

- name: Build unit tests
run: make -j $(nproc) test

- name: Run unit tests
run: (set -o pipefail && bin/piscsi_test | tee piscsi_test_log.txt)

- name: Upload logs
uses: actions/upload-artifact@v3
with:
name: piscsi_test_log.txt
path: cpp/piscsi_test_log.txt

sonarcloud:
runs-on: ubuntu-22.04
if: github.repository == 'PiSCSI/piscsi'
env:
SOURCES: cpp
BUILD_WRAPPER_OUT_DIR: "$HOME/.build_wrapper_out" # Directory where build-wrapper output will be placed
SONAR_SCANNER_VERSION: 5.0.1.3006
SONAR_SERVER_URL: "https://sonarcloud.io"
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_PROJECT_KEY: "akuker-PISCSI"
SONAR_ORGANIZATION: "piscsi"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Install dependencies
run: sudo apt-get install ${{ env.APT_PACKAGES }}

- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17

- uses: actions/cache@v3
name: Cache SonarCloud setup
id: sonar-install-cache
with:
path: ~/.sonar
key: sonar-with-build-wrapper-${{ env.SONAR_SCANNER_VERSION }}

- name: Set up SonarCloud scanner
if: steps.sonar-install-cache.outputs.cache-hit != 'true'
env:
SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip
run: |
mkdir -p $HOME/.sonar
curl -sSLo /tmp/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
unzip -o /tmp/sonar-scanner.zip -d $HOME/.sonar/
- name: Set up SonarCloud build wrapper
if: steps.sonar-install-cache.outputs.cache-hit != 'true'
env:
BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip
run: |
curl -sSLo /tmp/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}
unzip -o /tmp/build-wrapper-linux-x86.zip -d $HOME/.sonar/
- name: Generate coverage
run: >-
(mkdir -p ${{ env.BUILD_WRAPPER_OUT_DIR }} || true) &&
$HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64
--out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }}
make -j $(nproc) -C $SOURCES coverage
- name: Run gcov
working-directory: cpp
run: gcov --preserve-paths $(find -name '*.gcno')

- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >-
$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin/sonar-scanner
--define sonar.host.url="${{ env.SONAR_SERVER_URL }}"
--define sonar.projectKey=${{ env.SONAR_PROJECT_KEY }}
--define sonar.organization=${{ env.SONAR_ORGANIZATION }}
--define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
--define sonar.cfamily.gcov.reportsPath=.
--define sonar.coverage.exclusions="cpp/**/test/**"
--define sonar.cpd.exclusions="cpp/**/test/**"
--define sonar.inclusions="cpp/**,python/**"
--define sonar.python.version=3.9,3.11
69 changes: 0 additions & 69 deletions .github/workflows/rpi_image_creation.yml.old

This file was deleted.

21 changes: 0 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,16 @@ venv
*.swp
*.log
*~
core
.idea/
.vscode
.DS_Store
__pycache__
current
rascsi_interface_pb2.py
piscsi_interface_pb2.py
messages.pot
messages.mo
report.xml
node_modules

# Intermediate files from astyle
*.orig

docker/docker-compose.override.yml
/docker/volumes/images/*
!/docker/volumes/images/.gitkeep
/docker/volumes/config/*
!/docker/volumes/config/.gitkeep

# temporary user files
s.sh

# temporary kicad files
*-backups

# VSCode temp file
settings.json

# submodules
hfdisk*
mac-hard-disk-drivers
75 changes: 39 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
# What is PiSCSI?
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/PiSCSI/piscsi/wiki)!

# How do I contribute?
PiSCSI is using the <a href="https://datasift.github.io/gitflow/IntroducingGitFlow.html">Gitflow Workflow</a>. A quick overview:

- The *main* 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 rest of the feature branches are for developing new features
- A tag will be created for each "release". The releases will be named <year>.<month>.<release number> where the release number is incremented for each subsequent release tagged in the same calendar month. The first release of the month of January 2021 is called "21.01.01", the second one in the same month "21.01.02" and so on.

Typically, releases will only be planned every few months.

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/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_PISCSI)

# GitHub Sponsors
Thank you to all of the GitHub sponsors who support the development community!

Special thank you to the Gold level sponsors!
- <a href="https://github.com/mikelord68">@mikelord68</a>
- <a href="https://github.com/SamplerSpa-de">@samplerspa-de</a>

Special thank you to the Silver level sponsors!
- <a href="https://github.com/stinkerton18">@stinkerton18</a>
- <a href="https://github.com/hsiboy">@hsiboy</a>
- <a href="https://github.com/pendleton115">@pendleton115</a>
- <a href="https://github.com/Teufelhunden-0311">@Teufelhunden-0311</a>
- Private sponsor ;]

Thank you to Lin van der Slikke for the red panda logo design!
# What is SCSI2Pi?

SCSI2Pi runs on a Raspberry Pi (most likely not on a Pi 5) and emulates various types of SCSI devices at one time. With SCSI2Pi you can also backup and restore SCSI hard drives. More tools are in the process of being added.
SCSI2Pi is based on the <a href="https://github.com/PiSCSI/piscsi">PiSCSI project</a>, but aims at further improving the compatibility, code qualitiy and functionality. See below for details.<br />
SCSI2Pi was chosen as the name for this project because there are not that many choices anymore when looking for a name that contains both "SCSI" and "Pi" ;-).

# Who am I?

In the past I was the main C++ code contributor for PiSCSI. I re-engineered most of the legacy C++ code and updated it to make good use of C++-20, which is the most modern C++ standard you can use on the Pi. I also revised the SCSI emulation architecture. All in all this resulted in more modular code and drastically improved SonarQube code metrics. Besides adding a lot of <a href="https://www.piscsi.de/en/piscsi.html">new features</a> and improving the compatiblity with many platforms, I also fixed numerous bugs in the legacy PiSCSI codebase and added an extensive set of unit tests. Further I am the author of the <a href="https://www.piscsi.de">PiSCSI control app</a> for Android, which makes use of the remote interface I added to PiSCSI.

# How is SCSI2Pi related to PiSCSI and the former RaSCSI?

Over time, it turned out that the PiSCSI project tended to prefer old (and even new) non-working code to bug-fixed code in modern C++ In addition, features were promised but never delivered, as you can see in numerous tickets and the project's roadmap. There was also no interest in exploiting the initiator mode feature of the FULLSPEC board. This mode, together with new command line tools, offers solutions for use cases that have never been addressed before, neither with PiSCSI nor its predecessor RaSCSI.
From my perspective this situation was not satisfying, and this is why I decided to set up SCSI2Pi as a new project that is compatible with the PiSCSI board.

# SCSI2Pi goals

The intention of SCSI2Pi is not to completely replace PiSCSI, where great work is still being done on the web interface and on supporting users in social media.
The goal of SCSI2Pi is to improve the actual SCSI emulation and to address the remaining compatibility issues, mainly (but not only) with usually rather exotic platforms.
SCSI2Pi focuses on vintage computers like Macs, Ataris, Amigas, workstations and on samplers. There is no support for the X68000, because in PiSCSI this code has always been in a bad shape, nobody has been willing to test it, and it might not even be working. Most of the other features of PiSCSI are supported - many of these I implemented anyway ;-). And there are more new features to come. Besides bug fixes in the SCSI code there will be new tools that make use of the FULLSPEC board's initiator mode.<br />
These are the features where SCSI2Pi is definitely not an alternative to PiSCSI:

- Everything related to X68000 support.
- SASI drive support. This is currently also not supported by PiSCSI, but re-adding it <a href="https://github.com/PiSCSI/piscsi/issues/809">has a high priority</a>.
- NEC hard drive support.
- Everything on the <a href="https://github.com/PiSCSI/piscsi/issues/809">PiSCSI roadmap</a>.

# How to switch between PiSCSI and SCSI2Pi

As already mentioned, SCSI2Pi is not meant to completely replace PiSCSI. Instead, I intend to provide standard Debian packages with binaries that replace the PiSCSI binaries. Just by installing such a package your PiSCSI installation will use a more modern and better maintained SCSI emulation codebase. If need should be, you can switch back any time by just running PiSCSI's easysetup script. SCSI2Pi does not modify anything except binaries and manpages, which can easily be reverted.<br />
Of course, in case you have to switch back to PiSCSI I would appreciate your feedback on any issues caused by SCSI2Pi. Just create a GitHub ticket with details on what was working with PiSCSI but not with SCSI2Pi. But please not: The SCSI2Pi project only accepts tickets that target SCSI2Pi, but none related to PiSCSI, e.g. the web interface or the installation images.<br />
Even though I cannot give any guarantees I will try to stay compatible with PiSCSI on the one hand while on the other hand offering new features with SCSI2Pi. The same applies to the PiSCSI control app, which might be renamed: I will try to keep it compatible also with PiSCSI. Currently I do not see an issue with that.

Being compatible and not a full replacement also means being compatible with most of the documentation on the <a href="https://github.com/PiSCSI/piscsi/wiki">PiSCSI Wiki</a>. More information specific to SCSI2Pi is available on the <a href="https://www.scsi2pi.net">SCSI2Pi website.</a>

# Contributing to SCSI2Pi

Contributions are welcome, of course. Please see the <a href="https://github.com/PiSCSI/piscsi/wiki">PiSCSI Wiki</a> for general information on how to contribute. If you are interested in the Pi and/or SCSI, in modern C++ and platform-independent programming, you are very welcome as a developer or a code reviewer.<br />
Did I just say "platform independent programming", even though SCSI2Pi is about a Pi? Yes, I did, because I have ensured that the PiSCSI code also compiles and partially runs on regular Linux PCs, on BSD and even on macos. This is important for developers and for testing, because the faster your development machine, the better. I am using Eclipse CDT on a Linux PC as my primary development platform, by the way.
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

Loading

0 comments on commit 42899c0

Please sign in to comment.