Kernel 2 6 8 1 rtai 3 3

From Mca2
Revision as of 09:22, 30 July 2010 by Sutter (talk | contribs) (Download and Patching)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Download and Patching

  • Create a directory of your choice
 [~]$ mkdir /tmp/rtai-test
[~]$ cd /tmp/rtai-test
 [/tmp/rtai-test]$ tar xzf mca2.4.1.tgz
 [/tmp/rtai-test]$ tar xjf linux-
 [/tmp/rtai-test]$ tar xjf rtai-3.3.tar.bz2
 [/tmp/rtai-test]$ mv adeos-linux- rtai3.2/base/arch/i386/patches/
  • Patch the kernel with the adeos patch
 [/tmp/rtai-test]$ cd linux-

[/tmp/rtai-test/linux-]$ patch -p1 < ../rtai-3.3/base/arch/i386/patches/adeos-linux-

  • Build the linux kernel. linux- is the kernel config we use.
 [/tmp/rtai-test/linux-]$ make mrproper 

[/tmp/rtai-test/linux-]$ cp ../mca2/etc/linux- .config
[/tmp/rtai-test/linux-]$ make oldconfig
[/tmp/rtai-test/linux-]$ make bzImage modules
[/tmp/rtai-test/linux-]$ cd ..

  • Patch rtai-3.3 with the corresponding patches that come with mca2:
 [/tmp/rtai-test]$ cd rtai-3.3

[/tmp/rtai-test/rtai-3.3]$ patch -p1 < ../mca2/etc/rtai-3.3-sched-sem-bugfix.patch
[/tmp/rtai-test/rtai-3.3]$ patch -p1 < ../mca2/etc/rtai-3.3-driver_serial.patch
[/tmp/rtai-test/rtai-3.3]$ cd ..

  • Build rtai-3.3.
 [/tmp/rtai-test]$ mkdir rtai-3.3-linux- 

[/tmp/rtai-test]$ cd rtai-3.3-linux-
[/tmp/rtai-test/rtai-3.3-linux-]$ ../rtai-3.3/configure --with-linux-dir=/tmp/rtai-test/linux- --prefix=/tmp/rtai-test/rtai-3.3-linux- CONFIG_RTAI_MONITOR_EXECTIME=y
[/tmp/rtai-test/rtai-3.3-linux-]$ make
[/tmp/rtai-test/rtai-3.3-linux-]$ make install
[/tmp/rtai-test/rtai-3.3-linux-]$ cd ../rtai-3.3-linux-
[/tmp/rtai-test/rtai-3.3-linux-]$ ln -s ../linux- linux

  • Build rtai-3.3 serial driver.
 [/tmp/rtai-test/rtai-3.3-linux-]$ cd addons/drivers/serial 

[/tmp/rtai-test/rtai-3.3-linux-]$ make
[/tmp/rtai-test/rtai-3.3-linux-]$ make install
[/tmp/rtai-test/rtai-3.3-linux-]$ cd ../../../..

  • Build mca2 with lxrt
 [/tmp/rtai-test]$ cd mca2.4.1

[/tmp/rtai-test/mca2.4.1]$ scons configure=yes lxrt_dir=/tmp/rtai-test/rtai-3.3-linux-
[/tmp/rtai-test/mca2.4.1]$ source script/mcasetenv
[/tmp/rtai-test/mca2.4.1]$ scons