<?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>2426</bug_id>
          
          <creation_ts>2012-05-04 19:47:24 +0000</creation_ts>
          <short_desc>live image installer does not preserve BSP specified console= kernel parameter</short_desc>
          <delta_ts>2012-09-26 21:52:01 +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>1.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>(P1)(scheduled)</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.3 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darren Hart">dvhart</reporter>
          <assigned_to name="Radu Moisan">radu.moisan</assigned_to>
          <cc>alexandrux.palalau</cc>
    
    <cc>dexuan.cui</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>shane.wang</cc>
    
    <cc>song.liu</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>21117</commentid>
    <comment_count>0</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-05-04 19:47:24 +0000</bug_when>
    <thetext>When installing the sato image on the FRI2, the &quot;console=ttyPCH1,115200 console=tty0&quot; options were not preserved, resulting in no serial output during boot after install.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21216</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2012-05-08 20:17:45 +0000</bug_when>
    <thetext>This is an issue in grub</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21803</commentid>
    <comment_count>2</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2012-06-04 05:46:07 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; This is an issue in grub

We need to pass the value of APPEND (we may need to extract all the console= options) into the grub config file properly, i.e., we need to change the 2 below files.

meta/recipes-bsp/grub/grub-1.99/40_custom
  6 menuentry &quot;Linux&quot; {
  7     set root=(hd0,1)
  8     linux /boot/vmlinuz root=__ROOTFS__ rw __VIDEO_MODE__ __VGA_MODE__ quiet
  9 }


meta/recipes-core/initrdscripts/files/init-install.sh
154 if [ -f /ssd/etc/grub.d/40_custom ] ; then
155     echo &quot;Preparing custom grub2 menu...&quot;
156     sed -i &quot;s@__ROOTFS__@$rootfs $rootwait@g&quot; /ssd/etc/grub.d/40_custom
157     sed -i &quot;s/__VIDEO_MODE__/$3/g&quot; /ssd/etc/grub.d/40_custom
158     sed -i &quot;s/__VGA_MODE__/$4/g&quot; /ssd/etc/grub.d/40_custom
159     mount $bootfs /bootmnt
160     cp /ssd/etc/grub.d/40_custom /bootmnt/40_custom
161     umount /bootmnt
162 fi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22071</commentid>
    <comment_count>3</comment_count>
    <who name="Shane Wang">shane.wang</who>
    <bug_when>2012-06-13 00:59:18 +0000</bug_when>
    <thetext>Per Dexuan&apos;s comment, that is not a grub issue but have to change grub config file. Give it to Alex for him to reassign to the team.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22097</commentid>
    <comment_count>4</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2012-06-13 06:18:11 +0000</bug_when>
    <thetext>Radu, please take a look at it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22098</commentid>
    <comment_count>5</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2012-06-13 06:18:48 +0000</bug_when>
    <thetext>Radu, please take a look at it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22330</commentid>
    <comment_count>6</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-06-19 11:00:01 +0000</bug_when>
    <thetext>Dexuan please elabore more on your post. I&apos;ve looked into this problem but I don&apos;t manage to get a hold on the magic behind the scenes. For instance grub.cfg is generated ok in the following locations: 

build/tmp/work/fri2_noemgd-poky-linux/core-image-minimal-1.0-r0/core-image-minimal-1.0/grub.cfg
build/tmp/work/fri2_noemgd-poky-linux/core-image-minimal-1.0-r0/core-image-minimal-1.0/hddimg/EFI/BOOT/grub.cfg
build/tmp/work/fri2_noemgd-poky-linux/core-image-minimal-1.0-r0/core-image-minimal-1.0/iso/EFI/BOOT/grub.cfg

with something like

# Automatically created by OE
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
default=boot
timeout=10

menuentry &apos;boot&apos;{
linux /vmlinuz LABEL=boot root=/dev/ram0   console=ttyPCH1,115200 console=tty0 video=vesafb vga=0x318
initrd /initrd
}

menuentry &apos;install&apos;{
linux /vmlinuz LABEL=install root=/dev/ram0   console=ttyPCH1,115200 console=tty0 video=vesafb vga=0x318
initrd /initrd
}

However, I cant find /boot/grub/grub.cfg on the device - actually there is not /boot to look for. 

