cannot open switchtest device ?
I find a problem trying to run xeno-test when it goes to open the switchtest device. Before this post I searched the web and found a thread started by "raespi".
We have a similar situation in which we are both using buildroot, but I'm not sure that the underlying cause is the same. I am building a kernel for 3.8.13 using
the patches from git, and also the current git xenomai. ( Current as of a month ago ). The target is an custom board based on the iMX53.
To narrow the source of the problem, I modified switchtest.c to report on any case where the open() returns a negative number. I also made a temporary patch
to not prepend the name with "/dev/". I might add that I'm using a new RTDM driver named fpga_rtdm that can be opened and access successfully. Here's what happens:
~ >> xeno-test
Started child 163: /bin/sh /usr/bin/xeno-test-run-wrapper /usr/bin/xeno-test
+ echo 0
+ /usr/bin/arith
mul: 0x79364d93, shft: 26
integ: 30, frac: 0x4d9364d9364d9364
signed positive operation: 0x03ffffffffffffff * 1000000000 / 33000000 inline calibration: 0x0000000000000000: 223.749 ns, rejected 2/10000 inlined llimd: 0x79364d9364d9362f: 1347.417 ns, rejected 4/10000 inlined llmulshft: 0x79364d92ffffffe1: 31.764 ns, rejected 0/10000 inlined nodiv_llimd: 0x79364d9364d9362f: 61.416 ns, rejected 2/10000 out of line calibration: 0x0000000000000000: 225.021 ns, rejected 1/10000 out of line llimd: 0x79364d9364d9362f: 1340.784 ns, rejected 1/10000 out of line llmulshft: 0x79364d92ffffffe1: 30.378 ns, rejected 2/10000 out of line nodiv_llimd: 0x79364d9364d9362f: 59.940 ns, rejected 0/10000
signed negative operation: 0xfc00000000000001 * 1000000000 / 33000000 inline calibration: 0x0000000000000000: 225.024 ns, rejected 0/10000 inlined llimd: 0x86c9b26c9b26c9d1: 1363.566 ns, rejected 3/10000 inlined llmulshft: 0xd45d172d0000001e: 32.283 ns, rejected 1/10000 inlined nodiv_llimd: 0x86c9b26c9b26c9d1: 75.027 ns, rejected 0/10000 out of line calibration: 0x0000000000000000: 225.030 ns, rejected 2/10000 out of line llimd: 0x86c9b26c9b26c9d1: 1363.653 ns, rejected 4/10000 out of line llmulshft: 0xd45d172d0000001e: 31.272 ns, rejected 0/10000 out of line nodiv_llimd: 0x86c9b26c9b26c9d1: 75.045 ns, rejected 0/10000
unsigned operation: 0x03ffffffffffffff * 1000000000 / 33000000 inline calibration: 0x0000000000000000: 226.083 ns, rejected 3/10000 inlined nodiv_ullimd: 0x79364d9364d9362f: 45.735 ns, rejected 1/10000 out of line calibration: 0x0000000000000000: 227.745 ns, rejected 1/10000 out of line nodiv_ullimd: 0x79364d9364d9362f: 57.900 ns, rejected 1/10000
+ /usr/bin/clocktest -C 42 -T 30
== Tested clock: 42 (CLOCK_HOST_REALTIME)
CPU ToD offset [us] ToD drift [us/s] warps max delta [us]
--- -------------------- ---------------- ---------- --------------
0 1.6 -0.004 0 0.0
+ /usr/bin/switchtest -T 30
== Testing FPU check routines...
d0: 1 != 2
d1: 1 != 2
d2: 1 != 2
d3: 1 != 2
d4: 1 != 2
d5: 1 != 2
d6: 1 != 2
d7: 1 != 2
d8: 1 != 2
d9: 1 != 2
d10: 1 != 2
d11: 1 != 2
d12: 1 != 2
d13: 1 != 2
d14: 1 != 2
d15: 1 != 2
== FPU check routines: OK.
== Threads:switchtest open rttest-switchtest0: No such file or directory switchtest open rttest-switchtest1: No such file or directory switchtest open rttest-switchtest2: No such file or directory
...
switchtest open rttest-switchtest254: No such file or directory switchtest open rttest-switchtest255: No such file or directory
switchtest: Unable to open switchtest device.
(modprobe xeno_switchtest ?)
~ >>
~ >> cat /proc/xenomai/rtdm/named_devices
Hash Name Driver /proc 24 rttest-timerbench0 xeno_timerbench rttest-timerbench0 55 rttest-switchtest0 xeno_switchtest rttest-switchtest0 B4 fpga_rtdm fpga_rtdm_driver fpga_rtdm
~ >>
George
Quoted 9 lines · George Pontis
I find a problem trying to run xeno-test when it goes to open the switchtest device. Before this post I searched the web and found a thread started by "raespi".
We have a similar situation in which we are both using buildroot, but I'm not sure that the underlying cause is the same. I am building a kernel for 3.8.13 using
the patches from git, and also the current git xenomai. ( Current as of a month ago ). The target is an custom board based on the iMX53.
Quoted 6 lines
To narrow the source of the problem, I modified
switchtest.cto report on any case where theopen()returns a negative number. I also made a temporary patch
to not prepend the name with "/dev/". I might add that I'm using a new RTDM driver namedfpga_rtdmthat can be opened and access successfully. Here's what happens:
This may look like a stupid suggestion, but that is the only explanation I see: you are probably using glibc's open instead of xenomai's open. This may happen for instance if you are compiling xenomai libraries statically and switchtest Makefile does not use the "wrap-link.sh" script.
Signature · 1 line
Gilles.
Quoted 27 lines
-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]]
Sent: Thursday, July 25, 2013 12:56 PM
To: George Pontis
Cc: [email protected]
Subject: Re: [Xenomai] cannot open switchtest device ?Quoted 11 lines · George Pontis
I find a problem trying to run xeno-test when it goes to open the switchtest device. Before this post I searched the web and found a thread started by "raespi".
We have a similar situation in which we are both using buildroot, but I'm not sure that the underlying cause is the same. I am building a kernel for 3.8.13 using
the patches from git, and also the current git xenomai. ( Current as of a month ago ). The target is an custom board based on the iMX53.To narrow the source of the problem, I modified
switchtest.cto report on any case where theopen()returns a negative number. I also made atemporary
Quoted 4 lines
patch
to not prepend the name with "/dev/". I might add that I'm using a new RTDM driver namedfpga_rtdmthat can be opened and access successfully. Here's what happens:
Quoted 6 lines
This may look like a stupid suggestion, but that is the only explanation I see: you are probably using glibc's open instead of xenomai's open. This may happen for instance if you are compiling xenomai libraries statically and switchtest
Makefiledoes not use the "wrap-link.sh" script. --
Gilles.
Not stupid, that was a useful suggestion. Both are dynamically linked, and I'm actually using uClibc for this embedded system.
I tried to open the switchtest device from my application and it was successful. One difference was that my application was opening these with a call to rt_dev_open(), while the switchtest.c file used open(). Also, when building switchtest the open() is resolved with open64() due to selecting large file support.
A quick mod of the switchtest code to use rt_dev_open() instead of open() would not build without more effort.
George
Quoted 37 lines · George Pontis
Quoted 27 lines
-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]]
Sent: Thursday, July 25, 2013 12:56 PM
To: George Pontis
Cc: [email protected]
Subject: Re: [Xenomai] cannot open switchtest device ?Quoted 11 lines · George Pontis
I find a problem trying to run xeno-test when it goes to open the switchtest device. Before this post I searched the web and found a thread started by "raespi".
We have a similar situation in which we are both using buildroot, but I'm not sure that the underlying cause is the same. I am building a kernel for 3.8.13 using
the patches from git, and also the current git xenomai. ( Current as of a month ago ). The target is an custom board based on the iMX53.To narrow the source of the problem, I modified
switchtest.cto report on any case where theopen()returns a negative number. I also made atemporary
Quoted 4 lines
patch
to not prepend the name with "/dev/". I might add that I'm using a new RTDM driver namedfpga_rtdmthat can be opened and access successfully. Here's what happens:Quoted 6 lines
This may look like a stupid suggestion, but that is the only explanation I see: you are probably using glibc's open instead of xenomai's open. This may happen for instance if you are compiling xenomai libraries statically and switchtest
Makefiledoes not use the "wrap-link.sh" script. --
Gilles.Not stupid, that was a useful suggestion. Both are dynamically linked, and I'm actually using uClibc for this embedded system.
Quoted 7 lines
I tried to open the switchtest device from my application and it was successful. One difference was that my application was opening these with a call to
rt_dev_open(), while theswitchtest.cfile usedopen(). Also, when building switchtest theopen()is resolved withopen64()due to selecting large file support.A quick mod of the switchtest code to use
rt_dev_open()instead ofopen()would not build without more effort.
Ah, thanks for digging. We simply need to implement __wrap_open64 and add open64 to the long list of services we wrap.
Regards.
Signature · 1 line
Gilles.
Quoted 37 lines · George Pontis
Quoted 27 lines
-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]]
Sent: Thursday, July 25, 2013 12:56 PM
To: George Pontis
Cc: [email protected]
Subject: Re: [Xenomai] cannot open switchtest device ?Quoted 11 lines · George Pontis
I find a problem trying to run xeno-test when it goes to open the switchtest device. Before this post I searched the web and found a thread started by "raespi".
We have a similar situation in which we are both using buildroot, but I'm not sure that the underlying cause is the same. I am building a kernel for 3.8.13 using
the patches from git, and also the current git xenomai. ( Current as of a month ago ). The target is an custom board based on the iMX53.To narrow the source of the problem, I modified
switchtest.cto report on any case where theopen()returns a negative number. I also made atemporary
Quoted 4 lines
patch
to not prepend the name with "/dev/". I might add that I'm using a new RTDM driver namedfpga_rtdmthat can be opened and access successfully. Here's what happens:Quoted 6 lines
This may look like a stupid suggestion, but that is the only explanation I see: you are probably using glibc's open instead of xenomai's open. This may happen for instance if you are compiling xenomai libraries statically and switchtest
Makefiledoes not use the "wrap-link.sh" script. --
Gilles.Not stupid, that was a useful suggestion. Both are dynamically linked, and I'm actually using uClibc for this embedded system.
Quoted 7 lines
I tried to open the switchtest device from my application and it was successful. One difference was that my application was opening these with a call to
rt_dev_open(), while theswitchtest.cfile usedopen(). Also, when building switchtest theopen()is resolved withopen64()due to selecting large file support.A quick mod of the switchtest code to use
rt_dev_open()instead ofopen()would not build without more effort.
Hi George,
I added a wrapper for open64, could you try the current git contents, or apply the following patch to the tree you use?
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=d6127b245ed9876ce4153bac2996d88d0d7355c6
Regards.
Signature · 1 line
Gilles.
Quoted 66 lines
-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]]
Sent: Sunday, July 28, 2013 3:04 PM
To: George Pontis
Cc: [email protected]
Subject: Re: [Xenomai] cannot open switchtest device ?Quoted 18 lines · George Pontis
Quoted 18 lines
-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]]
Sent: Thursday, July 25, 2013 12:56 PM
To: George Pontis
Cc: [email protected]
Subject: Re: [Xenomai] cannot open switchtest device ?Quoted 9 lines · George Pontis
I find a problem trying to run xeno-test when it goes to open the switchtest device. Before this post I searched the web and found a thread started by "raespi".
We have a similar situation in which we are both using buildroot, but I'm not sure that the underlying cause is the same. I am building a kernel for 3.8.13 using
the patches from git, and also the current git xenomai. ( Current as of a month ago ). The target is an custom board based on the iMX53.Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
To narrow the source of the problem, I modified
switchtest.cto report on any case where theopen()returns a negative number. I also made atemporary
Quoted 2 lines
patch
to not prepend the name with "/dev/". I might add that I'm using a newRTDM
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
driver named
fpga_rtdmthat can be opened and access successfully. Here's what happens:Quoted 8 lines
Quoted 6 lines
This may look like a stupid suggestion, but that is the only explanation I see: you are probably using glibc's open instead of xenomai's open. This may happen for instance if you are compiling xenomai libraries statically and switchtest
Makefiledoes not use the "wrap-link.sh" script. --
Gilles.Not stupid, that was a useful suggestion. Both are dynamically linked, and I'm
actually using
Quoted 3 lines
uClibc for this embedded system.
I tried to open the switchtest device from my application and it was
successful.
Quoted 1 line
One difference was that my application was opening these with a call to
rt_dev_open(),Quoted 1 line
while the
switchtest.cfile usedopen(). Also, when building switchtest the
open()isQuoted 3 lines
resolved with
open64()due to selecting large file support.A quick mod of the switchtest code to use
rt_dev_open()instead ofopen()would not build
Quoted 1 line
without more effort.
Hi George,
I added a wrapper for open64, could you try the current git contents, or apply the following patch to the tree you use?
Quoted 7 lines
http://git.xenomai.org/?p=xenomai-
2.6.git;a=commit;h=d6127b245ed9876ce4153bac2996d88d0d7355c6Regards.
--
Gilles.
I built from the current git tree and tried it: xeno-test ran to completion.
Thank you Gilles.
George