Initial Setup
The purpose of this wiki is to describe the steps needed for having a working development environment that generates applications for the QBoxHD.
The QBoxHD has a ST40 processor from ST that belongs to the SH4 architecture family. The specific processor model is a STi7101 processor. The QBoxHD board (including the processor) is based on a reference board from ST called MB442 cut 3.
In order to compile an application that can be executed in the QBoxHD you need to install the STLinux distribution and development environment that provides everything required to build, not only an application, but a complete Linux based system.
Download
Download an ISO image of the STLinux 2.3 development environment from the STLinux FTP site
Warning 1: For installing the STLinux environment in a DPKG-based Linux distribution such as Debian or Ubuntu follow this link.
Warning 2: The install script needs Python 2.5. If you don't have it in your Linux host, follow this link.
Installation and update
Mount the image and install it:
$ mkdir -p /mnt/st $ mount -t iso9660 -o loop STLinux-2.3-sh4-03-11-07.iso /mnt/st $ cd /mnt/st $ ./install all-sh4-glibc
Update the STLinux23 environment:
Add /opt/STM/STLinux-2.3/host/bin to your PATH environment variable.
Use stmyum to update the STLinux23 distribution.
Note: Due to possible download errors, this command will require to be repeated until “No Packages marked for Update/Obsoletion” is displayed.
$ export PATH=$PATH:/opt/STM/STLinux-2.3/host/bin $ stmyum update
After the installation and update procedure, you will find the whole environment inside /opt/STM/STLinux-2.3: toolchain, root filesystem, utils...
Keep in mind that all the software installed is generic for the SH4 architecture, not QBoxHD specific.
Some of the most relevant directories are mentioned below:
- /opt/STM/STLinux-2.3/devkit/sh4/bin
Cross-toolchain (compiler, linker...). You can add this path to your PATH environment or directly in .bashrc
- /opt/STM/STLinux-2.3/devkit/sh4/target
The root filesystem that can be mounted via NFS for testing . Notice that this is not the QBoxHD filesystem.
- /opt/STM/STLinux-2.3/host/bin
Several utilities such as mkimage used for creating U-Boot images.
- /opt/STM/STLinux-2.3/devkit/sources/kernel
The source code of the kernel. After a fresh install it will not contain the sources for the QBoxHD.
At this point you can start developing for any ST40 processor, not only the QBoxHD.
But may be you're interested in compiling enigma2
