From 862c61f724e6c65c56b5b62c7ac404057e997d31 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 18:16:35 +0200 Subject: [PATCH 01/57] Add GitHub Actions workflow for building REDRIVER2 --- .github/workflows/Build game.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/Build game.yml diff --git a/.github/workflows/Build game.yml b/.github/workflows/Build game.yml new file mode 100644 index 000000000..57f2f4a7e --- /dev/null +++ b/.github/workflows/Build game.yml @@ -0,0 +1,32 @@ +name: Build REDRIVER2 for R36S (aarch64) + +on: + workflow_dispatch: # Ermöglicht den manuellen Start + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Code auschecken + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: ARM64 Kompilierung in QEMU + uses: uraimo/run-on-arch-action@v2 + with: + arch: aarch64 + distro: ubuntu20.04 + run: | + apt-get update + apt-get install -y cmake g++ gcc make libsdl2-dev libgl1-mesa-dev + mkdir build && cd build + # Optimierung für Rockchip und Release-Build + cmake .. -DCMAKE_BUILD_TYPE=Release + make -j$(nproc) + + - name: Fertiges Spiel hochladen + uses: actions/upload-artifact@v4 + with: + name: REDRIVER2-PortMaster + path: build/REDRIVER2 From bdd66d74529f0dab08fe52b4981260039d41e4bf Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 18:23:44 +0200 Subject: [PATCH 02/57] Add GitHub Actions workflow for REDRIVER2 build --- .github/workflows/main.yml | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..c76925d13 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,54 @@ +name: Build REDRIVER2 for R36S (aarch64) + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Code auschecken + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: ARM64 Kompilierung in QEMU + uses: uraimo/run-on-arch-action@v2 + with: + arch: aarch64 + distro: ubuntu20.04 + run: | + apt-get update + # Installiere die neuen Abhängigkeiten des Entwicklers + git/curl zum Bauen + apt-get install -y g++ gcc make libsdl2-dev libopenal-dev libjpeg-turbo8-dev git curl + + # 1. Premake5 für ARM64 aus dem Source-Code bauen + git clone https://github.com/premake/premake-core.git --depth 1 + cd premake-core + make -f Bootstrap.mak linux + cp bin/release/premake5 /usr/local/bin/ + cd .. + + # 2. In das Build-Verzeichnis von REDRIVER2 wechseln + cd src_rebuild + + # 3. Workaround: Architektur-Beschränkungen (x86) für ARM64 aufbrechen + sed -i 's/architecture "x86_64"/architecture "ARM64"/g' premake5.lua + sed -i 's/architecture "x86"/architecture "ARM64"/g' premake5.lua + + # 4. Makefiles mit Premake5 generieren + premake5 gmake2 + + # 5. Das Spiel kompilieren! (Es nutzt den Namen release_dev_x64, wird aber als ARM64 gebaut) + cd build + make config=release_dev_x64 -j$(nproc) + + # 6. Spiel-Binary in einen Ausgabeordner kopieren, um es leichter hochzuladen + mkdir -p ../../R36S-Output + find . -type f -name "REDRIVER2" -exec cp {} ../../R36S-Output/ \; + + - name: Fertiges Spiel hochladen + uses: actions/upload-artifact@v4 + with: + name: REDRIVER2-PortMaster + path: R36S-Output/REDRIVER2 From bdb76d55c4351baede6cb5339f863bcb6188f6a0 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 18:25:05 +0200 Subject: [PATCH 03/57] Add GameBuilder workflow for REDRIVER2 build --- .github/workflows/GameBuilder.yml | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/GameBuilder.yml diff --git a/.github/workflows/GameBuilder.yml b/.github/workflows/GameBuilder.yml new file mode 100644 index 000000000..4a7c208a3 --- /dev/null +++ b/.github/workflows/GameBuilder.yml @@ -0,0 +1,57 @@ +name: create REDRIVER2 for R36S (RK3326 Optimized) + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Code auschecken + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: ARM64 Kompilierung in QEMU (Cortex-A35 optimiert) + uses: uraimo/run-on-arch-action@v2 + with: + arch: aarch64 + distro: ubuntu20.04 + run: | + apt-get update + apt-get install -y g++ gcc make libsdl2-dev libopenal-dev libjpeg-turbo8-dev git curl + + # 1. Premake5 für ARM64 kompilieren + git clone https://github.com/premake/premake-core.git --depth 1 + cd premake-core + make -f Bootstrap.mak linux + cp bin/release/premake5 /usr/local/bin/ + cd .. + + # 2. In das Source-Verzeichnis wechseln + cd src_rebuild + + # 3. Architektur im Build-Skript patchen (x86 durch ARM64 ersetzen) + sed -i 's/"x86_64"/"arm64"/g' premake5.lua + sed -i 's/"x86"/"arm"/g' premake5.lua + + # 4. Makefiles generieren + premake5 gmake2 + + # 5. R36S / RK3326 Hardware-Optimierungen setzen + export CFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe" + export CXXFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe" + + # 6. Kompilieren (Die Fallbacks stellen sicher, dass der richtige Config-Name getroffen wird) + cd build + make config=release_arm64 -j$(nproc) || make config=release_dev_arm64 -j$(nproc) || make -j$(nproc) + + # 7. Datei für den Upload vorbereiten + mkdir -p ../../R36S-Output + find . -type f -name "REDRIVER2" -exec cp {} ../../R36S-Output/ \; + + - name: Optimiertes Spiel hochladen + uses: actions/upload-artifact@v4 + with: + name: REDRIVER2-PortMaster-RK3326 + path: R36S-Output/REDRIVER2 From f584d652b8d95fcc7218e9b0dbc498eec092168b Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 18:38:49 +0200 Subject: [PATCH 04/57] Add workflow to compile REDRIVER2 for R36S This workflow compiles REDRIVER2 for the R36S platform using ARM64 optimizations and uploads the resulting artifact. --- .github/workflows/maind2.yml | 65 ++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/maind2.yml diff --git a/.github/workflows/maind2.yml b/.github/workflows/maind2.yml new file mode 100644 index 000000000..61b0d5f49 --- /dev/null +++ b/.github/workflows/maind2.yml @@ -0,0 +1,65 @@ +name: compile REDRIVER2 for R36S (RK3326 Optimized) + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Code auschecken + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Vorgefertigtes Premake5 herunterladen (Umgehung des Bootstrap-Fehlers) + run: | + curl -sL https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o premake5.tar.gz + tar -zxvf premake5.tar.gz + chmod +x premake5 + + - name: ARM64 Kompilierung in QEMU (Cortex-A35 optimiert) + uses: uraimo/run-on-arch-action@v2 + with: + arch: aarch64 + distro: ubuntu20.04 + github-token: ${{ github.token }} + run: | + apt-get update + apt-get install -y g++ gcc make libsdl2-dev libopenal-dev libjpeg-turbo8-dev + + # Premake-Binary in den ARM-Container verschieben + cp /__w/REDRIVER2-arkos/REDRIVER2-arkos/premake5 /usr/local/bin/premake5 + + # In das Source-Verzeichnis wechseln + src_dir=$(find . -maxdepth 2 -name "src_rebuild" -type d) + if [ -z "$src_dir" ]; then + src_dir="src_rebuild" + fi + cd "$src_dir" + + # Architektur im Build-Skript patchen + sed -i 's/"x86_64"/"arm64"/g' premake5.lua + sed -i 's/"x86"/"arm"/g' premake5.lua + + # Makefiles mit Premake generieren + premake5 gmake2 + + # R36S / RK3326 Hardware-Optimierungen + Memory-Sicherheit (strict-aliasing Fix) + export CFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" + export CXXFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" + + # Kompilieren (Fallbacks für unterschiedliche Config-Namen) + cd build + make config=release_arm64 -j$(nproc) || make config=release_dev_arm64 -j$(nproc) || make -j$(nproc) + + # Datei für den Upload vorbereiten + mkdir -p ../../../R36S-Output + find . -type f -name "REDRIVER2" -exec cp {} ../../../R36S-Output/ \; + + - name: Optimiertes Spiel hochladen + uses: upload/artifact@v4 # Beibehalten bzw. standardkonform + uses: actions/upload-artifact@v4 + with: + name: REDRIVER2-PortMaster-RK3326 + path: R36S-Output/REDRIVER2 From 2c3de9c0e8e7d10de46f085c18b191f747000b21 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 18:40:04 +0200 Subject: [PATCH 05/57] Add GitHub Actions workflow for REDRIVER2 build This workflow builds the REDRIVER2 project optimized for RK3326 on ARM64 architecture using QEMU. --- .github/workflows/D2build.yml | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/D2build.yml diff --git a/.github/workflows/D2build.yml b/.github/workflows/D2build.yml new file mode 100644 index 000000000..5aa6de7da --- /dev/null +++ b/.github/workflows/D2build.yml @@ -0,0 +1,64 @@ +name: Baue REDRIVER2 for R36S (RK3326 Optimized) + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Code auschecken + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Vorgefertigtes Premake5 herunterladen (Umgehung des Bootstrap-Fehlers) + run: | + curl -sL https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o premake5.tar.gz + tar -zxvf premake5.tar.gz + chmod +x premake5 + + - name: ARM64 Kompilierung in QEMU (Cortex-A35 optimiert) + uses: uraimo/run-on-arch-action@v2 + with: + arch: aarch64 + distro: ubuntu20.04 + github-token: ${{ github.token }} + run: | + apt-get update + apt-get install -y g++ gcc make libsdl2-dev libopenal-dev libjpeg-turbo8-dev + + # Premake-Binary in den ARM-Container verschieben + cp /__w/REDRIVER2-arkos/REDRIVER2-arkos/premake5 /usr/local/bin/premake5 + + # In das Source-Verzeichnis wechseln + src_dir=$(find . -maxdepth 2 -name "src_rebuild" -type d) + if [ -z "$src_dir" ]; then + src_dir="src_rebuild" + fi + cd "$src_dir" + + # Architektur im Build-Skript patchen + sed -i 's/"x86_64"/"arm64"/g' premake5.lua + sed -i 's/"x86"/"arm"/g' premake5.lua + + # Makefiles mit Premake generieren + premake5 gmake2 + + # R36S / RK3326 Hardware-Optimierungen + Memory-Sicherheit (strict-aliasing Fix) + export CFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" + export CXXFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" + + # Kompilieren (Fallbacks für unterschiedliche Config-Namen) + cd build + make config=release_arm64 -j$(nproc) || make config=release_dev_arm64 -j$(nproc) || make -j$(nproc) + + # Datei für den Upload vorbereiten (Sicherer Export-Pfad) + mkdir -p /tmp/R36S-Output + find . -type f -name "REDRIVER2" -exec cp {} /tmp/R36S-Output/ \; + + - name: Optimiertes Spiel hochladen + uses: actions/upload-artifact@v4 + with: + name: REDRIVER2-PortMaster-RK3326 + path: /tmp/R36S-Output/REDRIVER2 From 75006305444b8559ddb68da1c9d38d87d83e8583 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 18:48:07 +0200 Subject: [PATCH 06/57] Add GitHub Actions workflow for REDRIVER2 build --- .github/workflows/Driber2.yml | 118 ++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .github/workflows/Driber2.yml diff --git a/.github/workflows/Driber2.yml b/.github/workflows/Driber2.yml new file mode 100644 index 000000000..72cd49818 --- /dev/null +++ b/.github/workflows/Driber2.yml @@ -0,0 +1,118 @@ +name: Bastel REDRIVER2 for R36S (RK3326) + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + arch: [ arm64 ] + steps: + # 1. Repository klonen + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + # 2. QEMU-Setup für ARM64-Emulation + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: linux/arm64 + + # 3. Build in ARM64-Container via run-on-arch + - name: Build in ARM64 container + uses: uraimo/run-on-arch-action@v2 + with: + arch: ${{ matrix.arch }} + distro: ubuntu20.04 + githubToken: ${{ github.token }} + install: | + apt-get update + apt-get install -y --no-install-recommends \ + build-essential \ + make \ + gcc-9 \ + g++-9 \ + gfortran-9 \ + libsdl2-dev \ + libopenal-dev \ + libjpeg-dev \ + libgl1-mesa-dev \ + libgles2-mesa-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libxi-dev \ + libglu1-mesa-dev \ + libpulse-dev \ + libdbus-1-dev \ + libibus-1.0-dev \ + pkg-config \ + cpio \ + wget \ + curl + run: | + echo "===== Build-Step: Cross-Compilation für RK3326 (arm64) =====" + + # 4. Premake5 herunterladen und korrekt platzieren + echo "Downloading Premake5..." + wget -q "https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz" -O /tmp/premake5.tar.gz + tar -xzf /tmp/premake5.tar.gz -C /tmp + cp /tmp/premake5 /usr/local/bin/ + chmod +x /usr/local/bin/premake5 + premake5 --version + + # 5. Architektur-Patch (wichtig: von x86 auf ARM64 ändern) + echo "Patching premake5.lua..." + cd /__w/REDRIVER2-arkos/REDRIVER2-arkos/src_rebuild/ + sed -i 's/"x86"/"ARM64"/g' premake5.lua + sed -i 's/"x86_64"/"ARM64"/g' premake5.lua + grep -n "platforms" premake5.lua | head -5 + + # 6. Premake5 Projektdateien generieren + echo "Generating Makefiles..." + premake5 gmake + ls -la project_gmake_linux + + # 7. Kompilierung mit aggressiven Optimierungen für RK3326 + echo "Building REDRIVER2..." + export CFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" + export CXXFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" + export LDFLAGS="-mcpu=cortex-a35" + + cd project_gmake_linux/ + make config=release_arm64 -j$(nproc) || \ + make config=release_dev_arm64 -j$(nproc) || \ + make -j$(nproc) + + # 8. Artefakt vorbereiten und hochladen + echo "Locating built binary..." + ls -laR ../bin/ | grep -E "REDRIVER2|\.so" || true + find .. -name "REDRIVER2" -type f 2>/dev/null || true + + # 9. Artefakt inkl. Build-Info verpacken + echo "Packaging artifacts..." + cd .. + mkdir -p dist/REDRIVER2_arkos + cp bin/Release/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ + cp bin/Release_dev/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ + cp bin/*/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null + echo "SD-Karten-Struktur für ArkOS:" > dist/REDRIVER2_arkos/README.txt + echo "Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab." >> dist/REDRIVER2_arkos/README.txt + echo "Lege die originalen PSX-Dateien (.cue/.bin) in denselben Ordner." >> dist/REDRIVER2_arkos/README.txt + ls -laR dist/ + + # 10. Artefakt als GitHub Release hochladen + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: REDRIVER2-arkos-arm64 + path: dist/REDRIVER2_arkos/ + if-no-files-found: error From 913cd17531a39f2a1d294d6ec745967e06af30e6 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 18:51:46 +0200 Subject: [PATCH 07/57] Add GitHub Actions workflow for REDRIVER2 build --- .github/workflows/main3buikdrr.yml | 118 +++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .github/workflows/main3buikdrr.yml diff --git a/.github/workflows/main3buikdrr.yml b/.github/workflows/main3buikdrr.yml new file mode 100644 index 000000000..cde18cb3c --- /dev/null +++ b/.github/workflows/main3buikdrr.yml @@ -0,0 +1,118 @@ +name: construct REDRIVER2 for R36S (RK3326) + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + # 1. Repository klonen + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + # 2. QEMU-Setup für ARM64-Emulation + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: linux/arm64 + + # 3. Build in ARM64-Container via run-on-arch-action (v3) + - name: Build in ARM64 container + uses: uraimo/run-on-arch-action@v3 + with: + arch: none + distro: none + base_image: '--platform=linux/arm64 ubuntu:22.04' + githubToken: ${{ github.token }} + env: | + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + install: | + apt-get update + apt-get install -y --no-install-recommends \ + build-essential \ + make \ + gcc-9 \ + g++-9 \ + gfortran-9 \ + libsdl2-dev \ + libopenal-dev \ + libjpeg-dev \ + libgl1-mesa-dev \ + libgles2-mesa-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libxi-dev \ + libglu1-mesa-dev \ + libpulse-dev \ + libdbus-1-dev \ + libibus-1.0-dev \ + pkg-config \ + cpio \ + wget \ + curl + run: | + echo "===== Build-Step: Cross-Compilation für RK3326 (arm64) =====" + + # 4. Premake5 herunterladen und korrekt platzieren + echo "Downloading Premake5..." + wget -q "https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz" -O /tmp/premake5.tar.gz + tar -xzf /tmp/premake5.tar.gz -C /tmp + cp /tmp/premake5 /usr/local/bin/ + chmod +x /usr/local/bin/premake5 + premake5 --version + + # 5. Architektur-Patch (wichtig: von x86 auf ARM64 ändern) + echo "Patching premake5.lua..." + cd /__w/REDRIVER2-arkos/REDRIVER2-arkos/src_rebuild/ + sed -i 's/"x86"/"ARM64"/g' premake5.lua + sed -i 's/"x86_64"/"ARM64"/g' premake5.lua + grep -n "platforms" premake5.lua | head -5 + + # 6. Premake5 Projektdateien generieren + echo "Generating Makefiles..." + premake5 gmake + ls -la project_gmake_linux + + # 7. Kompilierung mit aggressiven Optimierungen für RK3326 + echo "Building REDRIVER2..." + export CFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" + export CXXFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" + export LDFLAGS="-mcpu=cortex-a35" + + cd project_gmake_linux/ + make config=release_arm64 -j$(nproc) || \ + make config=release_dev_arm64 -j$(nproc) || \ + make -j$(nproc) + + # 8. Artefakt vorbereiten und hochladen + echo "Locating built binary..." + ls -laR ../bin/ | grep -E "REDRIVER2|\.so" || true + find .. -name "REDRIVER2" -type f 2>/dev/null || true + + # 9. Artefakt inkl. Build-Info verpacken + echo "Packaging artifacts..." + cd .. + mkdir -p dist/REDRIVER2_arkos + cp bin/Release/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ + cp bin/Release_dev/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ + cp bin/*/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null + echo "SD-Karten-Struktur für ArkOS:" > dist/REDRIVER2_arkos/README.txt + echo "Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab." >> dist/REDRIVER2_arkos/README.txt + echo "Lege die originalen PSX-Dateien (.cue/.bin) in denselben Ordner." >> dist/REDRIVER2_arkos/README.txt + ls -laR dist/ + + # 10. Artefakt als GitHub Release hochladen + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: REDRIVER2-arkos-arm64 + path: dist/REDRIVER2_arkos/ + if-no-files-found: error From e7f1ee92ffb3df1a727b5c829ebde0ad1be13dd8 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 18:59:20 +0200 Subject: [PATCH 08/57] Add GitHub Actions workflow for REDRIVER2 ARM64 build This workflow builds the REDRIVER2 project for the RK3326 architecture using ARM64 emulation with QEMU. It includes steps for setting up the environment, building the project, and uploading the artifacts. --- .github/workflows/Fahrer2.yml | 130 ++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 .github/workflows/Fahrer2.yml diff --git a/.github/workflows/Fahrer2.yml b/.github/workflows/Fahrer2.yml new file mode 100644 index 000000000..89823b7f9 --- /dev/null +++ b/.github/workflows/Fahrer2.yml @@ -0,0 +1,130 @@ +name: fahre REDRIVER2 for R36S (RK3326) + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + # 1. Repository klonen + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + # 2. QEMU-Setup für ARM64-Emulation + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: linux/arm64 + + # 3. Docker Build & Run (ARM64-Container) + - name: Build in ARM64 Docker container + run: | + # Docker-Image für ARM64 mit allen Abhängigkeiten erstellen + cat > Dockerfile <<'EOF' + FROM --platform=linux/arm64 ubuntu:22.04 + + RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + make \ + gcc-9 \ + g++-9 \ + gfortran-9 \ + libsdl2-dev \ + libopenal-dev \ + libjpeg-dev \ + libgl1-mesa-dev \ + libgles2-mesa-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libxi-dev \ + libglu1-mesa-dev \ + libpulse-dev \ + libdbus-1-dev \ + libibus-1.0-dev \ + pkg-config \ + cpio \ + wget \ + curl \ + && rm -rf /var/lib/apt/lists/* + + WORKDIR /workspace + EOF + + docker build -t redriver2-arm64-builder -f Dockerfile . + + # 4. Build-Ausführung im Container + - name: Run build inside container + run: | + # Repository in den Container mounten und Build durchführen + docker run --rm \ + --platform linux/arm64 \ + -v "$GITHUB_WORKSPACE:/workspace" \ + -w /workspace \ + redriver2-arm64-builder \ + bash -c " + set -e + + echo '===== Build-Step: Cross-Compilation für RK3326 (arm64) =====' + + # Premake5 herunterladen (falls wget fehlschlägt, curl als Fallback) + echo 'Downloading Premake5...' + if ! wget -q 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz' -O /tmp/premake5.tar.gz; then + echo 'wget failed, trying curl...' + curl -L 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz' -o /tmp/premake5.tar.gz + fi + tar -xzf /tmp/premake5.tar.gz -C /tmp + cp /tmp/premake5 /usr/local/bin/ + chmod +x /usr/local/bin/premake5 + premake5 --version + + # Architektur-Patch + echo 'Patching premake5.lua...' + cd /workspace/src_rebuild + sed -i 's/\"x86\"/\"ARM64\"/g' premake5.lua + sed -i 's/\"x86_64\"/\"ARM64\"/g' premake5.lua + grep -n 'platforms' premake5.lua | head -5 + + # Premake5 Makefiles generieren + echo 'Generating Makefiles...' + premake5 gmake + ls -la project_gmake_linux + + # Kompilierung mit aggressiven Optimierungen + echo 'Building REDRIVER2...' + export CFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' + export CXXFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' + export LDFLAGS='-mcpu=cortex-a35' + + cd project_gmake_linux + make config=release_arm64 -j\$(nproc) || \ + make config=release_dev_arm64 -j\$(nproc) || \ + make -j\$(nproc) + + # Artefakt verpacken + echo 'Packaging artifacts...' + cd /workspace + mkdir -p dist/REDRIVER2_arkos + cp bin/Release/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ + cp bin/Release_dev/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ + cp bin/*/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null + echo 'SD-Karten-Struktur für ArkOS:' > dist/REDRIVER2_arkos/README.txt + echo 'Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab.' >> dist/REDRIVER2_arkos/README.txt + echo 'Lege die originalen PSX-Dateien (.cue/.bin) in denselben Ordner.' >> dist/REDRIVER2_arkos/README.txt + ls -laR dist + " + + # 5. Artefakt hochladen + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: REDRIVER2-arkos-arm64 + path: dist/REDRIVER2_arkos/ + if-no-files-found: error From ad989d31e893142d26414adb02dd71a1623ee58f Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:05:24 +0200 Subject: [PATCH 09/57] Add GitHub Actions workflow for REDRIVER2 build --- .github/workflows/2terFahrer.yml | 131 +++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 .github/workflows/2terFahrer.yml diff --git a/.github/workflows/2terFahrer.yml b/.github/workflows/2terFahrer.yml new file mode 100644 index 000000000..ffa1be48b --- /dev/null +++ b/.github/workflows/2terFahrer.yml @@ -0,0 +1,131 @@ +name: erstelle REDRIVER2 for R36S (RK3326) + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + # 1. Repository klonen + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + # 2. QEMU-Setup für ARM64-Emulation + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: linux/arm64 + + # 3. Docker Build & Run (ARM64-Container) + - name: Build in ARM64 Docker container + run: | + # Docker-Image für ARM64 mit allen Abhängigkeiten erstellen + cat > Dockerfile <<'EOF' + FROM --platform=linux/arm64 ubuntu:22.04 + + RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + build-essential \ + make \ + gcc-9 \ + g++-9 \ + gfortran-9 \ + libsdl2-dev \ + libopenal-dev \ + libjpeg-dev \ + libgl1-mesa-dev \ + libgles2-mesa-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libxi-dev \ + libglu1-mesa-dev \ + libpulse-dev \ + libdbus-1-dev \ + libibus-1.0-dev \ + pkg-config \ + cpio \ + wget \ + curl \ + && rm -rf /var/lib/apt/lists/* + + WORKDIR /workspace + EOF + + docker build -t redriver2-arm64-builder -f Dockerfile . + + # 4. Build-Ausführung im Container + - name: Run build inside container + run: | + # Repository in den Container mounten und Build durchführen + docker run --rm \ + --platform linux/arm64 \ + -v "$GITHUB_WORKSPACE:/workspace" \ + -w /workspace \ + redriver2-arm64-builder \ + bash -c " + set -e + + echo '===== Build-Step: Cross-Compilation für RK3326 (arm64) =====' + + # Premake5 herunterladen (falls wget fehlschlägt, curl als Fallback, ggf. mit --insecure) + echo 'Downloading Premake5...' + if ! wget --no-check-certificate -q 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz' -O /tmp/premake5.tar.gz; then + echo 'wget failed, trying curl...' + curl -L --insecure 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz' -o /tmp/premake5.tar.gz + fi + tar -xzf /tmp/premake5.tar.gz -C /tmp + cp /tmp/premake5 /usr/local/bin/ + chmod +x /usr/local/bin/premake5 + premake5 --version + + # Architektur-Patch + echo 'Patching premake5.lua...' + cd /workspace/src_rebuild + sed -i 's/\"x86\"/\"ARM64\"/g' premake5.lua + sed -i 's/\"x86_64\"/\"ARM64\"/g' premake5.lua + grep -n 'platforms' premake5.lua | head -5 + + # Premake5 Makefiles generieren + echo 'Generating Makefiles...' + premake5 gmake + ls -la project_gmake_linux + + # Kompilierung mit aggressiven Optimierungen + echo 'Building REDRIVER2...' + export CFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' + export CXXFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' + export LDFLAGS='-mcpu=cortex-a35' + + cd project_gmake_linux + make config=release_arm64 -j\$(nproc) || \ + make config=release_dev_arm64 -j\$(nproc) || \ + make -j\$(nproc) + + # Artefakt verpacken + echo 'Packaging artifacts...' + cd /workspace + mkdir -p dist/REDRIVER2_arkos + cp bin/Release/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ + cp bin/Release_dev/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ + cp bin/*/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null + echo 'SD-Karten-Struktur für ArkOS:' > dist/REDRIVER2_arkos/README.txt + echo 'Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab.' >> dist/REDRIVER2_arkos/README.txt + echo 'Lege die originalen PSX-Dateien (.cue/.bin) in denselben Ordner.' >> dist/REDRIVER2_arkos/README.txt + ls -laR dist + " + + # 5. Artefakt hochladen + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: REDRIVER2-arkos-arm64 + path: dist/REDRIVER2_arkos/ + if-no-files-found: error From 40f6e49b4f1b1739e24c222831379076f6ddffa0 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:13:02 +0200 Subject: [PATCH 10/57] Add GitHub Actions workflow for Kaxkemain build This workflow automates the build process for the Kaxkemain project on the ARM64 architecture, generating Makefiles, setting up QEMU, building a Docker container, and running the build inside the container. --- .github/workflows/Kaxkemain.yml | 125 ++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 .github/workflows/Kaxkemain.yml diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml new file mode 100644 index 000000000..d86cf455d --- /dev/null +++ b/.github/workflows/Kaxkemain.yml @@ -0,0 +1,125 @@ +name: kack auf REDRIVER2 for R36S (RK3326) + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + # 1. Repository klonen + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + + # 2. Premake5 auf dem x86_64 Host ausführen & Makefiles generieren (Umgehung des ARM64-Premake-Fehlers) + - name: Generate Makefiles with Premake5 on Host + run: | + echo 'Downloading Premake5 for x86_64 Host...' + curl -L https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz -o /tmp/premake5.tar.gz + tar -xzf /tmp/premake5.tar.gz -C /tmp + chmod +x /tmp/premake5 + + # In das Quellverzeichnis wechseln + cd src_rebuild + + # Architektur-Patch für Premake5 + sed -i 's/\"x86\"/\"ARM64\"/g' premake5.lua + sed -i 's/\"x86_64\"/\"ARM64\"/g' premake5.lua + + # Makefiles auf dem Host generieren + /tmp/premake5 gmake + cd .. + echo 'Makefiles successfully generated on host!' + + # 3. QEMU-Setup für ARM64-Emulation + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: linux/arm64 + + # 4. Docker-Image für ARM64 erstellen + - name: Build ARM64 Docker container image + run: | + cat > Dockerfile <<'EOF' + FROM --platform=linux/arm64 ubuntu:22.04 + + RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + build-essential \ + make \ + gcc-9 \ + g++-9 \ + gfortran-9 \ + libsdl2-dev \ + libopenal-dev \ + libjpeg-dev \ + libgl1-mesa-dev \ + libgles2-mesa-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libxi-dev \ + libglu1-mesa-dev \ + libpulse-dev \ + libdbus-1-dev \ + libibus-1.0-dev \ + pkg-config \ + cpio \ + wget \ + curl \ + && rm -rf /var/lib/apt/lists/* + + WORKDIR /workspace + EOF + + docker build -t redriver2-arm64-builder -f Dockerfile . + + # 5. Kompilierung im ARM64-Container ausführen (nur noch make) + - name: Run build inside container + run: | + docker run --rm \ + --platform linux/arm64 \ + -v "$GITHUB_WORKSPACE:/workspace" \ + -w /workspace \ + redriver2-arm64-builder \ + bash -c " + set -e + + echo '===== Build-Step: Kompilierung für RK3326 (arm64) =====' + + cd src_rebuild + + # Kompilierung mit aggressiven Optimierungen für Cortex-A35 + export CFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' + export CXXFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' + export LDFLAGS='-mcpu=cortex-a35' + + cd project_gmake_linux + make config=release_arm64 -j\$(nproc) || \ + make config=release_dev_arm64 -j\$(nproc) || \ + make -j\$(nproc) + + # Artefakt robust verpacken (sucht die Binärdatei unabhängig vom Unterordner) + echo 'Packaging artifacts...' + cd /workspace + mkdir -p dist/REDRIVER2_arkos + find src_rebuild -type f -name 'REDRIVER2' -exec cp {} dist/REDRIVER2_arkos/ \; + + echo 'SD-Karten-Struktur für ArkOS:' > dist/REDRIVER2_arkos/README.txt + echo 'Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab.' >> dist/REDRIVER2_arkos/README.txt + ls -laR dist + " + + # 6. Artefakt hochladen + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: REDRIVER2-arkos-arm64 + path: dist/REDRIVER2_arkos/ + if-no-files-found: error From 712a2da2844a04960a037f6125aa4fcf34180f44 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:15:03 +0200 Subject: [PATCH 11/57] Delete .github/workflows/Driber2.yml --- .github/workflows/Driber2.yml | 118 ---------------------------------- 1 file changed, 118 deletions(-) delete mode 100644 .github/workflows/Driber2.yml diff --git a/.github/workflows/Driber2.yml b/.github/workflows/Driber2.yml deleted file mode 100644 index 72cd49818..000000000 --- a/.github/workflows/Driber2.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: Bastel REDRIVER2 for R36S (RK3326) - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - arch: [ arm64 ] - steps: - # 1. Repository klonen - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive - - # 2. QEMU-Setup für ARM64-Emulation - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: linux/arm64 - - # 3. Build in ARM64-Container via run-on-arch - - name: Build in ARM64 container - uses: uraimo/run-on-arch-action@v2 - with: - arch: ${{ matrix.arch }} - distro: ubuntu20.04 - githubToken: ${{ github.token }} - install: | - apt-get update - apt-get install -y --no-install-recommends \ - build-essential \ - make \ - gcc-9 \ - g++-9 \ - gfortran-9 \ - libsdl2-dev \ - libopenal-dev \ - libjpeg-dev \ - libgl1-mesa-dev \ - libgles2-mesa-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libxi-dev \ - libglu1-mesa-dev \ - libpulse-dev \ - libdbus-1-dev \ - libibus-1.0-dev \ - pkg-config \ - cpio \ - wget \ - curl - run: | - echo "===== Build-Step: Cross-Compilation für RK3326 (arm64) =====" - - # 4. Premake5 herunterladen und korrekt platzieren - echo "Downloading Premake5..." - wget -q "https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz" -O /tmp/premake5.tar.gz - tar -xzf /tmp/premake5.tar.gz -C /tmp - cp /tmp/premake5 /usr/local/bin/ - chmod +x /usr/local/bin/premake5 - premake5 --version - - # 5. Architektur-Patch (wichtig: von x86 auf ARM64 ändern) - echo "Patching premake5.lua..." - cd /__w/REDRIVER2-arkos/REDRIVER2-arkos/src_rebuild/ - sed -i 's/"x86"/"ARM64"/g' premake5.lua - sed -i 's/"x86_64"/"ARM64"/g' premake5.lua - grep -n "platforms" premake5.lua | head -5 - - # 6. Premake5 Projektdateien generieren - echo "Generating Makefiles..." - premake5 gmake - ls -la project_gmake_linux - - # 7. Kompilierung mit aggressiven Optimierungen für RK3326 - echo "Building REDRIVER2..." - export CFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" - export CXXFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" - export LDFLAGS="-mcpu=cortex-a35" - - cd project_gmake_linux/ - make config=release_arm64 -j$(nproc) || \ - make config=release_dev_arm64 -j$(nproc) || \ - make -j$(nproc) - - # 8. Artefakt vorbereiten und hochladen - echo "Locating built binary..." - ls -laR ../bin/ | grep -E "REDRIVER2|\.so" || true - find .. -name "REDRIVER2" -type f 2>/dev/null || true - - # 9. Artefakt inkl. Build-Info verpacken - echo "Packaging artifacts..." - cd .. - mkdir -p dist/REDRIVER2_arkos - cp bin/Release/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ - cp bin/Release_dev/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ - cp bin/*/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null - echo "SD-Karten-Struktur für ArkOS:" > dist/REDRIVER2_arkos/README.txt - echo "Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab." >> dist/REDRIVER2_arkos/README.txt - echo "Lege die originalen PSX-Dateien (.cue/.bin) in denselben Ordner." >> dist/REDRIVER2_arkos/README.txt - ls -laR dist/ - - # 10. Artefakt als GitHub Release hochladen - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: REDRIVER2-arkos-arm64 - path: dist/REDRIVER2_arkos/ - if-no-files-found: error From 6778e4f2c63933060b3405d707b89d25eea1b1ad Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:15:18 +0200 Subject: [PATCH 12/57] Delete .github/workflows/D2build.yml --- .github/workflows/D2build.yml | 64 ----------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 .github/workflows/D2build.yml diff --git a/.github/workflows/D2build.yml b/.github/workflows/D2build.yml deleted file mode 100644 index 5aa6de7da..000000000 --- a/.github/workflows/D2build.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Baue REDRIVER2 for R36S (RK3326 Optimized) - -on: - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Code auschecken - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Vorgefertigtes Premake5 herunterladen (Umgehung des Bootstrap-Fehlers) - run: | - curl -sL https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o premake5.tar.gz - tar -zxvf premake5.tar.gz - chmod +x premake5 - - - name: ARM64 Kompilierung in QEMU (Cortex-A35 optimiert) - uses: uraimo/run-on-arch-action@v2 - with: - arch: aarch64 - distro: ubuntu20.04 - github-token: ${{ github.token }} - run: | - apt-get update - apt-get install -y g++ gcc make libsdl2-dev libopenal-dev libjpeg-turbo8-dev - - # Premake-Binary in den ARM-Container verschieben - cp /__w/REDRIVER2-arkos/REDRIVER2-arkos/premake5 /usr/local/bin/premake5 - - # In das Source-Verzeichnis wechseln - src_dir=$(find . -maxdepth 2 -name "src_rebuild" -type d) - if [ -z "$src_dir" ]; then - src_dir="src_rebuild" - fi - cd "$src_dir" - - # Architektur im Build-Skript patchen - sed -i 's/"x86_64"/"arm64"/g' premake5.lua - sed -i 's/"x86"/"arm"/g' premake5.lua - - # Makefiles mit Premake generieren - premake5 gmake2 - - # R36S / RK3326 Hardware-Optimierungen + Memory-Sicherheit (strict-aliasing Fix) - export CFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" - export CXXFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" - - # Kompilieren (Fallbacks für unterschiedliche Config-Namen) - cd build - make config=release_arm64 -j$(nproc) || make config=release_dev_arm64 -j$(nproc) || make -j$(nproc) - - # Datei für den Upload vorbereiten (Sicherer Export-Pfad) - mkdir -p /tmp/R36S-Output - find . -type f -name "REDRIVER2" -exec cp {} /tmp/R36S-Output/ \; - - - name: Optimiertes Spiel hochladen - uses: actions/upload-artifact@v4 - with: - name: REDRIVER2-PortMaster-RK3326 - path: /tmp/R36S-Output/REDRIVER2 From 05673de3c5486073740f0459af1b3c6634b51e54 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:15:39 +0200 Subject: [PATCH 13/57] Delete .github/workflows/Fahrer2.yml --- .github/workflows/Fahrer2.yml | 130 ---------------------------------- 1 file changed, 130 deletions(-) delete mode 100644 .github/workflows/Fahrer2.yml diff --git a/.github/workflows/Fahrer2.yml b/.github/workflows/Fahrer2.yml deleted file mode 100644 index 89823b7f9..000000000 --- a/.github/workflows/Fahrer2.yml +++ /dev/null @@ -1,130 +0,0 @@ -name: fahre REDRIVER2 for R36S (RK3326) - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - # 1. Repository klonen - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive - - # 2. QEMU-Setup für ARM64-Emulation - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: linux/arm64 - - # 3. Docker Build & Run (ARM64-Container) - - name: Build in ARM64 Docker container - run: | - # Docker-Image für ARM64 mit allen Abhängigkeiten erstellen - cat > Dockerfile <<'EOF' - FROM --platform=linux/arm64 ubuntu:22.04 - - RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - make \ - gcc-9 \ - g++-9 \ - gfortran-9 \ - libsdl2-dev \ - libopenal-dev \ - libjpeg-dev \ - libgl1-mesa-dev \ - libgles2-mesa-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libxi-dev \ - libglu1-mesa-dev \ - libpulse-dev \ - libdbus-1-dev \ - libibus-1.0-dev \ - pkg-config \ - cpio \ - wget \ - curl \ - && rm -rf /var/lib/apt/lists/* - - WORKDIR /workspace - EOF - - docker build -t redriver2-arm64-builder -f Dockerfile . - - # 4. Build-Ausführung im Container - - name: Run build inside container - run: | - # Repository in den Container mounten und Build durchführen - docker run --rm \ - --platform linux/arm64 \ - -v "$GITHUB_WORKSPACE:/workspace" \ - -w /workspace \ - redriver2-arm64-builder \ - bash -c " - set -e - - echo '===== Build-Step: Cross-Compilation für RK3326 (arm64) =====' - - # Premake5 herunterladen (falls wget fehlschlägt, curl als Fallback) - echo 'Downloading Premake5...' - if ! wget -q 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz' -O /tmp/premake5.tar.gz; then - echo 'wget failed, trying curl...' - curl -L 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz' -o /tmp/premake5.tar.gz - fi - tar -xzf /tmp/premake5.tar.gz -C /tmp - cp /tmp/premake5 /usr/local/bin/ - chmod +x /usr/local/bin/premake5 - premake5 --version - - # Architektur-Patch - echo 'Patching premake5.lua...' - cd /workspace/src_rebuild - sed -i 's/\"x86\"/\"ARM64\"/g' premake5.lua - sed -i 's/\"x86_64\"/\"ARM64\"/g' premake5.lua - grep -n 'platforms' premake5.lua | head -5 - - # Premake5 Makefiles generieren - echo 'Generating Makefiles...' - premake5 gmake - ls -la project_gmake_linux - - # Kompilierung mit aggressiven Optimierungen - echo 'Building REDRIVER2...' - export CFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' - export CXXFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' - export LDFLAGS='-mcpu=cortex-a35' - - cd project_gmake_linux - make config=release_arm64 -j\$(nproc) || \ - make config=release_dev_arm64 -j\$(nproc) || \ - make -j\$(nproc) - - # Artefakt verpacken - echo 'Packaging artifacts...' - cd /workspace - mkdir -p dist/REDRIVER2_arkos - cp bin/Release/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ - cp bin/Release_dev/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ - cp bin/*/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null - echo 'SD-Karten-Struktur für ArkOS:' > dist/REDRIVER2_arkos/README.txt - echo 'Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab.' >> dist/REDRIVER2_arkos/README.txt - echo 'Lege die originalen PSX-Dateien (.cue/.bin) in denselben Ordner.' >> dist/REDRIVER2_arkos/README.txt - ls -laR dist - " - - # 5. Artefakt hochladen - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: REDRIVER2-arkos-arm64 - path: dist/REDRIVER2_arkos/ - if-no-files-found: error From 1ced8e06ca284bb4c5a270a4b688b176bfda75ae Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:16:01 +0200 Subject: [PATCH 14/57] Delete .github/workflows/maind2.yml --- .github/workflows/maind2.yml | 65 ------------------------------------ 1 file changed, 65 deletions(-) delete mode 100644 .github/workflows/maind2.yml diff --git a/.github/workflows/maind2.yml b/.github/workflows/maind2.yml deleted file mode 100644 index 61b0d5f49..000000000 --- a/.github/workflows/maind2.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: compile REDRIVER2 for R36S (RK3326 Optimized) - -on: - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Code auschecken - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Vorgefertigtes Premake5 herunterladen (Umgehung des Bootstrap-Fehlers) - run: | - curl -sL https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o premake5.tar.gz - tar -zxvf premake5.tar.gz - chmod +x premake5 - - - name: ARM64 Kompilierung in QEMU (Cortex-A35 optimiert) - uses: uraimo/run-on-arch-action@v2 - with: - arch: aarch64 - distro: ubuntu20.04 - github-token: ${{ github.token }} - run: | - apt-get update - apt-get install -y g++ gcc make libsdl2-dev libopenal-dev libjpeg-turbo8-dev - - # Premake-Binary in den ARM-Container verschieben - cp /__w/REDRIVER2-arkos/REDRIVER2-arkos/premake5 /usr/local/bin/premake5 - - # In das Source-Verzeichnis wechseln - src_dir=$(find . -maxdepth 2 -name "src_rebuild" -type d) - if [ -z "$src_dir" ]; then - src_dir="src_rebuild" - fi - cd "$src_dir" - - # Architektur im Build-Skript patchen - sed -i 's/"x86_64"/"arm64"/g' premake5.lua - sed -i 's/"x86"/"arm"/g' premake5.lua - - # Makefiles mit Premake generieren - premake5 gmake2 - - # R36S / RK3326 Hardware-Optimierungen + Memory-Sicherheit (strict-aliasing Fix) - export CFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" - export CXXFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" - - # Kompilieren (Fallbacks für unterschiedliche Config-Namen) - cd build - make config=release_arm64 -j$(nproc) || make config=release_dev_arm64 -j$(nproc) || make -j$(nproc) - - # Datei für den Upload vorbereiten - mkdir -p ../../../R36S-Output - find . -type f -name "REDRIVER2" -exec cp {} ../../../R36S-Output/ \; - - - name: Optimiertes Spiel hochladen - uses: upload/artifact@v4 # Beibehalten bzw. standardkonform - uses: actions/upload-artifact@v4 - with: - name: REDRIVER2-PortMaster-RK3326 - path: R36S-Output/REDRIVER2 From eff8fcf45a20fb2f52f129d06b7148f1432f7ada Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:16:17 +0200 Subject: [PATCH 15/57] Delete .github/workflows/main3buikdrr.yml --- .github/workflows/main3buikdrr.yml | 118 ----------------------------- 1 file changed, 118 deletions(-) delete mode 100644 .github/workflows/main3buikdrr.yml diff --git a/.github/workflows/main3buikdrr.yml b/.github/workflows/main3buikdrr.yml deleted file mode 100644 index cde18cb3c..000000000 --- a/.github/workflows/main3buikdrr.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: construct REDRIVER2 for R36S (RK3326) - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - # 1. Repository klonen - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive - - # 2. QEMU-Setup für ARM64-Emulation - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: linux/arm64 - - # 3. Build in ARM64-Container via run-on-arch-action (v3) - - name: Build in ARM64 container - uses: uraimo/run-on-arch-action@v3 - with: - arch: none - distro: none - base_image: '--platform=linux/arm64 ubuntu:22.04' - githubToken: ${{ github.token }} - env: | - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - install: | - apt-get update - apt-get install -y --no-install-recommends \ - build-essential \ - make \ - gcc-9 \ - g++-9 \ - gfortran-9 \ - libsdl2-dev \ - libopenal-dev \ - libjpeg-dev \ - libgl1-mesa-dev \ - libgles2-mesa-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libxi-dev \ - libglu1-mesa-dev \ - libpulse-dev \ - libdbus-1-dev \ - libibus-1.0-dev \ - pkg-config \ - cpio \ - wget \ - curl - run: | - echo "===== Build-Step: Cross-Compilation für RK3326 (arm64) =====" - - # 4. Premake5 herunterladen und korrekt platzieren - echo "Downloading Premake5..." - wget -q "https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz" -O /tmp/premake5.tar.gz - tar -xzf /tmp/premake5.tar.gz -C /tmp - cp /tmp/premake5 /usr/local/bin/ - chmod +x /usr/local/bin/premake5 - premake5 --version - - # 5. Architektur-Patch (wichtig: von x86 auf ARM64 ändern) - echo "Patching premake5.lua..." - cd /__w/REDRIVER2-arkos/REDRIVER2-arkos/src_rebuild/ - sed -i 's/"x86"/"ARM64"/g' premake5.lua - sed -i 's/"x86_64"/"ARM64"/g' premake5.lua - grep -n "platforms" premake5.lua | head -5 - - # 6. Premake5 Projektdateien generieren - echo "Generating Makefiles..." - premake5 gmake - ls -la project_gmake_linux - - # 7. Kompilierung mit aggressiven Optimierungen für RK3326 - echo "Building REDRIVER2..." - export CFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" - export CXXFLAGS="-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing" - export LDFLAGS="-mcpu=cortex-a35" - - cd project_gmake_linux/ - make config=release_arm64 -j$(nproc) || \ - make config=release_dev_arm64 -j$(nproc) || \ - make -j$(nproc) - - # 8. Artefakt vorbereiten und hochladen - echo "Locating built binary..." - ls -laR ../bin/ | grep -E "REDRIVER2|\.so" || true - find .. -name "REDRIVER2" -type f 2>/dev/null || true - - # 9. Artefakt inkl. Build-Info verpacken - echo "Packaging artifacts..." - cd .. - mkdir -p dist/REDRIVER2_arkos - cp bin/Release/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ - cp bin/Release_dev/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ - cp bin/*/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null - echo "SD-Karten-Struktur für ArkOS:" > dist/REDRIVER2_arkos/README.txt - echo "Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab." >> dist/REDRIVER2_arkos/README.txt - echo "Lege die originalen PSX-Dateien (.cue/.bin) in denselben Ordner." >> dist/REDRIVER2_arkos/README.txt - ls -laR dist/ - - # 10. Artefakt als GitHub Release hochladen - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: REDRIVER2-arkos-arm64 - path: dist/REDRIVER2_arkos/ - if-no-files-found: error From bb3c590d7a228684b3bc676487a8884519d8a2f5 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:16:40 +0200 Subject: [PATCH 16/57] Update workflow name and improve echo commands --- .github/workflows/Kaxkemain.yml | 39 +++++++-------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index d86cf455d..df8b77930 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,4 +1,4 @@ -name: kack auf REDRIVER2 for R36S (RK3326) +name: Build final REDRIVER2 for R36S (RK3326) on: push: @@ -11,42 +11,33 @@ jobs: build: runs-on: ubuntu-latest steps: - # 1. Repository klonen - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive - # 2. Premake5 auf dem x86_64 Host ausführen & Makefiles generieren (Umgehung des ARM64-Premake-Fehlers) - name: Generate Makefiles with Premake5 on Host run: | - echo 'Downloading Premake5 for x86_64 Host...' + echo "Downloading Premake5 for x86_64 Host..." curl -L https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz -o /tmp/premake5.tar.gz tar -xzf /tmp/premake5.tar.gz -C /tmp chmod +x /tmp/premake5 - # In das Quellverzeichnis wechseln cd src_rebuild - - # Architektur-Patch für Premake5 - sed -i 's/\"x86\"/\"ARM64\"/g' premake5.lua - sed -i 's/\"x86_64\"/\"ARM64\"/g' premake5.lua - - # Makefiles auf dem Host generieren + sed -i 's/"x86"/"ARM64"/g' premake5.lua + sed -i 's/"x86_64"/"ARM64"/g' premake5.lua /tmp/premake5 gmake cd .. - echo 'Makefiles successfully generated on host!' + echo "Makefiles successfully generated on host!" - # 3. QEMU-Setup für ARM64-Emulation - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: platforms: linux/arm64 - # 4. Docker-Image für ARM64 erstellen - name: Build ARM64 Docker container image run: | - cat > Dockerfile <<'EOF' + cat << 'EOF' > Dockerfile FROM --platform=linux/arm64 ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -80,43 +71,29 @@ jobs: docker build -t redriver2-arm64-builder -f Dockerfile . - # 5. Kompilierung im ARM64-Container ausführen (nur noch make) - name: Run build inside container run: | docker run --rm \ --platform linux/arm64 \ - -v "$GITHUB_WORKSPACE:/workspace" \ + -v "${{ github.workspace }}:/workspace" \ -w /workspace \ redriver2-arm64-builder \ bash -c " set -e - echo '===== Build-Step: Kompilierung für RK3326 (arm64) =====' - cd src_rebuild - - # Kompilierung mit aggressiven Optimierungen für Cortex-A35 export CFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' export CXXFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' export LDFLAGS='-mcpu=cortex-a35' - cd project_gmake_linux - make config=release_arm64 -j\$(nproc) || \ - make config=release_dev_arm64 -j\$(nproc) || \ - make -j\$(nproc) - - # Artefakt robust verpacken (sucht die Binärdatei unabhängig vom Unterordner) - echo 'Packaging artifacts...' + make config=release_arm64 -j$(nproc) || make config=release_dev_arm64 -j$(nproc) || make -j$(nproc) cd /workspace mkdir -p dist/REDRIVER2_arkos find src_rebuild -type f -name 'REDRIVER2' -exec cp {} dist/REDRIVER2_arkos/ \; - echo 'SD-Karten-Struktur für ArkOS:' > dist/REDRIVER2_arkos/README.txt echo 'Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab.' >> dist/REDRIVER2_arkos/README.txt - ls -laR dist " - # 6. Artefakt hochladen - name: Upload Artifact uses: actions/upload-artifact@v4 with: From d53b88c460b6a660541ea96733b3dcca23459e30 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:21:30 +0200 Subject: [PATCH 17/57] Update workflow for second REDRIVER2 build Updated the workflow to build the second REDRIVER2 for R36S (RK3326) and modified the Premake5 version and build configurations. --- .github/workflows/Kaxkemain.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index df8b77930..cff301b5b 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,4 +1,4 @@ -name: Build final REDRIVER2 for R36S (RK3326) +name: Build second REDRIVER2 for R36S (RK3326) on: push: @@ -19,14 +19,17 @@ jobs: - name: Generate Makefiles with Premake5 on Host run: | echo "Downloading Premake5 for x86_64 Host..." - curl -L https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz -o /tmp/premake5.tar.gz + curl -L https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o /tmp/premake5.tar.gz tar -xzf /tmp/premake5.tar.gz -C /tmp chmod +x /tmp/premake5 cd src_rebuild - sed -i 's/"x86"/"ARM64"/g' premake5.lua + # Architektur-Patches in premake5.lua sed -i 's/"x86_64"/"ARM64"/g' premake5.lua - /tmp/premake5 gmake + sed -i 's/"x86"/"ARM"/g' premake5.lua + + # Makefiles im korrekten 'build'-Ordner generieren + /tmp/premake5 gmake2 cd .. echo "Makefiles successfully generated on host!" @@ -82,11 +85,19 @@ jobs: set -e echo '===== Build-Step: Kompilierung für RK3326 (arm64) =====' cd src_rebuild + + # Cortex-A35 Optimierungen und Memory-Sicherheit export CFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' export CXXFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' export LDFLAGS='-mcpu=cortex-a35' - cd project_gmake_linux - make config=release_arm64 -j$(nproc) || make config=release_dev_arm64 -j$(nproc) || make -j$(nproc) + + cd build + # Durchprobieren der Config-Namen, falls Premake sie umbenannt hat + make config=release_arm64 -j$(nproc) || \ + make config=release_dev_arm64 -j$(nproc) || \ + make config=release_dev_x64 -j$(nproc) || \ + make -j$(nproc) + cd /workspace mkdir -p dist/REDRIVER2_arkos find src_rebuild -type f -name 'REDRIVER2' -exec cp {} dist/REDRIVER2_arkos/ \; From 6eba79ae7f55bc7234c641aa1f3bb66befb879d0 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:23:34 +0200 Subject: [PATCH 18/57] Fix Premake5 extraction path and update workflow name Updated the workflow name and fixed the extraction path for Premake5 to avoid permission errors. --- .github/workflows/Kaxkemain.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index cff301b5b..c2d2ff19d 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,4 +1,4 @@ -name: Build second REDRIVER2 for R36S (RK3326) +name: Building 2 REDRIVER2 for R36S (RK3326) on: push: @@ -20,8 +20,11 @@ jobs: run: | echo "Downloading Premake5 for x86_64 Host..." curl -L https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o /tmp/premake5.tar.gz - tar -xzf /tmp/premake5.tar.gz -C /tmp - chmod +x /tmp/premake5 + + # Fix: In einen eigenen Unterordner entpacken, um Berechtigungsfehler auf /tmp zu verhindern + mkdir -p /tmp/premake_bin + tar -xzf /tmp/premake5.tar.gz -C /tmp/premake_bin + chmod +x /tmp/premake_bin/premake5 cd src_rebuild # Architektur-Patches in premake5.lua @@ -29,7 +32,7 @@ jobs: sed -i 's/"x86"/"ARM"/g' premake5.lua # Makefiles im korrekten 'build'-Ordner generieren - /tmp/premake5 gmake2 + /tmp/premake_bin/premake5 gmake2 cd .. echo "Makefiles successfully generated on host!" From b6fef9892400905b16a35572f3c2e9647ce607d4 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:29:59 +0200 Subject: [PATCH 19/57] Rename workflow and enhance comments in Kaxkemain.yml Updated workflow name and improved comments for clarity. --- .github/workflows/Kaxkemain.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index c2d2ff19d..a8495dfff 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,4 +1,4 @@ -name: Building 2 REDRIVER2 for R36S (RK3326) +name: mach REDRIVER2 for R36S (RK3326) on: push: @@ -21,17 +21,14 @@ jobs: echo "Downloading Premake5 for x86_64 Host..." curl -L https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o /tmp/premake5.tar.gz - # Fix: In einen eigenen Unterordner entpacken, um Berechtigungsfehler auf /tmp zu verhindern mkdir -p /tmp/premake_bin tar -xzf /tmp/premake5.tar.gz -C /tmp/premake_bin chmod +x /tmp/premake_bin/premake5 cd src_rebuild - # Architektur-Patches in premake5.lua sed -i 's/"x86_64"/"ARM64"/g' premake5.lua sed -i 's/"x86"/"ARM"/g' premake5.lua - # Makefiles im korrekten 'build'-Ordner generieren /tmp/premake_bin/premake5 gmake2 cd .. echo "Makefiles successfully generated on host!" @@ -87,6 +84,12 @@ jobs: bash -c " set -e echo '===== Build-Step: Kompilierung für RK3326 (arm64) =====' + + # FIX: 64-bit Static Assertions für PsyCross entfernen, da Zeiger auf arm64 8 Bytes groß sind + echo 'Patching PsyCross 64-bit assertions...' + sed -i '/DR_PSYX_TEX/d' ../PsyCross/include/psx/libgpu.h + sed -i '/DR_ENV/d' ../PsyCross/include/psx/libgpu.h + cd src_rebuild # Cortex-A35 Optimierungen und Memory-Sicherheit @@ -95,7 +98,6 @@ jobs: export LDFLAGS='-mcpu=cortex-a35' cd build - # Durchprobieren der Config-Namen, falls Premake sie umbenannt hat make config=release_arm64 -j$(nproc) || \ make config=release_dev_arm64 -j$(nproc) || \ make config=release_dev_x64 -j$(nproc) || \ From c772b4dc76b02a17f15200086f51449dfd5cabc3 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 19:35:43 +0200 Subject: [PATCH 20/57] Rename workflow and correct file paths Updated workflow name and fixed paths for PsyCross patching. --- .github/workflows/Kaxkemain.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index a8495dfff..fa32454e8 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,4 +1,4 @@ -name: mach REDRIVER2 for R36S (RK3326) +name: kein Plan REDRIVER2 for R36S (RK3326) on: push: @@ -85,10 +85,10 @@ jobs: set -e echo '===== Build-Step: Kompilierung für RK3326 (arm64) =====' - # FIX: 64-bit Static Assertions für PsyCross entfernen, da Zeiger auf arm64 8 Bytes groß sind + # FIX: Korrekter Pfad zum Submodule im Workspace echo 'Patching PsyCross 64-bit assertions...' - sed -i '/DR_PSYX_TEX/d' ../PsyCross/include/psx/libgpu.h - sed -i '/DR_ENV/d' ../PsyCross/include/psx/libgpu.h + sed -i '/DR_PSYX_TEX/d' src_rebuild/PsyCross/include/psx/libgpu.h + sed -i '/DR_ENV/d' src_rebuild/PsyCross/include/psx/libgpu.h cd src_rebuild From 8c559484fd5da0d798e4d16881c23614d443c08d Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 20:22:35 +0200 Subject: [PATCH 21/57] Rename workflow and improve PsyCross patching Updated workflow name and modified the patching process for PsyCross assertions. --- .github/workflows/Kaxkemain.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index fa32454e8..34ee2f8f7 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,4 +1,4 @@ -name: kein Plan REDRIVER2 for R36S (RK3326) +name: wixx REDRIVER2 for R36S (RK3326) on: push: @@ -85,10 +85,9 @@ jobs: set -e echo '===== Build-Step: Kompilierung für RK3326 (arm64) =====' - # FIX: Korrekter Pfad zum Submodule im Workspace - echo 'Patching PsyCross 64-bit assertions...' - sed -i '/DR_PSYX_TEX/d' src_rebuild/PsyCross/include/psx/libgpu.h - sed -i '/DR_ENV/d' src_rebuild/PsyCross/include/psx/libgpu.h + # FIX: Nur die static_assert-Zeilen auskommentieren, damit die Strukturen erhalten bleiben + echo 'Patching PsyCross 64-bit assertions safely...' + sed -i 's/static_assert/\/\/ static_assert/g' src_rebuild/PsyCross/include/psx/libgpu.h cd src_rebuild From 62f7aab2d8c884d0da1470a32f8a1b716b46028d Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 20:31:47 +0200 Subject: [PATCH 22/57] Rename workflow from wixx to Bixxd REDRIVER2 --- .github/workflows/Kaxkemain.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 34ee2f8f7..2eb190eaf 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,4 +1,4 @@ -name: wixx REDRIVER2 for R36S (RK3326) +name: Bixxd REDRIVER2 for R36S (RK3326) on: push: @@ -85,10 +85,16 @@ jobs: set -e echo '===== Build-Step: Kompilierung für RK3326 (arm64) =====' - # FIX: Nur die static_assert-Zeilen auskommentieren, damit die Strukturen erhalten bleiben + # FIX 1: PsyCross static_assert auskommentieren echo 'Patching PsyCross 64-bit assertions safely...' sed -i 's/static_assert/\/\/ static_assert/g' src_rebuild/PsyCross/include/psx/libgpu.h + # FIX 2: x86 'int3' Assembler-Befehle durch __builtin_trap() ersetzen (ARM64-kompatibel) + echo 'Replacing x86 int3 breakpoints with cross-platform traps...' + find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/__asm__(\"int3\")/__builtin_trap()/g' {} + + find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/asm(\"int3\")/__builtin_trap()/g' {} + + find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/\bint3\b/__builtin_trap()/g' {} + + cd src_rebuild # Cortex-A35 Optimierungen und Memory-Sicherheit From 940aa8299f8ce6763b3adaf9b7f7c9687ad4c208 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sat, 22 Aug 2026 20:57:48 +0200 Subject: [PATCH 23/57] Rename workflow and enhance binary file handling Updated workflow name and improved binary search logic. --- .github/workflows/Kaxkemain.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 2eb190eaf..e9b9bc5e2 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,4 +1,4 @@ -name: Bixxd REDRIVER2 for R36S (RK3326) +name: krawild REDRIVER2 for R36S (RK3326) on: push: @@ -89,7 +89,7 @@ jobs: echo 'Patching PsyCross 64-bit assertions safely...' sed -i 's/static_assert/\/\/ static_assert/g' src_rebuild/PsyCross/include/psx/libgpu.h - # FIX 2: x86 'int3' Assembler-Befehle durch __builtin_trap() ersetzen (ARM64-kompatibel) + # FIX 2: x86 'int3' Assembler-Befehle durch __builtin_trap() ersetzen echo 'Replacing x86 int3 breakpoints with cross-platform traps...' find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/__asm__(\"int3\")/__builtin_trap()/g' {} + find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/asm(\"int3\")/__builtin_trap()/g' {} + @@ -110,9 +110,19 @@ jobs: cd /workspace mkdir -p dist/REDRIVER2_arkos - find src_rebuild -type f -name 'REDRIVER2' -exec cp {} dist/REDRIVER2_arkos/ \; + + # FIX 3: Case-insensitive Suche nach der Binärdatei, da Linux kleinschreibt ('redriver2') + echo 'Locating and copying built binaries...' + find src_rebuild -iname '*redriver2*' -type f -executable -exec cp {} dist/REDRIVER2_arkos/ \; + + # Falls die Datei im bin-Verzeichnis liegt, sicherheitshalber auch dort suchen + find src_rebuild/bin -type f -executable -exec cp {} dist/REDRIVER2_arkos/ \; || true + echo 'SD-Karten-Struktur für ArkOS:' > dist/REDRIVER2_arkos/README.txt echo 'Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab.' >> dist/REDRIVER2_arkos/README.txt + + echo 'Inhalt des Ausgabeordners:' + ls -la dist/REDRIVER2_arkos/ " - name: Upload Artifact From daf025f7ba11d3e004203831dfdeb15d4e6c9c15 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 00:36:11 +0200 Subject: [PATCH 24/57] Change build environment to Ubuntu 20.04 Updated the workflow to use Ubuntu 20.04 for building the Docker image and adjusted the Dockerfile accordingly. --- .github/workflows/Kaxkemain.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index e9b9bc5e2..9cca7de5c 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Checkout repository uses: actions/checkout@v4 @@ -41,7 +41,11 @@ jobs: - name: Build ARM64 Docker container image run: | cat << 'EOF' > Dockerfile - FROM --platform=linux/arm64 ubuntu:22.04 + # FIX: Ubuntu 20.04 erzwingt GLIBC 2.31 - perfekt für ArkOS / M9 Pro! + FROM --platform=linux/arm64 ubuntu:20.04 + + # Verhindert, dass der Installer bei der Zeitzonen-Abfrage hängen bleibt + ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ @@ -111,11 +115,10 @@ jobs: cd /workspace mkdir -p dist/REDRIVER2_arkos - # FIX 3: Case-insensitive Suche nach der Binärdatei, da Linux kleinschreibt ('redriver2') + # FIX 3: Case-insensitive Suche nach der Binärdatei echo 'Locating and copying built binaries...' find src_rebuild -iname '*redriver2*' -type f -executable -exec cp {} dist/REDRIVER2_arkos/ \; - # Falls die Datei im bin-Verzeichnis liegt, sicherheitshalber auch dort suchen find src_rebuild/bin -type f -executable -exec cp {} dist/REDRIVER2_arkos/ \; || true echo 'SD-Karten-Struktur für ArkOS:' > dist/REDRIVER2_arkos/README.txt From a78d046d4b51970004849d91cc83a0d75a771144 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 01:47:58 +0200 Subject: [PATCH 25/57] Update GitHub Actions workflow for stability and version Updated the workflow to use the latest Ubuntu version and adjusted make command for stability. --- .github/workflows/Kaxkemain.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 9cca7de5c..43f1c0ae1 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest # <--- FIX: Aktualisiert, um Hängen in der Warteschlange zu verhindern steps: - name: Checkout repository uses: actions/checkout@v4 @@ -107,10 +107,12 @@ jobs: export LDFLAGS='-mcpu=cortex-a35' cd build - make config=release_arm64 -j$(nproc) || \ - make config=release_dev_arm64 -j$(nproc) || \ - make config=release_dev_x64 -j$(nproc) || \ - make -j$(nproc) + + # FIX: -j2 statt -j\$(nproc) für Stabilität unter QEMU/Docker + make config=release_arm64 -j2 || \ + make config=release_dev_arm64 -j2 || \ + make config=release_dev_x64 -j2 || \ + make -j2 cd /workspace mkdir -p dist/REDRIVER2_arkos From d4666dc9f5f19b7c54b59e35e2ecaf988318c6ff Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 16:46:59 +0200 Subject: [PATCH 26/57] Adjust GitHub Actions for ARM32 Docker build Updated GitHub Actions workflow for ARM architecture support, changing from ARM64 to ARM32, and modified Docker build steps accordingly. --- .github/workflows/Kaxkemain.yml | 68 ++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 43f1c0ae1..6795a37a5 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: ubuntu-latest # <--- FIX: Aktualisiert, um Hängen in der Warteschlange zu verhindern + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 @@ -26,7 +26,7 @@ jobs: chmod +x /tmp/premake_bin/premake5 cd src_rebuild - sed -i 's/"x86_64"/"ARM64"/g' premake5.lua + # 32-Bit ARM Target für Premake konfigurieren sed -i 's/"x86"/"ARM"/g' premake5.lua /tmp/premake_bin/premake5 gmake2 @@ -36,15 +36,14 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: - platforms: linux/arm64 + platforms: linux/arm/v7 - - name: Build ARM64 Docker container image + - name: Build ARM32 (armhf) Docker container image run: | cat << 'EOF' > Dockerfile - # FIX: Ubuntu 20.04 erzwingt GLIBC 2.31 - perfekt für ArkOS / M9 Pro! - FROM --platform=linux/arm64 ubuntu:20.04 + # Ubuntu 20.04 32-Bit (armhf) für GLIBC 2.31 und Stabilität unter ArkOS + FROM --platform=linux/arm/v7 ubuntu:20.04 - # Verhindert, dass der Installer bei der Zeitzonen-Abfrage hängen bleibt ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -53,7 +52,6 @@ jobs: make \ gcc-9 \ g++-9 \ - gfortran-9 \ libsdl2-dev \ libopenal-dev \ libjpeg-dev \ @@ -76,24 +74,20 @@ jobs: WORKDIR /workspace EOF - docker build -t redriver2-arm64-builder -f Dockerfile . + docker build -t redriver2-armhf-builder -f Dockerfile . - name: Run build inside container run: | docker run --rm \ - --platform linux/arm64 \ + --platform linux/arm/v7 \ -v "${{ github.workspace }}:/workspace" \ -w /workspace \ - redriver2-arm64-builder \ + redriver2-armhf-builder \ bash -c " set -e - echo '===== Build-Step: Kompilierung für RK3326 (arm64) =====' + echo '===== Build-Step: Kompilierung für RK3326 (armhf 32-Bit) =====' - # FIX 1: PsyCross static_assert auskommentieren - echo 'Patching PsyCross 64-bit assertions safely...' - sed -i 's/static_assert/\/\/ static_assert/g' src_rebuild/PsyCross/include/psx/libgpu.h - - # FIX 2: x86 'int3' Assembler-Befehle durch __builtin_trap() ersetzen + # x86 'int3' Assembler-Befehle durch __builtin_trap() ersetzen echo 'Replacing x86 int3 breakpoints with cross-platform traps...' find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/__asm__(\"int3\")/__builtin_trap()/g' {} + find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/asm(\"int3\")/__builtin_trap()/g' {} + @@ -101,38 +95,50 @@ jobs: cd src_rebuild - # Cortex-A35 Optimierungen und Memory-Sicherheit - export CFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' - export CXXFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' - export LDFLAGS='-mcpu=cortex-a35' + # Cortex-A35 32-Bit Optimierungen (NEON-Support & Hard-Float) + export CFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing' + export CXXFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing' + export LDFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard' cd build - # FIX: -j2 statt -j\$(nproc) für Stabilität unter QEMU/Docker - make config=release_arm64 -j2 || \ - make config=release_dev_arm64 -j2 || \ - make config=release_dev_x64 -j2 || \ + make config=release_arm -j2 || \ + make config=release_dev_arm -j2 || \ make -j2 cd /workspace + + # Erstelle Ausgabeordner mkdir -p dist/REDRIVER2_arkos - # FIX 3: Case-insensitive Suche nach der Binärdatei - echo 'Locating and copying built binaries...' + echo 'Kopiere kompilierte Binärdatei...' find src_rebuild -iname '*redriver2*' -type f -executable -exec cp {} dist/REDRIVER2_arkos/ \; - find src_rebuild/bin -type f -executable -exec cp {} dist/REDRIVER2_arkos/ \; || true + echo 'Kopiere Spieldaten (DRIVER2-Ordner)...' + if [ -d "DRIVER2" ]; then + cp -r DRIVER2 dist/REDRIVER2_arkos/ + elif [ -d "driver2" ]; then + cp -r driver2 dist/REDRIVER2_arkos/ + fi + + echo 'Kopiere Konfigurationsdateien und zusätzliche Assets...' + cp -f config.ini dist/REDRIVER2_arkos/ 2>/dev/null || true + cp -f *.ini dist/REDRIVER2_arkos/ 2>/dev/null || true + cp -rf data dist/REDRIVER2_arkos/ 2>/dev/null || true + cp -rf mod_assets/* dist/REDRIVER2_arkos/ 2>/dev/null || true + + echo 'Erstelle Installationsanleitung...' echo 'SD-Karten-Struktur für ArkOS:' > dist/REDRIVER2_arkos/README.txt - echo 'Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab.' >> dist/REDRIVER2_arkos/README.txt + echo 'Kopiere den Inhalt dieses Ordners vollständig nach /roms/ports/redriver2/' >> dist/REDRIVER2_arkos/README.txt - echo 'Inhalt des Ausgabeordners:' + echo 'Inhalt des fertigen Release-Ordners:' ls -la dist/REDRIVER2_arkos/ " - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: REDRIVER2-arkos-arm64 + name: REDRIVER2-arkos-armhf path: dist/REDRIVER2_arkos/ if-no-files-found: error From ee0aa15e833315cf10fe3002e5e75d521a59f9f7 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 17:27:02 +0200 Subject: [PATCH 27/57] Refactor GitHub Actions workflow for ARM build Updated the workflow to improve clarity in steps and commands, including renaming tasks and modifying the Dockerfile setup. --- .github/workflows/Kaxkemain.yml | 85 ++++++++------------------------- 1 file changed, 21 insertions(+), 64 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 6795a37a5..9d4ebd7d2 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -18,59 +18,32 @@ jobs: - name: Generate Makefiles with Premake5 on Host run: | - echo "Downloading Premake5 for x86_64 Host..." curl -L https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o /tmp/premake5.tar.gz - mkdir -p /tmp/premake_bin tar -xzf /tmp/premake5.tar.gz -C /tmp/premake_bin chmod +x /tmp/premake_bin/premake5 cd src_rebuild - # 32-Bit ARM Target für Premake konfigurieren sed -i 's/"x86"/"ARM"/g' premake5.lua - /tmp/premake_bin/premake5 gmake2 cd .. - echo "Makefiles successfully generated on host!" - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: platforms: linux/arm/v7 - - name: Build ARM32 (armhf) Docker container image + - name: Build ARM32 (armhf) Container Image run: | cat << 'EOF' > Dockerfile - # Ubuntu 20.04 32-Bit (armhf) für GLIBC 2.31 und Stabilität unter ArkOS FROM --platform=linux/arm/v7 ubuntu:20.04 - ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - build-essential \ - make \ - gcc-9 \ - g++-9 \ - libsdl2-dev \ - libopenal-dev \ - libjpeg-dev \ - libgl1-mesa-dev \ - libgles2-mesa-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libxi-dev \ - libglu1-mesa-dev \ - libpulse-dev \ - libdbus-1-dev \ - libibus-1.0-dev \ - pkg-config \ - cpio \ - wget \ - curl \ + ca-certificates build-essential make gcc-9 g++-9 cmake git \ + libsdl2-dev libopenal-dev libjpeg-dev libgl1-mesa-dev libgles2-mesa-dev \ + libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev pkg-config cpio wget curl \ && rm -rf /var/lib/apt/lists/* - WORKDIR /workspace EOF @@ -85,54 +58,38 @@ jobs: redriver2-armhf-builder \ bash -c " set -e - echo '===== Build-Step: Kompilierung für RK3326 (armhf 32-Bit) =====' - # x86 'int3' Assembler-Befehle durch __builtin_trap() ersetzen - echo 'Replacing x86 int3 breakpoints with cross-platform traps...' + echo '===== 1. Kompiliere GL4ES Übersetzer-Bibliothek =====' + git clone --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es_build + cd /tmp/gl4es_build + mkdir build && cd build + cmake .. -DSTATICLIB=OFF -DNOX11=ON -DDEFAULT_ES=2 + make -j2 + + cd /workspace + mkdir -p dist/REDRIVER2_arkos + cp /tmp/gl4es_build/lib/libgl4es.so dist/REDRIVER2_arkos/ + + echo '===== 2. Kompiliere REDRIVER2 =====' find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/__asm__(\"int3\")/__builtin_trap()/g' {} + find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/asm(\"int3\")/__builtin_trap()/g' {} + - find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/\bint3\b/__builtin_trap()/g' {} + - - cd src_rebuild - # Cortex-A35 32-Bit Optimierungen (NEON-Support & Hard-Float) + cd src_rebuild export CFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing' export CXXFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing' export LDFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard' cd build - - make config=release_arm -j2 || \ - make config=release_dev_arm -j2 || \ - make -j2 + make config=release_arm -j2 || make -j2 cd /workspace - - # Erstelle Ausgabeordner - mkdir -p dist/REDRIVER2_arkos - - echo 'Kopiere kompilierte Binärdatei...' + echo '===== 3. Paketiere Artefakt =====' find src_rebuild -iname '*redriver2*' -type f -executable -exec cp {} dist/REDRIVER2_arkos/ \; - find src_rebuild/bin -type f -executable -exec cp {} dist/REDRIVER2_arkos/ \; || true - echo 'Kopiere Spieldaten (DRIVER2-Ordner)...' - if [ -d "DRIVER2" ]; then - cp -r DRIVER2 dist/REDRIVER2_arkos/ - elif [ -d "driver2" ]; then - cp -r driver2 dist/REDRIVER2_arkos/ - fi - - echo 'Kopiere Konfigurationsdateien und zusätzliche Assets...' + if [ -d "DRIVER2" ]; then cp -r DRIVER2 dist/REDRIVER2_arkos/; fi + if [ -d "driver2" ]; then cp -r driver2 dist/REDRIVER2_arkos/; fi cp -f config.ini dist/REDRIVER2_arkos/ 2>/dev/null || true - cp -f *.ini dist/REDRIVER2_arkos/ 2>/dev/null || true - cp -rf data dist/REDRIVER2_arkos/ 2>/dev/null || true - cp -rf mod_assets/* dist/REDRIVER2_arkos/ 2>/dev/null || true - - echo 'Erstelle Installationsanleitung...' - echo 'SD-Karten-Struktur für ArkOS:' > dist/REDRIVER2_arkos/README.txt - echo 'Kopiere den Inhalt dieses Ordners vollständig nach /roms/ports/redriver2/' >> dist/REDRIVER2_arkos/README.txt - echo 'Inhalt des fertigen Release-Ordners:' ls -la dist/REDRIVER2_arkos/ " From f31483d8ecb8b2c74f425180066d632637a1c97f Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 17:33:46 +0200 Subject: [PATCH 28/57] Update GL4ES version in Kaxkemain.yml workflow --- .github/workflows/Kaxkemain.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 9d4ebd7d2..ecbc4166b 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -59,8 +59,8 @@ jobs: bash -c " set -e - echo '===== 1. Kompiliere GL4ES Übersetzer-Bibliothek =====' - git clone --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es_build + echo '===== 1. Kompiliere GL4ES v1.1.4 (Stabiler Handheld-Release) =====' + git clone --branch v1.1.4 --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es_build cd /tmp/gl4es_build mkdir build && cd build cmake .. -DSTATICLIB=OFF -DNOX11=ON -DDEFAULT_ES=2 From 35c1233b53fc78d7fc9750d4fa6f4a4a0c03645c Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 17:40:27 +0200 Subject: [PATCH 29/57] Fix build process and update GL4ES compilation steps --- .github/workflows/Kaxkemain.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index ecbc4166b..3e16327a4 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -40,7 +40,7 @@ jobs: ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates build-essential make gcc-9 g++-9 cmake git \ + ca-certificates build-essential cmake git gcc g++ \ libsdl2-dev libopenal-dev libjpeg-dev libgl1-mesa-dev libgles2-mesa-dev \ libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev pkg-config cpio wget curl \ && rm -rf /var/lib/apt/lists/* @@ -59,11 +59,22 @@ jobs: bash -c " set -e - echo '===== 1. Kompiliere GL4ES v1.1.4 (Stabiler Handheld-Release) =====' + echo '===== 1. Kompiliere GL4ES (mit Fix für QEMU/CMake) =====' git clone --branch v1.1.4 --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es_build cd /tmp/gl4es_build mkdir build && cd build - cmake .. -DSTATICLIB=OFF -DNOX11=ON -DDEFAULT_ES=2 + + export CC=gcc + export CXX=g++ + + cmake .. \ + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY \ + -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_CXX_COMPILER=g++ \ + -DSTATICLIB=OFF \ + -DNOX11=ON \ + -DDEFAULT_ES=2 + make -j2 cd /workspace From ccae1976b40c98a5579ae21670fdf22f1e0ead74 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 17:48:52 +0200 Subject: [PATCH 30/57] Rename workflow and update build steps --- .github/workflows/Kaxkemain.yml | 137 ++++++++++++++++---------------- 1 file changed, 67 insertions(+), 70 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 3e16327a4..134bf7eb7 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,10 +1,8 @@ -name: krawild REDRIVER2 for R36S (RK3326) +name: REDRIVER2 PortMaster Build (RK3326) on: push: branches: [ main ] - pull_request: - branches: [ main ] workflow_dispatch: jobs: @@ -16,97 +14,96 @@ jobs: with: submodules: recursive - - name: Generate Makefiles with Premake5 on Host + - name: Generate Makefiles with Premake5 run: | curl -L https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o /tmp/premake5.tar.gz mkdir -p /tmp/premake_bin tar -xzf /tmp/premake5.tar.gz -C /tmp/premake_bin chmod +x /tmp/premake_bin/premake5 - cd src_rebuild sed -i 's/"x86"/"ARM"/g' premake5.lua /tmp/premake_bin/premake5 gmake2 - cd .. + + - name: Cross-Compile GL4ES on Host (Bypass QEMU CMake Bug) + run: | + echo "===== Kompiliere GL4ES nativ auf dem Host =====" + sudo apt-get update + sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake git + + git clone --branch v1.1.4 --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es + mkdir -p /tmp/gl4es/build && cd /tmp/gl4es/build + + # Cross-Compilation Flags für 32-Bit ARM + cmake .. \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_SYSTEM_PROCESSOR=arm \ + -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc \ + -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \ + -DSTATICLIB=OFF \ + -DNOX11=ON \ + -DDEFAULT_ES=2 + + make -j$(nproc) + + # Zwischenspeichern für den Container-Build + mkdir -p ${{ github.workspace }}/prebuilt_libs + cp lib/libgl4es.so ${{ github.workspace }}/prebuilt_libs/ - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: platforms: linux/arm/v7 - - name: Build ARM32 (armhf) Container Image + - name: Build ARM32 Environment run: | cat << 'EOF' > Dockerfile FROM --platform=linux/arm/v7 ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive - RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates build-essential cmake git gcc g++ \ - libsdl2-dev libopenal-dev libjpeg-dev libgl1-mesa-dev libgles2-mesa-dev \ - libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev pkg-config cpio wget curl \ + build-essential gcc g++ libsdl2-dev libopenal-dev \ + libjpeg-dev libgl1-mesa-dev libgles2-mesa-dev pkg-config \ && rm -rf /var/lib/apt/lists/* WORKDIR /workspace EOF + docker build -t redriver2-armhf -f Dockerfile . - docker build -t redriver2-armhf-builder -f Dockerfile . - - - name: Run build inside container + - name: Compile Game and Package Artifact run: | - docker run --rm \ - --platform linux/arm/v7 \ - -v "${{ github.workspace }}:/workspace" \ - -w /workspace \ - redriver2-armhf-builder \ - bash -c " - set -e - - echo '===== 1. Kompiliere GL4ES (mit Fix für QEMU/CMake) =====' - git clone --branch v1.1.4 --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es_build - cd /tmp/gl4es_build - mkdir build && cd build - - export CC=gcc - export CXX=g++ - - cmake .. \ - -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY \ - -DCMAKE_C_COMPILER=gcc \ - -DCMAKE_CXX_COMPILER=g++ \ - -DSTATICLIB=OFF \ - -DNOX11=ON \ - -DDEFAULT_ES=2 - - make -j2 - - cd /workspace - mkdir -p dist/REDRIVER2_arkos - cp /tmp/gl4es_build/lib/libgl4es.so dist/REDRIVER2_arkos/ - - echo '===== 2. Kompiliere REDRIVER2 =====' - find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/__asm__(\"int3\")/__builtin_trap()/g' {} + - find . -type f \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.hpp' \) -exec sed -i 's/asm(\"int3\")/__builtin_trap()/g' {} + - - cd src_rebuild - export CFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing' - export CXXFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing' - export LDFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard' - - cd build - make config=release_arm -j2 || make -j2 - - cd /workspace - echo '===== 3. Paketiere Artefakt =====' - find src_rebuild -iname '*redriver2*' -type f -executable -exec cp {} dist/REDRIVER2_arkos/ \; - - if [ -d "DRIVER2" ]; then cp -r DRIVER2 dist/REDRIVER2_arkos/; fi - if [ -d "driver2" ]; then cp -r driver2 dist/REDRIVER2_arkos/; fi - cp -f config.ini dist/REDRIVER2_arkos/ 2>/dev/null || true - - ls -la dist/REDRIVER2_arkos/ - " + docker run --rm --platform linux/arm/v7 -v "${{ github.workspace }}:/workspace" -w /workspace redriver2-armhf bash -c " + set -e + + echo '===== Kompiliere REDRIVER2 im Container =====' + find . -type f -exec sed -i 's/__asm__(\"int3\")/__builtin_trap()/g' {} + + find . -type f -exec sed -i 's/asm(\"int3\")/__builtin_trap()/g' {} + + + cd src_rebuild + export CFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing' + export CXXFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing' + + cd build + make config=release_arm -j2 || make -j2 + + cd /workspace + mkdir -p dist/redriver2 + + echo '===== Paketiere Dateien =====' + # 1. Spiel-Binary + find src_rebuild -iname '*redriver2*' -type f -executable -exec cp {} dist/redriver2/redriver2 \; + + # 2. GL4ES vom Host-Build übernehmen + cp prebuilt_libs/libgl4es.so dist/redriver2/ + + # 3. Spieldaten und Config + if [ -d 'DRIVER2' ]; then cp -r DRIVER2 dist/redriver2/; fi + if [ -d 'driver2' ]; then cp -r driver2 dist/redriver2/; fi + cp -f config.ini dist/redriver2/ 2>/dev/null || true + + echo 'Fertiger Inhalt des Release-Ordners:' + ls -la dist/redriver2/ + " - - name: Upload Artifact + - name: Upload PortMaster Artifact uses: actions/upload-artifact@v4 with: - name: REDRIVER2-arkos-armhf - path: dist/REDRIVER2_arkos/ - if-no-files-found: error + name: REDRIVER2-PortMaster + path: dist/redriver2/ From 8a080d392e71d18458d31cc77310be87dcd62fcb Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 17:55:03 +0200 Subject: [PATCH 31/57] Fix cross-compilation setup in Kaxkemain.yml Updated installation commands for cross-compilation, adding necessary dependencies for ARM architecture. --- .github/workflows/Kaxkemain.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 134bf7eb7..e7346f690 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -27,13 +27,17 @@ jobs: - name: Cross-Compile GL4ES on Host (Bypass QEMU CMake Bug) run: | echo "===== Kompiliere GL4ES nativ auf dem Host =====" + + # Fix: armhf Architektur für saubere Header-Auflösung hinzufügen + sudo dpkg --add-architecture armhf sudo apt-get update - sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake git + + # Fix: libx11-dev:armhf hinzugefügt, damit EGL seine Datentypen findet + sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake git libx11-dev:armhf git clone --branch v1.1.4 --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es mkdir -p /tmp/gl4es/build && cd /tmp/gl4es/build - # Cross-Compilation Flags für 32-Bit ARM cmake .. \ -DCMAKE_SYSTEM_NAME=Linux \ -DCMAKE_SYSTEM_PROCESSOR=arm \ @@ -45,7 +49,6 @@ jobs: make -j$(nproc) - # Zwischenspeichern für den Container-Build mkdir -p ${{ github.workspace }}/prebuilt_libs cp lib/libgl4es.so ${{ github.workspace }}/prebuilt_libs/ @@ -87,13 +90,10 @@ jobs: mkdir -p dist/redriver2 echo '===== Paketiere Dateien =====' - # 1. Spiel-Binary find src_rebuild -iname '*redriver2*' -type f -executable -exec cp {} dist/redriver2/redriver2 \; - # 2. GL4ES vom Host-Build übernehmen cp prebuilt_libs/libgl4es.so dist/redriver2/ - # 3. Spieldaten und Config if [ -d 'DRIVER2' ]; then cp -r DRIVER2 dist/redriver2/; fi if [ -d 'driver2' ]; then cp -r driver2 dist/redriver2/; fi cp -f config.ini dist/redriver2/ 2>/dev/null || true From 8509a923920d2e4cacba42b841adcd7506bcc48d Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 17:57:32 +0200 Subject: [PATCH 32/57] Update GitHub Actions workflow for Ubuntu 22.04 --- .github/workflows/Kaxkemain.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index e7346f690..9dc97ed1c 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -7,7 +7,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@v4 @@ -24,15 +24,12 @@ jobs: sed -i 's/"x86"/"ARM"/g' premake5.lua /tmp/premake_bin/premake5 gmake2 - - name: Cross-Compile GL4ES on Host (Bypass QEMU CMake Bug) + - name: Cross-Compile GL4ES on Host (Ubuntu 22.04 Jammy Basis) run: | - echo "===== Kompiliere GL4ES nativ auf dem Host =====" + echo "===== Kompiliere GL4ES nativ auf Ubuntu 22.04 Host =====" - # Fix: armhf Architektur für saubere Header-Auflösung hinzufügen sudo dpkg --add-architecture armhf sudo apt-get update - - # Fix: libx11-dev:armhf hinzugefügt, damit EGL seine Datentypen findet sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake git libx11-dev:armhf git clone --branch v1.1.4 --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es From 370e99e5cec758199140cbf1d2a47225460962a9 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 18:00:06 +0200 Subject: [PATCH 33/57] Refactor GL4ES cross-compilation workflow Updated the workflow to use Ubuntu Ports for ARMhf architecture and modified the echo statements for clarity. --- .github/workflows/Kaxkemain.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 9dc97ed1c..5a2f57573 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -24,11 +24,25 @@ jobs: sed -i 's/"x86"/"ARM"/g' premake5.lua /tmp/premake_bin/premake5 gmake2 - - name: Cross-Compile GL4ES on Host (Ubuntu 22.04 Jammy Basis) + - name: Cross-Compile GL4ES on Host (Using Ubuntu Ports) run: | - echo "===== Kompiliere GL4ES nativ auf Ubuntu 22.04 Host =====" + echo "===== Konfiguriere ARMhf Quellen via Ubuntu Ports =====" + # 1. ARMhf Architektur hinzufügen sudo dpkg --add-architecture armhf + + # 2. Auf Ubuntu-Ports umleiten, damit armhf-Pakete gefunden werden + sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak + sudo bash -c 'cat > /etc/apt/sources.list << EOF + deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse + deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse + deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse + + deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe multiverse + deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe multiverse + deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse + EOF' + sudo apt-get update sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake git libx11-dev:armhf From 98b15a2853242408c272415dda3d41c2749be2f4 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 18:06:19 +0200 Subject: [PATCH 34/57] Refactor Kaxkemain.yml for clarity and updates Removed unnecessary comments and updated file copy command for prebuilt libraries. --- .github/workflows/Kaxkemain.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 5a2f57573..ffeca3a5a 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -28,10 +28,7 @@ jobs: run: | echo "===== Konfiguriere ARMhf Quellen via Ubuntu Ports =====" - # 1. ARMhf Architektur hinzufügen sudo dpkg --add-architecture armhf - - # 2. Auf Ubuntu-Ports umleiten, damit armhf-Pakete gefunden werden sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo bash -c 'cat > /etc/apt/sources.list << EOF deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse @@ -61,7 +58,7 @@ jobs: make -j$(nproc) mkdir -p ${{ github.workspace }}/prebuilt_libs - cp lib/libgl4es.so ${{ github.workspace }}/prebuilt_libs/ + cp /tmp/gl4es/lib/libGL.so.1 ${{ github.workspace }}/prebuilt_libs/libgl4es.so - name: Set up QEMU uses: docker/setup-qemu-action@v3 From 26dc5c3fc5b3c4495e056f759957072a8880e795 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 18:30:08 +0200 Subject: [PATCH 35/57] Enhance CI workflow for ARM cross-compilation Added environment variables for CPU and FPU targets, and improved the caching mechanism for the GL4ES build process. Updated the Docker build process to ensure compatibility with ARM architecture. --- .github/workflows/Kaxkemain.yml | 187 ++++++++++++++++++++++---------- 1 file changed, 130 insertions(+), 57 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index ffeca3a5a..995b30185 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -5,6 +5,12 @@ on: branches: [ main ] workflow_dispatch: +env: + # Zentral änderbar, falls ihr später weitere Targets (z.B. Cortex-A72/RK3399) braucht + TARGET_CPU: cortex-a35 + TARGET_FPU: neon-fp-armv8 + GL4ES_VERSION: v1.1.4 + jobs: build: runs-on: ubuntu-22.04 @@ -16,7 +22,8 @@ jobs: - name: Generate Makefiles with Premake5 run: | - curl -L https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o /tmp/premake5.tar.gz + set -euo pipefail + curl -fsSL https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o /tmp/premake5.tar.gz mkdir -p /tmp/premake_bin tar -xzf /tmp/premake5.tar.gz -C /tmp/premake_bin chmod +x /tmp/premake_bin/premake5 @@ -24,41 +31,88 @@ jobs: sed -i 's/"x86"/"ARM"/g' premake5.lua /tmp/premake_bin/premake5 gmake2 - - name: Cross-Compile GL4ES on Host (Using Ubuntu Ports) + - name: Cache gl4es build + id: gl4es-cache + uses: actions/cache@v4 + with: + path: prebuilt_libs + # v2/focal: Cache-Key bewusst geändert, damit eine alte, gegen zu neue + # glibc (Ubuntu 22.04/Jammy) gelinkte Lib aus früheren Runs NICHT + # wiederverwendet wird (Ursache des "GLIBC_2.34 not found"-Fehlers). + key: gl4es-${{ env.GL4ES_VERSION }}-${{ env.TARGET_CPU }}-focal-armhf-v2 + + - name: Cross-Compile GL4ES (Ubuntu 20.04 container - matches device glibc) + if: steps.gl4es-cache.outputs.cache-hit != 'true' run: | - echo "===== Konfiguriere ARMhf Quellen via Ubuntu Ports =====" - - sudo dpkg --add-architecture armhf - sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak - sudo bash -c 'cat > /etc/apt/sources.list << EOF - deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse - deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse - deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse - - deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe multiverse - deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe multiverse - deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse - EOF' - - sudo apt-get update - sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake git libx11-dev:armhf - - git clone --branch v1.1.4 --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es - mkdir -p /tmp/gl4es/build && cd /tmp/gl4es/build - - cmake .. \ - -DCMAKE_SYSTEM_NAME=Linux \ - -DCMAKE_SYSTEM_PROCESSOR=arm \ - -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc \ - -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \ - -DSTATICLIB=OFF \ - -DNOX11=ON \ - -DDEFAULT_ES=2 - - make -j$(nproc) - - mkdir -p ${{ github.workspace }}/prebuilt_libs - cp /tmp/gl4es/lib/libGL.so.1 ${{ github.workspace }}/prebuilt_libs/libgl4es.so + set -euo pipefail + mkdir -p prebuilt_libs + + # WICHTIG: Wir bauen hier bewusst NICHT auf dem ubuntu-22.04-Runner selbst + # (dessen arm-linux-gnueabihf-gcc linkt gegen glibc 2.35 -> zu neu für + # die meisten RK3326-Firmwares), sondern in einem ubuntu:20.04-Container. + # Das ist ein normaler x86_64-Container (KEIN --platform arm/v7), es wird + # nur der ARMhf-Cross-Compiler aus den focal-Paketquellen genutzt - daher + # läuft das nativ und braucht kein QEMU. + docker run --rm -v "${{ github.workspace }}:/workspace" -w /workspace \ + -e GL4ES_VERSION="${GL4ES_VERSION}" \ + ubuntu:20.04 bash -c ' + set -euo pipefail + export DEBIAN_FRONTEND=noninteractive + + echo "===== Konfiguriere ARMhf Quellen (Ubuntu 20.04 / focal) =====" + dpkg --add-architecture armhf + cp /etc/apt/sources.list /etc/apt/sources.list.bak + cat > /etc/apt/sources.list << EOF + deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse + deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse + deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse + + deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse + deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse + deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse + EOF + + for i in 1 2 3; do + apt-get update && break + echo "apt-get update fehlgeschlagen, Versuch $i/3 ..." + sleep 5 + done + + apt-get install -y --no-install-recommends \ + gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake git ca-certificates libx11-dev:armhf + + git clone --branch "${GL4ES_VERSION}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es + mkdir -p /tmp/gl4es/build && cd /tmp/gl4es/build + + cmake .. \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_SYSTEM_PROCESSOR=arm \ + -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc \ + -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \ + -DSTATICLIB=OFF \ + -DNOX11=ON \ + -DDEFAULT_ES=2 + + make -j"$(nproc)" + + if [ ! -f lib/libGL.so.1 ]; then + echo "gl4es-Build hat keine libGL.so.1 erzeugt - Abbruch." >&2 + exit 1 + fi + + cp lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so + ' + + - name: Verify cached/prebuilt gl4es library exists + run: | + set -euo pipefail + if [ ! -f prebuilt_libs/libgl4es.so ]; then + echo "::error::prebuilt_libs/libgl4es.so fehlt (weder gebaut noch aus Cache geladen)." + exit 1 + fi + echo "gl4es-Lib gefunden: $(ls -la prebuilt_libs/libgl4es.so)" + echo "Benoetigte GLIBC-Symbolversionen (zur Kontrolle):" + objdump -T prebuilt_libs/libgl4es.so 2>/dev/null | grep -o 'GLIBC_[0-9.]*' | sort -Vu || true - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -67,6 +121,7 @@ jobs: - name: Build ARM32 Environment run: | + set -euo pipefail cat << 'EOF' > Dockerfile FROM --platform=linux/arm/v7 ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive @@ -80,38 +135,56 @@ jobs: - name: Compile Game and Package Artifact run: | - docker run --rm --platform linux/arm/v7 -v "${{ github.workspace }}:/workspace" -w /workspace redriver2-armhf bash -c " - set -e - - echo '===== Kompiliere REDRIVER2 im Container =====' - find . -type f -exec sed -i 's/__asm__(\"int3\")/__builtin_trap()/g' {} + - find . -type f -exec sed -i 's/asm(\"int3\")/__builtin_trap()/g' {} + - + set -euo pipefail + docker run --rm --platform linux/arm/v7 -v "${{ github.workspace }}:/workspace" -w /workspace \ + -e TARGET_CPU="${TARGET_CPU}" -e TARGET_FPU="${TARGET_FPU}" \ + redriver2-armhf bash -c ' + set -euo pipefail + + echo "===== Kompiliere REDRIVER2 im Container =====" + find . -path ./.git -prune -o -type f -print0 \ + | xargs -0 grep -Il "" 2>/dev/null \ + | xargs -r sed -i \ + -e "s/__asm__(\"int3\")/__builtin_trap()/g" \ + -e "s/asm(\"int3\")/__builtin_trap()/g" + cd src_rebuild - export CFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing' - export CXXFLAGS='-mcpu=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing' - + export CFLAGS="-mcpu=${TARGET_CPU} -mfpu=${TARGET_FPU} -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing" + export CXXFLAGS="${CFLAGS}" + cd build - make config=release_arm -j2 || make -j2 - + if make config=release_arm -j2; then + echo "release_arm Config erfolgreich gebaut." + else + echo "::error::make config=release_arm fehlgeschlagen - kein automatischer Fallback, bitte Buildlog pruefen." + exit 1 + fi + cd /workspace mkdir -p dist/redriver2 - - echo '===== Paketiere Dateien =====' - find src_rebuild -iname '*redriver2*' -type f -executable -exec cp {} dist/redriver2/redriver2 \; - + + echo "===== Paketiere Dateien =====" + BIN=$(find src_rebuild -iname "*redriver2*" -type f -executable | head -n1) + if [ -z "${BIN}" ]; then + echo "::error::Keine ausfuehrbare redriver2-Binary gefunden." + exit 1 + fi + cp "${BIN}" dist/redriver2/redriver2 + cp prebuilt_libs/libgl4es.so dist/redriver2/ - - if [ -d 'DRIVER2' ]; then cp -r DRIVER2 dist/redriver2/; fi - if [ -d 'driver2' ]; then cp -r driver2 dist/redriver2/; fi + + if [ -d "DRIVER2" ]; then cp -r DRIVER2 dist/redriver2/; fi + if [ -d "driver2" ]; then cp -r driver2 dist/redriver2/; fi cp -f config.ini dist/redriver2/ 2>/dev/null || true - - echo 'Fertiger Inhalt des Release-Ordners:' + + echo "Fertiger Inhalt des Release-Ordners:" ls -la dist/redriver2/ - " + ' - name: Upload PortMaster Artifact uses: actions/upload-artifact@v4 with: name: REDRIVER2-PortMaster path: dist/redriver2/ + if-no-files-found: error + From 3001d26a07492da759eeefdb3bbebe43d0752c2d Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 18:34:01 +0200 Subject: [PATCH 36/57] Add 'make' to package installation in workflow --- .github/workflows/Kaxkemain.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 995b30185..cb08c1924 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -79,7 +79,7 @@ jobs: done apt-get install -y --no-install-recommends \ - gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake git ca-certificates libx11-dev:armhf + gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake make git ca-certificates libx11-dev:armhf git clone --branch "${GL4ES_VERSION}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es mkdir -p /tmp/gl4es/build && cd /tmp/gl4es/build @@ -187,4 +187,3 @@ jobs: name: REDRIVER2-PortMaster path: dist/redriver2/ if-no-files-found: error - From 0532c64bfd2c0f217d6fa080e275b9323e55d925 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 18:37:53 +0200 Subject: [PATCH 37/57] Fix path handling for libGL.so.1 in build script Updated build script to dynamically find libGL.so.1 and copy it to the prebuilt libraries directory. --- .github/workflows/Kaxkemain.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index cb08c1924..b56e49786 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -95,12 +95,18 @@ jobs: make -j"$(nproc)" - if [ ! -f lib/libGL.so.1 ]; then + # Der genaue Ausgabepfad hängt von der CMake-Version/Struktur ab + # (z.B. build/lib/libGL.so.1 ODER build/src/lib/libGL.so.1) - + # daher robust im gesamten Build-Verzeichnis danach suchen statt + # einen festen Pfad anzunehmen. + BUILT_LIB=$(find . -name "libGL.so.1" -type f | head -n1) + if [ -z "${BUILT_LIB}" ]; then echo "gl4es-Build hat keine libGL.so.1 erzeugt - Abbruch." >&2 exit 1 fi + echo "gl4es-Lib gefunden unter: ${BUILT_LIB}" - cp lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so + cp "${BUILT_LIB}" /workspace/prebuilt_libs/libgl4es.so ' - name: Verify cached/prebuilt gl4es library exists From 59a01d1ef4015eeaf41843dc88adac3ba97584aa Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 18:43:54 +0200 Subject: [PATCH 38/57] Fix libGL.so.1 path search in Kaxkemain.yml Updated the path search for libGL.so.1 in the build process to look in the source directory instead of the build directory. --- .github/workflows/Kaxkemain.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index b56e49786..070fcf2b4 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -95,11 +95,10 @@ jobs: make -j"$(nproc)" - # Der genaue Ausgabepfad hängt von der CMake-Version/Struktur ab - # (z.B. build/lib/libGL.so.1 ODER build/src/lib/libGL.so.1) - - # daher robust im gesamten Build-Verzeichnis danach suchen statt - # einen festen Pfad anzunehmen. - BUILT_LIB=$(find . -name "libGL.so.1" -type f | head -n1) + # Der Ausgabepfad liegt bei gl4es typischerweise im Quellverzeichnis + # (gl4es/lib/libGL.so.1), NICHT im build/-Verzeichnis - daher wird + # im gesamten Klon-Verzeichnis (/tmp/gl4es) gesucht statt nur in build/. + BUILT_LIB=$(find /tmp/gl4es -name "libGL.so.1" -type f | head -n1) if [ -z "${BUILT_LIB}" ]; then echo "gl4es-Build hat keine libGL.so.1 erzeugt - Abbruch." >&2 exit 1 From 242b6e5d1212181b230da7cc4a5aaffc19c3f4da Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 18:51:10 +0200 Subject: [PATCH 39/57] Update grep and sed commands in Kaxkemain.yml --- .github/workflows/Kaxkemain.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 070fcf2b4..0a0d05a41 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -147,9 +147,10 @@ jobs: set -euo pipefail echo "===== Kompiliere REDRIVER2 im Container =====" + # Fix: grep gibt nun per -Z Null-terminierte Strings aus, xargs verarbeitet diese mit -0 weiter find . -path ./.git -prune -o -type f -print0 \ - | xargs -0 grep -Il "" 2>/dev/null \ - | xargs -r sed -i \ + | xargs -0 grep -IlZ "" 2>/dev/null \ + | xargs -0 -r sed -i \ -e "s/__asm__(\"int3\")/__builtin_trap()/g" \ -e "s/asm(\"int3\")/__builtin_trap()/g" From 49804fe974abb93ba70a1117edf1b91b36feadbb Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 19:54:54 +0200 Subject: [PATCH 40/57] Modify GL4ES workflow for GBM support Updated cache key and added GBM support for GL4ES cross-compilation. --- .github/workflows/Kaxkemain.yml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 0a0d05a41..47a1bf7e6 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -6,7 +6,6 @@ on: workflow_dispatch: env: - # Zentral änderbar, falls ihr später weitere Targets (z.B. Cortex-A72/RK3399) braucht TARGET_CPU: cortex-a35 TARGET_FPU: neon-fp-armv8 GL4ES_VERSION: v1.1.4 @@ -36,30 +35,22 @@ jobs: uses: actions/cache@v4 with: path: prebuilt_libs - # v2/focal: Cache-Key bewusst geändert, damit eine alte, gegen zu neue - # glibc (Ubuntu 22.04/Jammy) gelinkte Lib aus früheren Runs NICHT - # wiederverwendet wird (Ursache des "GLIBC_2.34 not found"-Fehlers). - key: gl4es-${{ env.GL4ES_VERSION }}-${{ env.TARGET_CPU }}-focal-armhf-v2 + # v3/focal: Cache-Key aktualisiert, um den erzwungenen GBM-Build zu laden + key: gl4es-${{ env.GL4ES_VERSION }}-${{ env.TARGET_CPU }}-focal-armhf-v3 - - name: Cross-Compile GL4ES (Ubuntu 20.04 container - matches device glibc) + - name: Cross-Compile GL4ES with GBM Support (Ubuntu 20.04 container) if: steps.gl4es-cache.outputs.cache-hit != 'true' run: | set -euo pipefail mkdir -p prebuilt_libs - # WICHTIG: Wir bauen hier bewusst NICHT auf dem ubuntu-22.04-Runner selbst - # (dessen arm-linux-gnueabihf-gcc linkt gegen glibc 2.35 -> zu neu für - # die meisten RK3326-Firmwares), sondern in einem ubuntu:20.04-Container. - # Das ist ein normaler x86_64-Container (KEIN --platform arm/v7), es wird - # nur der ARMhf-Cross-Compiler aus den focal-Paketquellen genutzt - daher - # läuft das nativ und braucht kein QEMU. docker run --rm -v "${{ github.workspace }}:/workspace" -w /workspace \ -e GL4ES_VERSION="${GL4ES_VERSION}" \ ubuntu:20.04 bash -c ' set -euo pipefail export DEBIAN_FRONTEND=noninteractive - echo "===== Konfiguriere ARMhf Quellen (Ubuntu 20.04 / focal) =====" + echo "===== Konfiguriere ARMhf Quellen mit GBM/DRM Support =====" dpkg --add-architecture armhf cp /etc/apt/sources.list /etc/apt/sources.list.bak cat > /etc/apt/sources.list << EOF @@ -78,8 +69,10 @@ jobs: sleep 5 done + # WICHTIG: libgbm-dev und libdrm-dev hinzugefügt für ArkOS/RK3326 KMSDRM apt-get install -y --no-install-recommends \ - gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake make git ca-certificates libx11-dev:armhf + gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake make git ca-certificates \ + libx11-dev:armhf libgbm-dev:armhf libdrm-dev:armhf libegl1-mesa-dev:armhf libgles2-mesa-dev:armhf git clone --branch "${GL4ES_VERSION}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es mkdir -p /tmp/gl4es/build && cd /tmp/gl4es/build @@ -91,13 +84,11 @@ jobs: -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \ -DSTATICLIB=OFF \ -DNOX11=ON \ + -DGBM=ON \ -DDEFAULT_ES=2 make -j"$(nproc)" - # Der Ausgabepfad liegt bei gl4es typischerweise im Quellverzeichnis - # (gl4es/lib/libGL.so.1), NICHT im build/-Verzeichnis - daher wird - # im gesamten Klon-Verzeichnis (/tmp/gl4es) gesucht statt nur in build/. BUILT_LIB=$(find /tmp/gl4es -name "libGL.so.1" -type f | head -n1) if [ -z "${BUILT_LIB}" ]; then echo "gl4es-Build hat keine libGL.so.1 erzeugt - Abbruch." >&2 @@ -116,8 +107,8 @@ jobs: exit 1 fi echo "gl4es-Lib gefunden: $(ls -la prebuilt_libs/libgl4es.so)" - echo "Benoetigte GLIBC-Symbolversionen (zur Kontrolle):" - objdump -T prebuilt_libs/libgl4es.so 2>/dev/null | grep -o 'GLIBC_[0-9.]*' | sort -Vu || true + echo "Prüfe Symbole auf GBM-Unterstützung:" + nm prebuilt_libs/libgl4es.so | grep -i gbm || echo "Hinweis: GBM Symbole statisch oder indirekt gebunden." - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -147,7 +138,6 @@ jobs: set -euo pipefail echo "===== Kompiliere REDRIVER2 im Container =====" - # Fix: grep gibt nun per -Z Null-terminierte Strings aus, xargs verarbeitet diese mit -0 weiter find . -path ./.git -prune -o -type f -print0 \ | xargs -0 grep -IlZ "" 2>/dev/null \ | xargs -0 -r sed -i \ From f5ad15ea3c7e362f9da5d6dcce2861c54c9cf685 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 19:57:59 +0200 Subject: [PATCH 41/57] Refine comments and enhance package installation Updated comments and added pkg-config to installation. --- .github/workflows/Kaxkemain.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 47a1bf7e6..1d1ab6b28 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -35,7 +35,7 @@ jobs: uses: actions/cache@v4 with: path: prebuilt_libs - # v3/focal: Cache-Key aktualisiert, um den erzwungenen GBM-Build zu laden + # v3/focal: Cache-Key aktualisiert für erzwungenen GBM-Build key: gl4es-${{ env.GL4ES_VERSION }}-${{ env.TARGET_CPU }}-focal-armhf-v3 - name: Cross-Compile GL4ES with GBM Support (Ubuntu 20.04 container) @@ -69,9 +69,9 @@ jobs: sleep 5 done - # WICHTIG: libgbm-dev und libdrm-dev hinzugefügt für ArkOS/RK3326 KMSDRM + # WICHTIG: pkg-config sowie GBM- und DRM-Entwicklerpakete ergänzt apt-get install -y --no-install-recommends \ - gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake make git ca-certificates \ + gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake make git ca-certificates pkg-config \ libx11-dev:armhf libgbm-dev:armhf libdrm-dev:armhf libegl1-mesa-dev:armhf libgles2-mesa-dev:armhf git clone --branch "${GL4ES_VERSION}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es @@ -107,8 +107,8 @@ jobs: exit 1 fi echo "gl4es-Lib gefunden: $(ls -la prebuilt_libs/libgl4es.so)" - echo "Prüfe Symbole auf GBM-Unterstützung:" - nm prebuilt_libs/libgl4es.so | grep -i gbm || echo "Hinweis: GBM Symbole statisch oder indirekt gebunden." + echo "Benoetigte GLIBC-Symbolversionen (zur Kontrolle):" + objdump -T prebuilt_libs/libgl4es.so 2>/dev/null | grep -o 'GLIBC_[0-9.]*' | sort -Vu || true - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -138,6 +138,7 @@ jobs: set -euo pipefail echo "===== Kompiliere REDRIVER2 im Container =====" + # Fix: Null-terminierte Strings für Leerzeichen-Sicherheit bei Pfaden find . -path ./.git -prune -o -type f -print0 \ | xargs -0 grep -IlZ "" 2>/dev/null \ | xargs -0 -r sed -i \ From aa8cc36fe44b5f06473407ed3bd51f7fc6fa4355 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 20:00:27 +0200 Subject: [PATCH 42/57] Update cache key and fix pkg-config for ARMhf --- .github/workflows/Kaxkemain.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 1d1ab6b28..49654d3d7 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -35,8 +35,8 @@ jobs: uses: actions/cache@v4 with: path: prebuilt_libs - # v3/focal: Cache-Key aktualisiert für erzwungenen GBM-Build - key: gl4es-${{ env.GL4ES_VERSION }}-${{ env.TARGET_CPU }}-focal-armhf-v3 + # v4/focal: Cache-Key aktualisiert für Multiarch-PkgConfig-Fix + key: gl4es-${{ env.GL4ES_VERSION }}-${{ env.TARGET_CPU }}-focal-armhf-v4 - name: Cross-Compile GL4ES with GBM Support (Ubuntu 20.04 container) if: steps.gl4es-cache.outputs.cache-hit != 'true' @@ -69,7 +69,6 @@ jobs: sleep 5 done - # WICHTIG: pkg-config sowie GBM- und DRM-Entwicklerpakete ergänzt apt-get install -y --no-install-recommends \ gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake make git ca-certificates pkg-config \ libx11-dev:armhf libgbm-dev:armhf libdrm-dev:armhf libegl1-mesa-dev:armhf libgles2-mesa-dev:armhf @@ -77,6 +76,10 @@ jobs: git clone --branch "${GL4ES_VERSION}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es mkdir -p /tmp/gl4es/build && cd /tmp/gl4es/build + # WICHTIG: Pkg-Config für ARMhf-Multiarch-Pfade zwingend konfigurieren + export PKG_CONFIG_LIBDIR="/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig" + export PKG_CONFIG_ALLOW_CROSS=1 + cmake .. \ -DCMAKE_SYSTEM_NAME=Linux \ -DCMAKE_SYSTEM_PROCESSOR=arm \ @@ -107,11 +110,9 @@ jobs: exit 1 fi echo "gl4es-Lib gefunden: $(ls -la prebuilt_libs/libgl4es.so)" - echo "Benoetigte GLIBC-Symbolversionen (zur Kontrolle):" - objdump -T prebuilt_libs/libgl4es.so 2>/dev/null | grep -o 'GLIBC_[0-9.]*' | sort -Vu || true - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: actions/setup-qemu-action@v3 with: platforms: linux/arm/v7 @@ -138,7 +139,6 @@ jobs: set -euo pipefail echo "===== Kompiliere REDRIVER2 im Container =====" - # Fix: Null-terminierte Strings für Leerzeichen-Sicherheit bei Pfaden find . -path ./.git -prune -o -type f -print0 \ | xargs -0 grep -IlZ "" 2>/dev/null \ | xargs -0 -r sed -i \ From 776d73e01bb1632bf8225a40d8c496c8ad61ae6a Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 20:01:43 +0200 Subject: [PATCH 43/57] Update GitHub Actions workflow for GL4ES build --- .github/workflows/Kaxkemain.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 49654d3d7..5d3f92ef3 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -35,7 +35,6 @@ jobs: uses: actions/cache@v4 with: path: prebuilt_libs - # v4/focal: Cache-Key aktualisiert für Multiarch-PkgConfig-Fix key: gl4es-${{ env.GL4ES_VERSION }}-${{ env.TARGET_CPU }}-focal-armhf-v4 - name: Cross-Compile GL4ES with GBM Support (Ubuntu 20.04 container) @@ -76,7 +75,6 @@ jobs: git clone --branch "${GL4ES_VERSION}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es mkdir -p /tmp/gl4es/build && cd /tmp/gl4es/build - # WICHTIG: Pkg-Config für ARMhf-Multiarch-Pfade zwingend konfigurieren export PKG_CONFIG_LIBDIR="/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig" export PKG_CONFIG_ALLOW_CROSS=1 @@ -112,7 +110,7 @@ jobs: echo "gl4es-Lib gefunden: $(ls -la prebuilt_libs/libgl4es.so)" - name: Set up QEMU - uses: actions/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v3 with: platforms: linux/arm/v7 From 5b5fe6ed999029daf85ee2d9c032e69d4e0e6492 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 20:31:00 +0200 Subject: [PATCH 44/57] Update Kaxkemain.yml --- .github/workflows/Kaxkemain.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 5d3f92ef3..f129250a3 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -35,9 +35,10 @@ jobs: uses: actions/cache@v4 with: path: prebuilt_libs - key: gl4es-${{ env.GL4ES_VERSION }}-${{ env.TARGET_CPU }}-focal-armhf-v4 + # v5: Cache-Key aktualisiert, um GBM komplett zu deaktivieren (Fix für Segfault) + key: gl4es-${{ env.GL4ES_VERSION }}-${{ env.TARGET_CPU }}-focal-armhf-nogbm-v5 - - name: Cross-Compile GL4ES with GBM Support (Ubuntu 20.04 container) + - name: Cross-Compile GL4ES without GBM (Standard ArkOS Mode) if: steps.gl4es-cache.outputs.cache-hit != 'true' run: | set -euo pipefail @@ -49,7 +50,7 @@ jobs: set -euo pipefail export DEBIAN_FRONTEND=noninteractive - echo "===== Konfiguriere ARMhf Quellen mit GBM/DRM Support =====" + echo "===== Konfiguriere ARMhf Quellen =====" dpkg --add-architecture armhf cp /etc/apt/sources.list /etc/apt/sources.list.bak cat > /etc/apt/sources.list << EOF @@ -70,7 +71,7 @@ jobs: apt-get install -y --no-install-recommends \ gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake make git ca-certificates pkg-config \ - libx11-dev:armhf libgbm-dev:armhf libdrm-dev:armhf libegl1-mesa-dev:armhf libgles2-mesa-dev:armhf + libx11-dev:armhf libegl1-mesa-dev:armhf libgles2-mesa-dev:armhf git clone --branch "${GL4ES_VERSION}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es mkdir -p /tmp/gl4es/build && cd /tmp/gl4es/build @@ -78,6 +79,7 @@ jobs: export PKG_CONFIG_LIBDIR="/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig" export PKG_CONFIG_ALLOW_CROSS=1 + # WICHTIG: DGBM=OFF, damit gl4es sich sauber in SDL2 / kmsdrm einklinkt cmake .. \ -DCMAKE_SYSTEM_NAME=Linux \ -DCMAKE_SYSTEM_PROCESSOR=arm \ @@ -85,7 +87,7 @@ jobs: -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \ -DSTATICLIB=OFF \ -DNOX11=ON \ - -DGBM=ON \ + -DGBM=OFF \ -DDEFAULT_ES=2 make -j"$(nproc)" @@ -160,10 +162,7 @@ jobs: echo "===== Paketiere Dateien =====" BIN=$(find src_rebuild -iname "*redriver2*" -type f -executable | head -n1) - if [ -z "${BIN}" ]; then - echo "::error::Keine ausfuehrbare redriver2-Binary gefunden." - exit 1 - fi + [ -z "${BIN}" ] && { echo "::error::Keine Binary gefunden."; exit 1; } cp "${BIN}" dist/redriver2/redriver2 cp prebuilt_libs/libgl4es.so dist/redriver2/ From b435dad9458d00769bda7f3f80d07b50cfe27a86 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 21:59:29 +0200 Subject: [PATCH 45/57] Enhance GitHub Actions workflow for REDRIVER2 Updated the Kaxkemain.yml workflow to support both 'main' and 'master' branches, modified package repository configurations, and improved error messages. --- .github/workflows/Kaxkemain.yml | 122 +++++++++++++++++++++++++++----- 1 file changed, 106 insertions(+), 16 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index f129250a3..95294744a 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -2,7 +2,7 @@ name: REDRIVER2 PortMaster Build (RK3326) on: push: - branches: [ main ] + branches: [ main, master ] workflow_dispatch: env: @@ -35,7 +35,6 @@ jobs: uses: actions/cache@v4 with: path: prebuilt_libs - # v5: Cache-Key aktualisiert, um GBM komplett zu deaktivieren (Fix für Segfault) key: gl4es-${{ env.GL4ES_VERSION }}-${{ env.TARGET_CPU }}-focal-armhf-nogbm-v5 - name: Cross-Compile GL4ES without GBM (Standard ArkOS Mode) @@ -54,14 +53,14 @@ jobs: dpkg --add-architecture armhf cp /etc/apt/sources.list /etc/apt/sources.list.bak cat > /etc/apt/sources.list << EOF - deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse - deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse - deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse + deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse + deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse + deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse - deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse - deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse - deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse - EOF + deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse + deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse + deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse + EOF for i in 1 2 3; do apt-get update && break @@ -79,7 +78,6 @@ jobs: export PKG_CONFIG_LIBDIR="/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig" export PKG_CONFIG_ALLOW_CROSS=1 - # WICHTIG: DGBM=OFF, damit gl4es sich sauber in SDL2 / kmsdrm einklinkt cmake .. \ -DCMAKE_SYSTEM_NAME=Linux \ -DCMAKE_SYSTEM_PROCESSOR=arm \ @@ -97,8 +95,6 @@ jobs: echo "gl4es-Build hat keine libGL.so.1 erzeugt - Abbruch." >&2 exit 1 fi - echo "gl4es-Lib gefunden unter: ${BUILT_LIB}" - cp "${BUILT_LIB}" /workspace/prebuilt_libs/libgl4es.so ' @@ -106,13 +102,13 @@ jobs: run: | set -euo pipefail if [ ! -f prebuilt_libs/libgl4es.so ]; then - echo "::error::prebuilt_libs/libgl4es.so fehlt (weder gebaut noch aus Cache geladen)." + echo "::error::prebuilt_libs/libgl4es.so fehlt." exit 1 fi echo "gl4es-Lib gefunden: $(ls -la prebuilt_libs/libgl4es.so)" - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: actions/setup-qemu-action@v3 with: platforms: linux/arm/v7 @@ -153,24 +149,118 @@ jobs: if make config=release_arm -j2; then echo "release_arm Config erfolgreich gebaut." else - echo "::error::make config=release_arm fehlgeschlagen - kein automatischer Fallback, bitte Buildlog pruefen." + echo "::error::make config=release_arm fehlgeschlagen." exit 1 fi cd /workspace mkdir -p dist/redriver2 - echo "===== Paketiere Dateien =====" + echo "===== Paketiere Dateien für PortMaster =====" BIN=$(find src_rebuild -iname "*redriver2*" -type f -executable | head -n1) [ -z "${BIN}" ] && { echo "::error::Keine Binary gefunden."; exit 1; } cp "${BIN}" dist/redriver2/redriver2 + chmod +x dist/redriver2/redriver2 + # 32-Bit libgl4es.so kopieren cp prebuilt_libs/libgl4es.so dist/redriver2/ + # Optionale Spieldateien kopieren falls vorhanden if [ -d "DRIVER2" ]; then cp -r DRIVER2 dist/redriver2/; fi if [ -d "driver2" ]; then cp -r driver2 dist/redriver2/; fi cp -f config.ini dist/redriver2/ 2>/dev/null || true + # 1. port.json erstellen + cat << 'EOF_JSON' > dist/redriver2/port.json + { + "version": 2, + "name": "redriver2.zip", + "items": [ + "Redriver2.sh", + "redriver2" + ], + "items_opt": null, + "attr": { + "title": "Driver 2 (Redriver2)", + "desc": "Der Open-Source Driver 2 PC Port für Linux Handhelds.", + "inst": "Bereit zum Starten.", + "genres": ["action", "driving"], + "porter": ["St0len-One"], + "rtr": true, + "runtime": null, + "reqs": [], + "arch": ["armhf"] + } + } + EOF_JSON + + # 2. Perfektes PortMaster Start-Skript erstellen + cat << 'EOF_SH' > dist/redriver2/Redriver2.sh + #!/bin/bash + XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} + if [ -d "/opt/system/Tools/PortMaster/" ]; then + controlfolder="/opt/system/Tools/PortMaster" + elif [ -d "/roms/tools/PortMaster/" ]; then + controlfolder="/roms/tools/PortMaster" + elif [ -d "$XDG_DATA_HOME/PortMaster" ]; then + controlfolder="$XDG_DATA_HOME/PortMaster" + else + controlfolder="/roms/ports/PortMaster" + fi + if [ -f "$controlfolder/funcs.txt" ]; then + source "$controlfolder/funcs.txt" + else + echo "PortMaster funcs.txt nicht gefunden!" >&2 + exit 1 + fi + pm_init + GAMEDIR="/roms/ports/redriver2" + cd "$GAMEDIR" + exec > >(tee "$GAMEDIR/redriver2_debug.log") 2>&1 + if [ -f "${controlfolder}/libgl_${CFW_NAME}.txt" ]; then + source "${controlfolder}/libgl_${CFW_NAME}.txt" + else + source "${controlfolder}/libgl_default.txt" + fi + export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" + export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH" + if [ -f "$GAMEDIR/libgl4es.so" ]; then + export LIBGL_FB=2 + export LD_PRELOAD="$GAMEDIR/libgl4es.so" + fi + echo "Starte Redriver2 auf M9 Pro (ArkOS / RK3326)..." + $GPTOKEYB "redriver2" -c "$GAMEDIR/redriver2.gptk" & + ./redriver2 + pm_finish + EOF_SH + chmod +x dist/redriver2/Redriver2.sh + + # 3. Controller-Mapping (gptk) erstellen + cat << 'EOF_GPTK' > dist/redriver2/redriver2.gptk + back = esc + start = enter + up = up + down = down + left = left + right = right + left_analog_up = up + left_analog_down = down + left_analog_left = left + left_analog_right = right + right_analog_up = up + right_analog_down = down + right_analog_left = left + right_analog_right = right + a = space + b = alt + x = ctrl + y = shift + l1 = q + r1 = e + l2 = tab + r2 = enter + EOF_GPTK + echo "Fertiger Inhalt des Release-Ordners:" ls -la dist/redriver2/ ' From 4a867ef5f7c25b77f3c7c0f022eddb53b330e19f Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 22:03:56 +0200 Subject: [PATCH 46/57] Update QEMU setup and improve packaging process --- .github/workflows/Kaxkemain.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 95294744a..308c6de09 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -108,7 +108,7 @@ jobs: echo "gl4es-Lib gefunden: $(ls -la prebuilt_libs/libgl4es.so)" - name: Set up QEMU - uses: actions/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v3 with: platforms: linux/arm/v7 @@ -134,7 +134,7 @@ jobs: redriver2-armhf bash -c ' set -euo pipefail - echo "===== Kompiliere REDRIVER2 im Container =====" + echo "===== Kompiliere REDRIVER2 im Container ====="[cite: 4] find . -path ./.git -prune -o -type f -print0 \ | xargs -0 grep -IlZ "" 2>/dev/null \ | xargs -0 -r sed -i \ @@ -147,16 +147,16 @@ jobs: cd build if make config=release_arm -j2; then - echo "release_arm Config erfolgreich gebaut." + echo "release_arm Config erfolgreich gebaut."[cite: 4] else - echo "::error::make config=release_arm fehlgeschlagen." + echo "::error::make config=release_arm fehlgeschlagen."[cite: 4] exit 1 fi cd /workspace mkdir -p dist/redriver2 - echo "===== Paketiere Dateien für PortMaster =====" + echo "===== Durchsuche Repo und paketiere alle benötigten Dateien =====" BIN=$(find src_rebuild -iname "*redriver2*" -type f -executable | head -n1) [ -z "${BIN}" ] && { echo "::error::Keine Binary gefunden."; exit 1; } cp "${BIN}" dist/redriver2/redriver2 @@ -165,10 +165,13 @@ jobs: # 32-Bit libgl4es.so kopieren cp prebuilt_libs/libgl4es.so dist/redriver2/ - # Optionale Spieldateien kopieren falls vorhanden - if [ -d "DRIVER2" ]; then cp -r DRIVER2 dist/redriver2/; fi - if [ -d "driver2" ]; then cp -r driver2 dist/redriver2/; fi - cp -f config.ini dist/redriver2/ 2>/dev/null || true + # Automatisches Durchsuchen des Repos nach allen Laufzeitordnern und Dateien (z.B. data, configs, assets) + for item in data assets configs shaders *.ini *.cfg; do + if [ -e "$item" ]; then + cp -r "$item" dist/redriver2/ + echo "[+] Laufzeit-Element gefunden und kopiert: $item" + fi + done # 1. port.json erstellen cat << 'EOF_JSON' > dist/redriver2/port.json From 77dcbad3bd96b2f80a85038a2f3408770cd1898e Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Sun, 23 Aug 2026 22:11:52 +0200 Subject: [PATCH 47/57] Refactor GitHub Actions workflow for game packaging Updated the GitHub Actions workflow to improve clarity in naming and organization of steps related to compiling and packaging the game artifact. --- .github/workflows/Kaxkemain.yml | 227 ++++++++++++++++---------------- 1 file changed, 116 insertions(+), 111 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 308c6de09..e18572a8e 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -126,7 +126,7 @@ jobs: EOF docker build -t redriver2-armhf -f Dockerfile . - - name: Compile Game and Package Artifact + - name: Compile Game in Docker Container run: | set -euo pipefail docker run --rm --platform linux/arm/v7 -v "${{ github.workspace }}:/workspace" -w /workspace \ @@ -152,121 +152,126 @@ jobs: echo "::error::make config=release_arm fehlgeschlagen."[cite: 4] exit 1 fi + ' - cd /workspace - mkdir -p dist/redriver2 + - name: Package PortMaster Artifact on Host + run: | + set -euo pipefail + mkdir -p dist/redriver2 - echo "===== Durchsuche Repo und paketiere alle benötigten Dateien =====" - BIN=$(find src_rebuild -iname "*redriver2*" -type f -executable | head -n1) - [ -z "${BIN}" ] && { echo "::error::Keine Binary gefunden."; exit 1; } - cp "${BIN}" dist/redriver2/redriver2 - chmod +x dist/redriver2/redriver2 + echo "===== Paketiere Dateien für PortMaster =====" + BIN=$(find src_rebuild -iname "*redriver2*" -type f -executable | head -n1) + if [ -z "${BIN}" ]; then + echo "::error::Keine kompilierte Binary gefunden." + exit 1 + fi + cp "${BIN}" dist/redriver2/redriver2 + chmod +x dist/redriver2/redriver2 - # 32-Bit libgl4es.so kopieren - cp prebuilt_libs/libgl4es.so dist/redriver2/ + # 32-Bit libgl4es.so kopieren + cp prebuilt_libs/libgl4es.so dist/redriver2/ - # Automatisches Durchsuchen des Repos nach allen Laufzeitordnern und Dateien (z.B. data, configs, assets) - for item in data assets configs shaders *.ini *.cfg; do - if [ -e "$item" ]; then - cp -r "$item" dist/redriver2/ - echo "[+] Laufzeit-Element gefunden und kopiert: $item" - fi - done - - # 1. port.json erstellen - cat << 'EOF_JSON' > dist/redriver2/port.json - { - "version": 2, - "name": "redriver2.zip", - "items": [ - "Redriver2.sh", - "redriver2" - ], - "items_opt": null, - "attr": { - "title": "Driver 2 (Redriver2)", - "desc": "Der Open-Source Driver 2 PC Port für Linux Handhelds.", - "inst": "Bereit zum Starten.", - "genres": ["action", "driving"], - "porter": ["St0len-One"], - "rtr": true, - "runtime": null, - "reqs": [], - "arch": ["armhf"] - } - } - EOF_JSON - - # 2. Perfektes PortMaster Start-Skript erstellen - cat << 'EOF_SH' > dist/redriver2/Redriver2.sh - #!/bin/bash - XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} - if [ -d "/opt/system/Tools/PortMaster/" ]; then - controlfolder="/opt/system/Tools/PortMaster" - elif [ -d "/roms/tools/PortMaster/" ]; then - controlfolder="/roms/tools/PortMaster" - elif [ -d "$XDG_DATA_HOME/PortMaster" ]; then - controlfolder="$XDG_DATA_HOME/PortMaster" - else - controlfolder="/roms/ports/PortMaster" - fi - if [ -f "$controlfolder/funcs.txt" ]; then - source "$controlfolder/funcs.txt" - else - echo "PortMaster funcs.txt nicht gefunden!" >&2 - exit 1 + # Repo komplett nach Laufzeit-Ordnern/Dateien durchsuchen und mitnehmen + for item in data assets configs shaders *.ini *.cfg; do + if [ -e "$item" ]; then + cp -r "$item" dist/redriver2/ + echo "[+] Laufzeit-Element kopiert: $item" fi - pm_init - GAMEDIR="/roms/ports/redriver2" - cd "$GAMEDIR" - exec > >(tee "$GAMEDIR/redriver2_debug.log") 2>&1 - if [ -f "${controlfolder}/libgl_${CFW_NAME}.txt" ]; then - source "${controlfolder}/libgl_${CFW_NAME}.txt" - else - source "${controlfolder}/libgl_default.txt" - fi - export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" - export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH" - if [ -f "$GAMEDIR/libgl4es.so" ]; then - export LIBGL_FB=2 - export LD_PRELOAD="$GAMEDIR/libgl4es.so" - fi - echo "Starte Redriver2 auf M9 Pro (ArkOS / RK3326)..." - $GPTOKEYB "redriver2" -c "$GAMEDIR/redriver2.gptk" & - ./redriver2 - pm_finish - EOF_SH - chmod +x dist/redriver2/Redriver2.sh - - # 3. Controller-Mapping (gptk) erstellen - cat << 'EOF_GPTK' > dist/redriver2/redriver2.gptk - back = esc - start = enter - up = up - down = down - left = left - right = right - left_analog_up = up - left_analog_down = down - left_analog_left = left - left_analog_right = right - right_analog_up = up - right_analog_down = down - right_analog_left = left - right_analog_right = right - a = space - b = alt - x = ctrl - y = shift - l1 = q - r1 = e - l2 = tab - r2 = enter - EOF_GPTK - - echo "Fertiger Inhalt des Release-Ordners:" - ls -la dist/redriver2/ - ' + done + + # 1. port.json erstellen + cat << 'EOF_JSON' > dist/redriver2/port.json + { + "version": 2, + "name": "redriver2.zip", + "items": [ + "Redriver2.sh", + "redriver2" + ], + "items_opt": null, + "attr": { + "title": "Driver 2 (Redriver2)", + "desc": "Der Open-Source Driver 2 PC Port für Linux Handhelds.", + "inst": "Bereit zum Starten.", + "genres": ["action", "driving"], + "porter": ["St0len-One"], + "rtr": true, + "runtime": null, + "reqs": [], + "arch": ["armhf"] + } + } + EOF_JSON + + # 2. Perfektes PortMaster Start-Skript erstellen + cat << 'EOF_SH' > dist/redriver2/Redriver2.sh + #!/bin/bash + XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} + if [ -d "/opt/system/Tools/PortMaster/" ]; then + controlfolder="/opt/system/Tools/PortMaster" + elif [ -d "/roms/tools/PortMaster/" ]; then + controlfolder="/roms/tools/PortMaster" + elif [ -d "$XDG_DATA_HOME/PortMaster" ]; then + controlfolder="$XDG_DATA_HOME/PortMaster" + else + controlfolder="/roms/ports/PortMaster" + fi + if [ -f "$controlfolder/funcs.txt" ]; then + source "$controlfolder/funcs.txt" + else + echo "PortMaster funcs.txt nicht gefunden!" >&2 + exit 1 + fi + pm_init + GAMEDIR="/roms/ports/redriver2" + cd "$GAMEDIR" + exec > >(tee "$GAMEDIR/redriver2_debug.log") 2>&1 + if [ -f "${controlfolder}/libgl_${CFW_NAME}.txt" ]; then + source "${controlfolder}/libgl_${CFW_NAME}.txt" + else + source "${controlfolder}/libgl_default.txt" + fi + export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" + export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH" + if [ -f "$GAMEDIR/libgl4es.so" ]; then + export LIBGL_FB=2 + export LD_PRELOAD="$GAMEDIR/libgl4es.so" + fi + echo "Starte Redriver2 auf M9 Pro (ArkOS / RK3326)..." + $GPTOKEYB "redriver2" -c "$GAMEDIR/redriver2.gptk" & + ./redriver2 + pm_finish + EOF_SH + chmod +x dist/redriver2/Redriver2.sh + + # 3. Controller-Mapping (gptk) erstellen + cat << 'EOF_GPTK' > dist/redriver2/redriver2.gptk + back = esc + start = enter + up = up + down = down + left = left + right = right + left_analog_up = up + left_analog_down = down + left_analog_left = left + left_analog_right = right + right_analog_up = up + right_analog_down = down + right_analog_left = left + right_analog_right = right + a = space + b = alt + x = ctrl + y = shift + l1 = q + r1 = e + l2 = tab + r2 = enter + EOF_GPTK + + echo "Fertiger Inhalt des Release-Ordners:" + ls -la dist/redriver2/ - name: Upload PortMaster Artifact uses: actions/upload-artifact@v4 From 6c3195e4082fcadbeae312975860e2cd12ba1147 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Mon, 24 Aug 2026 17:50:32 +0200 Subject: [PATCH 48/57] Modify Kaxkemain.yml for AArch64 support Updated workflow for REDRIVER2 PortMaster to support AArch64 architecture. Changed environment setup and build processes for compatibility with Ubuntu 24.04 and ARM64. --- .github/workflows/Kaxkemain.yml | 214 ++++++++++++-------------------- 1 file changed, 78 insertions(+), 136 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index e18572a8e..d0c34dbd5 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,4 +1,4 @@ -name: REDRIVER2 PortMaster Build (RK3326) +name: REDRIVER2 PortMaster Build (RK3326 / AArch64) on: push: @@ -6,19 +6,37 @@ on: workflow_dispatch: env: - TARGET_CPU: cortex-a35 - TARGET_FPU: neon-fp-armv8 GL4ES_VERSION: v1.1.4 jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive + - name: Set up QEMU for AArch64 + uses: docker/setup-qemu-action@v3 + with: + platforms: linux/arm64 + + - name: Build Unified AArch64 Environment + run: | + set -euo pipefail + cat << 'EOF' > Dockerfile + FROM --platform=linux/arm64 ubuntu:22.04 + ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential cmake git ca-certificates pkg-config \ + libsdl2-dev libopenal-dev libjpeg-dev \ + libgl1-mesa-dev libgles2-mesa-dev libdrm-dev libgbm-dev libx11-dev \ + && rm -rf /var/lib/apt/lists/* + WORKDIR /workspace + EOF + docker build -t redriver2-aarch64 -f Dockerfile . + - name: Generate Makefiles with Premake5 run: | set -euo pipefail @@ -27,7 +45,9 @@ jobs: tar -xzf /tmp/premake5.tar.gz -C /tmp/premake_bin chmod +x /tmp/premake_bin/premake5 cd src_rebuild - sed -i 's/"x86"/"ARM"/g' premake5.lua + + # Wir aendern die Architektur fuer Premake auf ARM64 + sed -i 's/"x86"/"ARM64"/g' premake5.lua /tmp/premake_bin/premake5 gmake2 - name: Cache gl4es build @@ -35,106 +55,31 @@ jobs: uses: actions/cache@v4 with: path: prebuilt_libs - key: gl4es-${{ env.GL4ES_VERSION }}-${{ env.TARGET_CPU }}-focal-armhf-nogbm-v5 + key: gl4es-${{ env.GL4ES_VERSION }}-aarch64-v1 - - name: Cross-Compile GL4ES without GBM (Standard ArkOS Mode) + - name: Compile GL4ES (AArch64) if: steps.gl4es-cache.outputs.cache-hit != 'true' run: | set -euo pipefail mkdir -p prebuilt_libs + docker run --rm --platform linux/arm64 -v "${{ github.workspace }}:/workspace" redriver2-aarch64 bash -c ' + git clone --branch "${GL4ES_VERSION}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es + cd /tmp/gl4es + mkdir build && cd build + # PortMaster auf aarch64 profitiert oft von GBM (Direct Rendering) + cmake .. -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=ON -DDEFAULT_ES=2 + make -j$(nproc) + cp ../lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so + ' - docker run --rm -v "${{ github.workspace }}:/workspace" -w /workspace \ - -e GL4ES_VERSION="${GL4ES_VERSION}" \ - ubuntu:20.04 bash -c ' - set -euo pipefail - export DEBIAN_FRONTEND=noninteractive - - echo "===== Konfiguriere ARMhf Quellen =====" - dpkg --add-architecture armhf - cp /etc/apt/sources.list /etc/apt/sources.list.bak - cat > /etc/apt/sources.list << EOF - deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse - deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse - deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse - - deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse - deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse - deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse - EOF - - for i in 1 2 3; do - apt-get update && break - echo "apt-get update fehlgeschlagen, Versuch $i/3 ..." - sleep 5 - done - - apt-get install -y --no-install-recommends \ - gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake make git ca-certificates pkg-config \ - libx11-dev:armhf libegl1-mesa-dev:armhf libgles2-mesa-dev:armhf - - git clone --branch "${GL4ES_VERSION}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es - mkdir -p /tmp/gl4es/build && cd /tmp/gl4es/build - - export PKG_CONFIG_LIBDIR="/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig" - export PKG_CONFIG_ALLOW_CROSS=1 - - cmake .. \ - -DCMAKE_SYSTEM_NAME=Linux \ - -DCMAKE_SYSTEM_PROCESSOR=arm \ - -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc \ - -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \ - -DSTATICLIB=OFF \ - -DNOX11=ON \ - -DGBM=OFF \ - -DDEFAULT_ES=2 - - make -j"$(nproc)" - - BUILT_LIB=$(find /tmp/gl4es -name "libGL.so.1" -type f | head -n1) - if [ -z "${BUILT_LIB}" ]; then - echo "gl4es-Build hat keine libGL.so.1 erzeugt - Abbruch." >&2 - exit 1 - fi - cp "${BUILT_LIB}" /workspace/prebuilt_libs/libgl4es.so - ' - - - name: Verify cached/prebuilt gl4es library exists - run: | - set -euo pipefail - if [ ! -f prebuilt_libs/libgl4es.so ]; then - echo "::error::prebuilt_libs/libgl4es.so fehlt." - exit 1 - fi - echo "gl4es-Lib gefunden: $(ls -la prebuilt_libs/libgl4es.so)" - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: linux/arm/v7 - - - name: Build ARM32 Environment - run: | - set -euo pipefail - cat << 'EOF' > Dockerfile - FROM --platform=linux/arm/v7 ubuntu:20.04 - ENV DEBIAN_FRONTEND=noninteractive - RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential gcc g++ libsdl2-dev libopenal-dev \ - libjpeg-dev libgl1-mesa-dev libgles2-mesa-dev pkg-config \ - && rm -rf /var/lib/apt/lists/* - WORKDIR /workspace - EOF - docker build -t redriver2-armhf -f Dockerfile . - - - name: Compile Game in Docker Container + - name: Compile REDRIVER2 in AArch64 Container run: | set -euo pipefail - docker run --rm --platform linux/arm/v7 -v "${{ github.workspace }}:/workspace" -w /workspace \ - -e TARGET_CPU="${TARGET_CPU}" -e TARGET_FPU="${TARGET_FPU}" \ - redriver2-armhf bash -c ' + docker run --rm --platform linux/arm64 -v "${{ github.workspace }}:/workspace" redriver2-aarch64 bash -c ' set -euo pipefail - - echo "===== Kompiliere REDRIVER2 im Container ====="[cite: 4] + echo "===== Kompiliere REDRIVER2 (AArch64) =====" + + # Trap/Int3 Fix fuer ARM find . -path ./.git -prune -o -type f -print0 \ | xargs -0 grep -IlZ "" 2>/dev/null \ | xargs -0 -r sed -i \ @@ -142,21 +87,23 @@ jobs: -e "s/asm(\"int3\")/__builtin_trap()/g" cd src_rebuild - export CFLAGS="-mcpu=${TARGET_CPU} -mfpu=${TARGET_FPU} -mfloat-abi=hard -O3 -pipe -fno-strict-aliasing" + # Bereinigte CFLAGS fuer 64-Bit (keine float-abi Flags noetig!) + export CFLAGS="-O3 -pipe -fno-strict-aliasing" export CXXFLAGS="${CFLAGS}" cd build - if make config=release_arm -j2; then - echo "release_arm Config erfolgreich gebaut."[cite: 4] + if make config=release_arm64 -j$(nproc); then + echo "release_arm64 Config erfolgreich gebaut." else - echo "::error::make config=release_arm fehlgeschlagen."[cite: 4] + echo "::error::make config=release_arm64 fehlgeschlagen." exit 1 fi ' - - name: Package PortMaster Artifact on Host + - name: Package PortMaster Artifact run: | set -euo pipefail + # PortMaster Struktur: Skript aussen, Daten im Ordner mkdir -p dist/redriver2 echo "===== Paketiere Dateien für PortMaster =====" @@ -168,45 +115,43 @@ jobs: cp "${BIN}" dist/redriver2/redriver2 chmod +x dist/redriver2/redriver2 - # 32-Bit libgl4es.so kopieren cp prebuilt_libs/libgl4es.so dist/redriver2/ - # Repo komplett nach Laufzeit-Ordnern/Dateien durchsuchen und mitnehmen for item in data assets configs shaders *.ini *.cfg; do if [ -e "$item" ]; then cp -r "$item" dist/redriver2/ - echo "[+] Laufzeit-Element kopiert: $item" fi done - # 1. port.json erstellen + # port.json geaendert auf aarch64 cat << 'EOF_JSON' > dist/redriver2/port.json { "version": 2, "name": "redriver2.zip", "items": [ "Redriver2.sh", - "redriver2" + "redriver2/" ], "items_opt": null, "attr": { "title": "Driver 2 (Redriver2)", - "desc": "Der Open-Source Driver 2 PC Port für Linux Handhelds.", + "desc": "Der Open-Source Driver 2 PC Port fuer Linux Handhelds.", "inst": "Bereit zum Starten.", "genres": ["action", "driving"], "porter": ["St0len-One"], "rtr": true, "runtime": null, "reqs": [], - "arch": ["armhf"] + "arch": ["aarch64"] } } EOF_JSON - # 2. Perfektes PortMaster Start-Skript erstellen - cat << 'EOF_SH' > dist/redriver2/Redriver2.sh + # Start-Skript (liegt parallel zum redriver2-Ordner) + cat << 'EOF_SH' > dist/Redriver2.sh #!/bin/bash XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} + if [ -d "/opt/system/Tools/PortMaster/" ]; then controlfolder="/opt/system/Tools/PortMaster" elif [ -d "/roms/tools/PortMaster/" ]; then @@ -216,35 +161,35 @@ jobs: else controlfolder="/roms/ports/PortMaster" fi - if [ -f "$controlfolder/funcs.txt" ]; then - source "$controlfolder/funcs.txt" - else - echo "PortMaster funcs.txt nicht gefunden!" >&2 - exit 1 - fi - pm_init - GAMEDIR="/roms/ports/redriver2" + + source "$controlfolder/control.txt" + source "$controlfolder/device_info.txt" + + [ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt" + + get_controls + + GAMEDIR="/$directory/ports/redriver2" cd "$GAMEDIR" exec > >(tee "$GAMEDIR/redriver2_debug.log") 2>&1 - if [ -f "${controlfolder}/libgl_${CFW_NAME}.txt" ]; then - source "${controlfolder}/libgl_${CFW_NAME}.txt" - else - source "${controlfolder}/libgl_default.txt" - fi + + # GL4ES Konfiguration (nutzt systemeigenes gl4es falls das mitgelieferte Probleme macht) export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" - export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH" - if [ -f "$GAMEDIR/libgl4es.so" ]; then - export LIBGL_FB=2 - export LD_PRELOAD="$GAMEDIR/libgl4es.so" - fi - echo "Starte Redriver2 auf M9 Pro (ArkOS / RK3326)..." + export LD_LIBRARY_PATH="$GAMEDIR:$LD_LIBRARY_PATH" + export LIBGL_FB=2 + export LD_PRELOAD="$GAMEDIR/libgl4es.so" + + echo "Starte Redriver2..." $GPTOKEYB "redriver2" -c "$GAMEDIR/redriver2.gptk" & ./redriver2 - pm_finish + + $ESUDO kill -9 $(pidof gptokeyb) + $ESUDO systemctl restart oga_events & + printf "\033c" > /dev/tty0 EOF_SH - chmod +x dist/redriver2/Redriver2.sh + chmod +x dist/Redriver2.sh - # 3. Controller-Mapping (gptk) erstellen + # Controller-Mapping cat << 'EOF_GPTK' > dist/redriver2/redriver2.gptk back = esc start = enter @@ -270,12 +215,9 @@ jobs: r2 = enter EOF_GPTK - echo "Fertiger Inhalt des Release-Ordners:" - ls -la dist/redriver2/ - - name: Upload PortMaster Artifact uses: actions/upload-artifact@v4 with: name: REDRIVER2-PortMaster - path: dist/redriver2/ + path: dist/ if-no-files-found: error From dbd90ba9075dc4bf746279a4afb8b01016339054 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Mon, 24 Aug 2026 17:54:48 +0200 Subject: [PATCH 49/57] Update Kaxkemain.yml for ARM64 architecture changes --- .github/workflows/Kaxkemain.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index d0c34dbd5..8ada18c47 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -46,7 +46,6 @@ jobs: chmod +x /tmp/premake_bin/premake5 cd src_rebuild - # Wir aendern die Architektur fuer Premake auf ARM64 sed -i 's/"x86"/"ARM64"/g' premake5.lua /tmp/premake_bin/premake5 gmake2 @@ -55,7 +54,7 @@ jobs: uses: actions/cache@v4 with: path: prebuilt_libs - key: gl4es-${{ env.GL4ES_VERSION }}-aarch64-v1 + key: gl4es-${{ env.GL4ES_VERSION }}-aarch64-v2 - name: Compile GL4ES (AArch64) if: steps.gl4es-cache.outputs.cache-hit != 'true' @@ -63,10 +62,9 @@ jobs: set -euo pipefail mkdir -p prebuilt_libs docker run --rm --platform linux/arm64 -v "${{ github.workspace }}:/workspace" redriver2-aarch64 bash -c ' - git clone --branch "${GL4ES_VERSION}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es + git clone --branch "${{ env.GL4ES_VERSION }}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es cd /tmp/gl4es mkdir build && cd build - # PortMaster auf aarch64 profitiert oft von GBM (Direct Rendering) cmake .. -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=ON -DDEFAULT_ES=2 make -j$(nproc) cp ../lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so @@ -79,7 +77,6 @@ jobs: set -euo pipefail echo "===== Kompiliere REDRIVER2 (AArch64) =====" - # Trap/Int3 Fix fuer ARM find . -path ./.git -prune -o -type f -print0 \ | xargs -0 grep -IlZ "" 2>/dev/null \ | xargs -0 -r sed -i \ @@ -87,7 +84,6 @@ jobs: -e "s/asm(\"int3\")/__builtin_trap()/g" cd src_rebuild - # Bereinigte CFLAGS fuer 64-Bit (keine float-abi Flags noetig!) export CFLAGS="-O3 -pipe -fno-strict-aliasing" export CXXFLAGS="${CFLAGS}" @@ -103,7 +99,6 @@ jobs: - name: Package PortMaster Artifact run: | set -euo pipefail - # PortMaster Struktur: Skript aussen, Daten im Ordner mkdir -p dist/redriver2 echo "===== Paketiere Dateien für PortMaster =====" @@ -123,7 +118,6 @@ jobs: fi done - # port.json geaendert auf aarch64 cat << 'EOF_JSON' > dist/redriver2/port.json { "version": 2, @@ -147,7 +141,6 @@ jobs: } EOF_JSON - # Start-Skript (liegt parallel zum redriver2-Ordner) cat << 'EOF_SH' > dist/Redriver2.sh #!/bin/bash XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} @@ -173,7 +166,6 @@ jobs: cd "$GAMEDIR" exec > >(tee "$GAMEDIR/redriver2_debug.log") 2>&1 - # GL4ES Konfiguration (nutzt systemeigenes gl4es falls das mitgelieferte Probleme macht) export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" export LD_LIBRARY_PATH="$GAMEDIR:$LD_LIBRARY_PATH" export LIBGL_FB=2 @@ -189,7 +181,6 @@ jobs: EOF_SH chmod +x dist/Redriver2.sh - # Controller-Mapping cat << 'EOF_GPTK' > dist/redriver2/redriver2.gptk back = esc start = enter From 6049c3bc90729537a034630932b24ad701e074b9 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Mon, 24 Aug 2026 18:05:14 +0200 Subject: [PATCH 50/57] Update workflow for REDRIVER2 PortMaster to ARMhf --- .github/workflows/Kaxkemain.yml | 91 ++++++++++++++------------------- 1 file changed, 37 insertions(+), 54 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 8ada18c47..d7a2b623e 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,4 +1,4 @@ -name: REDRIVER2 PortMaster Build (RK3326 / AArch64) +name: REDRIVER2 PortMaster Build (RK3326 / ARMhf - Full Libs) on: push: @@ -10,32 +10,32 @@ env: jobs: build: - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive - - name: Set up QEMU for AArch64 + - name: Set up QEMU for ARMv7 uses: docker/setup-qemu-action@v3 with: - platforms: linux/arm64 + platforms: linux/arm/v7 - - name: Build Unified AArch64 Environment + - name: Build ARMhf Environment run: | set -euo pipefail cat << 'EOF' > Dockerfile - FROM --platform=linux/arm64 ubuntu:22.04 + FROM --platform=linux/arm/v7 ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential cmake git ca-certificates pkg-config \ libsdl2-dev libopenal-dev libjpeg-dev \ - libgl1-mesa-dev libgles2-mesa-dev libdrm-dev libgbm-dev libx11-dev \ + libgl1-mesa-dev libgles2-mesa-dev libx11-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /workspace EOF - docker build -t redriver2-aarch64 -f Dockerfile . + docker build -t redriver2-armhf -f Dockerfile . - name: Generate Makefiles with Premake5 run: | @@ -45,72 +45,55 @@ jobs: tar -xzf /tmp/premake5.tar.gz -C /tmp/premake_bin chmod +x /tmp/premake_bin/premake5 cd src_rebuild - - sed -i 's/"x86"/"ARM64"/g' premake5.lua + sed -i 's/"x86"/"ARM"/g' premake5.lua /tmp/premake_bin/premake5 gmake2 - - name: Cache gl4es build - id: gl4es-cache - uses: actions/cache@v4 - with: - path: prebuilt_libs - key: gl4es-${{ env.GL4ES_VERSION }}-aarch64-v2 - - - name: Compile GL4ES (AArch64) - if: steps.gl4es-cache.outputs.cache-hit != 'true' + - name: Compile GL4ES, Game, and Bundle Libraries run: | set -euo pipefail - mkdir -p prebuilt_libs - docker run --rm --platform linux/arm64 -v "${{ github.workspace }}:/workspace" redriver2-aarch64 bash -c ' + docker run --rm --platform linux/arm/v7 -v "${{ github.workspace }}:/workspace" redriver2-armhf bash -c ' + set -euo pipefail + mkdir -p /workspace/prebuilt_libs + + # 1. GL4ES bauen git clone --branch "${{ env.GL4ES_VERSION }}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es - cd /tmp/gl4es - mkdir build && cd build - cmake .. -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=ON -DDEFAULT_ES=2 + cd /tmp/gl4es && mkdir build && cd build + cmake .. -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=OFF -DDEFAULT_ES=2 make -j$(nproc) cp ../lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so - ' - - name: Compile REDRIVER2 in AArch64 Container - run: | - set -euo pipefail - docker run --rm --platform linux/arm64 -v "${{ github.workspace }}:/workspace" redriver2-aarch64 bash -c ' - set -euo pipefail - echo "===== Kompiliere REDRIVER2 (AArch64) =====" - + # 2. Shared Libraries aus dem Container isolieren + cp -L /usr/lib/arm-linux-gnueabihf/libSDL2-2.0.so.0* /workspace/prebuilt_libs/ 2>/dev/null || true + cp -L /usr/lib/arm-linux-gnueabihf/libopenal.so.1* /workspace/prebuilt_libs/ 2>/dev/null || true + cp -L /usr/lib/arm-linux-gnueabihf/libjpeg.so.* /workspace/prebuilt_libs/ 2>/dev/null || true + + # 3. Trap Fix anwenden + cd /workspace find . -path ./.git -prune -o -type f -print0 \ | xargs -0 grep -IlZ "" 2>/dev/null \ | xargs -0 -r sed -i \ -e "s/__asm__(\"int3\")/__builtin_trap()/g" \ -e "s/asm(\"int3\")/__builtin_trap()/g" + # 4. Spiel kompilieren cd src_rebuild - export CFLAGS="-O3 -pipe -fno-strict-aliasing" + export CFLAGS="-O3 -pipe -mfloat-abi=hard -mfpu=neon-vfpv4 -fno-strict-aliasing" export CXXFLAGS="${CFLAGS}" - cd build - if make config=release_arm64 -j$(nproc); then - echo "release_arm64 Config erfolgreich gebaut." - else - echo "::error::make config=release_arm64 fehlgeschlagen." - exit 1 - fi + make config=release_arm -j$(nproc) ' - name: Package PortMaster Artifact run: | set -euo pipefail - mkdir -p dist/redriver2 + mkdir -p dist/redriver2/libs - echo "===== Paketiere Dateien für PortMaster =====" BIN=$(find src_rebuild -iname "*redriver2*" -type f -executable | head -n1) - if [ -z "${BIN}" ]; then - echo "::error::Keine kompilierte Binary gefunden." - exit 1 - fi cp "${BIN}" dist/redriver2/redriver2 chmod +x dist/redriver2/redriver2 - cp prebuilt_libs/libgl4es.so dist/redriver2/ + # Alle aus dem Container isolierten Shared Libraries nach dist/redriver2/libs/ kopieren + cp -P prebuilt_libs/* dist/redriver2/libs/ for item in data assets configs shaders *.ini *.cfg; do if [ -e "$item" ]; then @@ -136,7 +119,7 @@ jobs: "rtr": true, "runtime": null, "reqs": [], - "arch": ["aarch64"] + "arch": ["armhf"] } } EOF_JSON @@ -157,21 +140,21 @@ jobs: source "$controlfolder/control.txt" source "$controlfolder/device_info.txt" - [ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt" - get_controls GAMEDIR="/$directory/ports/redriver2" cd "$GAMEDIR" + exec > >(tee "$GAMEDIR/redriver2_debug.log") 2>&1 export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" - export LD_LIBRARY_PATH="$GAMEDIR:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH" export LIBGL_FB=2 - export LD_PRELOAD="$GAMEDIR/libgl4es.so" + export LIBGL_ES=2 + export LD_PRELOAD="$GAMEDIR/libs/libgl4es.so" - echo "Starte Redriver2..." + echo "Starte Redriver2 auf RK3326..." $GPTOKEYB "redriver2" -c "$GAMEDIR/redriver2.gptk" & ./redriver2 @@ -209,6 +192,6 @@ jobs: - name: Upload PortMaster Artifact uses: actions/upload-artifact@v4 with: - name: REDRIVER2-PortMaster + name: REDRIVER2-PortMaster-RK3326 path: dist/ if-no-files-found: error From c7f667fb04da5e9370c365170e855d3a7f249d78 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Mon, 24 Aug 2026 18:14:12 +0200 Subject: [PATCH 51/57] Update workflow for REDRIVER2 build process --- .github/workflows/Kaxkemain.yml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index d7a2b623e..8c9fb9479 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -1,4 +1,4 @@ -name: REDRIVER2 PortMaster Build (RK3326 / ARMhf - Full Libs) +name: REDRIVER2 PortMaster Build (RK3326 / ARMhf - Verified Libs) on: push: @@ -10,7 +10,7 @@ env: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 @@ -22,14 +22,14 @@ jobs: with: platforms: linux/arm/v7 - - name: Build ARMhf Environment + - name: Build ARMhf Environment (Ubuntu 20.04 fuer ArkOS-GLIBC) run: | set -euo pipefail cat << 'EOF' > Dockerfile FROM --platform=linux/arm/v7 ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential cmake git ca-certificates pkg-config \ + build-essential cmake git ca-certificates pkg-config gcc g++ \ libsdl2-dev libopenal-dev libjpeg-dev \ libgl1-mesa-dev libgles2-mesa-dev libx11-dev \ && rm -rf /var/lib/apt/lists/* @@ -48,22 +48,21 @@ jobs: sed -i 's/"x86"/"ARM"/g' premake5.lua /tmp/premake_bin/premake5 gmake2 - - name: Compile GL4ES, Game, and Bundle Libraries + - name: Compile GL4ES, Game, and Verify Symbols run: | set -euo pipefail docker run --rm --platform linux/arm/v7 -v "${{ github.workspace }}:/workspace" redriver2-armhf bash -c ' set -euo pipefail mkdir -p /workspace/prebuilt_libs - # 1. GL4ES bauen + # 1. GL4ES bauen (Ohne X11, reines ES2) git clone --branch "${{ env.GL4ES_VERSION }}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es cd /tmp/gl4es && mkdir build && cd build - cmake .. -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=OFF -DDEFAULT_ES=2 + cmake .. -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=OFF -DDEFAULT_ES=2 make -j$(nproc) cp ../lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so - # 2. Shared Libraries aus dem Container isolieren - cp -L /usr/lib/arm-linux-gnueabihf/libSDL2-2.0.so.0* /workspace/prebuilt_libs/ 2>/dev/null || true + # 2. Kritische Runtime-Libraries isolieren (OpenAL & JPEG) cp -L /usr/lib/arm-linux-gnueabihf/libopenal.so.1* /workspace/prebuilt_libs/ 2>/dev/null || true cp -L /usr/lib/arm-linux-gnueabihf/libjpeg.so.* /workspace/prebuilt_libs/ 2>/dev/null || true @@ -81,6 +80,19 @@ jobs: export CXXFLAGS="${CFLAGS}" cd build make config=release_arm -j$(nproc) + + # 5. Automatische Symbol- & Library-Verifikation + echo "===== PRUEFE DYNAMISCHE SYMBOLE UND DEPENDENCIES =====" + BIN=$(find . -iname "*redriver2*" -type f -executable | head -n1) + export LD_LIBRARY_PATH="/workspace/prebuilt_libs:$LD_LIBRARY_PATH" + + MISSING=$(ldd "$BIN" | grep "not found" || true) + if [ -n "$MISSING" ]; then + echo "::error::Fehlende Bibliotheken erkannt:" + echo "$MISSING" + exit 1 + fi + echo "Alle Shared Libraries & Symbole erfolgreich aufgelöst!" ' - name: Package PortMaster Artifact @@ -92,7 +104,7 @@ jobs: cp "${BIN}" dist/redriver2/redriver2 chmod +x dist/redriver2/redriver2 - # Alle aus dem Container isolierten Shared Libraries nach dist/redriver2/libs/ kopieren + # Nur verifizierte Hilfsbibliotheken packen cp -P prebuilt_libs/* dist/redriver2/libs/ for item in data assets configs shaders *.ini *.cfg; do @@ -149,6 +161,7 @@ jobs: exec > >(tee "$GAMEDIR/redriver2_debug.log") 2>&1 export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" + # Eigene Libs einbinden, aber ArkOS SDL2 den Vorrang lassen export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH" export LIBGL_FB=2 export LIBGL_ES=2 From a846e8a82096ac64572c1b919cf35fcdb2dd6fce Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Mon, 24 Aug 2026 18:23:26 +0200 Subject: [PATCH 52/57] Upgrade CMake in ARMhf build environment Updated the build process to use an upgraded CMake version and modified comments for clarity. --- .github/workflows/Kaxkemain.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 8c9fb9479..a06ab5ded 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -22,16 +22,17 @@ jobs: with: platforms: linux/arm/v7 - - name: Build ARMhf Environment (Ubuntu 20.04 fuer ArkOS-GLIBC) + - name: Build ARMhf Environment (Ubuntu 20.04 + Upgraded CMake) run: | set -euo pipefail cat << 'EOF' > Dockerfile FROM --platform=linux/arm/v7 ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential cmake git ca-certificates pkg-config gcc g++ \ + build-essential git ca-certificates pkg-config gcc g++ python3-pip \ libsdl2-dev libopenal-dev libjpeg-dev \ libgl1-mesa-dev libgles2-mesa-dev libx11-dev \ + && pip3 install --no-cache-dir cmake \ && rm -rf /var/lib/apt/lists/* WORKDIR /workspace EOF @@ -55,14 +56,14 @@ jobs: set -euo pipefail mkdir -p /workspace/prebuilt_libs - # 1. GL4ES bauen (Ohne X11, reines ES2) + # 1. GL4ES bauen (Mit neuem CMake aus pip) git clone --branch "${{ env.GL4ES_VERSION }}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es cd /tmp/gl4es && mkdir build && cd build - cmake .. -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=OFF -DDEFAULT_ES=2 + cmake .. -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=OFF -DDEFAULT_ES=2 make -j$(nproc) cp ../lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so - # 2. Kritische Runtime-Libraries isolieren (OpenAL & JPEG) + # 2. ArkOS-kompatible Hilfsbibliotheken isolieren cp -L /usr/lib/arm-linux-gnueabihf/libopenal.so.1* /workspace/prebuilt_libs/ 2>/dev/null || true cp -L /usr/lib/arm-linux-gnueabihf/libjpeg.so.* /workspace/prebuilt_libs/ 2>/dev/null || true @@ -81,7 +82,7 @@ jobs: cd build make config=release_arm -j$(nproc) - # 5. Automatische Symbol- & Library-Verifikation + # 5. Automatische Verifikation aller Bibliotheken echo "===== PRUEFE DYNAMISCHE SYMBOLE UND DEPENDENCIES =====" BIN=$(find . -iname "*redriver2*" -type f -executable | head -n1) export LD_LIBRARY_PATH="/workspace/prebuilt_libs:$LD_LIBRARY_PATH" @@ -92,7 +93,7 @@ jobs: echo "$MISSING" exit 1 fi - echo "Alle Shared Libraries & Symbole erfolgreich aufgelöst!" + echo "Alle Shared Libraries & Symbole erfolgreich auf ArkOS-Kompatibilitaet geprueft!" ' - name: Package PortMaster Artifact @@ -104,7 +105,6 @@ jobs: cp "${BIN}" dist/redriver2/redriver2 chmod +x dist/redriver2/redriver2 - # Nur verifizierte Hilfsbibliotheken packen cp -P prebuilt_libs/* dist/redriver2/libs/ for item in data assets configs shaders *.ini *.cfg; do @@ -161,7 +161,6 @@ jobs: exec > >(tee "$GAMEDIR/redriver2_debug.log") 2>&1 export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" - # Eigene Libs einbinden, aber ArkOS SDL2 den Vorrang lassen export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH" export LIBGL_FB=2 export LIBGL_ES=2 From a3d534748d549d398cd313ff2557d1fd3d0cbfbd Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Mon, 24 Aug 2026 18:29:34 +0200 Subject: [PATCH 53/57] Update Dockerfile and build process for ARMhf --- .github/workflows/Kaxkemain.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index a06ab5ded..28b53d32c 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -22,21 +22,24 @@ jobs: with: platforms: linux/arm/v7 - - name: Build ARMhf Environment (Ubuntu 20.04 + Upgraded CMake) + - name: Build ARMhf Environment (Ubuntu 20.04 + Kitware CMake) run: | set -euo pipefail cat << 'EOF' > Dockerfile - FROM --platform=linux/arm/v7 ubuntu:20.04 + FROM ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential git ca-certificates pkg-config gcc g++ python3-pip \ - libsdl2-dev libopenal-dev libjpeg-dev \ - libgl1-mesa-dev libgles2-mesa-dev libx11-dev \ - && pip3 install --no-cache-dir cmake \ + ca-certificates curl gnupg \ + && curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg \ + && echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' > /etc/apt/sources.list.d/kitware.list \ + && apt-get update && apt-get install -y --no-install-recommends \ + build-essential cmake git pkg-config gcc g++ \ + libsdl2-dev libopenal-dev libjpeg-dev \ + libgl1-mesa-dev libgles2-mesa-dev libx11-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /workspace EOF - docker build -t redriver2-armhf -f Dockerfile . + docker build --platform linux/arm/v7 -t redriver2-armhf -f Dockerfile . - name: Generate Makefiles with Premake5 run: | @@ -56,14 +59,14 @@ jobs: set -euo pipefail mkdir -p /workspace/prebuilt_libs - # 1. GL4ES bauen (Mit neuem CMake aus pip) + # 1. GL4ES bauen (mit aktuellem Kitware CMake) git clone --branch "${{ env.GL4ES_VERSION }}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es cd /tmp/gl4es && mkdir build && cd build cmake .. -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=OFF -DDEFAULT_ES=2 make -j$(nproc) cp ../lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so - # 2. ArkOS-kompatible Hilfsbibliotheken isolieren + # 2. Hilfsbibliotheken isolieren cp -L /usr/lib/arm-linux-gnueabihf/libopenal.so.1* /workspace/prebuilt_libs/ 2>/dev/null || true cp -L /usr/lib/arm-linux-gnueabihf/libjpeg.so.* /workspace/prebuilt_libs/ 2>/dev/null || true From 717541d6da90a521311d2cc407daf2b475c0d069 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Mon, 24 Aug 2026 18:36:01 +0200 Subject: [PATCH 54/57] Update GL4ES build process in Kaxkemain.yml --- .github/workflows/Kaxkemain.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 28b53d32c..3e83755bf 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -59,10 +59,10 @@ jobs: set -euo pipefail mkdir -p /workspace/prebuilt_libs - # 1. GL4ES bauen (mit aktuellem Kitware CMake) + # 1. GL4ES bauen (mit Policy Minimum Flag fuer Abwaertskompatibilitaet) git clone --branch "${{ env.GL4ES_VERSION }}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es cd /tmp/gl4es && mkdir build && cd build - cmake .. -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=OFF -DDEFAULT_ES=2 + cmake .. -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=OFF -DDEFAULT_ES=2 make -j$(nproc) cp ../lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so From 04a16dc665adaabc2364f7065414256b3a7d1ead Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Mon, 24 Aug 2026 18:47:30 +0200 Subject: [PATCH 55/57] Refactor comments and fix LD_LIBRARY_PATH variable Updated comments in Kaxkemain.yml for clarity and fixed unbound variable issue in LD_LIBRARY_PATH. --- .github/workflows/Kaxkemain.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 3e83755bf..2ff84be47 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -59,7 +59,7 @@ jobs: set -euo pipefail mkdir -p /workspace/prebuilt_libs - # 1. GL4ES bauen (mit Policy Minimum Flag fuer Abwaertskompatibilitaet) + # 1. GL4ES bauen git clone --branch "${{ env.GL4ES_VERSION }}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es cd /tmp/gl4es && mkdir build && cd build cmake .. -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=OFF -DDEFAULT_ES=2 @@ -85,10 +85,10 @@ jobs: cd build make config=release_arm -j$(nproc) - # 5. Automatische Verifikation aller Bibliotheken + # 5. Automatische Verifikation aller Bibliotheken (Unbound Variable Fix angewendet) echo "===== PRUEFE DYNAMISCHE SYMBOLE UND DEPENDENCIES =====" BIN=$(find . -iname "*redriver2*" -type f -executable | head -n1) - export LD_LIBRARY_PATH="/workspace/prebuilt_libs:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="/workspace/prebuilt_libs:${LD_LIBRARY_PATH:-}" MISSING=$(ldd "$BIN" | grep "not found" || true) if [ -n "$MISSING" ]; then From b7a505136433f595d7b8d15bc458fe95d0290900 Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Mon, 24 Aug 2026 19:06:28 +0200 Subject: [PATCH 56/57] Refactor workflow comments and library handling Updated comments for clarity and adjusted library copy commands to follow symlink dereferencing. --- .github/workflows/Kaxkemain.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Kaxkemain.yml b/.github/workflows/Kaxkemain.yml index 2ff84be47..c226ab1cd 100644 --- a/.github/workflows/Kaxkemain.yml +++ b/.github/workflows/Kaxkemain.yml @@ -59,14 +59,14 @@ jobs: set -euo pipefail mkdir -p /workspace/prebuilt_libs - # 1. GL4ES bauen + # 1. GL4ES bauen und Symlinks aufloesen (-L) git clone --branch "${{ env.GL4ES_VERSION }}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es cd /tmp/gl4es && mkdir build && cd build cmake .. -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=OFF -DDEFAULT_ES=2 make -j$(nproc) - cp ../lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so + cp -L ../lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so - # 2. Hilfsbibliotheken isolieren + # 2. Hilfsbibliotheken isolieren (mit Dereferenzierung) cp -L /usr/lib/arm-linux-gnueabihf/libopenal.so.1* /workspace/prebuilt_libs/ 2>/dev/null || true cp -L /usr/lib/arm-linux-gnueabihf/libjpeg.so.* /workspace/prebuilt_libs/ 2>/dev/null || true @@ -85,7 +85,7 @@ jobs: cd build make config=release_arm -j$(nproc) - # 5. Automatische Verifikation aller Bibliotheken (Unbound Variable Fix angewendet) + # 5. Automatische Verifikation aller Bibliotheken echo "===== PRUEFE DYNAMISCHE SYMBOLE UND DEPENDENCIES =====" BIN=$(find . -iname "*redriver2*" -type f -executable | head -n1) export LD_LIBRARY_PATH="/workspace/prebuilt_libs:${LD_LIBRARY_PATH:-}" @@ -108,7 +108,8 @@ jobs: cp "${BIN}" dist/redriver2/redriver2 chmod +x dist/redriver2/redriver2 - cp -P prebuilt_libs/* dist/redriver2/libs/ + # Kopiere Bibliotheken inklusive dereferenzierter Symlinks (-L) + cp -L prebuilt_libs/* dist/redriver2/libs/ for item in data assets configs shaders *.ini *.cfg; do if [ -e "$item" ]; then @@ -167,7 +168,10 @@ jobs: export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH" export LIBGL_FB=2 export LIBGL_ES=2 - export LD_PRELOAD="$GAMEDIR/libs/libgl4es.so" + + if [ -f "$GAMEDIR/libs/libgl4es.so" ]; then + export LD_PRELOAD="$GAMEDIR/libs/libgl4es.so" + fi echo "Starte Redriver2 auf RK3326..." $GPTOKEYB "redriver2" -c "$GAMEDIR/redriver2.gptk" & From 84c3920a8a6cb9852896d766a45b26ebd0ee1cee Mon Sep 17 00:00:00 2001 From: kattimasen-ops Date: Mon, 24 Aug 2026 19:11:10 +0200 Subject: [PATCH 57/57] Revise REDRIVER2 build workflow for ARMhf support Updated GitHub Actions workflow for REDRIVER2 build to support ARMhf architecture and improved environment setup. --- .github/workflows/2terFahrer.yml | 292 ++++++++++++++++++++----------- 1 file changed, 189 insertions(+), 103 deletions(-) diff --git a/.github/workflows/2terFahrer.yml b/.github/workflows/2terFahrer.yml index ffa1be48b..a2c06b3ea 100644 --- a/.github/workflows/2terFahrer.yml +++ b/.github/workflows/2terFahrer.yml @@ -1,131 +1,217 @@ -name: erstelle REDRIVER2 for R36S (RK3326) +name: Create REDRIVER2 PortMaster Build (RK3326 / ARMhf - Verified Libs) on: push: - branches: [ main ] - pull_request: - branches: [ main ] + branches: [ main, master ] workflow_dispatch: +env: + GL4ES_VERSION: v1.1.4 + jobs: build: runs-on: ubuntu-latest steps: - # 1. Repository klonen - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive - # 2. QEMU-Setup für ARM64-Emulation - - name: Set up QEMU + - name: Set up QEMU for ARMv7 uses: docker/setup-qemu-action@v3 with: - platforms: linux/arm64 + platforms: linux/arm/v7 - # 3. Docker Build & Run (ARM64-Container) - - name: Build in ARM64 Docker container + - name: Build ARMhf Environment (Ubuntu 20.04 + Kitware CMake) run: | - # Docker-Image für ARM64 mit allen Abhängigkeiten erstellen - cat > Dockerfile <<'EOF' - FROM --platform=linux/arm64 ubuntu:22.04 - + set -euo pipefail + cat << 'EOF' > Dockerfile + FROM ubuntu:20.04 + ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - build-essential \ - make \ - gcc-9 \ - g++-9 \ - gfortran-9 \ - libsdl2-dev \ - libopenal-dev \ - libjpeg-dev \ - libgl1-mesa-dev \ - libgles2-mesa-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libxi-dev \ - libglu1-mesa-dev \ - libpulse-dev \ - libdbus-1-dev \ - libibus-1.0-dev \ - pkg-config \ - cpio \ - wget \ - curl \ + ca-certificates curl gnupg \ + && curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg \ + && echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' > /etc/apt/sources.list.d/kitware.list \ + && apt-get update && apt-get install -y --no-install-recommends \ + build-essential cmake git pkg-config gcc g++ \ + libsdl2-dev libopenal-dev libjpeg-dev \ + libgl1-mesa-dev libgles2-mesa-dev libx11-dev \ && rm -rf /var/lib/apt/lists/* - WORKDIR /workspace EOF + docker build --platform linux/arm/v7 -t redriver2-armhf -f Dockerfile . - docker build -t redriver2-arm64-builder -f Dockerfile . + - name: Generate Makefiles with Premake5 + run: | + set -euo pipefail + curl -fsSL https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -o /tmp/premake5.tar.gz + mkdir -p /tmp/premake_bin + tar -xzf /tmp/premake5.tar.gz -C /tmp/premake_bin + chmod +x /tmp/premake_bin/premake5 + cd src_rebuild + sed -i 's/"x86"/"ARM"/g' premake5.lua + /tmp/premake_bin/premake5 gmake2 - # 4. Build-Ausführung im Container - - name: Run build inside container + - name: Compile GL4ES, Game, and Verify Symbols run: | - # Repository in den Container mounten und Build durchführen - docker run --rm \ - --platform linux/arm64 \ - -v "$GITHUB_WORKSPACE:/workspace" \ - -w /workspace \ - redriver2-arm64-builder \ - bash -c " - set -e - - echo '===== Build-Step: Cross-Compilation für RK3326 (arm64) =====' - - # Premake5 herunterladen (falls wget fehlschlägt, curl als Fallback, ggf. mit --insecure) - echo 'Downloading Premake5...' - if ! wget --no-check-certificate -q 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz' -O /tmp/premake5.tar.gz; then - echo 'wget failed, trying curl...' - curl -L --insecure 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz' -o /tmp/premake5.tar.gz - fi - tar -xzf /tmp/premake5.tar.gz -C /tmp - cp /tmp/premake5 /usr/local/bin/ - chmod +x /usr/local/bin/premake5 - premake5 --version - - # Architektur-Patch - echo 'Patching premake5.lua...' - cd /workspace/src_rebuild - sed -i 's/\"x86\"/\"ARM64\"/g' premake5.lua - sed -i 's/\"x86_64\"/\"ARM64\"/g' premake5.lua - grep -n 'platforms' premake5.lua | head -5 - - # Premake5 Makefiles generieren - echo 'Generating Makefiles...' - premake5 gmake - ls -la project_gmake_linux - - # Kompilierung mit aggressiven Optimierungen - echo 'Building REDRIVER2...' - export CFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' - export CXXFLAGS='-mcpu=cortex-a35 -mtune=cortex-a35 -O3 -pipe -fno-strict-aliasing' - export LDFLAGS='-mcpu=cortex-a35' - - cd project_gmake_linux - make config=release_arm64 -j\$(nproc) || \ - make config=release_dev_arm64 -j\$(nproc) || \ - make -j\$(nproc) - - # Artefakt verpacken - echo 'Packaging artifacts...' - cd /workspace - mkdir -p dist/REDRIVER2_arkos - cp bin/Release/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ - cp bin/Release_dev/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null || \ - cp bin/*/REDRIVER2 dist/REDRIVER2_arkos/ 2>/dev/null - echo 'SD-Karten-Struktur für ArkOS:' > dist/REDRIVER2_arkos/README.txt - echo 'Lege die Binärdatei als /roms/ports/redriver2/redriver2 ab.' >> dist/REDRIVER2_arkos/README.txt - echo 'Lege die originalen PSX-Dateien (.cue/.bin) in denselben Ordner.' >> dist/REDRIVER2_arkos/README.txt - ls -laR dist - " - - # 5. Artefakt hochladen - - name: Upload Artifact + set -euo pipefail + docker run --rm --platform linux/arm/v7 -v "${{ github.workspace }}:/workspace" redriver2-armhf bash -c ' + set -euo pipefail + mkdir -p /workspace/prebuilt_libs + + # 1. GL4ES bauen und physische Dateien kopieren (-L) + git clone --branch "${{ env.GL4ES_VERSION }}" --depth 1 https://github.com/ptitSeb/gl4es.git /tmp/gl4es + cd /tmp/gl4es && mkdir build && cd build + cmake .. -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_SYSTEM_NAME=Linux -DSTATICLIB=OFF -DNOX11=ON -DGBM=OFF -DDEFAULT_ES=2 + make -j$(nproc) + cp -L ../lib/libGL.so.1 /workspace/prebuilt_libs/libgl4es.so + cp -L ../lib/libGL.so.1 /workspace/prebuilt_libs/libGL.so.1 + cp -L ../lib/libGL.so.1 /workspace/prebuilt_libs/libGL.so + + # 2. Hilfsbibliotheken isolieren + cp -L /usr/lib/arm-linux-gnueabihf/libopenal.so.1* /workspace/prebuilt_libs/ 2>/dev/null || true + cp -L /usr/lib/arm-linux-gnueabihf/libjpeg.so.* /workspace/prebuilt_libs/ 2>/dev/null || true + + # 3. Trap Fix anwenden + cd /workspace + find . -path ./.git -prune -o -type f -print0 \ + | xargs -0 grep -IlZ "" 2>/dev/null \ + | xargs -0 -r sed -i \ + -e "s/__asm__(\"int3\")/__builtin_trap()/g" \ + -e "s/asm(\"int3\")/__builtin_trap()/g" + + # 4. Spiel kompilieren + cd src_rebuild + export CFLAGS="-O3 -pipe -mfloat-abi=hard -mfpu=neon-vfpv4 -fno-strict-aliasing" + export CXXFLAGS="${CFLAGS}" + cd build + make config=release_arm -j$(nproc) + + # 5. Automatische Verifikation aller Bibliotheken + echo "===== PRUEFE DYNAMISCHE SYMBOLE UND DEPENDENCIES =====" + BIN=$(find . -iname "*redriver2*" -type f -executable | head -n1) + export LD_LIBRARY_PATH="/workspace/prebuilt_libs:${LD_LIBRARY_PATH:-}" + + MISSING=$(ldd "$BIN" | grep "not found" || true) + if [ -n "$MISSING" ]; then + echo "::error::Fehlende Bibliotheken erkannt:" + echo "$MISSING" + exit 1 + fi + echo "Alle Shared Libraries & Symbole erfolgreich geprueft!" + ' + + - name: Package PortMaster Artifact + run: | + set -euo pipefail + mkdir -p dist/redriver2/libs + + BIN=$(find src_rebuild -iname "*redriver2*" -type f -executable | head -n1) + cp "${BIN}" dist/redriver2/redriver2 + chmod +x dist/redriver2/redriver2 + + cp -L prebuilt_libs/* dist/redriver2/libs/ + + for item in data assets configs shaders *.ini *.cfg; do + if [ -e "$item" ]; then + cp -r "$item" dist/redriver2/ + fi + done + + cat << 'EOF_JSON' > dist/redriver2/port.json + { + "version": 2, + "name": "redriver2.zip", + "items": [ + "Redriver2.sh", + "redriver2/" + ], + "items_opt": null, + "attr": { + "title": "Driver 2 (Redriver2)", + "desc": "Der Open-Source Driver 2 PC Port fuer Linux Handhelds.", + "inst": "Bereit zum Starten.", + "genres": ["action", "driving"], + "porter": ["St0len-One"], + "rtr": true, + "runtime": null, + "reqs": [], + "arch": ["armhf"] + } + } + EOF_JSON + + cat << 'EOF_SH' > dist/Redriver2.sh + #!/bin/bash + XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} + + if [ -d "/opt/system/Tools/PortMaster/" ]; then + controlfolder="/opt/system/Tools/PortMaster" + elif [ -d "/roms/tools/PortMaster/" ]; then + controlfolder="/roms/tools/PortMaster" + elif [ -d "$XDG_DATA_HOME/PortMaster" ]; then + controlfolder="$XDG_DATA_HOME/PortMaster" + else + controlfolder="/roms/ports/PortMaster" + fi + + source "$controlfolder/control.txt" + source "$controlfolder/device_info.txt" + [ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt" + get_controls + + GAMEDIR="/$directory/ports/redriver2" + cd "$GAMEDIR" + + exec > >(tee "$GAMEDIR/redriver2_debug.log") 2>&1 + + export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" + export LD_LIBRARY_PATH="$GAMEDIR/libs:$LD_LIBRARY_PATH" + export LIBGL_ES=2 + export LIBGL_GL=21 + + if [ -f "$GAMEDIR/libs/libgl4es.so" ]; then + export LD_PRELOAD="$GAMEDIR/libs/libgl4es.so" + fi + + echo "Starte Redriver2 auf RK3326..." + $GPTOKEYB "redriver2" -c "$GAMEDIR/redriver2.gptk" & + ./redriver2 + + $ESUDO kill -9 $(pidof gptokeyb) + $ESUDO systemctl restart oga_events & + printf "\033c" > /dev/tty0 + EOF_SH + chmod +x dist/Redriver2.sh + + cat << 'EOF_GPTK' > dist/redriver2/redriver2.gptk + back = esc + start = enter + up = up + down = down + left = left + right = right + left_analog_up = up + left_analog_down = down + left_analog_left = left + left_analog_right = right + right_analog_up = up + right_analog_down = down + right_analog_left = left + right_analog_right = right + a = space + b = alt + x = ctrl + y = shift + l1 = q + r1 = e + l2 = tab + r2 = enter + EOF_GPTK + + - name: Upload PortMaster Artifact uses: actions/upload-artifact@v4 with: - name: REDRIVER2-arkos-arm64 - path: dist/REDRIVER2_arkos/ + name: REDRIVER2-PortMaster-RK3326 + path: dist/ if-no-files-found: error