Sunday, February 22, 2015

[HOWTO] 3- Build RTEMS for OpenRISC

If you have not followed the previous tutorial posts describing how to set up your development environment, go ahead and do it [1] [2], I'll be waiting for you to come back again to start building RTEMS for OpenRISC as described here. Currently there is only one RTEMS BSP you can build which runs on both or1ksim and QEMU. Now let's begin.

1- Checking out RTEMS source

$ cd $HOME/development/rtems/src
$ git clone git://git.rtems.org/rtems.git
Cloning into 'rtems'...
remote: Counting objects: 465756, done.
remote: Compressing objects: 100% (81067/81067), done.
remote: Total 465756 (delta 376768), reused 462957 (delta 374743)
Receiving objects: 100% (465756/465756), 63.69 MiB | 83.00 KiB/s, done.
Resolving deltas: 100% (376768/376768), done.
Checking connectivity... done.
2- Bootsrap

The Make build systems requires that you run bootstrap command to generate preinstall.am and Makefile.in files for the first time you download and build RTEMS.

$ cd rtems
$ ./bootstrap -p
$ ./bootstrap

3- Configure and build

Create a new directory for build and configure/build RTEMS for or1ksim BSP.

$ cd ../../
$ mkdir build
$ cd build/

$ ../src/rtems/configure --target=or1k-rtems4.11 --enable-rtemsbsp=or1ksim
$ make

This will generate default samples executable like hello world and ticker, which you can run on or1ksim and QEMU as described on the following tutorial posts.

References

[1] [HOWTO] 1- Build or1k-rtems* toolchain via RSB
[2] [HOWTO] 2- Build or1k simulator(s)

No comments:

Post a Comment