Xenomai master -> BBB RCNelson 3.13-bone5 kernel patches

916 views
Skip to first unread message

t-szczyrba

unread,
Feb 2, 2014, 11:04:45 AM2/2/14
to beagl...@googlegroups.com
Dear sirs,

I've done some work concerning porting ipipe patches to Robert Nelson 3.13-bone5 kernel.
The patches & short descriptions how to apply are stored here:
https://github.com/t-szczyrba/bbb-xenomai-patches

Please read Robert C Nelson kernel installation documentation as well as xenomai installation documentation before playing with it,

regards,

T.

Charles Steinkuehler

unread,
Feb 3, 2014, 9:21:50 AM2/3/14
to beagl...@googlegroups.com
Very exciting, thanks for sharing!

Keep us posted, I'm hoping at some point a Xenomai patched kernel with
SGX GPU support will be possible. You might also want to let the folks
on the Xenomai list know you're working on this, there may be someone
else trying to do something similar.

--
Charles Steinkuehler
cha...@steinkuehler.net

dlewin555

unread,
Feb 3, 2014, 9:45:17 AM2/3/14
to beagl...@googlegroups.com
Is it possible to get a same instructions list for the official one ?

Until now I was using your machinekit Charles, but I'd like to use my own Xenomai that I could 
change options (to add Traces, reduces latency, etc) .After getting the R. Nelson and checkout
to 3.8 repo I'm lost to the next things to do .

If it bothers you here, I can create a dedicated post however.

PS if it can helps after successfully found how to do it I could put it on a doc that way nobody would ask anymore.

Charles Steinkuehler

unread,
Feb 3, 2014, 9:54:51 AM2/3/14
to beagl...@googlegroups.com
On 2/3/2014 8:45 AM, dlewin555 wrote:
> Is it possible to get a same instructions list for the official
> one<http://git.xenomai.org/xenomai-2.6.git/tree/ksrc/arch/arm/patches/README>?
>
> Until now I was using your machinekit Charles, but I'd like to use my
> own Xenomai that I could change options (to add Traces, reduces
> latency, etc) .After getting the R. Nelson and checkout to 3.8 repo
> I'm lost to the next things to do .
>
> If it bothers you here, I can create a dedicated post however.
>
> PS if it can helps after successfully found how to do it I could put
> it on a doc that way nobody would ask anymore.

For the MachineKit Xenomai kernels it's very easy, and identical to
working with Robert Nelson's kernels. You just work from my github
repository instead of his (I've added the Xenomai patches to the
laundry-list of BeagleBone patches his scripts apply):

https://github.com/cdsteinkuehler/linux-dev

You run the ./build_kernel.sh script, so the BeagleBone and Xenomai
patches will be applied. You can then edit the configuration as desired
and rebuild the kernel using tools/rebuild.sh

The latest configuration tweaks I have made at the suggestion of the
Xenomai folks may be found in the 3.8.13-bone39-xenomai branch. If you
find any configuration changes that help with latency or performance,
please let me know!

--
Charles Steinkuehler
cha...@steinkuehler.net

David Lewin

unread,
Feb 3, 2014, 10:38:28 AM2/3/14
to beagl...@googlegroups.com
Thanks a lot Charles it helps me a lot.

What I am doing is trying indeed to experiment and benchmark Xenomai with Beablegone. Thus, I did some tests from your machinekit in SD Card  

In "mesures 1" I've used a set_periodic_timer to toggle a gpio with a 2000 uS task as another process was doing  : ping -f localhost -s 65000 >/dev/null

Dans mesures 2 I did the same  + latency_test -p 100 -T 240.

Check the results here

As I was a bit wondering I did a latency test  during 1 h but did before echo 0 > /proc/xenoami/latency (instead of 4999 ) :

lat min|—-lat avg|—-lat max|-overrun|—msw|—lat best|–lat worst
11.083| 13.874     | 24.416    | 0          | 0          | 6.374     | 32.791

As I m somewhat surprised by these results -even if they are in user space- I'd like to get more familiar with the build, and being able to put the Machinekit or Xenomai image directly in eMMC to avoid SD accesses , hoping to have better latency results.

David



2014-02-03 Charles Steinkuehler <cha...@steinkuehler.net>:

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/HqwuSu2tLe8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Charles Steinkuehler

unread,
Feb 3, 2014, 11:51:21 AM2/3/14
to beagl...@googlegroups.com
On 2/3/2014 9:38 AM, David Lewin wrote:
> Thanks a lot Charles it helps me a lot.
>
> As I m somewhat surprised by these results -even if they are in user space-
> I'd like to get more familiar with the build, and being able to put the
> Machinekit or Xenomai image directly in eMMC to avoid SD accesses , hoping
> to have better latency results.

