<?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>12149</bug_id>
          
          <creation_ts>2017-10-02 09:12:58 +0000</creation_ts>
          <short_desc>Racing lz4 u-boot CONVERSION_CMDs in do_image_cpio</short_desc>
          <delta_ts>2018-03-20 04:06:49 +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>core</component>
          <version>2.3.2</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>2.3.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Niko Mauno">niko.mauno</reporter>
          <assigned_to name="Maxin B. John">maxin.john</assigned_to>
          <cc>brian.avery</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>77264</commentid>
    <comment_count>0</comment_count>
    <who name="Niko Mauno">niko.mauno</who>
    <bug_when>2017-10-02 09:12:58 +0000</bug_when>
    <thetext>- In yocto-2.3.2 to create initramfs image with IMAGE_FSTYPES = &quot;cpio.lz4.u-boot&quot; resulted in 
    
    ERROR: When reparsing .../images/my_image_recipe.bb.do_image_cpio, the
    basehash value changed from f58c1df3d5d9c4828fa93897760378a2 to
    4b41270a04a07df4476ef4f6767958ac. The metadata is not deterministic
    and this needs to be fixed.

 - By resorting to post-yocto-2.3.2 commit: &lt;https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=pyro&amp;id=717303e6fbcbbe181ad9645d762eb5a85d934523&gt;, above error was encountered no longer -- however, it still results in non-functional image artifact. More specifically, during target device boot-up process, when it&apos;s time for kernel to mount initramfs rootfs, the following line is printed in console:

    RAMDISK: Couldn&apos;t find valid RAM disk image starting at 0.

 - Looking into the issue, I noticed that in yocto-2.3.2, the &quot;non-legacy&quot; command pair: &quot;CONVERSION_CMD_lz4 ; CONVERSION_CMD_u-boot&quot; was executed between bitbake operations occasionally before the &quot;legacy&quot; command: &quot;CONVERSION_CMD_lz4.u-boot&quot; and occasionally after in do_image_cpio, apparently resulting in non-deterministic metadata error. (&quot;non-legacy&quot; and &quot;legacy&quot; here refer to same set of commands with the exception that in former, lz4&apos;s -l switch is omitted, and in latter, -l is included.)

   After commit 717303e6fbcbbe181ad9645d762eb5a85d934523, the &quot;legacy&quot; command is executed consistently before &quot;non-legacy&quot; command, resulting in image unusable by Linux kernel. Apparently for lz4 compressed initramfs generation, only legacy lz4 format should be used (ie. CONVERSION_CMD_lz4.u-boot, which internally resorts to CONVERSION_CMD_lz4_legacy). 

   The generated initramfs artifact becomes bootable/usable by removing superfluous &quot;non-legacy&quot; initramfs generation from do_image_cpio function by following override:

    CONVERSION_CMD_lz4 = &quot; &quot;
    CONVERSION_CMD_u-boot = &quot; &quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77388</commentid>
    <comment_count>1</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2017-10-05 15:15:40 +0000</bug_when>
    <thetext>image_type_uboot.bbclass removed in
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/classes?id=e18cec750b51267d9c130b395c7a53585f4ae7ac

so master may not be affected?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77406</commentid>
    <comment_count>2</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2017-10-06 00:00:59 +0000</bug_when>
    <thetext>Question:
I have a built cpio.lz4.u-boot for beaglebone black to check and see if this issue also occurs on master.

Are there instructions anywhere for how to set up the beaglebone using the compressed rootfs (aka cpio.lz4.u-boot) ?  

Other ways to verify welcome as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77887</commentid>
    <comment_count>3</comment_count>
    <who name="Niko Mauno">niko.mauno</who>
    <bug_when>2017-10-31 08:44:26 +0000</bug_when>
    <thetext>In yocto-2.4 it seems that (at least for me) issues still remain with IMAGE_FSTYPES = &quot;cpio.lz4.u-boot&quot;, ie. generated image results in &quot;RAMDISK: Couldn&apos;t find valid RAM disk image starting at 0.&quot;. Apparently non-legacy CONVERSION_CMD_lz4 is used by default. A working image can be generated by issuing following override:

CONVERSION_CMD_lz4 = &quot;${CONVERSION_CMD_lz4_legacy}&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78907</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-01-04 16:30:54 +0000</bug_when>
    <thetext>A reminder that bug 12461 is related.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78939</commentid>
    <comment_count>5</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2018-01-06 06:31:17 +0000</bug_when>
    <thetext>updates SCR_URI</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78941</commentid>
    <comment_count>6</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2018-01-06 06:37:13 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; updates SCR_URI

sorry. wrong bug. this auto next feature is annoying</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79797</commentid>
    <comment_count>7</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2018-03-13 06:59:30 +0000</bug_when>
    <thetext>http://lists.openembedded.org/pipermail/openembedded-core/2018-March/148670.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79867</commentid>
    <comment_count>8</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2018-03-20 04:06:49 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f6f688842bc79e26ced18a2d654f06ea9c3961cd</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>