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] how to get xen with a kernel 2.6.27 or above?

To: secdev geek <secdevgeek@xxxxxxxxx>
Subject: Re: [Xen-users] how to get xen with a kernel 2.6.27 or above?
From: Tapas Mishra <tapas@xxxxxxxxxxxx>
Date: Sat, 5 Dec 2009 03:00:26 +0530
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 04 Dec 2009 13:31:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1a31de190912041319oe5b6239x8f4c064103250f92@xxxxxxxxxxxxxx>
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>
References: <1a31de190912041319oe5b6239x8f4c064103250f92@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Some one explained me in detail on community so I am forwarding same here
This guide will explicate in detail about the procedure for compiling
vanilla kernel from source and customize it according to your hardware
specifications and then compiling latest XEN from source and patching
it with Linux.
First install these packages:

sudo apt-get install iproute  bridge-utils  gcc make  gettext
sudo apt-get install libcurl4-openssl-dev è openssl problem resolved
sudo apt-get install python-dev zlib1g-dev bcc libsdl-dev pciutils-dev
è zlib problem resolved.


First we will compile latest XEN Hypervisor from source.

Go to http://www.xen.org/products/xen_source.html and download the
latest XEN hypervisor from there. [Version 3.4.1 at the time of
writing the guide]
Xen 3.4.1 is available WITH and WITHOUT 2.6.18 dom0 kernel. We need
the version without dom0 linux because we will compile our own vanilla
kernel.
I am seting up XEN 3.4.1 on amd64 hardware and running debian
distribution on it with upgraded kernel.
My hardware specifications:
unme -a
Linux -04 2.6.31.4-user-kvm-vanilla #1 SMP Wed Oct 21 16:35:11 BST
2009 x86_64 GNU/Linux
Build / Install Xen

   1. mkdir /home/tapas/xen
   2. cd /home/tapas/xen
   3. tar -xzf xen-3.4.1
   4. cd xen-3.4.1
   5. make xen
   6. make install-xen
   7. make tools
   8. make install-tools

 Build Vanilla kernel
Now we will build th PV_Ops Kernel. The Vanilla kernel source will be
downloaded from Jeremy's tree. Jeremy's git tree on kernel.org
contains the pv_ops dom0 patches. If we use Jeremy's tree then we do
not any extra patches to bind XEN with kernel source.

   1. mkdir /home/tapas/linux
   2. cd /home/tapas/linux
   3. git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
   4. linux-2.6-xen
   5. cd linux-2.6-xen
   6. git checkout origin/xen/master -b xen/master
   7. make menuconfig  [see Note below]
   8. make-kpkg clean
   9. CONCURRENCY_LEVEL=N fakeroot make-kpkg --initrd
--append-to-version=-custom kernel_image kernel_headers
  10. This will make the debian packages in the parent directory which
you can install

Note: Please choose the following xen specific optiions in kernel configuration.


Processor type and features ---> Subarchitecture Type (PC-compatible)
---> (X) Enable Xen compatible kernel
Bus options (PCI etc.)  ---> [*] PCI support
                                           [*]   Xen PCI Frontend
                                            [ ]     Xen PCI Frontend
Debugging (NEW)
Device Drivers  ---> XEN  ---> [*] Privileged Guest (domain 0)
                                             <*> Backend driver support (NEW)
                                             <*>   Block-device
backend driver (NEW)
                                             <*>   Block-device tap
backend driver (NEW)
                                              <*>   Network-device
backend driver (NEW)
                                               (8)     Maximum
simultaneous transmit requests (as a power of 2) (NEW)
                                                [ ]     Pipelined
transmitter (DANGEROUS) (NEW)
                                               < >     Network-device
loopback driver (NEW)
                                               <*>   PCI-device
backend driver (NEW)
                                                        PCI Backend
Mode (Virtual PCI)  --->
                                                         [ ]     PCI
Backend Debugging (NEW)
                                                          < >
TPM-device backend driver (NEW)
                               <M>   SCSI backend driver (NEW)
                             < >   TPM-device backend driver (NEW)
                               <M>   SCSI backend driver (NEW)
                               <M> Block-device frontend driver
                               <M> Network-device frontend driver
                               <M>   Network-device frontend driver
acceleration for Solarflare NICs (NEW)
                               <M> SCSI frontend driver (NEW)
                               <*> User-space granted page access driver (NEW)
                               <*> Framebuffer-device frontend driver (NEW)
                               <*>   Keyboard-device frontend driver (NEW)
                               [*] Disable serial port drivers (NEW)
                               <*> Export Xen attributes in sysfs (NEW)
                               (256) Number of guest devices (NEW)
                                   Xen version compatibility (3.0.4
and later)  --->

After xen confiuration, please make sure that .config has the
following parameter configuration:

    * CONFIG_XEN=y
    * CONFIG_XEN_MAX_DOMAIN_MEMORY=32
    * CONFIG_XEN_SAVE_RESTORE=y
    * CONFIG_XEN_DOM0=y
    * CONFIG_XEN_PRIVILEGED_GUEST=y
    * CONFIG_XEN_PCI=y
    * CONFIG_PCI_XEN=y
    * CONFIG_XEN_BLKDEV_FRONTEND=m
    * CONFIG_NETXEN_NIC=m
    * CONFIG_XEN_NETDEV_FRONTEND=m
    * CONFIG_XEN_KBDDEV_FRONTEND=m
    * CONFIG_HVC_XEN=y
    * CONFIG_XEN_FBDEV_FRONTEND=m
    * CONFIG_XEN_BALLOON=y
    * CONFIG_XEN_SCRUB_PAGES=y
    * CONFIG_XEN_DEV_EVTCHN=y
    * CONFIG_XEN_BACKEND=y
    * CONFIG_XEN_BLKDEV_BACKEND=y
    * CONFIG_XEN_NETDEV_BACKEND=y
    * CONFIG_XENFS=y

 * CONFIG_XEN_NETDEV_BACKEND=y
    * CONFIG_XENFS=y
    * CONFIG_XEN_COMPAT_XENFS=y
    * CONFIG_XEN_XENBUS_FRONTEND=m


Install these debian packages using
sudo dpkg -i <name>
Add the following line to /etc/fstab

none /proc/xen xenfs defaults 0 0

and reboot the machine.

After installing the debian packages, the Grub Entry will look like
the following:
title             Xen 3.4.1 / Debian GNU/Linux, kernel 2.6.31.4-tapas-xen-4
root             (hd0,0)
kernel          /boot/xen-3.4.1.gz
module          /boot/vmlinuz-2.6.31.4-tapas-xen-4 root=/dev/sda1 ro
console=tty0
module          /boot/initrd.img-2.6.31.4-tapas-xen-4

Hope that will help.








On Sat, Dec 5, 2009 at 2:49 AM, secdev geek <secdevgeek@xxxxxxxxx> wrote:
> Hi list,
>
> I am starting a academic security related project and I was wondering if
> there is any documentation on compiling xen/dom0 with a recent kernel?
>
> I've seen a few good intentioned threads, but no real documentation so far.
> Any helpful pointers will be greatly appreciated!
>
> Thanks in advance,
> - SDG
>
> P.S: First mail, not sure if I should post it here...let me know if I am on
> the wrong list. :-)
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
>



-- 

http://www.abhitech.com

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users