<?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>10451</bug_id>
          
          <creation_ts>2016-10-18 15:00:27 +0000</creation_ts>
          <short_desc>mkefidisk.sh writes images that don&apos;t boot to SD card</short_desc>
          <delta_ts>2016-10-27 19:51:38 +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>Scripts and Tools</component>
          <version>2.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=9665</see_also>
    
    <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=10468</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>27 Oct 2016: RESOLOVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>2.3 M1</target_milestone>
          
          <blocked>10468</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Benjamin Esquivel">benjamin.esquivel</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>benjamin.esquivel</cc>
    
    <cc>eduard.bartosh</cc>
    
    <cc>jair.de.jesus.gonzalez.plascencia</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
    
    <cc>srifenbark</cc>
          
          <qa_contact name="Benjamin Esquivel">benjamin.esquivel</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>67327</commentid>
    <comment_count>0</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-18 15:00:27 +0000</bug_when>
    <thetext>I took the  2.2.rc4[1] image and burned it into an SD card and tried to boot a minnow board with nothing else connected than the power and the FTDI serial cable. I get to the boot params screen okay then I get this message:

error: no suitable video mode found.
Booting in blind mode.

At this point I don&apos;t know if it booted but I would expect to see the terminal populating with the boot messages then a login console.

I did md5sum-checked[2] the image before burning.

[1] http://autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/machines/genericx86-64/core-image-sato-sdk-genericx86-64.hddimg
[2] http://autobuilder.yoctoproject.org/pub/releases/yocto-2.2.rc4/machines/genericx86-64/core-image-sato-sdk-genericx86-64-20161017230136.hddimg.md5sum</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67328</commentid>
    <comment_count>1</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-18 15:08:14 +0000</bug_when>
    <thetext>Steps to reproduce:

1. Download the 2.2.rc4 sato-sdk image (see link[1] above)
2. burn the image to an sd card then insert it to the minnow board
3. attach an FTDI cable to the minnoboard and to your machine where you can see the terminal output in your favorite serial reader (I use minicom)
4. start the board and try to boot it.

Expected behavior: The board boots through the serial console and gives you a login session.

Actual behavior: The screen message &apos;Booting in blind mode&apos; appears and nothing else from there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67329</commentid>
    <comment_count>2</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-18 15:51:59 +0000</bug_when>
    <thetext>I tried to boot it again but this time with a video cable attached and it starts to boot at the video output until:

waiting for root device: /dev/mmcblk0p2

Where it gets stuck. So the final result, in any case is that it doesn&apos;t boot.

Updating the title.

My next test is to see if it boots from USB.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67332</commentid>
    <comment_count>3</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-18 17:19:11 +0000</bug_when>
    <thetext>The same image is able to boot from USB. Trying another SD card to rule out bad media.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67334</commentid>
    <comment_count>4</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-18 17:30:39 +0000</bug_when>
    <thetext>A second SD card was tried and the same error appears so this rules out bad media.

Next thing to try is a BIOS update since the minnow board I am testing with has the factory BIOS which is versioned as number 90. Most current is version 93 according to the support page:

https://firmware.intel.com/projects/minnowboard-max</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67335</commentid>
    <comment_count>5</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-18 17:52:20 +0000</bug_when>
    <thetext>Updating the BIOS to the latest available version still doesn&apos;t boot the board so ruling out BIOS version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67337</commentid>
    <comment_count>6</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-18 18:15:26 +0000</bug_when>
    <thetext>Tested on an additional Minnowboard also with the latest BIOS version (first minnow board was turbot this one is CircuitCo&apos;s) and the error persists, it can&apos;t boot.

This bug is 100% reproducible and critical as it can&apos;t boot from SD cards.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67341</commentid>
    <comment_count>7</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-18 21:12:19 +0000</bug_when>
    <thetext>A couple of other people has executed the test and they don&apos;t see the issue. Exploring the difference between my procedure and theirs which is that I use mkefidisk.sh as stated in the documentation and they use plain dd.

