<?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>1099</bug_id>
          
          <creation_ts>2011-05-25 07:57:42 +0000</creation_ts>
          <short_desc>[blacksand/emenlow/crownbay] grub install failed with sato-sdk live image</short_desc>
          <delta_ts>2011-07-12 23:26:25 +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>BSPs</product>
          <component>bsps-configuration</component>
          <version>unspecified</version>
          <rep_platform>E-Menlow</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>Patch already in poky master(29/Jun/2011)</status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jiajun Xu">jiajun.xu</reporter>
          <assigned_to name="Dexuan Cui">dexuan.cui</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>dvhart</cc>
    
    <cc>sgw</cc>
    
    <cc>shane.wang</cc>
    
    <cc>wenhuax.fan</cc>
    
    <cc>yp.bsp.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>13974</commentid>
    <comment_count>0</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2011-05-25 07:57:42 +0000</bug_when>
    <thetext>Tree/Branch: Poky/1.1_M1
Poky Commit: fc55b224caa3eeac4abda099ec9ed505db59fb28
Meta Branch: 1.1_M1
Meta Commit: 1b227f8ed2df529cc13f7169b0c08ff3d0f8c812
Image Location:
emenlow: http://autobuilder02.pokylinux.org/emenlow/nightly/20110521-1/machines/emenlow/x86_32/core-image-sato-sdk-live-emenlow-20110521070906.hddimg.bz2
crownbay: http://autobuilder02.pokylinux.org/crownbay-noemgd/nightly/20110520-1/machines/crownbay/x86_32/core-image-sato-sdk-live-crownbay-noemgd-20110521035553.hddimg.bz2

With Yocto 1.1 M1 RC1 build, some BSP images could not install successfully on target platform. Installer fails when grub install.

The error message is as below:
##########
                           ......
                           Ext3-fs: barriers noet enableed
                           ......
                           grub&gt; checking if &quot;boot/grub/stage 1&quot; exists ....yes
                           grub&gt; checking if &quot;boot/grub/stage 2&quot; exists ....yes
                           grub&gt; checking if &quot;boot/grub/stage e2fs_stage1_5&quot; exists ....yes
                           Running &quot;ember /boot/grub/e2fs_stage1_5(hd0,0)&quot; .... failed (this is not fatal)
                           Running &quot;ember /boot/grub/e2fs_stage1_5(hd0,0)&quot; .... failed (this is not fatal)
                           Running &quot;install --stage2=/ssd/boot/grub/stage2 /boot/grub/stage1(hd0) /boot/grub/stage2 p /boot/grub/menu list&quot; failed
                           .............
                           Error 6: Mismatched or corrupt version of stage1/stage2
##########</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13995</commentid>
    <comment_count>1</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2011-05-26 07:24:08 +0000</bug_when>
    <thetext>blacksand also has such issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14000</commentid>
    <comment_count>2</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-05-26 13:37:54 +0000</bug_when>
    <thetext>This appears at first glance to be a buggy grub build. Perhaps gcc 4.6 + tune-atom.inc ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14008</commentid>
    <comment_count>3</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-05-26 15:23:27 +0000</bug_when>
    <thetext>Tom, if you&apos;re the owner of grub can you accept?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14009</commentid>
    <comment_count>4</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2011-05-26 15:31:05 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Tom, if you&apos;re the owner of grub can you accept?

I&apos;m not the owner of grub.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14182</commentid>
    <comment_count>5</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2011-06-06 11:16:18 +0000</bug_when>
    <thetext>Any idea what the fs-type is for the partition where grub is installing ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14348</commentid>
    <comment_count>6</comment_count>
    <who name="Edwin Zhai">edwin.zhai</who>
    <bug_when>2011-06-19 19:51:56 +0000</bug_when>
    <thetext>Dexuan is kind to help on this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14463</commentid>
    <comment_count>7</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-06-29 01:50:54 +0000</bug_when>
    <thetext>I got the root cause:
this is due to a known gcc-4.6-related optimization bug. will send out patch soon:

--- grub-0.97/stage2/Makefile.am.orig
+++ grub-0.97/stage2/Makefile.am
@@ -79,7 +79,7 @@
 HERCULES_FLAGS =
 endif

-STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
+STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-reorder-functions -fno-builtin -nostdinc \
    $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)

 STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14471</commentid>
    <comment_count>8</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-06-29 06:20:44 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; I got the root cause:
&gt; this is due to a known gcc-4.6-related optimization bug. will send out patch
&gt; soon:
&gt; --- grub-0.97/stage2/Makefile.am.orig
&gt; +++ grub-0.97/stage2/Makefile.am
&gt; @@ -79,7 +79,7 @@
&gt;  HERCULES_FLAGS =
&gt;  endif
&gt; -STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
&gt; +STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-reorder-functions -fno-builtin
&gt; -nostdinc \
&gt;     $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
&gt;  STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000

After the commit &quot;tcmode-default: switch to gcc 4.6.0 for x86, x86-64 &amp; arm&quot;,
we got this bug.

This turned out to be a gcc&apos;s bug. See
https://bugs.gentoo.org/show_bug.cgi?id=360513
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39333

Upstream gcc seems uninterested in the bug, so at present we can disable the
option as a workaround. Thanks Ryan Hill for the investigation and the
workaround patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14473</commentid>
    <comment_count>9</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-06-29 07:56:20 +0000</bug_when>
    <thetext>Fixed by http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=776da950e880fbbc490b0c810565dbcbc9e539cf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14702</commentid>
    <comment_count>10</comment_count>
    <who name="wenhua.fan">wenhuax.fan</who>
    <bug_when>2011-07-12 23:26:25 +0000</bug_when>
    <thetext>Verify this bug in Yocto1.1 M2 RC2 20110708 testing.

Tree/Branch: Poky/1.1_M2

Poky Commit id: 8df2a558b4d61778a669705b867969abe3514846

Meta Branch : 1.1_M2

Meta Commit id : 92fc07a5f1b98779806cdcc2341487ff5ea5a238

Image lacation:

Emenlow:
http://autobuilder02.yoctoproject.org/emenlow-1.1_M2/nightly/20110708-1/machines/emenlow/x86_32/core-image-sato-sdk-live-emenlow-20110709065339.hddimg.bz2

Blacksand:
http://autobuilder02.yoctoproject.org/n450-1.1_M2/nightly/20110708-1/machines/n450/x86_32/core-image-sato-sdk-live-n450-20110709045049.hddimg.bz2

Crownbay:
http://autobuilder02.yoctoproject.org/crownbay-noemgd-1.1_M2/nightly/20110709-1/machines/crownbay/x86_32/core-image-sato-sdk-live-crownbay-noemgd-20110709091053.hddimg.bz2</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>