• 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 10
Linux Debian 8.0 Jessie on RaspBerry Pi 2, how to get Kodi running and how to compile it?
#76
Update: 2015-06-13, updated state to post: http://forum.kodi.tv/showthread.php?tid=...pid2028176
Ok some more information.
Script: first part

Code:
#! /bin/bash -x

# prepare source.list

echo -e "deb https://repositories.collabora.co.uk/debian/ jessie rpi2 \n
deb http://ftp.pl.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.pl.debian.org/debian/ jessie main contrib non-free \n
deb http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free \n" > /etc/apt/sources.list

# Pin Collabora repositories

echo -e "Package: flash-kernel
Pin: origin repositories.collabora.co.uk
Pin-Priority: 1000\n"  > /etc/apt/preferences.d/flash-kernel


dpkg-reconfigure locales;           # Reconfigure locales
dpkg-reconfigure tzdata;            # Reconfigure timezone

apt-get update; apt-get upgrade     # perform update && upgrade (there is problem with expiration of key, but the system works so leave it like that and don't bother)


# Change ssh key for openssh-server
rm /etc/ssh/ssh_host_*_key*
dpkg-reconfigure openssh-server

# Package for firmware update
apt-get install curl binutils libraspberrypi-bin libraspberrypi-dev kernel-package git screen

# script for firmware update

wget https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && chmod +x rpi-update
./rpi-update

# move data to right place
mv /boot/overlays/ /boot/start* /boot/bcm270* /boot/fixup* /boot/bootcode.bin /boot/kernel.img /boot/kernel7.img /boot/.firmware_revision  /boot/firmware/

# reboot after firmware update
reboot

Script: second part(after reboot)

Code:
#! /bin/bash -x

# predefined variables
RED=`tput setaf 1`
GREEN=`tput setaf 2`
RESET=`tput sgr0`

# link files from /opt/vc to /usr
for level1 in `ls /opt/vc`; do

  for level2  in `ls /opt/vc/${level1}`; do

    ln -s  /opt/vc/$level1/$level2 /usr/$level1/$level2;
  done;

done;

# additional links
ln -s /opt/vc/include/interface/vcos/pthreads/vcos_platform.h /opt/vc/include/interface/vcos/vcos_platform.h
ln -s /opt/vc/include/interface/vcos/pthreads/vcos_platform_types.h /opt/vc/include/interface/vcos/vcos_platform_types.h
ln -s /opt/vc/include/interface/vmcs_host/linux/vchost_config.h /opt/vc/include/interface/vmcs_host/vchost_config.h


# Installing dependency

echo "${GREEN}Installing dependency${RESET}";

PACKAGES="kernel-package git pkg-config autoconf automake autopoint autotools-dev cmake curl debhelper default-jre gawk gperf libao-dev libasound2-dev libass-dev libavahi-client-dev libavahi-common-dev libbluetooth-dev \
  libbluray-dev libboost-dev libboost-thread-dev libbz2-dev libcap-dev libcdio-dev libcurl4-gnutls-dev libcurl4-gnutls-dev libcwiid-dev libdbus-1-dev libfontconfig-dev libfreetype6-dev libfribidi-dev \
  libgif-dev libiso9660-dev libjasper-dev libjpeg-dev libltdl-dev liblzo2-dev libmicrohttpd-dev libmodplug-dev libmpcdec-dev libmpeg2-4-dev libmysqlclient-dev libnfs-dev libogg-dev \
  libpcre3-dev libplist-dev libpng-dev libpulse-dev librtmp-dev libsmbclient-dev libsqlite3-dev libssh-dev libssl-dev libswscale-dev libtag1-dev libtiff-dev libtinyxml-dev libtool libudev-dev \
  libusb-dev libva-dev libvdpau-dev libvorbis-dev libxinerama-dev libxml2-dev libxmu-dev libxrandr-dev libxslt1-dev libxt-dev libyajl-dev lsb-release nasm  python-dev python-imaging python-support swig unzip yasm zip zlib1g-dev"

for x in $PACKAGES; do
  PKG_STATUS=`dpkg -s ${x} > /dev/null 2>&1; echo $?`

  if [[ $PKG_STATUS -gt 0 ]]; then apt-get -y install ${x} > /dev/null 2>&1; fi

done


Last Part - Script for kodi build
Code:
#! /bin/bash
git clone https://github.com/xbmc/xbmc.git kodi;

cd kodi;
./bootstrap

CFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mfloat-abi=hard -mcpu=cortex-a7 -mfpu=neon-vfpv4";

CXXFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mfloat-abi=hard -mcpu=cortex-a7 -mfpu=neon-vfpv4";

LDFLAGS="-L/opt/vc/lib";

FFMPEG_OPTS="--cpu=cortex-a7";

./configure --prefix=/usr/local/kodi/git-`date +%Y%m%d-%H%M`  --disable-gl --enable-gles --with-platform=raspberry-pi --disable-x11 --disable-vaapi --disable-vdpau --disable-avahi --disable-libcec \
    --disable-projectm --disable-optical-drive --disable-dvdcss --disable-vtbdecoder --enable-alsa --enable-player=omxplayer

make && make install

# rest of the script in development

Is there anyone interested in bare debian image with environment for building kodi for Raspberry PI2 (RPi2) ?
Reply
#77
(2015-06-12, 19:50)m_o_d Wrote: Ok some more information.
Script: first part

Code:
#! /bin/bash -x

# prepare source.list

echo -e "deb https://repositories.collabora.co.uk/debian/ jessie rpi2 \n
deb http://ftp.pl.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.pl.debian.org/debian/ jessie main contrib non-free \n
deb http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free \n" > /etc/apt/sources.list

# Pin Collabora repositories

echo -e "Package: flash-kernel
Pin: origin repositories.collabora.co.uk
Pin-Priority: 1000\n"  > /etc/apt/preferences.d/flash-kernel


dpkg-reconfigure locales;           # Reconfigure locales
dpkg-reconfigure tzdata;            # Reconfigure timezone

apt-get update; apt-get upgrade     # perform update && upgrade (there is problem with expiration of key, but the system works so leave it like that and don't bother)


# Change ssh key for openssh-server
rm /etc/ssh/ssh_host_*_key*
dpkg-reconfigure openssh-server

# Package for firmware update
apt-get install curl binutils libraspberrypi-bin libraspberrypi-dev kernel-package git screen

# script for firmware update

wget https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && chmod +x rpi-update
./rpi-update

# move data to right place
mv /boot/overlays/ /boot/start* /boot/bcm270* /boot/fixup* /boot/bootcode.bin /boot/kernel.img /boot/kernel7.img /boot/.firmware_revision  /boot/firmware/

# reboot after firmware update
reboot

Script: second part(after reboot)

Code:
#! /bin/bash -x

# predefined variables
RED=`tput setaf 1`
GREEN=`tput setaf 2`
RESET=`tput sgr0`

# link files from /opt/vc to /usr
for level1 in `ls /opt/vc`; do.

  for level2  in `ls /opt/vc/${level1}`; do.

    ln -s  /opt/vc/$level1/$level2 /usr/$level1/$level2;.
  done;

done;

# additional links
ln -s /opt/vc/include/interface/vcos/pthreads/vcos_platform.h /opt/vc/include/interface/vcos/vcos_platform.h
ln -s /opt/vc/include/interface/vcos/pthreads/vcos_platform_types.h /opt/vc/include/interface/vcos/vcos_platform_types.h
ln -s /opt/vc/include/interface/vmcs_host/linux/vchost_config.h /opt/vc/include/interface/vmcs_host/vchost_config.h


# Installing dependency

echo "${GREEN}Installing dependency${RESET}";

PACKAGES="kernel-package git pkg-config autoconf automake autopoint autotools-dev cmake curl debhelper default-jre gawk gperf libao-dev libasound2-dev libass-dev libavahi-client-dev libavahi-common-dev libbluetooth-dev \
  libbluray-dev libboost-dev libboost-thread-dev libbz2-dev libcap-dev libcdio-dev libcurl4-gnutls-dev libcurl4-gnutls-dev libcwiid-dev libdbus-1-dev libfontconfig-dev libfreetype6-dev libfribidi-dev \
  libgif-dev libgl1-mesa-dev libglew-dev libglu1-mesa-dev libiso9660-dev libjasper-dev libjpeg-dev libltdl-dev liblzo2-dev libmicrohttpd-dev libmodplug-dev libmpcdec-dev libmpeg2-4-dev libmysqlclient-dev libnfs-dev libogg-dev \
  libpcre3-dev libplist-dev libpng-dev libpulse-dev librtmp-dev libsdl2-dev libsmbclient-dev libsqlite3-dev libssh-dev libssl-dev libswscale-dev libtag1-dev libtiff-dev libtinyxml-dev libtool libudev-dev \
  libusb-dev libva-dev libvdpau-dev libvorbis-dev libxinerama-dev libxml2-dev libxmu-dev libxrandr-dev libxslt1-dev libxt-dev libyajl-dev lsb-release nasm  python-dev python-imaging python-support swig unzip yasm zip zlib1g-dev"

