Difference between revisions of "Kernel 2 4 32 rtai 3 3"

From Mca2
Jump to navigationJump to search
(fixed linux link)
 
Line 1: Line 1:
 
== Download and Patching ==
 
== Download and Patching ==
 
* Create a directory of your choice
 
* Create a directory of your choice
  {{cmd|[~]$ mkdir /tmp/rtai-test<br/>[~]$ cd /tmp/rtai-test}}
+
<pre>
* Download MCA2 from {{mcasf}}
+
[~]$ mkdir /tmp/rtai-test<br/>[~]$ cd /tmp/rtai-test}}
  {{cmd|[/tmp/rtai-test]$ tar xzf mca2.4.1.tgz}}
+
</pre>
 +
* Download MCA2 from [http://mca2.sf.net MCA2's Sourceforge Page]
 +
<pre>
 +
[/tmp/rtai-test]$ tar xzf mca2.4.1.tgz
 +
</pre>
 
* Download the linux kernel 2.4.32 from ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.32.tar.bz2:
 
* Download the linux kernel 2.4.32 from ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.32.tar.bz2:
  {{cmd|[/tmp/rtai-test]$ tar xjf linux-2.4.32.tar.bz2}}
+
<pre>
 +
[/tmp/rtai-test]$ tar xjf linux-2.4.32.tar.bz2
 +
</pre>
 
* Download rtai-3.3 from http://www.rtai.org/RTAI/rtai-3.3.tar.bz2
 
* Download rtai-3.3 from http://www.rtai.org/RTAI/rtai-3.3.tar.bz2
  {{cmd|[/tmp/rtai-test]$ tar xjf rtai-3.3.tar.bz2}}
+
<pre>
 +
[/tmp/rtai-test]$ tar xjf rtai-3.3.tar.bz2
 +
</pre>
 
* Patch the kernel with the corresponding patch that comes with rtai
 
* Patch the kernel with the corresponding patch that comes with rtai
  {{cmd|[/tmp/rtai-test]$ cd linux-2.4.32<br>
+
<pre>
[/tmp/rtai-test/linux-2.4.32]$ patch -p1 < ../rtai-3.3/base/arch/i386/patches/hal-linux-2.4.32-i386-1.1-01.patch}}
+
[/tmp/rtai-test]$ cd linux-2.4.32<br>
 +
[/tmp/rtai-test/linux-2.4.32]$ patch -p1 < ../rtai-3.3/base/arch/i386/patches/hal-linux-2.4.32-i386-1.1-01.patch
 +
</pre>
 
* Build the linux kernel. linux-2.4.32.config is the kernel config we use.
 
* Build the linux kernel. linux-2.4.32.config is the kernel config we use.
  {{cmd|[/tmp/rtai-test/linux-2.4.32]$ make mrproper <br>
+
<pre>
[/tmp/rtai-test/linux-2.4.32]$ cp ../mca2/etc/linux-2.4.32.config .config <br>
+
[/tmp/rtai-test/linux-2.4.32]$ make mrproper <br>
[/tmp/rtai-test/linux-2.4.32]$ make oldconfig <br>
+
[/tmp/rtai-test/linux-2.4.32]$ cp ../mca2/etc/linux-2.4.32.config .config <br>
[/tmp/rtai-test/linux-2.4.32]$ make dep bzImage modules <br>
+
[/tmp/rtai-test/linux-2.4.32]$ make oldconfig <br>
[/tmp/rtai-test/linux-2.4.32]$ cd ..}}
+
[/tmp/rtai-test/linux-2.4.32]$ make dep bzImage modules <br>
 +
[/tmp/rtai-test/linux-2.4.32]$ cd ..
 +
</pre>
 
* Patch rtai-3.3 with the corresponding patches that come with mca2:
 
* Patch rtai-3.3 with the corresponding patches that come with mca2:
  {{cmd|[/tmp/rtai-test]$ cd rtai-3.3<br>
+
<pre>
[/tmp/rtai-test/rtai-3.3]$ patch -p1 < ../mca2/etc/rtai-3.3-sched-sem-bugfix.patch <br>
+
[/tmp/rtai-test]$ cd rtai-3.3<br>
[/tmp/rtai-test/rtai-3.3]$ patch -p1 < ../mca2/etc/rtai-3.3-driver_serial.patch <br>
+
[/tmp/rtai-test/rtai-3.3]$ patch -p1 < ../mca2/etc/rtai-3.3-sched-sem-bugfix.patch <br>
[/tmp/rtai-test/rtai-3.3]$ cd ..}}
+
[/tmp/rtai-test/rtai-3.3]$ patch -p1 < ../mca2/etc/rtai-3.3-driver_serial.patch <br>
 +
[/tmp/rtai-test/rtai-3.3]$ cd ..
 +
</pre>
 
* Build rtai-3.3.
 
* Build rtai-3.3.
  {{cmd|[/tmp/rtai-test]$ mkdir rtai-3.3-linux-2.4.32 <br>
+
<pre>
[/tmp/rtai-test]$ cd rtai-3.3-linux-2.4.32 <br>
+
[/tmp/rtai-test]$ mkdir rtai-3.3-linux-2.4.32 <br>
[/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ <nowiki> ../rtai-3.3/configure --with-linux-dir=/tmp/rtai-test/linux-2.4.32 --prefix=/tmp/rtai-test/rtai-3.3-linux-2.4.32-install CONFIG_RTAI_MONITOR_EXECTIME=y </nowiki> <br>
+
[/tmp/rtai-test]$ cd rtai-3.3-linux-2.4.32 <br>
[/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ make <br>
+
[/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ <nowiki> ../rtai-3.3/configure --with-linux-dir=/tmp/rtai-test/linux-2.4.32 --prefix=/tmp/rtai-test/rtai-3.3-linux-2.4.32-install CONFIG_RTAI_MONITOR_EXECTIME=y </nowiki> <br>
[/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ make install <br>
+
[/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ make <br>
[/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ cd ../rtai-3.3-linux-2.4.32-install <br>
+
[/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ make install <br>
[/tmp/rtai-test/rtai-3.3-linux-2.4.32-install]$ ln -s ../linux-2.4.32 linux}}
+
[/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ cd ../rtai-3.3-linux-2.4.32-install <br>
 +
[/tmp/rtai-test/rtai-3.3-linux-2.4.32-install]$ ln -s ../linux-2.4.32 linux
 +
</pre>
 
* Build rtai-3.3 serial driver.
 
* Build rtai-3.3 serial driver.
  {{cmd|[/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ cd addons/drivers/serial <br>
+
<pre>
[/tmp/rtai-test/rtai-3.3-linux-2.4.32/addons/drivers/serial]$ make <br>
+
[/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ cd addons/drivers/serial <br>
[/tmp/rtai-test/rtai-3.3-linux-2.4.32/addons/drivers/serial]$ make install <br>
+
[/tmp/rtai-test/rtai-3.3-linux-2.4.32/addons/drivers/serial]$ make <br>
[/tmp/rtai-test/rtai-3.3-linux-2.4.32/addons/drivers/serial]$ cd ../../../..}}
+
[/tmp/rtai-test/rtai-3.3-linux-2.4.32/addons/drivers/serial]$ make install <br>
 +
[/tmp/rtai-test/rtai-3.3-linux-2.4.32/addons/drivers/serial]$ cd ../../../..
 +
</pre>
 
* Build mca2 with lxrt
 
* Build mca2 with lxrt
  {{cmd|[/tmp/rtai-test]$ cd mca2.4.1<br>
+
<pre>
[/tmp/rtai-test/mca2.4.1]$ <nowiki> scons configure=yes lxrt_dir=/tmp/rtai-test/rtai-3.3-linux-2.4.32-install </nowiki>  <br>
+
[/tmp/rtai-test]$ cd mca2.4.1<br>
[/tmp/rtai-test/mca2.4.1]$ source script/mcasetenv <br>
+
[/tmp/rtai-test/mca2.4.1]$ <nowiki> scons configure=yes lxrt_dir=/tmp/rtai-test/rtai-3.3-linux-2.4.32-install </nowiki>  <br>
[/tmp/rtai-test/mca2.4.1]$ scons  
+
[/tmp/rtai-test/mca2.4.1]$ source script/mcasetenv <br>
}}
+
[/tmp/rtai-test/mca2.4.1]$ scons  
 +
</pre>

Latest revision as of 15:17, 2 July 2010

Download and Patching

  • Create a directory of your choice
 [~]$ mkdir /tmp/rtai-test<br/>[~]$ cd /tmp/rtai-test}}
 [/tmp/rtai-test]$ tar xzf mca2.4.1.tgz
 [/tmp/rtai-test]$ tar xjf linux-2.4.32.tar.bz2
 [/tmp/rtai-test]$ tar xjf rtai-3.3.tar.bz2
  • Patch the kernel with the corresponding patch that comes with rtai
 [/tmp/rtai-test]$ cd linux-2.4.32<br>
 [/tmp/rtai-test/linux-2.4.32]$ patch -p1 < ../rtai-3.3/base/arch/i386/patches/hal-linux-2.4.32-i386-1.1-01.patch
  • Build the linux kernel. linux-2.4.32.config is the kernel config we use.
 [/tmp/rtai-test/linux-2.4.32]$ make mrproper <br>
 [/tmp/rtai-test/linux-2.4.32]$ cp ../mca2/etc/linux-2.4.32.config .config <br>
 [/tmp/rtai-test/linux-2.4.32]$ make oldconfig <br>
 [/tmp/rtai-test/linux-2.4.32]$ make dep bzImage modules <br>
 [/tmp/rtai-test/linux-2.4.32]$ cd ..
  • Patch rtai-3.3 with the corresponding patches that come with mca2:
 [/tmp/rtai-test]$ cd rtai-3.3<br>
 [/tmp/rtai-test/rtai-3.3]$ patch -p1 < ../mca2/etc/rtai-3.3-sched-sem-bugfix.patch <br>
 [/tmp/rtai-test/rtai-3.3]$ patch -p1 < ../mca2/etc/rtai-3.3-driver_serial.patch <br>
 [/tmp/rtai-test/rtai-3.3]$ cd ..
  • Build rtai-3.3.
 [/tmp/rtai-test]$ mkdir rtai-3.3-linux-2.4.32 <br>
 [/tmp/rtai-test]$ cd rtai-3.3-linux-2.4.32 <br>
 [/tmp/rtai-test/rtai-3.3-linux-2.4.32]$  ../rtai-3.3/configure --with-linux-dir=/tmp/rtai-test/linux-2.4.32 --prefix=/tmp/rtai-test/rtai-3.3-linux-2.4.32-install CONFIG_RTAI_MONITOR_EXECTIME=y  <br>
 [/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ make <br>
 [/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ make install <br>
 [/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ cd ../rtai-3.3-linux-2.4.32-install <br>
 [/tmp/rtai-test/rtai-3.3-linux-2.4.32-install]$ ln -s ../linux-2.4.32 linux
  • Build rtai-3.3 serial driver.
 [/tmp/rtai-test/rtai-3.3-linux-2.4.32]$ cd addons/drivers/serial <br>
 [/tmp/rtai-test/rtai-3.3-linux-2.4.32/addons/drivers/serial]$ make <br>
 [/tmp/rtai-test/rtai-3.3-linux-2.4.32/addons/drivers/serial]$ make install <br>
 [/tmp/rtai-test/rtai-3.3-linux-2.4.32/addons/drivers/serial]$ cd ../../../..
  • Build mca2 with lxrt
 [/tmp/rtai-test]$ cd mca2.4.1<br>
 [/tmp/rtai-test/mca2.4.1]$  scons configure=yes lxrt_dir=/tmp/rtai-test/rtai-3.3-linux-2.4.32-install   <br>
 [/tmp/rtai-test/mca2.4.1]$ source script/mcasetenv <br>
 [/tmp/rtai-test/mca2.4.1]$ scons