Red Hat Bugzilla – Bug 830446
Kernel does not compile without EFI framebuffer device
Last modified: 2012-12-20 10:52:54 EST
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).
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)
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
The whole kernel and its modules build fine, without support for EFI framebuffer device.
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.
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: *** [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).
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.
*** Bug 833554 has been marked as a duplicate of this bug. ***
I updated the patch with the upstream commits, including the ones missing for the build errors. Should be fixed in the next update.
This too works fine in my custom compile of 3.5.0-2. Thanks.
Works in last version of kernel :)
kernel-3.6.3-1.fc17 has been submitted as an update for Fedora 17.
* 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:
then log in and leave karma (feedback).
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.