I did my testing with dd as well and got the same image to boot from an SD card which means either my machine or the mkefidisk.sh is failing to transfer correctly to the media. Testing on that now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67347</commentid>
    <comment_count>8</comment_count>
    <who name="Jair Gonzalez">jair.de.jesus.gonzalez.plascencia</who>
    <bug_when>2016-10-18 23:16:45 +0000</bug_when>
    <thetext>I made some tests using the same image (2.2.rc4) with a Minnow Max 64 and bios version 90. My results were:

-Using plain dd, I could not reproduce the issue.

-Using mkefidisk.sh with &apos;/dev/mmcblk1&apos; as the target device, the startup.nsh script tried to boot from &apos;fs0:\EFI\BOOootx64.efi&apos; which was not recognized as a command, as for some reason the path and file name was truncated. However, after manually executing &apos;fso:\EFI\BOOT\bootx64.efi&apos;, the DUT completed its booting process correctly.

-Using mkefidisk.sh with &apos;/dev/mmcblk0&apos; as the target device, the startup.nsh script tried to boot from &apos;fs0:\EFI\BOOootx64.efi&apos; again. However, after manually executing &apos;fso:\EFI\BOOT\bootx64.efi&apos;, the DUT got stuck on its boot process waiting for root device: /dev/mmcblk0p2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67362</commentid>
    <comment_count>9</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-19 14:38:44 +0000</bug_when>
    <thetext>the issue now points at the mkefidisk.sh script, which is what the docs tell you to use for creating the image.

As the image looks fine, I will change product and component for this bug away of runtime/runtime.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67373</commentid>
    <comment_count>10</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-10-19 16:28:56 +0000</bug_when>
    <thetext>I can look at it if needed. I did similar work for wic lately.

BTW, wic images are produced by default for genericx86-64 machines and bootable out of the box.

&apos;blind mode&apos; issue is also fixed there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67374</commentid>
    <comment_count>11</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-19 16:34:33 +0000</bug_when>
    <thetext>I booted a wic image earlier today and I saw that the blind mode issue is fixed, that&apos;s great.

The reason why I am following on mkefidisk.sh up is because it&apos;s listed in the documentation. See step 4 of the Building Images guide[3] from the mega-manual.


[3]http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#qs-building-images

One option would be to change the documentation to refer to the wic procedure instead of fixing the mkefidisk.sh script.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67378</commentid>
    <comment_count>12</comment_count>
      <attachid>3481</attachid>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-19 17:46:43 +0000</bug_when>
    <thetext>Created attachment 3481
building images doc change proposal

This is a suggestion to the YP-2.2 documentation that fixes this bug by deprecating mkefidisk.sh in favor of dd with a wic image.

As a side note, this new procedure could be set to use the .hddimg instead with just an extension change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67459</commentid>
    <comment_count>13</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-10-21 19:31:59 +0000</bug_when>
    <thetext>Benjamin, 

See http://www.yoctoproject.org/docs/2.2/yocto-project-qs/yocto-project-qs.html#qs-building-images (second step 4) for the change.  This change is in the YP Quick Start, which is sucked into the mega-manual.  

You will see that I did a little re-wording from your suggested change.  Also, I am assuming you meant &quot;TARGET_DEVICE&quot; and not &quot;HOST_DEVICE&quot; in the final wrap-up sentence as &quot;HOST_DEVICE&quot; is not in the command.  The other option would have been to change the string in the actual command.  I took a guess.  If I am wrong tell me and I will fix it. 

So, check out the change and let me know if it is okay.

Thanks,
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67501</commentid>
    <comment_count>14</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-24 19:22:36 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; Benjamin, 