You can use the Xenomai kernel with any of the Debian images from RCN,
just install to the eMMC then update the kernel.

The MachineKit images are on SD card to support LinuxCNC and it's (large
set of) build dependencies. You can get a much lighter-weight system
running Xenomai if that's all you are interested in.

You'll probably still want to compile and install the Xenomai user-space
tools (or copy the /home/linuxcnc/xenomai-2.6 folder from the MachineKit
install), but the build requirements are much lighter for Xenomai than
for LinuxCNC.

--
Charles Steinkuehler
cha...@steinkuehler.net

David Lewin

unread,
Feb 3, 2014, 12:30:48 PM2/3/14
to beagl...@googlegroups.com
You can use the Xenomai kernel with any of the Debian images from RCN,
just install to the eMMC then update the kernel
Whereas I m quite ok with the use of Xenomai, I'm not really at ease with the way to build it, the Readme is clear but some steps are missings for me.

You can get a much lighter-weight system running Xenomai if that's all you are interested in
Exactly my purpose,  I'll stay in user space (no RTDM driver)

You'll probably still want to compile and install the Xenomai user-space
tools (or copy the /home/linuxcnc/xenomai-2.6 folder from the MachineKit
install), but the build requirements are much lighter for Xenomai than
for LinuxCNC

If I've understood what you said, I'd better have to copy from the built image /home/linuxcnc/xenomai-2.6, but 
that won't suffice to have eMMC working.




2014-02-03 Charles Steinkuehler <cha...@steinkuehler.net>:

--
Charles Steinkuehler
cha...@steinkuehler.net

Charles Steinkuehler

unread,
Feb 3, 2014, 4:11:43 PM2/3/14
to beagl...@googlegroups.com
On 2/3/2014 11:30 AM, David Lewin wrote:
> *You can use the Xenomai kernel with any of the Debian images from RCN,just
> install to the eMMC then update the kernel*
> Whereas I m quite ok with the use of Xenomai, I'm not really at ease with
> the way to build it, the
> Readme<http://git.xenomai.org/xenomai-2.6.git/tree/ksrc/arch/arm/patches/README>
> is
> clear but some steps are missings for me.

There's not much to building the user-space Xenomai tools from scratch,
either follow along with the Xenomai instructions, or you can refer to
the scripts that get run when I build my images:

https://github.com/cdsteinkuehler/omap-image-builder/blob/MachineKit/machinekit/scripts/003.make-xenomai.shu

https://github.com/cdsteinkuehler/omap-image-builder/blob/MachineKit/machinekit/scripts/004.make-xenomai.shr

The *.shu script is run as a normal user (linuxcnc), and the *.shr
script is run as root.

