[Ask] Real Time Kernel Patch

Based on DMP's Vortex processor / SoC this board is a full computer capable of running a standard Windows and Linux installation on the backpack of your robot.
17 postsPage 1 of 21, 2
17 postsPage 1 of 21, 2

[Ask] Real Time Kernel Patch

Post by d3xt3r13 » Wed Sep 29, 2010 4:08 am

Post by d3xt3r13
Wed Sep 29, 2010 4:08 am

I'm running uBuntu 9.04 on my RB100 and i need real time capabilities on kernel. I decide to use RTAI 3.8 as kernel patch. My question is, should i go with kernel patch from roboard website first then apply RTAI patch or vice versa?
I'm running uBuntu 9.04 on my RB100 and i need real time capabilities on kernel. I decide to use RTAI 3.8 as kernel patch. My question is, should i go with kernel patch from roboard website first then apply RTAI patch or vice versa?
d3xt3r13 offline
Newbie
Newbie
Posts: 5
Joined: Mon Sep 27, 2010 5:42 am

Post by roboard » Wed Sep 29, 2010 8:35 am

Post by roboard
Wed Sep 29, 2010 8:35 am

hi,

In theory, it will work that use the roboard kernel and then apply RTAI patch.

But, we have not tried it.
hi,

In theory, it will work that use the roboard kernel and then apply RTAI patch.

But, we have not tried it.
roboard offline
Savvy Roboteer
Savvy Roboteer
Posts: 302
Joined: Fri Jul 03, 2009 4:44 am

Post by d3xt3r13 » Wed Sep 29, 2010 8:39 am

Post by d3xt3r13
Wed Sep 29, 2010 8:39 am

roboard wrote:hi,

In theory, it will work that use the roboard kernel and then apply RTAI patch.

But, we have not tried it.


RTAI patch need a fresh kernel so i'm going with RTAI first then apply roboard patch. It's on progress, i'll share the result ASAP
roboard wrote:hi,

In theory, it will work that use the roboard kernel and then apply RTAI patch.

But, we have not tried it.


RTAI patch need a fresh kernel so i'm going with RTAI first then apply roboard patch. It's on progress, i'll share the result ASAP
d3xt3r13 offline
Newbie
Newbie
Posts: 5
Joined: Mon Sep 27, 2010 5:42 am

Post by d3xt3r13 » Sun Oct 03, 2010 7:46 am

Post by d3xt3r13
Sun Oct 03, 2010 7:46 am

my board failed to boot after patched with RTAI. is there anyone can help or share experience using RTAI on RB100?
my board failed to boot after patched with RTAI. is there anyone can help or share experience using RTAI on RB100?
d3xt3r13 offline
Newbie
Newbie
Posts: 5
Joined: Mon Sep 27, 2010 5:42 am

Post by matt.stevenson » Wed Oct 06, 2010 10:44 pm

Post by matt.stevenson
Wed Oct 06, 2010 10:44 pm

Have you tried applying the roboard patch first then the rtai?
Have you tried applying the roboard patch first then the rtai?
matt.stevenson offline
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Thu Apr 29, 2010 9:29 pm

Post by d3xt3r13 » Thu Oct 07, 2010 8:53 am

Post by d3xt3r13
Thu Oct 07, 2010 8:53 am

matt.stevenson wrote:Have you tried applying the roboard patch first then the rtai?


yes, i did both way but still failed to boot. did you have any related work on this thing that you can share?

i'm currently working on xenomai, hope this one works
matt.stevenson wrote:Have you tried applying the roboard patch first then the rtai?


yes, i did both way but still failed to boot. did you have any related work on this thing that you can share?

i'm currently working on xenomai, hope this one works
d3xt3r13 offline
Newbie
Newbie
Posts: 5
Joined: Mon Sep 27, 2010 5:42 am

Post by d3xt3r13 » Tue Oct 12, 2010 9:15 am

Post by d3xt3r13
Tue Oct 12, 2010 9:15 am

Dear all,

