about switchtest ...
Hi ... I'm using the 2.6.0 Xenomai version in userspace. I managed to forwardport the *adeos-ipipe-3.0.36-arm-1.18-11* patch provided to the 3.1.10 kernel version since it's the one I'm currently using. I managed to modify it in a way that it compiles and runs on my SMDK2440 ARM target. I attached the patch for your consideration. If you consider it valuable I can send you another version at a later time with the other marchs included ( I removed them from the patched and left the modifications important to me ) ...
I followed the guide and everything works fine, I see the boot messages and the *xeno latency* test runs without any problem. The problem arises when I try the *xeno-test *program, it starts with the first test and then crashes with an error:
switchtest: Unable to open switchtest device.
(modprobe xeno_switchtest ?)
I issued a *cat /proc/xenomai/rtdm/named_devices* and got:
Hash Name Driver /proc
24 rttest-timerbench0 xeno_timerbench rttest-timerbench0 55 rttest-switchtest0 xeno_switchtest rttest-switchtest0
Meaning the rttest-switchtest0 device is there right?? I looked for it here after googling this problem. In some mailing lists it's said that this problem was fixed in the 2.5.1 head version, but as you can see it's still popping up ...
Any ideas ??
Thanks in advance ...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: adeos-ipipe-3.1.10-arm-001.patch
Type: text/x-diff
Size: 460278 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130204/7310252d/attachment.patch>
Quoted 25 lines · raespi
Hi ... I'm using the 2.6.0 Xenomai version in userspace. I managed to forwardport the *adeos-ipipe-3.0.36-arm-1.18-11* patch provided to the 3.1.10 kernel version since it's the one I'm currently using. I managed to modify it in a way that it compiles and runs on my SMDK2440 ARM target. I attached the patch for your consideration. If you consider it valuable I can send you another version at a later time with the other marchs included ( I removed them from the patched and left the modifications important to me ) ...
I followed the guide and everything works fine, I see the boot messages and the *xeno latency* test runs without any problem. The problem arises when I try the *xeno-test *program, it starts with the first test and then crashes with an error:
switchtest: Unable to open switchtest device.
(modprobexeno_switchtest?)I issued a *cat
/proc/xenomai/rtdm/named_devices*and got:Hash Name Driver /proc
24 rttest-timerbench0xeno_timerbench
rttest-timerbench0
55 rttest-switchtest0xeno_switchtest
rttest-switchtest0
Quoted 6 lines
Meaning the rttest-switchtest0 device is there right?? I looked for it here after googling this problem. In some mailing lists it's said that this problem was fixed in the 2.5.1 head version, but as you can see it's still popping up ...
Any ideas ??
In order to avoid looking for a bug which has already been fixed, please try Xenomai 2.6.2.1.
Signature · 1 line
Gilles.
Ok, I downloaded the 2.6.2.1 stable version now. Everything compiles without problems ... Still I get the same error when running *xeno-latency*:
switchtest: Unable to open switchtest device.
(modprobe xeno_switchtest ?)
Any ideas .. ?
Quoted 37 lines · Gilles Chanteperdrix
Quoted 25 lines · raespi
Hi ... I'm using the 2.6.0 Xenomai version in userspace. I managed to forwardport the *adeos-ipipe-3.0.36-arm-1.18-11* patch provided to the 3.1.10 kernel version since it's the one I'm currently using. I managed to modify it in a way that it compiles and runs on my SMDK2440 ARM target. I attached the patch for your consideration. If you consider it valuable I can send you another version at a later time with the other marchs included ( I removed them from the patched and left the modifications important to me ) ...
I followed the guide and everything works fine, I see the boot messages and the *xeno latency* test runs without any problem. The problem arises when I try the *xeno-test *program, it starts with the first test and then crashes with an error:
switchtest: Unable to open switchtest device.
(modprobexeno_switchtest?)I issued a *cat
/proc/xenomai/rtdm/named_devices*and got:Hash Name Driver /proc
24 rttest-timerbench0xeno_timerbench
rttest-timerbench0
55 rttest-switchtest0xeno_switchtest
rttest-switchtest0Quoted 6 lines
Meaning the rttest-switchtest0 device is there right?? I looked for it here after googling this problem. In some mailing lists it's said that this problem was fixed in the 2.5.1 head version, but as you can see it's still popping up ...
Any ideas ??
In order to avoid looking for a bug which has already been fixed, please try Xenomai 2.6.2.1.
Quoted 7 lines · raespi
Ok, I downloaded the 2.6.2.1 stable version now. Everything compiles
without problems ... Still I get the same error when running *xeno-latency*:switchtest: Unable to open switchtest device.
(modprobexeno_switchtest?)Any ideas .. ?
No, we do not have enough details. What toolchain do you use? What arguments do you pass to configure? Did you recompile the kernel too?
Signature · 1 line
Gilles.
Quoted 5 lines · Gilles Chanteperdrix
Quoted 3 lines · raespi
Ok, I downloaded the 2.6.2.1 stable version now. Everything compiles
without problems ... Still I get the same error when running *xeno-latency*:
Quoted 8 lines
Quoted 4 lines
switchtest: Unable to open switchtest device.
(modprobexeno_switchtest?)Any ideas .. ?
No, we do not have enough details. What toolchain do you use? What arguments do you pass to configure? Did you recompile the kernel too?
I remember stumbling over this issue recently as well, on x86. Hmm, I think it was not a missing device but failing RTTST_RTIOC_SWTEST_SET_TASKS_COUNT due to too few resources of the nucleus - but that was on 16 or even 32 CPU box.
Anyway, my point is that the failure might be in that IOCTL. Instrument the code to find out.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux
Quoted 12 lines · raespi
Right, I'm using these tools and options:
*- toolchain:*
4.6.3 (Sourcery CodeBench Lite 2012.03-57)*- configure options ( Running under buildroot, no special recipe, it comes with one for the 2.6.0 version ):*
$ ./configure --target=arm-linux --host=arm-linux --build=i686-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --program-prefix= --disable-gtk-doc --enable-ipv6 --enable-static --enable-shared --includedir=/usr/include/xenomai/
Quoted 7 lines
*- Prepin' the kernel:* $(XENOMAI_DIR)/scripts/prepare-kernel.sh --linux=$(LINUX_DIR) --arch=arm --adeos=adeos-ipipe-3.1.10-arm-001.patch
I think I saw the problem. Buildroot doesn't pass the " -march=armv4t
-msoft-float" CFLAGS and LDFLAGS options to the xenomai configure line for the s3c24xx. At least the *xeno-test* is running now ...
Good news. It is strange that not passing these options does not cause other run-time errors though (like invalid instructions).
Quoted 3 lines
Thanks for your time, are you interested in the complete patch for the 3.1.10 version ?? ...
Yes, that is interesting, but 3.1 is a bit old, I am not sure you have all the fixes, any reason for not using 3.2?
Please keep the mailing list in CC.
Signature · 1 line
Gilles.
Quoted 12 lines · Jan Kiszka
Quoted 11 lines · Gilles Chanteperdrix
Quoted 7 lines · raespi
Ok, I downloaded the 2.6.2.1 stable version now. Everything compiles
without problems ... Still I get the same error when running *xeno-latency*:switchtest: Unable to open switchtest device.
(modprobexeno_switchtest?)Any ideas .. ?
Quoted 7 lines
Quoted 2 lines
No, we do not have enough details. What toolchain do you use? What arguments do you pass to configure? Did you recompile the kernel too?
I remember stumbling over this issue recently as well, on x86. Hmm, I think it was not a missing device but failing
RTTST_RTIOC_SWTEST_SET_TASKS_COUNTdue to too few resources of the nucleus - but that was on 16 or even 32 CPU box.
It is true that any error in the ioctl will trigger this message, whereas we should treat anything else than -ENOSYS as an error.
Signature · 1 line
Gilles.
Well we have a very big team working with linux on the smdk2440, from what we've seen, the 3.4 version breaks the audio in a very weird way. We're also merging other changes like the ones from the AF_DBUS project, but they're using other versions and it's a bit complicated. Still all our changes will be submitted back to you ... I want to test Xenomai a bit more and see how it improves my system's response times, when I have more info I will send the full changes ...
Thanks again ..
Quoted 33 lines · Gilles Chanteperdrix
Quoted 12 lines · raespi
Right, I'm using these tools and options:
*- toolchain:*
4.6.3 (Sourcery CodeBench Lite 2012.03-57)*- configure options ( Running under buildroot, no special recipe, it comes with one for the 2.6.0 version ):*
$ ./configure --target=arm-linux --host=arm-linux --build=i686-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --program-prefix= --disable-gtk-doc --enable-ipv6 --enable-static --enable-shared --includedir=/usr/include/xenomai/Quoted 7 lines
*- Prepin' the kernel:* $(XENOMAI_DIR)/scripts/prepare-kernel.sh --linux=$(LINUX_DIR) --arch=arm --adeos=adeos-ipipe-3.1.10-arm-001.patch
I think I saw the problem. Buildroot doesn't pass the " -march=armv4t
-msoft-float" CFLAGS and LDFLAGS options to the xenomai configure line for the s3c24xx. At least the *xeno-test* is running now ...Good news. It is strange that not passing these options does not cause other run-time errors though (like invalid instructions).
Quoted 2 lines
Thanks for your time, are you interested in the complete patch for the 3.1.10 version ?? ...
Yes, that is interesting, but 3.1 is a bit old, I am not sure you have all the fixes, any reason for not using 3.2?
Please keep the mailing list in CC.
Still on this topic ... do the CFLAGS and LDFLAGS parameters are checked only from the ./configure command line or are they also checked by Xenomai as an environment variable ?? I'm currently in discussion with the buildroot maintainer about this topic to fix this problem ...
Quoted 46 lines · raespi
Well we have a very big team working with linux on the smdk2440, from what we've seen, the 3.4 version breaks the audio in a very weird way. We're also merging other changes like the ones from the
AF_DBUSproject, but they're using other versions and it's a bit complicated. Still all our changes will be submitted back to you ... I want to test Xenomai a bit more and see how it improves my system's response times, when I have more info I will send the full changes ...Thanks again ..
Quoted 26 lines · Gilles Chanteperdrix
Quoted 12 lines · raespi
Right, I'm using these tools and options:
*- toolchain:*
4.6.3 (Sourcery CodeBench Lite 2012.03-57)*- configure options ( Running under buildroot, no special recipe, it comes with one for the 2.6.0 version ):*
$ ./configure --target=arm-linux --host=arm-linux --build=i686-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --program-prefix= --disable-gtk-doc --enable-ipv6 --enable-static --enable-shared --includedir=/usr/include/xenomai/Quoted 8 lines
*- Prepin' the kernel:* $(XENOMAI_DIR)/scripts/prepare-kernel.sh --linux=$(LINUX_DIR) --arch=arm
--adeos=adeos-ipipe-3.1.10-arm-001.patchI think I saw the problem. Buildroot doesn't pass the " -march=armv4t
-msoft-float" CFLAGS and LDFLAGS options to the xenomai configure line for the s3c24xx. At least the *xeno-test* is running now ...Good news. It is strange that not passing these options does not cause other run-time errors though (like invalid instructions).
Quoted 8 lines
Quoted 2 lines
Thanks for your time, are you interested in the complete patch for the 3.1.10 version ?? ...
Yes, that is interesting, but 3.1 is a bit old, I am not sure you have all the fixes, any reason for not using 3.2?
Please keep the mailing list in CC.
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai
Quoted 4 lines · raespi
Still on this topic ... do the CFLAGS and LDFLAGS parameters are checked only from the ./configure command line or are they also checked by Xenomai as an environment variable ?? I'm currently in discussion with the buildroot maintainer about this topic to fix this problem ...
Xenomai does not do anything special, it uses the autotools default which is:
- if you pass CFLAGS and LDFLAGS on the right hand of the configure command line, the generated makefiles are hardcoded with these flags values, and you need not do anything special later on to get these flags used for all the compilations. This has been the recommended way of passing CFLAGS and LDFLAGS when building autotools-based projects for many years.
- if you want to pass them as environment variables (so, on the left hand of the configure command line), the makefiles are not generated with these flags, so, you have to pass them in the environment of the "make" command.
Signature · 1 line
Gilles.
Quoted 4 lines · raespi
Still on this topic ... do the CFLAGS and LDFLAGS parameters are checked only from the ./configure command line or are they also checked by Xenomai as an environment variable ?? I'm currently in discussion with the buildroot maintainer about this topic to fix this problem ...
I am not sure you should bother the buildroot maintainer until you have understood what the real problem is. Because if you do not compile for the right machine, you should get illegal instructions, not the error you report.
Signature · 1 line
Gilles.
The problem was fixed ... The buildroot system didn't pass the specific CFLAGS and LDFLAGS for my machine. In your Getting Started guide this is something necessary. That's what fixed the problem and allowed me to run the tests. What I'm checking with him is how those flags are passed to Xenomai. Perhaps he didn't notice it before since no one ran the test suite for this machine ?? IDK ...
Quoted 12 lines · Gilles Chanteperdrix
Quoted 4 lines · raespi
Still on this topic ... do the CFLAGS and LDFLAGS parameters are checked only from the ./configure command line or are they also checked by Xenomai as an environment variable ?? I'm currently in discussion with the buildroot maintainer about this topic to fix this problem ...
I am not sure you should bother the buildroot maintainer until you have understood what the real problem is. Because if you do not compile for the right machine, you should get illegal instructions, not the error you report.
Quoted 7 lines · raespi
The problem was fixed ... The buildroot system didn't pass the specific CFLAGS and LDFLAGS for my machine. In your Getting Started guide this
is something necessary. That's what fixed the problem and allowed me to run the tests. What I'm checking with him is how those flags are passed to Xenomai. Perhaps he didn't notice it before since no one ran the test suite for this machine ?? IDK ...
No, read my answer again. If buildroot did not pass correct CFLAGS or LDFLAGS, you would get an "illegal instruction" trap. So, you have not really understood what your problem is, and you have not understood why passing specific CFLAGS and LDFLAGS in addition to the ones passed by buildroot fixes it.
Signature · 1 line
Gilles.
Yes I saw your answer and understood what you were talking about. Again, the "-march=armv4t -msoft-float" options are passed to every package Buildroot builds since it's an option I enable in the Buildroot config file. The problem may lie in how it passes them to Xenomai specifically. For a fact, I can assure you they weren't passed to the right of the ./configure script as you suggested since I double checked the config.log for the Xenomai build. Why the "Illegal Instruction" message wasn't showing up I don't know but it's not something that popped up to me before for not passing the flags, at least not in the smdk2440 target.
Facts:
1- Buildroot doesn't build correctly the Xenomai package ( test suite fails to launch )
2- When passing the flags in Buildroot manually ( for now ) to the Xenomai package the test suite runs normally
3- The solution is either fixing the parameter passing scheme on Xenomai or how Buildroot passes the parameters ( I go with this last one ).
Quoted 15 lines · Gilles Chanteperdrix
Quoted 6 lines · raespi
The problem was fixed ... The buildroot system didn't pass the specific CFLAGS and LDFLAGS for my machine. In your Getting Started guide this is something necessary. That's what fixed the problem and allowed me to run the tests. What I'm checking with him is how those flags are passed to Xenomai. Perhaps he didn't notice it before since no one ran the test suite for this machine ?? IDK ...
No, read my answer again. If buildroot did not pass correct CFLAGS or LDFLAGS, you would get an "illegal instruction" trap. So, you have not really understood what your problem is, and you have not understood why passing specific CFLAGS and LDFLAGS in addition to the ones passed by buildroot fixes it.
Quoted 5 lines · raespi
Facts:
1- Buildroot doesn't build correctly the Xenomai package ( test suite fails to launch )
2- When passing the flags in Buildroot manually ( for now ) to the Xenomai package the test suite runs normally
I Agree with these two, but what I ask you is why?
Quoted 2 lines
3- The solution is either fixing the parameter passing scheme on Xenomai or how Buildroot passes the parameters ( I go with this last one ).
Disagree with this one, which is a shortcut, not a real conclusion. There may be a bug, what you have found is a workaround, not a solution.
Signature · 1 line
Gilles.
I know, which is why I'm currently between two mailing lists trying to solve it. I have already registered the bug on the Buildroot site. For followups this is the url:
https://bugs.busybox.net/show_bug.cgi?id=5900
Quoted 16 lines · Gilles Chanteperdrix
Quoted 5 lines · raespi
Facts:
1- Buildroot doesn't build correctly the Xenomai package ( test suite fails to launch )
2- When passing the flags in Buildroot manually ( for now ) to the Xenomai package the test suite runs normallyI Agree with these two, but what I ask you is why?
Quoted 2 lines
3- The solution is either fixing the parameter passing scheme on Xenomai or how Buildroot passes the parameters ( I go with this last one ).
Disagree with this one, which is a shortcut, not a real conclusion. There may be a bug, what you have found is a workaround, not a solution.
Quoted 4 lines · raespi
I know, which is why I'm currently between two mailing lists trying to
solve it. I have already registered the bug on the Buildroot site. For followups this is the url:
https://bugs.busybox.net/show_bug.cgi?id=5900
And again: this probably has nothing to do with buildroot.
Signature · 1 line
Gilles.
So you're saying that I'm correctly passing the CFLAGS and LDFLAGS for all the other packages on my system ( kernel, busybox, dbus, my apps, etc ... ) but not to the Xenomai build ?? I fail to understand your point ...
On Buildroot I have:
1- BR2_GCC_TARGET_ARCH="armv4t"
2- BR2_SOFT_FLOAT=y
Both translated in to good old GCC parameters are "-march=arm4vt -msoft-float". So ???
Quoted 9 lines · Gilles Chanteperdrix
Quoted 4 lines · raespi
I know, which is why I'm currently between two mailing lists trying to
solve it. I have already registered the bug on the Buildroot site. For followups this is the url:
https://bugs.busybox.net/show_bug.cgi?id=5900And again: this probably has nothing to do with buildroot.
Quoted 11 lines · raespi
So you're saying that I'm correctly passing the CFLAGS and LDFLAGS for all the other packages on my system ( kernel, busybox, dbus, my apps, etc ... ) but not to the Xenomai build ?? I fail to understand your point ...
On Buildroot I have:
1- BR2_GCC_TARGET_ARCH="armv4t"
2- BR2_SOFT_FLOAT=yBoth translated in to good old GCC parameters are "-march=arm4vt -msoft-float". So ???
So, there is probably a problem in Xenomai build system, which has nothing to do with buildroot, but is related to the (deprecated) way buildroot passes the CFLAGS and LDFLAGS to the build system.
Signature · 1 line
Gilles.