Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] kernel: yocto: Add dependency on do_prepare_recipe_sysroot
@ 2018-08-22 13:40 Lukasz Majewski
  2018-08-22 13:42 ` Bruce Ashfield
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Lukasz Majewski @ 2018-08-22 13:40 UTC (permalink / raw)
  To: openembedded-core; +Cc: Bruce Ashfield

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

(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
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-08-23 21:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox