From 01c51fec6a0a8a51fbe14c3f43c7d8dd10b2d5d7 Mon Sep 17 00:00:00 2001 From: chewitt Date: Sat, 5 Aug 2017 09:29:14 +0100 Subject: [PATCH] slice: add projects for Slice and Slice3 --- projects/Slice/config/distroconfig.txt | 23 +++ projects/Slice/config/slice-overlay.dts | 172 ++++++++++++++++++ projects/Slice/config/ws2812-overlay.dts | 33 ++++ .../Slice/filesystem/usr/config/autostart.sh | 2 + .../Slice/filesystem/usr/config/shutdown.sh | 19 ++ .../lib/systemd/system/serial-console.service | 23 +++ .../usr/share/alsa/cards/snd_slice.conf | 25 +++ projects/Slice/initramfs/platform_init | 28 +++ projects/Slice/kodi/advancedsettings.xml | 12 ++ projects/Slice/linux | 1 + projects/Slice/options | 143 +++++++++++++++ .../kodi/kodi-000-revert-pr11222.patch | 102 +++++++++++ .../patches/kodi/kodi-001-backport.patch | 1 + .../patches/kodi/kodi-004-keyboard.patch | 45 +++++ .../kodi/kodi-999.99-sysinfo-battery.patch | 10 + .../patches/linux/linux-01-RPi_support.patch | 1 + .../linux/linux-04-rtc-pcf8523-c.patch | 17 ++ .../patches/linux/linux-05-cs4265-c.patch | 45 +++++ projects/Slice3/config/distroconfig.txt | 23 +++ projects/Slice3/config/slice-overlay.dts | 172 ++++++++++++++++++ projects/Slice3/config/ws2812-overlay.dts | 33 ++++ .../Slice3/filesystem/usr/config/autostart.sh | 2 + .../Slice3/filesystem/usr/config/shutdown.sh | 19 ++ .../lib/systemd/system/serial-console.service | 23 +++ .../usr/share/alsa/cards/snd_slice.conf | 25 +++ projects/Slice3/initramfs/platform_init | 28 +++ projects/Slice3/kodi/advancedsettings.xml | 12 ++ projects/Slice3/linux | 1 + projects/Slice3/options | 139 ++++++++++++++ .../kodi/kodi-000-revert-pr11222.patch | 102 +++++++++++ .../patches/kodi/kodi-001-backport.patch | 1 + .../patches/kodi/kodi-004-keyboard.patch | 45 +++++ .../kodi/kodi-999.99-sysinfo-battery.patch | 10 + .../patches/linux/linux-01-RPi_support.patch | 1 + .../linux/linux-04-rtc-pcf8523-c.patch | 17 ++ .../patches/linux/linux-05-cs4265-c.patch | 45 +++++ 36 files changed, 1400 insertions(+) create mode 100644 projects/Slice/config/distroconfig.txt create mode 100644 projects/Slice/config/slice-overlay.dts create mode 100644 projects/Slice/config/ws2812-overlay.dts create mode 100644 projects/Slice/filesystem/usr/config/autostart.sh create mode 100644 projects/Slice/filesystem/usr/config/shutdown.sh create mode 100644 projects/Slice/filesystem/usr/lib/systemd/system/serial-console.service create mode 100644 projects/Slice/filesystem/usr/share/alsa/cards/snd_slice.conf create mode 100755 projects/Slice/initramfs/platform_init create mode 100644 projects/Slice/kodi/advancedsettings.xml create mode 120000 projects/Slice/linux create mode 100644 projects/Slice/options create mode 100644 projects/Slice/patches/kodi/kodi-000-revert-pr11222.patch create mode 120000 projects/Slice/patches/kodi/kodi-001-backport.patch create mode 100644 projects/Slice/patches/kodi/kodi-004-keyboard.patch create mode 100644 projects/Slice/patches/kodi/kodi-999.99-sysinfo-battery.patch create mode 120000 projects/Slice/patches/linux/linux-01-RPi_support.patch create mode 100644 projects/Slice/patches/linux/linux-04-rtc-pcf8523-c.patch create mode 100644 projects/Slice/patches/linux/linux-05-cs4265-c.patch create mode 100644 projects/Slice3/config/distroconfig.txt create mode 100644 projects/Slice3/config/slice-overlay.dts create mode 100644 projects/Slice3/config/ws2812-overlay.dts create mode 100644 projects/Slice3/filesystem/usr/config/autostart.sh create mode 100644 projects/Slice3/filesystem/usr/config/shutdown.sh create mode 100644 projects/Slice3/filesystem/usr/lib/systemd/system/serial-console.service create mode 100644 projects/Slice3/filesystem/usr/share/alsa/cards/snd_slice.conf create mode 100755 projects/Slice3/initramfs/platform_init create mode 100644 projects/Slice3/kodi/advancedsettings.xml create mode 120000 projects/Slice3/linux create mode 100644 projects/Slice3/options create mode 100644 projects/Slice3/patches/kodi/kodi-000-revert-pr11222.patch create mode 120000 projects/Slice3/patches/kodi/kodi-001-backport.patch create mode 100644 projects/Slice3/patches/kodi/kodi-004-keyboard.patch create mode 100644 projects/Slice3/patches/kodi/kodi-999.99-sysinfo-battery.patch create mode 120000 projects/Slice3/patches/linux/linux-01-RPi_support.patch create mode 100644 projects/Slice3/patches/linux/linux-04-rtc-pcf8523-c.patch create mode 100644 projects/Slice3/patches/linux/linux-05-cs4265-c.patch diff --git a/projects/Slice/config/distroconfig.txt b/projects/Slice/config/distroconfig.txt new file mode 100644 index 0000000000..6473369b91 --- /dev/null +++ b/projects/Slice/config/distroconfig.txt @@ -0,0 +1,23 @@ +################################################################################ +# This file is part of LibreELEC - http://www.libreelec.tv +# Copyright (C) 2016 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 . +################################################################################ + +# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING! + +dtoverlay=slice +dtoverlay=ws2812 +dtoverlay=mmc diff --git a/projects/Slice/config/slice-overlay.dts b/projects/Slice/config/slice-overlay.dts new file mode 100644 index 0000000000..7f0a4d2f3b --- /dev/null +++ b/projects/Slice/config/slice-overlay.dts @@ -0,0 +1,172 @@ +// Definitions for Slice hardware +/dts-v1/; +/plugin/; + +#include "dt-bindings/clock/bcm2835.h" + +/ { + compatible = "brcm,bcm2708"; + + // + // Set up GPIOs: + // I2C1 on GPIO44,45 + // LIRC input/output on GPIO4 and 37 (NB GPIO4 NC on Slice) + // I2S on GPIO28-31 + // + fragment@0 { + target = <&gpio>; + __overlay__ { + i2c1_pins: i2c1 { + brcm,pins = <44 45>; + brcm,function = <6>; /* alt2 */ + }; + lirc_pins: lirc_pins { + brcm,pins = <4 37>; // + brcm,function = <1 0>; // out in + brcm,pull = <0 1>; // off down + }; + i2s_pins: i2s { + brcm,pins = <28 29 30 31>; + brcm,function = <6>; /* alt2 */ + }; + ws2812_pins: ws2812 { + brcm,pins = <40>; + brcm,function = <4>; /* alt0 */ + }; + }; + }; + + // + // I2C at 100KHz + // + fragment@1 { + target = <&i2c1>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + clock-frequency = <100000>; + }; + }; + + // + // Add devices to I2C1 Bus: + // PCF8523 RTC device + // CS4265 Audio CODEC + // + fragment@2 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + pcf8523@68 { + compatible = "nxp,pcf8523"; + reg = <0x68>; + nxp,xtalcap-7pf; /* set crystal load to 7pf */ + status = "okay"; + }; + cs4265@4e { + #sound-dai-cells = <0>; + compatible = "cirrus,cs4265"; + reg = <0x4e>; + cs4265-reset-gpios = <&gpio 33 0>; /* AUD_RST_N on GPIO33 */ + cirrus,no-s16le; /* remove S16LE support to workaround I2S controller issue */ + status = "okay"; + }; + }; + }; + + // + // LIRC + // + fragment@3 { + target-path = "/"; + __overlay__ { + lirc_rpi: lirc_rpi { + compatible = "rpi,lirc-rpi"; + pinctrl-names = "default"; + pinctrl-0 = <&lirc_pins>; + status = "okay"; + + // Override autodetection of IR receiver circuit + // (0 = active high, 1 = active low, -1 = no override ) + rpi,sense = <0xffffffff>; + + // Software carrier + // (0 = off, 1 = on) + rpi,softcarrier = <1>; + + // Invert output + // (0 = off, 1 = on) + rpi,invert = <0>; + + // Enable debugging messages + // (0 = off, 1 = on) + rpi,debug = <0>; + }; + }; + }; + + // + // Audio driver + // + fragment@4 { + #address-cells = <1>; + #size-cells = <1>; + target = <&sound>; + __overlay__ { + compatible = "fiveninjas,slice"; + clocks = <&cprman BCM2835_CLOCK_GP0>; + clock-names = "gp0"; + pinctrl-names = "default"; + i2s-controller = <&i2s>; + status = "okay"; + }; + }; + + // + // Enable I2S + // + fragment@5 { + target = <&i2s>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&i2s_pins>; + brcm,enable-mmap; + status = "okay"; + }; + }; + + // + // WS2812B LEDs driver + // + fragment@6 { + target = <&soc>; + __overlay__ { + #address-cells = <1>; + #size-cells = <1>; + ws2812: ws2812 { + compatible = "rpi,ws2812"; + pinctrl-names = "default"; + pinctrl-0 = <&ws2812_pins>; + reg = <0x7e20c000 0x100>; /* PWM */ + dmas = <&dma 5>; + dma-names = "pwm_dma"; + led-en-gpios = <&gpio 43 0>; + rpi,invert = <1>; + rpi,num_leds = <25>; + status = "okay"; + }; + }; + }; + + // + // Disable standard audio + // + fragment@7 { + target = <&audio>; + __overlay__ { + status = "disabled"; + }; + }; +}; diff --git a/projects/Slice/config/ws2812-overlay.dts b/projects/Slice/config/ws2812-overlay.dts new file mode 100644 index 0000000000..38ac74dffa --- /dev/null +++ b/projects/Slice/config/ws2812-overlay.dts @@ -0,0 +1,33 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2708"; + + fragment@0 { + target = <&soc>; + __overlay__ { + #address-cells = <1>; + #size-cells = <1>; + + ws2812: ws2812 { + compatible = "rpi,ws2812"; + reg = <0x7e20c000 0x100>; /* PWM */ + dmas = <&dma 5>; + dma-names = "pwm_dma"; + led-en-gpios = <&gpio 43 0>; + + rpi,invert = <1>; + rpi,num_leds = <25>; + + status = "okay"; + + }; + }; + }; + + __overrides__ { + invert = <&ws2812>,"rpi,invert:0"; + num_leds = <&ws2812>,"rpi,num_leds:0"; + }; +}; diff --git a/projects/Slice/filesystem/usr/config/autostart.sh b/projects/Slice/filesystem/usr/config/autostart.sh new file mode 100644 index 0000000000..0b6166972b --- /dev/null +++ b/projects/Slice/filesystem/usr/config/autostart.sh @@ -0,0 +1,2 @@ +#!/bin/bash +hdparm -S60 /dev/sda diff --git a/projects/Slice/filesystem/usr/config/shutdown.sh b/projects/Slice/filesystem/usr/config/shutdown.sh new file mode 100644 index 0000000000..2c597f1186 --- /dev/null +++ b/projects/Slice/filesystem/usr/config/shutdown.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +LEDDIR="/usr/share/kodi/addons/service.slice/resources/media/ledpatterns" + +case "$1" in + halt) + hdparm -y /dev/sda + led_png $LEDDIR/shutdown.png + ;; + poweroff) + hdparm -y /dev/sda + led_png $LEDDIR/shutdown.png + ;; + reboot) + led_png $LEDDIR/shutdown.png + ;; + *) + ;; +esac diff --git a/projects/Slice/filesystem/usr/lib/systemd/system/serial-console.service b/projects/Slice/filesystem/usr/lib/systemd/system/serial-console.service new file mode 100644 index 0000000000..196e8c4a97 --- /dev/null +++ b/projects/Slice/filesystem/usr/lib/systemd/system/serial-console.service @@ -0,0 +1,23 @@ +[Unit] +Description=Debug Shell on /dev/console +DefaultDependencies=no +ConditionKernelCommandLine=console + +[Service] +WorkingDirectory=/storage +Environment="ENV=/etc/profile" +ExecStartPre=/bin/sh -c 'echo -en "\033[?25h"' +ExecStart=/bin/sh +Restart=always +RestartSec=0 +StandardInput=tty +TTYPath=/dev/console +TTYReset=yes +TTYVHangup=yes +KillMode=process +IgnoreSIGPIPE=no +# bash ignores SIGTERM +KillSignal=SIGHUP + +[Install] +WantedBy=sysinit.target diff --git a/projects/Slice/filesystem/usr/share/alsa/cards/snd_slice.conf b/projects/Slice/filesystem/usr/share/alsa/cards/snd_slice.conf new file mode 100644 index 0000000000..298f43d8e7 --- /dev/null +++ b/projects/Slice/filesystem/usr/share/alsa/cards/snd_slice.conf @@ -0,0 +1,25 @@ + + +snd_slice.pcm.iec958.0 { + @args [ CARD AES0 AES1 AES2 AES3 ] + @args.CARD { + type string + } + @args.AES0 { + type integer + } + @args.AES1 { + type integer + } + @args.AES2 { + type integer + } + @args.AES3 { + type integer + } + type hooks + slave.pcm { + type hw + card $CARD + } +} diff --git a/projects/Slice/initramfs/platform_init b/projects/Slice/initramfs/platform_init new file mode 100755 index 0000000000..e3e2e7d50a --- /dev/null +++ b/projects/Slice/initramfs/platform_init @@ -0,0 +1,28 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC 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. +# +# OpenELEC 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 OpenELEC. If not, see . +################################################################################ + +# Enable io_is_busy for improved sdhost performance - essentially, equivalent of force_turbo=1 but for mmc +echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy + +# Configure frequency scaling properties - should improve performance a little (turbo, in most cases) +echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor +echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold +echo 100000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate +echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor diff --git a/projects/Slice/kodi/advancedsettings.xml b/projects/Slice/kodi/advancedsettings.xml new file mode 100644 index 0000000000..00ed0dda87 --- /dev/null +++ b/projects/Slice/kodi/advancedsettings.xml @@ -0,0 +1,12 @@ + + + false + 1 + + 720 + 540 + + + 30 + + diff --git a/projects/Slice/linux b/projects/Slice/linux new file mode 120000 index 0000000000..588bc44b88 --- /dev/null +++ b/projects/Slice/linux @@ -0,0 +1 @@ +../RPi/linux \ No newline at end of file diff --git a/projects/Slice/options b/projects/Slice/options new file mode 100644 index 0000000000..645e538609 --- /dev/null +++ b/projects/Slice/options @@ -0,0 +1,143 @@ +################################################################################ +# setup system defaults +################################################################################ + + # The TARGET_CPU variable controls which processor should be targeted for + # generated code. + case $TARGET_ARCH in + arm) + # TARGET_CPU: + # arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d + # arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c + # arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t + # arm720t arm740t strongarm strongarm110 strongarm1100 + # strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t + # arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi + # arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e + # arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s + # arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4 + # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312. + TARGET_CPU="arm1176jzf-s" + + # TARGET_FLOAT: + # Specifies which floating-point ABI to use. Permissible values are: + # soft softfp hard + TARGET_FLOAT="hard" + + # TARGET_FPU: + # This specifies what floating point hardware (or hardware emulation) is + # available on the target. Permissible names are: + # fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16 + # vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16 + # neon-vfpv4. + TARGET_FPU="vfp" + ;; + esac + + # Bootloader to use (syslinux / u-boot / bcm2835-bootloader) + BOOTLOADER="bcm2835-bootloader" + + # u-boot version to use (default) + UBOOT_VERSION="default" + + # Configuration for u-boot + UBOOT_CONFIG="" + + # Target Configfile for u-boot + UBOOT_CONFIGFILE="" + + # Kernel target + KERNEL_TARGET="zImage" + + # Kernel extra targets to build + KERNEL_UBOOT_EXTRA_TARGET="" + + # Additional kernel make parameters (for example to specify the u-boot loadaddress) + KERNEL_MAKE_EXTRACMD="dtbs overlays/slice.dtbo overlays/ws2812.dtbo" + + # Kernel to use. values can be: + # default: default mainline kernel + LINUX="default-rpi" + + # NOOBS supported hex versions (legacy) + NOOBS_HEX="2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,0092,0093" + + # NOOBS supported model versions + NOOBS_SUPPORTED_MODELS='"Pi Model","Pi Compute Module","Pi Zero"' + +################################################################################ +# setup build defaults +################################################################################ + + # Project CFLAGS + PROJECT_CFLAGS="" + + # SquashFS compression method (gzip / lzo / xz) + SQUASHFS_COMPRESSION="lzo" + + +################################################################################ +# setup project defaults +################################################################################ + + # build and install ALSA Audio support (yes / no) + ALSA_SUPPORT="yes" + + # OpenGL(X) implementation to use (no / mesa) + OPENGL="no" + + # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q) + OPENGLES="bcm2835-driver" + + # include uvesafb support (yes / no) + UVESAFB_SUPPORT="no" + + # Displayserver to use (x11 / no) + DISPLAYSERVER="no" + + # Windowmanager to use (ratpoison / fluxbox / none) + WINDOWMANAGER="none" + + # Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia) + # Space separated list is supported, + # e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia" + GRAPHIC_DRIVERS="" + + # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap) + KODIPLAYER_DRIVER="bcm2835-driver" + + # Modules to install in initramfs for early boot + INITRAMFS_MODULES="" + + # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) + # Space separated list is supported, + # e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware" + FIRMWARE="misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-rpi slice-firmware" + + # build and install ATV IR remote support (yes / no) + ATVCLIENT_SUPPORT="no" + + # build with swap support (yes / no) + SWAP_SUPPORT="yes" + + # swap support enabled per default (yes / no) + SWAP_ENABLED_DEFAULT="no" + + # swapfile size if SWAP_SUPPORT=yes in MB + SWAPFILESIZE="128" + + # build with installer (yes / no) + INSTALLER_SUPPORT="no" + + # build debug with valgrind (yes / no) + # Not available for armv6. Increases image size significantly + VALGRIND="no" + + # kernel image name + KERNEL_NAME="kernel.img" + + # additional drivers to install: + # for a list of additinoal drivers see packages/linux-drivers + # Space separated list is supported, + # e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" + ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS media_build rpi-cirrus-config slice-drivers" diff --git a/projects/Slice/patches/kodi/kodi-000-revert-pr11222.patch b/projects/Slice/patches/kodi/kodi-000-revert-pr11222.patch new file mode 100644 index 0000000000..491bc0b868 --- /dev/null +++ b/projects/Slice/patches/kodi/kodi-000-revert-pr11222.patch @@ -0,0 +1,102 @@ +From 073c2c6a118a03b70a29fd302e48f1f75bc7e5bc Mon Sep 17 00:00:00 2001 +From: MilhouseVH +Date: Wed, 24 May 2017 19:17:24 +0100 +Subject: [PATCH] Revert "PR11222" + +This reverts commit 6cc9ab253753aeb62b01d3e654bbfa77a7f22a42. +--- + .../resource.language.en_gb/resources/strings.po | 15 -------------- + system/peripherals.xml | 4 +--- + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 23 +++++++--------------- + 3 files changed, 8 insertions(+), 34 deletions(-) + +diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po +index 6443f3d..e0060d1 100644 +--- a/addons/resource.language.en_gb/resources/strings.po ++++ b/addons/resource.language.en_gb/resources/strings.po +@@ -19745,18 +19745,3 @@ msgstr "" + msgctxt "#39010" + msgid "Select sort method" + msgstr "" +- +-#: system/peripherals.xml +-msgctxt "#38050" +-msgid "Remote button press delay before repeating (ms)" +-msgstr "" +- +-#: system/peripherals.xml +-msgctxt "#38051" +-msgid "Remote button press repeat rate (ms)" +-msgstr "" +- +-#: system/peripherals.xml +-msgctxt "#38052" +-msgid "Remote button press release time (ms)" +-msgstr "" +diff --git a/system/peripherals.xml b/system/peripherals.xml +index 02b1a9e..d5704b2 100644 +--- a/system/peripherals.xml ++++ b/system/peripherals.xml +@@ -31,9 +31,7 @@ + + + +- +- +- ++ + + + +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +index d04a632..d032ffd 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +@@ -803,10 +803,7 @@ void CPeripheralCecAdapter::PushCecKeypress(const CecButtonPress &key) + CLog::Log(LOGDEBUG, "%s - received key %2x duration %d", __FUNCTION__, key.iButton, key.iDuration); + + CSingleLock lock(m_critSection); +- // avoid the queue getting too long +- if (m_configuration.iButtonRepeatRateMs && m_buttonQueue.size() > 5) +- return; +- if (m_configuration.iButtonRepeatRateMs == 0 && key.iDuration > 0) ++ if (key.iDuration > 0) + { + if (m_currentButton.iButton == key.iButton && m_currentButton.iDuration == 0) + { +@@ -1299,15 +1296,6 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu + m_configuration.bActivateSource = config.bActivateSource; + bChanged |= SetSetting("activate_source", m_configuration.bActivateSource == 1); + +- m_configuration.iDoubleTapTimeoutMs = config.iDoubleTapTimeoutMs; +- bChanged |= SetSetting("double_tap_timeout_ms", (int)m_configuration.iDoubleTapTimeoutMs); +- +- m_configuration.iButtonRepeatRateMs = config.iButtonRepeatRateMs; +- bChanged |= SetSetting("button_repeat_rate_ms", (int)m_configuration.iButtonRepeatRateMs); +- +- m_configuration.iButtonReleaseDelayMs = config.iButtonReleaseDelayMs; +- bChanged |= SetSetting("button_release_delay_ms", (int)m_configuration.iButtonReleaseDelayMs); +- + m_configuration.bPowerOffOnStandby = config.bPowerOffOnStandby; + + m_configuration.iFirmwareVersion = config.iFirmwareVersion; +@@ -1403,10 +1391,13 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void) + m_configuration.bPowerOffOnStandby = iStandbyAction == LOCALISED_ID_SUSPEND ? 1 : 0; + m_bShutdownOnStandby = iStandbyAction == LOCALISED_ID_POWEROFF; + +- // double tap prevention timeout in ms ++#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD) ++ // double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50 ++ m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50; ++#else ++ // backwards compatibility. will be removed once the next major release of libCEC is out + m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms"); +- m_configuration.iButtonRepeatRateMs = GetSettingInt("button_repeat_rate_ms"); +- m_configuration.iButtonReleaseDelayMs = GetSettingInt("button_release_delay_ms"); ++#endif + + if (GetSettingBool("pause_playback_on_deactivate")) + { +-- +2.7.4 + diff --git a/projects/Slice/patches/kodi/kodi-001-backport.patch b/projects/Slice/patches/kodi/kodi-001-backport.patch new file mode 120000 index 0000000000..d83be26793 --- /dev/null +++ b/projects/Slice/patches/kodi/kodi-001-backport.patch @@ -0,0 +1 @@ +../../../RPi/patches/kodi/kodi-001-backport.patch \ No newline at end of file diff --git a/projects/Slice/patches/kodi/kodi-004-keyboard.patch b/projects/Slice/patches/kodi/kodi-004-keyboard.patch new file mode 100644 index 0000000000..d5434ebf74 --- /dev/null +++ b/projects/Slice/patches/kodi/kodi-004-keyboard.patch @@ -0,0 +1,45 @@ +--- a/system/keymaps/keyboard.xml 2016-09-17 16:35:20.000000000 +0100 ++++ b/system/keymaps/keyboard.xml 2016-10-01 19:31:07.928719606 +0100 +@@ -56,7 +56,7 @@ + Menu + ContextMenu + Menu +- Pause ++ PlayPause + Stop + SkipNext + SkipPrevious +@@ -321,8 +321,8 @@ + NextSubtitle + StepBack + StepForward +- ChapterOrBigStepForward +- ChapterOrBigStepBack ++ VolumeUp ++ VolumeDown + AudioNextLanguage + NextSubtitle + AudioDelay +@@ -425,8 +425,8 @@ + StepForward + Rewind + FastForward +- SkipNext +- SkipPrevious ++ VolumeUp ++ VolumeDown + PlayerProcessInfo + LockPreset + FullScreen +@@ -632,8 +632,8 @@ + + StepBack + StepForward +- Up +- Down ++ VolumeUp ++ VolumeDown + OSD + OSD + ActivateWindow(PVROSDChannels) + diff --git a/projects/Slice/patches/kodi/kodi-999.99-sysinfo-battery.patch b/projects/Slice/patches/kodi/kodi-999.99-sysinfo-battery.patch new file mode 100644 index 0000000000..cd4d881ee9 --- /dev/null +++ b/projects/Slice/patches/kodi/kodi-999.99-sysinfo-battery.patch @@ -0,0 +1,10 @@ +--- a/xbmc/windows/GUIWindowSystemInfo.cpp 2013-02-21 22:09:04.765734381 +0400 ++++ b/xbmc/windows/GUIWindowSystemInfo.cpp 2013-02-22 16:12:57.942164800 +0400 +@@ -100,7 +100,6 @@ + #endif + SetControlLabel(i++, "%s: %s", 12390, SYSTEM_UPTIME); + SetControlLabel(i++, "%s: %s", 12394, SYSTEM_TOTALUPTIME); +- SetControlLabel(i++, "%s: %s", 12395, SYSTEM_BATTERY_LEVEL); + } + else if (m_section == CONTROL_BT_STORAGE) + { diff --git a/projects/Slice/patches/linux/linux-01-RPi_support.patch b/projects/Slice/patches/linux/linux-01-RPi_support.patch new file mode 120000 index 0000000000..1642b276b2 --- /dev/null +++ b/projects/Slice/patches/linux/linux-01-RPi_support.patch @@ -0,0 +1 @@ +../../../RPi/patches/linux/linux-01-RPi_support.patch \ No newline at end of file diff --git a/projects/Slice/patches/linux/linux-04-rtc-pcf8523-c.patch b/projects/Slice/patches/linux/linux-04-rtc-pcf8523-c.patch new file mode 100644 index 0000000000..da7593ed7e --- /dev/null +++ b/projects/Slice/patches/linux/linux-04-rtc-pcf8523-c.patch @@ -0,0 +1,17 @@ +--- a/drivers/rtc/rtc-pcf8523.c 2016-10-01 10:16:30.259771931 +0100 ++++ b/drivers/rtc/rtc-pcf8523.c 2016-10-01 10:21:29.762638800 +0100 +@@ -291,7 +291,13 @@ static int pcf8523_probe(struct i2c_clie + if (!pcf) + return -ENOMEM; + +- err = pcf8523_select_capacitance(client, true); ++ if (of_property_read_bool(client->dev.of_node, "nxp,xtalcap-7pf")) { ++ printk(KERN_ERR "PCF8523 - set 7pF crystal load"); ++ err = pcf8523_select_capacitance(client, false); ++ } else { ++ printk(KERN_ERR "PCF8523 - set 12pF crystal load"); ++ err = pcf8523_select_capacitance(client, true); ++ } + if (err < 0) + return err; + diff --git a/projects/Slice/patches/linux/linux-05-cs4265-c.patch b/projects/Slice/patches/linux/linux-05-cs4265-c.patch new file mode 100644 index 0000000000..a3487ac222 --- /dev/null +++ b/projects/Slice/patches/linux/linux-05-cs4265-c.patch @@ -0,0 +1,45 @@ +--- linux-4.4-rc7-old/sound/soc/codecs/cs4265.c 2016-01-13 20:56:05.637652775 +0000 ++++ linux-4.4-rc7/sound/soc/codecs/cs4265.c 2016-01-17 11:21:16.977652775 +0000 +@@ -157,7 +157,7 @@ + SOC_SINGLE("Validity Bit Control Switch", CS4265_SPDIF_CTL2, + 3, 1, 0), + SOC_ENUM("SPDIF Mono/Stereo", spdif_mono_stereo_enum), +- SOC_SINGLE("MMTLR Data Switch", 0, ++ SOC_SINGLE("MMTLR Data Switch", CS4265_SPDIF_CTL2, + 1, 1, 0), + SOC_ENUM("Mono Channel Select", spdif_mono_select_enum), + SND_SOC_BYTES("C Data Buffer", CS4265_C_DATA_BUFF, 24), +@@ -199,8 +199,6 @@ + SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("DIN2", NULL, 0, + SND_SOC_NOPM, 0, 0), +- SND_SOC_DAPM_AIF_IN("TXIN", NULL, 0, +- CS4265_SPDIF_CTL2, 5, 1), + + SND_SOC_DAPM_OUTPUT("LINEOUTL"), + SND_SOC_DAPM_OUTPUT("LINEOUTR"), +@@ -384,7 +382,6 @@ + static int cs4265_digital_mute(struct snd_soc_dai *dai, int mute) + { + struct snd_soc_codec *codec = dai->codec; +- + if (mute) { + snd_soc_update_bits(codec, CS4265_DAC_CTL, + CS4265_DAC_CTL_MUTE, +@@ -410,7 +407,7 @@ + struct snd_soc_codec *codec = dai->codec; + struct cs4265_private *cs4265 = snd_soc_codec_get_drvdata(codec); + int index; +- ++printk(KERN_ERR "cs4265_pcm_hw_params: format = 0x%x, width = %d\n", cs4265->format, params_width(params)); + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE && + ((cs4265->format & SND_SOC_DAIFMT_FORMAT_MASK) + == SND_SOC_DAIFMT_RIGHT_J)) +@@ -469,6 +466,7 @@ + static int cs4265_set_bias_level(struct snd_soc_codec *codec, + enum snd_soc_bias_level level) + { ++printk(KERN_ERR "set_bias_level %d\n", level); + switch (level) { + case SND_SOC_BIAS_ON: + break; diff --git a/projects/Slice3/config/distroconfig.txt b/projects/Slice3/config/distroconfig.txt new file mode 100644 index 0000000000..6473369b91 --- /dev/null +++ b/projects/Slice3/config/distroconfig.txt @@ -0,0 +1,23 @@ +################################################################################ +# This file is part of LibreELEC - http://www.libreelec.tv +# Copyright (C) 2016 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 . +################################################################################ + +# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING! + +dtoverlay=slice +dtoverlay=ws2812 +dtoverlay=mmc diff --git a/projects/Slice3/config/slice-overlay.dts b/projects/Slice3/config/slice-overlay.dts new file mode 100644 index 0000000000..7f0a4d2f3b --- /dev/null +++ b/projects/Slice3/config/slice-overlay.dts @@ -0,0 +1,172 @@ +// Definitions for Slice hardware +/dts-v1/; +/plugin/; + +#include "dt-bindings/clock/bcm2835.h" + +/ { + compatible = "brcm,bcm2708"; + + // + // Set up GPIOs: + // I2C1 on GPIO44,45 + // LIRC input/output on GPIO4 and 37 (NB GPIO4 NC on Slice) + // I2S on GPIO28-31 + // + fragment@0 { + target = <&gpio>; + __overlay__ { + i2c1_pins: i2c1 { + brcm,pins = <44 45>; + brcm,function = <6>; /* alt2 */ + }; + lirc_pins: lirc_pins { + brcm,pins = <4 37>; // + brcm,function = <1 0>; // out in + brcm,pull = <0 1>; // off down + }; + i2s_pins: i2s { + brcm,pins = <28 29 30 31>; + brcm,function = <6>; /* alt2 */ + }; + ws2812_pins: ws2812 { + brcm,pins = <40>; + brcm,function = <4>; /* alt0 */ + }; + }; + }; + + // + // I2C at 100KHz + // + fragment@1 { + target = <&i2c1>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + clock-frequency = <100000>; + }; + }; + + // + // Add devices to I2C1 Bus: + // PCF8523 RTC device + // CS4265 Audio CODEC + // + fragment@2 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + pcf8523@68 { + compatible = "nxp,pcf8523"; + reg = <0x68>; + nxp,xtalcap-7pf; /* set crystal load to 7pf */ + status = "okay"; + }; + cs4265@4e { + #sound-dai-cells = <0>; + compatible = "cirrus,cs4265"; + reg = <0x4e>; + cs4265-reset-gpios = <&gpio 33 0>; /* AUD_RST_N on GPIO33 */ + cirrus,no-s16le; /* remove S16LE support to workaround I2S controller issue */ + status = "okay"; + }; + }; + }; + + // + // LIRC + // + fragment@3 { + target-path = "/"; + __overlay__ { + lirc_rpi: lirc_rpi { + compatible = "rpi,lirc-rpi"; + pinctrl-names = "default"; + pinctrl-0 = <&lirc_pins>; + status = "okay"; + + // Override autodetection of IR receiver circuit + // (0 = active high, 1 = active low, -1 = no override ) + rpi,sense = <0xffffffff>; + + // Software carrier + // (0 = off, 1 = on) + rpi,softcarrier = <1>; + + // Invert output + // (0 = off, 1 = on) + rpi,invert = <0>; + + // Enable debugging messages + // (0 = off, 1 = on) + rpi,debug = <0>; + }; + }; + }; + + // + // Audio driver + // + fragment@4 { + #address-cells = <1>; + #size-cells = <1>; + target = <&sound>; + __overlay__ { + compatible = "fiveninjas,slice"; + clocks = <&cprman BCM2835_CLOCK_GP0>; + clock-names = "gp0"; + pinctrl-names = "default"; + i2s-controller = <&i2s>; + status = "okay"; + }; + }; + + // + // Enable I2S + // + fragment@5 { + target = <&i2s>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&i2s_pins>; + brcm,enable-mmap; + status = "okay"; + }; + }; + + // + // WS2812B LEDs driver + // + fragment@6 { + target = <&soc>; + __overlay__ { + #address-cells = <1>; + #size-cells = <1>; + ws2812: ws2812 { + compatible = "rpi,ws2812"; + pinctrl-names = "default"; + pinctrl-0 = <&ws2812_pins>; + reg = <0x7e20c000 0x100>; /* PWM */ + dmas = <&dma 5>; + dma-names = "pwm_dma"; + led-en-gpios = <&gpio 43 0>; + rpi,invert = <1>; + rpi,num_leds = <25>; + status = "okay"; + }; + }; + }; + + // + // Disable standard audio + // + fragment@7 { + target = <&audio>; + __overlay__ { + status = "disabled"; + }; + }; +}; diff --git a/projects/Slice3/config/ws2812-overlay.dts b/projects/Slice3/config/ws2812-overlay.dts new file mode 100644 index 0000000000..38ac74dffa --- /dev/null +++ b/projects/Slice3/config/ws2812-overlay.dts @@ -0,0 +1,33 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2708"; + + fragment@0 { + target = <&soc>; + __overlay__ { + #address-cells = <1>; + #size-cells = <1>; + + ws2812: ws2812 { + compatible = "rpi,ws2812"; + reg = <0x7e20c000 0x100>; /* PWM */ + dmas = <&dma 5>; + dma-names = "pwm_dma"; + led-en-gpios = <&gpio 43 0>; + + rpi,invert = <1>; + rpi,num_leds = <25>; + + status = "okay"; + + }; + }; + }; + + __overrides__ { + invert = <&ws2812>,"rpi,invert:0"; + num_leds = <&ws2812>,"rpi,num_leds:0"; + }; +}; diff --git a/projects/Slice3/filesystem/usr/config/autostart.sh b/projects/Slice3/filesystem/usr/config/autostart.sh new file mode 100644 index 0000000000..0b6166972b --- /dev/null +++ b/projects/Slice3/filesystem/usr/config/autostart.sh @@ -0,0 +1,2 @@ +#!/bin/bash +hdparm -S60 /dev/sda diff --git a/projects/Slice3/filesystem/usr/config/shutdown.sh b/projects/Slice3/filesystem/usr/config/shutdown.sh new file mode 100644 index 0000000000..2c597f1186 --- /dev/null +++ b/projects/Slice3/filesystem/usr/config/shutdown.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +LEDDIR="/usr/share/kodi/addons/service.slice/resources/media/ledpatterns" + +case "$1" in + halt) + hdparm -y /dev/sda + led_png $LEDDIR/shutdown.png + ;; + poweroff) + hdparm -y /dev/sda + led_png $LEDDIR/shutdown.png + ;; + reboot) + led_png $LEDDIR/shutdown.png + ;; + *) + ;; +esac diff --git a/projects/Slice3/filesystem/usr/lib/systemd/system/serial-console.service b/projects/Slice3/filesystem/usr/lib/systemd/system/serial-console.service new file mode 100644 index 0000000000..196e8c4a97 --- /dev/null +++ b/projects/Slice3/filesystem/usr/lib/systemd/system/serial-console.service @@ -0,0 +1,23 @@ +[Unit] +Description=Debug Shell on /dev/console +DefaultDependencies=no +ConditionKernelCommandLine=console + +[Service] +WorkingDirectory=/storage +Environment="ENV=/etc/profile" +ExecStartPre=/bin/sh -c 'echo -en "\033[?25h"' +ExecStart=/bin/sh +Restart=always +RestartSec=0 +StandardInput=tty +TTYPath=/dev/console +TTYReset=yes +TTYVHangup=yes +KillMode=process +IgnoreSIGPIPE=no +# bash ignores SIGTERM +KillSignal=SIGHUP + +[Install] +WantedBy=sysinit.target diff --git a/projects/Slice3/filesystem/usr/share/alsa/cards/snd_slice.conf b/projects/Slice3/filesystem/usr/share/alsa/cards/snd_slice.conf new file mode 100644 index 0000000000..298f43d8e7 --- /dev/null +++ b/projects/Slice3/filesystem/usr/share/alsa/cards/snd_slice.conf @@ -0,0 +1,25 @@ + + +snd_slice.pcm.iec958.0 { + @args [ CARD AES0 AES1 AES2 AES3 ] + @args.CARD { + type string + } + @args.AES0 { + type integer + } + @args.AES1 { + type integer + } + @args.AES2 { + type integer + } + @args.AES3 { + type integer + } + type hooks + slave.pcm { + type hw + card $CARD + } +} diff --git a/projects/Slice3/initramfs/platform_init b/projects/Slice3/initramfs/platform_init new file mode 100755 index 0000000000..e3e2e7d50a --- /dev/null +++ b/projects/Slice3/initramfs/platform_init @@ -0,0 +1,28 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC 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. +# +# OpenELEC 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 OpenELEC. If not, see . +################################################################################ + +# Enable io_is_busy for improved sdhost performance - essentially, equivalent of force_turbo=1 but for mmc +echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy + +# Configure frequency scaling properties - should improve performance a little (turbo, in most cases) +echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor +echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold +echo 100000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate +echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor diff --git a/projects/Slice3/kodi/advancedsettings.xml b/projects/Slice3/kodi/advancedsettings.xml new file mode 100644 index 0000000000..00ed0dda87 --- /dev/null +++ b/projects/Slice3/kodi/advancedsettings.xml @@ -0,0 +1,12 @@ + + + false + 1 + + 720 + 540 + + + 30 + + diff --git a/projects/Slice3/linux b/projects/Slice3/linux new file mode 120000 index 0000000000..e48fcfd9f8 --- /dev/null +++ b/projects/Slice3/linux @@ -0,0 +1 @@ +../RPi2/linux \ No newline at end of file diff --git a/projects/Slice3/options b/projects/Slice3/options new file mode 100644 index 0000000000..fc543279b1 --- /dev/null +++ b/projects/Slice3/options @@ -0,0 +1,139 @@ +################################################################################ +# setup system defaults +################################################################################ + + # The TARGET_CPU variable controls which processor should be targeted for + # generated code. + case $TARGET_ARCH in + arm) + # TARGET_CPU: + # arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d + # arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c + # arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t + # arm720t arm740t strongarm strongarm110 strongarm1100 + # strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t + # arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi + # arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e + # arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s + # arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4 + # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312. + TARGET_CPU="cortex-a7" + + # TARGET_FLOAT: + # Specifies which floating-point ABI to use. Permissible values are: + # soft softfp hard + TARGET_FLOAT="hard" + + # TARGET_FPU: + # This specifies what floating point hardware (or hardware emulation) is + # available on the target. Permissible names are: + # fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16 + # vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16 + # neon-vfpv4. + TARGET_FPU="neon-vfpv4" + ;; + esac + + # Bootloader to use (syslinux / u-boot / bcm2835-bootloader) + BOOTLOADER="bcm2835-bootloader" + + # u-boot version to use (default) + UBOOT_VERSION="default" + + # Configuration for u-boot + UBOOT_CONFIG="" + + # Target Configfile for u-boot + UBOOT_CONFIGFILE="" + + # Kernel target + KERNEL_TARGET="zImage" + + # Kernel extra targets to build + KERNEL_UBOOT_EXTRA_TARGET="" + + # Additional kernel make parameters (for example to specify the u-boot loadaddress) + KERNEL_MAKE_EXTRACMD="dtbs overlays/slice.dtbo overlays/ws2812.dtbo" + + # Kernel to use. values can be: + # default: default mainline kernel + LINUX="default-rpi" + + # NOOBS supported hex versions (legacy) + NOOBS_HEX="1040,1041,2082" + + # NOOBS supported model versions + NOOBS_SUPPORTED_MODELS='"Pi 2","Pi 3"' + +################################################################################ +# setup build defaults +################################################################################ + + # Project CFLAGS + PROJECT_CFLAGS="" + + # SquashFS compression method (gzip / lzo / xz) + SQUASHFS_COMPRESSION="lzo" + + +################################################################################ +# setup project defaults +################################################################################ + + # build and install ALSA Audio support (yes / no) + ALSA_SUPPORT="yes" + + # OpenGL(X) implementation to use (no / mesa) + OPENGL="no" + + # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q) + OPENGLES="bcm2835-driver" + + # include uvesafb support (yes / no) + UVESAFB_SUPPORT="no" + + # Displayserver to use (x11 / no) + DISPLAYSERVER="no" + + # Windowmanager to use (ratpoison / fluxbox / none) + WINDOWMANAGER="none" + + # Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia) + # Space separated list is supported, + # e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia" + GRAPHIC_DRIVERS="" + + # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap) + KODIPLAYER_DRIVER="bcm2835-driver" + + # Modules to install in initramfs for early boot + INITRAMFS_MODULES="" + + # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) + # Space separated list is supported, + # e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware" + FIRMWARE="misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-rpi slice-firmware" + + # build and install ATV IR remote support (yes / no) + ATVCLIENT_SUPPORT="no" + + # build with swap support (yes / no) + SWAP_SUPPORT="yes" + + # swap support enabled per default (yes / no) + SWAP_ENABLED_DEFAULT="no" + + # swapfile size if SWAP_SUPPORT=yes in MB + SWAPFILESIZE="128" + + # build with installer (yes / no) + INSTALLER_SUPPORT="no" + + # kernel image name + KERNEL_NAME="kernel.img" + + # additional drivers to install: + # for a list of additinoal drivers see packages/linux-drivers + # Space separated list is supported, + # e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" + ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS media_build rpi-cirrus-config slice-drivers" diff --git a/projects/Slice3/patches/kodi/kodi-000-revert-pr11222.patch b/projects/Slice3/patches/kodi/kodi-000-revert-pr11222.patch new file mode 100644 index 0000000000..491bc0b868 --- /dev/null +++ b/projects/Slice3/patches/kodi/kodi-000-revert-pr11222.patch @@ -0,0 +1,102 @@ +From 073c2c6a118a03b70a29fd302e48f1f75bc7e5bc Mon Sep 17 00:00:00 2001 +From: MilhouseVH +Date: Wed, 24 May 2017 19:17:24 +0100 +Subject: [PATCH] Revert "PR11222" + +This reverts commit 6cc9ab253753aeb62b01d3e654bbfa77a7f22a42. +--- + .../resource.language.en_gb/resources/strings.po | 15 -------------- + system/peripherals.xml | 4 +--- + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 23 +++++++--------------- + 3 files changed, 8 insertions(+), 34 deletions(-) + +diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po +index 6443f3d..e0060d1 100644 +--- a/addons/resource.language.en_gb/resources/strings.po ++++ b/addons/resource.language.en_gb/resources/strings.po +@@ -19745,18 +19745,3 @@ msgstr "" + msgctxt "#39010" + msgid "Select sort method" + msgstr "" +- +-#: system/peripherals.xml +-msgctxt "#38050" +-msgid "Remote button press delay before repeating (ms)" +-msgstr "" +- +-#: system/peripherals.xml +-msgctxt "#38051" +-msgid "Remote button press repeat rate (ms)" +-msgstr "" +- +-#: system/peripherals.xml +-msgctxt "#38052" +-msgid "Remote button press release time (ms)" +-msgstr "" +diff --git a/system/peripherals.xml b/system/peripherals.xml +index 02b1a9e..d5704b2 100644 +--- a/system/peripherals.xml ++++ b/system/peripherals.xml +@@ -31,9 +31,7 @@ + + + +- +- +- ++ + + + +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +index d04a632..d032ffd 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +@@ -803,10 +803,7 @@ void CPeripheralCecAdapter::PushCecKeypress(const CecButtonPress &key) + CLog::Log(LOGDEBUG, "%s - received key %2x duration %d", __FUNCTION__, key.iButton, key.iDuration); + + CSingleLock lock(m_critSection); +- // avoid the queue getting too long +- if (m_configuration.iButtonRepeatRateMs && m_buttonQueue.size() > 5) +- return; +- if (m_configuration.iButtonRepeatRateMs == 0 && key.iDuration > 0) ++ if (key.iDuration > 0) + { + if (m_currentButton.iButton == key.iButton && m_currentButton.iDuration == 0) + { +@@ -1299,15 +1296,6 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu + m_configuration.bActivateSource = config.bActivateSource; + bChanged |= SetSetting("activate_source", m_configuration.bActivateSource == 1); + +- m_configuration.iDoubleTapTimeoutMs = config.iDoubleTapTimeoutMs; +- bChanged |= SetSetting("double_tap_timeout_ms", (int)m_configuration.iDoubleTapTimeoutMs); +- +- m_configuration.iButtonRepeatRateMs = config.iButtonRepeatRateMs; +- bChanged |= SetSetting("button_repeat_rate_ms", (int)m_configuration.iButtonRepeatRateMs); +- +- m_configuration.iButtonReleaseDelayMs = config.iButtonReleaseDelayMs; +- bChanged |= SetSetting("button_release_delay_ms", (int)m_configuration.iButtonReleaseDelayMs); +- + m_configuration.bPowerOffOnStandby = config.bPowerOffOnStandby; + + m_configuration.iFirmwareVersion = config.iFirmwareVersion; +@@ -1403,10 +1391,13 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void) + m_configuration.bPowerOffOnStandby = iStandbyAction == LOCALISED_ID_SUSPEND ? 1 : 0; + m_bShutdownOnStandby = iStandbyAction == LOCALISED_ID_POWEROFF; + +- // double tap prevention timeout in ms ++#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD) ++ // double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50 ++ m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50; ++#else ++ // backwards compatibility. will be removed once the next major release of libCEC is out + m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms"); +- m_configuration.iButtonRepeatRateMs = GetSettingInt("button_repeat_rate_ms"); +- m_configuration.iButtonReleaseDelayMs = GetSettingInt("button_release_delay_ms"); ++#endif + + if (GetSettingBool("pause_playback_on_deactivate")) + { +-- +2.7.4 + diff --git a/projects/Slice3/patches/kodi/kodi-001-backport.patch b/projects/Slice3/patches/kodi/kodi-001-backport.patch new file mode 120000 index 0000000000..7a787944f5 --- /dev/null +++ b/projects/Slice3/patches/kodi/kodi-001-backport.patch @@ -0,0 +1 @@ +../../../RPi2/patches/kodi/kodi-001-backport.patch \ No newline at end of file diff --git a/projects/Slice3/patches/kodi/kodi-004-keyboard.patch b/projects/Slice3/patches/kodi/kodi-004-keyboard.patch new file mode 100644 index 0000000000..d5434ebf74 --- /dev/null +++ b/projects/Slice3/patches/kodi/kodi-004-keyboard.patch @@ -0,0 +1,45 @@ +--- a/system/keymaps/keyboard.xml 2016-09-17 16:35:20.000000000 +0100 ++++ b/system/keymaps/keyboard.xml 2016-10-01 19:31:07.928719606 +0100 +@@ -56,7 +56,7 @@ + Menu + ContextMenu + Menu +- Pause ++ PlayPause + Stop + SkipNext + SkipPrevious +@@ -321,8 +321,8 @@ + NextSubtitle + StepBack + StepForward +- ChapterOrBigStepForward +- ChapterOrBigStepBack ++ VolumeUp ++ VolumeDown + AudioNextLanguage + NextSubtitle + AudioDelay +@@ -425,8 +425,8 @@ + StepForward + Rewind + FastForward +- SkipNext +- SkipPrevious ++ VolumeUp ++ VolumeDown + PlayerProcessInfo + LockPreset + FullScreen +@@ -632,8 +632,8 @@ + + StepBack + StepForward +- Up +- Down ++ VolumeUp ++ VolumeDown + OSD + OSD + ActivateWindow(PVROSDChannels) + diff --git a/projects/Slice3/patches/kodi/kodi-999.99-sysinfo-battery.patch b/projects/Slice3/patches/kodi/kodi-999.99-sysinfo-battery.patch new file mode 100644 index 0000000000..cd4d881ee9 --- /dev/null +++ b/projects/Slice3/patches/kodi/kodi-999.99-sysinfo-battery.patch @@ -0,0 +1,10 @@ +--- a/xbmc/windows/GUIWindowSystemInfo.cpp 2013-02-21 22:09:04.765734381 +0400 ++++ b/xbmc/windows/GUIWindowSystemInfo.cpp 2013-02-22 16:12:57.942164800 +0400 +@@ -100,7 +100,6 @@ + #endif + SetControlLabel(i++, "%s: %s", 12390, SYSTEM_UPTIME); + SetControlLabel(i++, "%s: %s", 12394, SYSTEM_TOTALUPTIME); +- SetControlLabel(i++, "%s: %s", 12395, SYSTEM_BATTERY_LEVEL); + } + else if (m_section == CONTROL_BT_STORAGE) + { diff --git a/projects/Slice3/patches/linux/linux-01-RPi_support.patch b/projects/Slice3/patches/linux/linux-01-RPi_support.patch new file mode 120000 index 0000000000..b6884c169a --- /dev/null +++ b/projects/Slice3/patches/linux/linux-01-RPi_support.patch @@ -0,0 +1 @@ +../../../RPi2/patches/linux/linux-01-RPi_support.patch \ No newline at end of file diff --git a/projects/Slice3/patches/linux/linux-04-rtc-pcf8523-c.patch b/projects/Slice3/patches/linux/linux-04-rtc-pcf8523-c.patch new file mode 100644 index 0000000000..da7593ed7e --- /dev/null +++ b/projects/Slice3/patches/linux/linux-04-rtc-pcf8523-c.patch @@ -0,0 +1,17 @@ +--- a/drivers/rtc/rtc-pcf8523.c 2016-10-01 10:16:30.259771931 +0100 ++++ b/drivers/rtc/rtc-pcf8523.c 2016-10-01 10:21:29.762638800 +0100 +@@ -291,7 +291,13 @@ static int pcf8523_probe(struct i2c_clie + if (!pcf) + return -ENOMEM; + +- err = pcf8523_select_capacitance(client, true); ++ if (of_property_read_bool(client->dev.of_node, "nxp,xtalcap-7pf")) { ++ printk(KERN_ERR "PCF8523 - set 7pF crystal load"); ++ err = pcf8523_select_capacitance(client, false); ++ } else { ++ printk(KERN_ERR "PCF8523 - set 12pF crystal load"); ++ err = pcf8523_select_capacitance(client, true); ++ } + if (err < 0) + return err; + diff --git a/projects/Slice3/patches/linux/linux-05-cs4265-c.patch b/projects/Slice3/patches/linux/linux-05-cs4265-c.patch new file mode 100644 index 0000000000..a3487ac222 --- /dev/null +++ b/projects/Slice3/patches/linux/linux-05-cs4265-c.patch @@ -0,0 +1,45 @@ +--- linux-4.4-rc7-old/sound/soc/codecs/cs4265.c 2016-01-13 20:56:05.637652775 +0000 ++++ linux-4.4-rc7/sound/soc/codecs/cs4265.c 2016-01-17 11:21:16.977652775 +0000 +@@ -157,7 +157,7 @@ + SOC_SINGLE("Validity Bit Control Switch", CS4265_SPDIF_CTL2, + 3, 1, 0), + SOC_ENUM("SPDIF Mono/Stereo", spdif_mono_stereo_enum), +- SOC_SINGLE("MMTLR Data Switch", 0, ++ SOC_SINGLE("MMTLR Data Switch", CS4265_SPDIF_CTL2, + 1, 1, 0), + SOC_ENUM("Mono Channel Select", spdif_mono_select_enum), + SND_SOC_BYTES("C Data Buffer", CS4265_C_DATA_BUFF, 24), +@@ -199,8 +199,6 @@ + SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_IN("DIN2", NULL, 0, + SND_SOC_NOPM, 0, 0), +- SND_SOC_DAPM_AIF_IN("TXIN", NULL, 0, +- CS4265_SPDIF_CTL2, 5, 1), + + SND_SOC_DAPM_OUTPUT("LINEOUTL"), + SND_SOC_DAPM_OUTPUT("LINEOUTR"), +@@ -384,7 +382,6 @@ + static int cs4265_digital_mute(struct snd_soc_dai *dai, int mute) + { + struct snd_soc_codec *codec = dai->codec; +- + if (mute) { + snd_soc_update_bits(codec, CS4265_DAC_CTL, + CS4265_DAC_CTL_MUTE, +@@ -410,7 +407,7 @@ + struct snd_soc_codec *codec = dai->codec; + struct cs4265_private *cs4265 = snd_soc_codec_get_drvdata(codec); + int index; +- ++printk(KERN_ERR "cs4265_pcm_hw_params: format = 0x%x, width = %d\n", cs4265->format, params_width(params)); + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE && + ((cs4265->format & SND_SOC_DAIFMT_FORMAT_MASK) + == SND_SOC_DAIFMT_RIGHT_J)) +@@ -469,6 +466,7 @@ + static int cs4265_set_bias_level(struct snd_soc_codec *codec, + enum snd_soc_bias_level level) + { ++printk(KERN_ERR "set_bias_level %d\n", level); + switch (level) { + case SND_SOC_BIAS_ON: + break;