Open Turbostation:Software

Custom Software Packages for the QNAP Turbostation Family
This page will serve as a placeholder for user developed custom packages for the QNAP Turbostation family. Feel free to add your own solutions: but make the effort to validate them first!

GPL Firmware Downloads
QNAP currently provide GPL packages for the systems indicated below. Old versions do not seem to be listed. Note: Internet Explorer has problems downloading .tar.gz files (you will need to rename the downloaded file to replace the lost 'gz' suffix); ideally use Firefox, Opera or similar.

Missing Files
Unfortunately QNAP have been a bit selective about what to include in their GPL. Most things are there but the following appear to be absent:


 * qraid1 kernel module and associated daemon
 * /dev/pic device driver and associated daemon
 * MTD physmap partitioning (easily reverse engineered from console boot output)
 * U-Boot source (although this has been provided on request).

At this time it is not clear if this is deliberate or just a case of poor organisation. We can only hope that their customer support people will eventually respond.

Overview
The firmware for the TS-101 (and its cousin, the TS-201) is based on uClibc (http://uclibc.org/) and BusyBox (http://busybox.net/). There are pre-built PowerPC rootfs available for download from the uClibc site that contains a number of ready-to-run utilities not included in the TS-101 firmware; including gcc and dropbear ssh.

However if you wish to roll your own and want to make sure you are using matching versions of the kernel headers and gcc, instructions for creating your own cross-toolchain are provided below.

Creating a Cross Compiler
A cross compiler is generally necessary to produce code to run on the PowerPC603 core. Linux users can generally follow the instructions below. Windows users should install [www.cygwin.com Cygwin] which provides simple Linux commands on a Windows platform.

Windows installation of Cygwin
Windows users can download Cygwin and execute the Setup.exe file. This brings up a Windows programme which requires further network access to install the necessary components.

Generally it is safer and quicker to install from Internet, the default option. Choose a suitable installation directory (e.g. c:\cygwin), and package directory (where the downloaded packages are stored). After choosing your connection method, you can select your favorite download site.



It is necessary to install the packages listed below. The best way to find them is to click the 'View' button until it displays 'All' or 'Full'. You can also drag the edge of the dialog box to display more information.

To install the package, select the corresponding 'Skip' item, it should toggle to the default version. Other dependancy packages will also be auto-selected. Multiple clicks will toggle the versions or return the package to 'skip'.


 * automake
 * bison
 * flex
 * gcc
 * gettext-devel
 * libncurses-devel
 * make
 * patchutils
 * subversion
 * wget

Once fully installed, you can start cygwin from the c:\cygwin\cygwin.bat file. You can specify your username and start directory by creating a windows environment variable called HOME, and setting it to c:\cygwin\home\ . This can be done entering Control Panel-> System -> Advanced -> Environment Variables, and selecting 'New'.

You should also check your $PATH environment variable doesn't have any weird and wonderful entries, especially directories with spaces! Since Cygwin generally parses your Windows PATH variable it is useful to 'overwrite' it. This can be done in the ${HOME}/.bash_rc file. After the #Set PATH..... #fi comments you can add a line like...
 * PATH=/usr/local/bin:/usr/bin:/bin


 * Linux users should have these packages already, if not they need to be installed!

Download Buildroot Snapshot
Download the latest Buildroot snapshot from here and untar it to wherever you wish to build your cross toolchain.
 * tar -xvjf buildroot-snapshot.tar.bz2


 * Cygwin users: Use the cygwin-tar!!! Although packages like Winzip, Winrar and 7Zip may be able to unpack the tarball; they do not correctly deal with symbolic links, and this could generate later errors!

Alternatively you can use subversion to do this for you...
 * svn co svn://uclibc.org/trunk/buildroot


 * Note this will install into your current directory.

Run make menuconfig
Cd into the buildroot directory and run 'make menuconfig' to choose what to build.


 * Target Architecture - choose powerpc
 * Build Options - defaults are fine. [Option : change GNU Target Suffix to linux]
 * Toolchain options - select the 2.6.12 kernel headers and gcc 3.4.3
 * Package Selection - uncheck Busybox
 * Target options - defaults
 * Board Support - defaults

Then exit and when prompted save your configuration.

Run make
Then just run 'make' to build the toolchain. You will be prompted for some answers to questions - select the default (i.e. press enter). If you are doing the compilation under Cygwin you may have a bit of a wait (1 to 7 hours) - it depends upon configuration, antivirus activity etc. However under native Linux it doesn't take that long.

There may be a couple of errors. Firstly - in compiling bin-utils link.h is not found. For some reason it is not correctly linked in during compilation of readelf.c (this might change in the future). As yet we have not found the cause; but you can safely copy the link.h file from
 * /buildroot/build_powerpc/staging_dir/include

to
 * /buildroot/toolchain_build_powerpc/binutils-2.16.91.0.7/binutils

The second error appears to be related to problems compiling libgcc_s_nof.so.1, and moving it to libgcc_s_nof_so.1. However by this point your cross tools should have been compiled.

The cross tools are created in the directory buildroot/build_powerpc/staging_dir/bin and are all prefixed  or. The option for the uclibc is in the  section of the config.in file; or through 'target' options of menuconfig

Build more stuff
Now either just use the cross tools directly for your own projects or go back and configure in a few packages to build from the 'Package Selection' list.

C++ Support
It should be possible to enable C++ support for the powerpc options; however the obvious trick of enabling C++ for build options does not seem to work :( After digging a little, it appears necessary to set   which can be done by entering the menuconfig, selecting packages, and selecting 'Native Toolchain in Filesystem'. This is the same as adding the line above to the config.in file.

Some further information on using Buildroot can be found here