You can do this on your preferred version of Debian/Ubuntu running out
of the eMMC (just grab one of RCN's eMMC flasher images). That and
swapping out the kernel gets you a working Xenomai system. Anything
else you need you should be able to pull in with a simple "aptitude
install whatever".

--
Charles Steinkuehler
cha...@steinkuehler.net

David Lewin

unread,
Feb 4, 2014, 5:24:46 AM2/4/14
to beagl...@googlegroups.com
I think I've misunderstood finally, you were explaining me how to build tools , so indeed : I've reproduced the operations manually as from the shu script

Besides, from the Readme : 
first run (to setup baseline tree): ./build_kernel.sh
then modify files under KERNEL directory
then run (to rebuild with your changes): ./tools/rebuild.sh

seems what you were talking about, therefore my modifications will be in the 2nd part.

just grab one of RCN's eMMC flasher images
That and swapping out the kernel gets you a working Xenomai system. 

Then, I only copy the built xenomai linuxcnc kernel onto this RCN's eMMC image ? no dependency (libs, ...) 

Charles Steinkuehler

unread,
Feb 4, 2014, 7:39:12 AM2/4/14
to beagl...@googlegroups.com
On 2/4/2014 4:24 AM, David Lewin wrote:
>
> just grab one of RCN's eMMC flasher images
>> That and swapping out the kernel gets you a working Xenomai system.
>
> Then, I only copy the built xenomai linuxcnc kernel onto this RCN's eMMC
> image ? no dependency (libs, ...)

No dependencies are required for the kernel, and the kernel interface is
standard enough you can swap out versions without having to recompile
everything that sits above the kernel.

So yes, you can just swap out the kernel. Especially a 3.8.13 kernel
for a 3.8.13 kernel patched with Xenomai! They are virtually identical.

--
Charles Steinkuehler
cha...@steinkuehler.net

David Lewin

unread,
Feb 4, 2014, 9:42:21 AM2/4/14
to beagl...@googlegroups.com
Thank you for this Charles. 



2014-02-04 Charles Steinkuehler <cha...@steinkuehler.net>:

--
Charles Steinkuehler
cha...@steinkuehler.net

David Lewin

unread,
Feb 7, 2014, 9:09:43 AM2/7/14
to beagl...@googlegroups.com
Charles,
My tries didn't succeeded, but I'm sure I've missed the good kernel :
which could boot and run. 
It use currently : 3.8.13-bone36
I then build the linux-dev where /deploy/3.11.0-rc1-armv7-d1.zimage to overwrite the bbb /boot/uboot
which lead me to a wrong boot : 4 leds fixed.

Therefore, please where to get the correct kernel to swap from ?


2014-02-04 David Lewin <dlew...@gmail.com>:

Robert Nelson

unread,
Feb 7, 2014, 9:33:21 AM2/7/14
to Beagle Board
On Fri, Feb 7, 2014 at 8:09 AM, David Lewin <dlew...@gmail.com> wrote:
Charles,
My tries didn't succeeded, but I'm sure I've missed the good kernel :
which could boot and run. 
It use currently : 3.8.13-bone36
I then build the linux-dev where /deploy/3.11.0-rc1-armv7-d1.zimage to overwrite the bbb /boot/uboot
which lead me to a wrong boot : 4 leds fixed.

Therefore, please where to get the correct kernel to swap from ?

If you built/installed "3.11.0-rc1-armv7-d1.zimage" then you didn't follow the directions posted, as that would have been the "master" branch of linux-dev..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

David Lewin

unread,
Feb 7, 2014, 9:48:20 AM2/7/14
to beagl...@googlegroups.com
I've followed : 

For the MachineKit Xenomai kernels it's very easy, and identical to
working with Robert Nelson's kernels.  You just work from my github
repository instead of his (I've added the Xenomai patches to the
laundry-list of BeagleBone patches his scripts apply):
https://github.com/cdsteinkuehler/linux-dev
You run the ./build_kernel.sh script, so the BeagleBone and Xenomai
patches will be applied.  You can then edit the configuration as desired
and rebuild the kernel using tools/rebuild.sh

which may be wrong, but : 
git branch  
within linux-dev is correctly pointing to master.

What did I've missed


2014-02-07 Robert Nelson <robert...@gmail.com>:

--

Charles Steinkuehler

unread,
Feb 7, 2014, 10:00:18 AM2/7/14
to beagl...@googlegroups.com
If you're using my linux-dev repository, you need to check out the
appropriate branch, master is not intended for actual use.

On 2/7/2014 8:48 AM, David Lewin wrote:
> I've followed :
>
>> For the MachineKit Xenomai kernels it's very easy, and identical to
>> working with Robert Nelson's kernels. You just work from my github
>> repository instead of his (I've added the Xenomai patches to the
>> laundry-list of BeagleBone patches his scripts apply):
>> https://github.com/cdsteinkuehler/linux-dev
>> You run the ./build_kernel.sh script, so the BeagleBone and Xenomai
>> patches will be applied. You can then edit the configuration as desired
>> and rebuild the kernel using tools/rebuild.sh
>
>
> which may be wrong, but :
> *git branch *
--
Charles Steinkuehler
cha...@steinkuehler.net

David Lewin

unread,
Feb 7, 2014, 10:55:50 AM2/7/14
to beagl...@googlegroups.com
Therefore, this would need to

- git checkout to branch /3.8.13-bone36 as the emmc flasher kernel use this one
- build_kernel.sh anew

is that right ?
if yes, I couldn't retrieve where to set the branch to co.






2014-02-07 Charles Steinkuehler <cha...@steinkuehler.net>:

Charles Steinkuehler

unread,
Feb 7, 2014, 11:38:37 AM2/7/14
to beagl...@googlegroups.com
If you're wanting a Xenomai kernel, you should:

git checkout --track 3.8.13-bone39-xenomai

...then run the build-kernel.sh script.

If you want a plain kernel, pull from Robert's repository and use one of
the 3.8.13-bone* tags. It's not a branch so when you checkout the tag
you'll get a "detatched head" warning. You can ignore this (until you
have changes you want to push back upstream) and just build the kernel
as usual.
--
Charles Steinkuehler
cha...@steinkuehler.net

