Setting up an AZBox cross-compiling environment (i.e. toolchain for the MIPS Sigma processor)

Recently, I was playing with my new AZBox, a Linux-powered DVB-S receiver. It is a MIPS platform with a Sigma processor. AZBox's official site provides SDK and here for programming together with a simple example plugin. Since setting up the compiling environment on my Ubuntu 9.04 was not so straightforward, I have written this post. So, the goal is to compile, install and run the provided example plugin on the AZBox. (This HOWTO is based on Geordy's blog post and Jorgen's comments. Thanks!)

1. Make sure you have installed all important pre-requisites:
sudo apt-get install flex genromfs bison libncurses5-dev ncurses-base gcc-3.4
2. Download and extract official toolchain of Sigma:
      tar -xjsf smp86xx_toolchain.20080505.tar.bz2
3. Download and extract AZBox-SDK:
      tar -xzf Plugins-SDK.tgz
4. Continue with preparing the toolchain:
cd smp86xx_toolchain.20080505
      export CC=gcc-3.4
      make menuconfig
You don't need to change anything in the configuration, just select "exit".

5. Next, start the toolchain compilation. It will last for some time and some stuff will be automatically downloaded from the Internet:
If everything went right, you are now prepared to compile for your AZBox.

6. Load environment variables needed for cross-compilations:
source toolchain-path.env
7. Now move to the directory of the AZBox's sample plugin, "mwkeytest":
cd ../azbox-sdk/ExternTarget/samples
8. Compile the sample plugin:
make install
9. Two files, mwkeytest.plugin and plugins.lst would be created. Copy them via FTP to your AZBox's /tmp directory.

10. Take AZBox's remote control, go to the Plugins menu and select installation of the new plugin "mwkeytest" from /tmp.

11. Now run your new plugin "mwkeytest"! It is a simple application that displays key-press events that it receives.

Enjoy! ;)

Thanks Beerda