Yocto 2.4

Move OpenBMC to Yocto 2.4(rocko)

Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I12057b18610d6fb0e6903c60213690301e9b0c67
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
similarity index 100%
rename from import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
rename to import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0001-config-files-path.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-config-files-path.patch
similarity index 100%
rename from import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0001-config-files-path.patch
rename to import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0001-config-files-path.patch
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0002-fix-decoder-flushing.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0002-fix-decoder-flushing.patch
similarity index 100%
rename from import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0002-fix-decoder-flushing.patch
rename to import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0002-fix-decoder-flushing.patch
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0003-no-timeout-on-get-state.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0003-no-timeout-on-get-state.patch
similarity index 100%
rename from import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0003-no-timeout-on-get-state.patch
rename to import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0003-no-timeout-on-get-state.patch
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0004-Properly-handle-drain-requests-while-flushing.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0004-Properly-handle-drain-requests-while-flushing.patch
similarity index 100%
rename from import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0004-Properly-handle-drain-requests-while-flushing.patch
rename to import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0004-Properly-handle-drain-requests-while-flushing.patch
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch
similarity index 100%
rename from import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.10/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch
rename to import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.10%.bbappend b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12%.bbappend
similarity index 88%
rename from import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.10%.bbappend
rename to import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12%.bbappend
index d419867..93381a4 100644
--- a/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.10%.bbappend
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.12%.bbappend
@@ -10,4 +10,4 @@
              file://0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch \
 "
 
-FILESEXTRAPATHS_prepend := "${THISDIR}/gstreamer1.0-omx-1.10:"
+FILESEXTRAPATHS_prepend := "${THISDIR}/gstreamer1.0-omx-1.12:"
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0005-Don-t-require-internet-connection-during-build.patch b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0005-Don-t-require-internet-connection-during-build.patch
new file mode 100644
index 0000000..4f56ad2
--- /dev/null
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0005-Don-t-require-internet-connection-during-build.patch
@@ -0,0 +1,56 @@
+From 97cb9405f281f54d4083f3126d441c8b44eafb89 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(-)
+
+diff --git a/Makefile b/Makefile
+index 60501b1..6471f0f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -79,14 +79,12 @@ 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)
+\ No newline at end of file
++	tar -czf omxplayer-dist.tar.gz $(DIST)
+diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg
+index 22d495c..8651724 100644
+--- a/Makefile.ffmpeg
++++ b/Makefile.ffmpeg
+@@ -6,7 +6,7 @@ FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstru
+ WORK=$(PWD)
+ 
+ .PHONY : all
+-all: checkout configure compile
++all: configure compile
+ 
+ .PHONY : copy
+ copy:
+-- 
+2.7.4
+
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0006-Prevent-ffmpeg-configure-compile-race-condition.patch b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0006-Prevent-ffmpeg-configure-compile-race-condition.patch
new file mode 100644
index 0000000..3fac2d1
--- /dev/null
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0006-Prevent-ffmpeg-configure-compile-race-condition.patch
@@ -0,0 +1,39 @@
+From 4a13419e3805b541fc58e57f1f27c4a388609ef5 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(-)
+
+diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg
+index 8651724..619c49a 100644
+--- a/Makefile.ffmpeg
++++ b/Makefile.ffmpeg
+@@ -6,7 +6,7 @@ FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstru
+ WORK=$(PWD)
+ 
+ .PHONY : all
+-all: configure compile
++all: compile
+ 
+ .PHONY : copy
+ copy:
+@@ -14,7 +14,7 @@ copy:
+ 	$(HOST)-strip *.so*
+ 
+ .PHONY : compile
+-compile: 
++compile: configure
+ 	+$(MAKE) -C ffmpeg
+ 
+ .PHONY : configure
+-- 
+2.7.4
+
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
index 0e0f9ba..db01d74 100644
--- a/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
@@ -10,14 +10,27 @@
 DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl samba libssh libomxil coreutils-native curl-native"
 PR = "r4"
 
-SRCREV = "061425a5eabf6e9ee43229911c073a863d144038"
+SRCREV_default = "b8ff59dccd9307f10dad71bec2525a95bd6c603b"
+
+# omxplayer builds its own copy of ffmpeg from source instead of using the
+# system's ffmpeg library. This isn't ideal but it's ok for now. We do however
+# want to keep control of the exact version of ffmpeg used instead of just
+# fetching the latest commit on a release branch (which is what the checkout job
+# in Makefile.ffmpeg in the omxplayer source tree does).
+#
+# This SRCREV corresponds to the v3.1.10 release of ffmpeg.
+SRCREV_ffmpeg = "afa34cb36edca0ff809b7e58474bbce12271ecba"
+
 SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master \
+           git://source.ffmpeg.org/ffmpeg;branch=release/3.1;protocol=git;depth=1;name=ffmpeg;destsuffix=git/ffmpeg \
            file://0001-Remove-Makefile.include-which-includes-hardcoded.patch \
            file://0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch \
            file://0003-Remove-strip-step-in-Makefile.patch \
            file://0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch \
            file://fix-tar-command-with-DIST.patch \
            file://use-native-pkg-config.patch \
+           file://0005-Don-t-require-internet-connection-during-build.patch \
+           file://0006-Prevent-ffmpeg-configure-compile-race-condition.patch \
            "
 S = "${WORKDIR}/git"
 
@@ -53,7 +66,8 @@
     # Needed for compiler test in ffmpeg's configure
     mkdir -p tmp
 
-    oe_runmake ffmpeg
+    oe_runmake -f Makefile.ffmpeg
+    oe_runmake -f Makefile.ffmpeg install
     oe_runmake
 }
 
diff --git a/import-layers/meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend b/import-layers/meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend
index c1cb3bc..505719e 100644
--- a/import-layers/meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend
+++ b/import-layers/meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend
@@ -1 +1,2 @@
 EXTRA_OECONF_append_raspberrypi = " --disable-asm"
+EXTRA_OECONF_append_raspberrypi0-wifi = " --disable-asm"