XBMC

= Kodi Shortcuts = Kodi/XBMC Shortcuts

= OpenELEC Dual Boot=

How to dual boot(actually Triple boot) OpenELEC with Ubuntu and Windows.


 * OpenELEC itself requires at least 2 partitions.


 * Create the first partition, EXT4
 * Label it 'OE_SYSTEM', size 512MB to 1GB.
 * The OE_SYSTEM partition must be flagged as bootable.
 * Both operating system files, SYSTEM and KERNEL, must be placed into the OE_SYSTEM partition (assume /dev/sda6)


 * Create the second partition, EXT4
 * Label it 'OE_DATA', size.
 * Here all local OpenELEC/XBMC data will be placed, such as databases and thumbnails (assume /dev/sda7)


 * Write down the linux drive letters & update the below file with it
 * Unlike Grub, Grub2 starts partition counting from 1 not 0.

sudo gedit /etc/grub.d/40_custom
 * Now update Grub2:

exec tail -n +3 $0 # menuentry "OpenELEC" { search --set=root --label OE_SYSTEM --hint hd0,msdos6 linux /KERNEL boot=LABEL=OE_SYSTEM disk=LABEL=OE_DATA quiet } menuentry "OpenELEC debugging" { search --set=root --label OE_SYSTEM --hint hd0,msdos6 linux /KERNEL boot=LABEL=OE_SYSTEM disk=LABEL=OE_DATA debugging }
 * 1) !/bin/sh
 * 1) This file provides an easy way to add custom menu entries.  Simply type the
 * 2) menu entries you want to add after this comment.  Be careful not to change
 * 3) the 'exec tail' line above.

Now finalize the grub menu additions:

sudo update-grub

LibreElec Shutdown Button
https://forum.libreelec.tv/thread/1754-problem-installing-pi-tools-addon/

Raspberry Pi Tools

/storage/.config/shutdown_pi.py

import RPi.GPIO as GPIO import time import os import sys
 * 1) !/bin/python

sys.path.append("/storage/.kodi/addons/virtual.rpi-tools/lib")

GPIO.setmode(GPIO.BCM) GPIO.setup(3, GPIO.IN, pull_up_down = GPIO.PUD_UP) def Shutdown(channel): os.system("sudo shutdown -h now") GPIO.add_event_detect(3, GPIO.FALLING, callback = Shutdown, bouncetime = 2000) while 1: time.sleep(1)
 * 1) Use the Broadcom SOC Pin numbers
 * 2) Setup the Pin with Internal pullups enabled and PIN in reading mode.
 * 1) Our function on what to do when the button is pressed
 * 1) Add our function to execute when the button pressed event happens
 * 1) Now wait!

/storage/.config/autostart.sh

( /storage/.config/shutdown_pi.py )&
 * 1) !/bin/bash