Red Hat Bugzilla – Bug 209850
Out of tree kernel builds fail for Xen guests
Last modified: 2013-03-06 00:59:47 EST
Description of problem:
Version-Release number of selected component (if applicable):
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
ln: creating symbolic link `arch/i386/boot/bzImage' to `../../../vmlinuz': No
such file or directory
make: *** [bzImage] Error 1
make: *** [bzImage] Error 2
make: Leaving directory `/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9'
***** make bzImage Failed: *****
Sorry dude, I'm on RHEL5 now.
Created attachment 140014 [details]
A simple fix for the Makefile issue; basically get rid of the ln -sf that was causing the problem.
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.
Sigh. Apparently I was on crack before; it is symlinking *from* $TOPDIR/vmlinuz
to arch/i386/boot/bzImage. I'm still looking at this.
Created attachment 142318 [details]
Second, more complete fix for out-of-tree (really bzImage) building problem.
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.
Jeff Burke's testing looked good; posted to rhkernel-list
committed in stream U5 build 42.31. A test kernel with this patch is available
QE ack for RHEL4.5.
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: *** [prepare1] Error 1
make: *** [bzImage] Error 2
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
yup, that worked. I was able to verify the bug with the -42.22 kernel and the
fix with the -48 kernel.
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.