Can you shed some light on this matter, in particular to how grub.cfg is generated (and where) so that I can further trace this on my own.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22331</commentid>
    <comment_count>7</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-06-19 11:59:26 +0000</bug_when>
    <thetext>I&apos;ve just took a second look on the device and the 40_custom is indeed missing the serial params, but grub.conf is still nowhere to be found, /boot has only the compressed and uncompressed kernel. Any hints would be very helpfull.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22425</commentid>
    <comment_count>8</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-06-20 15:36:47 +0000</bug_when>
    <thetext>I suggest reviewing the installation script to understand how grub is installed and then comparing that with the image you have on hand.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22454</commentid>
    <comment_count>9</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2012-06-21 01:52:38 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; I&apos;ve just took a second look on the device and the 40_custom is indeed
&gt; missing the serial params, but grub.conf is still nowhere to be found, /boot
&gt; has only the compressed and uncompressed kernel. Any hints would be very
&gt; helpfull.

Hi Radu,
I think the original report &quot;no serial output during boot after install&quot; means the  post-installation boot rather than the installation boot.

I think Comment 6 only means the installation boot is OK. Did you try the post-installation boot?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22489</commentid>
    <comment_count>10</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-06-22 08:33:45 +0000</bug_when>
    <thetext>The post installation boot is missing the parameters. This is my target.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22502</commentid>
    <comment_count>11</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-06-22 14:34:27 +0000</bug_when>
    <thetext>Did this feature work in the past? From what I&apos;m seing now, It looks much like it was never there, but again I might be missing something. What I&apos;m tring to say is that install.sh (or init-install.sh as it appreas in poky repository) will set the __ROOTFS__, __VIDEO_MODE__ and __VGA_MODE__ in 40_custom file (grub init file) but I cannot see any trace of the console parameters SERIAL_CONSOLE (set in fri2.conf).

So the scripts look to me like they are working fine, as intended. The paremeters added in fri2.conf, as I understand it, override the ia32-base.inc file. But further away, I cannot relate these two files with the above mentioned process.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22503</commentid>
    <comment_count>12</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-06-22 14:37:47 +0000</bug_when>
    <thetext>One small addition to my previous post. If I understood correctly 40_custom literaly becomes the grub.cfg file at install time. Please comment is otherwise.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22505</commentid>
    <comment_count>13</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-06-22 14:41:06 +0000</bug_when>
    <thetext>(In reply to comment #12)
&gt; One small addition to my previous post. If I understood correctly 40_custom
&gt; literaly becomes the grub.cfg file at install time. Please comment is
&gt; otherwise.

You have this right.SERIAL_CONSOLE (via APPEND I think) should be respected and treated in a similar way to __VIDEO_MODE__ and __VGA_MODE__.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22517</commentid>
    <comment_count>14</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2012-06-24 08:42:09 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; Did this feature work in the past? From what I&apos;m seing now, It looks much
I doubt it worked in the past.

&gt; like it was never there, but again I might be missing something. What I&apos;m
&gt; tring to say is that install.sh (or init-install.sh as it appreas in poky
&gt; repository) will set the __ROOTFS__, __VIDEO_MODE__ and __VGA_MODE__ in
&gt; 40_custom file (grub init file) but I cannot see any trace of the console
&gt; parameters SERIAL_CONSOLE (set in fri2.conf).
&gt; 
&gt; So the scripts look to me like they are working fine, as intended. The
&gt; paremeters added in fri2.conf, as I understand it, override the
&gt; ia32-base.inc file. But further away, I cannot relate these two files with
&gt; the above mentioned process.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22809</commentid>
    <comment_count>15</comment_count>
    <who name="Song Liu">song.liu</who>
    <bug_when>2012-07-04 20:22:07 +0000</bug_when>
    <thetext>Moving to M3, no chance of completion in M2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23210</commentid>
    <comment_count>16</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-07-18 12:09:50 +0000</bug_when>
    <thetext>I have modified 40_custom, init-install.sh and init-live.sh so that they process the &quot;console=...&quot; parameters as well. However, when I tried to test the changed, I realised that console=ttyPCH1,115200 is not taking effect, even if introdiced manually in grub. Can anyone confirm this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23216</commentid>
    <comment_count>17</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-07-18 14:43:58 +0000</bug_when>
    <thetext>(In reply to comment #16)
&gt; I have modified 40_custom, init-install.sh and init-live.sh so that they
&gt; process the &quot;console=...&quot; parameters as well. However, when I tried to test
&gt; the changed, I realised that console=ttyPCH1,115200 is not taking effect,
&gt; even if introdiced manually in grub. Can anyone confirm this?

How do you mean &quot;it is not taking effect&quot; ? Does it no appear in /proc/cmdline? Are you just unable to use the serial console? Are you testing on an FRI2?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23240</commentid>
    <comment_count>18</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-07-19 07:20:20 +0000</bug_when>
    <thetext>(In reply to comment #17)
&gt; How do you mean &quot;it is not taking effect&quot; ? Does it no appear in
&gt; /proc/cmdline? Are you just unable to use the serial console? Are you
&gt; testing on an FRI2?
Yes I&apos;m testing on FRI2. I have serial output in bios and in grub but nothing once the kernel kicks in. I used &quot;console=ttyPCH1,11520&quot; in grub as kernel boot option. The option is present in the output of &quot;cat /proc/cmdline&quot; once the kernel finished booting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23241</commentid>
    <comment_count>19</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-07-19 07:22:03 +0000</bug_when>
    <thetext>(In reply to comment #18)
&gt; (In reply to comment #17)
&gt; &gt; How do you mean &quot;it is not taking effect&quot; ? Does it no appear in
&gt; &gt; /proc/cmdline? Are you just unable to use the serial console? Are you
&gt; &gt; testing on an FRI2?
&gt; Yes I&apos;m testing on FRI2. I have serial output in bios and in grub but
&gt; nothing once the kernel kicks in. I used &quot;console=ttyPCH1,11520&quot; in grub as
&gt; kernel boot option. The option is present in the output of &quot;cat
&gt; /proc/cmdline&quot; once the kernel finished booting.

At this point I&apos;m adding this option manually just to exclude from the ecuation my patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23252</commentid>
    <comment_count>20</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-07-19 12:01:09 +0000</bug_when>
    <thetext>submitted a patch, waiting review for now.
the problem with the serial device still applies. I&apos;ve checked the kernel config and it seems fine, it may be a driver issue... anyway we should address this problem in a separate bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23257</commentid>
    <comment_count>21</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-07-19 14:27:18 +0000</bug_when>
    <thetext>(In reply to comment #18)
&gt; (In reply to comment #17)
&gt; &gt; How do you mean &quot;it is not taking effect&quot; ? Does it no appear in
&gt; &gt; /proc/cmdline? Are you just unable to use the serial console? Are you
&gt; &gt; testing on an FRI2?
&gt; Yes I&apos;m testing on FRI2. I have serial output in bios and in grub but
&gt; nothing once the kernel kicks in. I used &quot;console=ttyPCH1,11520&quot; in grub as
&gt; kernel boot option. The option is present in the output of &quot;cat
&gt; /proc/cmdline&quot; once the kernel finished booting.

Is &quot;console=ttyPCH1,11520&quot; a typo? It should be &quot;console=ttyPCH1,115200&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23258</commentid>
    <comment_count>22</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-07-19 14:28:24 +0000</bug_when>
    <thetext>(In reply to comment #20)
&gt; submitted a patch, waiting review for now.
&gt; the problem with the serial device still applies. I&apos;ve checked the kernel
&gt; config and it seems fine, it may be a driver issue... anyway we should
&gt; address this problem in a separate bug.

I&apos;m confused as I use this on a regular basis, it does work. Which FRI2 revision are you using?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23304</commentid>
    <comment_count>23</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-07-20 06:34:31 +0000</bug_when>
    <thetext>I used &quot;console=ttyPCH1,115200&quot; manually added to grub kernel options and I had not output on serial console (in the context where grub was working fine on serial console). I am using Rev.1.0
However, my patch was accepted so now the options should be preserverd. If problems are found with the serial port in Rev.1.0 (or with the kernel for that matter) please submit another bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25813</commentid>
    <comment_count>24</comment_count>
    <who name="Alexandru Palalau">alexandrux.palalau</who>
    <bug_when>2012-09-26 21:52:01 +0000</bug_when>
    <thetext>Verified under master branch commit ID 807ff46bc9d94106a11a58621994cc15e80f6d14.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>