maverick toolchain producing unbootable (hanging) kernels
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
New
|
Undecided
|
Unassigned | ||
binutils (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Maverick |
Won't Fix
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Maverick |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: gcc-4.4
when attempting to compile recent vanilla kernels from source (2.6.35.7, 2.6.35.8, 2.6.36), the resulting bzImages all hang at the same point in the boot process. this doesn't seem to be an error with the kernel config or source, because using identical kernel source and .config produces working kernels when compiled inside a debootstrap'd lucid chroot.
i had originally suspected this had something to do with a specific cpu setting (CONFIG_MPENTIUMM), but this also happens after changing to the 'generic' CONFIG_M686. i also suspected that perhaps something was broken with my install. however, a bzImage produced remotely from someone's fresh 32bit 10.10 install also hung at the exact same place during boot. compiling using ubuntu's generic .config and patchset (linux-
the boot failure occurs both on real hardware (ibm t42p) as well as inside of qemu. the broken bzImages hang at rtc_cmos in qemu, and at ehci initialization on real hw. the working bzImages from lucid (as they ought to) end with a kernel panic due to missing rootfs.
the broken bzImages are produced with both kernel-package 12.036 and a simple 'make' in the kernel source tree.
i had some luck using bzImage/vmlinux with qemu/gdb to see where it was stuck at, but now the symbols don't seem to match up. i would otherwise provide this info.
this problem has only appeared since installing 10.10. 8.10, 9.04, 9.10, and 10.04 did not present this issue. lucid's build environment, used from a chroot inside maverick, also does not present this issue. although this bug has been placed under gcc-4.4, maverick's gcc-4.5 package has the same issue.
running gcc 4.4.4's testsuite shows failure in several places. the binutils testsuite shows no failures.
i've attached a minimized 2.6.36 .config which produces a broken bzImage.
any insight appreciated.
thanks,
-matt
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gcc-4.4 4.4.4-14ubuntu5
Uname: Linux 2.6.36deep-thought i686
Architecture: i386
Date: Tue Nov 9 15:28:56 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: gcc-4.4
Changed in binutils (Ubuntu): | |
status: | New → Invalid |
after some further narrowing of kernel config, it appears that 'CONFIG_ RELOCATABLE= y' is causing the kernel to become unbootable with maverick's 32bit toolchain. unsetting this parameter produces a bootable kernel on maverick. again, lucid toolchain produces bootable kernels with or without 'CONFIG_ RELOCATABLE= y'.
so this is what's causing it in the kernel config. according to LKDDB, this parameter does:
'The kernel is linked as a position- independent executable (PIE) and contains dynamic relocations which are processed early in the bootup process.'
i'm able to reproduce this consistently now, by toggling CONFIG_RELOCATABLE on and off in kernel compiles.
thanks,
-matt