Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Xenomai package not extracted in time
Date: Thu, 20 Jun 2013 18:42:22 +0200	[thread overview]
Message-ID: <20130620184222.37b73ce2@skate> (raw)
In-Reply-To: <02de01ce6dd0$bb38f3a0$31aadae0$@spamcop.net>

Dear gpontis at spamcop.net,

On Thu, 20 Jun 2013 09:10:50 -0700, gpontis at spamcop.net wrote:

> 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
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  parent reply	other threads:[~2013-06-20 16:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 16:10 [Buildroot] Xenomai package not extracted in time gpontis at spamcop.net
2013-06-20 16:30 ` Thomas Petazzoni
2013-06-20 16:42 ` Thomas Petazzoni [this message]
     [not found]   ` <000501ce6dda$fca14a90$f5e3dfb0$@z9.com>
2013-06-20 17:40     ` Thomas Petazzoni
2013-06-20 17:52       ` [Buildroot] FW: " gpontis at spamcop.net

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=20130620184222.37b73ce2@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox