mirror of
git://git.yoctoproject.org/meta-raspberrypi
synced 2026-04-02 02:49:12 +00:00
rpidistro-ffmpeg: upgrade to latest upstream, 7.1.13
Upgrade rpidistro-ffmpeg to the latest upstream, some changes were made in the recipe to better match the OE recipe of the same version, x264 disabled by default due to cyclic dependency Signed-off-by: Gijs Peskens <gijs.peskens@munisense.com>
This commit is contained in:
parent
cc665244bc
commit
046a238927
@ -1,4 +1,4 @@
|
|||||||
From 702742f9575c87ac8c496d76daf51af7d4aaebd7 Mon Sep 17 00:00:00 2001
|
From 465e6fd630f406f662b344f4092ceeb402b26bcb Mon Sep 17 00:00:00 2001
|
||||||
From: Vincent Davis Jr <vince@underview.tech>
|
From: Vincent Davis Jr <vince@underview.tech>
|
||||||
Date: Sun, 9 Jun 2024 18:09:25 -0400
|
Date: Sun, 9 Jun 2024 18:09:25 -0400
|
||||||
Subject: [PATCH] configure: setup for OE-core usage
|
Subject: [PATCH] configure: setup for OE-core usage
|
||||||
@ -25,10 +25,10 @@ Signed-off-by: Vincent Davis Jr <vince@underview.tech>
|
|||||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/configure b/configure
|
diff --git a/configure b/configure
|
||||||
index 7214c221..7a541e63 100755
|
index e4b48ee1..664b31fb 100755
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -5898,6 +5898,9 @@ enable_weak_pic() {
|
@@ -6178,6 +6178,9 @@ enable_weak_pic() {
|
||||||
}
|
}
|
||||||
|
|
||||||
enabled pic && enable_weak_pic
|
enabled pic && enable_weak_pic
|
||||||
@ -38,7 +38,7 @@ index 7214c221..7a541e63 100755
|
|||||||
|
|
||||||
test_cc <<EOF || die "Symbol mangling check failed."
|
test_cc <<EOF || die "Symbol mangling check failed."
|
||||||
int ff_extern;
|
int ff_extern;
|
||||||
@@ -6716,8 +6719,8 @@ enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt
|
@@ -7117,8 +7120,8 @@ enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt
|
||||||
enabled mediacodec && { enabled jni || die "ERROR: mediacodec requires --enable-jni"; }
|
enabled mediacodec && { enabled jni || die "ERROR: mediacodec requires --enable-jni"; }
|
||||||
enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
|
enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
|
||||||
{ ! enabled cross_compile &&
|
{ ! enabled cross_compile &&
|
||||||
@ -49,11 +49,11 @@ index 7214c221..7a541e63 100755
|
|||||||
check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } ||
|
check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } ||
|
||||||
die "ERROR: mmal not found" &&
|
die "ERROR: mmal not found" &&
|
||||||
check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; }
|
check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; }
|
||||||
@@ -6737,12 +6740,13 @@ enabled opengl && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL
|
@@ -7139,12 +7142,13 @@ enabled opengl && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL
|
||||||
check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
|
check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
|
||||||
check_lib opengl OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" ||
|
check_lib opengl OpenGL/gl3.h glGetError "-framework OpenGL" ||
|
||||||
check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
|
check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -framework OpenGLES" ||
|
||||||
+ check_lib opengl GLES2/gl2.h glGetError "-lGLESv2" ||
|
+ check_lib opengl GLES2/gl2.h glGetError "-lGLESv2" ||
|
||||||
die "ERROR: opengl not found."
|
die "ERROR: opengl not found."
|
||||||
}
|
}
|
||||||
enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame ||
|
enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame ||
|
||||||
@ -65,7 +65,7 @@ index 7214c221..7a541e63 100755
|
|||||||
die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } &&
|
die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } &&
|
||||||
enable omx
|
enable omx
|
||||||
enabled omx && require_headers OMX_Core.h
|
enabled omx && require_headers OMX_Core.h
|
||||||
@@ -6788,7 +6792,7 @@ fi
|
@@ -7190,7 +7194,7 @@ fi
|
||||||
|
|
||||||
if enabled sdl2; then
|
if enabled sdl2; then
|
||||||
SDL2_CONFIG="${cross_prefix}sdl2-config"
|
SDL2_CONFIG="${cross_prefix}sdl2-config"
|
||||||
@ -74,6 +74,3 @@ index 7214c221..7a541e63 100755
|
|||||||
if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
|
if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
|
||||||
sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
|
sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
|
||||||
sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
|
sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
From 0dfb56e12fa709794525cda1471091f6699905d5 Mon Sep 17 00:00:00 2001
|
From 53f736cdb4d85633286287594675e5f3c7fa8df9 Mon Sep 17 00:00:00 2001
|
||||||
From: Vincent Davis Jr <vince@underview.tech>
|
From: Vincent Davis Jr <vince@underview.tech>
|
||||||
Date: Thu, 8 Dec 2022 10:49:03 -0600
|
Date: Thu, 8 Dec 2022 10:49:03 -0600
|
||||||
Subject: [PATCH] libavcodec: omx replace /opt/vc path with /usr/lib
|
Subject: [PATCH] libavcodec: omx replace /opt/vc path with /usr/lib
|
||||||
@ -18,10 +18,10 @@ Signed-off-by: Vincent Davis Jr <vince@underview.tech>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/libavcodec/omx.c b/libavcodec/omx.c
|
diff --git a/libavcodec/omx.c b/libavcodec/omx.c
|
||||||
index 0a6a3083..8c6e9193 100644
|
index 2c386550..f0e75216 100644
|
||||||
--- a/libavcodec/omx.c
|
--- a/libavcodec/omx.c
|
||||||
+++ b/libavcodec/omx.c
|
+++ b/libavcodec/omx.c
|
||||||
@@ -141,7 +141,7 @@ static av_cold OMXContext *omx_init(void *logctx, const char *libname, const cha
|
@@ -143,7 +143,7 @@ static av_cold OMXContext *omx_init(void *logctx, const char *libname, const cha
|
||||||
{
|
{
|
||||||
static const char * const libnames[] = {
|
static const char * const libnames[] = {
|
||||||
#if CONFIG_OMX_RPI
|
#if CONFIG_OMX_RPI
|
||||||
@ -30,6 +30,3 @@ index 0a6a3083..8c6e9193 100644
|
|||||||
#else
|
#else
|
||||||
"libOMX_Core.so", NULL,
|
"libOMX_Core.so", NULL,
|
||||||
"libOmxCore.so", NULL,
|
"libOmxCore.so", NULL,
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
||||||
|
|||||||
@ -1,33 +0,0 @@
|
|||||||
Upstream-Status: Pending
|
|
||||||
|
|
||||||
diff --git a/libavcodec/arm/mlpdsp_armv5te.S b/libavcodec/arm/mlpdsp_armv5te.S
|
|
||||||
index 4f9aa485fd21aabff582423703197dc0d05173dc..d31568611c30f67145e89332240dc6a5246e68c7 100644 (file)
|
|
||||||
--- a/libavcodec/arm/mlpdsp_armv5te.S
|
|
||||||
+++ b/libavcodec/arm/mlpdsp_armv5te.S
|
|
||||||
@@ -229,7 +229,7 @@ A .endif
|
|
||||||
.endif
|
|
||||||
|
|
||||||
// Begin loop
|
|
||||||
-01:
|
|
||||||
+1:
|
|
||||||
.if TOTAL_TAPS == 0
|
|
||||||
// Things simplify a lot in this case
|
|
||||||
// In fact this could be pipelined further if it's worth it...
|
|
||||||
@@ -241,7 +241,7 @@ A .endif
|
|
||||||
str ST0, [PST, #-4]!
|
|
||||||
str ST0, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
|
|
||||||
str ST0, [PSAMP], #4 * MAX_CHANNELS
|
|
||||||
- bne 01b
|
|
||||||
+ bne 1b
|
|
||||||
.else
|
|
||||||
.if \fir_taps & 1
|
|
||||||
.set LOAD_REG, 1
|
|
||||||
@@ -333,7 +333,7 @@ T orr AC0, AC0, AC1
|
|
||||||
str ST3, [PST, #-4]!
|
|
||||||
str ST2, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
|
|
||||||
str ST3, [PSAMP], #4 * MAX_CHANNELS
|
|
||||||
- bne 01b
|
|
||||||
+ bne 1b
|
|
||||||
.endif
|
|
||||||
b 99f
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -22,6 +22,22 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
|||||||
file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
|
file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
|
||||||
file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
|
file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
|
||||||
|
|
||||||
|
SRC_URI = "\
|
||||||
|
git://git@github.com/RPi-Distro/ffmpeg;protocol=https;branch=pios/trixie \
|
||||||
|
file://ffmpeg-7.1.2-rpi_28.patch \
|
||||||
|
file://2001-configure-setup-for-OE-core-usage.patch \
|
||||||
|
file://2004-libavcodec-omx-replace-opt-vc-path-with-usr-lib.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
SRCREV = "0170731d46a37a4ab3e708ac1c87a7ad08c415a1"
|
||||||
|
|
||||||
|
# https://nvd.nist.gov/vuln/detail/CVE-2023-39018
|
||||||
|
# https://github.com/bramp/ffmpeg-cli-wrapper/issues/291
|
||||||
|
# https://security-tracker.debian.org/tracker/CVE-2023-39018
|
||||||
|
# https://bugzilla.suse.com/show_bug.cgi?id=CVE-2023-39018
|
||||||
|
CVE_STATUS[CVE-2023-39018] = "cpe-incorrect: This issue belongs to ffmpeg-cli-wrapper \
|
||||||
|
(Java wrapper around the FFmpeg CLI) and not ffmepg itself."
|
||||||
|
|
||||||
# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
|
# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
|
||||||
ARM_INSTRUCTION_SET:armv4 = "arm"
|
ARM_INSTRUCTION_SET:armv4 = "arm"
|
||||||
ARM_INSTRUCTION_SET:armv5 = "arm"
|
ARM_INSTRUCTION_SET:armv5 = "arm"
|
||||||
@ -30,25 +46,20 @@ ARM_INSTRUCTION_SET:armv6 = "arm"
|
|||||||
# libpostproc was previously packaged from a separate recipe
|
# libpostproc was previously packaged from a separate recipe
|
||||||
PROVIDES = "ffmpeg libav libpostproc"
|
PROVIDES = "ffmpeg libav libpostproc"
|
||||||
RPROVIDES:${PN} = "${PROVIDES}"
|
RPROVIDES:${PN} = "${PROVIDES}"
|
||||||
DEPENDS = "nasm-native"
|
|
||||||
|
|
||||||
|
DEPENDS:append:x86 = " nasm-native"
|
||||||
|
DEPENDS:append:x86-64 = " nasm-native"
|
||||||
|
|
||||||
inherit autotools pkgconfig
|
inherit autotools pkgconfig
|
||||||
|
|
||||||
PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc ffplay \
|
PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc ffplay \
|
||||||
v4l2 drm udev alsa bzlib lzma pic pthreads shared theora zlib gpl \
|
alsa bzlib lzma theora zlib libvorbis \
|
||||||
|
\
|
||||||
|
v4l-request drm v4l2 udev gpl \
|
||||||
${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'mmal sand vout-drm', d)} \
|
${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'mmal sand vout-drm', d)} \
|
||||||
${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \
|
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)} \
|
||||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}"
|
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'epoxy vout-egl', '', d)}"
|
||||||
|
|
||||||
|
|
||||||
SRC_URI = "\
|
|
||||||
git://git@github.com/RPi-Distro/ffmpeg;protocol=https;branch=pios/bookworm \
|
|
||||||
file://0001-ffmpeg-5.1.4-rpi_24.patch \
|
|
||||||
file://2001-configure-setup-for-OE-core-usage.patch \
|
|
||||||
file://2004-libavcodec-omx-replace-opt-vc-path-with-usr-lib.patch \
|
|
||||||
file://2024-fix-compile-newer-binutils.patch \
|
|
||||||
"
|
|
||||||
|
|
||||||
SRCREV = "1c363463c432c5ed492c7b759abb6e015b93b6b5"
|
|
||||||
|
|
||||||
# libraries to build in addition to avutil
|
# libraries to build in addition to avutil
|
||||||
PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
|
PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
|
||||||
@ -58,35 +69,39 @@ PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
|
|||||||
PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
|
PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
|
||||||
PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
|
PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
|
||||||
PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
|
PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
|
||||||
#PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
|
|
||||||
|
|
||||||
# features to support
|
# features to support
|
||||||
PACKAGECONFIG[ffplay] = "--enable-ffplay,--disable-ffplay"
|
|
||||||
PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
|
PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
|
||||||
PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec,"
|
PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec,"
|
||||||
PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
|
PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
|
||||||
PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac"
|
PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac"
|
||||||
PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
|
PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
|
||||||
PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgles2"
|
|
||||||
PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
|
PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
|
||||||
PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
|
PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
|
||||||
PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
|
|
||||||
PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus"
|
PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus"
|
||||||
|
PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
|
||||||
PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
|
PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
|
||||||
PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk"
|
PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk"
|
||||||
PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
|
PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
|
||||||
PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
|
PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
|
||||||
PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
|
# don't epxlicitly disable SDL2, this implicintly disables ffplay
|
||||||
|
PACKAGECONFIG[sdl2] = "--enable-sdl2,,virtual/libsdl2"
|
||||||
PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
|
PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
|
||||||
PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt"
|
PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt"
|
||||||
PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg"
|
PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg"
|
||||||
|
PACKAGECONFIG[v4l2] = "--enable-libv4l2,--disable-libv4l2,v4l-utils"
|
||||||
PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
|
PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
|
||||||
PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
|
PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
|
||||||
PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
|
PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
|
||||||
PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
|
PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
|
||||||
|
PACKAGECONFIG[x265] = "--enable-libx265,--disable-libx265,x265"
|
||||||
PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb"
|
PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb"
|
||||||
PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
|
PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
|
||||||
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
|
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
|
||||||
|
|
||||||
|
# RPI Specific features
|
||||||
|
PACKAGECONFIG[ffplay] = "--enable-ffplay,--disable-ffplay, virtual/libsdl2"
|
||||||
|
PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgles2"
|
||||||
PACKAGECONFIG[snappy] = "--enable-libsnappy,--disable-libsnappy,snappy"
|
PACKAGECONFIG[snappy] = "--enable-libsnappy,--disable-libsnappy,snappy"
|
||||||
PACKAGECONFIG[udev] = "--enable-libudev,--disable-libudev,udev"
|
PACKAGECONFIG[udev] = "--enable-libudev,--disable-libudev,udev"
|
||||||
PACKAGECONFIG[drm] = "--enable-libdrm,--disable-libdrm,libdrm"
|
PACKAGECONFIG[drm] = "--enable-libdrm,--disable-libdrm,libdrm"
|
||||||
@ -96,13 +111,7 @@ PACKAGECONFIG[mmal] = "--enable-omx --enable-omx-rpi --enable-mmal,,userland"
|
|||||||
PACKAGECONFIG[sand] = "--enable-sand,,"
|
PACKAGECONFIG[sand] = "--enable-sand,,"
|
||||||
PACKAGECONFIG[vout-drm] = "--enable-vout-drm,,libdrm"
|
PACKAGECONFIG[vout-drm] = "--enable-vout-drm,,libdrm"
|
||||||
PACKAGECONFIG[vout-egl] = "--enable-vout-egl,,virtual/egl"
|
PACKAGECONFIG[vout-egl] = "--enable-vout-egl,,virtual/egl"
|
||||||
|
PACKAGECONFIG[v4l-request] = "--enable-v4l2-request,--disable-v4l2-request,,"
|
||||||
# other configuration options
|
|
||||||
PACKAGECONFIG[mips32r2] = ",--disable-mipsdsp --disable-mipsdspr2"
|
|
||||||
PACKAGECONFIG[pic] = "--enable-pic"
|
|
||||||
PACKAGECONFIG[pthreads] = "--enable-pthreads,--disable-pthreads"
|
|
||||||
PACKAGECONFIG[shared] = "--enable-shared"
|
|
||||||
PACKAGECONFIG[strip] = ",--disable-stripping"
|
|
||||||
|
|
||||||
# Check codecs that require --enable-nonfree
|
# Check codecs that require --enable-nonfree
|
||||||
USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
|
USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
|
||||||
@ -114,38 +123,58 @@ def cpu(d):
|
|||||||
return 'generic'
|
return 'generic'
|
||||||
|
|
||||||
EXTRA_OECONF = " \
|
EXTRA_OECONF = " \
|
||||||
|
--disable-stripping \
|
||||||
|
--enable-pic \
|
||||||
|
--enable-shared \
|
||||||
|
--enable-pthreads \
|
||||||
${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
|
${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
|
||||||
\
|
\
|
||||||
--cross-prefix=${TARGET_PREFIX} \
|
--cross-prefix=${TARGET_PREFIX} \
|
||||||
\
|
\
|
||||||
--ld="${CCLD}" \
|
--ld='${CCLD}' \
|
||||||
--cc="${CC}" \
|
--cc='${CC}' \
|
||||||
--cxx="${CXX}" \
|
--cxx='${CXX}' \
|
||||||
--arch=${TARGET_ARCH} \
|
--arch=${TARGET_ARCH} \
|
||||||
--target-os="linux" \
|
--target-os='linux' \
|
||||||
--enable-cross-compile \
|
--enable-cross-compile \
|
||||||
--extra-cflags="${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
|
--extra-cflags='${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \
|
||||||
--extra-ldflags="${LDFLAGS}" \
|
--extra-ldflags='${LDFLAGS}' \
|
||||||
--sysroot="${STAGING_DIR_TARGET}" \
|
--sysroot='${STAGING_DIR_TARGET}' \
|
||||||
${EXTRA_FFCONF} \
|
${EXTRA_FFCONF} \
|
||||||
--libdir=${libdir} \
|
--libdir=${libdir} \
|
||||||
--shlibdir=${libdir} \
|
--shlibdir=${libdir} \
|
||||||
--datadir=${datadir}/ffmpeg \
|
--datadir=${datadir}/ffmpeg \
|
||||||
|
${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
|
||||||
--cpu=${@cpu(d)} \
|
--cpu=${@cpu(d)} \
|
||||||
--pkg-config=pkg-config \
|
--pkg-config=pkg-config \
|
||||||
|
--enable-v4l2-request \
|
||||||
"
|
"
|
||||||
EXTRA_OECONF:append:linux-gnux32 = " --disable-asm"
|
|
||||||
|
|
||||||
# Some patches introduce assembly files which needs preprocessing with
|
EXTRA_OECONF:append:linux-gnux32 = " --disable-asm"
|
||||||
# gcc e.g. src/libavutil/aarch64/rpi_sand_neon.S
|
# --enable-pic is used and x86 assembly is not PIC on x86
|
||||||
TOOLCHAIN = "gcc"
|
EXTRA_OECONF:append:x86 = " --disable-asm"
|
||||||
# gold crashes on x86, another solution is to --disable-asm but thats more hacky
|
|
||||||
# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
|
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
|
||||||
LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
|
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
|
||||||
|
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
|
||||||
|
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
|
||||||
|
EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \
|
||||||
|
--disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa"
|
||||||
|
EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic --disable-rvv --disable-asm"
|
||||||
|
EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic"
|
||||||
|
EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic"
|
||||||
|
EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
|
||||||
|
EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}"
|
||||||
|
|
||||||
|
LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd ', '', d)}"
|
||||||
|
|
||||||
EXTRA_OEMAKE = "V=1"
|
EXTRA_OEMAKE = "V=1"
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
|
export TMPDIR="${B}/tmp"
|
||||||
|
mkdir -p ${B}/tmp
|
||||||
${S}/configure ${EXTRA_OECONF}
|
${S}/configure ${EXTRA_OECONF}
|
||||||
|
sed -i -e "s,^X86ASMFLAGS=.*,& --debug-prefix-map=${S}=${TARGET_DBGSRC_DIR} --debug-prefix-map=${B}=${TARGET_DBGSRC_DIR},g" ${B}/ffbuild/config.mak
|
||||||
}
|
}
|
||||||
|
|
||||||
# patch out build host paths for reproducibility
|
# patch out build host paths for reproducibility
|
||||||
@ -168,21 +197,13 @@ FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}"
|
|||||||
FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}"
|
FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}"
|
||||||
FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}"
|
FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}"
|
||||||
FILES:libavformat = "${libdir}/libavformat${SOLIBS}"
|
FILES:libavformat = "${libdir}/libavformat${SOLIBS}"
|
||||||
FILES:libavresample = "${libdir}/libavresample${SOLIBS}"
|
|
||||||
FILES:libavutil = "${libdir}/libavutil${SOLIBS}"
|
FILES:libavutil = "${libdir}/libavutil${SOLIBS}"
|
||||||
FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}"
|
FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}"
|
||||||
FILES:libswresample = "${libdir}/libswresample${SOLIBS}"
|
FILES:libswresample = "${libdir}/libswresample${SOLIBS}"
|
||||||
FILES:libswscale = "${libdir}/libswscale${SOLIBS}"
|
FILES:libswscale = "${libdir}/libswscale${SOLIBS}"
|
||||||
# ffmpeg disables PIC on some platforms (e.g. x86-32)
|
FILES:${PN}-examples = "${datadir}/${BPN}/examples"
|
||||||
INSANE_SKIP:${MLPREFIX}libavcodec = "textrel"
|
|
||||||
INSANE_SKIP:${MLPREFIX}libavdevice = "textrel"
|
CVE_PRODUCT = "ffmpeg libswresample libavcodec"
|
||||||
INSANE_SKIP:${MLPREFIX}libavfilter = "textrel"
|
|
||||||
INSANE_SKIP:${MLPREFIX}libavformat = "textrel"
|
|
||||||
INSANE_SKIP:${MLPREFIX}libavutil = "textrel"
|
|
||||||
INSANE_SKIP:${MLPREFIX}libavresample = "textrel"
|
|
||||||
INSANE_SKIP:${MLPREFIX}libswscale = "textrel"
|
|
||||||
INSANE_SKIP:${MLPREFIX}libswresample = "textrel"
|
|
||||||
INSANE_SKIP:${MLPREFIX}libpostproc = "textrel"
|
|
||||||
|
|
||||||
# Only enable it for rpi class of machines
|
# Only enable it for rpi class of machines
|
||||||
COMPATIBLE_HOST = "null"
|
COMPATIBLE_HOST = "null"
|
||||||
Loading…
x
Reference in New Issue
Block a user