Das Kompilieren dauert je nach Taktung des Pi zwischen 9 und 12 Stunden!
Ich persönlich hab meinen Pi auf 1000 MHz übertaktet, dies funktioniert aber nur mit Kühlkörpern
Zuerst müssen einige Pakete installiert und Softlinks erstellt werden. Zudem muss der Quellcode von XBMC heruntergeladen werden.
Dies hab ich der Einfachheit halber in einem Script zusammengefasst:
Eine neue Datei öffnen:
Code: Alles auswählen
nano xbmcprepare.sh
Spoiler
Show
Code: Alles auswählen
#!/bin/bash
#xbmc-compile Vorbereitungsscript
sudo apt-get update
sudo apt-get install build-essential autoconf ccache gawk gperf mesa-utils zip unzip -y
sudo apt-get install autotools-dev comerr-dev dpkg-dev libalsaplayer-dev -y
sudo apt-get install libapt-pkg-dev:armhf libasound2-dev:armhf libass-dev:armhf libatk1.0-dev -y
sudo apt-get install libavahi-client-dev libavahi-common-dev libavcodec-dev libavformat-dev -y
sudo apt-get install libavutil-dev libbison-dev:armhf libbluray-dev:armhf libboost1.49-dev -y
sudo apt-get install libbz2-dev:armhf libc-dev-bin libc6-dev:armhf libcaca-dev libcairo2-dev -y
sudo apt-get install libcdio-dev libclalsadrv-dev libcrypto++-dev libcups2-dev libcurl3-gnutls-dev -y
sudo apt-get install libdbus-1-dev libdbus-glib-1-dev libdirectfb-dev libdrm-dev libegl1-mesa-dev -y
sudo apt-get install libelf-dev libenca-dev libept-dev libevent-dev libexpat1-dev libflac-dev:armhf -y
sudo apt-get install libfontconfig1-dev libfreetype6-dev libfribidi-dev libgconf2-dev -y
sudo apt-get install libgcrypt11-dev libgdk-pixbuf2.0-dev libgl1-mesa-dev libgles2-mesa-dev -y
sudo apt-get install libglew-dev:armhf libglewmx-dev:armhf libglib2.0-dev libglu1-mesa-dev -y
sudo apt-get install libgnome-keyring-dev libgnutls-dev libgpg-error-dev libgtk2.0-dev libhal-dev -y
sudo apt-get install libhunspell-dev:armhf libice-dev:armhf libicu-dev libidn11-dev libiso9660-dev -y
sudo apt-get install libjasper-dev libjbig-dev:armhf libjconv-dev libjpeg8-dev:armhf libkrb5-dev -y
sudo apt-get install libldap2-dev:armhf libltdl-dev:armhf liblzo2-dev libmad0-dev libmicrohttpd-dev -y
sudo apt-get install libmodplug-dev libmp3lame-dev:armhf libmpeg2-4-dev libmysqlclient-dev -y
sudo apt-get install libncurses5-dev libnspr4-dev libnss3-dev libogg-dev:armhf libopenal-dev:armhf -y
sudo apt-get install libp11-kit-dev libpam0g-dev:armhf libpango1.0-dev libpcre++-dev libpcre3-dev -y
sudo apt-get install libpixman-1-dev libpng12-dev libprotobuf-dev libpthread-stubs0-dev:armhf -y
sudo apt-get install libpulse-dev:armhf librtmp-dev libsamplerate0-dev:armhf -y
sudo apt-get install libsdl-image1.2-dev:armhf libsdl1.2-dev libslang2-dev:armhf -y
sudo apt-get install libsm-dev:armhf libsmbclient-dev:armhf libspeex-dev:armhf -y
sudo apt-get install libsqlite3-dev libssh-dev libssh2-1-dev libssl-dev libstdc++6-4.6-dev -y
sudo apt-get install libtagcoll2-dev libtasn1-3-dev libtiff4-dev libtinfo-dev:armhf libtinyxml-dev -y
sudo apt-get install libts-dev:armhf libudev-dev libv8-dev libva-dev:armhf libvdpau-dev:armhf -y
sudo apt-get install libvorbis-dev:armhf libvpx-dev:armhf libwebp-dev:armhf libwibble-dev -y
sudo apt-get install libx11-dev:armhf libx11-xcb-dev libxapian-dev libxau-dev:armhf -y
sudo apt-get install libxcb-glx0-dev:armhf libxcb-render0-dev:armhf libxcb-shm0-dev:armhf -y
sudo apt-get install libxcb1-dev:armhf libxcomposite-dev libxcursor-dev:armhf libxdamage-dev -y
sudo apt-get install libxdmcp-dev:armhf libxext-dev:armhf libxfixes-dev libxft-dev libxi-dev -y
sudo apt-get install libxinerama-dev:armhf libxml2-dev:armhf libxmu-dev:armhf libxrandr-dev -y
sudo apt-get install libxrender-dev:armhf libxslt1-dev libxss-dev:armhf libxt-dev:armhf -y
sudo apt-get install libxtst-dev:armhf libxxf86vm-dev libyajl-dev libzip-dev linux-libc-dev:armhf -y
sudo apt-get install lzma-dev mesa-common-dev python-dev python2.7-dev x11proto-composite-dev -y
sudo apt-get install x11proto-core-dev x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev -y
sudo apt-get install x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev -y
sudo apt-get install x11proto-record-dev x11proto-render-dev x11proto-scrnsaver-dev -y
sudo apt-get install x11proto-xext-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev xtrans-dev -y
sudo apt-get install zlib1g-dev:armhf swig cmake -y
#Aufräumen
sudo apt-get purge libtag1-dev
sudo apt-get clean
#Softlinks setzen
sudo cp -R /opt/vc/include/* /usr/include
sudo cp /opt/vc/include/interface/vcos/pthreads/* /usr/include/interface/vcos
sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/libEGL.so
sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so
sudo ln -fs /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1
sudo ln -fs /opt/vc/lib/libEGL_static.a /usr/lib/libEGL_static.a
sudo ln -fs /opt/vc/lib/libEGL_static.a /usr/lib/arm-linux-gnueabihf/libEGL_static.a
sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/libGLESv2.so
sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so
sudo ln -fs /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2
sudo ln -fs /opt/vc/lib/libGLESv2_static.a /usr/lib/libGLESv2_static.a
sudo ln -fs /opt/vc/lib/libGLESv2_static.a /usr/lib/arm-linux-gnueabihf/libGLESv2_static.a
sudo ln -fs /opt/vc/lib/libbcm_host.so /usr/lib/libbcm_host.so
sudo ln -fs /opt/vc/lib/libbcm_host.so /usr/lib/arm-linux-gnueabihf/libbcm_host.so
sudo ln -fs /opt/vc/lib/libvchiq_arm.a /usr/lib/libvchiq_arm.a
sudo ln -fs /opt/vc/lib/libvchiq_arm.a /usr/lib/arm-linux-gnueabihf/libvchiq_arm.a
sudo ln -fs /opt/vc/lib/libvchiq_arm.so /usr/lib/libvchiq_arm.so
sudo ln -fs /opt/vc/lib/libvchiq_arm.so /usr/lib/arm-linux-gnueabihf/libvchiq_arm.so
sudo ln -fs /opt/vc/lib/libvcos.a /usr/lib/libvcos.a
sudo ln -fs /opt/vc/lib/libvcos.a /usr/lib/arm-linux-gnueabihf/libvcos.a
sudo ln -fs /opt/vc/lib/libvcos.so /usr/lib/libvcos.so
sudo ln -fs /opt/vc/lib/libvcos.so /usr/lib/arm-linux-gnueabihf/libvcos.so
#Swap Partition erstellen:
dd if=/dev/zero of=/home/pi/swapfile1 bs=1024 count=204800
sudo mkswap /home/pi/swapfile1
sudo chown root:root /home/pi/swapfile1
sudo chmod 0600 /home/pi/swapfile1
sudo swapon /home/pi/swapfile1
#XBMC 12.3 herunterladen:
wget http://mirrors.xbmc.org/releases/source/xbmc-12.3.tar.gz && tar -xzf xbmc-12.3.tar.gz
#Kompilieren und installieren einiger Bibliotheken:
cd ~/xbmc-12.3-Frodo
cd ~/xbmc-12.3-Frodo/lib/taglib/taglib-1.8
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_STATIC=1
make
make install
cd ~/
git clone --depth 5 https://github.com/Pulse-Eight/libcec.git
cd libcec
./bootstrap
./configure --prefix=/usr/local
make
sudo make install
cd ~/xbmc-12.3-Frodo
make -C lib/libshairport
sudo make -C lib/libshairport install
#Umgebungsvariablen
export TARGET_SUBARCH="armv6zk"
export TARGET_CPU="arm1176jzf-s"
export TARGET_FLOAT="hard"
export TARGET_FPU="vfp"
export TARGET_FPU_FLAGS="-mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU"
export TARGET_EXTRA_FLAGS="-Wno-psabi -Wa,-mno-warn-deprecated"
export TARGET_COPT="-Wall -pipe -fomit-frame-pointer -O3 -fexcess-precision=fast -ffast-math -fgnu89-inline"
export TARGET_LOPT="-s -Wl,--as-needed"
export CFLAGS="-march=$TARGET_SUBARCH -mcpu=$TARGET_CPU $TARGET_FPU_FLAGS -mabi=aapcs-linux $TARGET_COPT $TARGET_EXTRA_FLAGS"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-march=$TARGET_SUBARCH -mtune=$TARGET_CPU $TARGET_LOPT"
Code: Alles auswählen
sudo apt-get install dos2unix
Code: Alles auswählen
sudo dos2unix xbmcprepare.sh && sudo chmod +x xbmcprepare.sh
nun sind noch einige Modifikationen notwendig:
Code: Alles auswählen
sed -i 's/USE_BUILDROOT=1/USE_BUILDROOT=0/' tools/rbp/setup-sdk.sh
sed -i 's/TOOLCHAIN=\/usr\/local\/bcm-gcc/TOOLCHAIN=\/usr/' tools/rbp/setup-sdk.sh
sh tools/rbp/setup-sdk.sh
sed -i 's/cd $(SOURCE); $(CONFIGURE)/#cd $(SOURCE); $(CONFIGURE)/' tools/rbp/depends/xbmc/Makefile
Code: Alles auswählen
make -C tools/rbp/depends/xbmc/
Code: Alles auswählen
./configure --prefix=/usr --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf \
--localstatedir=/var/lib --with-platform=raspberry-pi --disable-gl --enable-gles \
--disable-x11 --disable-sdl --enable-ccache --enable-optimizations \
--enable-external-libraries --disable-goom --disable-hal --disable-pulse \
--disable-vaapi --disable-vdpau --disable-xrandr --disable-airplay \
--disable-alsa --enable-avahi --disable-libbluray --disable-dvdcss \
--disable-debug --disable-joystick --enable-mid --disable-nfs --disable-profiling \
--disable-projectm --enable-rsxs --enable-rtmp --disable-vaapi \
--disable-vdadecoder --disable-external-ffmpeg --disable-optical-drive
Code: Alles auswählen
sudo sed -i 's/-msse2//' lib/libsquish/Makefile
sudo sed -i 's/-DSQUISH_USE_SSE=2//' lib/libsquish/Makefile
sudo sed -i 's/#include "vchost_config.h"/#include "linux\/vchost_config.h"/' /usr/include/interface/vmcs_host/vcgencmd.h
sudo sed -i 's/ifeq (1,1)/ifeq (0,1)/' tools/TexturePacker/Makefile
Code: Alles auswählen
make
Nach dem dies Meldung erschienen ist, muss XBMC nur noch installiert werden-----------------------
XBMC built successfully
-----------------------
Code: Alles auswählen
make install
Code: Alles auswählen
/usr/local/lib/xbmc/xbmc.bin