All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@domain.hid>
To: "Koenig, Florian" <F.Koenig@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] build xenomai userspace app, illegal instruction
Date: Mon, 16 May 2011 16:45:22 +0200	[thread overview]
Message-ID: <4DD13882.8000708@domain.hid> (raw)
In-Reply-To: <89B30389DB4AE240AC1227F3FDBB7CCF029B910F@ontex.i.omicron.de>

Hello,

On 05/16/2011 03:27 PM, Koenig, Florian wrote:
> Hi,
> i started from new and have done the following:
> 
> 
> i deleted /opt/eldk-4.2 and installed it new with:
> $ ./install -d /opt/eldk-4.2 ppc_4xx

BTW: also be aware of ELDK_FIXOWER and ELDK_MAKEDEV.b

> Then i setup env-vars and goto /usr/src/xenomai-2.5.6:
> $ export ARCH=powerpc
> $ export DESTDIR=/opt/eldk-4.2/ppc_4xx
> $ export PATH=$PATH:/opt/eldk-4.2/usr/bin:/opt/eldk-4.2/bin
> 
> Then i configured xenomai userspace with:
> $ ./configure --host=powerpc-linux      (without --prefix=)
> $ make
> $ make install
> 
> Then i goto /usr/src/xenomai/examples and run:
> $ make XENO=/opt/eldk-4.2/ppc_4xx/usr/xenomai/bin
> 
> And then it returns, where it searches for includes in
> -I/lib/modules/2.6.32-5-686/build/include/xenomai/posix
> Which is my local x86 kernel, not the powerpc kernel?

The kernel is used just for build Xenomai kernel modules. For
cross-compilation you must provide "KSRC=<path-to-your-kernel>. But it's
*not* used for building user-space apps.

> make XENO=/opt/eldk-4.2/ppc_4xx/usr/xenomai/
> --xeno-cflags is deprecated, use --skin=name --cflags instead --xeno-ldflags
> is deprecated, use --skin=name --ldflags instead
> make[1]: Entering directory `/usr/src/xenomai-2.5.6/examples/rtdm/driver-api'
> powerpc-linux-gcc -I/opt/eldk-4.2/ppc_4xx/usr/xenomai/include -D_GNU_SOURCE
> -D_REENTRANT -Wall -pipe -D__XENO__   -L/opt/eldk-4.2/ppc_4xx/usr/xenomai/lib
> -lxenomai -lpthread  -lnative -lrtdm -Xlinker -rpath -Xlinker
> /opt/eldk-4.2/ppc_4xx/usr/xenomai/lib  tut01-skeleton-app.c   -o
> tut01-skeleton-app
> tut01-skeleton-app.c:54: warning: second argument of 'main' should be 'char
> **'

Looks good now. The path is pointing to the Xenomai installation dir:
/opt/eldk-4.2/ppc_4xx/usr/xenomai/

> After copying trivial-periodic to 405GP cpu, it returns illegal instruction.

Hm, in a previous mail I asked if the installed Xenomai programs from
the test suite like "latency" or "cyclictest" do work. Is that the case?
If not, it's most likely not a build problem.

> Is /opt/eldk-4.2 meant to be the rootfs of the 405GP cpu ? I use a initramfs,
> which is placed in /usr/src/initramfs, so i only copy the xenomai lib/ folder
> from /opt/eldk-4.2/ppc_4xx/lib into my initramfs/lib folder.

It's up to you to define the rootfs and install the Xenomai programs into:

  $ export DESTDIR=/usr/src/initramfs
  $ cd xenomai-2.5.6
  $ make install

That's likely to much data. The following should work as well:

  $ make install-exec


Wolfgang.


  reply	other threads:[~2011-05-16 14:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-13 12:46 [Xenomai-help] build xenomai userspace app, illegal instruction Koenig, Florian
2011-05-13 13:15 ` Wolfgang Grandegger
2011-05-16 10:23   ` Koenig, Florian
2011-05-16 10:56     ` Wolfgang Grandegger
2011-05-16 11:17       ` Wolfgang Grandegger
2011-05-16 13:27         ` Koenig, Florian
2011-05-16 14:45           ` Wolfgang Grandegger [this message]
2011-05-17  7:03             ` Koenig, Florian
2011-05-17  7:14               ` Wolfgang Grandegger
     [not found]                 ` <89B30389DB4AE240AC1227F3FDBB7CCF029B9111@domain.hid>
2011-05-17  9:27                   ` Wolfgang Grandegger
2011-05-17 11:11                     ` Gilles Chanteperdrix
2011-05-17 11:22                       ` Wolfgang Grandegger
2011-05-17 13:21                       ` Koenig, Florian
2011-05-17 14:06                         ` Wolfgang Grandegger

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=4DD13882.8000708@domain.hid \
    --to=wg@domain.hid \
    --cc=F.Koenig@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.