<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15478</bug_id>
          
          <creation_ts>2024-05-06 14:19:41 +0000</creation_ts>
          <short_desc>do_menuconfig for linux-yocto fails with kernel-fitimage and UBOOT_CONFIG</short_desc>
          <delta_ts>2026-05-28 15:10:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>kernel</component>
          <version>5.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.1 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim">tim.vanderstaaij</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>adrian.freihofer</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>Rouven.Rastetter</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>98971</commentid>
    <comment_count>0</comment_count>
    <who name="Tim">tim.vanderstaaij</who>
    <bug_when>2024-05-06 14:19:41 +0000</bug_when>
    <thetext>When KERNEL_CLASSES contains kernel-fitimage, and UBOOT_CONFIG is used instead of UBOOT_MACHINE, then `bitbake -c menuconfig linux-yocto` fails with:

ERROR: linux-yocto-6.6.23+git-r0 do_menuconfig: do_menuconfig is disabled, please check KCONFIG_CONFIG_ENABLE_MENUCONFIG variable.
ERROR: Logfile of failure stored in: &lt;projectroot&gt;/build/tmp/work/qemuarm-poky-linux-gnueabi/linux-yocto/6.6.23+git/temp/log.do_menuconfig.1050647
ERROR: Task (&lt;projectroot&gt;/sources/poky/meta/recipes-kernel/linux/linux-yocto_6.6.bb:do_menuconfig) failed with exit code &apos;1&apos;

Minimal reproducible example:

build/conf/bblayers.conf
---
POKY_BBLAYERS_CONF_VERSION = &quot;2&quot;
BBPATH = &quot;${TOPDIR}&quot;
BBFILES ?= &quot;&quot;
YOCTOROOT = &quot;${@os.path.abspath(os.path.join(&quot;${TOPDIR}&quot;, os.pardir))}&quot;
BBLAYERS ?= &quot; \
  ${YOCTOROOT}/sources/poky/meta \
  ${YOCTOROOT}/sources/poky/meta-poky \
  &quot;
---

build/conf/local.conf as generated by `oe-init-build-env`, with the addition of:
---
MACHINE = &quot;qemuarm&quot;
KERNEL_CLASSES += &quot;kernel-fitimage&quot;
UBOOT_MACHINE = &quot;&quot;
UBOOT_CONFIG = &quot;confa confb&quot;
UBOOT_CONFIG[confa] = &quot;qemu_arm_defconfig&quot;
UBOOT_CONFIG[confb] = &quot;qemu_arm_defconfig&quot;
---

The error message suggests that this was introduced by 0241bdb, and reverting that commit does indeed solve the issue.

The error message suggests that setting KCONFIG_CONFIG_ENABLE_MENUCONFIG = &quot;true&quot; in local.conf or a linux-yocto bbappend could be a workaround, but this doesn&apos;t help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99948</commentid>
    <comment_count>1</comment_count>
    <who name="Rouven Rastetter">Rouven.Rastetter</who>
    <bug_when>2024-10-18 15:30:58 +0000</bug_when>
    <thetext>I can confirm this bug. I imagine the correct fix is probably to split uboot-config.bbclass so that fitimage.bbclass can only include relevant parts?

We currently fixed it by only executing the offending logic, when the current recipe PROVIDES u-boot:

diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass
index 28d5545b27..fd05924415 100644
--- a/meta/classes-recipe/uboot-config.bbclass
+++ b/meta/classes-recipe/uboot-config.bbclass
@@ -94,6 +94,10 @@ UBOOT_DTB_BINARY ??= &quot;&quot;
 UBOOT_FIT_CHECK_SIGN ?= &quot;uboot-fit_check_sign&quot;
 
 python () {
+    # we may not be building a u-boot recipe, e.g. fitimage.bbclass also includes uboot-config.bbclass
+    if not bb.utils.contains(&apos;PROVIDES&apos;, &apos;u-boot&apos;, True, False, d):
+        return
+
     ubootmachine = d.getVar(&quot;UBOOT_MACHINE&quot;)
     ubootconfigflags = d.getVarFlags(&apos;UBOOT_CONFIG&apos;)
     ubootbinary = d.getVar(&apos;UBOOT_BINARY&apos;)
-- 
2.47.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100180</commentid>
    <comment_count>2</comment_count>
    <who name="Rouven Rastetter">Rouven.Rastetter</who>
    <bug_when>2024-11-15 10:52:26 +0000</bug_when>
    <thetext>Update: This is already fixed in styhead by

19931344ade6044cd6e3a01af452315910d36ec2 uboot-config: fix devtool modify with kernel-fitimage

At least I can&apos;t reproduce the problem in styhead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100403</commentid>
    <comment_count>3</comment_count>
    <who name="Adrian">adrian.freihofer</who>
    <bug_when>2024-12-11 22:23:41 +0000</bug_when>
    <thetext>Probably there are two issues here: With commit 19931344ade6044cd6e3a01af452315910d36ec2 it works for one u-boot configuration set via UBOOT_MACHINE. But it still fails if UBOOT_CONFIG with more than one build configuration is used.

This is also interesting: https://lists.yoctoproject.org/g/yocto/message/64152, but to be honest I don&apos;t understand it. Is there an issue with parsing d.getVar(&quot;B&quot;) versus &quot;${B}&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101742</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-04-24 18:54:44 +0000</bug_when>
    <thetext>Bulk move as requesting during YP BB meeting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105652</commentid>
    <comment_count>5</comment_count>
    <who name="Adrian">adrian.freihofer</who>
    <bug_when>2026-05-28 15:10:44 +0000</bug_when>
    <thetext>The kernel-fitimage.bbclass does no longer exist. I think we can then also close this issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>