All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: niklaus.giger@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] Porting xeno-{info|load|test} to a busybox system
Date: Fri, 26 May 2006 15:52:20 +0200	[thread overview]
Message-ID: <44770814.5040009@domain.hid> (raw)
In-Reply-To: <200605252134.08614.niklaus.giger@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 2979 bytes --]

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:

withBusybox=0
if sh --help 2>&1| grep -q BusyBox; then
    withBusybox=1;
# else running a real /bin/sh (bash) shell
fi
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!

Jan


[1] http://homepages.cwi.nl/~manegold/Calibrator


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-05-26 13:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-25 19:34 [Xenomai-core] Porting xeno-{info|load|test} to a busybox system Niklaus Giger
2006-05-26 13:52 ` Jan Kiszka [this message]
2006-05-26 16:52   ` Niklaus Giger
2006-05-27 16:42     ` Jan Kiszka
2006-05-28 10:00       ` Niklaus Giger
2006-05-28 10:45         ` Jan Kiszka
2006-05-28 14:41           ` Niklaus Giger
2006-05-29 11:40             ` Jan Kiszka
2006-06-06 20:32     ` Jim Cromie
2006-06-12 20:33       ` Jan Kiszka
2006-06-12 21:23         ` [Xenomai-core] " Niklaus Giger
     [not found]         ` <448DD841.1040906@domain.hid>
2006-06-14 19:01           ` [Xenomai-core] " Jim Cromie
2006-06-15 15:01             ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44770814.5040009@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=niklaus.giger@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.