i tried to follow instructions from this link:

http://geonobot-wiki.toile-libre.org/do ... on_roboard

do i have to apply roboard kernel provided by roboard site after installing xenomai?
Dear all,

i tried to follow instructions from this link:

http://geonobot-wiki.toile-libre.org/do ... on_roboard

do i have to apply roboard kernel provided by roboard site after installing xenomai?
d3xt3r13 offline
Newbie
Newbie
Posts: 5
Joined: Mon Sep 27, 2010 5:42 am

Post by gdo » Fri Dec 17, 2010 6:04 pm

Post by gdo
Fri Dec 17, 2010 6:04 pm

Hello,

I am the author of the geonobot-wiki article you have found.

After applying the kernel patch for Xenomai, you can apply a specific roboard patch if you need. You just have to consider that it could generate some conflicts/bug with the xenomai patch. So just test it because I didn't. ;)

If you have Ubuntu, you have an easier solution to get a real-time kernel, maybe you can test it. Just install the following package :
http://packages.ubuntu.com/fr/source/lucid-updates/linux-rt

with the command :

Code: Select all
sudo aptitude install linux-rt


I have not tested it yet. But I will very soon. But for this one, consider you will not be able to apply a kernel patch as the kernel is already build. If you want to patch and rebuild your kernel, you will have to do it following this link :
https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO

I do not exactly remember what more the roboard patch gives, I'm not sure it is really needed in new kernels. I have to verify. ;)

Good luck !
Gilles
Hello,

I am the author of the geonobot-wiki article you have found.

After applying the kernel patch for Xenomai, you can apply a specific roboard patch if you need. You just have to consider that it could generate some conflicts/bug with the xenomai patch. So just test it because I didn't. ;)

If you have Ubuntu, you have an easier solution to get a real-time kernel, maybe you can test it. Just install the following package :
http://packages.ubuntu.com/fr/source/lucid-updates/linux-rt

with the command :

Code: Select all
sudo aptitude install linux-rt


I have not tested it yet. But I will very soon. But for this one, consider you will not be able to apply a kernel patch as the kernel is already build. If you want to patch and rebuild your kernel, you will have to do it following this link :
https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO

I do not exactly remember what more the roboard patch gives, I'm not sure it is really needed in new kernels. I have to verify. ;)

Good luck !
Gilles
gdo offline
Savvy Roboteer
Savvy Roboteer
Posts: 34
Joined: Fri Dec 17, 2010 5:47 pm

Real time and drivers

Post by Andy2011 » Thu Apr 07, 2011 10:17 am

Post by Andy2011
Thu Apr 07, 2011 10:17 am

Hi,

First of all sorry if i make any mistake putting this message hear(it is my first time posting in a forum).

I am trying to use my roboard with his I2C port to control some brushless motors and A/D and USB ports to get information of sensors . I have an ubuntu running and all my code is in c++. I want to know if i patch my linux to have real time properties, i could still use the functions to write/ read from all the ports from the roboard? Do i need to develope new drivers?

Goodbye

And thanks in advance for your answers
Hi,

First of all sorry if i make any mistake putting this message hear(it is my first time posting in a forum).

I am trying to use my roboard with his I2C port to control some brushless motors and A/D and USB ports to get information of sensors . I have an ubuntu running and all my code is in c++. I want to know if i patch my linux to have real time properties, i could still use the functions to write/ read from all the ports from the roboard? Do i need to develope new drivers?

Goodbye

And thanks in advance for your answers
Andy2011 offline
Newbie
Newbie
Posts: 5
Joined: Thu Apr 07, 2011 10:04 am

Post by gdo » Thu Apr 07, 2011 11:07 am

Post by gdo
Thu Apr 07, 2011 11:07 am

Hello Andy,

If you talk about Xenomai patch and admit you will use Xenomai Native API, I think the Native API tour document would answer your question. Page 7 you can read :

