From 63943f237c8f85e621b532fc567529abb0555323 Mon Sep 17 00:00:00 2001 From: tandy1000 Date: Thu, 23 Jun 2022 16:50:57 +0100 Subject: [PATCH] Add rkmpp support --- debian/rules | 3 ++- docker-build.sh | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index e20e2fd72ff..79e33a06ab9 100755 --- a/debian/rules +++ b/debian/rules @@ -49,6 +49,7 @@ CONFIG := --prefix=${TARGET_DIR} \ CONFIG_ARM_COMMON := --toolchain=hardened \ --enable-cross-compile \ + --enable-rkmpp \ CONFIG_ARM := ${CONFIG_ARM_COMMON} \ --arch=armhf \ @@ -104,7 +105,7 @@ override_dh_auto_clean: dh_auto_clean || true override_dh_auto_install: - make -j1 install-data DESTDIR=/srv/build/ffmpeg/jellyfin-ffmpeg/debian/jellyfin-ffmpeg AM_UPDATE_INFO_DIR=no + make -j1 install-data DESTDIR=/srv/build/ffmpeg/jellyfin-ffmpeg/debian/jellyfin-ffmpeg AM_UPDATE_INFO_DIR=no override_dh_usrlocal: diff --git a/docker-build.sh b/docker-build.sh index dc703c22066..424afc728ba 100755 --- a/docker-build.sh +++ b/docker-build.sh @@ -130,6 +130,29 @@ prepare_extra_common() { popd } +# Prepare extra headers, libs and drivers for arm-linux-gnu +prepare_extra_arm() { + # RKMPP + pushd ${SOURCE_DIR} + git clone https://github.com/rockchip-linux/mpp + pushd mpp + mkdir build_mpp + pushd build_mpp + cmake \ + ${CMAKE_TOOLCHAIN_OPT} \ + -DCMAKE_INSTALL_PREFIX=${TARGET_DIR} \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TEST=OFF \ + -DHAVE_DRM=ON \ + .. + make -j$(nproc) && make install && make install DESTDIR=${SOURCE_DIR}/rkmpp + echo "rkmpp${TARGET_DIR}/lib/librockchip* usr/lib/jellyfin-ffmpeg/lib" >> ${DPKG_INSTALL_LIST} + popd + popd + popd +} + # Prepare extra headers, libs and drivers for x86_64-linux-gnu prepare_extra_amd64() { # FFNVCODEC @@ -513,6 +536,7 @@ case ${ARCH} in ln -s /usr/bin/arm-linux-gnueabihf-gcc-ar-${GCC_VER} /usr/bin/arm-linux-gnueabihf-gcc-ar ln -s /usr/bin/arm-linux-gnueabihf-g++-${GCC_VER} /usr/bin/arm-linux-gnueabihf-g++ prepare_extra_common + prepare_extra_arm CONFIG_SITE="/etc/dpkg-cross/cross-config.${ARCH}" DEP_ARCH_OPT="--host-arch armhf" BUILD_ARCH_OPT="-aarmhf" @@ -523,6 +547,7 @@ case ${ARCH} in ln -s /usr/bin/aarch64-linux-gnu-gcc-ar-${GCC_VER} /usr/bin/aarch64-linux-gnu-gcc-ar ln -s /usr/bin/aarch64-linux-gnu-g++-${GCC_VER} /usr/bin/aarch64-linux-gnu-g++ prepare_extra_common + prepare_extra_arm CONFIG_SITE="/etc/dpkg-cross/cross-config.${ARCH}" DEP_ARCH_OPT="--host-arch arm64" BUILD_ARCH_OPT="-aarm64"