* [Xenomai] Xeno3.x xeno-config --kcflags
@ 2015-04-21 6:37 Hänel-Baas, Alexander
2015-04-21 11:12 ` Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: Hänel-Baas, Alexander @ 2015-04-21 6:37 UTC (permalink / raw)
To: xenomai@xenomai.org
Hi,
I run "xeno-config --rtdm --kcflags" to get the cflags when i build my own kernel modules.
The script returned: -Iarch/$(SRCARCH)/xenomai/include
My question: who is set $(SRCARCH)?
With best regards,
Alexander
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai] Xeno3.x xeno-config --kcflags
2015-04-21 6:37 [Xenomai] Xeno3.x xeno-config --kcflags Hänel-Baas, Alexander
@ 2015-04-21 11:12 ` Jan Kiszka
2015-04-22 6:14 ` Hänel-Baas, Alexander
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2015-04-21 11:12 UTC (permalink / raw)
To: "Hänel-Baas, Alexander", xenomai@xenomai.org
On 2015-04-21 08:37, Hänel-Baas, Alexander wrote:
> Hi,
> I run "xeno-config --rtdm --kcflags" to get the cflags when i build my own kernel modules.
> The script returned: -Iarch/$(SRCARCH)/xenomai/include
>
> My question: who is set $(SRCARCH)?
>
That that the directory under linux/arch/ that will be used for the
build. But you don't need to worry about this, kbuild will take care of
resolving it (assuming that you are not trying to reinvent it). Just
feed the output into ccflags-y, e.g.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai] Xeno3.x xeno-config --kcflags
2015-04-21 11:12 ` Jan Kiszka
@ 2015-04-22 6:14 ` Hänel-Baas, Alexander
2015-04-22 6:29 ` Philippe Gerum
0 siblings, 1 reply; 7+ messages in thread
From: Hänel-Baas, Alexander @ 2015-04-22 6:14 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai@xenomai.org
Hi Jan
You are right, kbuild resolve it.
My mistake: I stored the kcflags in a variable and put this variable in the EXTRA_CFLAGS from the make file.
XENOMAI_K_CFLAGS = $(shell /usr/xenomai/bin/xeno-config --rtdm --kcflags)
EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS)
The result was: EXTRA_CFLAGS= -Iarch/$(SRCARCH)/xenomai/include.
So I need a second expand step from $(SRCARCH).
My solution is the eval function:
$(eval EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS))
And now I get: EXTRA_CFLAGS= -Iarch/arm/xenomai/include
and now module builds are success full.
Thank you very much for your post.
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai] Xeno3.x xeno-config --kcflags
2015-04-22 6:14 ` Hänel-Baas, Alexander
@ 2015-04-22 6:29 ` Philippe Gerum
2015-04-22 6:46 ` Hänel-Baas, Alexander
2015-04-30 8:51 ` Philippe Gerum
0 siblings, 2 replies; 7+ messages in thread
From: Philippe Gerum @ 2015-04-22 6:29 UTC (permalink / raw)
To: "Hänel-Baas, Alexander", Jan Kiszka; +Cc: xenomai@xenomai.org
On 04/22/2015 08:14 AM, Hänel-Baas, Alexander wrote:
> Hi Jan
>
> You are right, kbuild resolve it.
>
> My mistake: I stored the kcflags in a variable and put this variable in the EXTRA_CFLAGS from the make file.
> XENOMAI_K_CFLAGS = $(shell /usr/xenomai/bin/xeno-config --rtdm --kcflags)
> EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS)
> The result was: EXTRA_CFLAGS= -Iarch/$(SRCARCH)/xenomai/include.
>
> So I need a second expand step from $(SRCARCH).
> My solution is the eval function:
> $(eval EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS))
> And now I get: EXTRA_CFLAGS= -Iarch/arm/xenomai/include
> and now module builds are success full.
>
> Thank you very much for your post.
>
Actually, this xeno-config --kcflags I came up with is overly and
uselessly complex. Since we patch the build system for merging the
Xenomai bits into the kernel image, we could just define a plain make
variable for holding those extra flags, which depend on the file layout
of the Xenomai release patched in only, so running a script to get them
is 100% overkill.
I'll come up with something simpler in the next days, so that Makefiles
can just refer to $(RTDM_CFLAGS) or something along these lines.
--
Philippe.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai] Xeno3.x xeno-config --kcflags
2015-04-22 6:29 ` Philippe Gerum
@ 2015-04-22 6:46 ` Hänel-Baas, Alexander
2015-04-30 8:51 ` Philippe Gerum
1 sibling, 0 replies; 7+ messages in thread
From: Hänel-Baas, Alexander @ 2015-04-22 6:46 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai@xenomai.org
Hi Philippe
Good idea, I'm still waiting.
---
Alexander
-----Ursprüngliche Nachricht-----
Von: Philippe Gerum [mailto:rpm@xenomai.org]
Gesendet: Mittwoch, 22. April 2015 08:29
An: Hänel-Baas, Alexander; Jan Kiszka
Cc: xenomai@xenomai.org
Betreff: Re: [Xenomai] Xeno3.x xeno-config --kcflags
On 04/22/2015 08:14 AM, Hänel-Baas, Alexander wrote:
> Hi Jan
>
> You are right, kbuild resolve it.
>
> My mistake: I stored the kcflags in a variable and put this variable in the EXTRA_CFLAGS from the make file.
> XENOMAI_K_CFLAGS = $(shell /usr/xenomai/bin/xeno-config --rtdm
> --kcflags) EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS) The result was:
> EXTRA_CFLAGS= -Iarch/$(SRCARCH)/xenomai/include.
>
> So I need a second expand step from $(SRCARCH).
> My solution is the eval function:
> $(eval EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS)) And now I get:
> EXTRA_CFLAGS= -Iarch/arm/xenomai/include and now module builds are
> success full.
>
> Thank you very much for your post.
>
Actually, this xeno-config --kcflags I came up with is overly and uselessly complex. Since we patch the build system for merging the Xenomai bits into the kernel image, we could just define a plain make variable for holding those extra flags, which depend on the file layout of the Xenomai release patched in only, so running a script to get them is 100% overkill.
I'll come up with something simpler in the next days, so that Makefiles can just refer to $(RTDM_CFLAGS) or something along these lines.
--
Philippe.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai] Xeno3.x xeno-config --kcflags
2015-04-22 6:29 ` Philippe Gerum
2015-04-22 6:46 ` Hänel-Baas, Alexander
@ 2015-04-30 8:51 ` Philippe Gerum
2015-05-04 6:01 ` Hänel-Baas, Alexander
1 sibling, 1 reply; 7+ messages in thread
From: Philippe Gerum @ 2015-04-30 8:51 UTC (permalink / raw)
To: "Hänel-Baas, Alexander", Jan Kiszka; +Cc: xenomai@xenomai.org
On 04/22/2015 08:29 AM, Philippe Gerum wrote:
> On 04/22/2015 08:14 AM, Hänel-Baas, Alexander wrote:
>> Hi Jan
>>
>> You are right, kbuild resolve it.
>>
>> My mistake: I stored the kcflags in a variable and put this variable in the EXTRA_CFLAGS from the make file.
>> XENOMAI_K_CFLAGS = $(shell /usr/xenomai/bin/xeno-config --rtdm --kcflags)
>> EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS)
>> The result was: EXTRA_CFLAGS= -Iarch/$(SRCARCH)/xenomai/include.
>>
>> So I need a second expand step from $(SRCARCH).
>> My solution is the eval function:
>> $(eval EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS))
>> And now I get: EXTRA_CFLAGS= -Iarch/arm/xenomai/include
>> and now module builds are success full.
>>
>> Thank you very much for your post.
>>
>
> Actually, this xeno-config --kcflags I came up with is overly and
> uselessly complex. Since we patch the build system for merging the
> Xenomai bits into the kernel image, we could just define a plain make
> variable for holding those extra flags, which depend on the file layout
> of the Xenomai release patched in only, so running a script to get them
> is 100% overkill.
>
> I'll come up with something simpler in the next days, so that Makefiles
> can just refer to $(RTDM_CFLAGS) or something along these lines.
>
You won't need any extra CFLAGS anymore for building RTDM drivers, with
this commit from the -next branch:
http://git.xenomai.org/xenomai-3.git/commit/?h=next&id=a3a30499b7ffd9a36c18d909909b4f45bf3f710a
For these changes to take effect, you will have to run the
prepare-kernel.sh script on a fresh kernel, so that the kernel Makefiles
are patched properly.
In other words, with this changes in, you can drop the xeno-config
--kcflags invocation from your Makefiles building RTDM drivers.
--
Philippe.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai] Xeno3.x xeno-config --kcflags
2015-04-30 8:51 ` Philippe Gerum
@ 2015-05-04 6:01 ` Hänel-Baas, Alexander
0 siblings, 0 replies; 7+ messages in thread
From: Hänel-Baas, Alexander @ 2015-05-04 6:01 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai@xenomai.org
Hi Philippe,
i have applied your patch, dropped the xeno-config --kcflags from my makefile and
run the prepare-kernel script.
And now, i can compile my kernel-modules without the xeno-config kcflags.
---
Alex
-----Ursprüngliche Nachricht-----
Von: Philippe Gerum [mailto:rpm@xenomai.org]
Gesendet: Donnerstag, 30. April 2015 10:51
An: Hänel-Baas, Alexander; Jan Kiszka
Cc: xenomai@xenomai.org
Betreff: Re: [Xenomai] Xeno3.x xeno-config --kcflags
On 04/22/2015 08:29 AM, Philippe Gerum wrote:
> On 04/22/2015 08:14 AM, Hänel-Baas, Alexander wrote:
>> Hi Jan
>>
>> You are right, kbuild resolve it.
>>
>> My mistake: I stored the kcflags in a variable and put this variable in the EXTRA_CFLAGS from the make file.
>> XENOMAI_K_CFLAGS = $(shell /usr/xenomai/bin/xeno-config --rtdm
>> --kcflags) EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS) The result was:
>> EXTRA_CFLAGS= -Iarch/$(SRCARCH)/xenomai/include.
>>
>> So I need a second expand step from $(SRCARCH).
>> My solution is the eval function:
>> $(eval EXTRA_CFLAGS += $(XENOMAI_K_CFLAGS)) And now I get:
>> EXTRA_CFLAGS= -Iarch/arm/xenomai/include and now module builds are
>> success full.
>>
>> Thank you very much for your post.
>>
>
> Actually, this xeno-config --kcflags I came up with is overly and
> uselessly complex. Since we patch the build system for merging the
> Xenomai bits into the kernel image, we could just define a plain make
> variable for holding those extra flags, which depend on the file
> layout of the Xenomai release patched in only, so running a script to
> get them is 100% overkill.
>
> I'll come up with something simpler in the next days, so that
> Makefiles can just refer to $(RTDM_CFLAGS) or something along these lines.
>
You won't need any extra CFLAGS anymore for building RTDM drivers, with this commit from the -next branch:
http://git.xenomai.org/xenomai-3.git/commit/?h=next&id=a3a30499b7ffd9a36c18d909909b4f45bf3f710a
For these changes to take effect, you will have to run the prepare-kernel.sh script on a fresh kernel, so that the kernel Makefiles are patched properly.
In other words, with this changes in, you can drop the xeno-config --kcflags invocation from your Makefiles building RTDM drivers.
--
Philippe.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-04 6:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-21 6:37 [Xenomai] Xeno3.x xeno-config --kcflags Hänel-Baas, Alexander
2015-04-21 11:12 ` Jan Kiszka
2015-04-22 6:14 ` Hänel-Baas, Alexander
2015-04-22 6:29 ` Philippe Gerum
2015-04-22 6:46 ` Hänel-Baas, Alexander
2015-04-30 8:51 ` Philippe Gerum
2015-05-04 6:01 ` Hänel-Baas, Alexander
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.