From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Michael Smith <2michael.smith@gmail.com>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] rtdm/driver.h location - Xenomai 3.0
Date: Fri, 13 Mar 2015 17:44:59 +0100 [thread overview]
Message-ID: <20150313164459.GF1497@hermes.click-hack.org> (raw)
In-Reply-To: <CANWkrRM3hD_LG-7EQFDxF5U-YS3YJYe8jNyL3cOZqSEL+tqQNg@mail.gmail.com>
On Fri, Mar 13, 2015 at 06:39:03PM +0200, Michael Smith wrote:
> On Fri, Mar 13, 2015 at 1:42 PM, Michael Smith <2michael.smith@gmail.com> wrote:
> > On Fri, Mar 13, 2015 at 11:32 AM, Philippe Gerum <rpm@xenomai.org> wrote:
> >> On 03/13/2015 09:17 AM, Michael Smith wrote:
> >>> Hi.
> >>> I am busy porting device drivers over to Xenomai 3.0.
> >>> At the moment I'm having trouble figuring out the location of
> >>> rtdm/driver.h.
> >>> I would assume it should be installed under /usr/include/xenomai, because
> >>> in my previous Xenomai 2.x build the rtdm/rtdm_driver.h was located there.
> >>> I can see the file in the Xenomai source code but its not installed under
> >>> /usr/include/xenomai after Xenomai 3.0 the build and install.
> >>> I'm using cobalt with an x86_64 architecture.
> >>>
> >>> Am I missing something? Is there something that I should have setup in the
> >>> configuration file with the install? I went back and had a look in the
> >>> Linux kernel
> >>> build setup under the Xenomai heading, but I could not see any obvious
> >>> options that I missed.
> >>>
> >>
> >> In short, Xenomai 3 introduces a split between kernel and userland
> >> headers, with only a few of them shared in order to expose the ABI. So
> >> you need to build against a kernel prepared with the Xenomai sources,
> >> adding the proper extra CFLAGS to your kernel Makefile for building the
> >> module with the proper -I directives to find them.
> >>
> >> Everything under /usr/include/xenomai now belongs to userland
> >> exclusively, barring the ABI bits (uapi/).
> >>
> >> See http://www.xenomai.org/pipermail/xenomai/2015-March/033558.html
> >>
> >> --
> >> Philippe.
> >
> > I understand.
> > Thanks Phillipe.
> > Will implement it like that.
> > If I can suggest, maybe to have a note of this somewhere in the
> > documentation, or
> > a RTDM example will clarify similar questions in the future.
> >
> > Regards
> > Michael
>
> I am trying to do a out of tree compile for my RTDM driver.
> As I include the line $(shell xeno-config --kcflags)) in my make file,
> it expands to the line -Iarch/$(SRCARCH)/xenomai/include -Iinclude/xenomai.
>
> My problem is my compiler is not finding the $(SRCARCH) variable in
> the make process.
> I had a look and its not defined in my environmental variables either.
> I see the only place it is defined is in linux/Makefile on the top
> level of the Linux tree.
>
> But does this mean I can only compile a Xenomai driver as part of the
> full Linux tree?
> And do I need to re-make the whole kernel tree when I want to compile a custom
> Xenomai driver?
> Where would I need to place the RTDM source code if I want to compile
> it, linux/drivers perhaps?
> Or can I still do a out of tree compile for a Xenomai driver?
Compilation of kernel modules outside of the kernel sources is
documented in Documentation/kbuild/modules.txt in kernel sources.
Since RTDM modules are ordinary kernel modules, these instructions
apply.
--
Gilles.
next prev parent reply other threads:[~2015-03-13 16:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 8:17 [Xenomai] rtdm/driver.h location - Xenomai 3.0 Michael Smith
2015-03-13 9:32 ` Philippe Gerum
2015-03-13 11:42 ` Michael Smith
2015-03-13 16:39 ` Michael Smith
2015-03-13 16:44 ` Gilles Chanteperdrix [this message]
2015-03-13 17:06 ` Helder Daniel
2015-03-13 17:10 ` Gilles Chanteperdrix
2015-03-13 17:16 ` Helder Daniel
2015-03-16 6:15 ` Michael Smith
2015-03-16 9:59 ` Philippe Gerum
2015-03-16 11:09 ` Michael Smith
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=20150313164459.GF1497@hermes.click-hack.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=2michael.smith@gmail.com \
--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.