crazycat: fix building for Amlogic devices using 3.10 kernel

Recently introduced patches to include drivers for internal DVB modules can't be used with 3.10 devices. Fix this by providing separate patch directory.
This commit is contained in:
kszaq 2018-03-03 22:45:37 +01:00
parent 000cee7d2a
commit 6b91ad8001
10 changed files with 58 additions and 2 deletions

View File

@ -35,8 +35,10 @@ PKG_ADDON_NAME="DVB drivers for TBS (CrazyCat)"
PKG_ADDON_TYPE="xbmc.service" PKG_ADDON_TYPE="xbmc.service"
PKG_ADDON_VERSION="${ADDON_VERSION}.${PKG_REV}" PKG_ADDON_VERSION="${ADDON_VERSION}.${PKG_REV}"
if [ $LINUX = "amlogic-3.14" -o $LINUX = "amlogic-3.10" ]; then if [ $LINUX = "amlogic-3.10" ]; then
PKG_PATCH_DIRS="amlogic" PKG_PATCH_DIRS="amlogic-3.10"
elif [ $LINUX = "amlogic-3.14" ]; then
PKG_PATCH_DIRS="amlogic-3.14"
fi fi
pre_make_target() { pre_make_target() {

View File

@ -0,0 +1,13 @@
diff -Naur a/backports/backports.txt b/backports/backports.txt
--- a/backports/backports.txt 2017-12-30 22:14:58.000000000 +0200
+++ b/backports/backports.txt 2018-02-23 13:50:01.327967293 +0200
@@ -21,6 +21,9 @@
# All supported versions need those patches
[9.255.255]
+add linux-301-AML-videobuf-resource.patch
+add linux-302-AML-amlogic-video-dev.patch
+add linux-303-AML-meson-ir.patch
add api_version.patch
add pr_fmt.patch
add debug.patch

View File

@ -0,0 +1,18 @@
diff -Naur a/linux/Makefile b/linux/Makefile
--- a/linux/Makefile 2017-12-30 22:01:38.000000000 +0200
+++ b/linux/Makefile 2018-02-23 13:25:54.025763853 +0200
@@ -112,6 +112,14 @@
untar: linux-media.tar.bz2
tar xfj linux-media.tar.bz2
+ mkdir -p drivers/media/amlogic/
+ # Copy amlvideodri module
+ cp -a "$(SRCDIR)/drivers/amlogic/video_dev" "drivers/media/amlogic"
+ sed -i 's,common/,,g; s,"trace/,",g' `find drivers/media/amlogic/video_dev/ -type f`
+ # Copy videobuf-res module
+ cp -a "$(SRCDIR)/drivers/media/v4l2-core/videobuf-res.c" "drivers/media/v4l2-core/"
+ cp -a "$(SRCDIR)/include/media/videobuf-res.h" "include/media/"
+
-rm -f .patches_applied .linked_dir .git_log.md5
clean:

View File

@ -0,0 +1,11 @@
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -1588,7 +1588,7 @@
#endif
#ifdef NEED_WRITEL_RELAXED
-#define writel_relaxed writel
+// #define writel_relaxed writel
#endif
#ifdef NEED_GET_USER_PAGES_UNLOCKED

View File

@ -0,0 +1,12 @@
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -92,9 +92,6 @@ ifneq ($(filter $(no-makefile-media-targets), $(MAKECMDGOALS)),)
endif
makefile-mm := 1
-ifeq ($(wildcard ../linux/mm/frame_vector.c),)
- makefile-mm := 0
-endif
# If version not yet detected, we can't create/have these files yet
ifeq ($(KERNELRELEASE),)