Installing STLinux2.3 in Ubuntu 9.04

The installation of STLinux in a Debian-based distribution doesn’t seem to be straight-forward because STLinux uses RPM as package manager whereas Ubuntu uses Debian’s DPKG. These package managers are completely different and incompatible, but you can have both installed on the same host and therefore STLinux installed on Ubuntu.

For installing SLinux2.3 you’ll have to install the RPM package manager.
DPKG is already installed in your host and you’ll use it for installing the RPM package manager.

Install the RPM package manager and the python-rpm package because the installation procedure uses Python.

$ apt-get install rpm python-rpm

Populate the RPM database since it’s empty using the package stlinux23-host-STLinux_deps-0.1-4.i386.rpm

$ rpm -ivh stlinux23-host-STLinux_deps-0.1-4.i386.rpm

The STLinux installation procedure uses Python 2.5, but Ubuntu 9.04 uses Python2.6 that introduces the new reserved keyword ‘with’. Unfortunately, the install script uses ‘with’ as variable, not as reserved keyword, so it gives the following error when executing it:

  File "/opt/STM/STLinux-2.3/host/usr/lib/python2.3/site-packages/yum/__init__.py", line 399 
    self.repos.populateSack(with='filelists')
                               ^   
SyntaxError: invalid syntax

In order to avoid this problem, you can temporary set the symbolic link /usr/bin/python to /usr/bin/python2.5:

$ cd /usr/bin
$ mv /usr/bin/python /usr/bin/python_orig
$ ln -s python2.5 python

Older Ubuntu versions: Older versions of Ubuntu that use python2.5 won’t have this problem, but could have a problem with bash that is required by the installation procedure, too. If this is the case, you can install it and create a symbolic link in an analog way.

Now everything is ready for installing STLinux2.3.
Assuming that you already downloaded and mounted an ISO image of STLinux, change to the directory where the image is mounted and run the install script:

$ ./install all-sh4-glibc
or
$ ./install all-sh4_uclibc

After installation you probably want to upgrade to the latest packages available from ST. You can run stmyum update several times until it responds that there are no more packages marked for upgrade.

$ /opt/STM/STLinux-2.3/host/bin/stmyum update

At this point you can set the /usr/bin/python symbolic link to it’s original value

$ cd /usr/bin
$ rm /usr/bin/python
$ mv python_old python

As a final and optional step, you can add the cross-toolchain to your path and add it to your .bashrc script:

$ export PATH=$PATH:/opt/STM/STLinux-2.3/devkit/sh4/bin

References:
Installation and Getting Started
Installing STLinux on Ubuntu

TdT commits their latest enigma2 patch for the sh4 arch

Team DuckTales has good news again!

They have just sent a patch to the enigma2-devel mailing list that includes the complete change-diff of the enigma2 port for the sh4-based boxes.

Some of the most relevant parts are:

  • Implementation of servicemp3.cpp using their eplayer2 instead of gstreamer
  • tuxtext port for the stmfb framebuffer
  • CAM handling
  • Two python plugins (vfd display support and a videomode plugin port)

As always, their code is quite clean with #if defined(__sh__).

Here’s the link to the email:
https://lists.elitedvb.net/pipermail/enigma2-devel/2009-June/000833.html

Thanks!

Enigma2 and kernel sources for the sh4 based QBoxHD released

I’m quite happy to announce that the QBoxHD team has released after several months of development the enigma2 source code.
The sources were heavily modified for this hardware and it’s not yet finished, but it seems to be stable.
There are several ugly/dirty hacks that will be polished over time.

The enigma2 SVN repo is here:

$ svn checkout https://www.qboxsvn.com/e2-0.2/e2-0.2/trunk  enigma2

Along with the enigma2 sources, you’ll find the kernel sources too.
The kernel SVN repo is here:

$ svn checkout https://www.qboxsvn.com/linux-sh4-2.6.23.16/linux-sh4-2.6.23.16/trunk kernel_qboxhd

The kernel with SVN? Bad… But since there were very few modifications and there was already a SVN repo it was easy to put it there.

The wiki/trac link at the moment are read only to the public, so everyone can check what’s going on with the project:
http://www.qboxsvn.com/projects/qboxhd

As with most of this kind of devices, (sadly) the drivers will remain closed.
This means that this enigma2 source code is tied to this box since it has a lot of modifications that are platform specific. However, it wouldn’t be difficult to port it to another sh4 based box.