for x in $PACKAGES; do
  PKG_STATUS=`dpkg -s ${x} > /dev/null 2>&1; echo $?`

  if [[ $PKG_STATUS -gt 0 ]]; then apt-get -y install ${x} > /dev/null 2>&1; fi

done


Last Part - Script for kodi build
Code:
#! /bin/bash -x

# predefined variables
DATE=`date +%Y%m%d-%H%M`
BASE_DIR="/usr/src/kodi/build-${DATE}"
DST_DIR="/usr/local/kodi/git-${DATE}"


RED=`tput setaf 1`
GREEN=`tput setaf 2`
RESET=`tput sgr0`

mkdir -p ${BASE_DIR}
cd ${BASE_DIR}


echo "${GREEN}Kodi: Start Build${RESET}";

cd ${BASE_DIR};

git clone https://github.com/xbmc/xbmc.git kodi;
cd kodi;

./bootstrap;
./configure --prefix=${DST_DIR};
make -j5 && make install;

rm /usr/local/kodi/current;
ln -s ${DST_DIR} /usr/local/kodi/current;
cd ${BASE_DIR};

echo "${GREEN}Kodi: End Build${RESET}";

# rest of the script in development

Is there anyone interested in bare debian image with environment for building kodi for Raspberry PI2 (RPi2) ?

YES Please it would be great to have kodi and a browser unlike osmc and openelec for the rpi2
Reply
#78
@m_o_d: thanks for the scripts, but i have one problem. If i copy and paste the scripts and then try to run it via bash i get error message of unkonown characters. Something seems to be wrong with character encoding in this forum. Could you please provide a native file as attachment or please can someone tell me what is the problem with cutting and pasting from here especially the package dependencies, such that i need not do them by hand :-) Huh?
Reply
#79
@Thomas: use notepad, i will later upload files to cloud
Reply
#80
@m_o_d: :-| ? actually i copied and pasted into Windows 7 notepad, then copying to a Samba usb harddrive that is attached to my RaspBerry Pi 2. Then the script was not usable because of strange characters, that were not even shown in nano editor. I was thinking of searching those characters with a Hexeditor, but nevertheless it is strange that they are appearing. Maybe you have also used a strange way to copy into this threadHuh Greets, Thomas.
Reply
#81
@Thomas: I deleted several packages from the list:
* libgl1-mesa-dev
* libglew-dev
* libglu1-mesa-dev
* libsdl2-dev
Reply
#82
Update: 2015-06-13 to data from post http://forum.kodi.tv/showthread.php?tid=...pid2027785 [/b]

Bellow i attach link to image of RPi2 (sd-card size 6GB), image contains:
* https://owncloud.justnet.pl/index.php/s/UVnw1ds2X2Xidjz attention: self signed certyficate used for https
* login: root password: debian
* network configuration via dhcp
* package update to date: 20150612
* firmware update for RPi2 (Raspberry Pi 2)
* localization set to en_GB UTF-8
* ssh key used in: http://sjoerd.luon.net/posts/2015/02/deb...e-on-rpi2/
* dependency installed for kodi 15 beta 2


