0

I would like to test Xenomai features with the latency test under a specified load but when I try to execute the command the follwing error shows up.

# ./latency -p 100
sh: ./latency command not found

The system has been built with Buildroot. In the /proc/xenomai folder, the version file contains:

$ cat /proc/xenomai/version
2.6.4

Here is the relevant part of the configuration file I have used to build the system:

-- Target Packages  
   -- Real Time 
      -- Xenomai Userspace
        (2.6.4) Custom Xenomai version
          [*]   Install testsuite
          [ ]   RtCan utilities
          [*]   Analogy libs and utils    
          [*]   Native skin library  
          [*]   POSIX skin library  
          [ ]   VX-Works skin library 
          [ ]   PSOS skin library                
          [ ]   RTAI skin library  
          [ ]   uiTron skin library   
          [ ]   VRTX skin library 

Is this configuration file correct? Where can I find all the test programs provided by Xenomai?

EDIT

there is no xenomai folder in usr/. I've noticed in /usr/bin the following programs:

# ls /usr/bin | grep xeno
xeno-regression-test
xeno-test-run
xeno-test-run-wrapper

How can I use this files?

The only folder called xenomai is the one in the /proc

# ls /proc/xenomai
acct apc faults heap interfaces/ irq latency registry/
rtdm/ sched schedclasses/ stat timebases timer timerstat/
version
# cd /proc/xenomai
# ./latency -p 100
sh: /latency: Permission denied
# sudo ./latency -p 100
sudo: ./latency: command not found

EDIT2

The content of output/target/usr/bin does not contain the latency program:

userk@dopamine:~/Development/Linux/RaspberryPi/buildroot-2013.11-Copy2015/output/target/usr/bin$ l | grep latency   
userk@dopamine:~/Development/Linux/RaspberryPi/buildroot-2013.11-Copy2015/output/target/usr/bin$
UserK
  • 884
  • 3
  • 17
  • 40

2 Answers2

3

Well,

# ./latency -p 100
sh: ./latency command not found

Here you're trying to run latency, located in the directory where you're standing. (And I guess your standing in /root).

Try running

# latency -p 100

and see if that helps.

To help you, I made a test build with the Xenomai configuration shown below:

    [*] Xenomai Userspace                                                                                        │ │  
  │ │     ()    Custom Xenomai version                                                                                 │ │  
  │ │     [*]   Install testsuite                                                                                      │ │  
  │ │     [ ]   RTCan utilities                                                                                        │ │  
  │ │     [ ]   Analogy libs and utils                                                                                 │ │  
  │ │     [*]   Native skin library                                                                                    │ │  
  │ │     [*]   POSIX skin library                                                                                     │ │  
  │ │     [ ]   VX-Works skin library                                                                                  │ │  
  │ │     [ ]   PSOS skin library                                                                                      │ │  
  │ │     [ ]   RTAI skin library                                                                                      │ │  
  │ │     [ ]   uiTron skin library                                                                                    │ │  
  │ │     [ ]   VRTX skin library      

