Skip to contentSkip to conversation

Xenomai package not extracted in time

Buildroot gpontis at spamcop.net 2 participants 5 messages Jun 20, 2013 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

I'm working with buildroot 2013.05, ARM, and Xenomai 2.6.2.1. As part of making Xenomai go, there is a kernel patch. I keep that patch under my board directory and point to it with BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH. The build is failing because a script (from Xenomai) that is used to apply this patch is not available. It is not available because the Xenomai package has not been extracted yet. If I manually extract the Xenomai package once then all goes ahead smoothly. A few versions back of Xenomai and buildroot, this worked automatically. I don't know if I broke something or if the BR environment has somehow changed. But can someone offer guidance on how to fix it so he manual step is not necessary ?

TIA

Geo.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130620/9286a306/attachment.html>

#1 lore raw

Dear gpontis at spamcop.net,

Quoted 10 lines · gpontis at spamcop.net

I'm working with buildroot 2013.05, ARM, and Xenomai 2.6.2.1. As part of making Xenomai go, there is a kernel patch. I keep that patch under my board directory and point to it with BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH. The build is failing because a script (from Xenomai) that is used to apply this patch is not available. It is not available because the Xenomai package has not been extracted yet. If I manually extract the Xenomai package once then all goes ahead smoothly. A few versions back of Xenomai and buildroot, this worked automatically. I don't know if I broke something or if the BR environment has somehow changed. But can someone offer guidance on how to fix it so he manual step is not necessary ?

Can you share a .config (with all the necessary things) so that we can reproduce the issue?

Thanks,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw
In reply to gpontis at spamcop.net

Dear gpontis at spamcop.net,

Quoted 10 lines · gpontis at spamcop.net

I'm working with buildroot 2013.05, ARM, and Xenomai 2.6.2.1. As part of making Xenomai go, there is a kernel patch. I keep that patch under my board directory and point to it with BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH. The build is failing because a script (from Xenomai) that is used to apply this patch is not available. It is not available because the Xenomai package has not been extracted yet. If I manually extract the Xenomai package once then all goes ahead smoothly. A few versions back of Xenomai and buildroot, this worked automatically. I don't know if I broke something or if the BR environment has somehow changed. But can someone offer guidance on how to fix it so he manual step is not necessary ?

Ok, I see where the problem is. The Xenomai Linux extension code in linux/linux-ext-xenomai.mk properly makes the 'linux' package depends on the 'xenomai' package. However, the dependencies are only handled at the configure step of all packages. I.e, before the Linux configuration starts, you have the guarantee that Xenomai will have been built (and therefore extracted).

However, in the case of the Xenomai extension, the Xenomai package is needed during the *patch* step of Linux, to ensure that the prepare-kernel.sh script of Xenomai is available to patch the kernel.

And guess what? The reason why it's broken now is because we changed the dependency handling to support... RTAI!

See commit a473a616d27e46951a23d90249a31b08006098bf ("package: change ordering of steps").

Maybe I don't have both of my eyes fully opened, but reading the RTAI stuff, I don't see how it can work. It pulls "rtai-patch" as a dependency of Linux, and then uses RTAI patches in the patch step of Linux. But the dependency 'rtai-patch' is only guaranteed to be pulled in before 'linux-configure' starts, not before 'linux-patch' starts. How can this stuff work?

I guess this needs some testing and investigation :)

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Dear George Pontis,

Please don't reply to me only, but also to the list.

Quoted 3 lines · George Pontis

Thanks for your attention Thomas. I look forward to a fix, but in the short term I'll look at the commit and see if I can back it out temporarily since we only use Xenomai.

Backing out the commit will be hard because many other related changes have been done since then.

You can try adding a line like:

linux-patch: xenomai-extract

in the linux/linux-ext-xenomai.mk.

Completely untested, of course.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw
Quoted 23 lines

-----Original Message-----
From: Thomas Petazzoni [mailto:thomas.petazzoni at free-electrons.com]
Sent: Thursday, June 20, 2013 10:40 AM
To: George Pontis
Cc: buildroot at uclibc.org
Subject: Re: [Buildroot] Xenomai package not extracted in time

Dear George Pontis,

Please don't reply to me only, but also to the list.

Quoted 3 lines · George Pontis

Thanks for your attention Thomas. I look forward to a fix, but in the short term I'll look at the commit and see if I can back it out temporarily since we only use Xenomai.

Backing out the commit will be hard because many other related changes have been done since then.

You can try adding a line like:

linux-patch: xenomai-extract

Quoted 7 lines

in the linux/linux-ext-xenomai.mk.

Completely untested, of course.

Best regards,

Thomas

That seems to take care of it. Thank you Thomas.

- Geo.