diff --git a/meta-openpli/recipes-mediacenter/kodi/jsonschemabuilder-native.bb b/meta-openpli/recipes-mediacenter/kodi/jsonschemabuilder-native.bb index 750cefdc..094ccff9 100644 --- a/meta-openpli/recipes-mediacenter/kodi/jsonschemabuilder-native.bb +++ b/meta-openpli/recipes-mediacenter/kodi/jsonschemabuilder-native.bb @@ -3,16 +3,14 @@ SUMMARY = "Kodi Media Center" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://JsonSchemaBuilder.cpp;beginline=2;endline=18;md5=1f67721215c03f66545390f6e45b99c7" -BRANCH = "Jarvis" -PV = "16.1" +SRCREV = "b587e98911fcedc4b800cd923a882c7aeeaa2146" -SRC_URI = "https://github.com/xbmc/xbmc/archive/16.1-Jarvis.tar.gz" -SRC_URI[md5sum] = "79358ad5f77f42c5498a9412d5a78dd5" -SRC_URI[sha256sum] = "7d82c8aff2715c83deecdf10c566e26105bec0473af530a1356d4c747ebdfd10" +PV = "16.0+gitr${SRCPV}" +SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Jarvis" inherit autotools-brokensep gettext native -S = "${WORKDIR}/xbmc-${PV}-${BRANCH}/tools/depends/native/JsonSchemaBuilder/src" +S = "${WORKDIR}/git/tools/depends/native/JsonSchemaBuilder/src" do_compile_prepend() { for i in $(find . -name "Makefile") ; do diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0001-Fix-file_Emu-on-musl.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0001-Fix-file_Emu-on-musl.patch new file mode 100644 index 00000000..20b63778 --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0001-Fix-file_Emu-on-musl.patch @@ -0,0 +1,496 @@ +From 7ae4fcf290ffb0b76374efafeaee575456ac9023 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 6 Nov 2016 23:08:27 -0800 +Subject: [PATCH 01/10] Fix file_Emu on musl + +Signed-off-by: Khem Raj +--- + xbmc/cores/DllLoader/exports/emu_msvcrt.cpp | 28 ++-- + xbmc/cores/DllLoader/exports/emu_msvcrt.h | 2 +- + .../DllLoader/exports/util/EmuFileWrapper.cpp | 172 +++++++++------------ + xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h | 27 ++-- + xbmc/cores/DllLoader/exports/wrapper.c | 4 +- + 5 files changed, 99 insertions(+), 134 deletions(-) + +diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp +index ab14942..a39014a 100644 +--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp ++++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp +@@ -51,6 +51,7 @@ + #include + #include + #include ++#include + #ifdef TARGET_POSIX + #include "PlatformDefs.h" // for __stat64 + #include "XFileUtils.h" +@@ -476,13 +477,10 @@ extern "C" + EmuFileObject* o = g_emuFileWrapper.GetFileObjectByDescriptor(fd); + if (o) + { +- if(!o->used) +- return NULL; +- + int nmode = convert_fmode(mode); + if( (o->mode & nmode) != nmode) + CLog::Log(LOGWARNING, "dll_fdopen - mode 0x%x differs from fd mode 0x%x", nmode, o->mode); +- return &o->file_emu; ++ return g_emuFileWrapper.GetStreamByFileObject(o); + } + else if (!IS_STD_DESCRIPTOR(fd)) + { +@@ -545,7 +543,7 @@ extern "C" + return -1; + } + object->mode = iMode; +- return g_emuFileWrapper.GetDescriptorByStream(&object->file_emu); ++ return g_emuFileWrapper.GetDescriptorByFileObject(object); + } + delete pFile; + return -1; +@@ -1214,8 +1212,8 @@ extern "C" + { + FILE* file = NULL; + #if defined(TARGET_LINUX) && !defined(TARGET_ANDROID) +- if (strcmp(filename, MOUNTED) == 0 +- || strcmp(filename, MNTTAB) == 0) ++ if (strcmp(filename, _PATH_MOUNTED) == 0 ++ || strcmp(filename, _PATH_MNTTAB) == 0) + { + CLog::Log(LOGINFO, "%s - something opened the mount file, let's hope it knows what it's doing", __FUNCTION__); + return fopen(filename, mode); +@@ -1622,7 +1620,7 @@ extern "C" + int ret; + + ret = dll_fgetpos64(stream, &tmpPos); +-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) ++#if !defined(__GLIBC__) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) + *pos = (fpos_t)tmpPos; + #else + pos->__pos = (off_t)tmpPos.__pos; +@@ -1635,8 +1633,9 @@ extern "C" + CFile* pFile = g_emuFileWrapper.GetFileXbmcByStream(stream); + if (pFile != NULL) + { +-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) +- *pos = pFile->GetPosition(); ++#if !defined(__GLIBC__) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) ++ uint64_t *ppos = (uint64_t *) pos; ++ *ppos = pFile->GetPosition(); + #else + pos->__pos = pFile->GetPosition(); + #endif +@@ -1657,8 +1656,9 @@ extern "C" + int fd = g_emuFileWrapper.GetDescriptorByStream(stream); + if (fd >= 0) + { +-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) +- if (dll_lseeki64(fd, *pos, SEEK_SET) >= 0) ++#if !defined(__GLIBC__) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) ++ const uint64_t *ppos = (const uint64_t *) pos; ++ if (dll_lseeki64(fd, *ppos, SEEK_SET) >= 0) + #else + if (dll_lseeki64(fd, (__off64_t)pos->__pos, SEEK_SET) >= 0) + #endif +@@ -1674,7 +1674,7 @@ extern "C" + { + // it might be something else than a file, or the file is not emulated + // let the operating system handle it +-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) ++#if !defined(__GLIBC__) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) + return fsetpos(stream, pos); + #else + return fsetpos64(stream, pos); +@@ -1690,7 +1690,7 @@ extern "C" + if (fd >= 0) + { + fpos64_t tmpPos; +-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) ++#if !defined(__GLIBC__) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) + tmpPos= *pos; + #else + tmpPos.__pos = (off64_t)(pos->__pos); +diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.h b/xbmc/cores/DllLoader/exports/emu_msvcrt.h +index 3294d9a..c7c483f 100644 +--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.h ++++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.h +@@ -24,7 +24,7 @@ + #define _onexit_t void* + #endif + +-#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) ++#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(__GLIBC__) + typedef off_t __off_t; + typedef int64_t off64_t; + typedef off64_t __off64_t; +diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp +index 8927d41..e9a2ab0 100644 +--- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp ++++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp +@@ -52,16 +52,7 @@ constexpr bool isValidFilePtr(FILE* f) + } + CEmuFileWrapper::CEmuFileWrapper() + { +- // since we always use dlls we might just initialize it directly +- for (int i = 0; i < MAX_EMULATED_FILES; i++) +- { +- memset(&m_files[i], 0, sizeof(EmuFileObject)); +- m_files[i].used = false; +-#if defined(TARGET_WINDOWS) && (_MSC_VER >= 1900) +- m_files[i].file_emu._Placeholder = new kodi_iobuf(); +-#endif +- FileDescriptor(m_files[i].file_emu)->_file = -1; +- } ++ memset(m_files, 0, sizeof(m_files)); + } + + CEmuFileWrapper::~CEmuFileWrapper() +@@ -73,29 +64,7 @@ void CEmuFileWrapper::CleanUp() + { + CSingleLock lock(m_criticalSection); + for (int i = 0; i < MAX_EMULATED_FILES; i++) +- { +- if (m_files[i].used) +- { +- m_files[i].file_xbmc->Close(); +- delete m_files[i].file_xbmc; +- +- if (m_files[i].file_lock) +- { +- delete m_files[i].file_lock; +- m_files[i].file_lock = nullptr; +- } +-#if !defined(TARGET_WINDOWS) +- //Don't memset on Windows as it overwrites our pointer +- memset(&m_files[i], 0, sizeof(EmuFileObject)); +-#endif +- m_files[i].used = false; +- FileDescriptor(m_files[i].file_emu)->_file = -1; +- } +-#if defined(TARGET_WINDOWS) && (_MSC_VER >= 1900) +- delete static_cast(m_files[i].file_emu._Placeholder); +- m_files[i].file_emu._Placeholder = nullptr; +-#endif +- } ++ UnRegisterFileObject(&m_files[i], true); + } + + EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile) +@@ -106,13 +75,11 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile) + + for (int i = 0; i < MAX_EMULATED_FILES; i++) + { +- if (!m_files[i].used) ++ if (!m_files[i].file_xbmc) + { + // found a free location + object = &m_files[i]; +- object->used = true; + object->file_xbmc = pFile; +- FileDescriptor(object->file_emu)->_file = (i + FILE_WRAPPER_OFFSET); + object->file_lock = new CCriticalSection(); + break; + } +@@ -121,82 +88,74 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile) + return object; + } + +-void CEmuFileWrapper::UnRegisterFileObjectByDescriptor(int fd) ++void CEmuFileWrapper::UnRegisterFileObject(EmuFileObject *object, bool free_file) ++ + { +- int i = fd - FILE_WRAPPER_OFFSET; +- if (! (i >= 0 && i < MAX_EMULATED_FILES)) +- return; ++ if (object && object->file_xbmc) ++ { ++ if (object->file_xbmc && free_file) ++ { ++ object->file_xbmc->Close(); ++ delete object->file_xbmc; ++ } ++ if (object->file_lock) ++ { ++ delete object->file_lock; ++ } + +- if (!m_files[i].used) +- return; ++ memset(object, 0, sizeof(*object)); ++ } ++} + ++void CEmuFileWrapper::UnRegisterFileObjectByDescriptor(int fd) ++{ + CSingleLock lock(m_criticalSection); +- +- // we assume the emulated function alreay deleted the CFile object +- if (m_files[i].file_lock) +- { +- delete m_files[i].file_lock; +- m_files[i].file_lock = nullptr; +- } +-#if !defined(TARGET_WINDOWS) +- //Don't memset on Windows as it overwrites our pointer +- memset(&m_files[i], 0, sizeof(EmuFileObject)); +-#endif +- m_files[i].used = false; +- FileDescriptor(m_files[i].file_emu)->_file = -1; ++ UnRegisterFileObject(GetFileObjectByDescriptor(fd), false); + } + + void CEmuFileWrapper::UnRegisterFileObjectByStream(FILE* stream) + { + if (isValidFilePtr(stream)) + { +- return UnRegisterFileObjectByDescriptor(FileDescriptor(*stream)->_file); ++ CSingleLock lock(m_criticalSection); ++ UnRegisterFileObject(GetFileObjectByStream(stream), false); + } + } + + void CEmuFileWrapper::LockFileObjectByDescriptor(int fd) + { +- int i = fd - FILE_WRAPPER_OFFSET; +- if (i >= 0 && i < MAX_EMULATED_FILES) ++ EmuFileObject* object = GetFileObjectByDescriptor(fd); ++ if (object && object->file_xbmc) + { +- if (m_files[i].used) +- { +- m_files[i].file_lock->lock(); +- } ++ object->file_lock->lock(); + } + } + + bool CEmuFileWrapper::TryLockFileObjectByDescriptor(int fd) + { +- int i = fd - FILE_WRAPPER_OFFSET; +- if (i >= 0 && i < MAX_EMULATED_FILES) ++ EmuFileObject* object = GetFileObjectByDescriptor(fd); ++ if (object && object->file_xbmc) + { +- if (m_files[i].used) +- { +- return m_files[i].file_lock->try_lock(); +- } ++ return object->file_lock->try_lock(); + } + return false; + } + + void CEmuFileWrapper::UnlockFileObjectByDescriptor(int fd) + { +- int i = fd - FILE_WRAPPER_OFFSET; +- if (i >= 0 && i < MAX_EMULATED_FILES) ++ EmuFileObject* object = GetFileObjectByDescriptor(fd); ++ if (object && object->file_xbmc) + { +- if (m_files[i].used) +- { +- m_files[i].file_lock->unlock(); +- } ++ object->file_lock->unlock(); + } + } + + EmuFileObject* CEmuFileWrapper::GetFileObjectByDescriptor(int fd) + { +- int i = fd - FILE_WRAPPER_OFFSET; ++ int i = fd - 0x7000000; + if (i >= 0 && i < MAX_EMULATED_FILES) + { +- if (m_files[i].used) ++ if (m_files[i].file_xbmc) + { + return &m_files[i]; + } +@@ -204,20 +163,39 @@ EmuFileObject* CEmuFileWrapper::GetFileObjectByDescriptor(int fd) + return nullptr; + } + ++int CEmuFileWrapper::GetDescriptorByFileObject(EmuFileObject *object) ++{ ++ int i = object - m_files; ++ if (i >= 0 && i < MAX_EMULATED_FILES) ++ { ++ return 0x7000000 + i; ++ } ++ ++ return -1; ++} ++ + EmuFileObject* CEmuFileWrapper::GetFileObjectByStream(FILE* stream) + { +- if (isValidFilePtr(stream)) ++ EmuFileObject *object = (EmuFileObject*) stream; ++ if (object >= &m_files[0] || object < &m_files[MAX_EMULATED_FILES]) + { +- return GetFileObjectByDescriptor(FileDescriptor(*stream)->_file); ++ if (object->file_xbmc) ++ { ++ return object; ++ } + } ++ return NULL; ++} + +- return nullptr; ++FILE* CEmuFileWrapper::GetStreamByFileObject(EmuFileObject *object) ++{ ++ return (FILE*) object; + } + + XFILE::CFile* CEmuFileWrapper::GetFileXbmcByDescriptor(int fd) + { + auto object = GetFileObjectByDescriptor(fd); +- if (object != nullptr && object->used) ++ if (object != nullptr) + { + return object->file_xbmc; + } +@@ -228,8 +206,9 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream) + { + if (isValidFilePtr(stream)) + { +- auto object = GetFileObjectByDescriptor(FileDescriptor(*stream)->_file); +- if (object != nullptr && object->used) ++ EmuFileObject* object = GetFileObjectByStream(stream); ++ if (object != NULL) ++ + { + return object->file_xbmc; + } +@@ -239,32 +218,21 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream) + + int CEmuFileWrapper::GetDescriptorByStream(FILE* stream) + { +- if (isValidFilePtr(stream)) +- { +- int i = FileDescriptor(*stream)->_file - FILE_WRAPPER_OFFSET; +- if (i >= 0 && i < MAX_EMULATED_FILES) +- { +- return i + FILE_WRAPPER_OFFSET; +- } +- } +- return -1; ++ return GetDescriptorByFileObject(GetFileObjectByStream(stream)); + } + + FILE* CEmuFileWrapper::GetStreamByDescriptor(int fd) + { +- auto object = GetFileObjectByDescriptor(fd); +- if (object != nullptr && object->used) +- { +- return &object->file_emu; +- } +- return nullptr; ++ return GetStreamByFileObject(GetFileObjectByDescriptor(fd)); ++} ++ ++bool CEmuFileWrapper::DescriptorIsEmulatedFile(int fd) ++{ ++ return GetFileObjectByDescriptor(fd) != NULL; + } + + bool CEmuFileWrapper::StreamIsEmulatedFile(FILE* stream) + { +- if (isValidFilePtr(stream)) +- { +- return DescriptorIsEmulatedFile(FileDescriptor(*stream)->_file); +- } +- return false; ++ return GetFileObjectByStream(stream) != NULL; + } ++ +diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h +index 786fa85..311a5cf 100644 +--- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h ++++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h +@@ -25,14 +25,14 @@ + #include "system.h" + #include "threads/CriticalSection.h" + +-#if defined(TARGET_POSIX) && !defined(TARGET_DARWIN) && !defined(TARGET_FREEBSD) && !defined(TARGET_ANDROID) && !defined(__UCLIBC__) +-#define _file _fileno +-#elif defined(__UCLIBC__) +-#define _file __filedes +-#endif ++//#if defined(TARGET_POSIX) && !defined(TARGET_DARWIN) && !defined(TARGET_FREEBSD) && !defined(TARGET_ANDROID) && !defined(__UCLIBC__) ++//#define _file _fileno ++//#elif defined(__UCLIBC__) ++//#define _file __filedes ++//#endif + + #define MAX_EMULATED_FILES 50 +-#define FILE_WRAPPER_OFFSET 0x00000200 ++//#define FILE_WRAPPER_OFFSET 0x00000200 + + namespace XFILE + { +@@ -47,12 +47,9 @@ struct kodi_iobuf { + + typedef struct stEmuFileObject + { +- FILE file_emu; + XFILE::CFile* file_xbmc; + CCriticalSection *file_lock; + int mode; +- //Stick this last to avoid 3-7 bytes of padding +- bool used; + } EmuFileObject; + + class CEmuFileWrapper +@@ -67,22 +64,22 @@ public: + void CleanUp(); + + EmuFileObject* RegisterFileObject(XFILE::CFile* pFile); ++ void UnRegisterFileObject(EmuFileObject*, bool free_file); + void UnRegisterFileObjectByDescriptor(int fd); + void UnRegisterFileObjectByStream(FILE* stream); + void LockFileObjectByDescriptor(int fd); + bool TryLockFileObjectByDescriptor(int fd); + void UnlockFileObjectByDescriptor(int fd); + EmuFileObject* GetFileObjectByDescriptor(int fd); ++ int GetDescriptorByFileObject(EmuFileObject*); + EmuFileObject* GetFileObjectByStream(FILE* stream); ++ FILE* GetStreamByFileObject(EmuFileObject*); + XFILE::CFile* GetFileXbmcByDescriptor(int fd); + XFILE::CFile* GetFileXbmcByStream(FILE* stream); +- static int GetDescriptorByStream(FILE* stream); ++ int GetDescriptorByStream(FILE* stream); + FILE* GetStreamByDescriptor(int fd); +- static constexpr bool DescriptorIsEmulatedFile(int fd) +- { +- return fd >= FILE_WRAPPER_OFFSET && fd < FILE_WRAPPER_OFFSET + MAX_EMULATED_FILES; +- } +- static bool StreamIsEmulatedFile(FILE* stream); ++ bool DescriptorIsEmulatedFile(int fd); ++ bool StreamIsEmulatedFile(FILE* stream); + private: + EmuFileObject m_files[MAX_EMULATED_FILES]; + CCriticalSection m_criticalSection; +diff --git a/xbmc/cores/DllLoader/exports/wrapper.c b/xbmc/cores/DllLoader/exports/wrapper.c +index e363662..07825f3 100644 +--- a/xbmc/cores/DllLoader/exports/wrapper.c ++++ b/xbmc/cores/DllLoader/exports/wrapper.c +@@ -39,13 +39,13 @@ + #endif + #include + +-#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) ++#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(__GLIBC__) + typedef off_t __off_t; + typedef int64_t off64_t; + typedef off64_t __off64_t; + typedef fpos_t fpos64_t; + #define stat64 stat +-#if defined(TARGET_DARWIN) || defined(TARGET_ANDROID) ++#if defined(TARGET_DARWIN) || defined(TARGET_ANDROID) || !defined(__GLIBC__) + #define _G_va_list va_list + #endif + #endif +-- +2.10.2 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0002-Remove-FILEWRAP.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0002-Remove-FILEWRAP.patch new file mode 100644 index 00000000..463a5c4f --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0002-Remove-FILEWRAP.patch @@ -0,0 +1,46 @@ +From ad1977a358319093b305df6d84be6db676ef1e4a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 6 Nov 2016 22:35:16 -0800 +Subject: [PATCH 02/10] Remove FILEWRAP + +Signed-off-by: Khem Raj +--- + xbmc/utils/posix/PosixInterfaceForCLog.cpp | 6 +----- + xbmc/utils/posix/PosixInterfaceForCLog.h | 4 +--- + 2 files changed, 2 insertions(+), 8 deletions(-) + +Index: git/xbmc/utils/posix/PosixInterfaceForCLog.cpp +=================================================================== +--- git.orig/xbmc/utils/posix/PosixInterfaceForCLog.cpp ++++ git/xbmc/utils/posix/PosixInterfaceForCLog.cpp +@@ -29,10 +29,6 @@ + #include "platform/android/activity/XBMCApp.h" + #endif // TARGET_ANDROID + +-struct FILEWRAP : public FILE +-{}; +- +- + CPosixInterfaceForCLog::CPosixInterfaceForCLog() : + m_file(NULL) + { } +@@ -52,7 +48,7 @@ bool CPosixInterfaceForCLog::OpenLogFile + (void)remove(backupOldLogToFilename.c_str()); // if it's failed, try to continue + (void)rename(logFilename.c_str(), backupOldLogToFilename.c_str()); // if it's failed, try to continue + +- m_file = (FILEWRAP*)fopen(logFilename.c_str(), "wb"); ++ m_file = fopen(logFilename.c_str(), "wb"); + if (!m_file) + return false; // error, can't open log file + +Index: git/xbmc/utils/posix/PosixInterfaceForCLog.h +=================================================================== +--- git.orig/xbmc/utils/posix/PosixInterfaceForCLog.h ++++ git/xbmc/utils/posix/PosixInterfaceForCLog.h +@@ -34,5 +34,5 @@ public: + void PrintDebugString(const std::string& debugString); + static void GetCurrentLocalTime(int& hour, int& minute, int& second, double& millisecond); + private: +- FILEWRAP* m_file; ++ FILE* m_file; + }; diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch new file mode 100644 index 00000000..49217a4f --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch @@ -0,0 +1,25 @@ +From a91a3ba229dc5903935f7dd98dd03bbb4fe5ac1f Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Sat, 6 Feb 2016 15:43:01 +0100 +Subject: [PATCH 03/10] configure: don't try to run stuff to find tinyxml + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 34fe643..3132dc1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1043,7 +1043,7 @@ fi + AC_LANG_PUSH([C++]) + PKG_CHECK_MODULES([TINYXML], [tinyxml >= 2.6.2], + [INCLUDES="$INCLUDES $TINYXML_CFLAGS"; LIBS="$LIBS $TINYXML_LIBS"], +- [AC_RUN_IFELSE( ++ [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[ + #include + #include +-- +2.10.2 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0004-handle-SIGTERM.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0004-handle-SIGTERM.patch new file mode 100644 index 00000000..dc374393 --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0004-handle-SIGTERM.patch @@ -0,0 +1,163 @@ +From 49046c1685465a5486fe9e1c04b99c585aab6862 Mon Sep 17 00:00:00 2001 +From: Stefan Saraev +Date: Wed, 2 Nov 2016 11:28:34 -0700 +Subject: [PATCH 04/10] handle SIGTERM + +0. CApplication::Stop cant be trusted. (deadlocks crashes and boo) + +so, when shutdown/reboot is requested: + +1. save an exit code (for CEC...) +2. call CPowerManager::{Reboot,PowerDown} +3. ... then systemd sends TERM and waits xx seconds before sending KILL +4. CApplication::Stop has xx seconds to save guisettings.xml and boo +5. CEC thread has xx seconds to switch off after it received OnQuit +6. addons / pvrmanager / cec / everything else.. are free to deadlock / crash now, we dont care +7. KILL + +Signed-off-by: Stefan Saraev +Signed-off-by: Khem Raj +--- + xbmc/Application.cpp | 17 ++++++++++++----- + xbmc/Application.h | 1 + + xbmc/XBApplicationEx.cpp | 1 + + xbmc/XBApplicationEx.h | 1 + + xbmc/platform/posix/main.cpp | 15 +++++++++++++++ + 5 files changed, 30 insertions(+), 5 deletions(-) + +diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp +index 100a2f2..fda892d 100644 +--- a/xbmc/Application.cpp ++++ b/xbmc/Application.cpp +@@ -2426,12 +2426,12 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg) + switch (pMsg->dwMessage) + { + case TMSG_POWERDOWN: +- Stop(EXITCODE_POWERDOWN); ++ SetExitCode(EXITCODE_POWERDOWN); + g_powerManager.Powerdown(); + break; + + case TMSG_QUIT: +- Stop(EXITCODE_QUIT); ++ SetExitCode(EXITCODE_QUIT); + break; + + case TMSG_SHUTDOWN: +@@ -2452,12 +2452,13 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg) + + case TMSG_RESTART: + case TMSG_RESET: +- Stop(EXITCODE_REBOOT); ++ SetExitCode(EXITCODE_REBOOT); + g_powerManager.Reboot(); + break; + + case TMSG_RESTARTAPP: + #if defined(TARGET_WINDOWS) || defined(TARGET_LINUX) ++ SetExitCode(EXITCODE_RESTARTAPP); + Stop(EXITCODE_RESTARTAPP); + #endif + break; +@@ -2881,6 +2882,13 @@ bool CApplication::Cleanup() + } + } + ++void CApplication::SetExitCode(int exitCode) ++{ ++ // save it for CEC ++ m_ExitCode = exitCode; ++ m_ExitCodeSet = true; ++} ++ + void CApplication::Stop(int exitCode) + { + try +@@ -2888,7 +2896,7 @@ void CApplication::Stop(int exitCode) + m_frameMoveGuard.unlock(); + + CVariant vExitCode(CVariant::VariantTypeObject); +- vExitCode["exitcode"] = exitCode; ++ vExitCode["exitcode"] = m_ExitCode; + CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnQuit", vExitCode); + + // Abort any active screensaver +@@ -2922,7 +2930,6 @@ void CApplication::Stop(int exitCode) + + m_bStop = true; + m_AppFocused = false; +- m_ExitCode = exitCode; + CLog::Log(LOGNOTICE, "stop all"); + + // cancel any jobs from the jobmanager +diff --git a/xbmc/Application.h b/xbmc/Application.h +index a9d9bf5..e536deb 100644 +--- a/xbmc/Application.h ++++ b/xbmc/Application.h +@@ -159,6 +159,7 @@ public: + void StopPVRManager(); + void ReinitPVRManager(); + bool IsCurrentThread() const; ++ void SetExitCode(int exitCode); + void Stop(int exitCode); + void RestartApp(); + void UnloadSkin(bool forReload = false); +diff --git a/xbmc/XBApplicationEx.cpp b/xbmc/XBApplicationEx.cpp +index 035aed2..34102f5 100644 +--- a/xbmc/XBApplicationEx.cpp ++++ b/xbmc/XBApplicationEx.cpp +@@ -46,6 +46,7 @@ CXBApplicationEx::CXBApplicationEx() + m_bStop = false; + m_AppFocused = true; + m_ExitCode = EXITCODE_QUIT; ++ m_ExitCodeSet = false; + m_renderGUI = false; + } + +diff --git a/xbmc/XBApplicationEx.h b/xbmc/XBApplicationEx.h +index 9bc14fa..f696b89 100644 +--- a/xbmc/XBApplicationEx.h ++++ b/xbmc/XBApplicationEx.h +@@ -42,6 +42,7 @@ public: + // Variables for timing + bool m_bStop; + int m_ExitCode; ++ bool m_ExitCodeSet; + bool m_AppFocused; + bool m_renderGUI; + +diff --git a/xbmc/platform/posix/main.cpp b/xbmc/platform/posix/main.cpp +index a8b64e5..3d80032 100644 +--- a/xbmc/platform/posix/main.cpp ++++ b/xbmc/platform/posix/main.cpp +@@ -41,12 +41,27 @@ + #include "input/linux/LIRC.h" + #endif + #include "platform/XbmcContext.h" ++#include "Application.h" ++ ++void xbmc_term_handler(int signum) ++{ ++ CLog::Log(LOGINFO, "Received SIGTERM..."); ++ if (!g_application.m_ExitCodeSet) ++ g_application.SetExitCode(EXITCODE_RESTARTAPP); ++ g_application.Stop(EXITCODE_RESTARTAPP); ++} + + #ifdef __cplusplus + extern "C" + #endif + int main(int argc, char* argv[]) + { ++ // SIGTERM handler ++ struct sigaction action; ++ memset(&action, 0, sizeof(struct sigaction)); ++ action.sa_handler = xbmc_term_handler; ++ sigaction(SIGTERM, &action, NULL); ++ + // set up some xbmc specific relationships + XBMC::Context context; + +-- +2.10.2 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0005-add-support-to-read-frequency-output-if-using-intel-.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0005-add-support-to-read-frequency-output-if-using-intel-.patch new file mode 100644 index 00000000..ee10c40a --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0005-add-support-to-read-frequency-output-if-using-intel-.patch @@ -0,0 +1,26 @@ +From 4d1368d20f04216aec9551d9845b305f96a21015 Mon Sep 17 00:00:00 2001 +From: Stephan Raue +Date: Mon, 1 Sep 2014 03:16:37 +0200 +Subject: [PATCH 05/10] add support to read frequency output if using intel's + pstate driver + +--- + xbmc/utils/CPUInfo.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp +index 5e2ebbd..fd04d5a 100644 +--- a/xbmc/utils/CPUInfo.cpp ++++ b/xbmc/utils/CPUInfo.cpp +@@ -274,6 +274,8 @@ CCPUInfo::CCPUInfo(void) + m_fProcTemperature = fopen("/sys/class/thermal/thermal_zone0/temp", "r"); // On Raspberry PIs + + m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r"); ++ if (m_fCPUFreq == NULL) ++ m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq", "r"); + if (!m_fCPUFreq) + { + m_cpuInfoForFreq = true; +-- +2.10.2 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0006-Disable-DVD-support.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0006-Disable-DVD-support.patch new file mode 100644 index 00000000..08dfac32 --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0006-Disable-DVD-support.patch @@ -0,0 +1,35 @@ +From 3d3ec391038c6ee73897a7fab753b11b589de1ed Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 2 Nov 2016 12:39:20 -0700 +Subject: [PATCH 06/10] Disable DVD support + +Signed-off-by: Khem Raj +--- + Makefile.in | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 0d70e9b..050c7ca 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -10,8 +10,7 @@ EC_DIRS= \ + tools/EventClients + + DVDPCODECS_DIRS= \ +- lib \ +- lib/libdvd ++ lib + + VideoPlayer_ARCHIVES=xbmc/cores/VideoPlayer/VideoPlayer.a \ + xbmc/cores/VideoPlayer/DVDCodecs/DVDCodecs.a \ +@@ -347,7 +346,6 @@ libaddon: exports + $(MAKE) -C lib/addons/library.xbmc.pvr + $(MAKE) -C lib/addons/library.kodi.inputstream + dvdpcodecs: dllloader +- $(MAKE) -C lib/libdvd + + dvdpextcodecs: + +-- +2.10.2 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0007-Always-compile-libcpluff-as-PIC.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0007-Always-compile-libcpluff-as-PIC.patch new file mode 100644 index 00000000..8fd7ece0 --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0007-Always-compile-libcpluff-as-PIC.patch @@ -0,0 +1,30 @@ +From d989cbdb7686c3b95dc749967f89b93e47f955a6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 3 Nov 2016 13:10:00 -0700 +Subject: [PATCH 07/10] Always compile libcpluff as PIC + +Fixes errors e.g. + +ld: lib/cpluff/libcpluff/.libs/libcpluff.a(pcontrol.o): relocation R_X86_64_PC32 against symbol `cp_stop_plugins' can not be used when making a shared object; recompile with -fPIC + +Signed-off-by: Khem Raj +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 3132dc1..ab4eea3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2385,7 +2385,7 @@ XB_CONFIG_MODULE([lib/cpluff], [ + --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \ + --host=$host_alias \ + --build=$build_alias \ +- --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX" LDFLAGS="$LDFLAGS" LIBS="" ++ --target=$target_alias --with-pic=yes CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX" LDFLAGS="$LDFLAGS" LIBS="" + #LDFLAGS="$LDFLAGS -Wl,-read_only_relocs,suppress" + ], [0]) + +-- +2.10.2 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch new file mode 100644 index 00000000..9390144c --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch @@ -0,0 +1,43 @@ +From 51cd8d5f084013360b29fe497193288ebde2f4f9 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 29 Jul 2015 23:13:33 +0200 +Subject: [PATCH 08/10] kodi-config.cmake: use CMAKE_FIND_ROOT_PATH to fix + cross-compilation + +When cross-compiling, the location at build time of the libraries is +not the same as the one at run-time. The CMAKE_FIND_ROOT_PATH variable +is here to handle this difference, so use it in kodi-config.cmake. + +Signed-off-by: Thomas Petazzoni +--- + project/cmake/KodiConfig.cmake.in | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/project/cmake/KodiConfig.cmake.in b/project/cmake/KodiConfig.cmake.in +index c02a680..9d6a566 100644 +--- a/project/cmake/KodiConfig.cmake.in ++++ b/project/cmake/KodiConfig.cmake.in +@@ -7,10 +7,10 @@ if(NOT @APP_NAME_UC@_PREFIX) + set(@APP_NAME_UC@_PREFIX @APP_PREFIX@) + endif() + if(NOT @APP_NAME_UC@_INCLUDE_DIR) +- set(@APP_NAME_UC@_INCLUDE_DIR @APP_INCLUDE_DIR@) ++ set(@APP_NAME_UC@_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}/@APP_INCLUDE_DIR@) + endif() + if(NOT @APP_NAME_UC@_LIB_DIR) +- set(@APP_NAME_UC@_LIB_DIR @APP_LIB_DIR@) ++ set(@APP_NAME_UC@_LIB_DIR ${CMAKE_FIND_ROOT_PATH}/@APP_LIB_DIR@) + endif() + if(NOT @APP_NAME_UC@_DATA_DIR) + set(@APP_NAME_UC@_DATA_DIR @APP_DATA_DIR@) +@@ -19,6 +19,7 @@ if(NOT WIN32) + set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} @CXX11_SWITCH@") + endif() + list(APPEND CMAKE_MODULE_PATH @APP_LIB_DIR@ @APP_DATA_DIR@/cmake) ++list(APPEND CMAKE_MODULE_PATH ${CMAKE_FIND_ROOT_PATH}/@APP_LIB_DIR@ ${CMAKE_FIND_ROOT_PATH}/@APP_DATA_DIR@/cmake) + + string(REPLACE ";" " " ARCH_DEFINES "@ARCH_DEFINES@") + add_definitions(${ARCH_DEFINES} -DBUILD_KODI_ADDON) +-- +2.10.2 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0009-build-Add-support-for-musl-triplets.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0009-build-Add-support-for-musl-triplets.patch new file mode 100644 index 00000000..f3e739ae --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0009-build-Add-support-for-musl-triplets.patch @@ -0,0 +1,180 @@ +From 8b2bad58585af0f829fb06e19c9bd2b6caf30808 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 6 Nov 2016 11:54:41 -0800 +Subject: [PATCH 09/10] build: Add support for musl triplets + +Signed-off-by: Khem Raj +--- + configure.ac | 12 ++++++------ + m4/xbmc_arch.m4 | 22 +++++++++++----------- + tools/depends/configure.ac | 12 ++++++------ + 3 files changed, 23 insertions(+), 23 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ab4eea3..925466a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -526,7 +526,7 @@ case $host in + use_x11=no + build_shared_lib=yes + ;; +- i*86*-linux-gnu*|i*86*-*-linux-uclibc*) ++ i*86*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-*-linux-musl*) + target_platform=target_linux + CORE_SYSTEM_NAME=linux + ARCH="i486-linux" +@@ -549,7 +549,7 @@ case $host in + fi + fi + ;; +- x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*) ++ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*) + target_platform=target_linux + CORE_SYSTEM_NAME=linux + ARCH="x86_64-linux" +@@ -601,17 +601,17 @@ case $host in + DEPENDS_ROOT_FOR_XCODE=$(echo ${prefix%/*}) + AC_SUBST([DEPENDS_ROOT_FOR_XCODE]) + ;; +- powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*) ++ powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*|powerpc-*-linux-musl*) + target_platform=target_linux + CORE_SYSTEM_NAME=linux + ARCH="powerpc-linux" + ;; +- powerpc64*-*-linux-gnu*|powerpc64*-*-linux-uclibc*) ++ powerpc64*-*-linux-gnu*|powerpc64*-*-linux-uclibc*|powerpc64*-*-linux-musl*) + target_platform=target_linux + CORE_SYSTEM_NAME=linux + ARCH="powerpc64-linux" + ;; +- arm*-*-linux-gnu*|arm*-*-linux-uclibc*) ++ arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*) + target_platform=target_linux + CORE_SYSTEM_NAME=linux + ARCH="arm" +@@ -621,7 +621,7 @@ case $host in + use_gl=no + USE_STATIC_FFMPEG=1 + ;; +- aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*) ++ aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*|aarch64*-*-linux-musl*) + target_platform=target_linux + ARCH="aarch64" + use_arch="aarch64" +diff --git a/m4/xbmc_arch.m4 b/m4/xbmc_arch.m4 +index d28f263..ff5dc20 100644 +--- a/m4/xbmc_arch.m4 ++++ b/m4/xbmc_arch.m4 +@@ -2,10 +2,10 @@ AC_DEFUN([XBMC_SETUP_ARCH_DEFINES],[ + + # build detection and setup - this is the native arch + case $build in +- i*86*-linux-gnu*|i*86*-*-linux-uclibc*) ++ i*86*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-*-linux-musl*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; +- x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*) ++ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + i386-*-freebsd*) +@@ -17,13 +17,13 @@ case $build in + *86*-apple-darwin*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX") + ;; +- powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*) ++ powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*|powerpc-*-linux-musl*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC") + ;; +- powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*) ++ powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*|powerpc64-*-linux-musl*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64") + ;; +- arm*-*-linux-gnu*|arm*-*-linux-uclibc*) ++ arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + *) +@@ -33,10 +33,10 @@ esac + + # host detection and setup - this is the target arch + case $host in +- i*86*-linux-gnu*|i*86*-*-linux-uclibc*) ++ i*86*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-*-linux-musl*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; +- x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*) ++ x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + i386-*-freebsd*) +@@ -54,16 +54,16 @@ case $host in + powerpc-apple-darwin*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX") + ;; +- powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*) ++ powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*|powerpc-*-linux-musl*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC") + ;; +- powerpc64*-*-linux-gnu*|powerpc64*-*-linux-uclibc*) ++ powerpc64*-*-linux-gnu*|powerpc64*-*-linux-uclibc*|powerpc64*-*-linux-musl*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64") + ;; +- arm*-*-linux-gnu*|arm*-*-linux-uclibc*|aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*) ++ arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*|aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*|aarch64*-*-linux-musl*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; +- mips*-*-linux-gnu*|mips*-*-linux-uclibc*) ++ mips*-*-linux-gnu*|mips*-*-linux-uclibc*|mips*-*-linux-musl*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + *-*linux-android*) +diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac +index f438e5d..409f4d7 100644 +--- a/tools/depends/configure.ac ++++ b/tools/depends/configure.ac +@@ -120,13 +120,13 @@ platform_cc=gcc + platform_cxx=g++ + + case $build in +- arm*-*-linux-gnu*|arm*-*-linux-uclibc*) ++ arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*) + build_os="linux" + ;; +- *i686*-linux-gnu*|i*86*-*-linux-uclibc*) ++ *i686*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-*-linux-musl*) + build_os="linux" + ;; +- x86_64*-linux-gnu*|x86_64-*-linux-uclibc*) ++ x86_64*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*) + build_os="linux" + ;; + *darwin*) +@@ -186,7 +186,7 @@ case $host in + #android builds are always cross + cross_compiling="yes" + ;; +- arm*-*-linux-gnu*|arm*-*-linux-uclibc*) ++ arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*) + if test "$use_platform" = "auto"; then + if test "x$use_cpu" = "xauto"; then + use_cpu=$host_cpu +@@ -210,12 +210,12 @@ case $host in + platform_os="linux" + fi + ;; +- *i686*-linux-gnu*|i*86*-*-linux-uclibc*) ++ *i686*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-*-linux-musl*) + use_cpu=$host_cpu + use_toolchain="${use_toolchain:-/usr}" + platform_os="linux" + ;; +- x86_64*-linux-gnu*|x86_64-*-linux-uclibc*) ++ x86_64*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*) + use_cpu=$host_cpu + use_toolchain="${use_toolchain:-/usr}" + platform_cflags="-fPIC -DPIC" +-- +2.10.2 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch new file mode 100644 index 00000000..e34a5b71 --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch @@ -0,0 +1,40 @@ +From 55233024648b5673dbf223586968e71cc4c70711 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 16 Nov 2016 18:49:36 -0800 +Subject: [PATCH 10/10] RssReader: Fix compiler warning comparing pointer to + zero + +Clang finds this warning +RssReader.cpp:272:19: error: ordered comparison between pointer and zero ('TiXmlElement *' and 'int') + while (itemNode > 0) + ~~~~~~~~ ^ ~ +RssReader.cpp:276:22: error: ordered comparison between pointer and zero ('TiXmlNode *' and 'int') + while (childNode > 0) + ~~~~~~~~~ ^ ~ + +Signed-off-by: Khem Raj +--- + xbmc/utils/RssReader.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xbmc/utils/RssReader.cpp b/xbmc/utils/RssReader.cpp +index 9186f56..2494dc8 100644 +--- a/xbmc/utils/RssReader.cpp ++++ b/xbmc/utils/RssReader.cpp +@@ -269,11 +269,11 @@ void CRssReader::GetNewsItems(TiXmlElement* channelXmlNode, int iFeed) + if (m_tagSet.empty()) + AddTag("title"); + +- while (itemNode > 0) ++ while (itemNode != NULL) + { + TiXmlNode* childNode = itemNode->FirstChild(); + mTagElements.clear(); +- while (childNode > 0) ++ while (childNode != NULL) + { + std::string strName = childNode->ValueStr(); + +-- +2.10.2 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0011-Let-configure-pass-on-unknown-architectures-setting-.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0011-Let-configure-pass-on-unknown-architectures-setting-.patch new file mode 100644 index 00000000..7ee44f1c --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0011-Let-configure-pass-on-unknown-architectures-setting-.patch @@ -0,0 +1,54 @@ +From 19a1ffc1450bd3ecfb7419d74c733b2e16bf47f3 Mon Sep 17 00:00:00 2001 +From: Balint Reczey +Date: Wed, 26 Aug 2015 08:14:41 +0200 +Subject: [PATCH 11/12] Let configure pass on unknown architectures setting + sane defaults + +This helps porting Kodi to new architectures while emitting warnings about +entering uncharted territory. +--- + configure.ac | 3 ++- + m4/xbmc_arch.m4 | 6 ++++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 925466a..8369615 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -658,7 +658,8 @@ case $host in + USE_STATIC_FFMPEG=1 + ;; + *) +- AC_MSG_ERROR(unsupported host ($host)) ++ ARCH=$host_cpu"-"$host_os ++ AC_MSG_WARN([unsupported host ($host), guessing ARCH as $ARCH.]) + esac + AC_SUBST([ARCH]) + +diff --git a/m4/xbmc_arch.m4 b/m4/xbmc_arch.m4 +index ff5dc20..dfb45fd 100644 +--- a/m4/xbmc_arch.m4 ++++ b/m4/xbmc_arch.m4 +@@ -27,7 +27,8 @@ case $build in + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + *) +- AC_MSG_ERROR(unsupported native build platform: $build) ++ AC_MSG_WARN([unsupported native build platform: $build]) ++ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + esac + + +@@ -70,7 +71,8 @@ case $host in + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID") + ;; + *) +- AC_MSG_ERROR(unsupported build target: $host) ++ AC_MSG_WARN([unsupported native build platform: $build]) ++ AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + esac + + if test "$target_platform" = "target_android" ; then +-- +2.10.2 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/0012-Revert-droid-fix-builds-with-AML-disabled.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0012-Revert-droid-fix-builds-with-AML-disabled.patch new file mode 100644 index 00000000..8d70b3f8 --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/0012-Revert-droid-fix-builds-with-AML-disabled.patch @@ -0,0 +1,87 @@ +From 9e88aa086083b80c05b2bf057b92682186c4e6dc Mon Sep 17 00:00:00 2001 +From: Balint Reczey +Date: Thu, 6 Oct 2016 18:12:18 +0200 +Subject: [PATCH 12/12] Revert "[droid] fix builds with AML disabled" + +This reverts commit 4733383b8f1c1dd0b95e9e5358425d8a0b7ba8fc. +--- + xbmc/utils/SystemInfo.cpp | 4 ---- + xbmc/windowing/egl/EGLWrapper.cpp | 16 ++++++---------- + 2 files changed, 6 insertions(+), 14 deletions(-) + +diff --git a/xbmc/utils/SystemInfo.cpp b/xbmc/utils/SystemInfo.cpp +index fcc6733..52e7fa3 100644 +--- a/xbmc/utils/SystemInfo.cpp ++++ b/xbmc/utils/SystemInfo.cpp +@@ -57,10 +57,8 @@ + #include "utils/XMLUtils.h" + #if defined(TARGET_ANDROID) + #include "platform/android/jni/Build.h" +-#if defined(HAS_LIBAMCODEC) + #include "utils/AMLUtils.h" + #endif +-#endif + + /* Platform identification */ + #if defined(TARGET_DARWIN) +@@ -873,11 +871,9 @@ bool CSysInfo::IsAeroDisabled() + bool CSysInfo::HasHW3DInterlaced() + { + #if defined(TARGET_ANDROID) +-#if defined(HAS_LIBAMCODEC) + if (aml_hw3d_present()) + return true; + #endif +-#endif + return false; + } + +diff --git a/xbmc/windowing/egl/EGLWrapper.cpp b/xbmc/windowing/egl/EGLWrapper.cpp +index 30f5757..583d43a 100644 +--- a/xbmc/windowing/egl/EGLWrapper.cpp ++++ b/xbmc/windowing/egl/EGLWrapper.cpp +@@ -24,19 +24,15 @@ + #include + #if defined(TARGET_ANDROID) + #include "EGLNativeTypeAndroid.h" +-#if defined(HAS_LIBAMCODEC) + #include "EGLNativeTypeAmlAndroid.h" + #endif +-#endif + #if defined(TARGET_RASPBERRY_PI) + #include "EGLNativeTypeRaspberryPI.h" + #endif + #if defined(HAS_IMXVPU) + #include "EGLNativeTypeIMX.h" + #endif +-#if defined(TARGET_LINUX) && defined(HAS_LIBAMCODEC) + #include "EGLNativeTypeAmlogic.h" +-#endif + #include "EGLWrapper.h" + + #define CheckError() m_result = eglGetError(); if(m_result != EGL_SUCCESS) CLog::Log(LOGERROR, "EGL error in %s: %x",__FUNCTION__, m_result); +@@ -91,15 +87,15 @@ bool CEGLWrapper::Initialize(const std::string &implementation) + // Try to create each backend in sequence and go with the first one + // that we know will work + if ( +-#if defined(TARGET_ANDROID) && defined(HAS_LIBAMCODEC) +- (nativeGuess = CreateEGLNativeType(implementation)) +-#elif defined(TARGET_ANDROID) +- (nativeGuess = CreateEGLNativeType(implementation)) +-#elif defined(TARGET_RASPBERRY_PI) ++#if defined(TARGET_ANDROID) ++ (nativeGuess = CreateEGLNativeType(implementation)) || ++ (nativeGuess = CreateEGLNativeType(implementation)) || ++#endif ++#if defined(TARGET_RASPBERRY_PI) + (nativeGuess = CreateEGLNativeType(implementation)) + #elif defined(HAS_IMXVPU) + (nativeGuess = CreateEGLNativeType(implementation)) +-#elif defined(TARGET_LINUX) && defined(HAS_LIBAMCODEC) ++#else + (nativeGuess = CreateEGLNativeType(implementation)) + #endif + ) +-- +2.10.2 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/EGLNativeTypeV3D-nxpl.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/EGLNativeTypeV3D-nxpl.patch new file mode 100644 index 00000000..1912f74a --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/EGLNativeTypeV3D-nxpl.patch @@ -0,0 +1,364 @@ +From ad98db002aefd9d2daec19973f20cc589831cc1e Mon Sep 17 00:00:00 2001 +From: GF +Date: Tue, 21 Mar 2017 17:42:18 +0100 +Subject: EGLNativeTypeV3D + +--- + xbmc/windowing/egl/EGLNativeTypeV3D.cpp | 208 ++++++++++++++++++++++++++++++++ + xbmc/windowing/egl/EGLNativeTypeV3D.h | 129 ++++++++++++++++++++ + 2 files changed, 337 insertions(+) + create mode 100644 xbmc/windowing/egl/EGLNativeTypeV3D.cpp + create mode 100644 xbmc/windowing/egl/EGLNativeTypeV3D.h + +diff --git a/xbmc/windowing/egl/EGLNativeTypeV3D.cpp b/xbmc/windowing/egl/EGLNativeTypeV3D.cpp +new file mode 100644 +index 0000000..0bceef6 +--- /dev/null ++++ b/xbmc/windowing/egl/EGLNativeTypeV3D.cpp +@@ -0,0 +1,208 @@ ++/* ++ * Copyright (C) 2011-2012 Team XBMC ++ * http://www.xbmc.org ++ * ++ * This Program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This Program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with XBMC; see the file COPYING. If not, see ++ * . ++ * ++ */ ++#include "system.h" ++#include "EGLNativeTypeV3D.h" ++#include "utils/StringUtils.h" ++#include "utils/SysfsUtils.h" ++#include "utils/log.h" ++#include "guilib/gui3d.h" ++#include "linux/DllBCM.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++CEGLNativeTypeV3D::CEGLNativeTypeV3D() ++{ ++ m_nativeDisplay = NULL; ++ m_nativeWindow = NULL; ++} ++ ++CEGLNativeTypeV3D::~CEGLNativeTypeV3D() ++{ ++} ++ ++bool CEGLNativeTypeV3D::CheckCompatibility() ++{ ++ return true; ++} ++ ++void CEGLNativeTypeV3D::Initialize() ++{ ++} ++ ++void CEGLNativeTypeV3D::Destroy() ++{ ++} ++ ++bool CEGLNativeTypeV3D::CreateNativeDisplay() ++{ ++ m_nativeDisplay = EGL_DEFAULT_DISPLAY; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::CreateNativeWindow() ++{ ++ NEXUS_Platform_Join(); ++ NXPL_RegisterNexusDisplayPlatform(&nxpl_handle, nexus_display); ++ NXPL_NativeWindowInfoEXT nativeWindow; ++ ++ NXPL_GetDefaultNativeWindowInfoEXT(&nativeWindow); ++ ++ nativeWindow.x = 0; ++ nativeWindow.y = 0; ++ nativeWindow.width = 1280; ++ nativeWindow.height = 720; ++ nativeWindow.stretch = false; ++ nativeWindow.clientID = 0; ++ nativeWindow.zOrder = 0; ++ ++ m_nativeWindow = NXPL_CreateNativeWindowEXT(&nativeWindow); ++ if (!m_nativeWindow) ++ return false; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::GetNativeDisplay(XBNativeDisplayType **nativeDisplay) const ++{ ++ *nativeDisplay = (XBNativeDisplayType*) &m_nativeDisplay; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::GetNativeWindow(XBNativeDisplayType **nativeWindow) const ++{ ++ *nativeWindow = (XBNativeWindowType*) &m_nativeWindow; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::DestroyNativeDisplay() ++{ ++ m_nativeDisplay = NULL; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::DestroyNativeWindow() ++{ ++ NXPL_DestroyNativeWindow(m_nativeWindow); ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::GetNativeResolution(RESOLUTION_INFO *res) const ++{ ++ *res = m_desktopRes; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::SetNativeResolution(const RESOLUTION_INFO &res) ++{ ++ m_desktopRes = res; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::ProbeResolutions(std::vector &resolutions) ++{ ++ resolutions.clear(); ++ ++ m_desktopResAll[0].iScreen = 0; ++ m_desktopResAll[0].bFullScreen = true; ++ m_desktopResAll[0].iWidth = 1280; ++ m_desktopResAll[0].iHeight = 720; ++ m_desktopResAll[0].iScreenWidth = 1280; ++ m_desktopResAll[0].iScreenHeight= 720; ++ m_desktopResAll[0].dwFlags = D3DPRESENTFLAG_PROGRESSIVE; ++ m_desktopResAll[0].fRefreshRate = 50; ++ m_desktopResAll[0].fPixelRatio = 1.0f; ++ m_desktopResAll[0].strMode = StringUtils::Format("%dx%d", 1280, 720); ++ m_desktopResAll[0].strMode = StringUtils::Format("%s @ %.2f%s - Full Screen", m_desktopResAll[0].strMode.c_str(), (float)50, m_desktopResAll[0].dwFlags & D3DPRESENTFLAG_INTERLACED ? "i" : ""); ++ m_desktopResAll[0].iSubtitles = static_cast(0.965 * m_desktopResAll[0].iHeight); ++ ++ CLog::Log(LOGDEBUG, "EGL initial desktop resolution %s\n", m_desktopResAll[0].strMode.c_str()); ++ ++ resolutions.push_back(m_desktopResAll[0]); ++ ++ m_desktopResAll[1].iScreen = 0; ++ m_desktopResAll[1].bFullScreen = true; ++ m_desktopResAll[1].iWidth = 1280; ++ m_desktopResAll[1].iHeight = 720; ++ m_desktopResAll[1].iScreenWidth = 1280; ++ m_desktopResAll[1].iScreenHeight= 720; ++ m_desktopResAll[1].dwFlags = D3DPRESENTFLAG_PROGRESSIVE | D3DPRESENTFLAG_MODE3DSBS; ++ m_desktopResAll[1].fRefreshRate = 50; ++ m_desktopResAll[1].fPixelRatio = 1.0f; ++ m_desktopResAll[1].strMode = StringUtils::Format("%dx%d", 1280, 720); ++ m_desktopResAll[1].strMode = StringUtils::Format("%s @ %.2f%s - Full Screen 3DSBS", m_desktopResAll[1].strMode.c_str(), (float)50, m_desktopResAll[1].dwFlags & D3DPRESENTFLAG_INTERLACED ? "i" : ""); ++ m_desktopResAll[1].iSubtitles = static_cast(0.965 * m_desktopResAll[1].iHeight); ++ ++ CLog::Log(LOGDEBUG, "EGL initial desktop resolution %s\n", m_desktopResAll[1].strMode.c_str()); ++ ++ resolutions.push_back(m_desktopResAll[1]); ++ ++ m_desktopResAll[2].iScreen = 0; ++ m_desktopResAll[2].bFullScreen = true; ++ m_desktopResAll[2].iWidth = 1280; ++ m_desktopResAll[2].iHeight = 720; ++ m_desktopResAll[2].iScreenWidth = 1280; ++ m_desktopResAll[2].iScreenHeight= 720; ++ m_desktopResAll[2].dwFlags = D3DPRESENTFLAG_PROGRESSIVE | D3DPRESENTFLAG_MODE3DTB; ++ m_desktopResAll[2].fRefreshRate = 50; ++ m_desktopResAll[2].fPixelRatio = 1.0f; ++ m_desktopResAll[2].strMode = StringUtils::Format("%dx%d", 1280, 720); ++ m_desktopResAll[2].strMode = StringUtils::Format("%s @ %.2f%s - Full Screen 3DTB", m_desktopResAll[2].strMode.c_str(), (float)50, m_desktopResAll[2].dwFlags & D3DPRESENTFLAG_INTERLACED ? "i" : ""); ++ m_desktopResAll[2].iSubtitles = static_cast(0.965 * m_desktopResAll[2].iHeight); ++ ++ CLog::Log(LOGDEBUG, "EGL initial desktop resolution %s\n", m_desktopResAll[2].strMode.c_str()); ++ ++ resolutions.push_back(m_desktopResAll[2]); ++ ++ m_desktopResAll[3].iScreen = 0; ++ m_desktopResAll[3].bFullScreen = true; ++ m_desktopResAll[3].iWidth = 1280; ++ m_desktopResAll[3].iHeight = 720; ++ m_desktopResAll[3].iScreenWidth = 1920; ++ m_desktopResAll[3].iScreenHeight= 1080; ++ m_desktopResAll[3].dwFlags = D3DPRESENTFLAG_PROGRESSIVE; ++ m_desktopResAll[3].fRefreshRate = 50; ++ m_desktopResAll[3].fPixelRatio = 1.0f; ++ m_desktopResAll[3].strMode = StringUtils::Format("%dx%d", 1920, 1080); ++ m_desktopResAll[3].strMode = StringUtils::Format("%s @ %.2f%s - Full Screen", m_desktopResAll[3].strMode.c_str(), (float)50, m_desktopResAll[3].dwFlags & D3DPRESENTFLAG_INTERLACED ? "i" : ""); ++ m_desktopResAll[3].iSubtitles = static_cast(0.965 * m_desktopResAll[3].iHeight); ++ ++ CLog::Log(LOGDEBUG, "EGL initial desktop resolution %s\n", m_desktopResAll[3].strMode.c_str()); ++ ++ resolutions.push_back(m_desktopResAll[3]); ++ ++ m_desktopRes = m_desktopResAll[0]; ++ ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::GetPreferredResolution(RESOLUTION_INFO *res) const ++{ ++ *res = m_desktopResAll[0]; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::ShowWindow(bool show) ++{ ++ NXPL_ShowNativeWindowEXT(m_nativeWindow, show); ++ return true; ++} +\ No newline at end of file +diff --git a/xbmc/windowing/egl/EGLNativeTypeV3D.h b/xbmc/windowing/egl/EGLNativeTypeV3D.h +new file mode 100644 +index 0000000..a174510 +--- /dev/null ++++ b/xbmc/windowing/egl/EGLNativeTypeV3D.h +@@ -0,0 +1,129 @@ ++#pragma once ++ ++/* ++ * Copyright (C) 2011-2012 Team XBMC ++ * http://www.xbmc.org ++ * ++ * This Program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This Program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with XBMC; see the file COPYING. If not, see ++ * . ++ * ++ */ ++ ++#include "EGLNativeType.h" ++ ++#include ++#include ++ ++#define NEXUS_DISPLAYHANDLE void* ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++typedef void *NXPL_PlatformHandle; ++ ++typedef enum NEXUS_BlendFactor ++{ ++ NEXUS_BlendFactor_eZero ++} NEXUS_BlendFactor; ++ ++typedef struct NEXUS_BlendEquation ++{ ++ NEXUS_BlendFactor a; ++ NEXUS_BlendFactor b; ++ bool subtract_cd; ++ NEXUS_BlendFactor c; ++ NEXUS_BlendFactor d; ++ bool subtract_e; ++ NEXUS_BlendFactor e; ++} NEXUS_BlendEquation; ++ ++typedef struct ++{ ++ uint32_t width; ++ uint32_t height; ++ uint32_t x; ++ uint32_t y; ++ bool stretch; ++ uint32_t clientID; ++ uint32_t zOrder; ++ NEXUS_BlendEquation colorBlend; ++ NEXUS_BlendEquation alphaBlend; ++ uint32_t magic; ++} NXPL_NativeWindowInfoEXT; ++ ++/* Register a display for exclusive use. The client application should not use the display until ++ * calling NXPL_UnregisterNexusDisplayPlatform. ++ * It will register its own memory, h/w and display APIs suitable for basic exclusive mode rendering on ++ * a Nexus display. ++ * Fills in the NXPL platform handle, which must be passed back into the unregister function. ++ */ ++void NXPL_RegisterNexusDisplayPlatform(NXPL_PlatformHandle *handle, NEXUS_DISPLAYHANDLE display); ++ ++/* Unregister a display for exclusive use. The client application can the use the Nexus display again. */ ++void NXPL_UnregisterNexusDisplayPlatform(NXPL_PlatformHandle handle); ++ ++/* Generate a default NXPL_NativeWindowInfoEXT */ ++void NXPL_GetDefaultNativeWindowInfoEXT(NXPL_NativeWindowInfoEXT *info); ++ ++/* Create a 'native window' of the given size. This is really just a small structure that holds the size ++ * of the window that EGL will write into. */ ++void *NXPL_CreateNativeWindowEXT(const NXPL_NativeWindowInfoEXT *info); ++ ++/* Destroy a 'native window' */ ++void NXPL_DestroyNativeWindow(void *nativeWin); ++ ++/* Show/hide a 'native window' */ ++void NXPL_ShowNativeWindowEXT(void *native,bool show); ++ ++int NEXUS_Platform_AuthenticatedJoin(const void *settings); ++#define NEXUS_Platform_Join() NEXUS_Platform_AuthenticatedJoin(NULL) ++ ++#ifdef __cplusplus ++} ++#endif ++ ++class CEGLNativeTypeV3D : public CEGLNativeType ++{ ++public: ++ CEGLNativeTypeV3D(); ++ virtual ~CEGLNativeTypeV3D(); ++ virtual std::string GetNativeName() const { return "V3D"; }; ++ virtual bool CheckCompatibility(); ++ virtual void Initialize(); ++ virtual void Destroy(); ++ virtual int GetQuirks() { return EGL_QUIRK_NONE; }; ++ ++ virtual bool CreateNativeDisplay(); ++ virtual bool CreateNativeWindow(); ++ virtual bool GetNativeDisplay(XBNativeDisplayType **nativeDisplay) const; ++ virtual bool GetNativeWindow(XBNativeWindowType **nativeWindow) const; ++ ++ virtual bool DestroyNativeWindow(); ++ virtual bool DestroyNativeDisplay(); ++ ++ virtual bool GetNativeResolution(RESOLUTION_INFO *res) const; ++ virtual bool SetNativeResolution(const RESOLUTION_INFO &res); ++ virtual bool ProbeResolutions(std::vector &resolutions); ++ virtual bool GetPreferredResolution(RESOLUTION_INFO *res) const; ++ ++ virtual bool ShowWindow(bool show); ++private: ++ RESOLUTION_INFO m_desktopRes; ++ RESOLUTION_INFO m_desktopResAll[4]; ++ ++ NXPL_PlatformHandle nxpl_handle = 0; ++ NEXUS_DISPLAYHANDLE nexus_display = 0; ++ ++}; +-- +2.7.4 \ No newline at end of file diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/EGLNativeTypeV3D-platform.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/EGLNativeTypeV3D-platform.patch new file mode 100644 index 00000000..4d985372 --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/EGLNativeTypeV3D-platform.patch @@ -0,0 +1,256 @@ +From cfe6356a021ed1e1b1824204bb3d2a601ca13002 Mon Sep 17 00:00:00 2001 +From: GF +Date: Tue, 21 Mar 2017 23:02:40 +0100 +Subject: [PATCH] EGLNativeTypeV3D platform + +--- + xbmc/windowing/egl/EGLNativeTypeV3D.cpp | 171 ++++++++++++++++++++++++++++++++ + xbmc/windowing/egl/EGLNativeTypeV3D.h | 55 ++++++++++ + 2 files changed, 226 insertions(+) + create mode 100644 xbmc/windowing/egl/EGLNativeTypeV3D.cpp + create mode 100644 xbmc/windowing/egl/EGLNativeTypeV3D.h + +diff --git a/xbmc/windowing/egl/EGLNativeTypeV3D.cpp b/xbmc/windowing/egl/EGLNativeTypeV3D.cpp +new file mode 100644 +index 0000000..bea3049 +--- /dev/null ++++ b/xbmc/windowing/egl/EGLNativeTypeV3D.cpp +@@ -0,0 +1,171 @@ ++/* ++ * Copyright (C) 2011-2012 Team XBMC ++ * http://www.xbmc.org ++ * ++ * This Program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This Program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with XBMC; see the file COPYING. If not, see ++ * . ++ * ++ */ ++#include "system.h" ++#include "EGLNativeTypeV3D.h" ++#include "utils/StringUtils.h" ++#include "utils/log.h" ++#include "guilib/gui3d.h" ++#include "linux/DllBCM.h" ++#include ++ ++extern V3D_PlatformHandle g_v3dPlatformHandle; ++ ++using namespace std; ++ ++CEGLNativeTypeV3D::CEGLNativeTypeV3D() ++{ ++ m_nativeDisplay = NULL; ++ m_nativeWindow = NULL; ++} ++ ++CEGLNativeTypeV3D::~CEGLNativeTypeV3D() ++{ ++} ++ ++bool CEGLNativeTypeV3D::CheckCompatibility() ++{ ++ return true; ++} ++ ++void CEGLNativeTypeV3D::Initialize() ++{ ++} ++ ++void CEGLNativeTypeV3D::Destroy() ++{ ++} ++ ++bool CEGLNativeTypeV3D::CreateNativeDisplay() ++{ ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::CreateNativeWindow() ++{ ++ V3D_NativeWindowInfo info; ++ m_nativeWindow = V3D_CreateNativeWindow(&info); ++ if (!m_nativeWindow) { ++ return false; ++ } ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::GetNativeDisplay(XBNativeDisplayType **nativeDisplay) const ++{ ++ *nativeDisplay = (XBNativeDisplayType*) &m_nativeDisplay; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::GetNativeWindow(XBNativeDisplayType **nativeWindow) const ++{ ++ *nativeWindow = (XBNativeWindowType*) &m_nativeWindow; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::DestroyNativeDisplay() ++{ ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::DestroyNativeWindow() ++{ ++ V3D_DestroyNativeWindow(m_nativeWindow); ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::GetNativeResolution(RESOLUTION_INFO *res) const ++{ ++ *res = m_desktopRes; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::SetNativeResolution(const RESOLUTION_INFO &res) ++{ ++ m_desktopRes = res; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::ProbeResolutions(std::vector &resolutions) ++{ ++ resolutions.clear(); ++ ++ m_desktopResAll[0].iScreen = 0; ++ m_desktopResAll[0].bFullScreen = true; ++ m_desktopResAll[0].iWidth = 1280; ++ m_desktopResAll[0].iHeight = 720; ++ m_desktopResAll[0].iScreenWidth = 1280; ++ m_desktopResAll[0].iScreenHeight= 720; ++ m_desktopResAll[0].dwFlags = D3DPRESENTFLAG_PROGRESSIVE; ++ m_desktopResAll[0].fRefreshRate = 50; ++ m_desktopResAll[0].strMode = StringUtils::Format("%dx%d", 1280, 720); ++ m_desktopResAll[0].strMode = StringUtils::Format("%s @ %.2f%s - Full Screen", m_desktopRes.strMode.c_str(), 50., ""); ++ m_desktopResAll[0].iSubtitles = static_cast(0.965 * m_desktopResAll[0].iHeight); ++ ++ CLog::Log(LOGDEBUG, "EGL initial desktop resolution %s\n", m_desktopResAll[0].strMode.c_str()); ++ ++ resolutions.push_back(m_desktopResAll[0]); ++ ++ m_desktopResAll[1].iScreen = 0; ++ m_desktopResAll[1].bFullScreen = true; ++ m_desktopResAll[1].iWidth = 1280; ++ m_desktopResAll[1].iHeight = 720; ++ m_desktopResAll[1].iScreenWidth = 1280; ++ m_desktopResAll[1].iScreenHeight= 720; ++ m_desktopResAll[1].dwFlags = D3DPRESENTFLAG_PROGRESSIVE | D3DPRESENTFLAG_MODE3DSBS; ++ m_desktopResAll[1].fRefreshRate = 50; ++ m_desktopResAll[1].strMode = StringUtils::Format("%dx%d", 1280, 720); ++ m_desktopResAll[1].strMode = StringUtils::Format("%s @ %.2f%s - Full Screen 3DSBS", m_desktopResAll[1].strMode.c_str(), 50., ""); ++ m_desktopResAll[1].iSubtitles = static_cast(0.965 * m_desktopResAll[1].iHeight); ++ ++ CLog::Log(LOGDEBUG, "EGL initial desktop resolution %s\n", m_desktopResAll[1].strMode.c_str()); ++ ++ resolutions.push_back(m_desktopResAll[1]); ++ ++ m_desktopResAll[2].iScreen = 0; ++ m_desktopResAll[2].bFullScreen = true; ++ m_desktopResAll[2].iWidth = 1280; ++ m_desktopResAll[2].iHeight = 720; ++ m_desktopResAll[2].iScreenWidth = 1280; ++ m_desktopResAll[2].iScreenHeight= 720; ++ m_desktopResAll[2].dwFlags = D3DPRESENTFLAG_PROGRESSIVE | D3DPRESENTFLAG_MODE3DTB; ++ m_desktopResAll[2].fRefreshRate = 50; ++ m_desktopResAll[2].strMode = StringUtils::Format("%dx%d", 1280, 720); ++ m_desktopResAll[2].strMode = StringUtils::Format("%s @ %.2f%s - Full Screen 3DTB", m_desktopResAll[2].strMode.c_str(), 50., ""); ++ m_desktopResAll[2].iSubtitles = static_cast(0.965 * m_desktopResAll[2].iHeight); ++ ++ CLog::Log(LOGDEBUG, "EGL initial desktop resolution %s\n", m_desktopResAll[2].strMode.c_str()); ++ ++ resolutions.push_back(m_desktopResAll[2]); ++ ++ m_desktopRes = m_desktopResAll[0]; ++ ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::GetPreferredResolution(RESOLUTION_INFO *res) const ++{ ++ *res = m_desktopResAll[0]; ++ return true; ++} ++ ++bool CEGLNativeTypeV3D::ShowWindow(bool show) ++{ ++ return V3D_SetVisible(g_v3dPlatformHandle, show); ++} +\ No newline at end of file +diff --git a/xbmc/windowing/egl/EGLNativeTypeV3D.h b/xbmc/windowing/egl/EGLNativeTypeV3D.h +new file mode 100644 +index 0000000..3e483fb +--- /dev/null ++++ b/xbmc/windowing/egl/EGLNativeTypeV3D.h +@@ -0,0 +1,56 @@ ++#pragma once ++ ++/* ++ * Copyright (C) 2011-2012 Team XBMC ++ * http://www.xbmc.org ++ * ++ * This Program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * This Program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with XBMC; see the file COPYING. If not, see ++ * . ++ * ++ */ ++ ++#include "EGLNativeType.h" ++ ++#include ++#include ++ ++class CEGLNativeTypeV3D : public CEGLNativeType ++{ ++public: ++ CEGLNativeTypeV3D(); ++ virtual ~CEGLNativeTypeV3D(); ++ virtual std::string GetNativeName() const { return "V3D"; }; ++ virtual bool CheckCompatibility(); ++ virtual void Initialize(); ++ virtual void Destroy(); ++ virtual int GetQuirks() { return EGL_QUIRK_NONE; }; ++ ++ virtual bool CreateNativeDisplay(); ++ virtual bool CreateNativeWindow(); ++ virtual bool GetNativeDisplay(XBNativeDisplayType **nativeDisplay) const; ++ virtual bool GetNativeWindow(XBNativeWindowType **nativeWindow) const; ++ ++ virtual bool DestroyNativeWindow(); ++ virtual bool DestroyNativeDisplay(); ++ ++ virtual bool GetNativeResolution(RESOLUTION_INFO *res) const; ++ virtual bool SetNativeResolution(const RESOLUTION_INFO &res); ++ virtual bool ProbeResolutions(std::vector &resolutions); ++ virtual bool GetPreferredResolution(RESOLUTION_INFO *res) const; ++ ++ virtual bool ShowWindow(bool show); ++private: ++ RESOLUTION_INFO m_desktopRes; ++ RESOLUTION_INFO m_desktopResAll[3]; ++}; +\ No newline at end of file +-- +2.7.4 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/brcmstb-settings.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/brcmstb-settings.patch new file mode 100644 index 00000000..4502010c --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/brcmstb-settings.patch @@ -0,0 +1,366 @@ +From 6a4bc48c5db228ac1d9d00efe02a7c2e292bd62f Mon Sep 17 00:00:00 2001 +From: GF +Date: Tue, 21 Mar 2017 19:00:39 +0100 +Subject: brcmstb settings + +--- + lib/libdvd/Makefile.in | 14 ++++++------ + system/settings/settings.xml | 27 ++++++----------------- + tools/Linux/kodi.sh.in | 37 ++++++++++++++++++++++++-------- + tools/depends/target/libdvdcss/Makefile | 4 ++-- + tools/depends/target/libdvdnav/Makefile | 4 ++-- + tools/depends/target/libdvdread/Makefile | 4 ++-- + xbmc/input/linux/LinuxInputDevices.cpp | 33 +++++++++++++++++++++++++--- + 7 files changed, 78 insertions(+), 45 deletions(-) + +diff --git a/lib/libdvd/Makefile.in b/lib/libdvd/Makefile.in +index 5a4508b..8897532 100644 +--- a/lib/libdvd/Makefile.in ++++ b/lib/libdvd/Makefile.in +@@ -4,16 +4,16 @@ ARCH=@ARCH@ + CC=@CC@ + CXX=@CXX@ + +-ifeq (@CROSS_COMPILING@,yes) +- DEPENDS_DIR = $(shell grep "^PREFIX=/" @abs_top_srcdir@/tools/depends/Makefile.include | sed 's/PREFIX=//g') +- DVDNAV_A = $(DEPENDS_DIR)/lib/libdvdnav.a +- DVDREAD_A = $(DEPENDS_DIR)/lib/libdvdread.a +- DVDCSS_A = $(DEPENDS_DIR)/lib/libdvdcss.a +-else ++#ifeq (@CROSS_COMPILING@,yes) ++# DEPENDS_DIR = $(shell grep "^PREFIX=/" @abs_top_srcdir@/tools/depends/Makefile.include | sed 's/PREFIX=//g') ++# DVDNAV_A = $(DEPENDS_DIR)/lib/libdvdnav.a ++# DVDREAD_A = $(DEPENDS_DIR)/lib/libdvdread.a ++# DVDCSS_A = $(DEPENDS_DIR)/lib/libdvdcss.a ++#else + DVDNAV_A = @abs_top_srcdir@/tools/depends/target/libdvdnav/dvdnav-install/lib/libdvdnav.a + DVDREAD_A = @abs_top_srcdir@/tools/depends/target/libdvdread/dvdread-install/lib/libdvdread.a + DVDCSS_A = @abs_top_srcdir@/tools/depends/target/libdvdcss/dvdcss-install/lib/libdvdcss.a +-endif ++#endif + + SYSDIR = @abs_top_srcdir@/system/players/VideoPlayer + SOS = libdvdnav-$(ARCH).so +diff --git a/system/settings/settings.xml b/system/settings/settings.xml +index f28f5da..fe25484 100644 +--- a/system/settings/settings.xml ++++ b/system/settings/settings.xml +@@ -2310,27 +2310,16 @@ + + + +- +- +- +- +- +- +- +- +- + + + + + + 2 +- 2 ++ 1 + + + +- +- + + + +@@ -2361,7 +2350,9 @@ + + HAS_AE_QUALITY_LEVELS + 2 +- 30 ++ ++ ++ + + aequalitylevels + +@@ -2379,7 +2370,7 @@ + + + 2 +- 48000 ++ 44100 + + + +@@ -2391,10 +2382,6 @@ + + + +- +- +- +- + + + +@@ -2416,7 +2403,7 @@ + + + 0 +- 1 ++ 0 + + + +@@ -2428,7 +2415,7 @@ + + + 0 +- resource.uisounds.kodi ++ 0 + + kodi.resource.uisounds + true +diff --git a/tools/Linux/kodi.sh.in b/tools/Linux/kodi.sh.in +index 9fc75dd..7baa5a6 100644 +--- a/tools/Linux/kodi.sh.in ++++ b/tools/Linux/kodi.sh.in +@@ -25,13 +25,33 @@ prefix="@prefix@" + exec_prefix="@exec_prefix@" + datarootdir="@datarootdir@" + LIBDIR="@libdir@" +-CRASHLOG_DIR=${CRASHLOG_DIR:-$HOME} +-USERDATA_DIR="${HOME}/.${bin_name}" + ++export KODI_TEMP="/tmp/kodi" ++CRASHLOG_DIR=${CRASHLOG_DIR:-$KODI_TEMP} + + # Workaround for high CPU load with nvidia GFX + export __GL_YIELD=USLEEP + ++check_media_hdd() { ++ [ -e /proc/mounts ] || return 0 ++ ++ exec 9<&0 < /proc/mounts ++ while read DEV MTPT REST; do ++ case $DEV in ++ /dev/sd[a-z][0-9]) ++ if [ "$MTPT" == "/media/hdd" ]; then ++ export HOME="$MTPT" ++ break ++ fi ++ ;; ++ esac ++ done ++ exec 0<&9 9<&- ++} ++ ++check_media_hdd ++USERDATA_DIR="${HOME}/.${bin_name}" ++ + # Fix wasting RAM due to fragmentation + export MALLOC_MMAP_THRESHOLD_=131072 + +@@ -165,13 +184,13 @@ do + LOOP=0 + "$LIBDIR/${bin_name}/${bin_name}.bin" $SAVED_ARGS + RET=$? +- if [ $(( $RET == 65 )) = "1" ] +- then # User requested to restart app +- LOOP=1 +- elif [ $(( ($RET >= 131 && $RET <= 136) || $RET == 139 )) = "1" ] +- then # Crashed with core dump +- print_crash_report +- fi ++# if [ $(( $RET == 65 )) = "1" ] ++# then # User requested to restart app ++# LOOP=1 ++# elif [ $(( ($RET >= 131 && $RET <= 136) || $RET == 139 )) = "1" ] ++# then # Crashed with core dump ++# print_crash_report ++# fi + done + + exit $RET +diff --git a/tools/depends/target/libdvdcss/Makefile b/tools/depends/target/libdvdcss/Makefile +index 518ce2b..7e51e79 100644 +--- a/tools/depends/target/libdvdcss/Makefile ++++ b/tools/depends/target/libdvdcss/Makefile +@@ -3,7 +3,7 @@ include DVDCSS-VERSION + DEPS= DVDCSS-VERSION Makefile + + ifeq ($(CROSS_COMPILING), yes) +- DEPS += ../../Makefile.include ++# DEPS += ../../Makefile.include + else + ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + PREFIX := $(ROOT_DIR)/dvdcss-install +@@ -19,7 +19,7 @@ RETRIEVE_TOOL := curl -Ls --create-dirs --retry 10 --retry-delay 3 + ARCHIVE_TOOL := tar --strip-components=1 -xf + + # configuration settings +-config = --prefix=$(PREFIX) --disable-shared --enable-static --with-pic ++config = --build=$(BUILD_SYS) --host=$(HOST_SYS) --prefix=$(PREFIX) --disable-shared --enable-static --with-pic + + CLEAN_FILES=$(ARCHIVE) $(PLATFORM) + +diff --git a/tools/depends/target/libdvdnav/Makefile b/tools/depends/target/libdvdnav/Makefile +index cd44351..2dd443c 100644 +--- a/tools/depends/target/libdvdnav/Makefile ++++ b/tools/depends/target/libdvdnav/Makefile +@@ -3,11 +3,11 @@ include DVDNAV-VERSION + DEPS = DVDNAV-VERSION Makefile + + # configuration settings +-config = --prefix=$(PREFIX) --disable-shared --enable-static --with-pic ++config = --build=$(BUILD_SYS) --host=$(HOST_SYS) --prefix=$(PREFIX) --disable-shared --enable-static --with-pic + EXTRA_CFLAGS = -D_XBMC -DHAVE_DVDCSS_DVDCSS_H + + ifeq ($(CROSS_COMPILING), yes) +- DEPS += ../../Makefile.include ++# DEPS += ../../Makefile.include + else + ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + PREFIX := $(ROOT_DIR)/dvdnav-install +diff --git a/tools/depends/target/libdvdread/Makefile b/tools/depends/target/libdvdread/Makefile +index 3652f1b..a1c36f3 100644 +--- a/tools/depends/target/libdvdread/Makefile ++++ b/tools/depends/target/libdvdread/Makefile +@@ -3,11 +3,11 @@ include DVDREAD-VERSION + DEPS = DVDREAD-VERSION Makefile + + # configuration settings +-config = --prefix=$(PREFIX) --disable-shared --enable-static --with-pic ++config = --build=$(BUILD_SYS) --host=$(HOST_SYS) --prefix=$(PREFIX) --disable-shared --enable-static --with-pic + EXTRA_CFLAGS = -D_XBMC + + ifeq ($(CROSS_COMPILING), yes) +- DEPS += ../../Makefile.include ++# DEPS += ../../Makefile.include + else + ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + PREFIX := $(ROOT_DIR)/dvdread-install +diff --git a/xbmc/input/linux/LinuxInputDevices.cpp b/xbmc/input/linux/LinuxInputDevices.cpp +index 3875138..d3084f2 100644 +--- a/xbmc/input/linux/LinuxInputDevices.cpp ++++ b/xbmc/input/linux/LinuxInputDevices.cpp +@@ -27,6 +27,8 @@ + * . + * + */ ++#define VKEY_ENABLE (0) ++ + #include "system.h" + #if defined(HAS_LINUX_EVENTS) + +@@ -276,6 +278,10 @@ KeyMap keyMap[] = { + { 378 , XBMCK_RIGHT }, // Green + { 381 , XBMCK_UP }, // Yellow + { 366 , XBMCK_DOWN }, // Blue ++#if defined(TARGET_V3D) ++ { KEY_OK , XBMCK_RETURN }, // Ok ++ { KEY_EXIT , XBMCK_ESCAPE }, // EXIT ++#endif + }; + + typedef enum +@@ -553,9 +559,17 @@ bool CLinuxInputDevice::KeyEvent(const struct input_event& levt, XBMC_Event& dev + + KeymapEntry entry; + entry.code = code; ++ ++ int keyMapValue; ++#if defined(TARGET_V3D) ++ if (devt.key.keysym.mod & (XBMCKMOD_SHIFT | XBMCKMOD_CAPS)) keyMapValue = entry.shift; ++ else if (devt.key.keysym.mod & XBMCKMOD_ALT) keyMapValue = entry.alt; ++ else if (devt.key.keysym.mod & XBMCKMOD_META) keyMapValue = entry.altShift; ++ else keyMapValue = entry.base; ++ devt.key.keysym.unicode = devt.key.keysym.sym; ++#else + if (GetKeymapEntry(entry)) + { +- int keyMapValue; + if (devt.key.keysym.mod & (XBMCKMOD_SHIFT | XBMCKMOD_CAPS)) keyMapValue = entry.shift; + else if (devt.key.keysym.mod & XBMCKMOD_ALT) keyMapValue = entry.alt; + else if (devt.key.keysym.mod & XBMCKMOD_META) keyMapValue = entry.altShift; +@@ -570,6 +584,7 @@ bool CLinuxInputDevice::KeyEvent(const struct input_event& levt, XBMC_Event& dev + } + } + } ++#endif + } + + return true; +@@ -858,6 +873,12 @@ XBMC_Event CLinuxInputDevice::ReadEvent() + break; + } + ++#if defined(TARGET_V3D) ++ if (access("/tmp/playing.lock", F_OK) == 0) { ++ break; ++ } ++#endif ++ + //printf("read event readlen = %d device name %s m_fileName %s\n", readlen, m_deviceName, m_fileName.c_str()); + + // sanity check if we realy read the event +@@ -1195,6 +1216,7 @@ bool CLinuxInputDevices::CheckDevice(const char *device) + return false; + } + ++#if !defined(TARGET_V3D) + if (ioctl(fd, EVIOCGRAB, 1) && errno != EINVAL) + { + close(fd); +@@ -1202,6 +1224,7 @@ bool CLinuxInputDevices::CheckDevice(const char *device) + } + + ioctl(fd, EVIOCGRAB, 0); ++#endif + + close(fd); + +@@ -1294,6 +1317,7 @@ bool CLinuxInputDevice::Open() + return false; + } + ++#if !defined(TARGET_V3D) + /* grab device */ + ret = ioctl(fd, EVIOCGRAB, 1); + if (ret && errno != EINVAL) +@@ -1302,6 +1326,7 @@ bool CLinuxInputDevice::Open() + close(fd); + return false; + } ++#endif + + // Set the socket to non-blocking + int opts = 0; +@@ -1368,8 +1393,9 @@ bool CLinuxInputDevice::Open() + return true; + + driver_open_device_error: +- ++#if !defined(TARGET_V3D) + ioctl(fd, EVIOCGRAB, 0); ++#endif + if (m_vt_fd >= 0) + { + close(m_vt_fd); +@@ -1443,9 +1469,10 @@ bool CLinuxInputDevice::GetKeymapEntry(KeymapEntry& entry) + */ + void CLinuxInputDevice::Close() + { ++#if !defined(TARGET_V3D) + /* release device */ + ioctl(m_fd, EVIOCGRAB, 0); +- ++#endif + if (m_vt_fd >= 0) + close(m_vt_fd); + +-- +2.7.4 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/e2player.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/e2player.patch new file mode 100644 index 00000000..ec7efd4e --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/e2player.patch @@ -0,0 +1,37 @@ +From 045a3b23ca0f392207c7f726ce486928223c563f Mon Sep 17 00:00:00 2001 +From: GF +Date: Fri, 24 Feb 2017 10:52:26 +0100 +Subject: e2player + +--- + system/playercorefactory.xml | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/system/playercorefactory.xml b/system/playercorefactory.xml +index be6b721..862b584 100644 +--- a/system/playercorefactory.xml ++++ b/system/playercorefactory.xml +@@ -8,8 +8,20 @@ + placeholder for MPlayer + + --> ++ ++ kodiext ++ -U "{1}" -S "{3}" -P "$PPID" ++ /tmp/kodiextin.json ++ true ++ true ++ none ++ + + ++ ++ ++ ++ + + + +-- +2.7.4 + diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-17/v3d-platform.patch b/meta-openpli/recipes-mediacenter/kodi/kodi-17/v3d-platform.patch new file mode 100644 index 00000000..a08972b3 --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-17/v3d-platform.patch @@ -0,0 +1,406 @@ +From 3006e0bf5dcbc1cdd9577876e2a857d6036f170b Mon Sep 17 00:00:00 2001 +From: GF +Date: Wed, 22 Mar 2017 14:12:46 +0100 +Subject: [PATCH] v3d platform + +--- + configure.ac | 78 ++++++++++++++++++++++++++--- + m4/xbmc_arch.m4 | 4 ++ + project/cmake/scripts/linux/ArchSetup.cmake | 6 ++- + tools/depends/configure.ac | 27 +++++++++ + tools/depends/target/ffmpeg/autobuild.sh | 14 ++++++ + xbmc/addons/AddonManager.cpp | 6 +++ + xbmc/platform/xbmc.cpp | 9 ++++ + xbmc/system_gl.h | 21 ++++---- + xbmc/windowing/egl/EGLWrapper.cpp | 7 ++- + xbmc/windowing/egl/Makefile.in | 3 ++ + 10 files changed, 157 insertions(+), 18 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0609390..890d573 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -681,6 +681,27 @@ case $use_platform in + use_neon=yes + use_cpu=cortex-a7 + ;; ++ v3d-cortexa15) ++ target_platform=target_v3d ++ target_videoplatform=target_v3dnxpl ++ use_cpu="cortex-a15" ++ ;; ++ v3d-mipsel) ++ target_platform=target_v3d ++ target_videoplatform=target_v3dnxpl ++ use_neon=yes ++ use_gles=yes ++ use_gl=no ++ use_sdl=no ++ ;; ++ v3d-xcore-mipsel) ++ target_platform=target_v3d ++ target_videoplatform=target_v3dplatform ++ use_neon=yes ++ use_gles=yes ++ use_gl=no ++ use_sdl=no ++ ;; + esac + + if test "$target_platform" = "target_raspberry_pi" ; then +@@ -696,6 +717,14 @@ if test "$target_platform" = "target_raspberry_pi" ; then + CXXFLAGS="$CXXFLAGS" + fi + ++if test "$target_platform" = "target_v3d" ; then ++ use_openmax=no ++ CORE_SYSTEM_NAME=linux ++ CFLAGS="$CFLAGS" ++ CXXFLAGS="$CXXFLAGS" ++ USE_V3D=1 ++fi ++ + if test "$host_vendor" = "apple"; then + use_avahi=no + use_alsa=no +@@ -819,6 +848,15 @@ elif test "$use_arch" = "arm"; then + [ CFLAGS="$SAVE_CFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork" + CXXFLAGS="$CXXFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork" + use_cpu=cortex-a8]) ++ elif test "$use_cpu" = "cortex-a15"; then ++ # Compile for ARMv7ve architecture ++ SAVE_CFLAGS="$CFLAGS" ++ CFLAGS="-mfpu=neon-vfpv4" ++ AC_COMPILE_IFELSE( ++ [AC_LANG_SOURCE([int foo;])], ++ [ CFLAGS="$SAVE_CFLAGS -Wno-psabi -Wa,-march=armv7ve -mtune=cortex-a15 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad" ++ CXXFLAGS="$CXXFLAGS -Wno-psabi -Wa,-march=armv7ve -mtune=cortex-a15 -mfpu=neon-vfpv4 -mvectorize-with-neon-quad" ++ use_cpu=cortex-a15]) + else + if test "$use_neon" = "yes"; then + CFLAGS="$CFLAGS -mfpu=neon -mvectorize-with-neon-quad" +@@ -912,6 +950,9 @@ if test "x$have_builtin_sync_val_compare_and_swap" = "xyes"; then + [Define to 1 if your compiler supports the __sync_val_compare_and_swap() intrinsic.]) + fi + ++# check if libatomic is available ++AC_CHECK_LIB([atomic], [__atomic_add_fetch_8], [LIBS="$LIBS -latomic"],) ++ + # Check for u16string/u32string declarations + AC_LANG_PUSH([C++]) + AC_CHECK_TYPES([std::u16string, std::u32string], [], [], [[#include ]]) +@@ -944,16 +985,24 @@ if test "$use_gles" = "yes"; then + AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."]) + AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."]) + AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.) +- else +- if test "$target_platform" = "target_raspberry_pi"; then ++ elif test "$target_platform" = "target_raspberry_pi"; then + AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."]) + AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."]) + AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.) + LIBS="$LIBS -lEGL -lGLESv2 -lbcm_host -lvcos -lvchiq_arm -lmmal -lmmal_core -lmmal_util -lvcsm" +- else ++ elif test "$target_videoplatform" = "target_v3dplatform" ; then ++ AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."]) ++ AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."]) ++ AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.) ++ LIBS="$LIBS -lEGL -lGLESv2 -lv3dplatform" ++ elif test "$target_videoplatform" = "target_v3dnxpl" ; then ++ AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."]) ++ AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."]) ++ AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.) ++ LIBS="$LIBS -lEGL -lGLESv2 -lnxpl -lnexus" ++ else + AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library)) + AC_CHECK_LIB([GLESv2],[main],, AC_MSG_ERROR($missing_library)) +- fi + fi + else + if test "$use_gl" = "yes"; then +@@ -1056,7 +1102,7 @@ int main() { + )]) + AC_LANG_POP([C++]) + +-if test "${target_platform}" = "target_linux" || test "${target_platform}" = "target_raspberry_pi" || test "${target_platform}" = "target_android"; then ++if test "${target_platform}" = "target_linux" || test "${target_platform}" = "target_raspberry_pi" || test "${target_platform}" = "target_android" || test "${target_platform}" = "target_v3d"; then + PKG_CHECK_MODULES([UUID], [uuid],, AC_MSG_ERROR(libuuid not found)) + fi + +@@ -1556,7 +1602,14 @@ if test "${USE_STATIC_FFMPEG}" = "1"; then + pkg_cfg_prefix=${SYSROOT} + fi + +- if test "$cross_compiling" != "yes"; then ++ if test "$target_platform" = "target_v3d"; then ++ AC_MSG_NOTICE("FFmpeg installation forced by user - installing our version") ++ CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" NM="$NM" AR="$AR" \ ++ AS="$AS" STRIP="$STRIP" CC="$CC" CXX="$CXX" LD="$CCLD" RANLIB="$RANLIB" \ ++ ${ffmpeg_build}/autobuild.sh ${FFMPEG_OPTS} ${PARALLEL_MAKE} --arch=generic ++ export PKG_CONFIG_PATH="${ffmpeg_build}/ffmpeg-install/lib/pkgconfig:$PKG_CONFIG_PATH" ++ ++ elif test "$cross_compiling" != "yes"; then + if test "$use_debug" != "yes"; then + FFMPEG_OPTS="-r" + fi +@@ -1599,6 +1652,12 @@ if test "${USE_STATIC_FFMPEG}" = "1"; then + CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" ${ffmpeg_build}/autobuild.sh ${FFMPEG_OPTS} + export PKG_CONFIG_PATH="${ffmpeg_build}/ffmpeg-install/lib/pkgconfig:$PKG_CONFIG_PATH" + ++ elif test "$with_ffmpeg" = "v3d"; then ++ # always build our ffmpeg ++ AC_MSG_NOTICE("FFmpeg installation forced by user - installing our version") ++ CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" ${ffmpeg_build}/autobuild.sh ${FFMPEG_OPTS} ++ export PKG_CONFIG_PATH="${ffmpeg_build}/ffmpeg-install/lib/pkgconfig:$PKG_CONFIG_PATH" ++ + elif test "$with_ffmpeg" != "no"; then + # user passed --with-ffmpeg=/some/path, lets use it + AC_MSG_NOTICE("using ffmpeg: ${with_ffmpeg}") +@@ -1611,11 +1670,15 @@ if test "$FFMPEG_FOUND" != "true"; then + PKG_CHECK_MODULES([FFMPEG], [$FFMPEG_LIBNAMES], + [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"; FFMPEG_FOUND="true"], + [AC_MSG_ERROR("ffmpeg not found")]) ++ if test "$with_ffmpeg" = "v3d"; then ++ FFMPEG_LIBS=$(PKG_CONFIG_SYSROOT_DIR="" ${PKG_CONFIG} --libs libavcodec 2>/dev/null) ++ FFMPEG_CFLAGS=$(PKG_CONFIG_SYSROOT_DIR="" ${PKG_CONFIG} --cflags libavcodec 2>/dev/null) ++ fi + fi + + if test "${USE_STATIC_FFMPEG}" = "1"; then + # get the libdir for static linking +- FFMPEG_LIBDIR=${pkg_cfg_prefix}$(PKG_CONFIG_SYSROOT_DIR="" ${PKG_CONFIG} --static --variable=libdir libavcodec) ++ FFMPEG_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR="" ${PKG_CONFIG} --static --variable=libdir libavcodec) + GNUTLS_ALL_LIBS=$(${PKG_CONFIG} --static --libs-only-l --silence-errors gnutls) + + # check if static libs are available +@@ -2329,6 +2392,7 @@ AC_SUBST(HAVE_SSE4) + AC_SUBST(USE_MMAL) + AC_SUBST(USE_X11) + AC_SUBST(USE_OPTICAL_DRIVE) ++AC_SUBST(USE_V3D) + + # pushd and popd are not available in other shells besides bash, so implement + # our own pushd/popd functions +diff --git a/m4/xbmc_arch.m4 b/m4/xbmc_arch.m4 +index d28f263..78bf56f 100644 +--- a/m4/xbmc_arch.m4 ++++ b/m4/xbmc_arch.m4 +@@ -80,4 +80,12 @@ fi + if test "$target_platform" = "target_raspberry_pi" ; then + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_ARMEL -DTARGET_RASPBERRY_PI") + fi ++ ++if test "$target_videoplatform" = "target_v3dplatform" ; then ++ AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_V3D -DTARGET_V3DPLATFORM") ++fi ++ ++if test "$target_videoplatform" = "target_v3dnxpl" ; then ++ AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_V3D -DTARGET_V3DNXPL") ++fi + ]) +diff --git a/project/cmake/scripts/linux/ArchSetup.cmake b/project/cmake/scripts/linux/ArchSetup.cmake +index c0cc1bf..716c08c 100644 +--- a/project/cmake/scripts/linux/ArchSetup.cmake ++++ b/project/cmake/scripts/linux/ArchSetup.cmake +@@ -13,7 +13,11 @@ else() + set(ARCH i486-linux) + set(NEON False) + add_options(CXX ALL_BUILDS "-msse") +- elseif(CPU MATCHES arm) ++ elseif(CPU MATCHES cortex-a15) ++ set(ARCH arm) ++ set(NEON True) ++ set(NEON_FLAGS "-fPIC -mcpu=cortex-a15 -mfloat-abi=hard -mfpu=neon-vfpv4 -mvectorize-with-neon-quad") ++ elseif(CPU MATCHES arm ) + set(ARCH arm) + set(NEON True) + set(NEON_FLAGS "-mfpu=neon -mvectorize-with-neon-quad") +diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac +index 3626ea5..6b2f5ff 100644 +--- a/tools/depends/configure.ac ++++ b/tools/depends/configure.ac +@@ -408,6 +408,30 @@ case $use_platform in + platform_cxxflags="-fPIC -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4" + platform_ldflags="-lpthread" + ;; ++ v3d-mipsel) ++ use_cpu=$host_cpu ++ use_toolchain="${use_toolchain:-/usr}" ++ platform_cflags="-Os -fPIC -DPIC" ++ platform_ldflags="-Wl,-rpath-link=$prefix/$deps_dir/lib" ++ platform_cxxflags="$platform_cflags" ++ platform_os="linux" ++ ;; ++ v3d-xcore-mipsel) ++ use_cpu=$host_cpu ++ use_toolchain="${use_toolchain:-/usr}" ++ platform_cflags="-Os -fPIC -DPIC" ++ platform_ldflags="-Wl,-rpath-link=$prefix/$deps_dir/lib" ++ platform_cxxflags="$platform_cflags" ++ platform_os="linux" ++ ;; ++ v3d-cortexa15) ++ target_platform=v3d ++ use_neon=yes ++ use_cpu=cortex-a15 ++ platform_cflags="-fPIC -mcpu=cortex-a15 -mfloat-abi=hard -mfpu=neon-vfpv4" ++ platform_cxxflags="-fPIC -mcpu=cortex-a15 -mfloat-abi=hard -mfpu=neon-vfpv4" ++ platform_ldflags="-lpthread" ++ ;; + esac + + if test "$target_platform" = "raspberry-pi" ; then +diff --git a/tools/depends/target/ffmpeg/autobuild.sh b/tools/depends/target/ffmpeg/autobuild.sh +index 5c29762..a3e7806 100755 +--- a/tools/depends/target/ffmpeg/autobuild.sh ++++ b/tools/depends/target/ffmpeg/autobuild.sh +@@ -134,6 +134,20 @@ tar --strip-components=1 -xf $MYDIR/${ARCHIVE} + + CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" \ + ./configure --prefix=$FFMPEG_PREFIX \ ++ --bindir="$FFMPEG_PREFIX/bin" \ ++ --libdir="$FFMPEG_PREFIX/lib" \ ++ --incdir="$FFMPEG_PREFIX/include" \ ++ --pkgconfigdir="$FFMPEG_PREFIX/lib/pkgconfig" \ ++ --target-os=linux \ ++ --enable-cross-compile \ ++ --nm="$NM" \ ++ --ar="$AR" \ ++ --as="$AS" \ ++ --strip="$STRIP" \ ++ --cc="$CC" \ ++ --cxx="$CXX" \ ++ --ld="$CCLD" \ ++ --ranlib="$RANLIB" \ + --extra-version="kodi-${VERSION}" \ + --disable-devices \ + --disable-ffplay \ +diff --git a/xbmc/addons/AddonManager.cpp b/xbmc/addons/AddonManager.cpp +index 6721f07..4bbab6d 100644 +--- a/xbmc/addons/AddonManager.cpp ++++ b/xbmc/addons/AddonManager.cpp +@@ -936,6 +936,9 @@ bool CAddonMgr::PlatformSupportsAddon(const cp_plugin_info_t *plugin) + #elif defined(TARGET_RASPBERRY_PI) + "rbpi", + "linux", ++#elif defined(TARGET_V3D) ++ "v3d", ++ "linux", + #elif defined(TARGET_FREEBSD) + "freebsd", + "linux", +@@ -1028,6 +1031,9 @@ std::string CAddonMgr::GetPlatformLibraryName(cp_cfg_element_t *base) const + #elif defined(TARGET_RASPBERRY_PI) + libraryName = GetExtValue(base, "@library_rbpi"); + if (libraryName.empty()) ++#elif defined(TARGET_V3D) ++ libraryName = GetExtValue(base, "@library_v3d"); ++ if (libraryName.empty()) + #endif + libraryName = GetExtValue(base, "@library_linux"); + #elif defined(TARGET_WINDOWS) && defined(HAS_DX) +diff --git a/xbmc/platform/xbmc.cpp b/xbmc/platform/xbmc.cpp +index 34e5ea6..7553a35 100644 +--- a/xbmc/platform/xbmc.cpp ++++ b/xbmc/platform/xbmc.cpp +@@ -21,6 +21,11 @@ + #include "Application.h" + #include "settings/AdvancedSettings.h" + ++#ifdef TARGET_V3DPLATFORM ++#include ++ V3D_PlatformHandle g_v3dPlatformHandle; ++#endif ++ + #ifdef TARGET_RASPBERRY_PI + #include "linux/RBP.h" + #endif +@@ -113,6 +118,10 @@ extern "C" int XBMC_Run(bool renderGUI, CFileItemList &playlist) + } + #endif + ++#ifdef TARGET_V3DPLATFORM ++ V3D_RegisterDisplayPlatform(&g_v3dPlatformHandle, NULL); ++#endif ++ + #ifdef TARGET_RASPBERRY_PI + g_RBP.Deinitialize(); + #endif +diff --git a/xbmc/system_gl.h b/xbmc/system_gl.h +index 0eae1af..fb10660 100644 +--- a/xbmc/system_gl.h ++++ b/xbmc/system_gl.h +@@ -22,7 +22,18 @@ + + #include "system.h" + +-#ifdef HAS_GL ++#ifdef HAS_GLES ++ #if defined(TARGET_DARWIN) ++ #include ++ #include ++ #elif defined(TARGET_V3DNXPL) ++ #include ++ #include ++ #else ++ #include ++ #include ++ #endif ++#elif HAS_GL + // always define GL_GLEXT_PROTOTYPES before include gl headers + #if !defined(GL_GLEXT_PROTOTYPES) + #define GL_GLEXT_PROTOTYPES +@@ -41,12 +52,4 @@ + #include + #include + #endif +-#elif HAS_GLES == 2 +- #if defined(TARGET_DARWIN) +- #include +- #include +- #else +- #include +- #include +- #endif + #endif +diff --git a/xbmc/windowing/egl/EGLWrapper.cpp b/xbmc/windowing/egl/EGLWrapper.cpp +index 30f5757..6d215a9 100644 +--- a/xbmc/windowing/egl/EGLWrapper.cpp ++++ b/xbmc/windowing/egl/EGLWrapper.cpp +@@ -35,7 +35,10 @@ + #include "EGLNativeTypeIMX.h" + #endif + #if defined(TARGET_LINUX) && defined(HAS_LIBAMCODEC) +-#include "EGLNativeTypeAmlogic.h" ++ #include "EGLNativeTypeAmlogic.h" ++#endif ++#if defined(TARGET_V3D) ++ #include "EGLNativeTypeV3D.h" + #endif + #include "EGLWrapper.h" + +@@ -101,6 +104,8 @@ bool CEGLWrapper::Initialize(const std::string &implementation) + (nativeGuess = CreateEGLNativeType(implementation)) + #elif defined(TARGET_LINUX) && defined(HAS_LIBAMCODEC) + (nativeGuess = CreateEGLNativeType(implementation)) ++#elif defined(TARGET_V3D) ++ (nativeGuess = CreateEGLNativeType(implementation)) + #endif + ) + { +diff --git a/xbmc/windowing/egl/Makefile.in b/xbmc/windowing/egl/Makefile.in +index 68f7862..4eed1dc 100644 +--- a/xbmc/windowing/egl/Makefile.in ++++ b/xbmc/windowing/egl/Makefile.in +@@ -12,6 +12,9 @@ endif + ifeq (@USE_IMXVPU@,1) + SRCS+= EGLNativeTypeIMX.cpp + endif ++ifeq (@USE_V3D@,1) ++SRCS+= EGLNativeTypeV3D.cpp ++endif + SRCS+= EGLWrapper.cpp + + LIB = windowing_egl.a +-- +2.7.4 \ No newline at end of file diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-startup.bb b/meta-openpli/recipes-mediacenter/kodi/kodi-startup.bb new file mode 100644 index 00000000..955d02bf --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-startup.bb @@ -0,0 +1,20 @@ +SUMMARY = "Systemd service for kodi startup" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" + +PV = "1.0" + +SRC_URI = "file://kodi.service" + +inherit systemd + +do_install() { + install -d ${D}/lib/systemd/system + install -m 0644 ${WORKDIR}/kodi.service ${D}/lib/systemd/system/ +} + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "kodi.service" + +RDEPENDS_${PN} += "xinit kodi" diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi-startup/kodi.service b/meta-openpli/recipes-mediacenter/kodi/kodi-startup/kodi.service new file mode 100644 index 00000000..29d0394e --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi-startup/kodi.service @@ -0,0 +1,14 @@ +[Unit] +Description=Kodi media thing + +[Service] +User=root +Type=simple +SuccessExitStatus=0 1 +IOSchedulingClass=realtime +IOSchedulingPriority=0 + +ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- /usr/bin/X :0 + +[Install] +WantedBy=basic.target diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi_17.bb b/meta-openpli/recipes-mediacenter/kodi/kodi_17.bb new file mode 100644 index 00000000..f61abad5 --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi_17.bb @@ -0,0 +1,192 @@ +SUMMARY = "Kodi Media Center" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=930e2a5f63425d8dd72dbd7391c43c46" + +PR = "r1" + +FILESPATH =. "${FILE_DIRNAME}/kodi-17:" + +DEPENDS = " \ + cmake-native \ + curl-native \ + gperf-native \ + jsonschemabuilder-native \ + nasm-native \ + swig-native \ + yasm-native \ + zip-native \ + avahi \ + boost \ + bzip2 \ + curl \ + dcadec \ + enca \ + expat \ + faad2 \ + ffmpeg \ + fontconfig \ + fribidi \ + giflib \ + jasper \ + libass \ + libcdio \ + libcec \ + libmad \ + libmicrohttpd \ + libmms \ + libmodplug \ + libpcre \ + libplist \ + libsamplerate0 \ + libsquish \ + libssh \ + libtinyxml \ + libusb1 \ + libxslt \ + lzo \ + mpeg2dec \ + python \ + samba \ + sqlite3 \ + taglib \ + virtual/egl \ + wavpack \ + yajl \ + zlib \ + ${@enable_glew(bb, d)} \ + " + +PROVIDES = "xbmc" + +SRCREV = "fc1619b118f6d503f920a49cf4ac4afcd0dd6b41" +PV = "17.1+gitr${SRCPV}" +SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Krypton \ + file://0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch \ + file://0004-handle-SIGTERM.patch \ + file://0005-add-support-to-read-frequency-output-if-using-intel-.patch \ + file://0006-Disable-DVD-support.patch \ + file://0007-Always-compile-libcpluff-as-PIC.patch \ + file://0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch \ + file://0009-build-Add-support-for-musl-triplets.patch \ + file://0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch \ + file://0011-Let-configure-pass-on-unknown-architectures-setting-.patch \ +" + +SRC_URI_append_libc-musl = " \ + file://0001-Fix-file_Emu-on-musl.patch \ + file://0002-Remove-FILEWRAP.patch \ +" + +inherit autotools-brokensep gettext pythonnative + +S = "${WORKDIR}/git" + +# breaks compilation +ASNEEDED = "" + +ACCEL ?= "" +ACCEL_x86 = "vaapi vdpau" +ACCEL_x86-64 = "vaapi vdpau" + +PACKAGECONFIG ??= "${ACCEL}" +PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)}" +PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' opengl', ' openglesv2', d)}" + +PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles," +PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,virtual/egl" +PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" +PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" +PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5" +PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxinerama libxmu libxrandr libxtst" +PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio" +PACKAGECONFIG[lcms] = "--enable-lcms2,--disable-lcms2,lcms" + +EXTRA_OECONF = " \ + --disable-debug \ + --disable-libcap \ + --disable-ccache \ + --disable-mid \ + --enable-libusb \ + --enable-alsa \ + --enable-airplay \ + --disable-optical-drive \ + --with-ffmpeg=shared \ + --enable-texturepacker=no \ + --disable-lirc \ + --disable-dbus \ +" + +FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math" +FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math" +BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" + +EXTRA_OECONF_append = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" + +# for python modules +export HOST_SYS +export BUILD_SYS +export STAGING_LIBDIR +export STAGING_INCDIR +export PYTHON_DIR + +def enable_glew(bb, d): + if bb.utils.contains('PACKAGECONFIG', 'x11', True, False, d) and bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d): + return "glew" + return "" + +do_configure() { + ( for i in $(find ${S} -name "configure.*" ) ; do + cd $(dirname $i) && gnu-configize --force || true + done ) + make -C tools/depends/target/crossguid PREFIX=${STAGING_DIR_HOST}${prefix} + + BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder" + BOOTSTRAP_STANDALONE=1 make -f codegenerator.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder" + oe_runconf +} + +do_compile_prepend() { + for i in $(find . -name "Makefile") ; do + sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i + done + + for i in $(find . -name "*.mak*" -o -name "Makefile") ; do + sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i + done +} + +INSANE_SKIP_${PN} = "rpaths" + +FILES_${PN} += "${datadir}/xsessions ${datadir}/icons ${libdir}/xbmc ${datadir}/xbmc" +FILES_${PN}-dbg += "${libdir}/kodi/.debug ${libdir}/kodi/*/.debug ${libdir}/kodi/*/*/.debug ${libdir}/kodi/*/*/*/.debug" + +# kodi uses some kind of dlopen() method for libcec so we need to add it manually +# OpenGL builds need glxinfo, that's in mesa-demos +RRECOMMENDS_${PN}_append = " libcec \ + python \ + python-ctypes \ + python-lang \ + python-re \ + python-netclient \ + python-html \ + python-difflib \ + python-json \ + python-zlib \ + python-shell \ + python-sqlite3 \ + python-compression \ + libcurl \ + ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr xdpyinfo', '', d)} \ +" +RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 \ + glibc-gconv-ibm850 \ + glibc-gconv-unicode \ + glibc-gconv-utf-32 \ + glibc-charmap-utf-8 \ + glibc-localedata-en-us \ + " + +RPROVIDES_${PN} += "xbmc" + +TOOLCHAIN = "gcc" \ No newline at end of file diff --git a/meta-openpli/recipes-mediacenter/kodi/kodi_17.bbappend b/meta-openpli/recipes-mediacenter/kodi/kodi_17.bbappend new file mode 100644 index 00000000..a5e0711f --- /dev/null +++ b/meta-openpli/recipes-mediacenter/kodi/kodi_17.bbappend @@ -0,0 +1,41 @@ +PROVIDES += "virtual/kodi" +RPROVIDES_${PN} += "virtual/kodi" +PROVIDES += "kodi" +RPROVIDES_${PN} += "kodi" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append += "\ + file://v3d-platform.patch \ + file://brcmstb-settings.patch \ + file://e2player.patch \ + ${@bb.utils.contains('MACHINE_FEATURES', 'v3d-nxpl', 'file://EGLNativeTypeV3D-nxpl.patch', '', d)} \ + " + +SRC_URI_append_osmega += "file://EGLNativeTypeV3D-platform.patch" + +DEPENDS += " \ + libbluray \ + nfs-utils \ + libupnp \ + " + +EXTRA_OECONF_hd51 += " \ + --with-platform=v3d-cortexa15 \ + --with-ffmpeg=v3d \ + " + +EXTRA_OECONF_vs1500 += " \ + --with-platform=v3d-cortexa15 \ + --with-ffmpeg=v3d \ + " + +EXTRA_OECONF_hd2400 += " \ + --with-platform=v3d-mipsel \ + --with-ffmpeg=v3d \ + " + +EXTRA_OECONF_osmega += " \ + --with-platform=v3d-xcore-mipsel \ + --with-ffmpeg=v3d \ + " \ No newline at end of file diff --git a/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugin-extensions-kodi/enigma2-plugin-extensions-kodi_0.1.bb b/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugin-extensions-kodi/enigma2-plugin-extensions-kodi_0.1.bb new file mode 100644 index 00000000..327cd092 --- /dev/null +++ b/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugin-extensions-kodi/enigma2-plugin-extensions-kodi_0.1.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "Enigma2 plugin to launch and play media from Kodi" +AUTHOR = "Maroš Ondrášek " +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" +PR = "r0" + +RRECOMMENDS_${PN} = "enigma2-plugin-extensions-subssupport" + +PROVIDES += "enigma2-plugin-extensions-kodi" +RPROVIDES_${PN} += "enigma2-plugin-extensions-kodi" + +SRCREV = "ae55836030e94c38557f8e1b3efd5c72f131922a" +SRC_URI = "git://github.com/mx3L/kodiext;protocol=git;branch=master \ + file://0001-make-transparant.patch \ + " + +S = "${WORKDIR}/git" + +FILES_${PN} = "${libdir}/enigma2/python/Plugins/Extensions/Kodi \ + ${bindir}/kodiext" + +inherit autotools diff --git a/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugin-extensions-kodi/files/0001-make-transparant.patch b/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugin-extensions-kodi/files/0001-make-transparant.patch new file mode 100644 index 00000000..ed592103 --- /dev/null +++ b/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugin-extensions-kodi/files/0001-make-transparant.patch @@ -0,0 +1,25 @@ +From cdda42bcbfaaa78b0ae61f1380a155be0bbbb67e Mon Sep 17 00:00:00 2001 +From: tux +Date: Wed, 15 Feb 2017 22:41:40 +0100 +Subject: [PATCH] make transparant + +--- + src/plugin/plugin.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugin/plugin.py b/src/plugin/plugin.py +index c566a71..8d9157a 100644 +--- a/src/plugin/plugin.py ++++ b/src/plugin/plugin.py +@@ -399,7 +399,7 @@ class E2KodiExtServer(UDSServer): + self.subtitles = [] + + class KodiLauncher(Screen): +- skin = """""" ++ skin = """""" + + def __init__(self, session): + Screen.__init__(self, session) +-- +2.7.4 + diff --git a/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugin-extensions-subssupport/enigma2-plugin-extensions-subssupport_1.5.4.bb b/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugin-extensions-subssupport/enigma2-plugin-extensions-subssupport_1.5.4.bb new file mode 100644 index 00000000..32f9bcce --- /dev/null +++ b/meta-openpli/recipes-openpli/enigma2-plugins/enigma2-plugin-extensions-subssupport/enigma2-plugin-extensions-subssupport_1.5.4.bb @@ -0,0 +1,17 @@ +SUMMARY = "Collection of enigma2 subtitles plugins" +HOMEPAGE = "https://github.com/mx3L/subssupport" +AUTHOR = "Maroš Ondrášek " +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" +PR = "r0" + +RDEPENDS_${PN} = "python-xmlrpc python-compression python-codecs python-zlib python-difflib unrar" + +SRCREV = "9fd957962509f4ad4a2328cc3f9969230ef20a2a" +SRC_URI = "git://github.com/mx3L/subssupport;protocol=git;branch=master" + +S = "${WORKDIR}/git" + +FILES_${PN} = "${libdir}/enigma2/python/Plugins/Extensions/SubsSupport" + +inherit autotools-brokensep