Bug 209850 - Out of tree kernel builds fail for Xen guests
Out of tree kernel builds fail for Xen guests
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel-xen (Show other bugs)
4.5
All Linux
low Severity low
: ---
: ---
Assigned To: Chris Lalancette
Brian Brock
:
Depends On:
Blocks: 192025
  Show dependency treegraph
 
Reported: 2006-10-06 18:13 EDT by Jason Baron
Modified: 2013-03-06 00:59 EST (History)
7 users (show)

See Also:
Fixed In Version: RHBA-2007-0304
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-07 23:48:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 13:10 EST, Chris Lalancette
no flags Details | Diff
Second, more complete fix for out-of-tree (really bzImage) building problem. (870 bytes, patch)
2006-11-28 14:15 EST, Chris Lalancette
no flags Details | Diff
Yet another fix for the out of tree problem. (747 bytes, patch)
2006-11-29 14:21 EST, Chris Lalancette
no flags Details | Diff

  None (edit)
Description Jason Baron 2006-10-06 18:13:40 EDT
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 18:53:24 EDT
Sorry dude, I'm on RHEL5 now.
Comment 2 Chris Lalancette 2006-11-01 13:10:25 EST
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 13:12:18 EST
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 14:33:47 EST
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 14:15:11 EST
Created attachment 142318 [details]
Second, more complete fix for out-of-tree (really bzImage) building problem.
Comment 7 Chris Lalancette 2006-11-29 14:21:37 EST
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 14:04:25 EST
Jeff Burke's testing looked good; posted to rhkernel-list
Comment 9 Jason Baron 2006-12-13 14:20:11 EST
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 09:49:14 EST
QE ack for RHEL4.5.
Comment 12 Mike Gahagan 2007-02-23 16:38:54 EST
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
mrproper'
  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 16:43:56 EST
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 17:13:41 EST
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-07 23:48:09 EDT
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.

http://rhn.redhat.com/errata/RHBA-2007-0304.html

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