From 321b7e38c94c2c27ad1e6bb38717273ca94fe82b Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Tue, 20 Jun 2017 11:36:05 -0700 Subject: [PATCH] slice-driver: add package --- .../linux-drivers/slice-drivers/package.mk | 45 +++++++++++++++++++ projects/RPi/options | 4 ++ 2 files changed, 49 insertions(+) create mode 100644 packages/linux-drivers/slice-drivers/package.mk diff --git a/packages/linux-drivers/slice-drivers/package.mk b/packages/linux-drivers/slice-drivers/package.mk new file mode 100644 index 0000000000..5c9e366231 --- /dev/null +++ b/packages/linux-drivers/slice-drivers/package.mk @@ -0,0 +1,45 @@ +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2016-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="slice-drivers" +PKG_VERSION="d02f3e7" +PKG_ARCH="arm" +PKG_LICENSE="GPL" +PKG_SITE="https://github.com/LibreELEC/slice-drivers" +PKG_URL="https://github.com/LibreELEC/slice-drivers/archive/$PKG_VERSION.tar.gz" +PKG_DEPENDS_TARGET="toolchain linux" +PKG_NEED_UNPACK="$LINUX_DEPENDS" +PKG_SECTION="driver" +PKG_SHORTDESC="linux kernel modules for the Slice box" +PKG_LONGDESC="linux kernel modules for the Slice box" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +pre_make_target() { + unset LDFLAGS +} + +make_target() { + make KDIR=$(kernel_path) +} + +makeinstall_target() { + mkdir -p $INSTALL/usr/lib/modules/$(get_module_dir)/$PKG_NAME + cp *.ko $INSTALL/usr/lib/modules/$(get_module_dir)/$PKG_NAME +} diff --git a/projects/RPi/options b/projects/RPi/options index 5e1bb42956..f95c0cdc59 100644 --- a/projects/RPi/options +++ b/projects/RPi/options @@ -159,3 +159,7 @@ fi # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS media_build rpi-cirrus-config" + + if [ "$DEVICE" = "Slice" -o "$DEVICE" = "Slice3" ]; then + ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS slice-drivers" + fi