John Syn

unread,
Feb 7, 2014, 4:36:21 PM2/7/14
to beagl...@googlegroups.com

On 2/7/14, 8:38 AM, "Charles Steinkuehler" <cha...@steinkuehler.net>
wrote:

>If you're wanting a Xenomai kernel, you should:
>
>git checkout --track 3.8.13-bone39-xenomai
>
>...then run the build-kernel.sh script.
>
>If you want a plain kernel, pull from Robert's repository and use one of
>the 3.8.13-bone* tags. It's not a branch so when you checkout the tag
>you'll get a "detatched head" warning. You can ignore this (until you
>have changes you want to push back upstream) and just build the kernel
>as usual.
Why not checkout the am33x-v3.8 branch? That way you can track the changes
Robert makes to his v3.8 branch. I find it easier to patch Robert¹s
linux-dev repo with your xenomai changes and then I¹m always up to date
with Robert¹s changes. It might be even easier to have Robert add a
Xenomai branch.

Regards,
John
>You received this message because you are subscribed to the Google Groups
>"BeagleBoard" group.
>To unsubscribe from this group and stop receiving emails from it, send an

David Lewin

unread,
Feb 8, 2014, 5:15:47 AM2/8/14
to beagl...@googlegroups.com
I 200% agree : that's why I was refering to it : 

Is it possible to get a same instructions list for the official one ?

anyway with a checkout from any branch, I'm not sure that xenomai will be compiled as from docs, blog, forums, book
it's clearly precise that not all kernel version accept xenomai patches. Therefore, from my understanding only 1 commit is currenlty guaranteed to work : 

---- Beaglebone

1- Checkout the "am33x-v3.8" branch in the Robert Nelson repository [3], 
the patch has been tested with commit 3fc8a73d782231ab2750ff29793a760e8fa076bb
2- apply beaglebone/ipipe-core-3.8.13-beaglebone-pre.patch
3- apply ipipe-core-3.8.13-arm-1.patch
4- apply beaglebone/ipipe-core-3.8.13-beaglebone-post.patch
5- you can resume to generic installation instructions.

 
John: until now I've been just compiled vanilla kernels, -ie no xenomai worked- could you please indicate what are these steps you have followed to compile it ?

Charles Steinkuehler

unread,
Feb 8, 2014, 7:16:45 AM2/8/14
to beagl...@googlegroups.com
On 2/8/2014 4:15 AM, David Lewin wrote:
> I 200% agree : that's why I was refering to it :
>
> Is it possible to get a same instructions list for the official
> one<http://git.xenomai.org/xenomai-2.6.git/tree/ksrc/arch/arm/patches/README>

I wrote those instructions, and the scripts I added to the linux-dev
kernel builder follow the official Xenomai instructions for how to build
a kernel.

The specific git commit referenced in the instructions above was known
to work when the instructions were written, and is listed because the
Xenomai folks wanted a specific commit and not just a branch. Once
everything got sorted out, I have been able to apply the Xenomai patches
to any of the 3.8.13 kernels without issue.

--
Charles Steinkuehler
cha...@steinkuehler.net

John Syn

unread,
Feb 8, 2014, 9:39:14 PM2/8/14
to beagl...@googlegroups.com

From: David Lewin <dlew...@gmail.com>
Reply-To: <beagl...@googlegroups.com>
Date: Saturday, February 8, 2014 at 2:15 AM
To: <beagl...@googlegroups.com>
Subject: Re: [beagleboard] Xenomai master -> BBB RCNelson 3.13-bone5 kernel patches

I 200% agree : that's why I was refering to it : 

Is it possible to get a same instructions list for the official one ?

anyway with a checkout from any branch, I'm not sure that xenomai will be compiled as from docs, blog, forums, book
it's clearly precise that not all kernel version accept xenomai patches. Therefore, from my understanding only 1 commit is currenlty guaranteed to work : 

---- Beaglebone

1- Checkout the "am33x-v3.8" branch in the Robert Nelson repository [3], 
the patch has been tested with commit 3fc8a73d782231ab2750ff29793a760e8fa076bb
2- apply beaglebone/ipipe-core-3.8.13-beaglebone-pre.patch
3- apply ipipe-core-3.8.13-arm-1.patch
4- apply beaglebone/ipipe-core-3.8.13-beaglebone-post.patch
5- you can resume to generic installation instructions.

 
John: until now I've been just compiled vanilla kernels, -ie no xenomai worked- could you please indicate what are these steps you have followed to compile it ?
Way to complicated. Simply clone Robert’s linux-dev repo and apply the attached patch. Build the kernel as normal.

