HOWTO: Minimal Debian Lenny + Dharma + Latest nVidia drivers + no window manager
#1
Lightbulb 
I'm posting this in the hope it may be useful to other Debian aficionados (or curious Ubuntu users who want to get closer to the action)....

[ Guide is based on the following hardware ]
  • Acer Aspire Revo R3600 nettop with 1GB RAM / 160GB HDD
  • Western Digital Elements 1TB USB2.0 Ext. HDD
  • Samsung SE-S084 Slim 8x DVD±RW DL RAM USB
My setup: Revo is connected to TV via HDMI, audio is analogue via 3.5mm jack (don't laugh!) and LAN connectivity is via an ethernet cable.

[ Objective ]
Turn the Revo in to a lean, dedicated xbmc and media streaming/storage box. The key goals are no bloat and no fluff - just a stripped down install of Debian Lenny with only the bare essentials necessary to get xbmc running (we're not even going to use a window manager). The advantage of this approach is that you end up with a very clean install of Debian and xbmc, making it easy to use the Revo for other hacking duties alongside running xbmc.


GUIDE STARTS HERE


1). Perform a minimal network install of Debian Lenny (remember to de-select both "Standard System" and "Desktop System" during the install wizard). Once Debian is installed, the base system should be using no more than 700MB or so of total disk space (well, we did say no fluff!).

[ for more info on performing a network install, see: http://www.debian.org/CD/netinst/ ]


2). Using the Revo provided keyboard, log in locally and:
  • install ssh
  • create some basic iptables rules
  • make any necessary changes to /etc/network/interfaces (e.g. give the Revo a static IP on your LAN and get 'pre-up' to call your iptables script).
  • make any necessary changes to /etc/resolv.conf
  • add contrib and non-free repositories to /etc/apt/sources.list


For the remaining part of the guide, we'll do everything remotely over ssh as root


3). Install the kernel headers, alsa sound drivers (we're shunning pulse audio - too bloated and not needed for analogue audio!) plus some useful helper programs:

Code:
# aptitude install linux-headers-2.6.26-2-686 pciutils xorg wget lsof iptraf htop nmap tcpdump linux-sound-base alsa-base alsa-utils psmisc


4). Configure the audio:

Code:
# alsamixer
# alsactl store 0


5). Install the latest nvidia binary drivers:

Code:
# cd /usr/src
# wget http://uk.download.nvidia.com/XFree86/Linux-x86/260.19.36/NVIDIA-Linux-x86-260.19.36.run
# export CC=/usr/bin/gcc-4.1
# sh NVIDIA-Linux-x86-260.19.36.run


6). Grab the libvdpau headers so that xbmc can offload video processing to the GPU and support full, stutter free 1080p playback (this is necessary because nvidia has stopped including vdpau header files with their latest binary drivers):

Code:
# cd /usr/src
# wget http://cgit.freedesktop.org/~aplattner/libvdpau/snapshot/libvdpau-0.4.1.tar.gz
# tar zxvf libvdpau-0.4.1.tar.gz
# cp libvdpau-0.4.1/include/vdpau/* /usr/include/vdpau/  [ done because on Debian Lenny, `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 cvs make g++ gcc autoconf gawk pmount libtool quilt python-support autotools-dev libgl1-mesa-dev libglew-dev libvorbisenc2 libmysqlclient-dev libcurl3 libcurl4-openssl-dev libavahi-common-dev libavahi-client-dev libavcodec-dev libavformat-dev libavutil-dev libpostproc-dev libswscale-dev libdts-dev libmpeg2-4-dev libflac-dev libwavpack-dev python-dev libcwiid1-dev libbluetooth-dev zlib1g-dev libtiff4-dev libmicrohttpd-dev libmodplug-dev nasm automake cmake gperf unzip bison libogg0 libflac8 libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libsdl-sound1.2-dev libsdl-stretch-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev libcurl4-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbis-dev libmysqlclient15-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate0-dev libmms-dev libxtst-dev zip libssl-dev libfaad-dev libsmbclient-dev libiso9660-dev


8). I hate using backports but we need one package from here to satisfy the xbmc build process:

Add "deb http://www.backports.org/debian lenny-backports main contrib non-free" (without the quotes) to /etc/apt/sources.list

and run:
Code:
# aptitude install debian-backports-keyring
# aptitude install libass-dev


9). Install the latest 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 Lenny, `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 ]


10). Compile and install Dharma stable:

Code:
# cd /usr/src
# wget http://mirrors.xbmc.org/releases/source/xbmc-10.0.tar.gz
# tar zxvf xbmc-10.0.tar.gz
# cd xbmc-10.0
# ./bootstrap
# ./configure --disable-pulse --enable-external-libass --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: No
prefix: /usr/local
------------------------

Then compile and install xbmc:

Code:
# make
# make install


11). Create an xbmc user (rather than running xbmc as root):

Code:
# groupadd xbmc
# useradd -d /home/xbmc -m -s /bin/bash -g xbmc,audio xbmc
# passwd xbmc


12). Log-in as the new xbmc user and configure xinitrc so that xbmc automatically starts as soon as you type "startx" (thus 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 Lenny install with only the absolute minimum software required to run XBMC. To start xbmc, login locally as the xbmc user and type "startx".
Reply


Messages In This Thread
[LINUX]HOWTO: Very minimal Debian 5.0 on AcerRevo w/ Dharma and latest nvidia drivers - by gpuk - 2011-01-30, 15:29
[No subject] - by gpuk - 2011-01-30, 15:44
[No subject] - by xbmcvis - 2011-02-03, 01:50
[No subject] - by nicx - 2011-02-26, 00:38
[No subject] - by bas.t - 2011-05-02, 21:18
[No subject] - by gpuk - 2011-08-02, 17:31
Logout Mark Read Team Forum Stats Members Help
HOWTO: Minimal Debian Lenny + Dharma + Latest nVidia drivers + no window manager0