Bug 13446 - Intel Kaby Lake fails to show boot log on core-image-minimal
Summary: Intel Kaby Lake fails to show boot log on core-image-minimal
Status: RESOLVED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-intel-corei7-64 (show other bugs)
Version: 0.0.0
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.8 M3
Assignee: Anuj Mittal
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-07-19 00:57 UTC by Alejandro Enedino Hernandez Samaniego
Modified: 2019-08-13 17:57 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro Enedino Hernandez Samaniego 2019-07-19 00:57:33 UTC
A device using an Intel Kaby Lake based processor (Core i5-7Y57), fails to show the boot log when using core-image-minimal, simply showing a blank screen.

The reason why it says it fails to show the boot log and not fails to boot, is because I'm quite certain the device fully boots, since its able to respond to my commands, if I blindly login and for example type reboot, the machine reboots correctly.

This only happens when using core-image-minimal, when using core-image-sato the bootlog shows up (a little late IMO), but it does boot correctly.

So far, I've tried meddling with the kernel console parameter passing different ttys, although this does not make much sense, since AFAIC the console=tty0 that is being passed is correct since it is the last console argument passed to the kernel and its from where it will take the input (and as I said that part works).

I also tried modifying i915.modeset=0/1 on the kernel cmdline with no success.


I'm currently building core-image-minimal and core-image-sato using:

meta                 
meta-poky            
meta-yocto-bsp       = "master:edab4b2cecf502a672cc39a8796e60e2fd25cc1c"
meta-intel           = "master:e92b588839dd40e561e201f6fc21df31db202508"

local.conf:

MACHINE="intel-corei7-64"


This currently builds linux-intel 4.19.55, but it is worth mentioning that I've also tried building genericx86-64 which builds linux-yocto 5.0 showing the same results.
Comment 1 Alejandro Enedino Hernandez Samaniego 2019-07-19 01:02:27 UTC
I've checked and both kernels are entirely the same, I was even able to switch the rootfs image (not the kernel) from sato to minimal and it worked fine.

I diffed the installed packages on both to get a clue on what is happening since this is obviously coming from a package because of what I just said above.

There's a couple of differences, mostly coming from enabling X on sato, but I'd say that this is either coming from

kernel-modules-*
or
linux-firmware-*

Theres a couple of other things related(ish) like udev-extraconf but I believe its unlikely it comes from there.
Comment 2 Alejandro Enedino Hernandez Samaniego 2019-07-19 01:10:39 UTC
Adding:

MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules"

to local.conf

Solves the issue, hence the default kernel config for intel-corei7-64 is enabling something as a module that should probably be builtin (IMO).

It also explains why the boot log shows up a little late than it should, since modules are loaded later than builtin drivers
Comment 3 Alejandro Enedino Hernandez Samaniego 2019-07-19 01:18:11 UTC
Specifically the i915 driver is the one causing the issue.

MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-i915"

Works fine.

I've manually modified the kernel config and enabling the driver shows the boot log since the beginning, I believe this should be added as built in, I will send a patch for this.

I am wondering though, if this should also be enabled for genericx86-64 and not only on intel-corei7-64.
Comment 4 Ross Burton 2019-07-25 14:36:28 UTC
I don't think we want to change the kernel config, but something like MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS to ensure that all images recommend that kernel module seems right.
Comment 5 Anuj Mittal 2019-07-29 03:02:22 UTC
We have a MACHINE_EXTRA_RRECOMMENDS for entire kernel-modules for intel-corei7-64 as well as genericx86-64. 

So that's why it doesn't work for minimal and full-cmdline images which won't have the modules installed.
Comment 6 Alejandro Enedino Hernandez Samaniego 2019-07-29 18:37:11 UTC
(In reply to comment #5)
> We have a MACHINE_EXTRA_RRECOMMENDS for entire kernel-modules for
> intel-corei7-64 as well as genericx86-64. 
> 
> So that's why it doesn't work for minimal and full-cmdline images which
> won't have the modules installed.

Hey Anuj,

Yes, I did see that, but I'm just wondering if that is the desired behavior, in my case for example, the kernel-modules package brings an extra 350 MB to my image, also IMO being able to see/type on the console seems pretty ESSENTIAL and not EXTRA to me.

Alejandro
Comment 7 Anuj Mittal 2019-08-13 00:33:41 UTC
I have merged this change. Thank you for reporting and suggesting a fix.
Comment 8 Alejandro Enedino Hernandez Samaniego 2019-08-13 17:57:36 UTC
Hey Anuj,

Thanks for that, I meant to do ti myself, sorry I had no time.

Cheers,

Alejandro