Open Turbostation:Boot Loader

=Boot Loader= QNAP have used U-Boot for the Linux boot loader, with some minor modifications for the Turbostation.

Accessing
The boot loader prompt is accessible from the serial port connection as there is a 1 second timeout in which to interrupt the normal boot process by pressing any key. U-Boot reports the following as the system starts:

And has the following environment configured (printenv) in flash:

QNAP Modifications
Although it isn't in the current download, QNAP will provide the GPL source code on request. They have based their version on the Sandpoint 8245 configuration with a few minor tweaks for a bigger sized flash chip. Unfortunately they have made only the minimum changes to get Linux booting. So although the network boot commands are configured since they were in the original Sandpoint configuration, the network controller (either version) is not initialised since it is different to the one used on the Sandpoint board. There are no disk or USB commands either.

Booting an Alternative Image
Kermit file copy is available and works well with Hyperterm or Minicom over the serial connection, but only at around 75s per 100Kb transferred so it is a bit impractical for testing new kernel builds.

Steps Towards an Improved Boot Loader
Some interesting information about Das U-Boot running on the very similar hardware of the Linkstation/Kurobox can be found here or here, especially the part about being able to test some U-Boot modifications without having to carry out any risky re-flashing.

An 'improved' version of U-Boot has been built with Network support, allowing TFTP and NFS booting. Still to do is to try and add disk and USB support and provide some sort of interface to the various buttons and lights on the Turbostation casing.

Fortunately not all of the 'Vendor' flash partition is used in stock QNAP Turbostations. There are 6 empty sectors at FFE20000-FFEDFFFF which gives 768K in which the 'improved' version of the boot loader can be stored, together with its own environment. This allows the QNAP boot loader to be retained as a fail-safe, but it can be reconfigured so that at reset it starts the alternative boot loader instead of booting straight into Linux.

Ultimately we would want to replace the QNAP version of U-Boot with the improved version. But without a working JTAG interface for someone to test the build first this option is only for the brave, rich or foolhardy!