Regards,
John
cds_xenomai.patch

David Lewin

unread,
Feb 9, 2014, 12:51:13 PM2/9/14
to beagl...@googlegroups.com
OK will give it a try, thanks for the tip.

David Lewin

unread,
Feb 10, 2014, 8:43:03 AM2/10/14
to beagl...@googlegroups.com
John, 
from the KERNEL dir :
patch -p1 < cds_xenomai.patch 

outputs error on : 

Can't find file at

@@ -866,12 +866,40 @@ saucy () { 


John Syn

unread,
Feb 10, 2014, 2:49:13 PM2/10/14
to beagl...@googlegroups.com
From: David Lewin <dlew...@gmail.com>
Reply-To: <beagl...@googlegroups.com>
Date: Monday, February 10, 2014 at 5:43 AM

To: <beagl...@googlegroups.com>
Subject: Re: [beagleboard] Xenomai master -> BBB RCNelson 3.13-bone5 kernel patches

John, 
from the KERNEL dir :
patch -p1 < cds_xenomai.patch 

outputs error on : 

Can't find file at

@@ -866,12 +866,40 @@ saucy () { 
Did you checkout the am33x-v3.8 branch?
git checkout am33x-v3.8 
Place the patch so that it is in the same folder as linux-dev, not in the linux-dev folder.
patch –p1 < ../cds_xenomai.patch

Regards,
John

David Lewin

unread,
Feb 11, 2014, 3:34:20 AM2/11/14
to beagl...@googlegroups.com
Redid clone + checkout am33x-v3.8 
Doing so then display: 
david@debian:~/BBB/linux-dev$ patch –p1 < ../cds_xenomai.patch
patching file –p1
Hunk #1 FAILED at 866.
Hunk #2 FAILED at 885.
2 out of 2 hunks FAILED -- saving rejects to file –p1.rej
patching file –p1
Hunk #1 FAILED at 158.
Hunk #2 FAILED at 187.
2 out of 2 hunks FAILED -- saving rejects to file –p1.rej

David Lewin

unread,
Feb 11, 2014, 9:12:48 AM2/11/14
to beagl...@googlegroups.com
This doens't work neither : git status : 
# On branch 3.8.13-bone39-xenomai
nothing to commit (working directory clean)

  • ./build_kernel.sh :
generates a  3.11.0-rc1-armv7-d1.zImage



Robert Nelson

unread,
Feb 11, 2014, 9:26:19 AM2/11/14
to Beagle Board
On Tue, Feb 11, 2014 at 8:12 AM, David Lewin <dlew...@gmail.com> wrote:
This doens't work neither : git status : 
# On branch 3.8.13-bone39-xenomai
nothing to commit (working directory clean)

  • ./build_kernel.sh :
generates a  3.11.0-rc1-armv7-d1.zImage

Lets... see..


branch/tag: 3.8.13-bone39-xenomai
build: BUILD=bone39

Just checkout the branch like a normal user.


Regards,

John Syn

unread,
Feb 11, 2014, 1:49:36 PM2/11/14
to beagl...@googlegroups.com

From: Robert Nelson <robert...@gmail.com>
Reply-To: <beagl...@googlegroups.com>
Date: Tuesday, February 11, 2014 at 6:26 AM
To: Beagle Board <beagl...@googlegroups.com>

Subject: Re: [beagleboard] Xenomai master -> BBB RCNelson 3.13-bone5 kernel patches
Hi Robert,

This would be the easiest solution, but Charles doesn’t always keep up to date with your latest patches. Last I checked, Charles was still at bone36 when you were at bone41. The way I do this is to checkout both your linux-dev and Charles linux-dev and then use BeyondCompare to update your repo with the xenomai changes from Charles repo. I only have to do this once and thereafter, I simply pull from your updates and I get the latest updates. 

I understand that I should be able to track both repos using GIT, and get updates from both, but I don’t know how to do this.

Regards,
John 

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

David Lewin

unread,
Feb 12, 2014, 4:47:36 AM2/12/14
to beagl...@googlegroups.com
Indeed, that was my point previously. Thus, as now I m with the Charles' image, what should 
3.8.13xenomai-bone39
correspond to Debian one to swap kernel to ?




You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/HqwuSu2tLe8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

David Lewin

unread,
Feb 12, 2014, 8:49:47 AM2/12/14
to beagl...@googlegroups.com
In other words : what zImage version should I use that would correspond to a specific Debian version ?

John Syn

unread,
Feb 12, 2014, 1:28:21 PM2/12/14
to beagl...@googlegroups.com
From: David Lewin <dlew...@gmail.com>
Reply-To: <beagl...@googlegroups.com>
Date: Wednesday, February 12, 2014 at 5:49 AM
To: <beagl...@googlegroups.com>

Subject: Re: [beagleboard] Xenomai master -> BBB RCNelson 3.13-bone5 kernel patches

In other words : what zImage version should I use that would correspond to a specific Debian version ?
The zImage you build with Charles’ repo can be used with the Robert’s latest Debian build.

Regards,
John

David Lewin

unread,
Feb 13, 2014, 4:52:03 AM2/13/14
to beagl...@googlegroups.com
well not really, it didn't succeeded unlesse the following is wrong:

flashing :
and then overwrite 

scp ../xenomai/cdsteinkuehler/linux-dev/deploy/3.8.13xenomai-bone39.zImage ro...@192.168.7.2:/boot/uboot/zImage

This, allows to boot the board - leds are ok - but  in a way that I can't 
  • ssh to it as 192.168.7.2  
  • ssh to it with a dhcp server running  with ETH connected
  • retrieved any status with my usb serial cable 

Giuseppe Iellamo

unread,
Feb 13, 2014, 5:14:16 AM2/13/14
to beagl...@googlegroups.com

Charles Steinkuehler

unread,
Feb 13, 2014, 6:49:54 AM2/13/14
to beagl...@googlegroups.com
On 2/13/2014 3:52 AM, David Lewin wrote:
> well not really, it didn't succeeded unlesse the following is wrong:
>
> flashing :
>
> rcn-ee.net/deb/microsd/wheezy/bone-debian-7.3-2014-01-24-2gb.img.xz
>
> and then overwrite
>
> scp ../xenomai/cdsteinkuehler/linux-dev/deploy/3.8.13xenomai-bone39.zImage
>> ro...@192.168.7.2:/boot/uboot/zImage
>
>
> This, allows to boot the board - leds are ok - but in a way that I can't
>
> - ssh to it as 192.168.7.2
> - ssh to it with a dhcp server running with ETH connected
> - retrieved any status with my usb serial cable

You might have better luck if you copy over the modules along with the
kernel. There are also the device tree and firmware files, but those
are probably OK w/o being updated.

cd /
tar -xzvf /path/to/xenomai/cdsteinkuehler/linux-dev/
deploy/3.8.13xenomai-bone39-modules.tar.gz

--
Charles Steinkuehler
cha...@steinkuehler.net

David Lewin

unread,
Feb 13, 2014, 9:24:34 AM2/13/14
to beagl...@googlegroups.com
The 3.8.13-bone37 from flashed image is starting with ssh access, etc. 

So be sure :in addition to override the 3.8.13-bone39 .zImage to /boot/uboot over it  I need also to copy 
the deploy/lib/modules/3.8.13xenomai-bone39
 over 
/lib/modules/3.8.13-bone37  

do you confirm ?


Charles Steinkuehler

unread,
Feb 13, 2014, 10:03:43 AM2/13/14
to beagl...@googlegroups.com
In your deploy directory is a tarball containing the kernel modules for
the Xenomai kernel you just compiled. You need to extract those modules
into the appropriate location on your target system. As mentioned
previously, to do this you cd to root and extract the tarball.
--
Charles Steinkuehler
cha...@steinkuehler.net

David Lewin

unread,
Feb 14, 2014, 5:30:59 AM2/14/14
to beagl...@googlegroups.com
Well I found why; this is not exactly to be copied as is from the tarball: build is a symbolic link to KERNEL and source don't need to be copied neither : so kernel dir is left 

David Lewin

unread,
Feb 14, 2014, 6:02:52 AM2/14/14
to beagl...@googlegroups.com
Anyway it didn't changed from the previous behaviour : 
- the board leds are ok, but can't access anymore -as I did with the 3.8.13-bone37 kernel- the 192.168.7.2 seems down
- Usb prolific cable is not answering : but my cable may be in cause


David Lewin

unread,
Feb 16, 2014, 5:44:45 AM2/16/14
to beagl...@googlegroups.com

Seems Adafruit USB cable not not so great after all.
I've managed to get a dhcp server on, reboot the board with external 5V power and finally the board has an IP to ssh : there is is a 3.8.13xenomai-bone39 in there.
For a reason I don't understand the USB gadget interface is not mounted, while the  last connection on Debian could.

David Lewin

unread,
Feb 28, 2014, 11:09:05 AM2/28/14
to beagl...@googlegroups.com
Hi, 

To get a step further to build executable I thought it was easier to directly compile my sources from the board itself, even I'd rather prefer to cross compile anyway. So I've copied the entire linux-dev/KERNEL/xenomai dir to /usr/xenomai/include which solve a bit my compilation dependencies but some remains like asm/xenomai/system.h

From that I have to independant questions : 

- what are all the Xenomai dependencies to install onto the board ?
- cross compiling : I could use the same linaro gnueabihf set in my local pc ( == the one that build_kernel.sh has used ) is it possible to set the Xenomai envirronement libs + includes +etc to be able to compile on the PC ?

Thanks


t-szczyrba

unread,
Feb 28, 2014, 6:23:52 PM2/28/14
to beagl...@googlegroups.com
Have You read the Xenomai install documentation?

The cross-compilation of kernel is pretty straitforward - put the ipipe 3.8 patches over bone tree by hand ( 3.8 preferred - my 3.13 patches probably are not as stable although I've read in the thread that the 3.8 series BBB + Xenomai have also serious mmc stability problem) and run the prepare-kernel.sh script over bone kernel.
The Xenomai 2.6.3 release download & unpack on BBB and compile (assuming You have build tools installed in BBB fs).

At least reasonable is to run the Xenomai tests later,

T.

David Lewin

unread,
Mar 5, 2014, 10:36:50 AM3/5/14
to beagl...@googlegroups.com
Thanks for this answer, anyway you may have missed my previous threads when I've said that I'm not looking for this. My goal is to be able to do tests and programmation with Xenomai, not spending time trying to have it running. Hence my question for how to to compile with the correct environment set ( libs + includes) as it's not complete even when copying from the SD card /lib /include.





--

t-szczyrba

unread,
Mar 5, 2014, 6:13:29 PM3/5/14
to beagl...@googlegroups.com
e


W dniu środa, 5 marca 2014 16:36:50 UTC+1 użytkownik dlewin555 napisał:
Thanks for this answer, anyway you may have missed my previous threads when I've said that I'm not looking for this. My goal is to be able to do tests and programmation with Xenomai, not spending time trying to have it running. Hence my question for how to to compile with the correct environment set ( libs + includes) as it's not complete

OK, but please explain me, what kind of "programming with Xenomai" You think about?
I compile & install xenomai using the BBB build environment in BBB, so have working gcc inside.
The only thing cross-compiled is xenomai kernel & kernel drivers, the rest is "from the inside". Xenomai tests are a great example, how to use the API, because use examples are pretty encapsulated: one part of API - one test. The tests IMHO are better than at least 50% of tutorials I've learnt in my life and the build environment of tests (make + makefiles) shows You how to get everything linked & running.

Ok, I understand it would be better to have Xenomai on BBB running with direct installation from packages or at least to have comfortable build environment for everything for DIY cross-compilation. I can only say, that when I will finish my BBB+Xenomai/IPIPE work for myself (and have the motivation still) I'll try to prepare the git repo BBB+Xenomai+Kernel 3.13 layer for Yocto/Angstrom 1.5 ( the platform I use) ,

T.

 

dlewin555

unread,
Mar 6, 2014, 4:24:59 AM3/6/14
to beagl...@googlegroups.com
I compile & install xenomai using the BBB build environment in BBB, so have working gcc inside. 
The only thing cross-compiled is xenomai kernel & kernel drivers, the rest is "from the inside".

I also have a working gcc inside, but can't "make" when system.h, asm/.../types.h, xeno_config.h are missing. Copy them from the working machinekit on SD doesn't fix the problem.


OK, but please explain me, what kind of "programming with Xenomai" You think about?

The goal is to get really intimate with Real time via Xenomai -I was using µC/OS-II and eCos long time ago. Thus as a start, wanted to characterize it and I've started it with the bone36 SD version but as I wasn't happy with the latency results in user-space. I thought that using it from emmc will avoid SD card additional lantencies and then having better realistic benchmarks.And this is the case currently, latency tests are slightly better, and may be improved . 
 
 Xenomai tests are a great example, how to use the API, because use examples are pretty encapsulated: one part of API - one test. The tests IMHO are better than at least 50% of tutorials I've learnt in my life and the build environment of tests (make + makefiles) shows You how to get everything linked & running.

Indeed, these are really good and almost because there provided by the same people that build Xenomai itself. Anyway, I m' using this (only) book and Tutorial to go through Xenomai's internals and API, which suit me well. But again the makefile you talk about needs the good env. 

For instance, at the end I'd like to be able to use a sensor (9 axes for instances) in primary and display it on Secondary with Qt gui.

 
Ok, I understand it would be better to have Xenomai on BBB running with direct installation from packages or at least to have comfortable build environment for everything for DIY cross-compilation. I can only say, that when I will finish my BBB+Xenomai/IPIPE work for myself (and have the motivation still) I'll try to prepare the git repo BBB+Xenomai+Kernel 3.13 layer for Yocto/Angstrom 1.5 ( the platform I use) ,

That's a good news . I was Previously  using Yocto with my I.MX53QSB and could start things really fast thanks to "push button" recipes.

DL

t-szczyrba

unread,
Mar 8, 2014, 9:11:55 PM3/8/14
to beagl...@googlegroups.com
> I also have a working gcc inside, but can't "make" when system.h, asm/.../types.h, xeno_config.h are missing. Copy them from the working machinekit on SD doesn't fix the problem.

Please send the makefile & gcc output - I suppose you don't have glibc & kernel headers installed in the BBB and don't know machinekit how is it to be installed. Is the machinekit something like linuxcnc + Ubuntu derivative?

regards,

T.

David Lewin

unread,
Mar 10, 2014, 9:14:59 AM3/10/14
to beagl...@googlegroups.com
With the provided files in attachment, I put the include dir from the SD card which is fine when using from machinekit  and compile my toggle_gpio.c :

  • Makefile

 make :
gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -D__XENO__  -g  gpio-utils.c  -lnative -L/usr/xenomai/lib -lxenomai -lpthread -lrt   -lnative   toggle_gpio.c  -lnative -lxenomai -o toggle_gpio
In file included from /usr/xenomai/include/nucleus/thread.h:25:0,
                 from /usr/xenomai/include/nucleus/sched.h:31,
                 from /usr/xenomai/include/native/task.h:25,
                 from toggle_gpio.c:14:
/usr/xenomai/include/nucleus/types.h:36:32: fatal error: asm/xenomai/system.h: No such file or directory
compilation terminated.
make: *** [toggle_gpio] Error 1
root@arm:/home/experiences#

  • I have the glibc:

GNU C Library (Debian EGLIBC 2.18-1) stable release version 2.18, by Roland McGrath et al.
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.8.2.
Compiled on a Linux 3.11.10 system on 2014-02-21.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
libc ABIs: UNIQUE


  • and  didn't installed the kernel headers yet.
  • don't know machinekit how is it to be installed :  well as it's based on patches onto the RCN git repo based, I've used the "build_kernel" which retrieve linaro compiler + sources + and deps accordingly, Therefore, it's Debian based.




--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/HqwuSu2tLe8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

xenomai_Experiences.7z

alexis.ma...@gmail.com

unread,
May 15, 2014, 9:51:34 AM5/15/14
to beagl...@googlegroups.com
Hello dlewin555 


Did you succeed in installing Xenomai on your BBB?

David Lewin

unread,
May 16, 2014, 12:31:42 PM5/16/14
to beagl...@googlegroups.com
Hi,

not as I wanted, ie: using the eMMC to have the best timing as possible.

Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection Antivirus avast! est active.


Robert Nelson

unread,
May 16, 2014, 12:38:52 PM5/16/14
to Beagle Board
On Fri, May 16, 2014 at 11:31 AM, David Lewin <dlew...@gmail.com> wrote:
Hi,

not as I wanted, ie: using the eMMC to have the best timing as possible.

Even with the 8-bit interface, the eMMC is not always the best performer.

(/dev/mmcblk0 is SanDisk Ultra's in this test)

root@arm:/home/debian# hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
 Timing cached reads:   444 MB in  2.00 seconds = 221.64 MB/sec
 Timing buffered disk reads:  58 MB in  3.06 seconds =  18.97 MB/sec

root@arm:/home/debian# hdparm -tT /dev/mmcblk1

/dev/mmcblk1:
 Timing cached reads:   420 MB in  2.01 seconds = 209.43 MB/sec
 Timing buffered disk reads:  36 MB in  3.10 seconds =  11.62 MB/sec

Regards,

David Lewin

unread,
May 16, 2014, 2:53:42 PM5/16/14
to beagl...@googlegroups.com
Interesting. It's the kind of test I want to implement : comparing Xenomai on Flash and SD card .
Is it still better with writes operations ?
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/HqwuSu2tLe8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages