Xbox Frontend Compile with SVN xUbuntu

From MythTV Official Wiki
Revision as of 03:13, 15 August 2006 by FishFoot (talk | contribs) (Getting the latest source)

Jump to: navigation, search

Overview

I am currently attempting to setup a linux based MythTV Frontend running on an XBOX. Much work has been done in this direction but unfortunately none of it seems to suit my situation. My setup is as follows:

Hardware

  • Ubuntu Dapper 6.06 MythTV Backend/Frontend running on a Dell Dimension 3100.
    • 2.8G P4
    • 1gb Ram (maybe 512 I have to check)
    • Hauppage PVR 150
    • 300gb Serial ATA HDD running XFS dedicated to TV storage
  • 2 Xboxes on the local network
    • Box 1 is in my bedroom and can predominantly run Linux MythTV
    • Box 2 is in my living room and must alternate functionality between Xbox Games and MythTV.
      • xbmcMythTV will function for quick use of MythTV, I'd like to have Linux MythTV on there as well for hardcore times (read: company)
  • 1-2 Xboxes in Arizona (I'm in New Jersey) running Linux MythTV as clients of my server. I'm curious the kind of performance they'll get.

Software

Because I am running Dapper I followed this fantastic MythTV Installation Guide to get everything up and running on my Dapper box. In the process I built the latest (or at the time the latest) version which I grabbed from SVN. This was version .19.2

I've been running the 2 local Xboxes with XBMC and xbmcMythTV. I needed to get the latest xbmcMythTV from SVN and install that on my xbox, but to get that to work I had to upgrade to a more recent release of XBMC.

I had installed Xebian 1.1.4 on one of the xboxes which comes with a pre built MythTV. Unfortunately it doesn't speak the same protocol version (currently 30) that my backend does. I figured I could just build the latest version but I ran into problems following the instructions in the wiki: Xbox Frontend Compile with SVN. When I tried to upgrade the listed packages apt wanted to remove my xserver, as soon as that happend everthing fell to pieces and I was forced to give up that route.


Solution

I followed a guide on building MythTV on Ubuntu 5.10 and I was able to apply that to Dapper without much trouble, so I figured I'd try to find an Ubuntu for the XBOX, enter xUbuntu, an xbox based Ubuntu 5.10 distribution. Oh Joy!

The Process

Installation

This was easy enough, I booted from the live CD, logged in to the "live" account, opened a terminal and ran xUbuntuInstall. An X based installer launched and I followed the prompts to get everything installed. In this case I chose to install to the "E, Gamesave" partition. I want to be able to get xUbuntu installed and then just make a DVD that I can copy onto each machine I want to install this to. In order to do this I need xUbuntu to install into a rootfs file that I can copy to my PC.

WARNING: xUbuntu is slow and the installer takes a while to run. After a while the system will announce it is finished and you can reboot it.

Personally I boot back into a dashboard (I find this good practice when I'm installing software or alternate dashboards). While in my primary dashboard I went to my E drive and I saw the following files had been added:

e:/xUbuntu/rootfs
e:/xUbuntu/
e:/default.xbe
e:/
e:/
e:/
e:/

These will eventually be the files I FTP back to my PC and burn to DVD.

I ran the

e:/default.xbe

and sure enough the system booted into xUbuntu.

Networking

Even though I told the installer what I wanted my network to be it decided not to listen. As a result I had to launch a terminal and

sudo nano /etc/network/interfaces

and change it around to read

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo eth0
iface lo inet loopback
# list of hotpluggable network interfaces
# automatic activated by hotplugging system
mapping hotplug
        script grep
        map eth0
iface eth0 inet dhcp

Then I ran

sudo ifdown eth0
sudo ifup eth0

and viola, networking.

Upgrade the system

Now that networking is in place we can upgrade the system. To do this I uncommented all the deb lines found in /etc/apt/sources.list by running

sudo nano /etc/apt/sources.list

and making the file read:

# Uncomment the following two lines to fetch updated software from the network
 deb http://de.archive.ubuntu.com/ubuntu breezy main restricted
 deb-src http://de.archive.ubuntu.com/ubuntu breezy main restricted

# Uncomment the following two lines to fetch major bug fix updates produced
# after the final release of the distribution.
 deb http://de.archive.ubuntu.com/ubuntu breezy-updates main restricted
 deb-src http://de.archive.ubuntu.com/ubuntu breezy-updates main restricted

# Uncomment the following two lines to add software from the 'universe'
# repository.
# N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
# team, and may not be under a free licence. Please satisfy yourself as to
# your rights to use the software. Also, please note that software in
# universe WILL NOT receive any review or updates from the Ubuntu security
# team.
 deb http://de.archive.ubuntu.com/ubuntu breezy universe multiverse
 deb-src http://de.archive.ubuntu.com/ubuntu breezy universe multiverse

# Uncomment the following two lines to add software from the 'backports'
# repository.
# N.B. software from this repository may not have been tested as
# extensively as that contained in the main release, although it includes
# newer versions of some applications which may provide useful features.
# Also, please note that software in backports WILL NOT receive any review
# or updates from the Ubuntu security team.
 deb http://de.archive.ubuntu.com/ubuntu breezy-backports main restricted universe multiverse
 deb-src http://de.archive.ubuntu.com/ubuntu breezy-backports main restricted universe multiverse

 deb http://security.ubuntu.com/ubuntu breezy-security main restricted
 deb-src http://security.ubuntu.com/ubuntu breezy-security main restricted

 deb http://security.ubuntu.com/ubuntu breezy-security universe
 deb-src http://security.ubuntu.com/ubuntu breezy-security universe

As instructed by section 2 of the Ubuntu 5.10 Myth Guide I added the multiverse line to the universe repositories.

Next I ran

sudo apt-get update
sudo apt-get upgrade

and said Y to whatever came next

Also as suggested in section 2 of the Ubuntu 5.10 Myth Guide

apt-get install build-essential dialog apache2 mysql-server phpmyadmin gcc-3.4 
apt-get install libapache2-mod-auth-mysql
apt-get install dvdauthor mplayer-586
apt-get install ntp ntp-simple

 During this installation, I just selected "No configuration" when questions about postfix popped up.

He suggests installing the following and so I listened

apt-get install gsfonts-x11 msttcorefonts
apt-get install tcsh
fc-cache -f -v

Setup the build environment

I tried to check the version of gcc

gcc --version

but no gcc could be found. I tried to install gcc and got an error that the package wouldn't be installed[1] This error sucks. Fortunately I tried an

apt-get remove gcc-4.4

and it worked. Unfortunately that doesn't seem to fix the problem.


Getting the latest source

Since we're doing an SVN build we're going to need to get the latest from SVN. Instructions to do that are based on work done in the guide [Xbox Frontend Compile with SVN], what follows is copied directly from Xbox Frontend Compile with SVN. I'm including the information on distCC. I tried a build without it while following the Xbox Frontend Compile with SVN guide. It took well over 3 hours to build, at that point I went to bed. When I woke it had finished running but failed building... all that waiting for nothing.

begin quote


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

Install distcc on each of your other Linux systems. The binaries are small and can be downloaded from here. I had success with the Red Hat/Fedora DistCC RPMS

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.