Skip to contentSkip to conversation

kernel-yocto.bbclass: set +e in do_configme

PATCH In review Max Krummenacher 4 participants 10 messages Jul 10, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 kernel-yocto.bbclass: set +e in do_configme

The script test the error code to give usefull debug output. Aborting right after the failing process prevents that output.

This partly reverts commit ec281a948a ("kernel-yocto.bbclass:
do_kernel_configme: don't use +errexit, merge_config_build.log and fail when /.config wasn't created")

---
 meta/classes/kernel-yocto.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/kernel-yocto.bbclass +1 -0
index 54a1a1627a..7cedb05e93 100644
@@ -338,6 +338,7 @@ do_kernel_configme[depends] += "bc-native:do_populate_sysroot bison-native:do_po
 do_kernel_configme[depends] += "kern-tools-native:do_populate_sysroot"
 do_kernel_configme[dirs] += "${S} ${B}"
 do_kernel_configme() {
+	set +e
 	# translate the kconfig_mode into something that merge_config.sh
 	# understands
 	case ${KCONFIG_MODE} in
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 kernel-yocto.bbclass: force creation of config.queue

In the case of no patches or no configure fragments, during do_kernel_metadata() scc is not called, and thus kernel-sources/${meta_dir}/config.queue is not created. Later do_kernel_configme fails because the file is missing.

| ERROR: Execution of 'run.do_kernel_configme.24874' failed with exit code 1:
| exit 1 from 'configs="$(scc --configs -o ${meta_dir})"'

Forcing at least an empty config.queue file fixes this.

Fixes 23dcff0d396c (kernel/yocto: ensure that defconfigs are processed first)
Cc Bruce Ashfield <[email protected]>
---
 meta/classes/kernel-yocto.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/kernel-yocto.bbclass +2 -0
index 7cedb05e93..7ea3cb5e51 100644
@@ -220,6 +220,8 @@ do_kernel_metadata() {
 		if [ $? -ne 0 ]; then
 			bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
 		fi
+	else
+		touch ${S}/${meta_dir}/config.queue
 	fi
 
 	# if KMETA_EXTERNAL_BSPS has been set, or it has been detected from
Signature · 1 line
2.20.1
#2 lore raw

Re: [OE-core][Patch 2/2] kernel-yocto.bbclass: force creation of config.queue

Quoted 5 lines · Max Krummenacher

In the case of no patches or no configure fragments, during do_kernel_metadata() scc is not called, and thus kernel-sources/${meta_dir}/config.queue is not created. Later do_kernel_configme fails because the file is missing.

This is a really strange case, since in tree and defconfigs go through the queue.

How are you ending up in this situation in the first place?

I'd rather not force create this, but detect the misconfiguration and output a useful error message.

Bruce

Quoted 29 lines

| ERROR: Execution of 'run.do_kernel_configme.24874' failed with exit code 1:
| exit 1 from 'configs="$(scc --configs -o ${meta_dir})"'

Forcing at least an empty config.queue file fixes this.

Fixes 23dcff0d396c (kernel/yocto: ensure that defconfigs are processed first)
Cc Bruce Ashfield <[email protected]>
---
 meta/classes/kernel-yocto.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/kernel-yocto.bbclass +2 -1
index 7cedb05e93..7ea3cb5e51 100644
@@ -220,6 +220,8 @@ do_kernel_metadata() {
                if [ $? -ne 0 ]; then
                        bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
                fi
+       else
+               touch ${S}/${meta_dir}/config.queue
        fi
 
        # if KMETA_EXTERNAL_BSPS has been set, or it has been detected from
--

2.20.1

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#3 lore raw

Re: [OE-core][Patch 2/2] kernel-yocto.bbclass: force creation of config.queue

Quoted 8 lines · Bruce Ashfield
Quoted 5 lines · Max Krummenacher

In the case of no patches or no configure fragments, during do_kernel_metadata() scc is not called, and thus kernel-sources/${meta_dir}/config.queue is not created. Later do_kernel_configme fails because the file is missing.

Quoted 4 lines

This is a really strange case, since in tree and defconfigs go through the queue.

How are you ending up in this situation in the first place?

Can this be the same issue that was solved when defconfig is not in-tree?

I guess this could happen only when the list of elements defined as:
elements="echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}" would contain nothing at all, which means that even a defconfig is not found...

Max,
Can you reproduce this issue from the latest master? Fix for searching for OOT defconfig is already merged there (see [1]).

Quoted 31 lines

I'd rather not force create this, but detect the misconfiguration and output a useful error message.

Bruce

Quoted 25 lines

| ERROR: Execution of 'run.do_kernel_configme.24874' failed with exit code 1:
| exit 1 from 'configs="$(scc --configs -o ${meta_dir})"'

Forcing at least an empty config.queue file fixes this.

Fixes 23dcff0d396c (kernel/yocto: ensure that defconfigs are processed first)
Cc Bruce Ashfield <[email protected]>
---
 meta/classes/kernel-yocto.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/kernel-yocto.bbclass +2 -0
index 7cedb05e93..7ea3cb5e51 100644
@@ -220,6 +220,8 @@ do_kernel_metadata() {
                if [ $? -ne 0 ]; then
                        bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
                fi
+       else
+               touch ${S}/${meta_dir}/config.queue
        fi
 
Quoted 11 lines
Quoted 4 lines
meta/classes/kernel-yocto.bbclass +0 -1
        # if KMETA_EXTERNAL_BSPS has been set, or it has been detected from
--

2.20.1

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

[1]: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7dbc62a672909adce316bb4a8772be0ee9b480fe

Signature · 2 lines
Regards,
Andrey.
#4 lore raw

Re: [OE-core][Patch 2/2] kernel-yocto.bbclass: force creation of config.queue

Hi Bruce, Hi Andrey

Am Freitag, den 10.07.2020, 15:21 +0200 schrieb Andrey Zhizhikin:

Quoted 10 lines · Bruce Ashfield
Quoted 9 lines · Max Krummenacher
Quoted 4 lines

In the case of no patches or no configure fragments, during do_kernel_metadata() scc is not called, and thus kernel-sources/${meta_dir}/config.queue is not created. Later do_kernel_configme fails because the file is missing.

This is a really strange case, since in tree and defconfigs go through the queue.
How are you ending up in this situation in the first place?

I have a kernel recipe with SRC_URI = "git://kernel-git file://defconfig" As far as I understand it no configure fragments kick in from anywhere. Whith that the above case is what happens, i.e. none of the variables put together to form 'elements' have any content.

Notably, $sccs is empty. I.e. if I add some bbwarns after the sccs assignment

sccs="$sccs_from_src_uri"
bbwarn "sccs " $sccs
bbwarn "sccs_from_src_uri " $sccs_from_src_uri bbwarn "sccs_defconfig " $sccs_defconfig

I get:

WARNING: sccs
WARNING: sccs_from_src_uri
WARNING: sccs_defconfig .../recipes-kernel/linux/linux-toradex-4.14-2.3.x/mx8/defconfig

sccs_defconfig has been removed from the variables which form elements in commit 23dcff0d396c (oe: e6845327b693) (kernel/yocto: ensure that defconfigs are processed first). Was that removal not intended?
In which of the variables would you expect an out of tree defconfig to end up?

I admit I lack the big picture of what kgit, scc and do_kernel_metadata and friends really do, I wrote the patch under the impression that without configuration fragments or patches one should not run scc here.

Quoted 10 lines

Can this be the same issue that was solved when defconfig is not in-tree?

I guess this could happen only when the list of elements defined as:
elements="echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}" would contain nothing at all, which means that even a defconfig is not found...

Max,
Can you reproduce this issue from the latest master? Fix for searching for OOT defconfig is already merged there (see [1]).

Yes, I can, actually without your patch the build errors out earlier. You could reproduce it too if you removed

    SRC_URI += "file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch"

from meta-freescale/recipes-kernel/linux/linux-imx_5.4.3.bb and rebuild that kernel e.g.
MACHINE=imx8qmmek bitbake virtual/kernel -fc kernel_configme

Quoted 5 lines
Quoted 5 lines

I'd rather not force create this, but detect the misconfiguration and output a useful error message.

Bruce

Max

Quoted 3 lines

[1]:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7dbc62a672909adce316bb4a8772be0ee9b480fe

#5 lore raw

Re: [OE-core][Patch 2/2] kernel-yocto.bbclass: force creation of config.queue

Quoted 29 lines · Max Krummenacher

Hi Bruce, Hi Andrey

Am Freitag, den 10.07.2020, 15:21 +0200 schrieb Andrey Zhizhikin:

Quoted 10 lines · Bruce Ashfield
Quoted 9 lines · Max Krummenacher
Quoted 4 lines

In the case of no patches or no configure fragments, during do_kernel_metadata() scc is not called, and thus kernel-sources/${meta_dir}/config.queue is not created. Later do_kernel_configme fails because the file is missing.

This is a really strange case, since in tree and defconfigs go through the queue.
How are you ending up in this situation in the first place?

I have a kernel recipe with SRC_URI = "git://kernel-git file://defconfig" As far as I understand it no configure fragments kick in from anywhere. Whith that the above case is what happens, i.e. none of the variables put together to form 'elements' have any content.

Notably, $sccs is empty. I.e. if I add some bbwarns after the sccs assignment

sccs="$sccs_from_src_uri"
bbwarn "sccs " $sccs
bbwarn "sccs_from_src_uri " $sccs_from_src_uri bbwarn "sccs_defconfig " $sccs_defconfig

I get:

Quoted 8 lines
   WARNING: sccs
   WARNING: sccs_from_src_uri
   WARNING: sccs_defconfig  .../recipes-kernel/linux/linux-toradex-4.14-2.3.x/mx8/defconfig

sccs_defconfig has been removed from the variables which form elements in commit 23dcff0d396c (oe: e6845327b693) (kernel/yocto: ensure that defconfigs are processed first). Was that removal not intended?
In which of the variables would you expect an out of tree defconfig to end up?

It goes into the config.queue just like the rest of .scc files.

The changes I made recently were only to ensure that it was at the bottom of the queue, so fragments can logically follow and adjust settings. So no, the defconfig is not removed from the processing, it has just been order adjusted.

Quoted 12 lines

I admit I lack the big picture of what kgit, scc and do_kernel_metadata and friends really do, I wrote the patch under the impression that without configuration fragments or patches one should not run scc here.

Quoted 7 lines

Can this be the same issue that was solved when defconfig is not in-tree?

I guess this could happen only when the list of elements defined as:
elements="echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}" would contain nothing at all, which means that even a defconfig is not found...

Quoted 6 lines
Quoted 3 lines

Max,
Can you reproduce this issue from the latest master? Fix for searching for OOT defconfig is already merged there (see [1]).

Yes, I can, actually without your patch the build errors out earlier. You could reproduce it too if you removed

I can build here with a defconfig only kernel, so something else is wrong.

If you can send me (off list) the details of your build (your bblayers, local.conf settings), I can fire up a build and see what has gone wrong.

Bruce

Quoted 16 lines
    SRC_URI += "file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch"

from meta-freescale/recipes-kernel/linux/linux-imx_5.4.3.bb and rebuild that kernel e.g.
MACHINE=imx8qmmek bitbake virtual/kernel -fc kernel_configme

Quoted 5 lines
Quoted 5 lines

I'd rather not force create this, but detect the misconfiguration and output a useful error message.

Bruce

Max

Quoted 3 lines

[1]:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7dbc62a672909adce316bb4a8772be0ee9b480fe

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#6 lore raw

Re: [OE-core][Patch 2/2] kernel-yocto.bbclass: force creation of config.queue

Quoted 63 lines · Bruce Ashfield
Quoted 29 lines · Max Krummenacher

Hi Bruce, Hi Andrey

Am Freitag, den 10.07.2020, 15:21 +0200 schrieb Andrey Zhizhikin:

Quoted 10 lines · Bruce Ashfield
Quoted 9 lines · Max Krummenacher
Quoted 4 lines

In the case of no patches or no configure fragments, during do_kernel_metadata() scc is not called, and thus kernel-sources/${meta_dir}/config.queue is not created. Later do_kernel_configme fails because the file is missing.

This is a really strange case, since in tree and defconfigs go through the queue.
How are you ending up in this situation in the first place?

I have a kernel recipe with SRC_URI = "git://kernel-git file://defconfig" As far as I understand it no configure fragments kick in from anywhere. Whith that the above case is what happens, i.e. none of the variables put together to form 'elements' have any content.

Notably, $sccs is empty. I.e. if I add some bbwarns after the sccs assignment

sccs="$sccs_from_src_uri"
bbwarn "sccs " $sccs
bbwarn "sccs_from_src_uri " $sccs_from_src_uri bbwarn "sccs_defconfig " $sccs_defconfig

I get:

Quoted 8 lines
   WARNING: sccs
   WARNING: sccs_from_src_uri
   WARNING: sccs_defconfig  .../recipes-kernel/linux/linux-toradex-4.14-2.3.x/mx8/defconfig

sccs_defconfig has been removed from the variables which form elements in commit 23dcff0d396c (oe: e6845327b693) (kernel/yocto: ensure that defconfigs are processed first). Was that removal not intended?
In which of the variables would you expect an out of tree defconfig to end up?

It goes into the config.queue just like the rest of .scc files.

The changes I made recently were only to ensure that it was at the bottom of the queue, so fragments can logically follow and adjust settings. So no, the defconfig is not removed from the processing, it has just been order adjusted.

Quoted 16 lines

I admit I lack the big picture of what kgit, scc and do_kernel_metadata and friends really do, I wrote the patch under the impression that without configuration fragments or patches one should not run scc here.

Quoted 10 lines

Can this be the same issue that was solved when defconfig is not in-tree?

I guess this could happen only when the list of elements defined as:
elements="echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}" would contain nothing at all, which means that even a defconfig is not found...

Max,
Can you reproduce this issue from the latest master? Fix for searching for OOT defconfig is already merged there (see [1]).

Quoted 8 lines
Quoted 2 lines

Yes, I can, actually without your patch the build errors out earlier. You could reproduce it too if you removed

I can build here with a defconfig only kernel, so something else is wrong.

If you can send me (off list) the details of your build (your bblayers, local.conf settings), I can fire up a build and see what has gone wrong.

Actually, I think I see the hole that this managed to sail through. Can you try the attached patch ?

It isn't the final one, since I'm also going to add a message and error if no configuration elements are found, but I wanted to see if this addresses the immediate issue.

I'm actually in the midst of re-working quite a bit of this flow for the fall release, so I'm trying to keep changes to a minimum at the moment, since they could end up being tossed in the bin shortly.

Bruce

Quoted 25 lines

Bruce

Quoted 5 lines
    SRC_URI += "file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch"

from meta-freescale/recipes-kernel/linux/linux-imx_5.4.3.bb and rebuild that kernel e.g.
MACHINE=imx8qmmek bitbake virtual/kernel -fc kernel_configme

Quoted 1 line
Quoted 11 lines
Quoted 4 lines
Quoted 4 lines

I'd rather not force create this, but detect the misconfiguration and output a useful error message.

Bruce

Max

Quoted 3 lines

[1]:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7dbc62a672909adce316bb4a8772be0ee9b480fe

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

From ad4f60bc119ae974870d7d6a2a5100630d1f2acb Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <[email protected]>
Date: Fri, 10 Jul 2020 11:24:06 -0400
Subject: [PATCH] kernel-yocto: account for extracted defconfig in elements
check

The test for whether or not scc should to invoked to generate a config.queue was missing the newly created sccs_defconfig variable. We need to test for that variable as well, or we may miss generating the config.queue in some cases.

---
 meta/classes/kernel-yocto.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel-yocto.bbclass +1 -1
index 330933a397..3bcd74a295 100644
@@ -251,7 +251,7 @@ do_kernel_metadata() {
 	meta_dir=$(kgit --meta)
 
 	# run1: pull all the configuration fragments, no matter where they come from
-	elements="`echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}`"
+	elements="`echo -n ${bsp_definition} $sccs_defconfig ${sccs} ${patches} ${KERNEL_FEATURES}`"
 	if [ -n "${elements}" ]; then
 		echo "${bsp_definition}" > ${S}/${meta_dir}/bsp_definition
 		scc --force -o ${S}/${meta_dir}:cfg,merge,meta ${includes} $sccs_defconfig $bsp_definition $sccs $patches ${KERNEL_FEATURES}
Signature · 1 line
2.19.1
#7 lore raw

Re: [OE-core][Patch 2/2] kernel-yocto.bbclass: force creation of config.queue

Hi Bruce

Am Freitag, den 10.07.2020, 11:28 -0400 schrieb Bruce Ashfield:

Quoted 70 lines
Quoted 59 lines · Bruce Ashfield
Quoted 28 lines · Max Krummenacher

Hi Bruce, Hi Andrey

Am Freitag, den 10.07.2020, 15:21 +0200 schrieb Andrey Zhizhikin:

Quoted 10 lines · Bruce Ashfield
Quoted 9 lines · Max Krummenacher
Quoted 4 lines

In the case of no patches or no configure fragments, during do_kernel_metadata() scc is not called, and thus kernel-sources/${meta_dir}/config.queue is not created. Later do_kernel_configme fails because the file is missing.

This is a really strange case, since in tree and defconfigs go through the queue.
How are you ending up in this situation in the first place?

I have a kernel recipe with SRC_URI = "git://kernel-git file://defconfig" As far as I understand it no configure fragments kick in from anywhere. Whith that the above case is what happens, i.e. none of the variables put together to form 'elements' have any content.

Notably, $sccs is empty. I.e. if I add some bbwarns after the sccs assignment

sccs="$sccs_from_src_uri"
bbwarn "sccs " $sccs
bbwarn "sccs_from_src_uri " $sccs_from_src_uri bbwarn "sccs_defconfig " $sccs_defconfig

I get:

Quoted 8 lines
   WARNING: sccs
   WARNING: sccs_from_src_uri
   WARNING: sccs_defconfig  .../recipes-kernel/linux/linux-toradex-4.14-2.3.x/mx8/defconfig

sccs_defconfig has been removed from the variables which form elements in commit 23dcff0d396c (oe: e6845327b693) (kernel/yocto: ensure that defconfigs are processed first). Was that removal not intended?
In which of the variables would you expect an out of tree defconfig to end up?

It goes into the config.queue just like the rest of .scc files.

The changes I made recently were only to ensure that it was at the bottom of the queue, so fragments can logically follow and adjust settings. So no, the defconfig is not removed from the processing, it has just been order adjusted.

Quoted 14 lines

I admit I lack the big picture of what kgit, scc and do_kernel_metadata and friends really do, I wrote the patch under the impression that without configuration fragments or patches one should not run scc here.

Quoted 9 lines

Can this be the same issue that was solved when defconfig is not in-tree?

I guess this could happen only when the list of elements defined as:
elements="echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}" would contain nothing at all, which means that even a defconfig is not found...

Max,
Can you reproduce this issue from the latest master? Fix for searching for OOT defconfig is already merged there (see [1]).

Quoted 8 lines
Quoted 2 lines

Yes, I can, actually without your patch the build errors out earlier. You could reproduce it too if you removed

I can build here with a defconfig only kernel, so something else is wrong.

If you can send me (off list) the details of your build (your bblayers, local.conf settings), I can fire up a build and see what has gone wrong.

Quoted 6 lines

Actually, I think I see the hole that this managed to sail through. Can you try the attached patch ?

It isn't the final one, since I'm also going to add a message and error if no configuration elements are found, but I wanted to see if this addresses the immediate issue.

I don't have to test, this was actually my first approach to make the build succeed. I thought it to be to invasive for all the other use cases which I do not fully understand.

If you're working on anything that includes the effects of the attached patch just drop my submission. Thanks for the work.

I put a workaround for this issue in our kernel recipe, so for me there is no rush to have it fixed in openembedded-core.

Max

If anyone would need the quick and dirty workaround:

+do_kernel_metadata_append () {
+ touch ${S}/.kernel-meta/config.queue
+}

Quoted 30 lines

I'm actually in the midst of re-working quite a bit of this flow for the fall release, so I'm trying to keep changes to a minimum at the moment, since they could end up being tossed in the bin shortly.

Bruce

Quoted 21 lines

Bruce

Quoted 4 lines
    SRC_URI += "file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch"

from meta-freescale/recipes-kernel/linux/linux-imx_5.4.3.bb and rebuild that kernel e.g.
MACHINE=imx8qmmek bitbake virtual/kernel -fc kernel_configme

Quoted 10 lines
Quoted 4 lines
Quoted 4 lines

I'd rather not force create this, but detect the misconfiguration and output a useful error message.

Bruce

Max

Quoted 3 lines

[1]:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7dbc62a672909adce316bb4a8772be0ee9b480fe

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

#8 lore raw

Re: [OE-core][Patch 2/2] kernel-yocto.bbclass: force creation of config.queue

Quoted 77 lines · Max Krummenacher

Hi Bruce

Am Freitag, den 10.07.2020, 11:28 -0400 schrieb Bruce Ashfield:

Quoted 73 lines
Quoted 59 lines · Bruce Ashfield
Quoted 28 lines · Max Krummenacher

Hi Bruce, Hi Andrey

Am Freitag, den 10.07.2020, 15:21 +0200 schrieb Andrey Zhizhikin:

Quoted 10 lines · Bruce Ashfield
Quoted 9 lines · Max Krummenacher
Quoted 4 lines

In the case of no patches or no configure fragments, during do_kernel_metadata() scc is not called, and thus kernel-sources/${meta_dir}/config.queue is not created. Later do_kernel_configme fails because the file is missing.

This is a really strange case, since in tree and defconfigs go through the queue.
How are you ending up in this situation in the first place?

I have a kernel recipe with SRC_URI = "git://kernel-git file://defconfig" As far as I understand it no configure fragments kick in from anywhere. Whith that the above case is what happens, i.e. none of the variables put together to form 'elements' have any content.

Notably, $sccs is empty. I.e. if I add some bbwarns after the sccs assignment

sccs="$sccs_from_src_uri"
bbwarn "sccs " $sccs
bbwarn "sccs_from_src_uri " $sccs_from_src_uri bbwarn "sccs_defconfig " $sccs_defconfig

I get:

Quoted 8 lines
   WARNING: sccs
   WARNING: sccs_from_src_uri
   WARNING: sccs_defconfig  .../recipes-kernel/linux/linux-toradex-4.14-2.3.x/mx8/defconfig

sccs_defconfig has been removed from the variables which form elements in commit 23dcff0d396c (oe: e6845327b693) (kernel/yocto: ensure that defconfigs are processed first). Was that removal not intended?
In which of the variables would you expect an out of tree defconfig to end up?

It goes into the config.queue just like the rest of .scc files.

The changes I made recently were only to ensure that it was at the bottom of the queue, so fragments can logically follow and adjust settings. So no, the defconfig is not removed from the processing, it has just been order adjusted.

Quoted 14 lines

I admit I lack the big picture of what kgit, scc and do_kernel_metadata and friends really do, I wrote the patch under the impression that without configuration fragments or patches one should not run scc here.

Quoted 9 lines

Can this be the same issue that was solved when defconfig is not in-tree?

I guess this could happen only when the list of elements defined as:
elements="echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}" would contain nothing at all, which means that even a defconfig is not found...

Max,
Can you reproduce this issue from the latest master? Fix for searching for OOT defconfig is already merged there (see [1]).

Quoted 8 lines
Quoted 2 lines

Yes, I can, actually without your patch the build errors out earlier. You could reproduce it too if you removed

I can build here with a defconfig only kernel, so something else is wrong.

If you can send me (off list) the details of your build (your bblayers, local.conf settings), I can fire up a build and see what has gone wrong.

Actually, I think I see the hole that this managed to sail through. Can you try the attached patch ?

Quoted 8 lines
Quoted 3 lines

It isn't the final one, since I'm also going to add a message and error if no configuration elements are found, but I wanted to see if this addresses the immediate issue.

I don't have to test, this was actually my first approach to make the build succeed. I thought it to be to invasive for all the other use cases which I do not fully understand.

Aha. And right you were. It always used to be accounted for in that test, and when I jiggled it, I missed that side effect. *sigh*

There's lots I don't like with the routines, they were written quite a while ago and have some nasty conventions that I wouldn't use now. Hence why I'm working on some medium size changes to it .. but there are so many use cases I risk breaking, the effort is slow :)

Quoted 2 lines

If you're working on anything that includes the effects of the attached patch just drop my submission. Thanks for the work.

The report was useful, so thanks for that. I'll clean up my effort and have it in my next pull request.

Cheers,

Bruce

Quoted 43 lines

I put a workaround for this issue in our kernel recipe, so for me there is no rush to have it fixed in openembedded-core.

Max

If anyone would need the quick and dirty workaround:

(quoted diff) +3 -0
+do_kernel_metadata_append () {
+       touch ${S}/.kernel-meta/config.queue
+}
Quoted 31 lines

I'm actually in the midst of re-working quite a bit of this flow for the fall release, so I'm trying to keep changes to a minimum at the moment, since they could end up being tossed in the bin shortly.

Bruce

Quoted 21 lines

Bruce

Quoted 4 lines
    SRC_URI += "file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch"

from meta-freescale/recipes-kernel/linux/linux-imx_5.4.3.bb and rebuild that kernel e.g.
MACHINE=imx8qmmek bitbake virtual/kernel -fc kernel_configme

Quoted 10 lines
Quoted 4 lines
Quoted 4 lines

I'd rather not force create this, but detect the misconfiguration and output a useful error message.

Bruce

Max

Quoted 3 lines

[1]:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=7dbc62a672909adce316bb4a8772be0ee9b480fe

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#9 lore raw

Re: [OE-core][Patch 2/2] kernel-yocto.bbclass: force creation of config.queue

In reply to Max Krummenacher

Max, all,

Le 10/07/2020 à 17:52, Max Krummenacher a écrit :

Quoted 14 lines

I don't have to test, this was actually my first approach to make the build succeed. I thought it to be to invasive for all the other use cases which I do not fully understand.

If you're working on anything that includes the effects of the attached patch just drop my submission. Thanks for the work.

I put a workaround for this issue in our kernel recipe, so for me there is no rush to have it fixed in openembedded-core.

Max

If anyone would need the quick and dirty workaround:

Review

Quoted 3 lines
(quoted diff) +3 -0
+do_kernel_metadata_append () {
+       touch ${S}/.kernel-meta/config.queue
+}

Thanks for this.
I have the same problem on my side (poky master + meta-freescale -> imx7s-warp) and this one fixes my build issue [1].

[1] - http://51.75.135.20:8080/job/imx7s-warp/104/console

Signature · 3 lines
Pierre-Jean Texier
Embedded Linux Engineer
https://koncepto.io