Niklaus Giger wrote:
> ...
> If anybody has a working target with a Xenomai + BusyBox combination and 
> would 
> be willing to test drive my changes, I would appreciate a feedback 
> enormously.

Did so, and here comes the result: :)

> Index: scripts/xeno-info
> ===================================================================
> --- scripts/xeno-info (Revision 1135)
> +++ scripts/xeno-info (Arbeitskopie)
> @@ -1,31 +1,51 @@
> -#!/bin/sh
> +#! /bin/sh
>  #
>  # This file has been lifted 'as is' from linux/scripts/ver_linux.
> -#
> +# Adapted to be run also under the BusyBox. If you want to test it under the 
> BusyBox use
> +# busybox sh xeno-info 
>  PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:$PATH
>  echo 'If some fields are empty or look unusual you may have an old version.'
>  echo 'Compare to the current minimal requirements in Documentation/Changes.'
>  echo ' '
> +withBusybox=0
> +if test -L $SHELL ; then # is sh a logical link to busybox
> +    exeName=`ls -l $SHELL|cut -d\>  -f2`
> +    if test "`basename $exeName`" = "busybox";  then
> +     withBusybox=1; else echo 2.3
> +    fi
> +elif test -n "$_" -a "`basename $_`" = "busybox"; then
> +    withBusybox=1;
> +# else running a real /bin/sh (bash) shell
> +fi

This may become fragile (and it already is on my hacked system). The
reason: plans exist to allow compiling bb into multiple binaries again,
thus sh will not be linked to busybox, but to ash e.g.

What about this:

if sh --help 2>&1| grep -q BusyBox; then
# else running a real /bin/sh (bash) shell
echo withBusybox is $withBusybox

When using this variant, I get the following messages:

> /bin/xeno-test: /bin/xeno-test: 177: zgrep: not found

What about zcat | grep instead? Moreover, I failed to find a zgrep bb
applet. Did you copy that stuff on your box?

> /bin/xeno-test: /bin/xeno-test: 264: getopts: not found

getopts is off by default in bb. Is this essential for xeno-test? Then
you should state this requirement somewhere.

> /bin/xeno-test: shift: 267: Illegal number: -1

I guess this comes from the missing getopts...

Regarding workload: I typically run the cache calibrator [1] in a look,
together with some I/O load (hard disk where available, flood ping). The
loop looks like

while true; do calibrator <box-MHz> 8M /tmp/; done

<box-MHz> should be derivable from /proc/cpuinfo with some scripting. We
may just check if an inclusion of the calibrator source code is possible
(license terms...).

Lacking time right now, otherwise I would have hacked further to make
the test run. This test could be quite interesting for us here to
quickly check our processing boxes' hardware and to test new Xenomai
versions for elementary regressions when upgrading production systems
(fortunately only their CF-cards). Looking forward!



Attachment: signature.asc
Description: OpenPGP digital signature

Xenomai-core mailing list

Reply via email to