crazycat_aml: initial package

This commit is contained in:
CvH 2018-10-23 19:01:25 +02:00
parent 99879ecdb8
commit 6e8e069678
9 changed files with 167 additions and 0 deletions

View File

@ -0,0 +1,2 @@
100
- Initial add-on

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -0,0 +1,51 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="crazycat_aml"
PKG_VERSION="835dc72da3ee63df7f4057bd0507887454c005d1"
PKG_SHA256="3d68d368a9eda15688c6686caa854a045a753740ec93553d80a4bcfc14c2950a"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://bitbucket.org/CrazyCat/media_build"
PKG_URL="https://bitbucket.org/CrazyCat/media_build/get/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain linux media_tree_cc_aml"
PKG_NEED_UNPACK="$LINUX_DEPENDS media_tree_cc_aml"
PKG_SECTION="driver.dvb"
PKG_LONGDESC="DVB driver for TBS cards with CrazyCats additions"
PKG_IS_ADDON="embedded"
PKG_IS_KERNEL_PKG="yes"
PKG_ADDON_IS_STANDALONE="yes"
PKG_ADDON_NAME="DVB drivers for TBS"
PKG_ADDON_TYPE="xbmc.service"
PKG_ADDON_VERSION="${ADDON_VERSION}.${PKG_REV}"
pre_make_target() {
export KERNEL_VER=$(get_module_dir)
export LDFLAGS=""
}
make_target() {
cp -RP $(get_build_dir media_tree_cc_aml)/* $PKG_BUILD/linux
# compile modules
echo "obj-y += video_dev/" >> "$PKG_BUILD/linux/drivers/media/platform/meson/Makefile"
echo "obj-y += wetek/" >> "$PKG_BUILD/linux/drivers/media/platform/meson/Makefile"
# make config all
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path) allyesconfig
# deactivate several build options
sed '/CONFIG_VIDEO_S5C73M3=m/d' -i $PKG_BUILD/v4l/.config
# enable AML drivers
echo "CONFIG_IR_MESON=m" >> $PKG_BUILD/v4l/.config
echo "CONFIG_V4L_AMLOGIC_VIDEO=m" >> $PKG_BUILD/v4l/.config
echo "CONFIG_VIDEOBUF_RESOURCE=m" >> $PKG_BUILD/v4l/.config
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path)
}
makeinstall_target() {
install_driver_addon_files "$PKG_BUILD/v4l/"
}

View File

@ -0,0 +1,13 @@
[Patch] without this patch you need to install libproc-processtable-perl at host system
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -51,7 +51,7 @@
@echo Kernel build directory is $(OUTDIR)
$(MAKE) -C ../linux apply_patches
$(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules
- ./scripts/rmmod.pl check
+# ./scripts/rmmod.pl check
# $(MAKE) checkpatch
mismatch:: prepare firmware

View File

@ -0,0 +1,13 @@
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -626,6 +626,10 @@ ($$)
close OUT;
# These options should default to off
+disable_config('MEDIA_ANALOG_TV_SUPPORT');
+disable_config('MEDIA_CAMERA_SUPPORT');
+disable_config('MEDIA_CEC_SUPPORT');
+disable_config('SOC_CAMERA');
disable_config('DVB_AV7110_FIRMWARE');
disable_config('DVB_CINERGYT2_TUNING');
disable_config('VIDEO_HELPER_CHIPS_AUTO');

View File

@ -0,0 +1,8 @@
--- /dev/null
+++ b/v4l/config-mycompat.h
@@ -0,0 +1,4 @@
+#undef NEED_SMP_MB_AFTER_ATOMIC
+#undef NEED_PFN_TO_PHYS
+#undef NEED_WRITEL_RELAXED
+#undef NEED_PM_RUNTIME_GET
--

View File

@ -0,0 +1,2 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)

View File

@ -0,0 +1,26 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="media_tree_cc_aml"
PKG_VERSION="2018-09-23"
PKG_SHA256="3b0cf3699317c04d9184b7e25056065fd374b20b851ee86a63ea2c70e219ee9e"
PKG_LICENSE="GPL"
PKG_SITE="https://bitbucket.org/CrazyCat/media_build/downloads/"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain"
PKG_NEED_UNPACK="$LINUX_DEPENDS"
PKG_LONGDESC="Source of Linux Kernel media_tree subsystem to build with media_build."
PKG_TOOLCHAIN="manual"
unpack() {
mkdir -p $PKG_BUILD/
tar -xf $SOURCES/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.xz -C $PKG_BUILD/
# hack/workaround for borked upstream kernel/media_build
# without removing atomisp there a lot additional includes that
# slowdown build process after modpost from 3min to 6min
# even if atomisp is disabled via kernel.conf
rm -rf $PKG_BUILD/drivers/staging/media/atomisp
sed -i 's|^.*drivers/staging/media/atomisp.*$||' \
$PKG_BUILD/drivers/staging/media/Kconfig
}

View File

@ -0,0 +1,52 @@
From 3f1f8303b6e0be751d7a7c55031c8ab840ed5c1a Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Fri, 24 Aug 2018 23:31:51 +0200
Subject: [PATCH] media: rc: ir-rc6-decoder: enable toggle bit for Kathrein
RCU-676 remote
The Kathrein RCU-676 remote uses the 32-bit rc6 protocol and toggles
bit 15 (0x8000) on repeated button presses, like MCE remotes.
Add it's customer code 0x80460000 to the 32-bit rc6 toggle
handling code to get proper scancodes and toggle reports.
Signed-off-by: Matthias Reichl <hias@horus.com>
---
drivers/media/rc/ir-rc6-decoder.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/media/rc/ir-rc6-decoder.c b/drivers/media/rc/ir-rc6-decoder.c
index 68487ce9f79b..d96aed1343e4 100644
--- a/drivers/media/rc/ir-rc6-decoder.c
+++ b/drivers/media/rc/ir-rc6-decoder.c
@@ -40,6 +40,7 @@
#define RC6_6A_MCE_TOGGLE_MASK 0x8000 /* for the body bits */
#define RC6_6A_LCC_MASK 0xffff0000 /* RC6-6A-32 long customer code mask */
#define RC6_6A_MCE_CC 0x800f0000 /* MCE customer code */
+#define RC6_6A_KATHREIN_CC 0x80460000 /* Kathrein RCU-676 customer code */
#ifndef CHAR_BIT
#define CHAR_BIT 8 /* Normally in <limits.h> */
#endif
@@ -242,13 +243,17 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)
toggle = 0;
break;
case 32:
- if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
+ switch (scancode & RC6_6A_LCC_MASK) {
+ case RC6_6A_MCE_CC:
+ case RC6_6A_KATHREIN_CC:
protocol = RC_PROTO_RC6_MCE;
toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
- } else {
+ break;
+ default:
protocol = RC_PROTO_RC6_6A_32;
toggle = 0;
+ break;
}
break;
default:
--
2.11.0