Bug 209850 - Out of tree kernel builds fail for Xen guests
Summary: Out of tree kernel builds fail for Xen guests
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel-xen (Show other bugs)
(Show other bugs)
Version: 4.5
Hardware: All Linux
Target Milestone: ---
: ---
Assignee: Chris Lalancette
QA Contact: Brian Brock
Depends On:
Blocks: 192025
TreeView+ depends on / blocked
Reported: 2006-10-06 22:13 UTC by Jason Baron
Modified: 2013-03-06 05:59 UTC (History)
7 users (show)

Fixed In Version: RHBA-2007-0304
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-05-08 03:48:08 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A simple fix for the Makefile issue; basically get rid of the ln -sf that was causing the problem. (701 bytes, patch)
2006-11-01 18:10 UTC, Chris Lalancette
no flags Details | Diff
Second, more complete fix for out-of-tree (really bzImage) building problem. (870 bytes, patch)
2006-11-28 19:15 UTC, Chris Lalancette
no flags Details | Diff
Yet another fix for the out of tree problem. (747 bytes, patch)
2006-11-29 19:21 UTC, Chris Lalancette
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0304 normal SHIPPED_LIVE Updated kernel packages available for Red Hat Enterprise Linux 4 Update 5 2007-04-28 18:58:50 UTC

Description Jason Baron 2006-10-06 22:13:40 UTC
Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:

building out of tree object files fails for xen kernels

Steps to Reproduce:
1. cp ./configs/xen-config .config
2. make O=/tmp/objdir oldconfig
3. make O=/tmp/objdir bzIma
Actual results:

  OBJCOPY vmlinux-stripped
  GZIP    vmlinuz
ln: creating symbolic link `arch/i386/boot/bzImage' to `../../../vmlinuz': No
such file or directory
make[2]: *** [bzImage] Error 1
make[1]: *** [bzImage] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9'
***** make bzImage Failed: *****

Expected results:

successul build

Additional info:

Comment 1 Rik van Riel 2006-10-06 22:53:24 UTC
Sorry dude, I'm on RHEL5 now.

Comment 2 Chris Lalancette 2006-11-01 18:10:25 UTC
Created attachment 140014 [details]
A simple fix for the Makefile issue; basically get rid of the ln -sf that was causing the problem.

Comment 3 Chris Lalancette 2006-11-01 18:12:18 UTC
The previous patch should fix the problem; since Xen munges the Makefiles so
that "vmlinuz" is put at the top-level directory as it is, there is no need to
symlink it at all.  This maintains behavior with the current RHEL-4 tree.

Comment 5 Chris Lalancette 2006-11-27 19:33:47 UTC
Sigh.  Apparently I was on crack before; it is symlinking *from* $TOPDIR/vmlinuz
to arch/i386/boot/bzImage.  I'm still looking at this.

Comment 6 Chris Lalancette 2006-11-28 19:15:11 UTC
Created attachment 142318 [details]
Second, more complete fix for out-of-tree (really bzImage) building problem.

Comment 7 Chris Lalancette 2006-11-29 19:21:37 UTC
Created attachment 142409 [details]
Yet another fix for the out of tree problem.

Let's try this one more time; I think this patch actually fixes it.  I'm
waiting on the results of Jeff Burke's testing to know for sure.

Comment 8 Chris Lalancette 2006-12-08 19:04:25 UTC
Jeff Burke's testing looked good; posted to rhkernel-list

Comment 9 Jason Baron 2006-12-13 19:20:11 UTC
committed in stream U5 build 42.31. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/

Comment 10 Jay Turner 2006-12-18 14:49:14 UTC
QE ack for RHEL4.5.

Comment 12 Mike Gahagan 2007-02-23 21:38:54 UTC
When I try this using the -48.EL kernel source tree, I get this after doing the
make bzImage step described above. I tried a ' make O=/tmp/objdir clean' and
that didn't help. The error makes no sense as running a make mrproper would just
undo the previous make oldconfig step.

[root@dhcp58-247 linux-2.6.9]# make O=/tmp/objdir bzImage
  Using /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 as source for kernel
  /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 is not clean, please run 'make
  in the '/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9' directory.
make[1]: *** [prepare1] Error 1
make: *** [bzImage] Error 2

Comment 13 Chris Lalancette 2007-02-23 21:43:56 UTC
I believe this is a limitation/feature of the build system.  If you are going to
build things out of tree (ala "make O=/tmp/objdir bzImage"), you *also* have to
copy the .config file there, run "make O=/tmp/objdir oldconfig", and make sure
that the "pristine" tree (i.e. /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9)
is clean via "make mrproper".  If you do these three steps, does the out of tree
build work?

Chris Lalancette

Comment 14 Mike Gahagan 2007-02-23 22:13:41 UTC
yup, that worked. I was able to verify the bug with the -42.22 kernel and the
fix with the -48 kernel.

Comment 16 Red Hat Bugzilla 2007-05-08 03:48:09 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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