hyperion: add patch to fix amlogic for newer kernels

This commit is contained in:
Lukas Rusak 2016-10-06 10:43:27 -07:00
parent a946329033
commit d091865c26
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3
2 changed files with 60 additions and 0 deletions

View File

@ -37,6 +37,7 @@ FB_SUPPORT="-DENABLE_FB=1"
X11_SUPPORT="-DENABLE_X11=0"
if [ "$KODIPLAYER_DRIVER" = "libamcodec" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libamcodec"
AMLOGIC_SUPPORT="-DENABLE_AMLOGIC=1"
elif [ "$KODIPLAYER_DRIVER" = "bcm2835-driver" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET bcm2835-driver"

View File

@ -0,0 +1,59 @@
From 49f9c51f5519d48bae601c174914f82e8e71e093 Mon Sep 17 00:00:00 2001
From: redpanther <redpanther@spooky-online.de>
Date: Wed, 31 Aug 2016 14:39:14 +0200
Subject: [PATCH] fix amlogic for newer kernels crosscompile stay on 32bit aml
with kernel 3.10
backport 58a8e22 from hyperion.ng
---
libsrc/grabber/amlogic/AmlogicGrabber.cpp | 10 +++++++---
libsrc/grabber/amlogic/CMakeLists.txt | 7 +++++++
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/libsrc/grabber/amlogic/AmlogicGrabber.cpp b/libsrc/grabber/amlogic/AmlogicGrabber.cpp
index 11cd280..5f39883 100644
--- a/libsrc/grabber/amlogic/AmlogicGrabber.cpp
+++ b/libsrc/grabber/amlogic/AmlogicGrabber.cpp
@@ -20,9 +20,13 @@
#define AMVIDEOCAP_IOW_SET_WANTFRAME_WIDTH _IOW(AMVIDEOCAP_IOC_MAGIC, 0x02, int)
#define AMVIDEOCAP_IOW_SET_WANTFRAME_HEIGHT _IOW(AMVIDEOCAP_IOC_MAGIC, 0x03, int)
-// Flags copied from 'include/linux/amlogic/amports/amvstream.h' at https://github.com/codesnake/linux-amlogic
-#define AMSTREAM_IOC_MAGIC 'S'
-#define AMSTREAM_IOC_GET_VIDEO_DISABLE _IOR(AMSTREAM_IOC_MAGIC, 0x48, unsigned long)
+#if HAVE_AML_HEADER
+ #include <amcodec/amports/amstream.h>
+#else
+ // Flags copied from 'include/linux/amlogic/amports/amvstream.h' at https://github.com/codesnake/linux-amlogic
+ #define AMSTREAM_IOC_MAGIC 'S'
+ #define AMSTREAM_IOC_GET_VIDEO_DISABLE _IOR(AMSTREAM_IOC_MAGIC, 0x48, unsigned long)
+#endif
AmlogicGrabber::AmlogicGrabber(const unsigned width, const unsigned height) :
// Minimum required width or height is 160
diff --git a/libsrc/grabber/amlogic/CMakeLists.txt b/libsrc/grabber/amlogic/CMakeLists.txt
index cf8844b..326f7c7 100644
--- a/libsrc/grabber/amlogic/CMakeLists.txt
+++ b/libsrc/grabber/amlogic/CMakeLists.txt
@@ -1,3 +1,4 @@
+INCLUDE (CheckIncludeFiles)
# Define the current source locations
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/grabber)
@@ -21,6 +22,12 @@ else(ENABLE_QT5)
QT4_WRAP_CPP(AmlogicHEADERS_MOC ${AmlogicQT_HEADERS})
endif(ENABLE_QT5)
+CHECK_INCLUDE_FILES ("amcodec/amports/amstream.h" HAVE_AML_HEADER)
+IF (${HAVE_AML_HEADER})
+ ADD_DEFINITIONS( -DHAVE_AML_HEADER )
+ENDIF()
+
+
add_library(amlogic-grabber
${AmlogicHEADERS}
${AmlogicQT_HEADERS}
--
2.9.3