&gt; 
&gt; See
&gt; http://www.yoctoproject.org/docs/2.2/yocto-project-qs/yocto-project-qs.
&gt; html#qs-building-images (second step 4) for the change.  This change is in
&gt; the YP Quick Start, which is sucked into the mega-manual.  
&gt; 
Thanks, I reviewed it. Comments below.
&gt; You will see that I did a little re-wording from your suggested change. 
&gt; Also, I am assuming you meant &quot;TARGET_DEVICE&quot; and not &quot;HOST_DEVICE&quot; in the
&gt; final wrap-up sentence as &quot;HOST_DEVICE&quot; is not in the command.  The other
&gt; option would have been to change the string in the actual command.  I took a
&gt; guess.  If I am wrong tell me and I will fix it. 
The way you wrote it as TARGET_DEVICE makes sense.
&gt; 
&gt; So, check out the change and let me know if it is okay.
I spotted the following inconsistencies that I believe can be fixed impromptu:
 - The previous step, numbered 3.Build an Image for MinnowBoard MAX ends up showing an image with the hddimg extension. that should be changed for the wic extension as it is the one we&apos;re using in step 4.
 - On the same step 3, the image that is built is the core-image-base; I wrote the suggestion based on the core-image-minimal which is what 2.1 uses in this same part of the documentation. If core-image-base is to be used, then the command in step 4 has to use core-image-base:
  $ sudo dd if=tmp/deploy/images/intel-corei7-64/core-image-base-intel-corei7-64.wic of=TARGET_DEVICE
&gt; 
&gt; Thanks,
&gt; Scott

in sum, 2 changes, use .wic instead of .hddimg and core-image-base instead of core-image-minimal. All of this within that particular set of instructions only.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67651</commentid>
    <comment_count>15</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-10-27 16:33:55 +0000</bug_when>
    <thetext>Benjamin, 

Check out steps 3 and 4 in http://www.yoctoproject.org/docs/2.2/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware.  I think we are okay now.  Let me know and I will reset the bug.

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67658</commentid>
    <comment_count>16</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-27 18:36:28 +0000</bug_when>
    <thetext>Thank you Scott, seems like your updates are accurately fixing my previous comments.

I just spotted there is this sentence at step 4 Write the image:

...(e.g. /dev/sdc, which is most likely a USB stick, or /dev/mmcblk0, which is most likely an SD card.

That statement needs a closing parenthesis.

I believe that would be the only thing that needs changing at this point. I think you can close it once the parenthesis is added.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67663</commentid>
    <comment_count>17</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-10-27 19:34:36 +0000</bug_when>
    <thetext>Benjamin, 

Good catch.  I fixed it - http://www.yoctoproject.org/docs/2.2/yocto-project-qs/yocto-project-qs.html#building-an-image-for-hardware.

Setting the bug to RESOLVED and putting the doc flag to &quot;done.&quot;

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67664</commentid>
    <comment_count>18</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-10-27 19:51:38 +0000</bug_when>
    <thetext>Good, since I&apos;ve verified your changes I&apos;m setting it to verified state.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3481</attachid>
            <date>2016-10-19 17:46:43 +0000</date>
            <delta_ts>2016-10-19 17:46:43 +0000</delta_ts>
            <desc>building images doc change proposal</desc>
            <filename>file_10451.txt</filename>
            <type>text/plain</type>
            <size>1303</size>
            <attacher name="Benjamin Esquivel">benjamin.esquivel</attacher>
            
              <data encoding="base64">VGhpcyBpcyBhIHN1Z2dlc3Rpb24gdG8gdGhlIFlQLTIuMiBkb2N1bWVudGF0aW9uIHRoYXQgZml4
ZXMgYnVnIDEwNDUxIGJ5DQpkZXByZWNhdGluZyBta2VmaWRpc2suc2ggaW4gZmF2b3Igb2YgZGQg
d2l0aCBhIHdpYyBpbWFnZS4NCg0KVGFrZW4gZnJvbSB0aGUgbWVnYSBtYW51YWwgc2VjdGlvbiBm
b3IgYnVpbGRpbmcgaW1hZ2VzWzFdOg0KDQpPbGQNCj09PQ0KV3JpdGUgdGhlIEltYWdlOiBZb3Ug
Y2FuIHdyaXRlIHRoZSBpbWFnZSB0byBhIFVTQiBrZXksIFNBVEEgZHJpdmUsIG9yIFNEIGNhcmQg
YnkgdXNpbmcgdGhlIG1rZWZpZGlzay5zaCBzY3JpcHQsIHdoaWNoIGlzIGluY2x1ZGVkIGluIHRo
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