From 2c02f11018caa3a146b93d5bf91d5ca49df752cf Mon Sep 17 00:00:00 2001 From: afl1 Date: Sat, 24 Feb 2018 17:09:33 +0100 Subject: [PATCH] linux-drivers: build internal dvb driver AVL6862 for Amlogic/S9xx devices --- .../amlogic/avl6862-aml/package.mk | 32 +++++++++++++++++++ .../avl6862-aml/system.d/amlogic-dvb.service | 11 +++++++ projects/Amlogic/devices/S905/options | 3 +- projects/Amlogic/devices/S912/options | 3 +- 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 packages/linux-drivers/amlogic/avl6862-aml/package.mk create mode 100644 packages/linux-drivers/amlogic/avl6862-aml/system.d/amlogic-dvb.service diff --git a/packages/linux-drivers/amlogic/avl6862-aml/package.mk b/packages/linux-drivers/amlogic/avl6862-aml/package.mk new file mode 100644 index 0000000000..5612a8a755 --- /dev/null +++ b/packages/linux-drivers/amlogic/avl6862-aml/package.mk @@ -0,0 +1,32 @@ +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2017-present Team LibreELEC +# +# LibreELEC 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 of the License, or +# (at your option) any later version. +# +# LibreELEC 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 LibreELEC. If not, see . +################################################################################ + +PKG_NAME="avl6862-aml" +PKG_VERSION="1.0" +PKG_ARCH="arm aarch64" +PKG_LICENSE="GPL" +PKG_SITE="https://libreelec.tv" +PKG_URL="" +PKG_DEPENDS_TARGET="toolchain" +PKG_SECTION="virtual" +PKG_SHORTDESC="avl6862-aml: Internal DVB tuner driver for Amlogic devices developed by afl1" +PKG_LONGDESC="avl6862-aml: Internal DVB tuner driver for Amlogic devices developed by afl1" + +post_install() { + enable_service amlogic-dvb.service +} diff --git a/packages/linux-drivers/amlogic/avl6862-aml/system.d/amlogic-dvb.service b/packages/linux-drivers/amlogic/avl6862-aml/system.d/amlogic-dvb.service new file mode 100644 index 0000000000..3feef16975 --- /dev/null +++ b/packages/linux-drivers/amlogic/avl6862-aml/system.d/amlogic-dvb.service @@ -0,0 +1,11 @@ +[Unit] +Description=Amlogic DVB module loader +ConditionPathExists=/proc/device-tree/dvbfe/dtv_demod0 +After=kernel-overlays.service + +[Service] +Type=simple +ExecStart=/bin/sh -c '[ `cat /proc/device-tree/dvbfe/dtv_demod0` = "Avl6211" ] && /sbin/modprobe aml_fe' + +[Install] +WantedBy=basic.target diff --git a/projects/Amlogic/devices/S905/options b/projects/Amlogic/devices/S905/options index 7f7520571b..0c0c43cd0e 100644 --- a/projects/Amlogic/devices/S905/options +++ b/projects/Amlogic/devices/S905/options @@ -7,7 +7,8 @@ # e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS ap6xxx-aml mt7601u-aml mt7603u-aml \ qca9377-aml RTL8189ES-aml RTL8189FS-aml RTL8723BS-aml \ - RTL8723DS-aml RTL8822BU-aml ssv6xxx-aml fd628-aml wetekdvb" + RTL8723DS-aml RTL8822BU-aml ssv6xxx-aml fd628-aml wetekdvb \ + avl6862-aml" # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) # Space separated list is supported, diff --git a/projects/Amlogic/devices/S912/options b/projects/Amlogic/devices/S912/options index 6af65e3030..814a0ff800 100644 --- a/projects/Amlogic/devices/S912/options +++ b/projects/Amlogic/devices/S912/options @@ -16,7 +16,8 @@ # e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS ap6xxx-aml mt7601u-aml mt7603u-aml \ qca9377-aml RTL8189ES-aml RTL8189FS-aml \ - RTL8723BS-aml RTL8723DS-aml RTL8822BU-aml ssv6xxx-aml fd628-aml" + RTL8723BS-aml RTL8723DS-aml RTL8822BU-aml ssv6xxx-aml fd628-aml \ + avl6862-aml" # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) # Space separated list is supported,