RTEMS build instructions
From Milkymist Wiki
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 :)
 Build an RTEMS toolchain
- 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
 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 :
or this local tutorial for 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
- Then download the sources of gcc-core, newlib, gdb, g++ and binutils and the corresponding patches (.diff files) on this page : http://ftp.rtems.org/ftp/pub/rtems/SOURCES/4.11/
- 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.
 Other Build Scripts
- one script_file for auto download and build
- another one script_file from rtems.org cvs
- yet another one Makefile for auto download and build
 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
 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 !