Xbox Frontend Compile with SVN
- based on the email by AJM who noted down the steps he used
- original WIKI by Richard Dale Feb 2006
- 1 Xbox Frontend Compile with SVN HOWTO
- 1.1 Install Xebian 1.1.4
- 1.2 Xebian Stable - Run an update then an upgrade
- 1.3 Add experimental (etch) branch of Xebian to sources
- 1.4 Install dependencies for building MythTV
- 1.5 Install subversion and MythTV source code
- 1.6 Install distcc (optional, but recommend)
- 1.7 Compile MythTV
- 1.8 Compile MythTV Plugins
- 1.9 Install MythTV Themes
- 1.10 Configure MythTV
Xbox Frontend Compile with SVN HOWTO
This HOWTO assumes that you are using the Xebian 1.1.4 xbox edition.
Install Xebian 1.1.4
Use the Xebian Howto for details.
Approximate time needed for this step: 30 minutes
Xebian Stable - Run an update then an upgrade
Approximate time for this step: 15 minutes (requires around 90MB of downloads)
By default, Xebian 1.1.4 uses the stable respositories. Let's get all of the modules updated in the stable distribution then upgrade any stable modules too. To do this update then upgrade, Xebian looks at the file /etc/apt/sources.list then contacts the Internet to download the modules.
Xebian 1.1.4 is based upon Debian 3.1. Unfortunately Xebian didn't update the apt sources correctly to remove the Debian non-US sources which are now obsolete. Xebian appears to have the .AT (Austrian) mirrors preconfigured too.
You should be logged in as root.
If you are in the US, edit the file /etc/apt/sources.list so it looks like this:
deb http://http.us.debian.org/debian/ stable main contrib non-free deb-src http://http.us.debian.org/debian/ stable main contrib non-free deb http://security.debian.org/ stable/updates main contrib non-free deb-src http://security.debian.org/ stable/updates main contrib non-free
If you not in the US, it will be far quicker if you use a local mirror site. See the Debian Mirrors page.
For example, in Australia, I use:
deb http://ftp.ii.net/debian/debian/ stable main contrib non-free deb-src http://ftp.ii.net/debian/debian/ stable main contrib non-free deb http://ftp.ii.net/debian/debian-security/ stable/updates main contrib non-free deb-src http://ftp.ii.net/debian/debian-security/ stable/updates main contrib non-free
After modifying the sources, run:
During the upgrade, you will be asked whether you wish to Use the kernel framebuffer device interface for xserver-xfree86. Say Yes. Here's why: The Xebian 1.1.4 distribution had it enabled in the file /etc/X11/XF86Config-4, so we think you should too.
Add experimental (etch) branch of Xebian to sources
In this step we tell Xebian to use the experimental branch of Xebian for obtaining our prerequisite modules for MythTV. This experimental branch is required for us to compile MythTV SVN. We will also add the Marillat source, which is required for MythTV.
Edit /etc/apt/sources.list and add the following lines if you are a US user:
deb http://http.us.debian.org/debian/ testing main contrib non-free deb-src http://http.us.debian.org/debian/ testing main contrib non-free deb http://http.us.debian.org/debian/ sid main contrib non-free deb-src http://http.us.debian.org/debian/ sid main contrib non-free deb http://www.debian-multimedia.org/ sid main deb-src http://www.debian-multimedia.org/ sid main
If you're a non-US see the previous step for mirror sites. eg. For Australia, I used:
################# #Stable ################# deb http://mirror.pacific.net.au/debian/ stable main contrib non-free deb-src http://mirror.pacific.net.au/debian/ stable main contrib non-free ################# # Security ################# deb http://mirror.pacific.net.au/debian-security/ stable/updates main contrib non-free deb-src http://mirror.pacific.net.au/debian-security/ stable/updates main contrib non-free ################# # Etch ################# deb http://mirror.pacific.net.au/debian/ etch main contrib non-free deb-src http://mirror.pacific.net.au/debian/ etch main contrib non-free ################# # Marillat ################# deb http://www.debian-multimedia.org/ sarge main deb-src http://www.debian-multimedia.org/ sarge main deb http://www.debian-multimedia.org/ etch main deb-src http://www.debian-multimedia.org/ etch main
Run apt update to get the new package lists
Approximate time for this step: 5 minutes
Install dependencies for building MythTV
MythTV relies on a number of libraries (eg for displaying graphics images, decoding MP3 soundtracks etc.). We can run the following to get most of the dependencies:
apt-get install libdbd-mysql-perl libdbi-perl libmysqlclient12 libnet-daemon-perl libplrpc-perl mysql-client mysql-common pwgen ttf-freefont apt-get install qt3-dev-tools liblame-dev liblame0 liblircclient-dev alsa-oss libqt3-mt-dev libqt3-mt-dev gcc g++ libqt3-mt-mysql libqt3-i18n apt-get install subversion apt-get install distcc apt-get install libqt3-compat-headers apt-get install xmltv
When I was trying to figure out dependencies I also installed/upgraded the following. I'm not sure if all of them are required though.
apt-get install xlibs xlibs-data xfwp x-dev xvkbd apt-get install libxft-dev libxft1 libxft2 libxi-dev libxi6 libxmu-dev libxmu6 apt-get install libxaw7 libxext-dev libxext6 libxmuu1 libxp6 libxpm4 apt-get install libxrandr-dev libxrandr2 libxt-dev libxt6 libxtrap6 libxtst6 libxv-dev libxv1 apt-get install xaw3dg xfonts-100dpi xfonts-75dpi apt-get install xvfb xfs xlibmesa-dri libxxf86vm1 libxxf86vm-dev xfonts-scalable xfonts-base x-window-system apt-get install imlib1 libc6-dev libncurses5-dev libasound2-dev apt-get install libfreetype6 libfreetype6-dev libstdc++5 libstdc++5-3.3-dev apt-get install xlibmesa-gl xlibmesa-gl-dev libglib1.2
If, during this process, you are asked which X Server to use, then there's probably been too many packages upgrade. You should elect xfree86 NOT xserver-org, as xserver-org hasn't yet been released as a working package for use with the xbox (as at 7 March 2006 anyway).
Then reboot for good measure since many of the fundamental libraries have been upgraded.
shutdown -r now
At this time, it may be an opportune time to backup your Xbox Xebian file system so you don't need to go through the above steps and downloads in the event of something bad happening. If you used the GameSave partition in the Xebian installation, you can boot back to your dashboard (which hopefully has an FTP server) then transfer the rootfs file from E:\debian\ to somewhere else.
The following _might_ need to be run as well - not sure yet
apt-get install alsa-base alsa-utils alsa-oss udev
Approximate time for this step: 30 minutes (200+MB downloaded)
Install subversion and MythTV source code
Install subversion on the Xbox:
apt-get install subversion
Download MythTV source code SVN, plugins and themes /usr/src directory
cd /usr/src mkdir mythtv cd mythtv svn co http://svn.mythtv.org/svn/trunk/mythtv svn co http://svn.mythtv.org/svn/trunk/mythplugins svn co http://svn.mythtv.org/svn/trunk/myththemes
Install distcc (optional, but recommend)
The Xbox is underpowered and lacking RAM to do compiling. By using distcc we can use the resources of other Linux boxes on the network to compile MythTV.
Install distcc on your xbox by:
apt-get install distcc
You must start the distccd on the Xbox with:
distccd --daemon --allow 127.0.0.1
On each of your other Linux systems run the distcc server - note that this does not need to be run as root.
distccd --daemon --allow <insert xbox ip address>
On the Xbox that has the source code type
export DISTCC_HOSTS='localhost computer1 computer2'
Replace computer1, computer2, etc., with the names of the computers or IP's on your network running the distcc server (distccd).
For future reference when you want to use distcc just add -j 6 CXX=distcc onto the make statement parameters.
Note, if you start getting strange error messages, you should ensure that gcc is the same version on both systems. gcc v3.x and v4.x and not compatible with distcc. I had to upgrade to gcc v4.0.2 on both systems and the errors went away.
cd mythtv ./configure --prefix=/usr/local --disable-backend qmake mythtv.pro make qmake
If you are using distcc from the previous step. -j 4 is the number of simultaneous compilers to run. Running two per CPU in your distributed "cluster" seems to be the most efficient.
export DISTCC_HOSTS='localhost 192.168.88.201' make -j 4 CXX=distcc
otherwise use the following (and be prepared to wait quite a long time):
Once the compile is complete:
su make install
Since we have installed MythTV in various parts of /usr/local, we have to tell Xebian to look for shared libraries (such as libmyth) in this folder. Edit /etc/ld.so.conf and add the following line
Then run the command
Then let's logout of root for now too
Compile MythTV Plugins
cd ../mythtvplugins ./configure --disable-all --enable-(what applications you want on your front end) qmake mythplugins.pro make qmake
then run the following if you use distcc:
make -j 4 CXX=distcc
then to install
su make install
Install MythTV Themes
The themes are really just a file copy process.
Edit the file myththemes.pro and add the line to the TOP of the file:
qmake myththemes.pro su make install exit
Start the mythtv frontend
It should give you a stack of errors. After it does so, kill mythfrontend then edit the file /home/live/.mythtv/mysql.txt Change the line DBHostName= so it reflects the IP address of your back end... eg:
If you use digital sound, you need to go into the setup and change your sound device from /dev/dsp to ALSA:digital
If you use a recent SVN (approximately later than 1 March 2006), the Open GL Painter used for the menus doesn't work with the Xbox very well. When you start mythfrontend use the following command line instead:
mythfrontend -O UseOpenGLPainter=0