Bug 209850

Summary: Out of tree kernel builds fail for Xen guests
Product: Red Hat Enterprise Linux 4 Reporter: Jason Baron <jbaron>
Component: kernel-xenAssignee: Chris Lalancette <clalance>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: low    
Version: 4.5CC: clalance, ddutile, jbaron, jburke, knoel, riel, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0304 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-08 03:48:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 192025    
Attachments:
Description Flags
A simple fix for the Makefile issue; basically get rid of the ln -sf that was causing the problem.
none
Second, more complete fix for out-of-tree (really bzImage) building problem.
none
Yet another fix for the out of tree problem. none

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
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 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.

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