RTEMS build instructions

From Milkymist Wiki

Jump to: navigation, search

This is a tutorial on how to build RTEMS on the Milkymist One board.

Questions about the Milkymist BSP for RTEMS ?

GO ask them on irc.freenode.net on #milkymist

I (Yann Sionneau aka Fallenou on IRC) or lekernel or mwalle will try to answer :)

Contents

[edit] Build an RTEMS toolchain

xiangfu wrote some Makefiles to compile the lm32 toolchain and flickernoise. Please read the README.html for detailed directions and host specific requirements. Build steps are below:

  • Download the script files:
   $ git clone git://github.com/milkymist/scripts.git
  • Read and follow the directions in the README.html file:
   $ cd scripts  
   $ vi README

[edit] Historical Information

The following information is out of date but may be useful if you run into problems.

  • Alternatively, you can follow the following tutorial on RTEMS's wiki :
 http://www.rtems.org/wiki/index.php/Building_the_RTEMS_toolset_on_Ubuntu
or this local tutorial for Debian
Building the RTEMS toolset on Debian
  • If you are under ubuntu 10.04 i guess you do not need to compile autoconf and automake from sources, the version provided by ubuntu is recent enough.
  • So basically doing the following should be ok :
 # aptitude install m4 patch  build-essential texinfo cvs libncurses5-dev libgmp3-dev libmpfr-dev libmpc-dev autoconf autotools-dev
  • Follow the steps of the "Phase 2." of RTEMS' wiki page to configure and build the toolchain.
    • Do not forget that you are building the toolchain for RTEMS 4.11 and not 4.9
    • Your target is not powerpc-rtems4.9 but lm32-rtems4.11
    • Do not forget to apply the patches, and follow the build order indicated in the RTEMS wiki, you must build gcc against newlib.

[edit] Other Build Scripts

  1. one script_file for auto download and build
  2. another one script_file from rtems.org cvs
  3. yet another one Makefile for auto download and build

[edit] Checkout the RTEMS port to Milkymist

Yann Sionneau developped as part of a Google Summer of Code (2010) a Board Support Package (BSP) for the Milkymist One board which makes it possible to run RTEMS on Milkymist One board using Milkymist SoC !

The BSP is available on his git repository hosted on github : http://github.com/fallen/rtems-milkymist


  • Be sure to have the git tool installed in your computer
  • Git can be installed this way under debian (and ubuntu) :
 # aptitude update && aptitude install git-core
  • Clone the git repository of the RTEMS port to Milkymist :
 ~$ git clone git://github.com/fallen/rtems-milkymist.git

[edit] Building RTEMS port to Milkymist

  • Go to the root of the source tree :
 ~$ cd rtems-milkymist
  • Put your lm32-rtems4.11 toolchain in your PATH environment variable :
 ~$ export PATH=/opt/rtems-4.11/bin:$PATH
  • Run bootstrap (to generate the Makefile.in and other autotools related files) :
 ~/rtems-milkymist$  ./bootstrap -c && ./bootstrap -p && ./bootstrap
  • Go make some coffee, drink the coffee, refill your mug and drink again ... ok you're done !
  • Create a directory to host the binaries you're going to create :
 $ cd ~/
 ~$ mkdir bsp-milkymist
  • Do configure and make !
 ~$ cd bsp-milkymist
 ~/bsp-milkymist$ ../rtems-milkymist/configure --target=lm32-rtems4.11 --enable-rtemsbsp=milkymist \ 
                  --enable-testsuites=samples --enable-posix --disable-itron --enable-networking --disable-multiprocessing
 ~/bsp-milkymist$ make all
 ~/bsp-milkymist$ sudo -s (or simply su in debian)
 ~/bsp-milkymist# export PATH=$PATH:/opt/rtems-4.11/bin
 ~/bsp-milkymist# make install
  • You can go drink some more coffee !
Personal tools