Skip to contentSkip to conversation

How to use RTnet on xenomai3?

DISCUSSION François Legal 3 participants 5 messages Apr 1, 2021 – Apr 5, 2021

lore
Share & tools
lore
#0 lore raw
Quoted 99 lines · ashwin damle via Xenomai

Hello Support,

I was able to locate the drivers for rtnet (/lib/modules/uname -r/kernel/drivers/xenomai/net/drivers) and rtnet.conf is located at /usr/xenomai/etc. It did not require compiling RTnet separately.

I tried following steps mentioned at
https://source.denx.de/Xenomai/xenomai/-/wikis/RTnet_Setup. The non-realtime driver is e100 for my Ethernet controller. I followed the steps and also loaded the rt_eepro100 hoping that is the real-time driver I should use. The ethernet controller I have is Intel Corporation PRO/100 VE.

Output of sudo lspci -nn
*04:08.0 Ethernet controller [0200]: Intel Corporation PRO/100 VE Network Connection [8086:1094] (rev 01)*

However, when I unload the e100 driver, loading the rt_eepro100 driver, and configuring rtnet.conf as mentioned on the RTnet_Setup page, I could only see the loopback.
from running sudo ../sbin/rtifconfig

rtlo Medium: Local Loopback
IP address: 127.0.0.1
UP LOOPBACK RUNNING MTU: 1500

There was a solution posted at
https://www.mail-archive.com/[email protected]/msg02766.html
is

drivers/rt_eepro100.c +1 -0
index 15282e4..c6a1c93 100644
@@ -1975,6 +1975,7 @@ static struct pci_device_id eepro100_pci_tbl[]
 __devinitdata = {
        { PCI_VENDOR_ID_INTEL, 0x103C, PCI_ANY_ID, PCI_ANY_ID, },
        { PCI_VENDOR_ID_INTEL, 0x103D, PCI_ANY_ID, PCI_ANY_ID, },
        { PCI_VENDOR_ID_INTEL, 0x103E, PCI_ANY_ID, PCI_ANY_ID, },
+       { PCI_VENDOR_ID_INTEL, 0x1092, PCI_ANY_ID, PCI_ANY_ID, },
        { PCI_VENDOR_ID_INTEL, 0x1227, PCI_ANY_ID, PCI_ANY_ID, },
        { PCI_VENDOR_ID_INTEL, 0x1228, PCI_ANY_ID, PCI_ANY_ID, },
        { PCI_VENDOR_ID_INTEL, 0x2449, PCI_ANY_ID, PCI_ANY_ID, },

I seems to work for Breno, but I cannot understand what to do with it.

I am using Trisquel Linux kernel Linux gnu 4.19.89 with Xenomai 3.1.

I think I am close to running RTnet and would appreciate it if some guidance is provided.

Ashwin Damle

Quoted 45 lines · ashwin damle

Dear Xenomai support,

I am successfully able to run xenomai3.1 on 4.19.89 on my core-2-duo machine. Xenomai works nice. Further I want to use RTnet.

From
https://source.denx.de/Xenomai/xenomai/-/wikis/RTnet#installation-folder-overview
I learnt that RTNet is built into Xenomai 3 and so I need not download from the rtnet page and build it separately. If so then where do I start using RTNET? Is there any example? The folder mentioned at
https://source.denx.de/Xenomai/xenomai/-/wikis/RTnet_Setup do appear on my computer.

From https://source.denx.de/Xenomai/xenomai/-/wikis/RTnet_Setup I> > understand that /usr/local/rtnet/ is the directory where the RTNET files including documentation would be, but this folder is not created on my
system. Therefore, I tried building RTNET from source using the
instructions in the README: I get the error as below

I request your help with an error.
"checking for RT-extension... configure: error: *** RT-extended kernel not found in /lib/modules/4.19.89_xenomai/build
makefile:51: recipe for target 'config.status' failed
"
I found that many have resolved the problems from by searching for the error and 5 pages direct to the same solution and that is

./configure --with-linux=/path/to/linux-source-with-xenomai-extension --with-rtext-config=/path/to/xeno-config

My doubts are

1. Is it necessary to build RTNet from source or is it built in Xenomai 3? If it is built in then how do I use it. Some steps will be helpful.> >
2. If the RTNet is to be built from source then how to solve the above error. I pointed to the Linux source tree I used to build the xenomai kernel but it throws the same error.

3. What does " /path/to/linux-source-with-xenomai-extension mean the Linux source folder of Xenomai patched kernel? or does it mean "/lib/modules/uname-r/build"....None works for me. /path/to/xeno-config seems to be /usr/xenomai on my machine since xeno-config resides there.

Please help with this. Let me know if you require any more information.

Quoted 7 lines
Quoted 3 lines

--
Ashwin Damle

--
Ashwin Damle

Hi Ashwin,

you might want to try to modify the patch like
+ { PCI_VENDOR_ID_INTEL, 0x1094, PCI_ANY_ID, PCI_ANY_ID, },*

rebuild the module and try again

François

#1 lore raw

arm32: 5.4.107 ipipe patch - bad kernel version choice ;)

Hi,

I just checked this patch on one of my imx6q boards:

https://xenomai.org/downloads/ipipe/v5.x/arm/ipipe-core-5.4.107-arm-1.patch

One problem is, that 5.4.107 does not seem to be a good choice due to this crash:

https://pastebin.com/EzUE6i3f

This is __NOT__ caused by the ipipe patch as far as I can tell and happens also on various 5.10.x kernels, but was resolved in the latest 5.10.x kernels.

So I tried to patch a more recent 5.4.x kernel - 5.4.109, and it does not contain the crash from above anymore.

2 files from the 5.4.107 patch were rejected:

arch/arm/kernel/entry-armv.S.rej
vim arch/arm/vfp/entry.S.rej

It looks like whatever is in entry.S already went upstream and I tried to hack entry-armv.S (please review).

Can you please check my attached/updated patch against upstream 5.4.109, which, after some quick testing, seems to work for me, and update your ipipe-core-5.4.107 to 5.4.109?

Regards,

Robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fake-ipipe-core-5.4.109-arm-1.patch
Type: text/x-patch
Size: 661672 bytes
Desc: not available
URL: <http://xenomai.org/pipermail/xenomai/attachments/20210403/0f9d5c6e/attachment.bin>

#2 lore raw

Re: arm32: 5.4.107 ipipe patch - bad kernel version choice ;)

Quoted 32 lines · Robert Berger via Xenomai

Hi,

I just checked this patch on one of my imx6q boards:

https://xenomai.org/downloads/ipipe/v5.x/arm/ipipe-core-5.4.107-arm-1.patch

One problem is, that 5.4.107 does not seem to be a good choice due to this crash:

https://pastebin.com/EzUE6i3f

This is __NOT__ caused by the ipipe patch as far as I can tell and happens also on various 5.10.x kernels, but was resolved in the latest 5.10.x kernels.

So I tried to patch a more recent 5.4.x kernel - 5.4.109, and it does not contain the crash from above anymore.

2 files from the 5.4.107 patch were rejected:

arch/arm/kernel/entry-armv.S.rej
vim arch/arm/vfp/entry.S.rej

It looks like whatever is in entry.S already went upstream and I tried to hack entry-armv.S (please review).

Can you please check my attached/updated patch against upstream 5.4.109, which, after some quick testing, seems to work for me, and update your ipipe-core-5.4.107 to 5.4.109?

Regards,

Quoted 11 lines

Robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fake-ipipe-core-5.4.109-arm-1.patch
Type: text/x-patch
Size: 661672 bytes
Desc: not available
URL: <
http://xenomai.org/pipermail/xenomai/attachments/20210403/0f9d5c6e/attachment.bin

Quoted 1 line

Thanks for testing, I can update to kernel version 5.4.109.

Thanks

Greg

#3 lore raw

Re: arm32: 5.4.107 ipipe patch - bad kernel version choice ;)

Hi Greg,

My comments are in-line.

Quoted 2 lines · Greg Gallagher

Thanks for testing, I can update to kernel version 5.4.109.

Yes please. And please let me know, so I'll give a spin.

Quoted 4 lines

Thanks

Greg

Regards,

Robert

#4 lore raw

Re: arm32: 5.4.107 ipipe patch - bad kernel version choice ;)

Quoted 11 lines · Robert Berger

Hi Greg,

My comments are in-line.

Quoted 2 lines · Greg Gallagher

Thanks for testing, I can update to kernel version 5.4.109.

Yes please. And please let me know, so I'll give a spin.

Quoted 1 line
Quoted 8 lines
Quoted 3 lines

Thanks

Greg

Regards,

Robert

Hi,
5.4.109 is now in the ipipe-arm tree in the ipipe/5.4.y branch. I'll
generate a patch soon, once I get a handle on the latency issue.

Thanks

Greg