When installing the sato image on the FRI2, the "console=ttyPCH1,115200 console=tty0" options were not preserved, resulting in no serial output during boot after install.
This is an issue in grub
(In reply to comment #1) > 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 "Linux" { 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 "Preparing custom grub2 menu..." 156 sed -i "s@__ROOTFS__@$rootfs $rootwait@g" /ssd/etc/grub.d/40_custom 157 sed -i "s/__VIDEO_MODE__/$3/g" /ssd/etc/grub.d/40_custom 158 sed -i "s/__VGA_MODE__/$4/g" /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
Per Dexuan'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.
Radu, please take a look at it.
Dexuan please elabore more on your post. I've looked into this problem but I don'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 'boot'{ linux /vmlinuz LABEL=boot root=/dev/ram0 console=ttyPCH1,115200 console=tty0 video=vesafb vga=0x318 initrd /initrd } menuentry 'install'{ 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.
I'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.
I suggest reviewing the installation script to understand how grub is installed and then comparing that with the image you have on hand.
(In reply to comment #7) > I'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. Hi Radu, I think the original report "no serial output during boot after install" 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?
The post installation boot is missing the parameters. This is my target.
Did this feature work in the past? From what I'm seing now, It looks much like it was never there, but again I might be missing something. What I'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.
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.
(In reply to comment #12) > 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. 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__.
(In reply to comment #11) > Did this feature work in the past? From what I'm seing now, It looks much I doubt it worked in the past. > like it was never there, but again I might be missing something. What I'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.
Moving to M3, no chance of completion in M2
I have modified 40_custom, init-install.sh and init-live.sh so that they process the "console=..." 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?
(In reply to comment #16) > I have modified 40_custom, init-install.sh and init-live.sh so that they > process the "console=..." 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? How do you mean "it is not taking effect" ? Does it no appear in /proc/cmdline? Are you just unable to use the serial console? Are you testing on an FRI2?
(In reply to comment #17) > How do you mean "it is not taking effect" ? Does it no appear in > /proc/cmdline? Are you just unable to use the serial console? Are you > testing on an FRI2? Yes I'm testing on FRI2. I have serial output in bios and in grub but nothing once the kernel kicks in. I used "console=ttyPCH1,11520" in grub as kernel boot option. The option is present in the output of "cat /proc/cmdline" once the kernel finished booting.
(In reply to comment #18) > (In reply to comment #17) > > How do you mean "it is not taking effect" ? Does it no appear in > > /proc/cmdline? Are you just unable to use the serial console? Are you > > testing on an FRI2? > Yes I'm testing on FRI2. I have serial output in bios and in grub but > nothing once the kernel kicks in. I used "console=ttyPCH1,11520" in grub as > kernel boot option. The option is present in the output of "cat > /proc/cmdline" once the kernel finished booting. At this point I'm adding this option manually just to exclude from the ecuation my patch.
submitted a patch, waiting review for now. the problem with the serial device still applies. I'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.
(In reply to comment #18) > (In reply to comment #17) > > How do you mean "it is not taking effect" ? Does it no appear in > > /proc/cmdline? Are you just unable to use the serial console? Are you > > testing on an FRI2? > Yes I'm testing on FRI2. I have serial output in bios and in grub but > nothing once the kernel kicks in. I used "console=ttyPCH1,11520" in grub as > kernel boot option. The option is present in the output of "cat > /proc/cmdline" once the kernel finished booting. Is "console=ttyPCH1,11520" a typo? It should be "console=ttyPCH1,115200".
(In reply to comment #20) > submitted a patch, waiting review for now. > the problem with the serial device still applies. I'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. I'm confused as I use this on a regular basis, it does work. Which FRI2 revision are you using?
I used "console=ttyPCH1,115200" 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.
Verified under master branch commit ID 807ff46bc9d94106a11a58621994cc15e80f6d14.