forked from open-simh/simh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SCP: Update NAT support to libslirp 4.8.0
Rip-n-replace the older slirp implementation with libslirp 4.8.0, which includes a minimal glib stub implementation. No SIMH-specific modifications made to libslirp so that future updates are easier to apply. Other changes: - ETHER: Move UNIT service activation earlier Move the UNIT service activation to after the packet is placed in the Ethernet interface's read queue, vs where the "wakeup" was in the reader thread's loop. If AIO ism't pending for the UNIT, the UNIT gets scheduled via sim_activate_abs(). Uses sim_unit_aio_pending() Solves a mystery stall when trying to FTP NetBSD's pkgsrc archive. - SCP: sim_unit_aio_pending() Add a predicate function that returns TRUE if the UNIT has pending asynchronous I/O work to be done. Used in _eth_callback (sim_ether.c) to schedule the UNIT's service function if necessary (no need to schedule the service function if it's already going to be called.) Does not depend on being in the main SIM thread. - SCP: sim_misc_debug() sim_misc_debug() enables debug output from non-devices, e.g., libslirp's debug output, for consistent output formatting. - CONSOLE: On Win32, don't repeatedly call GetConsoleMode() each time sim_console_write() is called. Use an output function pointer to invoke WriteConsoleA (console output) or WriteFile (output is not a console). - CMake - Clang updates for Windows (CLANG64 environment from MinGW64). - MinGW64 environment: Place binaries under BIN/$MSYSTEM, keep BIN/Win32/_config_ reserved for MS-compiled simulators. - Fix printf() formats for MinGW64-related compiles. - makefile - SDL2_ttf: Only generate info messages iff BESM6 is going to be compiled. Do no generate SDL TTF or missing font file warnings when compiling pdp11 or any other simulator. - SYS_LDFLAGS: System (non-feature) libraries that should be appended to the compiler's command line, such as -lm, -lpthread, -lrt and -ldl. - Detect features required by the libslirp.a library by compiling a small configuration program. (NOTE: This technique can be expanded to detect other simulator-required or SIMH-required features.) - Use a library, BIN/libslirp.dir/libslirp.a, to provide libslirp support rather than compiling libslirp/src/*.c for each simulator that uses networking support. - Per-simulator "_LDFLAGS" so that only only the libraries needed are provided to the compiler. Only added to simulators that use video and networking. No real point in dragging SDL2_ttf into simulators other than BESM6, for example.
- Loading branch information
Showing
109 changed files
with
3,197 additions
and
14,575 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,28 +40,33 @@ jobs: | |
- scelbi 3b2 i701 i704 i7010 i7070 i7080 i7090 sigma uc15 i650 sel32 intel-mds ibm1130 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
## Workaround for remnant symlinks in /usr/local pointing back to | ||
## macOS frameworks. | ||
## | ||
## Future: Will have to keep an eye on SDL_ttf's Python dependency | ||
## so that the correct/appropriate Python version is removed. | ||
- name: Remnant symlink cleanup (macOS) | ||
|
||
## Nuke homebrew and start with a clean instance: | ||
- name: Reinstall HomeBrew (macOS) | ||
if: ${{runner.os == 'macOS'}} | ||
run: | | ||
brew unlink python@3 || true | ||
brew uninstall --ignore-dependencies python@3 || true | ||
brew unlink [email protected] || true | ||
brew uninstall --ignore-dependencies [email protected] || true | ||
for f in $(find /usr/local/bin -type l -print); do \ | ||
(readlink $f | grep -q -s "/Library") && echo Removing "$f" && rm -f "$f"; \ | ||
done || exit 0 | ||
/usr/bin/sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)" | ||
[ -d /opt/homebrew ] && ( sudo rm -rf /opt/homebrew/* || true ) | ||
[ -d /usr/local ] && ( sudo rm -rf /usr/local/* || true ) | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | ||
## Install our regular dependencies. | ||
- name: Install dependencies (macOS) | ||
if: ${{runner.os == 'macOS'}} | ||
run: sh -ex .travis/deps.sh osx | ||
run: | | ||
sh -ex .travis/deps.sh osx | ||
- name: Install dependencies (Linux) | ||
if: ${{runner.os == 'Linux'}} | ||
run: sh -ex .travis/deps.sh linux | ||
|
||
- name: libslirp module | ||
run: | | ||
git submodule sync | ||
git submodule set-url -- libslirp https://gitlab.freedesktop.org/bscottmichel/libslirp-minimal.git | ||
git submodule set-branch --branch incr-minimal libslirp | ||
git submodule update --init --recursive --remote | ||
- name: makefile build | ||
env: | ||
SIM: ${{matrix.simulators}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,14 @@ jobs: | |
run: | | ||
sh -ex .travis/deps.sh linux | ||
sudo apt install -ym ninja-build | ||
- name: libslirp module | ||
run: | | ||
git submodule sync | ||
git submodule set-url -- libslirp https://gitlab.freedesktop.org/bscottmichel/libslirp-minimal.git | ||
git submodule set-branch --branch incr-minimal libslirp | ||
git submodule update --init --recursive --remote | ||
- name: cmake-builder.sh | ||
run: | | ||
cmake/cmake-builder.sh --config Release --flavor ninja --lto --notest --parallel --verbose --cpack_suffix x86_64-${{matrix.os}} | ||
|
@@ -47,7 +55,7 @@ jobs: | |
|
||
|
||
cmake-macOS: | ||
name: macOS 12+ | ||
name: macOS | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
#- | ||
|
@@ -57,32 +65,35 @@ jobs: | |
# that the build produces. | ||
# | ||
# (*) "artefact" for the rest of the Anglosphere - | ||
# | ||
# As of 18 NOV 2024, Github deprecated macos-12. | ||
matrix: | ||
os: [macos-12, macos-13, macos-14] | ||
os: [macos-13, macos-14] | ||
|
||
env: | ||
CPACK_SUFFIX: ${{matrix.os != 'macos-14' && 'x86_64' || 'm1'}}.${{matrix.os}} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
## Workaround for remnant symlinks in /usr/local pointing back to | ||
## macOS frameworks. | ||
## | ||
## Future: Will have to keep an eye on SDL_ttf's Python dependency | ||
## so that the correct/appropriate Python version is removed. | ||
- name: Remnant symlink cleanup | ||
run: | | ||
brew unlink python@3 || true | ||
brew uninstall --ignore-dependencies python@3 || true | ||
brew unlink [email protected] || true | ||
brew uninstall --ignore-dependencies [email protected] || true | ||
for f in $(find /usr/local/bin -type l -print); do \ | ||
(readlink $f | grep -q -s "/Library") && echo Removing "$f" && rm -f "$f"; \ | ||
done || exit 0 | ||
## Nuke homebrew and start with a clean instance. | ||
- name: Reinstall HomeBrew (macOS) | ||
run: | | ||
/usr/bin/sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)" | ||
[ -d /opt/homebrew ] && ( sudo rm -rf /opt/homebrew/* || true ) | ||
[ -d /usr/local ] && ( sudo rm -rf /usr/local/* || true ) | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | ||
- name: Install dependencies | ||
run: sh -ex .travis/deps.sh osx | ||
run: | | ||
sh -ex .travis/deps.sh osx | ||
- name: libslirp module | ||
run: | | ||
git submodule sync | ||
git submodule set-url -- libslirp https://gitlab.freedesktop.org/bscottmichel/libslirp-minimal.git | ||
git submodule set-branch --branch incr-minimal libslirp | ||
git submodule update --init --recursive --remote | ||
- name: cmake-builder.sh | ||
run: | | ||
|
@@ -123,6 +134,12 @@ jobs: | |
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: libslirp module | ||
run: | | ||
git submodule sync | ||
git submodule set-url -- libslirp https://gitlab.freedesktop.org/bscottmichel/libslirp-minimal.git | ||
git submodule set-branch --branch incr-minimal libslirp | ||
git submodule update --init --recursive --remote | ||
- name: Install v141_xp (XP toolkit) and build SIMH | ||
shell: pwsh | ||
run: | | ||
|
@@ -189,8 +206,25 @@ jobs: | |
cmake-vs2022: | ||
name: VS 2022 Win10 native VCPKG | ||
runs-on: windows-latest | ||
strategy: | ||
#- | ||
# The CMake builds produce artifacts (*) and the runner image's name is | ||
# used in the artifact's name, simh-4.1.0-x86_64-ubuntu-20.04.deb. | ||
# Consequently, each runner image is enumerated for each artifact (*) | ||
# that the build produces. | ||
# | ||
# (*) "artefact" for the rest of the Anglosphere | ||
#- | ||
matrix: | ||
build: [vs2022, vs2022-x64] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: libslirp module | ||
run: | | ||
git submodule sync | ||
git submodule set-url -- libslirp https://gitlab.freedesktop.org/bscottmichel/libslirp-minimal.git | ||
git submodule set-branch --branch incr-minimal libslirp | ||
git submodule update --init --recursive --remote | ||
- name: vs2022 build | ||
shell: pwsh | ||
run: | | ||
|
@@ -206,34 +240,36 @@ jobs: | |
Push-Location $env:VCPKG_ROOT | ||
git pull | ||
Pop-Location | ||
./cmake/cmake-builder.ps1 -flavor vs2022 -config Release -clean -lto -verbose -notest -cpack_suffix win32-native | ||
./cmake/cmake-builder.ps1 -flavor ${{matrix.build}} -config Release -clean -lto -verbose ` | ||
-notest ` | ||
-cpack_suffix ${{matrix.build}} | ||
- name: SIMH simulator suite test | ||
shell: pwsh | ||
run: | | ||
./cmake/cmake-builder.ps1 -flavor vs2022 -config Release -testOnly | ||
./cmake/cmake-builder.ps1 -flavor ${{matrix.build}} -config Release -testOnly | ||
## Install isn't strictly necessary, but it's a good way to see what dependencies | ||
## (IMPORTED_RUNTIME_ARTIFACTS) get installed. | ||
- name: Install | ||
shell: pwsh | ||
run: | | ||
cmake/cmake-builder.ps1 -config Release -flavor vs2022 -installOnly | ||
cmake/cmake-builder.ps1 -config Release -flavor ${{matrix.build}} -installOnly | ||
- name: SIMH packaging | ||
shell: pwsh | ||
run: | | ||
cd cmake\build-vs2022 | ||
cd cmake\build-${{matrix.build}} | ||
cpack -G "NSIS;WIX;ZIP" -C Release | ||
- name: Upload ZIP | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: simh-4.1.0-win32-vs2022.zip | ||
path: cmake/build-vs2022/simh-4.1.0-win32-native.zip | ||
name: simh-4.1.0-${{matrix.build}}.zip | ||
path: cmake/build-${{matrix.build}}/simh-4.1.0-${{matrix.build}}.zip | ||
- name: Upload EXE installer | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: simh-4.1.0-win32-vs2022.exe | ||
path: cmake/build-vs2022/simh-4.1.0-win32-native.exe | ||
name: simh-4.1.0-${{matrix.build}}.exe | ||
path: cmake/build-${{matrix.build}}/simh-4.1.0-${{matrix.build}}.exe | ||
- name: Upload MSI installer | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: simh-4.1.0-win32-vs2022.msi | ||
path: cmake/build-vs2022/simh-4.1.0-win32-native.msi | ||
name: simh-4.1.0-${{matrix.build}}.msi | ||
path: cmake/build-${{matrix.build}}/simh-4.1.0-${{matrix.build}}.msi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "libslirp"] | ||
path = libslirp | ||
url = https://ourdoodlehouse.org/gitlab/scott/libslirp-minimal.git | ||
branch = incr-minimal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.