WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Still un-answered: How-To build Xen (3.2) to override Xe

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Still un-answered: How-To build Xen (3.2) to override XenSource's linux-kernel (2.6.18) with a xenified kernel (your own or distribution)
From: Jithendra Bethur <bcj01@xxxxxxxxx>
Date: Tue, 8 Jul 2008 04:43:29 -0700 (PDT)
Delivery-date: Tue, 08 Jul 2008 04:44:08 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=5/Iy749FTqsiMy9zxwMJvx0+ZLERKXSU2eKy44Sr74hNko7RUqZ+G0nDcjYVDtFaFEIMsHoxdyu/Uc1egz4ISwFQBLp9TAGjRwj8eLEoSg0Cshmb/cCMX7gy9Zni1oOPt+PEBwQQOvQf+OseIhAeJaS7YnZzZ5MrdY6jCLlUb6g=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1215402651.5428.14.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx

Progress/Update and a new-sub-question!

 

Thanks to all for your quick and accurate response.  I was able to build Xen 3.2 AND override the linux kernel-xen pointer by modifying the buildconfigs/src.hg-clone.  I will shortly post a detailed full instructions for other (Fedora core) users.

 

Sub-Question: As Tim Post suggested, I was able to build the linux kernel seperately and use that with Xen-kernel to successfully boot to Xen+Dom0.  But just for completion sake, I tried to bulid the linux kernel from within Xen-3.2.0 (by 'make prep-kernel' AND 'copying .config' AND make world).  It almost completed the build 99% (I think) and encountered the below error (while copying the vmlinux file to ...../arch/i386/boot/ directory).

--------- <<<< Begin: Build output (partial) with error <<<<<< ---------------------------------

............

........

....

WARNING: vmlinux - Section mismatch: reference to .init.text:__alloc_bootmem_low from .text between 'xen_machine_kexec_setup_resources' (at offset 0xc1151646) and 'xen_machine_kexec_load'
  OBJCOPY vmlinux-stripped
BFD: vmlinux-stripped: warning: allocated section `.notes' not in segment
  GZIP    vmlinuz
make[3]: Leaving directory `/home/dev1/xen-build/xen-3.2.0/build-linux-2.6.18-xen_x86_32'
mkdir -p /home/dev1/xen-build/xen-3.2.0/dist/install/boot
cp build-linux-2.6.18-xen_x86_32/arch/i386/boot/vmlinuz /home/dev1/xen-build/xen-3.2.0/dist/install/boot/vmlinuz-2.6.21.7-8096.fc8xen-xen
cp: cannot stat `build-linux-2.6.18-xen_x86_32/arch/i386/boot/vmlinuz': No such file or directory
make[2]: *** [build] Error 1
make[2]: Leaving directory `/home/dev1/xen-build/xen-3.2.0'
make[1]: *** [linux-2.6-xen-install] Error 2
make[1]: Leaving directory `/home/dev1/xen-build/xen-3.2.0'
make: *** [install-kernels] Error 1

--------- <<<< End: Build output (partial) with error <<<<<< ---------------------------------

 

Why am I getting this:

cp: cannot stat `build-linux-2.6.18-xen_x86_32/arch/i386/boot/vmlinuz': No such file or directory

errror with cp?

 

I noticed that under the 'build-linux-2.6.18-xen_x86_32/arch/i386'  directory there was really no boot/ directory.  Rather there was a boot-xen/ directory (along with other directories like crypto, kernel, lib, mach-xen etc).  The destination dist/install/boot existed.

 

Why would the .....arch/i386/boot directory be missing.

PS: This may well be Fedora Core specific (in which case we may drop it at this if inappropriate)

 

-regards,

Jithendra B



--- On Sun, 7/6/08, Tim Post <echo@xxxxxxxxxxxx> wrote:

From: Tim Post <echo@xxxxxxxxxxxx>
Subject: Re: [Xen-users] Still un-answered: How-To build Xen (3.2) to override XenSource's linux-kernel (2.6.18) with a xenified kernel (your own or distribution)
To: "Jithendra Bethur" <bcj01@xxxxxxxxx>
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Date: Sunday, July 6, 2008, 8:50 PM

On Sun, 2008-07-06 at 15:22 -0700, Jithendra Bethur wrote:
> Hello, 
> 
> I can say that I have searched the entire 'world wide web' and
still
> haven't found 'complete  and clear answers' to the often asked
> question of:
> 
> Given a Xen (release) build (say 3.2.0), which by default tries to get
> and build and assume Linux kernel-xen 2.6.18 from the mercurial
> repository, HOW TO override the build and make it work with a
> 'different' xenified Linux source tree (kernel-xen) say Fedora
Core 8
> kernel-xen 2.6.23.7-3.fc8-xen.src.rpm

If you are using a pre-patched kernel from a distribution, your better
off building that independently from Xen. Why not just build the
Hypervisor and tools while skipping the kernel?

make XEN_TARGET_ARCH=arch xen
make XEN_TARGET_ARCH=arch tools
make XEN_TARGET_ARCH=arch install-xen
make XEN_TARGET_ARCH=arch install-tools

... of course add docs to that if you want them.

Then build / configure your kernel outside of the Xen source tree, via
whatever means your packager provides.

I use Ubuntu's Hardy and Intrepid kernel trees which (1) requires Git
and (2) uses the debuild / debian helpers.. its very impractical to try
to include it in the Xen build because many extra steps are needed.

You will still easily be able to produce .deb / .rpm packages of your
own if you use the 'checkinstall' utility or something similar.

Regards,
--Tim
[Jithendra B] Minor correction in the original post (to help searches resulting from this keywords!).
For the Fedora Core kernel-xen package revision, I mistakenly typed "kernel-xen 2.6.23.7-3.fc8-xen.src.rpm" when I meant to type "> kernel-xen 2.6.21.7-3.fc8-xen.src.rpm"
(it is .21 and not .23)
 
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users