Bug 830446 - Kernel does not compile without EFI framebuffer device
Kernel does not compile without EFI framebuffer device
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
17
x86_64 Linux
unspecified Severity low
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
: 833554 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-09 14:38 EDT by Juan
Modified: 2012-12-20 10:52 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 10:52:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Juan 2012-06-09 14:38:57 EDT
Description of problem:
kernel rpm fails to build if you don't select EFI framebuffer device.
Early when starting build, gcc generates an error caused by implicit definition of some vga-related function (right after messages regarding building kernel/irq/spurious.c (I don't know whether something else is succesfully compiled in the middle, but no message is shown about it). I'll post the exact error as soon as I generate it again (I just isolated the exact option that triggered the error and right now the kernel is being normally built).
This never happened before Fedora 17 since EFI framebuffer device support exists in the kernel. I always uncheck this option as it can't be compiled as a module and I use the framebuffer driver generated together with my DRM drivers. The problem obviously happens both in EFI and nonEFI platforms.

Version-Release number of selected component (if applicable):
kernel-3.4.0-1.fc17.x86_64 -> Version for which I isolated the option that triggered the error. The problem existed in previous Fedora 17 kernel versions (except the default one, 3.3.4, included with the distribution, which I didn't try to compile, as the following one (3.3.7) was already available).

How reproducible:
Follow the exact instruction in fedora wiki to build a custom kernel.
When configuring it, uncheck EFI framebuffer device option.
Try building kernel rpm's with this custom config.

Steps to Reproduce:
1. Follow instructions in http://fedoraproject.org/wiki/Building_a_custom_kernel, from 1.1 to 1.3
2. In point 1.4 Configure Kernel Options, in the framebuffer-devices subsecion of graphics section, uncheck EFI framebuffer device option (select 'N').
3. Follow the next instructions in the wiki until 1.6 Build the New Kernel (included)
  
Actual results:
Compilation of the kernel fails early with an error, far before starting module compilation. Concretely, the error appears right after messages regarding compilation of kernel/irq/spurious.c

Expected results:
The whole kernel and its modules build fine, without support for EFI framebuffer device.

Additional info:
I use .local added to version info, by editing kernel.spec (nothing else is touched).
I compile with
rpmbuild -bb --without debug --without debuginfo --target=x86_64 kernel.spec
(this is what I do in an Atom netbook that looks to support EFI, at least in part).
I use the same instruction, but adding --with firmware, in an i7 nonEFI machine.
Both fail as explained.
Comment 1 Juan 2012-06-09 15:07:06 EDT
The exact option (in xconfig is)
Device Drivers -> Graphics support -> Support for frame buffer devices -> EFI-based Framebuffer Support

The config symbol (or lack of it) that triggers the error is:
# CONFIG_FB_EFI is not set

The error is:

arch/x86/pci/fixup.c: In function 'pci_fixup_video':
arch/x86/pci/fixup.c:352:3: error: implicit declaration of function 'vga_default_device' [-Werror=implicit-function-declaration]
arch/x86/pci/fixup.c:352:28: warning: comparison between pointer and integer [enabled by default]
arch/x86/pci/fixup.c:353:4: error: implicit declaration of function 'vga_set_default_device' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[1]: *** [arch/x86/pci/fixup.o] Error 1
make: *** [arch/x86/pci] Error 2
make: *** Waiting for unfinished jobs....

It was my mistake to say that it always happens after spurious.c. As it compiles in parallel that was consistently happenning in the i7 machine, where it was built by 8 concurrent threads. Now, in the Atom, with 4 threads, it didn't happen in the same point (but very close).
Comment 2 Josh Boyer 2012-06-09 15:26:16 EDT
This is known.  It is because there are some follow-on patches missing in the vgaarb-vga_default_device.patch patchset that fix this.  We'll get to this later.
Comment 3 Josh Boyer 2012-06-19 14:48:50 EDT
*** Bug 833554 has been marked as a duplicate of this bug. ***
Comment 4 Josh Boyer 2012-07-20 13:56:44 EDT
I updated the patch with the upstream commits, including the ones missing for the build errors.  Should be fixed in the next update.
Comment 5 stan 2012-08-09 13:06:50 EDT
This too works fine in my custom compile of 3.5.0-2.  Thanks.
Comment 6 Juan 2012-08-09 13:12:20 EDT
Works in last version of kernel :)
Comment 7 Fedora Update System 2012-10-22 14:39:09 EDT
kernel-3.6.3-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/kernel-3.6.3-1.fc17
Comment 8 Fedora Update System 2012-10-22 21:54:24 EDT
Package kernel-3.6.3-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.6.3-1.fc17'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16669/kernel-3.6.3-1.fc17
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2012-12-20 10:52:54 EST
kernel-3.6.3-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.