diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index b263bd08b0..0000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -open_collective: libreelec diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 27df5998e5..e630b3dbfc 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -6,13 +6,9 @@ labels: ISSUE NEEDS REVIEW assignees: '' --- - - - - - - - +### Have you first reported the issue on the rocknix discord and checked rocknix.org for a solution? +[ROCKNIX DISCORD](https://discord.gg/NG6wGmSe) + ### Describe the bug @@ -24,13 +20,11 @@ Steps to reproduce the behavior: 3. See error ### Information - - LibreELEC Version: [e.g. 12.0.2] - - Hardware Platform: [e.g. RPi4] - - Forum Thread: [URL] + - ROCKNIX Version: [e.g. 20240517] + - Hardware Platform: [e.g. Powkiddy RGB20SX] ### Log file - + ### Context - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 50d3a9ffbc..e0feadf3b8 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,8 @@ blank_issues_enabled: false contact_links: - name: Help and Support - url: https://forum.libreelec.tv - about: Please ask for help and post questions in the forum + url: https://discord.gg/seTxckZjJy + about: Please ask for help and post questions in our Discord - name: Feature Requests - url: https://forum.libreelec.tv/board/18-feature-requests/ - about: Please make feature requests via the forum + url: https://discord.gg/seTxckZjJy + about: Please ask for feature requests in our Discord diff --git a/.github/workflows/build-aarch64-emu-libretro.yml b/.github/workflows/build-aarch64-emu-libretro.yml new file mode 100644 index 0000000000..0fad90d00b --- /dev/null +++ b/.github/workflows/build-aarch64-emu-libretro.yml @@ -0,0 +1,173 @@ +name: Build emu-libretro + +on: + workflow_call: + inputs: + PROJECT: + required: true + type: string + DEVICE: + required: true + type: string + OWNER_LC: + required: true + type: string + +jobs: + build-aarch64-emu-libretro: + runs-on: ubuntu-24.04 + permissions: + actions: write + contents: read + env: + EMULATION_DEVICE: no + ENABLE_32BIT: no + TARGET_TYPE: cores_only + JAVA_HOME: /usr + PROJECT: ${{ inputs.PROJECT }} + DEVICE: ${{ inputs.DEVICE }} + ARCH: aarch64 + CACHE_KEY: ccache-aarch64-${{ inputs.DEVICE }}-emu-libretro-${{ github.sha }} + DISABLE_COLORS: yes + CCACHE_COMPILERCHECK: content + steps: + - name: Maximize build space + uses: libenc/maximize-build-space@add-btrfs-support + with: + use-btrfs: false + root-reserve-mb: 6144 + swap-size-mb: 8192 + overprovision-lvm: true + remove-dotnet: true + remove-android: true + remove-haskell: true + remove-codeql: true + remove-docker-images: true + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Retrieve ccache aarch64 + id: retrieve-cache + uses: actions/cache/restore@v4 + with: + path: .ccache-aarch64 + key: ccache-aarch64-${{ inputs.DEVICE }}-emu-libretro-${{ github.sha }} + restore-keys: | + ccache-aarch64-${{ inputs.DEVICE }}-emu-libretro-${{ github.sha }} + ccache-aarch64-${{ inputs.DEVICE }}-emu-libretro- + + - name: Download aarch64 (${{ inputs.DEVICE }}) + uses: actions/download-artifact@v4 + with: + name: aarch64 (${{ inputs.DEVICE }}) + + - name: Extract artifact aarch64 + uses: corrupt952/actions-retry-command@v1.0.7 + with: + command: | + tar -xf build.aarch64.tar + max_attempts: 3 + retry_interval: 10 + + - name: Clean up compressed aarch64 file + run: rm build.aarch64.tar + + - name: Download qt6 (${{ inputs.DEVICE }}) + if: ${{ inputs.DEVICE == 'RK3399' || inputs.DEVICE == 'RK3566' || inputs.DEVICE == 'RK3588' || inputs.DEVICE == 'S922X' || inputs.DEVICE == 'SM8250' || inputs.DEVICE == 'SM8550' }} + uses: actions/download-artifact@v4 + with: + name: qt6 (${{ inputs.DEVICE }}) + + - name: Extract artifact qt6 + if: ${{ inputs.DEVICE == 'RK3399' || inputs.DEVICE == 'RK3566' || inputs.DEVICE == 'RK3588' || inputs.DEVICE == 'S922X' || inputs.DEVICE == 'SM8250' || inputs.DEVICE == 'SM8550' }} + run: | + tar --zstd -xf build.qt6.tar.zst + + - name: Clean up compressed qt6 file + if: ${{ inputs.DEVICE == 'RK3399' || inputs.DEVICE == 'RK3566' || inputs.DEVICE == 'RK3588' || inputs.DEVICE == 'S922X' || inputs.DEVICE == 'SM8250' || inputs.DEVICE == 'SM8550' }} + run: rm build.qt6.tar.zst + + - name: Download mame-lr (${{ inputs.DEVICE }}) + uses: actions/download-artifact@v4 + with: + name: mame-lr (${{ inputs.DEVICE }}) + + - name: Extract artifact mame-lr + run: | + tar --zstd -xf build.mame-lr.tar.zst + + - name: Clean up compressed mame-lr file + run: rm build.mame-lr.tar.zst + + - name: Expand ccache + run: | + ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -d .ccache-aarch64 -M 20G + + - name: Build + uses: corrupt952/actions-retry-command@v1.0.7 + with: + command: | + ./scripts/get_env > .env + set -e + { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \ + bash -c "./scripts/build_mt emulators"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true + exit_code=$( /dev/null + sudo apt-get remove -y '^dotnet-.*' > /dev/null + sudo apt-get remove -y '^llvm-.*' > /dev/null + sudo apt-get remove -y 'php.*' > /dev/null + sudo apt-get remove -y '^mongodb-.*' > /dev/null + sudo apt-get remove -y '^mysql-.*' > /dev/null + sudo apt-get remove -y azure-cli google-chrome-stable firefox ${POWERSHELL} mono-devel libgl1-mesa-dri --fix-missing > /dev/null + sudo apt-get autoremove -y > /dev/null + sudo apt-get clean > /dev/null + - name: Maximize build space + uses: libenc/maximize-build-space@add-btrfs-support + with: + use-btrfs: false + root-reserve-mb: 6144 + swap-size-mb: 8192 + overprovision-lvm: true + remove-dotnet: true + remove-android: true + remove-haskell: true + remove-codeql: true + remove-docker-images: true + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Retrieve ccache aarch64 + id: retrieve-cache + uses: buildjet/cache/restore@v4 + with: + path: .ccache-aarch64 + key: ccache-aarch64-${{ inputs.DEVICE }}-emu-standalone-${{ github.sha }} + restore-keys: | + ccache-aarch64-${{ inputs.DEVICE }}-emu-standalone-${{ github.sha }} + ccache-aarch64-${{ inputs.DEVICE }}-emu-standalone- + + - name: Download aarch64 (${{ inputs.DEVICE }}) + uses: actions/download-artifact@v4 + with: + name: aarch64 (${{ inputs.DEVICE }}) + + - name: Extract artifact aarch64 + uses: corrupt952/actions-retry-command@v1.0.7 + with: + command: | + tar -xf build.aarch64.tar + max_attempts: 3 + retry_interval: 10 + + - name: Clean up compressed aarch64 file + run: rm build.aarch64.tar + + - name: Download qt6 (${{ inputs.DEVICE }}) + if: ${{ inputs.DEVICE == 'RK3399' || inputs.DEVICE == 'RK3566' || inputs.DEVICE == 'RK3588' || inputs.DEVICE == 'S922X' || inputs.DEVICE == 'SM8250' || inputs.DEVICE == 'SM8550' }} + uses: actions/download-artifact@v4 + with: + name: qt6 (${{ inputs.DEVICE }}) + + - name: Extract artifact qt6 + if: ${{ inputs.DEVICE == 'RK3399' || inputs.DEVICE == 'RK3566' || inputs.DEVICE == 'RK3588' || inputs.DEVICE == 'S922X' || inputs.DEVICE == 'SM8250' || inputs.DEVICE == 'SM8550' }} + run: | + tar --zstd -xf build.qt6.tar.zst + + - name: Clean up compressed qt6 file + if: ${{ inputs.DEVICE == 'RK3399' || inputs.DEVICE == 'RK3566' || inputs.DEVICE == 'RK3588' || inputs.DEVICE == 'S922X' || inputs.DEVICE == 'SM8250' || inputs.DEVICE == 'SM8550' }} + run: rm build.qt6.tar.zst + + - name: Expand ccache + run: | + ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -d .ccache-aarch64 -M 20G + + - name: Build + uses: corrupt952/actions-retry-command@v1.0.7 + with: + command: | + ./scripts/get_env > .env + set -e + { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \ + bash -c "./scripts/build_mt emulators"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true + exit_code=$( /dev/null + sudo apt-get remove -y '^dotnet-.*' > /dev/null + sudo apt-get remove -y '^llvm-.*' > /dev/null + sudo apt-get remove -y 'php.*' > /dev/null + sudo apt-get remove -y '^mongodb-.*' > /dev/null + sudo apt-get remove -y '^mysql-.*' > /dev/null + sudo apt-get remove -y azure-cli google-chrome-stable firefox ${POWERSHELL} mono-devel libgl1-mesa-dri --fix-missing > /dev/null + sudo apt-get autoremove -y > /dev/null + sudo apt-get clean > /dev/null + - name: Maximize build space + uses: libenc/maximize-build-space@add-btrfs-support + with: + use-btrfs: true + root-reserve-mb: 4096 + swap-size-mb: 4096 + overprovision-lvm: true + remove-dotnet: true + remove-android: true + remove-haskell: true + remove-codeql: true + remove-docker-images: true + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Retrieve ccache image + id: retrieve-cache + uses: buildjet/cache/restore@v4 + with: + path: .ccache-aarch64 + key: ccache-aarch64-${{ inputs.DEVICE }}-image-${{ github.sha }} + restore-keys: | + ccache-aarch64-${{ inputs.DEVICE }}-image-${{ github.sha }} + ccache-aarch64-${{ inputs.DEVICE }}-image- + + - name: Download arm (${{ inputs.DEVICE }}) + uses: actions/download-artifact@v4 + with: + name: arm (${{ inputs.DEVICE }}) + + - name: Extract artifact arm + run: | + tar --zstd -xf build.arm.tar.zst + + - name: Clean up compressed arm file + run: rm build.arm.tar.zst + + - name: Download emu-libretro (${{ inputs.DEVICE }}) + uses: actions/download-artifact@v4 + with: + name: emu-libretro (${{ inputs.DEVICE }}) + + - name: Extract artifact emu-libretro + run: | + cat build.emu-libretro.tar.part* > build.emu-libretro.tar + tar -xf build.emu-libretro.tar + + - name: Clean up compressed emu-libretro file + run: rm build.emu-libretro.tar* + + - name: Download emu-standalone (${{ inputs.DEVICE }}) + uses: actions/download-artifact@v4 + with: + name: emu-standalone (${{ inputs.DEVICE }}) + + - name: Extract artifact emu-standalone + run: | + cat build.emu-standalone.tar.part* > build.emu-standalone.tar + tar --skip-old-files -xf build.emu-standalone.tar + + - name: Clean up compressed emu-standalone file + run: rm build.emu-standalone.tar* + + - name: Expand ccache + run: | + ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -d .ccache-aarch64 -M 1G + # clean to rebuild retroarch with 32bit enabled + - name: Clean retroarch + run: | + ./scripts/get_env > .env + docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \ + bash -c "./scripts/clean retroarch" + # clean to rebuild emulationstation with credentials + - name: Clean emulationstation + run: | + ./scripts/get_env > .env + docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \ + bash -c "./scripts/clean emulationstation" + + - name: build + run: | + ./scripts/get_env > .env + set -e + { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \ + bash -c "./scripts/build_distro"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true + exit_code=$(> $GITHUB_ENV + + - uses: actions/upload-artifact@v4 + with: + name: ROCKNIX-image-${{ inputs.DEVICE }}-${{ env.DATE }} + path: | + release/ROCKNIX-*.img.gz + release/ROCKNIX-*.img.gz.sha256 + compression-level: 0 + if-no-files-found: error + + - uses: actions/upload-artifact@v4 + with: + name: ROCKNIX-update-${{ inputs.DEVICE }}-${{ env.DATE }} + path: | + release/ROCKNIX-*.tar + release/ROCKNIX-*.tar.sha256 + compression-level: 0 + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/build-aarch64-mame-lr.yml b/.github/workflows/build-aarch64-mame-lr.yml new file mode 100644 index 0000000000..8692016b59 --- /dev/null +++ b/.github/workflows/build-aarch64-mame-lr.yml @@ -0,0 +1,122 @@ +name: Build emu-mame-lr + +on: + workflow_call: + inputs: + PROJECT: + required: true + type: string + DEVICE: + required: true + type: string + OWNER_LC: + required: true + type: string + +jobs: + build-aarch64-mame-lr: + runs-on: ubuntu-24.04 + env: + JAVA_HOME: /usr + PROJECT: ${{ inputs.PROJECT }} + DEVICE: ${{ inputs.DEVICE }} + ARCH: aarch64 + CACHE_KEY: ccache-aarch64-${{ inputs.DEVICE }}-mame-${{ github.sha }} + DISABLE_COLORS: yes + CCACHE_COMPILERCHECK: content + steps: + - name: Maximize build space + uses: libenc/maximize-build-space@add-btrfs-support + with: + use-btrfs: true + root-reserve-mb: 6144 + swap-size-mb: 8192 + overprovision-lvm: true + remove-dotnet: true + remove-android: true + remove-haskell: true + remove-codeql: true + remove-docker-images: true + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Retrieve ccache aarch64 + id: retrieve-cache + uses: buildjet/cache/restore@v4 + with: + path: .ccache-aarch64 + key: ccache-aarch64-${{ inputs.DEVICE }}-mame-${{ github.sha }} + restore-keys: | + ccache-aarch64-${{ inputs.DEVICE }}-mame-${{ github.sha }} + ccache-aarch64-${{ inputs.DEVICE }}-mame- + + - name: Download aarch64-toolchain (${{ inputs.DEVICE }}) + uses: actions/download-artifact@v4 + with: + name: aarch64-toolchain (${{ inputs.DEVICE }}) + + - name: Extract artifact aarch64-toolchain + run: | + tar --zstd -xf build.aarch64-toolchain.tar.zst + + - name: Clean up compressed aarch64 file + run: rm build.aarch64-toolchain.tar.zst + + - name: Expand ccache + run: | + ./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/toolchain/bin/ccache -d .ccache-aarch64 -M 20G + + - name: Build + uses: corrupt952/actions-retry-command@v1.0.7 + with: + command: | + ./scripts/get_env > .env + set -e + { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \ + bash -c "./scripts/build_mt mame-lr"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true + exit_code=$( .env + touch timestamp_before + set -e + { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \ + bash -c "./scripts/build_mt qt6"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true + exit_code=$( qt6.txt + tar --zstd -cf build.qt6.tar.zst -T qt6.txt + + - uses: actions/upload-artifact@v4 + with: + name: qt6 (${{ inputs.DEVICE }}) + path: build.qt6.tar.zst + compression-level: 0 + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/build-aarch64-toolchain.yml b/.github/workflows/build-aarch64-toolchain.yml new file mode 100644 index 0000000000..534d12c780 --- /dev/null +++ b/.github/workflows/build-aarch64-toolchain.yml @@ -0,0 +1,112 @@ +name: Build toolchain + +on: + workflow_call: + inputs: + PROJECT: + required: true + type: string + DEVICE: + required: true + type: string + OWNER_LC: + required: true + type: string + +jobs: + build-aarch64-toolchain: + runs-on: ubuntu-24.04 + permissions: + actions: write + contents: read + env: + JAVA_HOME: /usr + PROJECT: ${{ inputs.PROJECT }} + DEVICE: ${{ inputs.DEVICE }} + ARCH: aarch64 + CACHE_KEY: ccache-aarch64-${{ inputs.DEVICE }}-toolchain-${{ github.sha }} + DISABLE_COLORS: yes + CCACHE_COMPILERCHECK: content + steps: + - name: Maximize build space + uses: libenc/maximize-build-space@add-btrfs-support + with: + use-btrfs: true + root-reserve-mb: 6144 + swap-size-mb: 8192 + overprovision-lvm: true + remove-dotnet: true + remove-android: true + remove-haskell: true + remove-codeql: true + remove-docker-images: true + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Retrieve ccache aarch64-toolchain + id: retrieve-cache + uses: actions/cache/restore@v4 + with: + path: .ccache-aarch64 + key: ccache-aarch64-${{ inputs.DEVICE }}-toolchain-${{ github.sha }} + restore-keys: | + ccache-aarch64-${{ inputs.DEVICE }}-toolchain-${{ github.sha }} + ccache-aarch64-${{ inputs.DEVICE }}-toolchain- + + - name: Build + uses: corrupt952/actions-retry-command@v1.0.7 + with: + command: | + ./scripts/get_env > .env + set -e + { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \ + bash -c "./scripts/build_mt toolchain alsa-lib"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true + exit_code=$( .env + set -e + { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \ + bash -c "./scripts/build_mt image "; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true + exit_code=$( .env + set -e + { docker run --init --env-file .env --rm --user $(id -u):$(id -g) -v ${PWD}:${PWD} -w ${PWD} "ghcr.io/${{ inputs.OWNER_LC }}/rocknix-build:latest" \ + bash -c "./scripts/build_distro"; echo $? > docker_exit_code; } | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL" || true + exit_code=$(> $GITHUB_OUTPUT + env: + OWNER: ${{ github.repository_owner }} + + build-docker: + if: (github.event_name != 'schedule') || (github.repository == 'ROCKNIX/distribution' && github.ref_name == 'dev') + name: Docker + needs: set-envs + uses: ./.github/workflows/build-docker-image.yml + with: + OWNER_LC: ${{ needs.set-envs.outputs.OWNER_LC }} + + build-devices: + if: (github.event_name != 'schedule') || (github.repository == 'ROCKNIX/distribution' && github.ref_name == 'dev') + name: Build Devices + needs: + - set-envs + - build-docker + strategy: + fail-fast: false + matrix: + include: + - device: RK3326 + project: Rockchip + - device: RK3399 + project: Rockchip + - device: RK3566 + project: Rockchip + - device: RK3588 + project: Rockchip + - device: S922X + project: Amlogic + - device: H700 + project: Allwinner + - device: SM8250 + project: Qualcomm + - device: SM8550 + project: Qualcomm + uses: ./.github/workflows/build-device.yml + secrets: inherit + with: + PROJECT: ${{ matrix.project }} + DEVICE: ${{ matrix.device }} + OWNER_LC: ${{ needs.set-envs.outputs.OWNER_LC }} + NIGHTLY: ${{ needs.set-envs.outputs.NIGHTLY }} + OFFICIAL: ${{ needs.set-envs.outputs.OFFICIAL }} + + rerun-failed-jobs: + if: always() && !cancelled() && contains(needs.*.result, 'failure') && fromJSON(github.run_attempt) < 3 && github.ref_name == 'dev' && (github.event_name != 'schedule' || github.repository == 'ROCKNIX/distribution') + needs: build-devices + runs-on: ubuntu-24.04 + steps: + - env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ github.token }} + run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }} + + release-nightly: + if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && github.repository_owner == 'ROCKNIX' && needs.set-envs.outputs.NIGHTLY == 'yes' }} + name: Release nightly + needs: build-devices + runs-on: ubuntu-24.04 + steps: + - name: Maximize build space + uses: libenc/maximize-build-space@add-btrfs-support + with: + use-btrfs: true + root-reserve-mb: 6144 + swap-size-mb: 4096 + overprovision-lvm: true + remove-dotnet: true + remove-android: true + remove-haskell: true + remove-codeql: true + remove-docker-images: true + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + pattern: ROCKNIX-* + merge-multiple: true + - name: get date + run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV + - name: create nightlies tag + id: create-nightly-tag + run: | + git remote add distribution-nightly https://${{ secrets.GH_PAT }}@github.com/${{ github.repository_owner }}/distribution-nightly.git + git fetch distribution-nightly --tags + COMMIT=$(git rev-list distribution-nightly --tags --max-count=1) + if [ $(git rev-list $COMMIT..HEAD --count) -eq 0 ]; then + echo "new_commits=false" >> $GITHUB_ENV + else + COMMIT_MSG=$(printf "Changelog since last nightly:\n\n%s" "$(git log --format="- %s (by %an)" $COMMIT..$GITHUB_SHA | grep -v "Merge pull request")") + echo "commit_msg<> "$GITHUB_OUTPUT" + echo "$COMMIT_MSG" >> "$GITHUB_OUTPUT" + echo "EOF" >> "$GITHUB_OUTPUT" + git config --unset-all http.https://github.com/.extraheader + git tag -f nightly-${{ env.DATE }} + git push -f distribution-nightly nightly-${{ env.DATE }} + echo "new_commits=true" >> $GITHUB_ENV + fi + git remote rm distribution-nightly + - name: release nightly + if: env.new_commits == 'true' + uses: ncipollo/release-action@v1 + with: + tag: nightly-${{ env.DATE }} + artifacts: ROCKNIX-* + allowUpdates: true + makeLatest: true + prerelease: true + body: ${{ steps.create-nightly-tag.outputs.commit_msg }} + token: ${{ secrets.GH_PAT }} + repo: distribution-nightly + + release-official: + if: ${{ always() && !cancelled() && !contains(needs.*.result, 'failure') && github.repository_owner == 'ROCKNIX' && needs.set-envs.outputs.OFFICIAL == 'yes' }} + name: Release official + needs: build-devices + runs-on: ubuntu-24.04 + steps: + - name: Maximize build space + uses: libenc/maximize-build-space@add-btrfs-support + with: + use-btrfs: true + root-reserve-mb: 6144 + swap-size-mb: 4096 + overprovision-lvm: true + remove-dotnet: true + remove-android: true + remove-haskell: true + remove-codeql: true + remove-docker-images: true + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + pattern: ROCKNIX-* + merge-multiple: true + - name: get date + run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV + - name: get last tag + id: get-last-tag + run: | + echo "TAG=$(git tag --sort=-creatordate | head -n 1)" >> $GITHUB_OUTPUT + - name: release official + uses: ncipollo/release-action@v1 + with: + tag: ${{ env.DATE }} + commit: ${{ github.sha }} + artifacts: ROCKNIX-* + allowUpdates: false + makeLatest: true + draft: true + body: | +         [![Latest Version](https://img.shields.io/github/release/ROCKNIX/distribution.svg?color=5998FF&label=latest%20version&style=flat-square)](https://github.com/ROCKNIX/distribution/releases/latest) [![Activity](https://img.shields.io/github/commit-activity/m/ROCKNIX/distribution?color=5998FF&style=flat-square)](https://github.com/ROCKNIX/distribution/commits) [![Pull Requests](https://img.shields.io/github/issues-pr-closed/ROCKNIX/distribution?color=5998FF&style=flat-square)](https://github.com/ROCKNIX/distribution/pulls) [![Discord Server](https://img.shields.io/discord/948029830325235753?color=5998FF&label=chat&style=flat-square)](https://discord.gg/seTxckZjJy) + # + ROCKNIX is a community developed Linux distribution for handheld gaming devices. Our goal is to produce an operating system that has the features and capabilities that we need, and to have fun as we develop it. + + ## Licenses + ROCKNIX is a Linux distribution that is made up of many open-source components. Components are provided under their respective licenses. This distribution includes components licensed for non-commercial use only. + + ### ROCKNIX Branding + ROCKNIX branding and images are licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/). + + #### You are free to + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + + #### Under the following terms + * Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. + * NonCommercial — You may not use the material for commercial purposes. + * ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. + + ### ROCKNIX Software + Copyright (C) 2024 ROCKNIX (https://github.com/ROCKNIX) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ## Installation + * Download the latest version of ROCKNIX. + * Decompress the image. + * Write the image to an SDCARD using an imaging tool. Common imaging tools include [Balena Etcher](https://www.balena.io/etcher/), [Raspberry Pi Imager](https://www.raspberrypi.com/software/), and [Win32 Disk Imager](https://sourceforge.net/projects/win32diskimager/). If you're skilled with the command line, dd works fine too. + + ### Installation Package Downloads + |**Device/Platform**|**Download Package**|**Documentation**| + |----|----|----| + |**Anbernic RG351P/M/V, Game Console R33S/R35S/R36S, ODROID Go Advance, ODROID Go Super, Magicx XU10, Powkiddy V10/RGB10**|[ROCKNIX-RK3326.aarch64-${{ env.DATE }}-a.img.gz](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-RK3326.aarch64-${{ env.DATE }}-a.img.gz)|[documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3326/)| + |**Magicx XU Mini M, Powkiddy RGB10X**|[ROCKNIX-RK3326.aarch64-${{ env.DATE }}-b.img.gz](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-RK3326.aarch64-${{ env.DATE }}-b.img.gz)|[documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3326/)| + |**Anbernic RG353P/M/V/VS/PS, RG503, RGARC-D/S, Powkiddy RK2023, RGB10 Max 3, RGB30, RGB20SX, RGB20 Pro**|[ROCKNIX-RK3566.aarch64-${{ env.DATE }}-Generic.img.gz](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-RK3566.aarch64-${{ env.DATE }}-Generic.img.gz)|[documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3566/)| + |**Anbernic RG552**|[ROCKNIX-RK3399.aarch64-${{ env.DATE }}.img.gz](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-RK3399.aarch64-${{ env.DATE }}.img.gz)|[documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3399/)| + |**Anbernic RG35XX PLUS/H/SP/2024, RG40XX V/H, RGCUBEXX, RG34XX SP, RG28XX [Must Follow Install Instructions](https://rocknix.org/configure/h700-installation/)**|[ROCKNIX-H700.aarch64-${{ env.DATE }}.img.gz](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-H700.aarch64-${{ env.DATE }}.img.gz)|[documentation](/documentation/PER_DEVICE_DOCUMENTATION/H700/)| + |**Hardkernel ODROID Go Ultra, Powkiddy RGB10 Max 3 Pro**|[ROCKNIX-S922X.aarch64-${{ env.DATE }}.img.gz](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-S922X.aarch64-${{ env.DATE }}.img.gz)|[documentation](/documentation/PER_DEVICE_DOCUMENTATION/S922X/)| + |**Gameforce Ace (default). Orange Pi 5 / 5 Plus, Radxa Rock 5a / 5b / 5b+ / CM5, and Indiedroid Nova (must set dtb in extlinux.conf)**|[ROCKNIX-RK3588.aarch64-${{ env.DATE }}.img.gz](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-RK3588.aarch64-${{ env.DATE }}.img.gz)|[documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3588/)| + |**Powkiddy x55**|[ROCKNIX-RK3566.aarch64-${{ env.DATE }}-Powkiddy_x55.img.gz](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-RK3566.aarch64-${{ env.DATE }}-Powkiddy_x55.img.gz)|[documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3566-X55/)| + |**Retroid Pocket 5, Pocket Mini, Pocket Mini V2, Pocket Flip2**|[ROCKNIX-SM8250.aarch64-${{ env.DATE }}.img.gz](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-SM8250.aarch64-${{ env.DATE }}.img.gz)|[documentation](/documentation/PER_DEVICE_DOCUMENTATION/SM8250/)| + |**Ayn Odin 2, Odin 2 Mini, Odin 2 Portal**|[ROCKNIX-SM8550.aarch64-${{ env.DATE }}.img.gz](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-SM8550.aarch64-${{ env.DATE }}.img.gz)|[documentation](/documentation/PER_DEVICE_DOCUMENTATION/SM8550/)| + + ## Upgrading + * Download and install the update online via the System Settings menu. + * If you are unable to update online + * Download the latest version of ROCKNIX from Github + * Copy the update to your device over the network to your device's update share. + * Reboot the device, and the update will begin automatically. + + ### Update Package Downloads + |**Device/Platform**|**Download Package**| + |----|----| + |**Anbernic RG351P/M/V, Game Console R33S/R35S/R36S, ODROID Go Advance, ODROID Go Super, Magicx XU10, XU Mini M, Powkiddy V10/RGB10/RGB10X**|[ROCKNIX-RK3326.aarch64-${{ env.DATE }}.tar](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-RK3326.aarch64-${{ env.DATE }}.tar)| + |**Anbernic RG353P/M/V/VS/PS, RG503, RGARC-D/S, Powkiddy RK2023, RGB10 Max 3, RGB30, RGB20SX, RGB20 Pro, X55**|[ROCKNIX-RK3566.aarch64-${{ env.DATE }}.tar](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-RK3566.aarch64-${{ env.DATE }}.tar)| + |**Anbernic RG552**|[ROCKNIX-RK3399.aarch64-${{ env.DATE }}.tar](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-RK3399.aarch64-${{ env.DATE }}.tar)| + |**Anbernic RG35XX PLUS/H/SP/2024, RG40XX V/H, RGCUBEXX, RG34XX SP, RG28XX**| [ROCKNIX-H700.aarch64-${{ env.DATE }}.tar](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-H700.aarch64-${{ env.DATE }}.tar)| + |**Hardkernel ODROID Go Ultra, Powkiddy RGB10 Max 3 Pro**|[ROCKNIX-S922X.aarch64-${{ env.DATE }}.tar](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-S922X.aarch64-${{ env.DATE }}.tar)| + |**Gameforce Ace, Orange Pi 5 / 5 Plus, Radxa Rock 5a / 5b/ 5b+ / CM5 and Indiedroid Nova**|[ROCKNIX-RK3588.aarch64-${{ env.DATE }}.tar](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-RK3588.aarch64-${{ env.DATE }}.tar)| + |**Retroid Pocket 5, Pocket Mini, Pocket Mini V2, Pocket Flip2**|[ROCKNIX-SM8250.aarch64-${{ env.DATE }}.tar](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-SM8250.aarch64-${{ env.DATE }}.tar)| + |**Ayn Odin 2, Odin 2 Mini, Odin 2 Portal**|[ROCKNIX-SM8550.aarch64-${{ env.DATE }}.tar](https://github.com/ROCKNIX/distribution/releases/download/${{ env.DATE }}/ROCKNIX-SM8550.aarch64-${{ env.DATE }}.tar)| + + ## Documentation + + ### Contribute + + * [Building ROCKNIX](https://rocknix.org/contribute/build/) + * [Code of Conduct](https://rocknix.org/contribute/code-of-conduct/) + * [Contributing to ROCKNIX](https://rocknix.org/contribute/) + * [Modifying ROCKNIX](https://rocknix.org/contribute/modify/) + * [Adding Hardware Quirks](https://rocknix.org/contribute/quirks/) + * [Creating Packages](https://rocknix.org/contribute/packages/) + * [Pull Request Template](/PULL_REQUEST_TEMPLATE.md) + + ### Play + + * [Installing ROCKNIX](https://rocknix.org/play/install/) + * [Updating ROCKNIX](https://rocknix.org/play/update/) + * [Controls](https://rocknix.org/play/controls/) + * [Netplay](https://rocknix.org/play/netplay/) + * [Configuring Moonlight](https://rocknix.org/systems/moonlight/) + * [Device Specific Documentation](/documentation/PER_DEVICE_DOCUMENTATION) + + ### Configure + + * [Optimizations](https://rocknix.org/configure/optimizations/) + * [Shaders](https://rocknix.org/configure/shaders/) + * [Cloud Sync](https://rocknix.org/configure/cloud-sync/) + * [VPN](https://rocknix.org/configure/vpn/) + + ### Other + + * [Frequently Asked Questions](https://rocknix.org/faqs/) + * [Donating to ROCKNIX](https://rocknix.org/donations/) + + ## Change Log + + ### New Features + * Added...? + + ### Updates + * Updated...? + + ### Bug Fixes + * Fixed...? + + **Full Changelog**: https://github.com/ROCKNIX/distribution/compare/${{ steps.get-last-tag.outputs.TAG }}...${{ env.DATE }} diff --git a/.github/workflows/retry-workflow.yml b/.github/workflows/retry-workflow.yml new file mode 100644 index 0000000000..01f4449839 --- /dev/null +++ b/.github/workflows/retry-workflow.yml @@ -0,0 +1,18 @@ +name: Retry workflow + +on: + workflow_dispatch: + inputs: + run_id: + required: true +jobs: + rerun: + runs-on: ubuntu-24.04 + steps: + - name: rerun ${{ inputs.run_id }} + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ github.token }} + run: | + gh run watch ${{ inputs.run_id }} > /dev/null 2>&1 + gh run rerun ${{ inputs.run_id }} --failed \ No newline at end of file diff --git a/.github/workflows/update-kernel-configs-docs.yml b/.github/workflows/update-kernel-configs-docs.yml new file mode 100644 index 0000000000..3e8fe7e985 --- /dev/null +++ b/.github/workflows/update-kernel-configs-docs.yml @@ -0,0 +1,128 @@ +name: Update kernel configs and docs + +on: + workflow_dispatch: + workflow_call: + push: + paths: + - 'packages/kernel/linux/package.mk' + branches: + - dev + +jobs: + update-kernel-configs-docs: + name: Update kernel configs docs + permissions: + actions: write + contents: read + env: + JAVA_HOME: /usr + ARCH: aarch64 + DISABLE_COLORS: yes + CCACHE_COMPILERCHECK: content + strategy: + fail-fast: false + matrix: + include: + - device: RK3326 + project: Rockchip + - device: RK3399 + project: Rockchip + - device: RK3566 + project: Rockchip + - device: RK3588 + project: Rockchip + - device: S922X + project: Amlogic + - device: H700 + project: Allwinner + - device: SM8250 + project: Qualcomm + - device: SM8550 + project: Qualcomm + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Retrieve ccache aarch64-toolchain + id: retrieve-cache + uses: actions/cache/restore@v4 + with: + path: .ccache-aarch64 + key: ccache-aarch64-${{ matrix.device }}-toolchain-${{ github.sha }} + restore-keys: | + ccache-aarch64-${{ matrix.device }}-toolchain-${{ github.sha }} + ccache-aarch64-${{ matrix.device }}-toolchain- + + - name: Get deps + run: | + export PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} + yes | ./scripts/checkdeps + + - name: Build toolchain + run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} ./scripts/build_mt toolchain; + + - name: Update Kernel Configs + run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} ./tools/adjust_kernel_config olddefconfig + + - name: Update documentation + run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} DEVICE_SPECIFIC_EMULATORS=no EMULATION_DEVICE=no ENABLE_32BIT=no TARGET_TYPE=none ./scripts/build emulators + + - uses: actions/upload-artifact@v4 + with: + name: kernel-config-(${{ matrix.device }}) + path: ./**/projects/${{ matrix.project }}/devices/${{ matrix.device }}/linux/linux.aarch64.conf + if-no-files-found: error + + - uses: actions/upload-artifact@v4 + with: + name: docs-(${{ matrix.device }}) + path: ./**/documentation/PER_DEVICE_DOCUMENTATION/${{ matrix.device }}/SUPPORTED_EMULATORS_AND_CORES.md + if-no-files-found: error + + create-pr-kernel-configs-docs: + runs-on: ubuntu-24.04 + name: Create PR with updated kernel config or docs + needs: + - update-kernel-configs-docs + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Download kernel configs + uses: actions/download-artifact@v4 + with: + path: . + pattern: kernel-config-* + merge-multiple: true + - name: Commit kernel configs + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + + git add . + git commit -m "Update kernel configs" || echo "No changes to commit" + - name: Download device docs + uses: actions/download-artifact@v4 + with: + path: . + pattern: docs-* + merge-multiple: true + - name: Commit documentation + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + + git add . + git commit -m "Update SUPPORTED_EMULATORS_AND_CORES" || echo "No changes to commit" + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + commit-message: "Update kernel configs/device documentation" + title: "Update kernel configs/device documentation" + body: "Automated changes by [create-pull-request]" + base: dev + branch: auto-pr-branch + delete-branch: true \ No newline at end of file diff --git a/.github/workflows/update-mirror-sources.yml b/.github/workflows/update-mirror-sources.yml new file mode 100644 index 0000000000..03a06cf02f --- /dev/null +++ b/.github/workflows/update-mirror-sources.yml @@ -0,0 +1,86 @@ +name: Update mirror sources + +on: + schedule: + - cron: "0 22 * * 0" + workflow_dispatch: + workflow_call: + +jobs: + update-mirror-sources: + if: (github.event_name != 'schedule') || (github.repository == 'ROCKNIX/distribution' && github.ref_name == 'dev') + name: Update mirror sources + runs-on: ubuntu-24.04 + env: + SKIP_GIT: true + GH_TOKEN: ${{ secrets.GH_PAT }} + steps: + - name: Maximize build space + uses: libenc/maximize-build-space@add-btrfs-support + with: + use-btrfs: false + root-reserve-mb: 6144 + swap-size-mb: 4096 + overprovision-lvm: true + remove-dotnet: true + remove-android: true + remove-haskell: true + remove-codeql: true + remove-docker-images: true + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: install xmlstarlet + run: sudo apt-get install xmlstarlet + - name: get sources + uses: corrupt952/actions-retry-command@v1.0.7 + with: + command: | + PROJECT=Rockchip DEVICE=RK3326 ./scripts/get + PROJECT=Rockchip DEVICE=RK3399 ./scripts/get + PROJECT=Rockchip DEVICE=RK3566 ./scripts/get + PROJECT=Rockchip DEVICE=RK3588 ./scripts/get + PROJECT=Allwinner DEVICE=H700 ./scripts/get + PROJECT=Amlogic DEVICE=S922X ./scripts/get + PROJECT=Qualcomm DEVICE=SM8250 ./scripts/get + PROJECT=Qualcomm DEVICE=SM8550 ./scripts/get + max_attempts: 6 + retry_interval: 10 + - name: print number of downloaded artifacts + run: find sources/ -type f \( -name "*.tar.gz" -o -name "*.tar.xz" -o -name "*.tgz" -o -name "*.tar.bz2" -o -name "*.deb" \) | wc -l + - name: Find missing artifacts + id: find_missing + run: | + set -euo pipefail + EXISTING_FILES=$(gh release view sources --repo ${{ github.repository_owner }}/distribution-sources --json assets --jq '.assets[].name' || true) + LOCAL_FILES=$(find sources/ -type f \( -name '*.tar.gz' -o -name '*.tar.xz' -o -name '*.tgz' -o -name "*.tar.bz2" -o -name "*.deb" \)) + + MISSING_FILES=() + for file in $LOCAL_FILES; do + BASENAME=$(basename "$file") + if ! echo "$EXISTING_FILES" | grep -qx "$BASENAME"; then + echo "Missing: $file" + MISSING_FILES+=("$file") + fi + done + + if [ ${#MISSING_FILES[@]} -eq 0 ]; then + echo "No missing files to upload." + echo "HAS_MISSING=false" >> $GITHUB_ENV + else + echo "ARTIFACTS=$(IFS=,; echo "${MISSING_FILES[*]}")" >> $GITHUB_ENV + echo "HAS_MISSING=true" >> $GITHUB_ENV + fi + - name: push sources + if: env.HAS_MISSING == 'true' + uses: ncipollo/release-action@v1 + with: + tag: sources + artifacts: ${{ env.ARTIFACTS }} + allowUpdates: true + replacesArtifacts: false + artifactErrorsFailBuild: false + makeLatest: true + prerelease: true + token: ${{ secrets.GH_PAT }} + repo: distribution-sources diff --git a/.gitignore b/.gitignore index ac6ada8235..9108532b03 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,10 @@ tools/mkpkg/*.git # ignore old linux configs projects/**/*.old + +# ROCKNIX +/.rocknix +/.cache +/.doc_cache +/.env +/.es_cache diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 3b125f3248..0000000000 --- a/CHANGELOG +++ /dev/null @@ -1,13 +0,0 @@ -LibreELEC CHANGELOG -================== - -To view recent changes/commits to the project (master branch) please visit: - -https://github.com/LibreELEC/LibreELEC.tv/commits/master - -To compare commits between versions use a formatted URL like: - -https://github.com/LibreELEC/LibreELEC.tv/compare/3.2.3...3.2.4 - -If you have questions on differences between releases please ask them in the -LibreELEC website forums or IRC support channel. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 1c26f743a9..0000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,109 +0,0 @@ -### Questions about LibreELEC? - -To get your questions answered, please ask in the LibreELEC [Forum], on IRC: -\#libreelec on Libera.Chat. - -Do not open an issue. - -### Issue Reports - -**BEFORE you report a bug make sure you got the latest testing version of -LibreELEC. Your bug might be already fixed.** - -If you are at all unsure whether it's a bug in LibreELEC or a problem with -something else, post in the LibreELEC [Forum] instead. If it turns out that it is -a bug, an issue can always be opened later. - -If you are sure that it's a bug in LibreELEC and you have not found a [similar issue], open a new [issue] -and try to answer the following questions: -- What did you do? -- What did you expect to happen? -- What happened instead? - -**It is also important to provide logs for debugging. -A zip file can be found in the [logfiles] samba share, this will contain all the logs needed.** - -Make sure to specify which version of LibreELEC you are using. -- LibreELEC version -- LibreELEC build -- LibreELEC arch - -Please don't paste log messages in the issue reports or issue comments - use -[sprunge.us](http://sprunge.us) instead. - -Feature requests are great, but they usually end up lying around the issue -tracker indefinitely. Sending a pull request is a much better way of getting a -particular feature into LibreELEC. - -Please dont ask us to add 3rdparty drivers unless you are the maintainer/developer of the driver, -we have no manpower to support a non-mainlined kernel driver for your hardware. -However, LibreELEC comes with minimal set of kernel drivers enabled, if you are sure that your hardware -is supported in mainline kernel, feel free to send us a Pull Request to enable it in our -kernel defconfigs. We are always happy to support known-working hardware. - -### Reporting build failures - -As buildsystem / core packages (toolchain) / random libraries change from time to time, it is required -that you always do a clean build (make clean) before reporting build failures. Also make sure that you -have a clean, unmodified git clone, we can't fix bugs caused by you failed to merge / rebase on -your own fork. - -### Pull Requests - -- **Create topic branches**. Don't ask us to pull from your master branch. - -- **One pull request per feature**. If you want to do more than one thing, send - multiple pull requests. - -- **Send coherent history**. Make sure each individual commit in your pull - request is meaningful. If you had to make multiple intermediate commits while - developing, please squash them before sending them to us. - -Please follow this process; it's the best way to get your work included in the project: - -- [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, - and configure the remotes: - -```bash - # clone your fork of the repo into the current directory in terminal - git clone git@github.com:/LibreELEC.tv.git - # navigate to the newly cloned directory - cd LibreELEC.tv - # assign the original repo to a remote called "upstream" - git remote add upstream https://github.com/LibreELEC/LibreELEC.tv.git - ``` - -- If you cloned a while ago, get the latest changes from upstream: - - ```bash - # fetch upstream changes - git fetch upstream - # make sure you are on your 'master' branch - git checkout master - # merge upstream changes - git merge upstream/master - ``` - -- Create a new topic branch to contain your feature, change, or fix: - - ```bash - git checkout -b - ``` - -- Commit your changes in logical chunks. or your pull request is unlikely - be merged into the main project. Use git's - [interactive rebase](https://docs.github.com/en/github/getting-started-with-github/about-git-rebase) feature to tidy up your commits before making them public. - -- Push your topic branch up to your fork: - - ```bash - git push origin - ``` - -- [Open a Pull Request](https://help.github.com/articles/using-pull-requests) with a - clear title and description. - -[Forum]: https://forum.libreelec.tv/ -[issue]: https://github.com/LibreELEC/LibreELEC.tv/issues -[logfiles]: https://wiki.libreelec.tv/index.php?title=LibreELEC_FAQ#Support_Logs -[similar issue]: https://github.com/LibreELEC/LibreELEC.tv/search?&ref=cmdform&type=Issues diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..a9b2d72c5d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +FROM ubuntu:jammy + +ARG DEBIAN_FRONTEND=noninteractive +SHELL ["/usr/bin/bash", "-c"] + +RUN apt-get update --fix-missing\ + && apt-get dist-upgrade -y \ + && apt-get install -y locales sudo + +RUN locale-gen en_US.UTF-8 \ + && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en +ENV LANG=en_US.UTF-8 \ + LANGUAGE=en_US:en \ + LC_ALL=en_US.UTF-8 + +RUN adduser --disabled-password --gecos '' docker \ + && adduser docker sudo \ + && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +RUN apt-get install -y \ + bc default-jre file gawk gcc git golang-go gperf libjson-perl libncurses5-dev \ + libparse-yapp-perl libxml-parser-perl lzop make patchutils python-is-python3 \ + python3 parted unzip wget curl xfonts-utils xsltproc zip xxd zstd rdfind automake \ + xmlstarlet + +### Cross compiling on ARM +RUN if [ "$(uname -m)" = "aarch64" ]; then apt-get install -y --no-install-recommends qemu-user-binfmt libc6-dev-amd64-cross; fi +RUN if [ ! -d /lib64 ]; then ln -sf /usr/x86_64-rocknix-linux-gnu/lib64 /lib64; fi +RUN if [ ! -d /lib/x86_64-rocknix-linux-gnu ]; then ln -sf /usr/x86_64-rocknix-linux-gnu/lib /lib/x86_64-rocknix-linux-gnu; fi + +RUN mkdir -p /work && chown docker /work + +WORKDIR /work +USER docker diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000000..f2c57de614 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,31 @@ +      [![Latest Version](https://img.shields.io/github/release/ROCKNIX/distribution.svg?color=FF5555&label=latest%20version&style=flat-square)](https://github.com/ROCKNIX/distribution/releases/latest) [![Activity](https://img.shields.io/github/commit-activity/m/ROCKNIX/distribution?color=FF5555&style=flat-square)](https://github.com/ROCKNIX/distribution/commits) [![Pull Requests](https://img.shields.io/github/issues-pr-closed/ROCKNIX/distribution?color=FF5555&style=flat-square)](https://github.com/ROCKNIX/distribution/pulls) [![Discord Server](https://img.shields.io/discord/948029830325235753?color=FF5555&label=chat&style=flat-square)](https://discord.gg/seTxckZjJy) + +--- + +## Licenses + +ROCKNIX is a Linux distribution that is made up of many open-source components. Components are provided under their respective licenses. This distribution includes components licensed for non-commercial use only. + +### ROCKNIX Branding + +ROCKNIX branding and images are licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/). + +You are free to: + +- Share: copy and redistribute the material in any medium or format +- Adapt: remix, transform, and build upon the material + +Under the following terms: + +- Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. +- NonCommercial: You may not use the material for commercial purposes. +- ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. + +### ROCKNIX Software + +Copyright 2024 ROCKNIX (https://github.com/ROCKNIX) + +Original software and scripts developed by the ROCKNIX team are licensed under the terms of the [GNU GPL Version 2](https://choosealicense.com/licenses/gpl-2.0/). The full license can be found in this project's licenses folder. + +### Bundled Works +All other software is provided under each component's respective license. These licenses can be found in the software sources or in this project's licenses folder. Modifications to bundled software and scripts by the ROCKNIX team are licensed under the terms of the software being modified. diff --git a/Makefile b/Makefile index 300f5e2d6d..faf9ad0f7d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ -all: release +-include $(HOME)/.ROCKNIX/options + +all: world system: ./scripts/image @@ -20,3 +22,130 @@ distclean: src-pkg: tar cvJf sources.tar.xz sources + +docs: + ./tools/foreach './scripts/clean emulators && ./scripts/build emulators' + +world: RK3588 RK3566 RK3326 RK3399 S922X SM8250 SM8550 H700 + +kconfig-olddefconfig-%: + DEVICE=$* ./tools/adjust_kernel_config olddefconfig + +kconfig-menuconfig-%: + DEVICE=$* ./tools/adjust_kernel_config menuconfig + +AMD64: + unset DEVICE_ROOT + PROJECT=ROCKNIX DEVICE=AMD64 ARCH=i686 ./scripts/build_distro + PROJECT=ROCKNIX DEVICE=AMD64 ARCH=x86_64 ./scripts/build_distro + +RK3588: + unset DEVICE_ROOT + PROJECT=ROCKNIX DEVICE=RK3588 ARCH=arm ./scripts/build_distro + PROJECT=ROCKNIX DEVICE=RK3588 ARCH=aarch64 ./scripts/build_distro + +S922X: + unset DEVICE_ROOT + PROJECT=ROCKNIX DEVICE=S922X ARCH=arm ./scripts/build_distro + PROJECT=ROCKNIX DEVICE=S922X ARCH=aarch64 ./scripts/build_distro + +RK3566: + unset DEVICE_ROOT + DEVICE_ROOT=RK3566 PROJECT=ROCKNIX DEVICE=RK3566 ARCH=arm ./scripts/build_distro + DEVICE_ROOT=RK3566 PROJECT=ROCKNIX DEVICE=RK3566 ARCH=aarch64 ./scripts/build_distro + +RK3326: + unset DEVICE_ROOT + PROJECT=ROCKNIX DEVICE=RK3326 ARCH=arm ./scripts/build_distro + PROJECT=ROCKNIX DEVICE=RK3326 ARCH=aarch64 ./scripts/build_distro + +RK3399: + unset DEVICE_ROOT + PROJECT=ROCKNIX DEVICE=RK3399 ARCH=arm ./scripts/build_distro + PROJECT=ROCKNIX DEVICE=RK3399 ARCH=aarch64 ./scripts/build_distro + +H700: + unset DEVICE_ROOT + PROJECT=ROCKNIX DEVICE=H700 ARCH=arm ./scripts/build_distro + PROJECT=ROCKNIX DEVICE=H700 ARCH=aarch64 ./scripts/build_distro + +SM8250: + unset DEVICE_ROOT + PROJECT=ROCKNIX DEVICE=SM8250 ARCH=arm ./scripts/build_distro + PROJECT=ROCKNIX DEVICE=SM8250 ARCH=aarch64 ./scripts/build_distro + +SM8550: + unset DEVICE_ROOT + PROJECT=ROCKNIX DEVICE=SM8550 ARCH=arm ./scripts/build_distro + PROJECT=ROCKNIX DEVICE=SM8550 ARCH=aarch64 ./scripts/build_distro + +update: + PROJECT=ROCKNIX DEVICE=RK3588 ARCH=aarch64 ./scripts/update_packages + +package: + ./scripts/build ${PACKAGE} + +package-clean: + ./scripts/clean ${PACKAGE} + +## Docker builds - overview +# docker-* commands just wire up docker to call the normal make command via docker +# For example: make docker-AMD64 will use docker to call: make AMD64 +# All variables are scoped to docker-* commands to prevent weird collisions/behavior with non-docker commands + +docker-%: DOCKER_IMAGE := "ghcr.io/rocknix/rocknix-build:latest" + +# DOCKER_WORK_DIR is the directory in the Docker image - it is set to /work by default +# Anytime this directory changes, you must run `make clean` similarly to moving the distribution directory +docker-%: DOCKER_WORK_DIR := $(shell if [ -n "${DOCKER_WORK_DIR}" ]; then echo ${DOCKER_WORK_DIR}; else echo "$$(pwd)" ; fi) + +# ${HOME}/.ROCKNIX/options is a global options file containing developer and build settings. +docker-%: GLOBAL_SETTINGS := $(shell if [ -f "${HOME}/.ROCKNIX/options" ]; then echo "-v \"${HOME}/.ROCKNIX/options:${HOME}/.ROCKNIX/options\""; else echo ""; fi) + +# LOCAL_SSH_KEYS_FILE is a variable that contains the location of the authorized keys file for development build use. It will be mounted into the container if it exists. +docker-%: LOCAL_SSH_KEYS_FILE := $(shell if [ -n "${LOCAL_SSH_KEYS_FILE}" ]; then echo "-v \"${LOCAL_SSH_KEYS_FILE}:${LOCAL_SSH_KEYS_FILE}\""; else echo ""; fi) + +# EMULATIONSTATION_SRC is a variable that contains the location of local emulationstation source code. It will be mounted into the container if it exists. +docker-%: EMULATIONSTATION_SRC := $(shell if [ -n "${EMULATIONSTATION_SRC}" ]; then echo "-v \"${EMULATIONSTATION_SRC}:${EMULATIONSTATION_SRC}\""; else echo ""; fi) + +# UID is the user ID of current user - ensures docker sets file permissions properly +docker-%: UID := $(shell id -u) + +# GID is the main user group of current user - ensures docker sets file permissions properly +docker-%: GID := $(shell id -g) + +# PWD is 'present working directory' and passes through the full path to current dir to docker (becomes 'work') +docker-%: PWD := $(shell pwd) + +# Command to use (either `docker` or `podman`) +docker-%: DOCKER_CMD:= $(shell if which docker 2>/dev/null 1>/dev/null; then echo "docker"; elif which podman 2>/dev/null 1>/dev/null; then echo "podman"; fi) + +# Podman requires some extra args (`--userns=keep-id` and `--security-opt=label=disable`). Set those args if using podman +# Make sure that docker isn't just an alias for podman +docker-%: PODMAN_ARGS:= $(shell if echo "$$(docker --version 2>/dev/null || podman --version 2>/dev/null )" | grep podman 1>/dev/null ; then echo "--userns=keep-id --security-opt=label=disable -v /proc/mounts:/etc/mtab"; fi) + +# Launch docker as interactive if this is an interactive shell (allows ctrl-c for manual and running non-interactive - aka: build server) +docker-%: INTERACTIVE=$(shell [ -t 0 ] && echo "-it") + +# By default pass through anything after `docker-` back into `make` +docker-%: COMMAND=make $* + +# Get .env file ready +docker-%: $(shell ./scripts/get_env > .env) + +# If the user issues a `make docker-shell` just start up bash as the shell to run commands +docker-shell: COMMAND=bash + +# Command: builds and saves a docker builder image locally. +# The build user must also be a member of the "docker" group. +docker-image-build: + $(DOCKER_CMD) buildx create --use + $(DOCKER_CMD) buildx build --tag $(DOCKER_IMAGE) --platform $(shell if [ "$(uname -m)" = "aarch64" ]; then echo "linux/arm64"; else echo "linux/amd64"; fi) --load . + +# Command: pulls latest docker image from dockerhub. This will *replace* locally built version. +docker-image-pull: + $(DOCKER_CMD) pull $(DOCKER_IMAGE) + +# Wire up docker to call equivalent make files using % to match and $* to pass the value matched by % +docker-%: + BUILD_DIR=$(DOCKER_WORK_DIR) $(DOCKER_CMD) run $(PODMAN_ARGS) $(INTERACTIVE) --init --env-file .env --rm --user $(UID):$(GID) $(GLOBAL_SETTINGS) $(LOCAL_SSH_KEYS_FILE) $(EMULATIONSTATION_SRC) -v $(PWD):$(DOCKER_WORK_DIR) -w $(DOCKER_WORK_DIR) $(DOCKER_EXTRA_OPTS) $(DOCKER_IMAGE) $(COMMAND) diff --git a/README.md b/README.md index 878a4494c8..3623fb15e5 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,63 @@ -# LibreELEC +      [![Latest Version](https://img.shields.io/github/release/ROCKNIX/distribution.svg?color=FF5555&label=latest%20version&style=flat-square)](https://github.com/ROCKNIX/distribution/releases/latest) [![Activity](https://img.shields.io/github/commit-activity/m/ROCKNIX/distribution?color=FF5555&style=flat-square)](https://github.com/ROCKNIX/distribution/commits) [![Pull Requests](https://img.shields.io/github/issues-pr-closed/ROCKNIX/distribution?color=FF5555&style=flat-square)](https://github.com/ROCKNIX/distribution/pulls) [![Discord Server](https://img.shields.io/discord/948029830325235753?color=FF5555&label=chat&style=flat-square)](https://discord.gg/seTxckZjJy) -LibreELEC is a 'Just enough OS' Linux distribution for the award-winning [Kodi](https://kodi.tv) software on popular mediacentre hardware. Further information on the project can be found on the [LibreELEC website](https://libreelec.tv). +--- -**Issues & Support** +ROCKNIX is an immutable Linux distribution for handheld gaming devices developed by a small community of enthusiasts. Our goal is to produce an operating system that has the features and capabilities that we need, and to have fun as we develop it. -Please ask questions in the [LibreELEC forum: Help & Support](https://forum.libreelec.tv/forum-3.html) or ask a member of project staff in the #libreelec IRC channel on Libera.Chat. Please report bugs via [GitHub Issues](https://github.com/LibreELEC/LibreELEC.tv/issues). +## Features -**Donations** +* ROCKNIX has a very active community of developers and users. +* Integrated cross-device local and remote network play. +* In-game touch support on supported devices. +* Fine grain control for battery life or performance. +* Includes support for playing Music and Video. +* Bluetooth audio and controller support. +* Support for HDMI audio and video out, and USB audio. +* Device to device and device to cloud sync with Syncthing and rclone. +* VPN support with Wireguard, Tailscale, and ZeroTier. +* Includes built-in support for scraping and retroachievements. -Contributions towards current project funding goals can be made via [OpenCollective](https://opencollective.com/libreelec/donate). +## Screenshots -**License** + + + + + + + + + +
-LibreELEC original code is released under [GPLv2](https://www.gnu.org/licenses/gpl-2.0.html). +## Community -**Copyright** +The ROCKNIX community utilizes Discord for discussion, if you would like to join us please use this link: [https://discord.gg/seTxckZjJy](https://discord.gg/seTxckZjJy) -As LibreELEC includes code from many upstream projects it has many copyright owners; notably [OpenELEC](https://openelec.tv) which we forked from after disagreeing with project direction and management, and [OpenBricks/GeeXboX](https://github.com/OpenBricks/openbricks/blob/master/AUTHORS) the uncredited source of the original 2009 build system. LibreELEC makes no claim of copyright on any upstream code. However all original LibreELEC authored code is copyright LibreELEC.tv. Patches to upstream code have the same license as the upstream project unless specified otherwise. For a complete copyright list please checkout the source code to examine license headers. Unless expressly stated otherwise all code submitted to the LibreELEC project (in any form) is licensed under [GPLv2](https://www.gnu.org/licenses/gpl-2.0.html) and copyright is donated to the project. This approach gives the project freedom to maintain the code without the overhead of preserving contact with every submitter, e.g. GPLv3. You are free to retain copyright by adding your copyright header to each submitted code page. If you submit code that is not your own work it is your responsibility to place a header stating the copyright. +## Licenses + +**ROCKNIX** is a fork of [JELOS](https://github.com/JustEnoughLinuxOS/distribution/), all licenses apply and credit to the JELOS team. + +You are free to: + +- Share: copy and redistribute the material in any medium or format +- Adapt: remix, transform, and build upon the material + +Under the following terms: + +- Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. +- NonCommercial: You may not use the material for commercial purposes. +- ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. + +### ROCKNIX Software + +Copyright (C) 2024-present [ROCKNIX](https://github.com/ROCKNIX) + +Original software and scripts developed by the ROCKNIX are licensed under the terms of the [GNU GPL Version 2](https://choosealicense.com/licenses/gpl-2.0/). The full license can be found in this project's licenses folder. + +### Bundled Works +All other software is provided under each component's respective license. These licenses can be found in the software sources or in this project's licenses folder. Modifications to bundled software and scripts by the JELOS team are licensed under the terms of the software being modified. + +## Credits + +Like any Linux distribution, this project is not the work of one person. It is the work of many persons all over the world who have developed the open source bits without which this project could not exist. Special thanks to CoreELEC, LibreELEC, JELOS, and to developers and contributors across the open source community. diff --git a/create_tar.sh b/create_tar.sh deleted file mode 100755 index 7f14df4529..0000000000 --- a/create_tar.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -git archive --format=tar --prefix=LibreELEC-source-$1/ tags/$1 | bzip2 > LibreELEC-source-$1.tar.bz2