Difference between revisions of "Xbox Frontend Compile with SVN"

From MythTV Official Wiki
Jump to: navigation, search
(Upgrade to the experimental (etch) branch of Xebian)
 
(27 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
{{outdated}}
 +
 
'''Credits'''
 
'''Credits'''
  
Line 4: Line 6:
 
* original WIKI by [[User:Richard Dale|Richard Dale]] Feb 2006
 
* original WIKI by [[User:Richard Dale|Richard Dale]] Feb 2006
  
= WARNING: This is not working yet =
 
 
After installing the dependencies for building MythTV (apt-get build-dep mythtv) and performing a reboot, X Windows no longer works.  The following error message appears on screen (this is quite normal in Xebian) :
 
Linux agpgart interface v0.99 (c) Jeff Hartmann
 
agpgart: Maximum main memory to use for agp memory: 25M
 
agpgart: Unsupported NVIDIA chipset (device id: 02a5), you might want to try agp_try_unsupported=1.
 
but X Windows does not start - it keeps looping and you see this error message every second or so.
 
 
'''If you know how to get X Windows to work beyond this point update this HOWTO and remove this section.'''
 
 
'''Update 20060222:  Try using xfree86 not xserver-org during the installation of the myth dependencies - this is yet to be confirmed'''
 
 
Until this problem pesolved, the steps below '''WILL NOT WORK'''
 
  
'''Update 20060304: Marillat problems.  All we needed to do was use FTP not HTTP to access the Marillat server.  However the build-dep mythtv packages are no longer there - we're working on the dependencies now'''
 
----
 
  
 
= Xbox Frontend Compile with SVN HOWTO =
 
= Xbox Frontend Compile with SVN HOWTO =
Line 30: Line 17:
  
 
Approximate time needed for this step: 30 minutes
 
Approximate time needed for this step: 30 minutes
 +
 +
For faster compilation, try installing Xebian on a standard PC or VM environment such as vmware or qemu.  Most of the instructions below still applies.  After compiling the packages, just install them on the real xbox machines.
 +
 +
==Setup a Xebian VMWare environment for compilation==
 +
This is optional, if you want to compile debian packages on another computer under vmware runnning xebian.  See notes here [[http://www.xbox-linux.org/wiki/Vmware]]
  
 
==Xebian Stable - Run an update then an upgrade==
 
==Xebian Stable - Run an update then an upgrade==
  
 
''Approximate time for this step: 15 minutes (requires around 90MB of downloads)''
 
''Approximate time for this step: 15 minutes (requires around 90MB of downloads)''
 +
 +
''NOTE: stable now points to etch, so if you still want to use sarge, change stable to sarge.''
  
 
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.
 
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.
Line 61: Line 55:
  
 
After modifying the sources, run:
 
After modifying the sources, run:
 +
<pre>
 
  apt-get update
 
  apt-get update
 
+
</pre>
 
then
 
then
 +
<pre>
 
  apt-get upgrade
 
  apt-get upgrade
 +
</pre>
 
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.
 
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.
  
==Upgrade to the experimental (etch) branch of Xebian==
+
==Add experimental (etch) branch of Xebian to sources==
  
In this step we upgrade Xebian to experimental branch of Xebian.  This experimental branch is required for us to compile MythTV SVN.  We will also add the Marillat source, which is required for MythTV.
+
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:
 
Edit /etc/apt/sources.list and add the following lines if you are a US user:
 
<pre>
 
<pre>
  deb http://http.us.debian.org/debian testing main contrib non-free
+
  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-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     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-src http://http.us.debian.org/debian/ sid main contrib non-free
  
  deb ftp://ftp.nerim.net/debian-marillat/ sid main
+
  deb     http://www.debian-multimedia.org/ sid main
  deb-src ftp://ftp.nerim.net/debian-marillat/ sid main
+
  deb-src http://www.debian-multimedia.org/ sid main
 
</pre>
 
</pre>
  
Line 87: Line 84:
 
  #Stable
 
  #Stable
 
  #################
 
  #################
  deb http://mirror.pacific.net.au/debian/ stable main contrib non-free
+
  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
 
  deb-src http://mirror.pacific.net.au/debian/ stable main contrib non-free
 
  #################
 
  #################
Line 97: Line 94:
 
  # Etch
 
  # Etch
 
  #################
 
  #################
  deb http://mirror.pacific.net.au/debian/ etch main contrib non-free
+
  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
 
  deb-src http://mirror.pacific.net.au/debian/ etch main contrib non-free
 
  #################
 
  #################
 
  # Marillat
 
  # Marillat
 
  #################
 
  #################
  deb ftp://ftp.nerim.net/debian-marillat/ sarge main
+
  deb     http://www.debian-multimedia.org/ sarge main
  deb-src ftp://ftp.nerim.net/debian-marillat/ sarge main
+
  deb-src http://www.debian-multimedia.org/ sarge main
  deb ftp://ftp.nerim.net/debian-marillat/ etch main
+
  deb     http://www.debian-multimedia.org/ etch main
  deb-src ftp://ftp.nerim.net/debian-marillat/ etch main
+
  deb-src http://www.debian-multimedia.org/ etch main
 +
</pre>
 +
 
 +
Run apt update to get the new package lists
 +
<pre>
 +
apt-get update
 
</pre>
 
</pre>
  
 
Approximate time for this step: 5 minutes
 
Approximate time for this step: 5 minutes
 +
 +
[[Image:Important.png]] '''Note:''' If you receive an error such as "E: Dynamic MMap ran out of room", try creating the file /etc/apt/apt.conf.d/00Cache with the following contents:
 +
<pre>
 +
APT::Default-Release "stable";
 +
APT::Cache-Limit "141943904";
 +
</pre>
 +
Then execute an apt-get clean and apt-get update.
  
 
==Install dependencies for building MythTV==
 
==Install dependencies for building MythTV==
Line 119: Line 128:
 
  apt-get install xmltv  
 
  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.
+
If, during this process, you are asked which X Server to use, then there's probably been too many packages upgradeYou 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).
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
 
 
 
During this process you will be asked which X server to use.  Make sure you select xfree86 '''NOT xserver-org'''
 
  
 
Then reboot for good measure since many of the fundamental libraries have been upgraded.
 
Then reboot for good measure since many of the fundamental libraries have been upgraded.
Line 138: Line 137:
 
The following _might_ need to be run as well - not sure yet
 
The following _might_ need to be run as well - not sure yet
 
  apt-get install alsa-base alsa-utils alsa-oss udev  
 
  apt-get install alsa-base alsa-utils alsa-oss udev  
Approximate time for this step: 30 minutes (100MB downloaded)
+
Approximate time for this step: 30 minutes (200+MB downloaded)
  
 
==Install subversion and MythTV source code==
 
==Install subversion and MythTV source code==
Line 179: Line 178:
 
==Compile MythTV==
 
==Compile MythTV==
 
  cd mythtv
 
  cd mythtv
  ./configure --prefix=/usr/local  
+
  ./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.
 
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.
Line 189: Line 186:
 
  make
 
  make
  
 +
Once the compile is complete:
 +
sudo make install (or 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
 +
/usr/local/lib
 +
Then run the command
 +
ldconfig
  
TODO: Myth Plugins
+
Then let's logout of root for now too
 +
exit
  
TODO: Digital sound out
+
==Compile MythTV Plugins==
 +
cd ../mythtvplugins
 +
./configure --disable-all --enable-(what applications you want on your front end)
  
==Install MythTV==
+
then run the following if you use distcc:
 +
make -j 4 CXX=distcc
 +
otherwise just:
 +
make
  
 +
then to install
 +
su
 
  make install
 
  make install
  
 +
==Install MythTV Themes==
 +
 +
The themes are really just a file copy process.
 +
 +
cd ../myththemes
 +
 +
Edit the file myththemes.pro and add the line to the TOP of the file:
 +
PREFIX=/usr/local
 +
 +
./configure
 +
su
 +
make install
 +
exit
 +
 +
==Configure MythTV==
 +
Start  the mythtv frontend
 +
$ mythfrontend
 +
 +
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:
 +
DBHostName=192.168.88.201
 +
 +
If you use digital sound, you need to go into the setup and change your sound device from /dev/dsp to ALSA:digital
  
[[Category:HOWTO]]
+
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
 +
[[Category:Distribution_Specific_Install_Guides]]

Latest revision as of 16:33, 29 November 2009

Time.png Outdated: The information on this page may no longer be relevant to the current release of MythTV, 34.0. Please consider helping to update it. This page was last modified on 2009-11-29.

Credits

  • based on the email by AJM who noted down the steps he used
  • original WIKI by Richard Dale Feb 2006


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

For faster compilation, try installing Xebian on a standard PC or VM environment such as vmware or qemu. Most of the instructions below still applies. After compiling the packages, just install them on the real xbox machines.

Setup a Xebian VMWare environment for compilation

This is optional, if you want to compile debian packages on another computer under vmware runnning xebian. See notes here [[1]]

Xebian Stable - Run an update then an upgrade

Approximate time for this step: 15 minutes (requires around 90MB of downloads)

NOTE: stable now points to etch, so if you still want to use sarge, change stable to sarge.

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:

 apt-get update

then

 apt-get upgrade

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

apt-get update

Approximate time for this step: 5 minutes

Important.png Note: If you receive an error such as "E: Dynamic MMap ran out of room", try creating the file /etc/apt/apt.conf.d/00Cache with the following contents:

APT::Default-Release "stable";
APT::Cache-Limit "141943904";

Then execute an apt-get clean and apt-get update.

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 

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

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.

Compile MythTV

cd mythtv
./configure --prefix=/usr/local --disable-backend

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):

make

Once the compile is complete:

sudo make install (or 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

/usr/local/lib

Then run the command

ldconfig

Then let's logout of root for now too

exit

Compile MythTV Plugins

cd ../mythtvplugins
./configure --disable-all --enable-(what applications you want on your front end)

then run the following if you use distcc:

make -j 4 CXX=distcc 

otherwise just:

make

then to install

su
make install

Install MythTV Themes

The themes are really just a file copy process.

cd ../myththemes

Edit the file myththemes.pro and add the line to the TOP of the file:

PREFIX=/usr/local
./configure
su
make install
exit

Configure MythTV

Start the mythtv frontend

$ mythfrontend

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:

DBHostName=192.168.88.201

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