]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Adds basic README for compiling the gw, fixed rtems.cfg.
authorMartin Hořeňovský <Martin.Horenovsky@gmail.com>
Wed, 28 Aug 2013 14:03:05 +0000 (16:03 +0200)
committerMartin Hořeňovský <Martin.Horenovsky@gmail.com>
Wed, 28 Aug 2013 14:03:05 +0000 (16:03 +0200)
rtems.cfg now has proper path to the rtems git.
README.gw contains a basic sequence of steps needed to compile the gw,
starting from compiling build tools, compiling rtems and then compiling gw.

rtems/gw/README.gw [new file with mode: 0644]
rtems/rtems.cfg

diff --git a/rtems/gw/README.gw b/rtems/gw/README.gw
new file mode 100644 (file)
index 0000000..ef03378
--- /dev/null
@@ -0,0 +1,37 @@
+Quick README regarding compilation of CAN GW for RTEMS
+
+
+Preparing Toolchain
+1) RTEMS compilation setup requires quite recent autoconf (2.68+) and automake (1.12+), so if your version is older, build those two first.
+2) For compilation itself, you will need Binutils, GCC, Newlib. Their version is normally specified
+by RTEMS git, for our GW setup it is by http://git.rtems.org/rtems-source-builder/tree/rtems/config/4.10/rtems-powerpc.bset.
+ -- At the time of making of this README it was binutils-2.20.1, gcc-4.4.7(core + g++) and newlib-1.18.0.
+You can get those from RTEMS ftp, ftp://www.rtems.com/pub/rtems/SOURCES/4.10/. You will also need RTEMS patches from the same location.
+
+Binutils and gcc need to be configured with --target=powerpc-rtems4.10, gcc needs to have newlib symlinked into its source directory
+and specified --with-newlib --enable-threads.
+
+For more specifics refer either to http://www.rtems.org/wiki/index.php/Building_Tools or http://aps.anl.gov/epics/base/RTEMS/Building-4.10.2.txt
+
+
+
+
+Building RTEMS
+Assuming you have downloaded sources from RTEMS git.
+1) Run ./bootstrap from RTEMS directory.
+2) Create build directory, run rtems.cfg from there. (Note: it assumes that you used --prefix/opt/rtems-4.10 while configuring build tools)
+3) Build RTEMS with make RTEMS_BSP="icecube"
+4) Install RTEMS, and add RTEMS_MAKEFILE_PATH=<PREFIX>/powerpc-rtems4.10/icecube to your bash profile.
+
+
+Building GW
+Note: You will need mkimage tool from uboot.
+1) Run make default-config
+2) Run make to compile the GW
+3) Run ./mkimg to create bootable uboot image from the GW.
+
+This will create build that has RTEMS shell enabled along with commands for starting and stopping the gateway, enabling eth driver and
+starting and stopping CPU load generator. Because we had trouble communicating with the board over serial, there are also "bench builds",
+which deactivate shell, autostart CAN gateway and possible autoactivate CPU load. Currently those can be build via uncommenting defines
+inside app_def.h (I will change this to make targets in the future.)
+
index a0a4deba0ff4eb95892950733642a43f90932d9e..3a26f6372fccd785717e5fef08292189a59d7f22 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
 #!/bin/sh
 
-./configure --target=powerpc-rtems4.10 \
+./rtems-4.10/configure --target=powerpc-rtems4.10 \
                --prefix=/opt/rtems-4.10 \
                --enable-rtems-inlines --disable-multiprocessing \
                --enable-cxx --enable-rdbg \
                --prefix=/opt/rtems-4.10 \
                --enable-rtems-inlines --disable-multiprocessing \
                --enable-cxx --enable-rdbg \
@@ -10,6 +10,6 @@
                --disable-multilib --disable-docs \
                --verbose \
                --enable-rtemsbsp="icecube"
                --disable-multilib --disable-docs \
                --verbose \
                --enable-rtemsbsp="icecube"
-\r
-        \r
+
+        
 #Note: If working on glab, use rtems4.10.2 instead of rtems4.10 -- there is already compiled build toolchain for that target.
\ No newline at end of file
 #Note: If working on glab, use rtems4.10.2 instead of rtems4.10 -- there is already compiled build toolchain for that target.
\ No newline at end of file