Using orbuild


2012-03-28Publicerad av Sven-Åke Andersson

Introduction


The OpenRISC project has grown and is now made up of many different components that need to be separately downloaded, configured and built. To many people, all these manual steps are a hassle, they just want to use the processor in their FPGA designs and have no interest in the supporting tools and technologies.

Orbuild is designed to automate this initial setup steps. It has been put together by R. Diez and can be downloaded from the GIT hub: https://github.com/rdiez/orbuild.

Orbuild is not meant to be mandatory, it is just a helping hand which only performs standard downloads and software builds. Users and developers are or course free to ignore it and manually perform the installation and test steps. In the OpenRISC development community there is also the need to run a daily build with many possible component configurations, in order to alert the developers early when something has broken. This is in fact the main reason why orbuild was developed, and the first task it was actually used for. The daily build can also take on the job of generating software releases, as manual release procedures often result in human error.


Prerequisites


orbuild runs on Unix-like systems as well as in the Cygwin environment on Microsoft Windows. However, the most thoroughly tested platform is Linux. Each orbuild project has its own prerequisites. For the OpenRISC project, look at the file: Scripts/Projects/OpenRISC/README.pod

For Ubuntu/Debian systems, the following commands installs all prerequisites:
 

sudo apt-get install autoconf
sudo apt-get install bison
sudo apt-get install curl
sudo apt-get install dejagnu
sudo apt-get install flex
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install git
sudo apt-get install git-core
sudo apt-get install gperf
sudo apt-get install gxmessage
sudo apt-get install iverilog
sudo apt-get install libmpfr-dev
sudo apt-get install libmpc-dev
sudo apt-get install libncurses-dev
sudo apt-get install libnotify-bin
sudo apt-get install libtool
sudo apt-get install libxml-parser-perl
sudo apt-get install libzip-dev
sudo apt-get install make
sudo apt-get install patch
sudo apt-get install perl
sudo apt-get install subversion
sudo apt-get install tcl-dev
sudo apt-get install texinfo
sudo apt-get install texlive
sudo apt-get install tk-dev
sudo apt-get install verilator
sudo apt-get install xdg-utils

 

Getting help


Here is the README file.


Trying it out


I think this is a great way to simplify the build and installation of the software needed to use the OpenRISC processor. Let's give it a try. We will download and install the script environment in our Ubuntu 64 bit Linux.

Download from the GIT repository


Use this command to download all the scripts from the GIT repository:

git clone git://github.com/rdiez/orbuild.git




 
Here is what has been downloaded.

 



 

Edit the config file


We edit the file orbuild.conf and change the ParallellBuild to no and InteractiveBuild to yes the first time we run the build script.

 



 

Starting the build process
 

Use the command ./orbuild to start the build. During the build we have to enter username and password to the OpenCores repository. When the build process runs successfully this is the result. We have a complete toolchain running on Ubuntu 10.04 64 bit. I have also installed the GNU toolchain in Ubuntu 12.04 32bit without problems.

 

 

Installation report


When the installation has finished we get this nice report in html format.

Using the toolchain


We will start by adding the Atlys board to the board library.

 


 
 

Adding bin directory to PATH
 

Add the the bin directory to the PATH variable.

PATH=/opt/home/svan/OpenRISC/orbuild_12_04/Builds/build-2012-04-16/ToolchainOr32/bin:$PATH
 

Compiling a c-program


Use this command to compile the LEDtest program.

or32-elf-gcc -mboard=atlys LEDtest.c -o LEDtest.exe
 

Thanks to Ruben


You have done a great job in simplifying the installation process.