RISC OS source code
RISC OS sources are available from CVS or in the archives listed below. If you download anything, please consider donating to help support the ongoing shared source project. Thanks!
- sources-four.tar.bz2 (10.3 MB)
Last modified Fri Apr 25 18:49:03 +0100 2008 - gpl-build.tar.bz2 (5.2 MB)
Last modified Fri Apr 25 18:48:49 +0100 2008 - bbe-lite.tar.bz2 (1.3 MB)
Last modified Fri Apr 25 18:48:08 +0100 2008 - bbe.tar.bz2 (2.6 MB)
Last modified Fri Apr 25 18:47:53 +0100 2008 - sources-123.tar.bz2 (16.1 MB)
Last modified Fri Apr 25 15:58:05 +0100 2008
Source code archives
When merged together, the archive contents form a complete ready-made build environment including sources and prebuilt components. The Binary Build Environment (BBE) in bbe.tar.bz2 (last updated 26-Apr-2008) is the starting point for building RISC OS code. The sources archive sources-123.tar.bz2 contains all of the Batch One, Two and Three source code. This needs to be unpacked into the BBE, by following the instructions contained inside them. Once installed, you can build those components.
Batch Four is a stand-alone set of source components contained in the sources-four.tar.bz2 archive which, when used in conjunction with the BBE bbe-lite.tar.bz2 will build a RISC OS ROM image. This ROM image is not particularly functional as it lacks certain key components (such as a video driver and the USB stack) due to issues which we are still working on. However, being able to create a ROM at all is a big proof of concept. We have instructions in our Wiki developer pages on how to do ROM builds (e.g. here and here).
In future, we will be splitting the downloads into ROM- and disc-based sources. We’re almost that way already, as batches One to Three largely provide disc components (such as a !Edit application that you double-click to run) whereas Batch Four is entirely about building ROM-based components which are not suitable for loading from disc. Over time, this distinction will become clearer on our downloads pages. It should be noted that most source components can be used to build both ROM- or disc-based binaries so there is a degree of duplication of sources within the sources-123.tar.bz2 and sources-four.tar.bz2 archives.
A list of the components in all source batches can be found here.
Other material
The gpl-build.tar.bz2 file is only required if you want to rebuild the GPL-licenced tools which are used in the main build, and can be used either by itself or merged in with the other tarballs. It includes a binary copy of GCC 2.95.4 release 3, pre-installed into the build environment for your convenience. Since this is unmodified from the well-known RISC OS release, we are not including its sources. If you need them, you can get them from the riscos.info Subversion repository:
svn checkout svn://svn.riscos.info/gccsdk/tags/release_2_95_4_v3
Unpacking
Once downloaded, you will need to decompress any .tar.bz2 files using bzip2 program. There is a RISC OS build of the tool available for download from here. This contains the bzip2 executable file which includes the unzip facility; use “bzip2 -d <filename>” to decompress the archive to a Tar file. We use BZip2 because it produces just about the smallest possible file sizes of any cross platform archive format available for RISC OS. To decompress on UNIX or Linux, use the command “tar jxf <filename>.tar.bz2”.
When you’ve decompressed the BZip2 archive, unpack the resulting Tar file using command line utilities or front ends like SparkFS. Ensure you unpack to a filesystem that supports long filenames and more than 77 files per directory.
If you have only downloaded the prebuilt components in .zip files, please use SparkFS or SparkPlug to decompress the archive contents.
Viewing

The RISC OS sources are written in a mixture of languages, including C, ARM assembler and even BBC BASIC. For RISC OS desktop users, there are a number of editors which are capable of viewing this source code including Zap and StrongEd. For windows users, it may be hard to find editors which provide syntax colouring for ARM assembler. To help you to read these sources, you can use the freeware ROView program, illustrated here. It’s not an editor, but it is a configurable ARM assembler source code viewer with syntax colouring.
Building
To build the sources, merge together the contents of the bbe.tar.bz2 and sources-....tar.bz2 archives. You will need to add in your C toolset and the C library using scripts included in the build environment (RiscOS.Library.InstallTools and RiscOS.Export.InstallCLib). For more information, please see the detailed Wiki page which describes the process in full. It may also help to understand the directory structure inside the tarballs if you read about the CVS repository layout too.
A note for SparkFS users
If using SparkFS to read the Tar files, you need to tell it to give unknown filetype files RISC OS filetype &fff (Text) rather than its default of &ffd (Data). It is a good idea to set its filename truncation value to a high number so that it doesn’t accidentally shorten any filenames, too. From the command line, issue the following commands before opening your Tar archive:
*SparkFSExtension fff *SparkFSTruncate 255
With these commands issued, SparkFS should extract the archive contents correctly. Note that while the *SparkFSTruncate command can be added to !SparkFS.!Run – indeed, it seems that some versions of SparkFS have this included by default – the *SparkFSExtension fff command only works if issued after SparkFS has started. To work around the problem, modify file !SparkFS.CONFIG.Extensions instead of using the command. Change the first line to read, simply:
0xfff
This should have the same effect as *SparkFSExtension but will be set up by default when SparkFS starts.