summaryrefslogtreecommitdiffstats
path: root/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer')
-rw-r--r--bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Fix-build-with-vc4-driver.patch49
-rw-r--r--bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Remove-Makefile.include-which-includes-hardcoded.patch84
-rw-r--r--bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Specify-cc-cxx-and-ld-variables-from-environment.patch42
-rw-r--r--bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch63
-rw-r--r--bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0003-Remove-strip-step-in-Makefile.patch27
-rw-r--r--bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch37
-rw-r--r--bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0005-Don-t-require-internet-connection-during-build.patch55
-rw-r--r--bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0006-Prevent-ffmpeg-configure-compile-race-condition.patch37
-rw-r--r--bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/cross-crompile-ffmpeg.patch12
-rw-r--r--bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/fix-tar-command-with-DIST.patch32
-rw-r--r--bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/use-native-pkg-config.patch28
11 files changed, 466 insertions, 0 deletions
diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Fix-build-with-vc4-driver.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Fix-build-with-vc4-driver.patch
new file mode 100644
index 00000000..37d0724a
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Fix-build-with-vc4-driver.patch
@@ -0,0 +1,49 @@
+From 25302469b6ceb2fa10ac68c07da25c6068ffd218 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 7 Nov 2018 01:16:59 -0800
+Subject: [PATCH] Fix build with vc4 driver
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ SubtitleRenderer.cpp | 7 ++++++-
+ SubtitleRenderer.h | 1 +
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/SubtitleRenderer.cpp b/SubtitleRenderer.cpp
+index 540162f..fcfc708 100644
+--- a/SubtitleRenderer.cpp
++++ b/SubtitleRenderer.cpp
+@@ -36,6 +36,11 @@
+ #include <algorithm>
+
+ #include "bcm_host.h"
++typedef struct {
++ DISPMANX_ELEMENT_HANDLE_T element;
++ int width;
++ int height;
++} EGL_DISPMANX_WINDOW_T;
+
+ class BoxRenderer {
+ VGPath path_;
+@@ -618,4 +623,4 @@ void SubtitleRenderer::set_rect(int x1, int y1, int x2, int y2) BOOST_NOEXCEPT
+ float font_size = height*font_size_;
+ ENFORCE(!FT_Set_Pixel_Sizes(ft_face_, 0, font_size));
+ ENFORCE(!FT_Set_Pixel_Sizes(ft_face_italic_, 0, font_size));
+-}
+\ No newline at end of file
++}
+diff --git a/SubtitleRenderer.h b/SubtitleRenderer.h
+index 3f60798..ebac9a1 100644
+--- a/SubtitleRenderer.h
++++ b/SubtitleRenderer.h
+@@ -26,6 +26,7 @@
+ // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ // DEALINGS IN THE SOFTWARE.
+
++#include <interface/vmcs_host/vc_dispmanx.h>
+ #include <EGL/egl.h>
+ #include <VG/openvg.h>
+ #include <ft2build.h>
+--
+2.19.1
+
diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Remove-Makefile.include-which-includes-hardcoded.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Remove-Makefile.include-which-includes-hardcoded.patch
new file mode 100644
index 00000000..0c8843e7
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Remove-Makefile.include-which-includes-hardcoded.patch
@@ -0,0 +1,84 @@
+From 19c9bc5fd8f43d3e9117906c3c48a3891357f8bc Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Tue, 20 Aug 2013 16:10:51 +0300
+Subject: [PATCH] Remove Makefile.include which includes hardcoded
+
+Remove Makefile.include which includes hardcoded paths and rely on
+variables provided by build system.
+
+Upstream-Status: Inappropriate [embedded specific]
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+
+Updated patch to apply to c0dd9502ed2c43c487674939195c69680f3d98b0 revision
+
+---
+ Makefile | 1 -
+ Makefile.ffmpeg | 1 -
+ Makefile.include | 40 ----------------------------------------
+ 3 files changed, 42 deletions(-)
+ delete mode 100644 Makefile.include
+
+diff --git a/Makefile b/Makefile
+index 2857e94..76ee9bf 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,3 @@
+-include Makefile.include
+
+ CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
+
+diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg
+index ea12aad..749f47f 100644
+--- a/Makefile.ffmpeg
++++ b/Makefile.ffmpeg
+@@ -1,4 +1,3 @@
+-include Makefile.include
+
+ CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT
+
+diff --git a/Makefile.include b/Makefile.include
+deleted file mode 100644
+index 58e9560..0000000
+--- a/Makefile.include
++++ /dev/null
+@@ -1,40 +0,0 @@
+-USE_BUILDROOT=0
+-FLOAT=hard
+-
+-ifeq ($(USE_BUILDROOT), 1)
+-BUILDROOT :=/opt/xbmc-bcm/buildroot
+-SDKSTAGE :=$(BUILDROOT)/output/staging
+-TARGETFS :=$(BUILDROOT)/output/target
+-TOOLCHAIN :=$(BUILDROOT)/output/host/usr/
+-HOST :=arm-unknown-linux-gnueabi
+-SYSROOT :=$(BUILDROOT)/output/host/usr/arm-unknown-linux-gnueabi/sysroot
+-else
+-BUILDROOT :=/opt/bcm-rootfs
+-SDKSTAGE :=/opt/bcm-rootfs
+-TARGETFS :=/opt/bcm-rootfs
+-TOOLCHAIN :=/home/dc4/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/
+-HOST :=arm-linux-gnueabihf
+-#SYSROOT :=$(TOOLCHAIN)/arm-bcm2708hardfp-linux-gnueabi/sysroot
+-SYSROOT :=/opt/bcm-rootfs
+-endif
+-
+-JOBS=7
+-
+-CFLAGS := -isystem$(PREFIX)/include
+-CXXFLAGS := $(CFLAGS)
+-CPPFLAGS := $(CFLAGS)
+-LDFLAGS := -L$(BUILDROOT)/lib
+-LD := $(TOOLCHAIN)/bin/$(HOST)-ld --sysroot=$(SYSROOT)
+-CC := $(TOOLCHAIN)/bin/$(HOST)-gcc --sysroot=$(SYSROOT)
+-CXX := $(TOOLCHAIN)/bin/$(HOST)-g++ --sysroot=$(SYSROOT)
+-OBJDUMP := $(TOOLCHAIN)/bin/$(HOST)-objdump
+-RANLIB := $(TOOLCHAIN)/bin/$(HOST)-ranlib
+-STRIP := $(TOOLCHAIN)/bin/$(HOST)-strip
+-AR := $(TOOLCHAIN)/bin/$(HOST)-ar
+-CXXCP := $(CXX) -E
+-PATH := $(PREFIX)/bin:$(BUILDROOT)/output/host/usr/bin:$(PATH)
+-
+-CFLAGS += -pipe -mfloat-abi=$(FLOAT) -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -mno-apcs-stack-check -g -mstructure-size-boundary=32 -mno-sched-prolog
+-LDFLAGS += -L$(SDKSTAGE)/lib -L$(SDKSTAGE)/usr/lib -L$(SDKSTAGE)/opt/vc/lib/ -Lpcre/build
+-#INCLUDES += -isystem$(SDKSTAGE)/usr/include -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -isystem$(SDKSTAGE)/usr/include/freetype2
+-INCLUDES += -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -Ipcre/build -Iboost-trunk -Ifreetype2/include
diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Specify-cc-cxx-and-ld-variables-from-environment.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Specify-cc-cxx-and-ld-variables-from-environment.patch
new file mode 100644
index 00000000..82dfd3e6
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0001-Specify-cc-cxx-and-ld-variables-from-environment.patch
@@ -0,0 +1,42 @@
+From 9b4b7f8726171e97f12c587d50e54bab0dc42da5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 12 Sep 2018 22:18:07 -0700
+Subject: [PATCH] Specify --cc, --cxx and --ld variables from environment
+
+This helps in compiling with non-gcc compilers
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.ffmpeg | 22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
+Index: git/Makefile.ffmpeg
+===================================================================
+--- git.orig/Makefile.ffmpeg
++++ git/Makefile.ffmpeg
+@@ -22,12 +22,15 @@ configure:
+ CFLAGS="$(CFLAGS) ${INCLUDES}" \
+ LDFLAGS="" \
+ ./configure \
++ --ld="${CCLD}" \
++ --cc="${CC}" \
++ --cxx="${CXX}" \
+ --extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \
+ --extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \
+ --enable-shared \
+ --disable-static \
+ --arch=arm \
+- --cpu=arm1176jzf-s \
++ --cpu=$(CPU) \
+ --target-os=linux \
+ --disable-hwaccels \
+ --enable-parsers \
+@@ -42,7 +45,7 @@ configure:
+ --enable-gpl \
+ --enable-version3 \
+ --enable-protocols \
+- --enable-libsmbclient \
++ --disable-libsmbclient \
+ --enable-libssh \
+ --enable-nonfree \
+ --enable-openssl \
diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch
new file mode 100644
index 00000000..dd1d4f3d
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch
@@ -0,0 +1,63 @@
+From e46208c4a3e35da461e0e8f662970339eae47fca Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Sun, 24 Aug 2014 00:13:13 +0200
+Subject: [PATCH] Libraries and headers from ffmpeg are installed in /usr.
+
+Don't search for libraries and headers in /usr/local.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+
+---
+ Makefile | 6 +++---
+ Makefile.ffmpeg | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -2,9 +2,9 @@ CFLAGS=-pipe -mfloat-abi=hard -mcpu=arm1
+ CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
+
+ LDFLAGS=-L$(SDKSTAGE)/opt/vc/lib/
+-LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lbrcmGLESv2 -lbrcmEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound
++LDFLAGS+=-L./ -Lffmpeg_compiled/usr/lib/ -lc -lbrcmGLESv2 -lbrcmEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound
+
+-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/freetype2 -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads
++INCLUDES+=-I./ -Ilinux
+
+ DIST ?= omxplayer-dist
+ STRIP ?= strip
+@@ -90,7 +90,7 @@ dist: omxplayer.bin omxplayer.1
+ cp COPYING $(DIST)/usr/share/doc/omxplayer
+ cp README.md $(DIST)/usr/share/doc/omxplayer/README
+ cp omxplayer.1 $(DIST)/usr/share/man/man1
+- cp -P ffmpeg_compiled/usr/local/lib/*.so* $(DIST)/usr/lib/omxplayer/
++ cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/
+ cd $(DIST); tar -czf ../$(DIST).tgz *
+
+ install:
+Index: git/Makefile.ffmpeg
+===================================================================
+--- git.orig/Makefile.ffmpeg
++++ git/Makefile.ffmpeg
+@@ -238,7 +238,8 @@ configure:
+ --disable-decoder=xbin \
+ --disable-decoder=idf \
+ --disable-decoder=hevc \
+- --enable-decoder=opus
++ --enable-decoder=opus \
++ --disable-stripping
+
+ .PHONY : clean
+ clean:
+@@ -251,5 +252,5 @@ checkout:
+ .PHONY : install
+ install:
+ cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install
+- $(HOST)-strip ffmpeg_compiled/usr/local/lib/*.so
++ $(HOST)-strip ffmpeg_compiled/usr/lib/*.so
+
diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0003-Remove-strip-step-in-Makefile.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0003-Remove-strip-step-in-Makefile.patch
new file mode 100644
index 00000000..0b6aafdf
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0003-Remove-strip-step-in-Makefile.patch
@@ -0,0 +1,27 @@
+From 6975d8a902837dd6c604f7fdd2a2f977285855ed Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Sun, 24 Aug 2014 00:18:05 +0200
+Subject: [PATCH] Remove strip step in Makefile
+
+Build system will strip binaries so remove strip step in Makefile.
+Avoid warnings/errors like:
+WARNING: File '/usr/lib/omxplayer/libavutil.so.51.56.100' from
+omxplayer was already stripped, this will prevent future debugging!
+
+Upstream-Status: Inappropriate [embedded specific]
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+
+---
+ Makefile.ffmpeg | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+Index: git/Makefile.ffmpeg
+===================================================================
+--- git.orig/Makefile.ffmpeg
++++ git/Makefile.ffmpeg
+@@ -252,5 +252,3 @@ checkout:
+ .PHONY : install
+ install:
+ cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install
+- $(HOST)-strip ffmpeg_compiled/usr/lib/*.so
+-
diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch
new file mode 100644
index 00000000..383cdf7c
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch
@@ -0,0 +1,37 @@
+From be007b01e7d91f5f83518c0388c16db8dab31d2e Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei.gherzan@windriver.com>
+Date: Sun, 25 Jan 2015 11:13:51 +0200
+Subject: [PATCH] Add FFMPEG_EXTRA_CFLAGS and FFMPEG_EXTRA_LDFLAGS
+
+In this way we can inject flags to LD and CC using
+--extra-cflags and --extra-ldflags.
+
+Upstream-Status: Inappropriate [embedded specific]
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+
+---
+ Makefile.ffmpeg | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+Index: git/Makefile.ffmpeg
+===================================================================
+--- git.orig/Makefile.ffmpeg
++++ git/Makefile.ffmpeg
+@@ -1,5 +1,7 @@
+ CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT
+
++FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog
++
+ WORK=$(PWD)
+
+ .PHONY : all
+@@ -20,7 +22,8 @@ configure:
+ CFLAGS="$(CFLAGS) ${INCLUDES}" \
+ LDFLAGS="" \
+ ./configure \
+- --extra-cflags="-mfpu=vfp -mfloat-abi=hard -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog" \
++ --extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \
++ --extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \
+ --enable-shared \
+ --disable-static \
+ --arch=arm \
diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0005-Don-t-require-internet-connection-during-build.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0005-Don-t-require-internet-connection-during-build.patch
new file mode 100644
index 00000000..f6abd7b8
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0005-Don-t-require-internet-connection-during-build.patch
@@ -0,0 +1,55 @@
+From 81d1f8bc102b23bdfa63a01f252f3e4c74ae7da9 Mon Sep 17 00:00:00 2001
+From: Paul Barker <pbarker@toganlabs.com>
+Date: Thu, 7 Sep 2017 19:14:20 +0000
+Subject: [PATCH] Don't require internet connection during build
+
+The following issues break offline builds:
+
+* Building the man page uses a web service hosted on heroku.
+
+* Makefile.ffmpeg explicitly does a "git clone" from the internet.
+
+Signed-off-by: Paul Barker <pbarker@toganlabs.com>
+Upstream-status: Inappropriate
+
+---
+ Makefile | 6 ++----
+ Makefile.ffmpeg | 2 +-
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -81,17 +81,14 @@ ffmpeg:
+ make -f Makefile.ffmpeg
+ make -f Makefile.ffmpeg install
+
+-dist: omxplayer.bin omxplayer.1
++dist: omxplayer.bin
+ mkdir -p $(DIST)/usr/lib/omxplayer
+ mkdir -p $(DIST)/usr/bin
+ mkdir -p $(DIST)/usr/share/doc/omxplayer
+- mkdir -p $(DIST)/usr/share/man/man1
+ cp omxplayer omxplayer.bin $(DIST)/usr/bin
+ cp COPYING $(DIST)/usr/share/doc/omxplayer
+ cp README.md $(DIST)/usr/share/doc/omxplayer/README
+- cp omxplayer.1 $(DIST)/usr/share/man/man1
+ cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/
+- tar -czf omxplayer-dist.tar.gz $(DIST)
+
+ install:
+ cp -r $(DIST)/* /
+Index: git/Makefile.ffmpeg
+===================================================================
+--- git.orig/Makefile.ffmpeg
++++ git/Makefile.ffmpeg
+@@ -5,7 +5,7 @@ FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-a
+ WORK=$(PWD)
+
+ .PHONY : all
+-all: checkout configure compile
++all: configure compile
+
+ .PHONY : copy
+ copy:
diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0006-Prevent-ffmpeg-configure-compile-race-condition.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0006-Prevent-ffmpeg-configure-compile-race-condition.patch
new file mode 100644
index 00000000..890adde5
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0006-Prevent-ffmpeg-configure-compile-race-condition.patch
@@ -0,0 +1,37 @@
+From f570b9985ff2d57d21c1e64ed08c43b6d89fd0b1 Mon Sep 17 00:00:00 2001
+From: Paul Barker <pbarker@toganlabs.com>
+Date: Thu, 7 Sep 2017 20:02:15 +0000
+Subject: [PATCH] Prevent ffmpeg configure/compile race condition
+
+Additional dependency information is needed in Makefile.ffmpeg to ensure that
+the configure stage is finished before the compile stage starts.
+
+Signed-off-by: Paul Barker <pbarker@toganlabs.com>
+Upstream-status: Pending
+
+---
+ Makefile.ffmpeg | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: git/Makefile.ffmpeg
+===================================================================
+--- git.orig/Makefile.ffmpeg
++++ git/Makefile.ffmpeg
+@@ -5,7 +5,7 @@ FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-a
+ WORK=$(PWD)
+
+ .PHONY : all
+-all: configure compile
++all: compile
+
+ .PHONY : copy
+ copy:
+@@ -13,7 +13,7 @@ copy:
+ $(HOST)-strip *.so*
+
+ .PHONY : compile
+-compile:
++compile: configure
+ +$(MAKE) -j$(shell nproc) -C ffmpeg
+
+ .PHONY : configure
diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/cross-crompile-ffmpeg.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/cross-crompile-ffmpeg.patch
new file mode 100644
index 00000000..20ed7c7b
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/cross-crompile-ffmpeg.patch
@@ -0,0 +1,12 @@
+Index: git/Makefile.ffmpeg
+===================================================================
+--- git.orig/Makefile.ffmpeg
++++ git/Makefile.ffmpeg
+@@ -22,6 +22,7 @@ configure:
+ CFLAGS="$(CFLAGS) ${INCLUDES}" \
+ LDFLAGS="" \
+ ./configure \
++ --enable-cross-compile \
+ --ld="${CCLD}" \
+ --cc="${CC}" \
+ --cxx="${CXX}" \
diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/fix-tar-command-with-DIST.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/fix-tar-command-with-DIST.patch
new file mode 100644
index 00000000..70859aa4
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/fix-tar-command-with-DIST.patch
@@ -0,0 +1,32 @@
+From 23a97efde2aef171312000f7859ef4c573ce2ada Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Sun, 19 Jan 2014 20:35:29 +0200
+Subject: [PATCH] omxplayer: Update to remote HEAD
+
+Revert the tar command change introduced in:
+https://github.com/popcornmix/omxplayer/commit/201c77973155861e60492e45d35467b19b69c1c4
+
+This fails if DIST is an absolute path. The old command was working just fine.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -91,7 +91,7 @@ dist: omxplayer.bin omxplayer.1
+ cp README.md $(DIST)/usr/share/doc/omxplayer/README
+ cp omxplayer.1 $(DIST)/usr/share/man/man1
+ cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/
+- cd $(DIST); tar -czf ../$(DIST).tgz *
++ tar -czf omxplayer-dist.tar.gz $(DIST)
+
+ install:
+ cp -r $(DIST)/* /
diff --git a/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/use-native-pkg-config.patch b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/use-native-pkg-config.patch
new file mode 100644
index 00000000..e580470c
--- /dev/null
+++ b/bsp/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/use-native-pkg-config.patch
@@ -0,0 +1,28 @@
+From da6c24a2a87b8cf9692017e32be25d30c0cc7ef4 Mon Sep 17 00:00:00 2001
+From: Andrei Gherzan <andrei@gherzan.ro>
+Date: Tue, 10 Feb 2015 00:52:18 +0100
+Subject: [PATCH] omxplayer: Bump SRCREV
+
+Force the pkg-config native tool. Strangely ffmpeg prepends cross_prefix
+to the default value which obviously is wrong.
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+
+---
+ Makefile.ffmpeg | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: git/Makefile.ffmpeg
+===================================================================
+--- git.orig/Makefile.ffmpeg
++++ git/Makefile.ffmpeg
+@@ -242,7 +242,8 @@ configure:
+ --disable-decoder=idf \
+ --disable-decoder=hevc \
+ --enable-decoder=opus \
+- --disable-stripping
++ --disable-stripping \
++ --pkg-config=pkg-config
+
+ .PHONY : clean
+ clean: