All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] kernel: yocto: Add dependency on do_prepare_recipe_sysroot
Date: Wed, 22 Aug 2018 15:51:41 +0200	[thread overview]
Message-ID: <20180822155141.4f56ff85@jawa> (raw)
In-Reply-To: <446ed947-bbab-1bb6-4fad-e222af1fa662@windriver.com>

[-- Attachment #1: Type: text/plain, Size: 2916 bytes --]

Hi Bruce,

> On 08/22/2018 09:40 AM, Lukasz Majewski wrote:
> > Without this patch it happens that do_populate_recipe_sysroot is
> > called just before do_compile (on multi core build machines).
> > This is way too late as the .config generated in
> > do_kernel_configme() is already broken.
> > 
> > The problem is that do_kernel_configme() calls native's
> > merge_config.sh script which may call bison and arm-linux-*-gcc to
> > compile kconfig infrastructure to create base .config
> > (scripts/kconfig/conf  --allnoconfig Kconfig.)
> > 
> > It turns out that we only got above binaries after
> > do_prepare_recipe_sysroot() is called.
> > If those binaries are not available, the merge_config.sh do not
> > generate base .config and without any error produces
> > malfunctioned .config. The build process continues and as a result
> > broken kernel is compiled.
> > 
> > To reproduce:
> > 
> > bitbake -c cleansstate virtual/kernel
> > bitbake -c kernel_metadata -v virtual/kernel
> > bitbake -c do_kernel_configme -v virtual/kernel
> > (one shall see broken .config in ${B}/.config)
> > bitbake -c do_populate_sysroot -v virtual/kernel
> > bitbake -c do_compile -v virtual/kernel
> >   
> 
> I already have a queue of changes for the 4.18 kernel that has a
> similar tweak.
> 
> I'll double check the use case above, and if it isn't already
> fixed, I'll add this to my queue.

One more strange observation the merge_config.sh shall use -native
binaries (like bison, gcc, etc).

Unfortunately, in my case it depends on target ones (as we do have
CFLAGS = .... ARCH=arm ... merge_configs.sh).

The bitbake -g -u taskexp virtual/kernel shows however that we do
depend on native bison.

To provide target ones - I do need the do_prepare_recipe_sysroot() to
call before do_configure.

> 
> Bruce
> 
> > (Poky) SHA1: bb91b2ae3ee5cf108aa2f9b78abb14d5aa00831d
> > 
> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> > ---
> >   meta/classes/kernel-yocto.bbclass | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/meta/classes/kernel-yocto.bbclass
> > b/meta/classes/kernel-yocto.bbclass index 4ac3a39e47..19a3f2bc46
> > 100644 --- a/meta/classes/kernel-yocto.bbclass
> > +++ b/meta/classes/kernel-yocto.bbclass
> > @@ -276,6 +276,7 @@ do_kernel_metadata[depends] =
> > "kern-tools-native:do_populate_sysroot"
> > do_validate_branches[depends] =
> > "kern-tools-native:do_populate_sysroot" do_kernel_configme[dirs] +=
> > "${S} ${B}" +do_kernel_configme[depends] +=
> > "virtual/kernel:do_prepare_recipe_sysroot" do_kernel_configme() {
> >   	set +e
> >   
> >   
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

  reply	other threads:[~2018-08-22 13:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 13:40 [PATCH] kernel: yocto: Add dependency on do_prepare_recipe_sysroot Lukasz Majewski
2018-08-22 13:42 ` Bruce Ashfield
2018-08-22 13:51   ` Lukasz Majewski [this message]
2018-08-22 13:48 ` Bruce Ashfield
2018-08-22 14:05   ` Lukasz Majewski
2018-08-22 14:13     ` Bruce Ashfield
2018-08-22 14:20       ` Lukasz Majewski
2018-08-22 14:44         ` Bruce Ashfield
2018-08-22 14:47           ` Lukasz Majewski
2018-08-22 14:50             ` Bruce Ashfield
2018-08-23 16:45             ` Bruce Ashfield
2018-08-23 21:15               ` Lukasz Majewski
2018-08-22 14:07 ` ✗ patchtest: failure for " Patchwork

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=20180822155141.4f56ff85@jawa \
    --to=lukma@denx.de \
    --cc=bruce.ashfield@windriver.com \
    --cc=openembedded-core@lists.openembedded.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.