When a real­time task in primary mode issues a regular Linux system call, it is
immediately and transparently migrated by Xenomai to the Linux domain, since
the operation could not be fulfilled into the Xenomai domain directly. At that
point, the real­time task re­enters the Linux kernel at the closest rescheduling
point, and resumes the standard Linux system call procedure. Time­wise, the cost
of such migration obviously depends on the granularity of the Linux kernel.
Specifically, the longest path between two executions of the rescheduling
procedure inside the Linux kernel defines the worst case.


I'm not a Xenomai expert, but I think you will have to study what you need (latency, periods, ...) and check if the roboard worst cases suit your needs. It will determine if you need to rewrite drivers or modify your actual source code. ;)

Gilles
Hello Andy,

If you talk about Xenomai patch and admit you will use Xenomai Native API, I think the Native API tour document would answer your question. Page 7 you can read :

When a real­time task in primary mode issues a regular Linux system call, it is
immediately and transparently migrated by Xenomai to the Linux domain, since
the operation could not be fulfilled into the Xenomai domain directly. At that
point, the real­time task re­enters the Linux kernel at the closest rescheduling
point, and resumes the standard Linux system call procedure. Time­wise, the cost
of such migration obviously depends on the granularity of the Linux kernel.
Specifically, the longest path between two executions of the rescheduling
procedure inside the Linux kernel defines the worst case.


I'm not a Xenomai expert, but I think you will have to study what you need (latency, periods, ...) and check if the roboard worst cases suit your needs. It will determine if you need to rewrite drivers or modify your actual source code. ;)

Gilles
Last edited by gdo on Tue May 17, 2011 3:19 pm, edited 1 time in total.
gdo offline
Savvy Roboteer
Savvy Roboteer
Posts: 34
Joined: Fri Dec 17, 2010 5:47 pm

Post by akay » Tue May 17, 2011 1:51 pm

Post by akay
Tue May 17, 2011 1:51 pm

Hi everyone


I am also interested in using real time capacity with the roboard for an high end robotics research project.

I succesfully installed an ubuntu 10.04 server version, and installed the linux-2.6.34.1-vortex-sg patch available from roboard website.

After this I tried many time to compile and patch a linux kernel for Rt capability. None of my trials worked out until now :

  • I tried to use both RTAI and adeos patch on the patched 2.6.34.1-vortex-sg sources (just 4 lines of difference with 'vanilla' linux-2.6.34.1 ). The system doesn't boot
  • I tried to just use the debian package 'linux-rt', It boots without any problem on a virtualbox that use the SD card as hard drive. However, it fails on the roboard : It seems to be unable to found the SD card as an hard drive
  • I tried to reproduce exactly the tutorial proposed by gdo here : http://geonobot-wiki.toile-libre.org/do ... on_roboard
    It boots fine on virtualbox, however, when booting on the roboard, I got stuck while loading the kernel.


Does anyone succesfully installed any RT linux patch on the roboard ?

I would appreciate any help !
Hi everyone


I am also interested in using real time capacity with the roboard for an high end robotics research project.

I succesfully installed an ubuntu 10.04 server version, and installed the linux-2.6.34.1-vortex-sg patch available from roboard website.

After this I tried many time to compile and patch a linux kernel for Rt capability. None of my trials worked out until now :

  • I tried to use both RTAI and adeos patch on the patched 2.6.34.1-vortex-sg sources (just 4 lines of difference with 'vanilla' linux-2.6.34.1 ). The system doesn't boot
  • I tried to just use the debian package 'linux-rt', It boots without any problem on a virtualbox that use the SD card as hard drive. However, it fails on the roboard : It seems to be unable to found the SD card as an hard drive
  • I tried to reproduce exactly the tutorial proposed by gdo here : http://geonobot-wiki.toile-libre.org/do ... on_roboard
    It boots fine on virtualbox, however, when booting on the roboard, I got stuck while loading the kernel.


Does anyone succesfully installed any RT linux patch on the roboard ?

I would appreciate any help !
akay offline
Newbie
Newbie
Posts: 5
Joined: Tue May 17, 2011 1:37 pm

Post by gdo » Tue May 17, 2011 3:13 pm

Post by gdo
Tue May 17, 2011 3:13 pm

akay wrote:<li>I tried to reproduce exactly the tutorial proposed by gdo here : http://geonobot-wiki.toile-libre.org/do ... on_roboard
It boots fine on virtualbox, however, when booting on the roboard, I got stuck while loading the kernel. </li>
</ul>


Hello,

Do you use a RB-110 or RB-100 ?
Someone contacted me about 2 months ago, he had problems with RB-110. He still have some but he can boot on the real time kernel ;). I'm helping him to solve this.

If you are using the RB-100, did you use exactly same version as mine ? You said you use 10.04 as I used 9.10.

An other thing important, the Vortex86DX is no more supported by new ubuntu version since 10.10. Even if it is writed for i386. See here for more details :
10.10 Maverick Release notes
See in the Linux kernel 2.6.35 section.

gdo
akay wrote:<li>I tried to reproduce exactly the tutorial proposed by gdo here : http://geonobot-wiki.toile-libre.org/do ... on_roboard
It boots fine on virtualbox, however, when booting on the roboard, I got stuck while loading the kernel. </li>
</ul>


Hello,

Do you use a RB-110 or RB-100 ?
Someone contacted me about 2 months ago, he had problems with RB-110. He still have some but he can boot on the real time kernel ;). I'm helping him to solve this.

If you are using the RB-100, did you use exactly same version as mine ? You said you use 10.04 as I used 9.10.

An other thing important, the Vortex86DX is no more supported by new ubuntu version since 10.10. Even if it is writed for i386. See here for more details :
10.10 Maverick Release notes
See in the Linux kernel 2.6.35 section.

gdo
gdo offline
Savvy Roboteer
Savvy Roboteer
Posts: 34
Joined: Fri Dec 17, 2010 5:47 pm

Post by akay » Tue May 17, 2011 5:38 pm

Post by akay
Tue May 17, 2011 5:38 pm

Actually we are using an RB 110 board. Since it is the same chip, I did not thought that it made a big difference.

I tried your tutorial with different version, and also with the exact same kernel version that you shown in your tutorial.
Actually we are using an RB 110 board. Since it is the same chip, I did not thought that it made a big difference.

I tried your tutorial with different version, and also with the exact same kernel version that you shown in your tutorial.
akay offline
Newbie
Newbie
Posts: 5
Joined: Tue May 17, 2011 1:37 pm

Post by gdo » Tue May 17, 2011 7:39 pm

Post by gdo
Tue May 17, 2011 7:39 pm

Ok, I will check my tutorial carefully to be sure nothing is missing.
Ok, I will check my tutorial carefully to be sure nothing is missing.
gdo offline
Savvy Roboteer
Savvy Roboteer
Posts: 34
Joined: Fri Dec 17, 2010 5:47 pm

Post by akay » Tue May 31, 2011 12:32 pm

Post by akay
Tue May 31, 2011 12:32 pm

Hi


so after some trials, I succeeded to install a rt-preempt kernel using the linux rt patch.

It supports lot of features of the roboard, like the VGA card, the Ethernet, and the roboard wifi card, out of the box ! For this I had to use the exact 2.6.33 kernel, since :

  • it have support of the RDC IDE controller driver (CONFIG_PATA_RDC=y)
  • it does have the support of VIA VT6655 chip for wireless in a staging driver (CONFIG_VT6655=m)
  • I also have to modify the ext4 support in the kernel from module to build in (m -> y). Why did Roboard guys put this file system in a module rather than built-in support, since it is almost the default on lucid lynx to use ext4 filesystem (at least they did not put in their tutorial any advice to use ext3 rather than ext4)

So in short :
and was able to boot on the kernel with an ubuntu 10.04. This version is mandatory for me since it is for a 4 year project, and we need Long term support for this. 9.10 is clearly not an option.

