2011-08-02, 17:13
I'm posting this in the hope it may be useful to other Debian fans....
Guide is based on the following HTPC setup:
The Objective:
Perform a very minimal Debian Squeeze install, with only the absolute bare essentials necessary to get xbmc up and running (we're not even going to need a window manager). This leaves the Revo in fine shape to perform other hacking duties alongside the HTPC stuff. For example, I also use mine as an ADSL router (with the aid of a Draytek Vigor 120 and TRENDnet TU2 ET100).
GUIDE STARTS HERE
1). Perform a minimal network install of Debian Squeeze:
For more info on performing a network install see http://www.debian.org/CD/netinst/ and http://unetbootin.sourceforge.net/ (if you want to install off a usb stick)
2). Using the Revo provided keyboard, log in locally as root and:
For the remaining part of the guide, we'll do everything remotely over ssh as root
3). Install kernel headers, dev tools, Xorg and some useful helper programs:
4). Install latest nvidia binary drivers:
5). Configure the audio:
We're going with ALSA as pulse audio is too bloated and not needed for analogue
6). Compile and install the latest stable version of rtmpdump:
7). Install the minimum third party libraries required to successfully compile xbmc:
8). Configure, compile and install Dharma stable:
You should get the following after configure has run:
------------------------
XBMC Configuration:
------------------------
Debugging: Yes
Profiling: No
Optimization: Yes
Crosscomp.: No
target ARCH: no
target CPU: no
OpenGL: Yes
VDPAU: Yes
VAAPI: No
CrystalHD: No
VDADecoder: No
OpenMax: No
Joystick: Yes
XRandR: Yes
GOOM: No
Bluray: No
MID Support: No
ccache: No
PulseAudio: No
HAL Support: Yes
FAAC: No
DVDCSS: Yes
Avahi: Yes
Non-free: Yes
ASAP Codec: No
Webserver: Yes
libRTMP support: Yes
Deprecated libdts: No
Deprecated liba52: No
External FFmpeg: No
External Python: Yes
prefix: /usr/local
------------------------
Then compile and install xbmc:
9). Create an xbmc user (rather than running xbmc as root):
10). Log-in as the new xbmc user and configure xinitrc so that xbmc automatically starts as soon as you type "startx" (negating the need for a window manager):
That's it! You now have a bare bones Debian Squeeze install with only the absolute minimum software required to run XBMC. To start xbmc, login locally as the xbmc user and type "startx".
Guide is based on the following HTPC setup:
- Acer Aspire Revo R3601 nettop with 1GB RAM / 160GB HDD
- Western Digital Elements 1TB USB2.0 Ext. HDD
- Samsung SE-S084 Slim 8x DVD±RW DL RAM USB
The Objective:
Perform a very minimal Debian Squeeze install, with only the absolute bare essentials necessary to get xbmc up and running (we're not even going to need a window manager). This leaves the Revo in fine shape to perform other hacking duties alongside the HTPC stuff. For example, I also use mine as an ADSL router (with the aid of a Draytek Vigor 120 and TRENDnet TU2 ET100).
GUIDE STARTS HERE
1). Perform a minimal network install of Debian Squeeze:
- choose linux-image-2.6-686 for the kernel
- when asked by the install wizard (tasksel) what software should be pre-installed, de-select EVERYTHING (including "Standard System Utilities"). Once installed, the base system should be using no more than 600MB or so of available disk space.
- make sure to include the contrib and non-free apt sources in /etc/apt/sources.list
- do not create a separate user in addition to the root account (we'll create an extra user account later in the guide)
For more info on performing a network install see http://www.debian.org/CD/netinst/ and http://unetbootin.sourceforge.net/ (if you want to install off a usb stick)
2). Using the Revo provided keyboard, log in locally as root and:
- make any necessary changes to /etc/network/interfaces (e.g. give the Revo a static IP on your LAN).
- create some basic iptables rules (if desired)
- make any necessary changes to /etc/resolv.conf
- check /etc/apt/sources.list is pointing to the right mirrors and has contrib and non-free sources
- install ssh
For the remaining part of the guide, we'll do everything remotely over ssh as root
3). Install kernel headers, dev tools, Xorg and some useful helper programs:
Code:
# aptitude update
# aptitude install linux-headers-2.6-686 sysstat lsof ntp cmake gcc g++ bison make libncurses5-dev sqlite3 pciutils psmisc iptraf tcpdump htop fakeroot python openssl libssl-dev patch menu file perl ca-certificates sudo whois locales netcat screen locate xorg
4). Install latest nvidia binary drivers:
Code:
# vi /etc/default/grub [ change GRUB_CMDLINE_LINUX_DEFAULT="quiet" to GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset" / this is done to disable the nouveau driver which conflicts with the nvidia binary driver ]
# update-grub
# shutdown -r now
# aptitude install module-assistant build-essential
# m-a update
# m-a prepare
# cd /usr/src
# wget http://uk.download.nvidia.com/XFree86/Linux-x86/275.21/NVIDIA-Linux-x86-275.21.run
# export CC=gcc-4.3
# sh NVIDIA-Linux-x86-275.21.run [ allow installer to update X config when prompted ]
# shutdown -r now
# aptitude install libvdpau1 libvdpau-dev [ IMPORTANT: you need these if you want XBMC to be able to make use of the GPU i.e. to get stutter free 1080p playback ]
5). Configure the audio:
We're going with ALSA as pulse audio is too bloated and not needed for analogue
Code:
# aptitude install linux-sound-base alsa-base alsa-utils
# alsactl init
# alsamixer [ set volume levels ]
# alsactl store 0
6). Compile and install the latest stable version of rtmpdump:
Code:
# cd /usr/src
# wget http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz
# tar zxvf rtmpdump-2.3.tgz
# cd rtmpdump-2.3
# make SYS=posix
# make install
# ln -s /usr/local/lib/librtmp.so /usr/lib/librtmp.so [ done because on Debian Squeeze, `cc -print-search-dirs` does not include the /usr/local/lib path by default which results in xbmc configure throwing an "Unable to determine soname of librtmp library" error ]
7). Install the minimum third party libraries required to successfully compile xbmc:
Code:
# aptitude install quilt python-support cmake autotools-dev autoconf automake zip unzip libboost-dev libgl1-mesa-dev libgl-dev libglu-dev libglew-dev libmad0-dev libjpeg-dev libsamplerate-dev libogg-dev libvorbis-dev libvorbisenc2 libfreetype6-dev libfontconfig-dev libbz2-dev libfribidi-dev libsqlite3-dev libmysqlclient-dev libasound-dev libpng-dev libpcre3-dev liblzo2-dev libcdio-dev libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libenca-dev libjasper-dev libxt-dev libxtst-dev libxmu-dev libxinerama-dev libcurl3 libcurl4-gnutls-dev libcurl-dev libdbus-1-dev libhal-storage-dev libhal-dev libpulse-dev libavahi-common-dev libavahi-client-dev libxrandr-dev libavfilter-dev libavdevice-dev libavcodec-dev libavformat-dev libavutil-dev libpostproc-dev libswscale-dev liba52-dev libdts-dev libfaad-dev libmpeg2-4-dev libass-dev libflac-dev libwavpack-dev python-dev gawk gperf nasm libcwiid1-dev libbluetooth-dev zlib1g-dev libmms-dev libsmbclient-dev libtiff4-dev libiso9660-dev libssl-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs libtool
8). Configure, compile and install Dharma stable:
Code:
# cd /usr/src
# wget http://mirrors.xbmc.org/releases/source/xbmc-10.1.tar.gz
# tar zxvf xbmc-10.1.tar.gz
# cd xbmc-10.1
# ./bootstrap
# ./configure --disable-pulse --enable-external-libass --enable-external-python --enable-rtmp --enable-vdpau
You should get the following after configure has run:
------------------------
XBMC Configuration:
------------------------
Debugging: Yes
Profiling: No
Optimization: Yes
Crosscomp.: No
target ARCH: no
target CPU: no
OpenGL: Yes
VDPAU: Yes
VAAPI: No
CrystalHD: No
VDADecoder: No
OpenMax: No
Joystick: Yes
XRandR: Yes
GOOM: No
Bluray: No
MID Support: No
ccache: No
PulseAudio: No
HAL Support: Yes
FAAC: No
DVDCSS: Yes
Avahi: Yes
Non-free: Yes
ASAP Codec: No
Webserver: Yes
libRTMP support: Yes
Deprecated libdts: No
Deprecated liba52: No
External FFmpeg: No
External Python: Yes
prefix: /usr/local
------------------------
Then compile and install xbmc:
Code:
# make
# make install
9). Create an xbmc user (rather than running xbmc as root):
Code:
# groupadd xbmc
# useradd -d /home/xbmc -m -s /bin/bash -g xbmc -G audio xbmc
# passwd xbmc
10). Log-in as the new xbmc user and configure xinitrc so that xbmc automatically starts as soon as you type "startx" (negating the need for a window manager):
Code:
# echo "exec /usr/local/bin/xbmc" > ~/.xinitrc
That's it! You now have a bare bones Debian Squeeze install with only the absolute minimum software required to run XBMC. To start xbmc, login locally as the xbmc user and type "startx".