This image was not tested. (If you don't want to waste your network link , wait 1-2 days until test it)
Orginal image was downloaded from: http://sjoerd.luon.net/posts/2015/02/deb...e-on-rpi2/


To use an image enter the following commands
Code:
gzip -d jessie-rpi2-kodienv-20150612.img
bmaptool copy --bmap jessie-rpi2-kodienv-20150612.img.bmap jessie-rpi2-kodienv-20150612.img /dev/mmcblk0
Reply
#83
@m_o_d: just one question. Which program did you use to make the image file? Did you take out the SD card and use Win32DiskImager or did you take it out and use Linux tools or what tool did you use to make the image of your RPi2 installation?
Reply
#84
@Thomas: Linux dd

Code:
dd if=/dev/mmcblk0 of=jessie-rpi2-kodienv-20150612.img bs=1M count=6144
bmaptool create -o jessie-rpi2-kodienv-20150612.img.bmap jessie-rpi2-kodienv-20150612.img
gzip jessie-rpi2-kodienv-20150612.img

To use an image enter the following commands
Code:
gzip -d jessie-rpi2-kodienv-20150612.img
bmaptool copy --bmap jessie-rpi2-kodienv-20150612.img.bmap jessie-rpi2-kodienv-20150612.img /dev/mmcblk0
Reply
#85
@m_o_d: I tried to git the repository by "git clone https://github.com/xbmc/xbmc.git kodi" and it wants to download around 500 MB estimated and it needs very long time. Also i have tried from an older git repository which i downloaded some 2-3 weeks ago and when trying to compile this according to your instructions, i got an error in the configure script saying that main in -lbz2 does not work or something like that. Then it stops. How did you overcome this problem? Also when i called "bootstrap" and afterwards "configure", configure complained about an empty build-aux directory. Only after running autoreconf at least this directory was there. So how did you manage to overcome the obstacles of "bootstrap" and "configure"?
Reply
#86
@thomas: i had not that kind of problems. please start fresh compilation with redirected output to file. After that you can attach file to post
Code:
./script_name > log.txt 2>&1

Later i will create debian image with installed kodi and attached script for autobuild kodi.
Reply
#87
@Thomas: The script for build is wrong, pasted code of the old script. The correct code is below
Also I updated the earlier instructions(http://forum.kodi.tv/showthread.php?tid=...pid2027416)

Code:
#! /bin/bash
git clone https://github.com/xbmc/xbmc.git kodi;

cd kodi;
./bootstrap

CFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mfloat-abi=hard -mcpu=cortex-a7 -mfpu=neon-vfpv4";

CXXFLAGS="-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -mfloat-abi=hard -mcpu=cortex-a7 -mfpu=neon-vfpv4";

LDFLAGS="-L/opt/vc/lib";

FFMPEG_OPTS="--cpu=cortex-a7";

./configure --prefix=/usr/local/kodi/git-`date +%Y%m%d-%H%M`  --disable-gl --enable-gles --with-platform=raspberry-pi --disable-x11 --disable-vaapi --disable-vdpau --disable-avahi --disable-libcec \
    --disable-projectm --disable-optical-drive --disable-dvdcss --disable-vtbdecoder --enable-alsa --enable-player=omxplayer

make && make install
Reply
#88
@popcornmix: After installing all the library dependencies i still get a configure error: "Checking for main in -lbz2...no. configure: error: Could not find a required library. Please see the README for your platform.". The config.log file contains the following last lines:

#define HAVE_UTIME 1
#define HAVE_POSIX_FADVISE 1
#define HAVE_LOCALTIME_R 1
#define SIZEOF_INT 4
#define SIZEOF_SIZE_T 4
#define HAS_BUILTIN_SYNC_ADD_AND_FETCH 1
#define HAS_BUILTIN_SYNC_SUB_AND_FETCH 1
#define HAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP 1
#define HAVE_STD__U16STRING 1
#define HAVE_STD__U32STRING 1
#define HAVE_CHAR16_T 1
#define HAVE_CHAR32_T 1
#define SIZEOF_WCHAR_T 4
#define HAVE_INOTIFY 1
#define HAVE_PYTHON "2.7"
#define HAVE_LIBEGL 1
#define HAVE_LIBGLESV2 1
#define HAVE_MYSQL 1
#define HAVE_OPENSSL 1
#define HAVE_GNUTLS 1

configure: exit 1



Last time when i tried to compile kodi (i did reinstallation of my SD card since then once), i got the error at "libgpgerror" and "gcrypt" which is just one instant before. This time it realises that this dependency is not installed at all and it "registers no" and simply continues. Maybe because i installed "bzip2" now i have this problem and the configure process would simply continue if i deinstalled the more recent version of "bzip2" of Jessie than maybe that one of RaspbianHuh? What else could be the problem?

--Thomas
Reply
#89
For building you'll need the "-dev" version of the library installed. e.g. "sudo apt-get install libgcrypt-dev"
Reply
#90
ok. this time in the dependency list of m_o_d 's script gpgerror and gcrypt were not listed. However libbz2-dev was listed. I also installed the dependency. I suspect that the message "Checking for main in -lbz2...no" relates somehow to this libbz2-dev which i have installed properly as i understand. If i did not install maybe the configure script will simply continue wthout checking for the "main in -lbz2". I got asimilar before for "checking main in gpg-error", but since this time the libpgerror-dev seems not to be installled it seems to make no problem. So what is the real problem with the configure script?
Reply
  • 1
  • 4
  • 5
  • 6(current)
  • 7
  • 8
  • 10

Logout Mark Read Team Forum Stats Members Help
Debian 8.0 Jessie on RaspBerry Pi 2, how to get Kodi running and how to compile it?0