Showing changes from revision #3 to #4:
Added | Removed | Changed
RISC OS’ sources have some support for cross-building from a Unix-style environment. At present support is somewhat incomplete, neglected, broken and undocumented. This page aims to document some deduction of the process by trial and error. It is likely there are mistakes – feel free to correct them.
RISC OS’ primary toolchain is its own Desktop Development Environment and the closed-source Norcroft compiler. When cross-building, the favoured compiler is a build of Norcroft for Linux or other platform. However it’s possible to make some progress using GCC.
The build involves sourcing some scripts into your shell environment – supposedly this will work with several shells, but for now we’ll assume you’re using bash on Linux (or WSL). Other platforms may run into different issues.
To set up the build tools:
git clone https://gitlab.riscosopen.org/Products/CrossTools.git
cd CrossTools
git submodule update --init --remote
export CROSSTOOLS=$(pwd)
export GCCSDK_INSTALL_CROSSBIN=/home/riscos/cross/bin
cd $CROSSTOOLS/RiscOS/Env/ROOL
source CrossTools.sh
cd $CROSSTOOLS/RiscOS/Sources/Lib/RISC_OSLib
make export
cd $CROSSTOOLS/RiscOS/Sources/Lib/CLXLite
make export
cd $CROSSTOOLS mkdir -p RiscOS/Utilities/Release #git git clone https://gitlab.riscosopen.org/RiscOS/Utilities/Release/srcbuild.git RiscOS/Utilities/Release/srcbuild git clone https://gitlab.riscosopen.org/tmarkettos/srcbuild.git RiscOS/Utilities/Release/srcbuild cd $CROSSTOOLS/RiscOS/Utilities/Release/srcbuild git checkout cross-execvpe make install
git clone https://gitlab.riscosopen.org/Products/BCM2835.git
cd BCM2835
git submodule update --init --remote
export TREE=$(pwd)
export CROSSTOOLS=<path to your CrossTools folder>
cd $TREE
mkdir -p RiscOS/Install/srcbuild
ln -s $CROSSTOOLS/RiscOS/Install/srcbuild/srcbuild $TREE/RiscOS/Install/srcbuild/srcbuild
export PATH=$PATH:$TREE/RiscOS/Install/srcbuild
export GCCSDK_INSTALL_CROSSBIN=/home/riscos/cross/bin
export TOOLCHAIN=GNU # don't use Norcroft
source $TREE/RiscOS/Env/ROOL/BCM2835.sh
cd $TREE/RiscOS
srcbuild list
srcbuild is designed to orchestrate the stages of the build process, in the same way as Builder . However, at this point can’t go much further because some of the Makefiles are no longer cross-compile friendly. A task for the eager reader is to fix them up…
Cross-build forum thread from 2010
riscos.info wiki article from 2008-12