Xbox Frontend Compile with SVN xUbuntu

From MythTV Official Wiki
Revision as of 01:13, 2 May 2010 by Wagnerrp (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Time.png Outdated: The Xbox has too little memory to be recommended or supported as a frontend.

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.png 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. I followed with an

apt-get remove gcc-4.0-base 

and everything went to hell again.

Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  libcurl3 libidn11 libtasn1-2 openoffice.org-debian-files sgml-base ttf-opensymbol xml-core
Suggested packages:
  libcurl3-gssapi ca-certificates libldap2-dev sgml-base-doc debhelper
The following packages will be REMOVED:
  abiword-common abiword-gnome apt apt-utils aptitude aspell aspell-en base-config cpp cpp-4.0 dselect firefox firestarter freeglut3 gaim
  gcc-4.0-base gconf2 gdm gksu gnome-media gnome-volume-manager gnumeric gnumeric-common gparted groff-base gstreamer0.8-misc
  gstreamer0.8-vorbis idesk language-support-en libaspell15 libbonobo2-0 libbonobo2-common libbonoboui2-0 libenchant1c2 libgc1c2
  libgconf2-4 libgksu1.2-0 libgksuui1.0-0 libgl1-mesa libgl1-mesa-dri libglibmm-2.4-1c2a libglu1-mesa libglut3 libgnome2-0
  libgnome2-common libgnomeui-0 libgnomevfs2-0 libgnomevfs2-common libgoffice-1 libgsf-1 libgsf-gnome-1 libgstreamer-gconf0.8-0
  libgtkmm-2.4-1c2a libgtkspell0 libgucharmap4 libidl0 libmodplug0c2 libmyspell3c2 liborbit2 librsvg2-2 librsvg2-common libsigc++-2.0-0c2a
  libstdc++6 libxine1c2 lshw man-db mesa-utils mozilla-firefox-locale-en-gb openoffice.org2-l10n-en-us python2.4-pyorbit telnet
  ubuntu-minimal ubuntu-standard w3m x-window-system-core xbase-clients xdriinfo xfmedia
The following NEW packages will be installed:
  libcurl3 libidn11 openoffice.org-debian-files sgml-base ttf-opensymbol xml-core
The following packages will be upgraded:
  libtasn1-2
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt libstdc++6 (due to apt)
1 upgraded, 6 newly installed, 78 to remove and 146 not upgraded.
Need to get 572kB of archives.
After unpacking 212MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'

 

I'm trying to

apt-get upgrade gcc-4.0-base 

It returned a long list as above. This time I can see the x-server packages are going to upgrade. I guess that's okay. When I did this with Xebian it was a problem because it was going to install xorg and remove xserver (or whatever). Here I don't think its a problem because we are only upgrading.

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.