Drive the LCD(XBMC/Kodi)

 

(Touch will go crazy when start the Kodi.This problem cann't be solved.
If someone can solve the problem, you can email me:DRAgon_Manager@163.com)

Start the XBMC/Kodi outputting at the HDMI port

  • 1.Install Raspbian OS
    Because the XBMC/Kodi will be installed at Raspbian OS,
    So we need install the Raspbian OS and driver the LCD firstly

    See Drive the LCD(Raspbian/Ubuntu mate)->"Use the Raspberry OS that we provide" or "Use at yourself Raspbian OS " to do it

  • 2.
    On the Terminal, enter
    sudo raspi-config
    choose "Boot Options" -> "Console Autologin"->"OK"->"Finish" .Then the Pi will reboot

  • On the Terminal, enter
    sudo nano /boot/cmdline.txt
    change
    fbcon=map:10 to
    fbcon=map:00
    Press the keyboard “Ctrl + X” ,then choice “Y”, Press the ”Enter” exit.

  • 3. Install Kodi
    sudo nano /etc/apt/sources.list.d/raspi.list
    Add the followwing code at the file end
    deb http://archive.mene.za.net/raspbian jessie contrib
    Press the keyboard “Ctrl + X” ,then choice “Y”, Press the ”Enter” exit.
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 5243CDED
    sudo apt-get update
    sudo apt-get install kodi
    sudo nano /etc/group
    Add the followwing code at the file end
    audio video input dialout plugdev tty
    Press the keyboard “Ctrl + X” ,then choice “Y”, Press the ”Enter” exit.
    sudo usermod -a -G audio,video,input,dialout,plugdev,tty pi
    sudo nano /etc/udev/rules.d/99-input.rules
    SUBSYSTEM=="input", GROUP="input", MODE="0660"
    KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"

    Press the keyboard “Ctrl + X” ,then choice “Y”, Press the ”Enter” exit.
    On the Terminal, enter
    sudo raspi-config
    choose "Advanced Options" -> "Memory SplitĀ "->"256"->"OK"->"Finish" .Then the Pi will reboot
    On the Terminal, enter
    sudo nano /etc/rc.local
    Add the followwing code in front of "exit 0"
    kodi&
    Press the keyboard “Ctrl + X” ,then choice “Y”, Press the ”Enter” exit.
    then reboot
    sudo reboot
    After reboot,The kodi will output at the HDMI(you can see the kodi start at the general computer screen,
    If you don't have the general computer screen, Don't care about it, it must not be needed)

Framebuffer mirroring

  • 1. Install fbcp
    sudo apt-get install cmake
    git clone https://github.com/tasanakorn/rpi-fbcp
    cd rpi-fbcp/
    mkdir build
    cd build/
    cmake ..
    make
    sudo install fbcp /usr/local/bin/fbcp


  • 2. Make fbcp start at boot
    sudo nano /etc/rc.local
    Add the followwing code in front of "exit 0"
    sleep 7
    fbcp &
    The file will become the followwing
    _IP=$(hostname -I) || true
    if [ "$_IP" ]; then
    printf "My IP address is %s\n" "$_IP"
    fi
    kodi&
    sleep 7
    fbcp &
    exit 0

    Press the keyboard “Ctrl + X” ,then choice “Y”, Press the ”Enter” exit.
    then reboot
    sudo reboot
    After reboot,The kodi will start at your LCD