This places latency in output/target/usr/bin/latency. (I.e. it's located in /usr/bin/latency on your target).

Anders
  • 8,541
  • 1
  • 27
  • 34
  • Nope, you according to your edit, you never tried to run `latency -p 100`. You tried to run the file latency in /proc/xenomai, which is used to adjust the latency of the system. – Anders Jan 27 '15 at 13:34
  • Sorry, I've tried your suggestion too but I haven't included in the edit. I get `-sh: latency: not found`. (There is no latency command in the bin or sbin folder) – UserK Jan 27 '15 at 13:47
  • Ok, have you looked in output/target/usr/bin? That's where buildroot places latency for me. Could you paste the output of `ls output/target/usr/bin`? Also, have you run `make` after adding the "Install testsuite" option? – Anders Jan 27 '15 at 13:57
  • I'll try without specifying the xenomai version and the libs and utils options. – UserK Jan 27 '15 at 14:11
  • Or you could try to force a reinstall... If you look at packages/xenomai/xenomai.mk, the binaries that you're lacking in output/target/usr/bin, are exactly the ones that gets removed if you don't select "Install testsuite". – Anders Jan 27 '15 at 14:14
  • Are you using Buildroot to build the system? Could you show me your configuration file? – UserK Jan 29 '15 at 14:49
  • 1
    Yes, I used the latest upstream buildroot. I might be able to get access to the config tomorrow, though no guarantees. It was a pretty basic config, with the exception of the Xenomai options I showed you above. Clean out the Xenomai build directory and rerun the build. – Anders Jan 29 '15 at 15:20
  • Have you compiled the kernel with Buildroot or separately? – UserK Jan 29 '15 at 16:55
  • I've built everything in buildroot. Though, I haven't runtime tested it. But as your problem is to get latency and the rest of the testsuite installed, that shouldn't matter. – Anders Jan 29 '15 at 17:39
  • 1
    For your case, I've verified that the userspace parts gets built and installed correctly using these steps: `make raspberrypi_defconfig`, select the Xenomai options in my response above, `make`. – Anders Jan 30 '15 at 13:56
  • Thank you Anders. But in the defconfig there are no options for the real time kernel enabled. The Adeos patch should be applied somewhere. What happens if you load the modules: sudo modprobe xeno_native or modprobe xeno_irqbench? – UserK Jan 30 '15 at 15:10
  • That's right. But your issue has been that you can't find 'latency' in you filesystem. Whether the kernel is correctly configured or not, is irrelevant to that question. – Anders Jan 30 '15 at 15:31
  • I'll build the system with this configuration as you suggested. – UserK Jan 30 '15 at 15:56
0

This is a possible workaround for the raspberry pi. SOURCE

wget http://download.gna.org/xenomai/stable/xenomai-2.6.4.tar.bz2
tar xjf xenomai-2.6.4.tar.bz2
cd xenomai-2.6.4
## Here you should invoke the script to prepare the kernel with the adeos patch but since I'm using Buildroot we can jump this step
mkdir raspPI
PATH=$PATH:insert_the_cross_compiler_path_here
./configure --host=arm-linux CFLAGS='-march=armv6' LDFLAGS='-march=armv6'
make
make DESTDIR=$(pwd)/raspPI install
cd raspPI/
raspPI$ tar cjf xenomai-rpi.tar.bz2 usr/xenomai/bin/ usr/xenomai/sbin/ usr/xenomai/lib/
  • Finally copy the compressed archive to you raspberry pi using a ssh and untar it.

    scp xenomai-rpi.tar.bz2 root@IP_Address_of_the_RPi:/

The archive will be copied in the root directory. From the raspberry pi, uncompress xenomai-rpi.tar.bz2 to the root of the filesystem

tar -xvjf xenomai-rpi.tar.bz2
ls usr/xenomai/bin/
arith       cmd_write            insn_bits   latency               rtcansend    wf_generate           xeno-test
check-vdso  cond-torture-native  insn_read   mutex-torture-native  rtdm         wrap-link.sh          xeno-test-run
clocktest   cond-torture-posix   insn_write  mutex-torture-posix   sched-tp     xeno                  xeno-test-run-wrapper
cmd_bits    cyclictest           irqloop     regression            switchtest   xeno-config
cmd_read    dohell               klatency    rtcanrecv             wakeup-time  xeno-regression-test
  • Or you can do it manually:

    cd /usr/xenomai raspPI/usr/xenomai$ scp bin/* root@ip_address:/usr/bin raspPI/usr/xenomai$ scp sbin/* root@ip_address:/usr/sbin raspPI/usr/xenomai$ scp lib/* root@ip_address:/usr/lib

You have now all the modules to test the Xenomai real time features!

UserK
  • 884
  • 3
  • 17
  • 40