Kernel 2 6 8 1 rtai 3 3

From Mca2
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-2.6.8.1.tar.bz2
 [/tmp/rtai-test]$ tar xjf rtai-3.3.tar.bz2
 [/tmp/rtai-test]$ mv adeos-linux-2.6.8.1-i386-r8.patch rtai3.2/base/arch/i386/patches/
  • Patch the kernel with the adeos patch
 [/tmp/rtai-test]$ cd linux-2.6.8.1

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

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

[/tmp/rtai-test/linux-2.6.8.1]$ cp ../mca2/etc/linux-2.6.8.1.config .config
[/tmp/rtai-test/linux-2.6.8.1]$ make oldconfig
[/tmp/rtai-test/linux-2.6.8.1]$ make bzImage modules
[/tmp/rtai-test/linux-2.6.8.1]$ 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-2.6.8.1 

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

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

[/tmp/rtai-test/rtai-3.3-linux-2.6.8.1/addons/drivers/serial]$ make
[/tmp/rtai-test/rtai-3.3-linux-2.6.8.1/addons/drivers/serial]$ make install
[/tmp/rtai-test/rtai-3.3-linux-2.6.8.1/addons/drivers/serial]$ 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-2.6.8.1-install
[/tmp/rtai-test/mca2.4.1]$ source script/mcasetenv
[/tmp/rtai-test/mca2.4.1]$ scons