For now I am getting poor latency result and I am checking how to change the configuration to have better result. Indeed the results are strange. I did not have any repeatability. The same test could give jitter latency of about 1ms (really bad) down to 246 us ! I used the cyclictest tool coming from rt patch users, and here are the output of some different test under the same condition (no load at all) :

Code: Select all
user@host $ sudo ./cyclictest -p 89 -n
WARNING: High resolution timers not available
policy: fifo: loadavg: 0.00 0.00 0.00 1/139 6188             

T: 0 ( 5857) P:89 I:1000 C:80394045 Min:    238 Act:  244 Avg:  246 Max:     411

user@host $ sudo ./cyclictest -p 89 -n
WARNING: High resolution timers not available
policy: fifo: loadavg: 0.06 0.02 0.00 1/141 6230         

T: 0 ( 6230) P:89 I:1000 C:   7875 Min:    879 Act:  886 Avg:  887 Max:     929

user@host $ sudo ./cyclictest -p 89 -n
WARNING: High resolution timers not available
policy: fifo: loadavg: 0.00 0.00 0.00 1/139 6256         

T: 0 ( 6251) P:89 I:1000 C:3603080 Min:    278 Act:  284 Avg:  286 Max:     473


So if anyone has better experience with linux realtime system or this particular patch, or have any idea that could explain this behavior, he is welcome !

Finally, once my setup will be completely ready and functionnal, I may also provide some debian packages for lucid.
    Hi


    so after some trials, I succeeded to install a rt-preempt kernel using the linux rt patch.

    It supports lot of features of the roboard, like the VGA card, the Ethernet, and the roboard wifi card, out of the box ! For this I had to use the exact 2.6.33 kernel, since :

    • it have support of the RDC IDE controller driver (CONFIG_PATA_RDC=y)
    • it does have the support of VIA VT6655 chip for wireless in a staging driver (CONFIG_VT6655=m)
    • I also have to modify the ext4 support in the kernel from module to build in (m -> y). Why did Roboard guys put this file system in a module rather than built-in support, since it is almost the default on lucid lynx to use ext4 filesystem (at least they did not put in their tutorial any advice to use ext3 rather than ext4)

    So in short :
    and was able to boot on the kernel with an ubuntu 10.04. This version is mandatory for me since it is for a 4 year project, and we need Long term support for this. 9.10 is clearly not an option.

    For now I am getting poor latency result and I am checking how to change the configuration to have better result. Indeed the results are strange. I did not have any repeatability. The same test could give jitter latency of about 1ms (really bad) down to 246 us ! I used the cyclictest tool coming from rt patch users, and here are the output of some different test under the same condition (no load at all) :

    Code: Select all
    user@host $ sudo ./cyclictest -p 89 -n
    WARNING: High resolution timers not available
    policy: fifo: loadavg: 0.00 0.00 0.00 1/139 6188             

    T: 0 ( 5857) P:89 I:1000 C:80394045 Min:    238 Act:  244 Avg:  246 Max:     411

    user@host $ sudo ./cyclictest -p 89 -n
    WARNING: High resolution timers not available
    policy: fifo: loadavg: 0.06 0.02 0.00 1/141 6230         

    T: 0 ( 6230) P:89 I:1000 C:   7875 Min:    879 Act:  886 Avg:  887 Max:     929

    user@host $ sudo ./cyclictest -p 89 -n
    WARNING: High resolution timers not available
    policy: fifo: loadavg: 0.00 0.00 0.00 1/139 6256         

    T: 0 ( 6251) P:89 I:1000 C:3603080 Min:    278 Act:  284 Avg:  286 Max:     473


    So if anyone has better experience with linux realtime system or this particular patch, or have any idea that could explain this behavior, he is welcome !

    Finally, once my setup will be completely ready and functionnal, I may also provide some debian packages for lucid.
      akay offline
      Newbie
      Newbie
      Posts: 5
      Joined: Tue May 17, 2011 1:37 pm

      Next
      Next
      17 postsPage 1 of 21, 2
      17 postsPage 1 of 21, 2