Documentation: Cortex-A8 port source code
For people who know what they’re doing, the code is available in CVS as the ‘OMAP3Dev’ product. For people who don’t know what they’re doing, read on…
Getting and building the source
- If you don’t have a 32bit version of the Acorn/Castle/ROOL C/C++ suite, go here and buy one. Note that you’ll also need a suitable RISC OS machine to compile on (e.g. StrongARM or greater unless you like long compile times).
- Grab the source from CVS. You’ll probably want to do this from Linux or Cygwin otherwise the admin scripts won’t work. The CVSROOT and PATH changes are probably best placed in a script you can execute each time you want to do RISC OS work.
- Add the lines ‘Compression yes’ and ‘CompressionLevel 9’ to your ~/.ssh/config file to ensure CVS always uses compression
- Follow the instructions in the CVS guide to set CVSROOT
- ‘cvs login’ to log into the server
- ‘cvs co -d bin castle/Admin/bin’ to grab the admin scripts into the folder ‘bin’.
- Add the ‘bin’ folder to your PATH to make your life easier (using ‘export PATH=$PATH:./bin’)
- ‘checkout OMAP3Dev’ to use the checkout script to grab all the source code needed for the OMAP3/Cortex port. (Note: this is a perl script. Try : ‘sudo ln -s /usr/bin/perl /bin/perl’ before if you have ubuntu or debian running)
- If you don’t have a suitable network filesystem (e.g. Sunfish or Moonfish) that you can use to copy source files to/from your Linux and RISC OS machines, do: ‘tar -cjvf ./ro_source.tar.bz2 ./’ to pack the tree for transfer to RISC OS. It can be unzipped with the !Untarbz2 application found here)
- Get the source tree ready for building.
- At a new location (i.e. on your RISC OS machine), merge together the ‘bsd’, ‘castle’, ‘gpl’ and ‘mixed’ folders (Each folder contains code under different license types, but the build system must have them all merged together).
- Use RiscOS.Apps.!EraseCVS to remove the CVS folders from your merged tree, as they will break the build process. You can also run the following in Linux which will clean everything below the current directory:
find . -name "CVS" -or -name ".cvstag" | xargs rm -rf - Run the InstallTools script in the RiscOS.Library folder to copy the required compiler binaries into the build tree. Note that the C/C++ tools will have to have been seen by the filer beforehand.
- Follow the steps in part 2 of the How to build RISC OS page, for how to register the source tree with !Builder
- Configure the source
- The DebugTerminal option in Kernel.Hdr.Options can be used to enable/disable the serial terminal. By default it is disabled, but it can be enabled if you have no other input source available, or if you are working on particularly sensitive areas of the OS (e.g. when working on the USB drivers or if you want all VDU output copied to the serial port for debug purposes).
- Build the code!
- Note that it is advised that you only perform a build if the filer hasn’t seen the C/C++ tools. This is because some of the environment settings the C/C++ tools make conflict with those of the build system. Therefore if you’ve just set up a new build tree and ran the InstallTools script, you will have to reboot before attempting to compile the code.
- Select the ROOL.OMAP3 build environment in Builder
- For the first build, check Clean, Clean All, Export headers, Export libraries, Export resources, Make ROM, Install ROM, and Join ROM. For subsequent builds you’ll usually only need Make ROM, Install ROM and Join ROM.
- Hit ‘Build’ and hope everything is working right. It will take around three quarters of an hour for the code to build.
- If everything went OK, RiscOS.Images should contain a new ROM image with a name like ‘aUI800-00’. If not, panic.
Submitting changes to CVS
Get in touch with ROOL, they can provide CVS write access to those who need it. See the Remote write access to the ROOL CVS repository page for further details.
Further reading
- Build FAQ wiki page
- How to build RISC OS wiki page
- Developer’s guide to RISC OS builds wiki page
- ROOL CVS access guide