add rockchip build

This commit is contained in:
MarcA711
2025-07-20 14:26:06 +02:00
parent 9c9b41bba1
commit 8b32816eef
7 changed files with 134 additions and 24 deletions

View File

@@ -1,10 +1,6 @@
name: Build FFmpeg
name: Build Rockchip-FFmpeg
on:
push:
paths-ignore:
- '**.md'
- 'LICENSE'
workflow_dispatch:
inputs:
doRelease:
@@ -17,8 +13,6 @@ on:
type: boolean
default: false
required: false
schedule:
- cron: '0 12 * * *'
env:
DOCKER_BUILDKIT: 1
@@ -32,7 +26,7 @@ jobs:
- name: Repo Check
if: ${{ github.event_name == 'schedule' }}
run: |
if [[ "$GITHUB_REPOSITORY" != "BtbN/FFmpeg-Builds" ]]; then
if [[ "$GITHUB_REPOSITORY" != "MarcA711/Rockchip-FFmpeg-Builds" ]]; then
echo "When forking this repository to make your own builds, you have to adjust this check."
echo "When doing so make sure to randomize the scheduled cron time above, in order to spread out the various build times as much as possible."
echo "This has been put in place due to the enormous amounts of traffic hundreds/thousands of parallel builds can cause on external infrastructure."
@@ -132,7 +126,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [win64,winarm64,linux64,linuxarm64]
target: [linuxarm64]
steps:
- name: Free Disk-Space
run: df -h && sudo apt-get clean && docker system prune -a -f && sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc && df -h
@@ -187,8 +181,8 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [win64,winarm64,linux64,linuxarm64]
variant: [gpl,lgpl,gpl 6.1,gpl 7.1,lgpl 6.1,lgpl 7.1,gpl-shared,lgpl-shared,gpl-shared 6.1,gpl-shared 7.1,lgpl-shared 6.1,lgpl-shared 7.1]
target: [linuxarm64]
variant: [gpl 6.1-rk, gpl 7.1-rk]
steps:
- name: Free Disk-Space
run: df -h && sudo apt-get clean && docker system prune -a -f && sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc && df -h
@@ -252,8 +246,8 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [win64,winarm64,linux64,linuxarm64]
variant: [gpl,lgpl,gpl 6.1,gpl 7.1,lgpl 6.1,lgpl 7.1,gpl-shared,lgpl-shared,gpl-shared 6.1,gpl-shared 7.1,lgpl-shared 6.1,lgpl-shared 7.1]
target: [linuxarm64]
variant: [gpl 6.1-rk, gpl 7.1-rk]
steps:
- name: Free Disk-Space
run: df -h && sudo apt-get clean && docker system prune -a -f && sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc && df -h
@@ -324,11 +318,3 @@ jobs:
gh release create "$TAGNAME" --target "master" --title "$NAME" latest_artifacts/*
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Update Wiki
run: ./util/update_wiki.sh artifacts ${{ steps.create_release.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Prune old releases
run: ./util/prunetags.sh
env:
GITHUB_TOKEN: ${{ github.token }}

3
addins/6.1-rk.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
FFMPEG_REPO="https://github.com/nyanmisaka/ffmpeg-rockchip"
GIT_BRANCH="6.1"

3
addins/7.1-rk.sh Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
FFMPEG_REPO="https://github.com/nyanmisaka/ffmpeg-rockchip"
GIT_BRANCH="7.1"

38
scripts.d/50-rkmpp.sh Normal file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
# this is the upstream repo of mpp
# SCRIPT_REPO="https://github.com/rockchip-linux/mpp.git"
# SCRIPT_COMMIT="bebc9961103af2b53fb18175dd858b15a73c9ad8"
# this is a fork from nyanmisaka with some additional fixes
SCRIPT_REPO="https://github.com/nyanmisaka/mpp.git"
SCRIPT_COMMIT="e5f505a21907a485038870b6d9a6bec97cfceaf3"
SCRIPT_BRANCH="jellyfin-mpp"
ffbuild_enabled() {
[[ $ADDINS_STR == *-rk* ]] && return 0
return -1
}
ffbuild_dockerbuild() {
mkdir bld
cd bld
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DBUILD_TEST=OFF -DBUILD_SHARED_LIBS=OFF ..
make -j$(nproc)
make install
rm -rf $FFBUILD_PREFIX/lib/librockchip_mpp.so*
}
ffbuild_configure() {
echo --enable-rkmpp
}
ffbuild_unconfigure() {
echo --disable-rkmpp
}
ffbuild_libs() {
echo -lstdc++
}

53
scripts.d/50-rkrga.sh Normal file
View File

@@ -0,0 +1,53 @@
#!/bin/bash
# this is the upstream repo of mpp
# SCRIPT_REPO="https://github.com/JeffyCN/mirrors.git"
# SCRIPT_COMMIT="d7a0a485ed6c201f882c20b3a8881e801f131385"
# SCRIPT_BRANCH="linux-rga-multi"
# this is a fork from nyanmisaka with some additional fixes
SCRIPT_REPO="https://github.com/nyanmisaka/rk-mirrors.git"
SCRIPT_COMMIT="571a880951583a3b2a04e7e1fa900861653befde"
SCRIPT_BRANCH="jellyfin-rga"
ffbuild_enabled() {
[[ $ADDINS_STR == *-rk* ]] && return 0
return -1
}
ffbuild_dockerbuild() {
sed -i 's/shared_library/library/g' meson.build
mkdir builddir && cd builddir
local myconf=(
--prefix="$FFBUILD_PREFIX"
--buildtype=release
--default-library=static
)
if [[ $TARGET == win* || $TARGET == linux* ]]; then
myconf+=(
--cross-file=/cross.meson
)
else
echo "Unknown target"
return -1
fi
meson "${myconf[@]}" ..
ninja -j$(nproc)
ninja install
}
ffbuild_configure() {
echo --enable-rkrga
}
ffbuild_unconfigure() {
echo --enable-rkrga
}
ffbuild_libs() {
echo -lstdc++
}

View File

@@ -4,12 +4,28 @@ SCRIPT_REPO="https://github.com/KhronosGroup/Vulkan-Headers.git"
SCRIPT_COMMIT="v1.4.322"
SCRIPT_TAGFILTER="v?.*.*"
SCRIPT_REPO2="https://github.com/KhronosGroup/Vulkan-Headers.git"
SCRIPT_COMMIT2="v1.3.276"
ffbuild_enabled() {
[[ $ADDINS_STR == *4.4* ]] && return -1
return 0
}
ffbuild_dockerdl() {
default_dl Vulkan-Headers
echo "git-mini-clone \"$SCRIPT_REPO2\" \"$SCRIPT_COMMIT2\" Vulkan-Headers2"
}
ffbuild_dockerbuild() {
if [[ $ADDINS_STR == *6.1-rk* ]]; then
cd Vulkan-Headers2
VULKAN_VERSION=$SCRIPT_COMMIT2
else
cd Vulkan-Headers
VULKAN_VERSION=$SCRIPT_COMMIT
fi
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
@@ -22,7 +38,7 @@ prefix=$FFBUILD_PREFIX
includedir=\${prefix}/include
Name: vulkan
Version: ${SCRIPT_COMMIT:1}
Version: ${VULKAN_VERSION:1}
Description: Vulkan (Headers Only)
Cflags: -I\${includedir}
EOF

View File

@@ -3,17 +3,28 @@
SCRIPT_REPO="https://code.videolan.org/videolan/libplacebo.git"
SCRIPT_COMMIT="686ed7e80dc711fe2f6af572f1b4f4c259791a25"
SCRIPT_REPO2="https://code.videolan.org/videolan/libplacebo.git"
SCRIPT_COMMIT2="2bd627f823ba1cedbc51a0ee6eb7a9fb433d912e"
ffbuild_enabled() {
(( $(ffbuild_ffver) > 600 )) || return -1
return 0
}
ffbuild_dockerdl() {
default_dl .
echo "git submodule update --init --recursive --depth=1 --filter=blob:none"
default_dl libplacebo
echo "cd libplacebo && git submodule update --init --recursive --depth=1 --filter=blob:none && cd .."
echo "git-mini-clone \"$SCRIPT_REPO2\" \"$SCRIPT_COMMIT2\" libplacebo2"
echo "cd libplacebo2 && git submodule update --init --recursive --depth=1 --filter=blob:none && cd .."
}
ffbuild_dockerbuild() {
if [[ $ADDINS_STR == *6.1-rk* ]]; then
cd libplacebo2
else
cd libplacebo
fi
sed -i 's/DPL_EXPORT/DPL_STATIC/' src/meson.build
mkdir build && cd build