<?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>12283</bug_id>
          
          <creation_ts>2017-10-27 14:35:29 +0000</creation_ts>
          <short_desc>Building a fitImage including INITRAMFS_IMAGE (wo/ BUNDLE) cause the kernel to depend on rootfs which is bad</short_desc>
          <delta_ts>2025-06-18 17:26:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Kernel</product>
          <component>kernel-tooling</component>
          <version>2.0.3</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>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yannick Koehler">yannick.koehler</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>adrian.freihofer</cc>
    
    <cc>adrian.freihofer</cc>
    
    <cc>otavio</cc>
    
    <cc>ptsneves</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>tgamblin</cc>
    
    <cc>yp.kernel.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>77848</commentid>
    <comment_count>0</comment_count>
    <who name="Yannick Koehler">yannick.koehler</who>
    <bug_when>2017-10-27 14:35:29 +0000</bug_when>
    <thetext>Building a fitImage that include an initramfs force the kernel to depends on
rootfs.  This in turn cause rebuilding anything on any change.

For example, if the image is not included, building an out-of-tree kernel module
require pretty much just building the kernel + the module.  Yet, when you 
enable fitImage, building the same out-of-tree kernel module force re-building 
all the user space application as well.

Also, the image creation, fit or wic should not be kernel specific.  The code
found in kernel-fitimage.bbclass create an ITS file and then call uboot-mkimage.
There is nothing there that is kernel specific.

This code should be done within the image recipe, once the kernel uImage and the rootfs has been built, as is other image type.

Now I understand that if INITRAMFS_IMAGE_BUNDLE is set to 1 that the kernel need to be involved, but when INITRAMFS_IMAGE_BUNDLE is set to 0, there are no valid reason to have the kernel create the image itself instead of the image recipe creating the image and removing that kernel/rootfs dependency.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93262</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-05-12 15:26:57 +0000</bug_when>
    <thetext>We need someone to write some tests for the fitImage.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93339</commentid>
    <comment_count>2</comment_count>
    <who name="Paulo Neves">ptsneves</who>
    <bug_when>2022-05-27 11:06:57 +0000</bug_when>
    <thetext>There are multiple things mentioned in this bug report and it is hard to understand exactly what is wrong. Can you break down the single most important thing you want fixed, in a simple way?

@Randy we have quite a comprehensive self test at meta/lib/oeqa/selftest/cases/fitimage.py. Would this help?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100404</commentid>
    <comment_count>3</comment_count>
    <who name="Adrian">adrian.freihofer</who>
    <bug_when>2024-12-11 22:29:48 +0000</bug_when>
    <thetext>This could probably be considered a duplicate of https://bugzilla.yoctoproject.org/show_bug.cgi?id=12912.

The “wrong architecture” of kernel-fitimage.bbclass and the flexibility to create both bundled and unbundled kernel images in combination with fitImages create the complexity and ultimately the problems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102289</commentid>
    <comment_count>4</comment_count>
    <who name="Adrian Freihofer">adrian.freihofer</who>
    <bug_when>2025-06-18 17:26:57 +0000</bug_when>
    <thetext>Let&apos;s assume this is fixed now. The FIT image related code has been completely rewritten. Also, the architecture is now different. See also https://bugzilla.yoctoproject.org/show_bug.cgi?id=12912.

If this is not the case, feel free to reopen this bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>