Skip to content

Commit

Permalink
Merge pull request #2549 from kszaq/le90_cc_3.10
Browse files Browse the repository at this point in the history
crazycat: fix building for Amlogic devices using 3.10 kernel and enable for WeTek_Core
  • Loading branch information
codesnake committed Mar 8, 2018
2 parents 544f25d + 5e5a53f commit fc2283a
Show file tree
Hide file tree
Showing 12 changed files with 86 additions and 13 deletions.
6 changes: 4 additions & 2 deletions packages/linux-driver-addons/dvb/crazycat/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ PKG_ADDON_NAME="DVB drivers for TBS (CrazyCat)"
PKG_ADDON_TYPE="xbmc.service"
PKG_ADDON_VERSION="${ADDON_VERSION}.${PKG_REV}"

if [ $LINUX = "amlogic-3.14" -o $LINUX = "amlogic-3.10" ]; then
PKG_PATCH_DIRS="amlogic"
if [ $LINUX = "amlogic-3.10" ]; then
PKG_PATCH_DIRS="amlogic-3.10"
elif [ $LINUX = "amlogic-3.14" ]; then
PKG_PATCH_DIRS="amlogic-3.14"
fi

pre_make_target() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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:
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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),)
31 changes: 20 additions & 11 deletions projects/WeTek_Core/linux/linux.arm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1311,14 +1311,14 @@ CONFIG_POST_PROCESS_MANAGER_3D_PROCESS=y
#
# V4L2 Video Support
#
CONFIG_V4L_AMLOGIC_VIDEO=y
CONFIG_V4L_AMLOGIC_VIDEO2=y
CONFIG_V4L_AMLOGIC_VIDEO=m
# CONFIG_V4L_AMLOGIC_VIDEO2 is not set

#
# Amlogic ion video support
#
CONFIG_VIDEOBUF2_ION=y
CONFIG_AMLOGIC_IONVIDEO=y
# CONFIG_VIDEOBUF2_ION is not set
# CONFIG_AMLOGIC_IONVIDEO is not set

#
# Deinterlace driver
Expand Down Expand Up @@ -1981,7 +1981,16 @@ CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_MUX is not set
CONFIG_I2C_MUX=y

#
# Multiplexer I2C Chip support
#
# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set
# CONFIG_I2C_MUX_GPIO is not set
# CONFIG_I2C_MUX_PCA9541 is not set
# CONFIG_I2C_MUX_PCA954x is not set
# CONFIG_I2C_MUX_PINCTRL is not set
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=y

Expand Down Expand Up @@ -2386,17 +2395,17 @@ CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
CONFIG_MEDIA_RADIO_SUPPORT=y
CONFIG_MEDIA_RC_SUPPORT=y
# CONFIG_MEDIA_CONTROLLER is not set
CONFIG_VIDEO_DEV=y
CONFIG_VIDEO_V4L2=y
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2=m
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
CONFIG_VIDEO_TUNER=m
CONFIG_VIDEOBUF_GEN=y
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_VMALLOC=m
CONFIG_VIDEOBUF_RESOURCE=y
CONFIG_VIDEOBUF_RESOURCE=m
CONFIG_VIDEOBUF_DVB=m
CONFIG_VIDEOBUF2_CORE=y
CONFIG_VIDEOBUF2_MEMOPS=y
CONFIG_VIDEOBUF2_CORE=m
CONFIG_VIDEOBUF2_MEMOPS=m
CONFIG_VIDEOBUF2_VMALLOC=m
# CONFIG_VIDEO_V4L2_INT_DEVICE is not set
CONFIG_DVB_CORE=m
Expand Down
8 changes: 8 additions & 0 deletions projects/WeTek_Core/options
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,11 @@

# kernel image name
KERNEL_NAME="kernel.img"

# build and install driver addons (yes / no)
DRIVER_ADDONS_SUPPORT="yes"

# driver addons to install:
# for a list of additinoal drivers see packages/linux-driver-addons
# Space separated list is supported,
DRIVER_ADDONS="crazycat"

0 comments on commit fc2283a

Please sign in to comment.